{"id":18052867,"url":"https://github.com/minooo/react-template-simple","last_synced_at":"2025-10-06T00:41:14.414Z","repository":{"id":87399240,"uuid":"136880277","full_name":"minooo/react-template-simple","owner":"minooo","description":"react-template-simple","archived":false,"fork":false,"pushed_at":"2018-07-20T05:42:43.000Z","size":1752,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T07:27:26.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minooo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-11T05:49:43.000Z","updated_at":"2020-12-24T03:32:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ded16e9-2c19-4f32-8a92-bd411b4855f8","html_url":"https://github.com/minooo/react-template-simple","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/minooo/react-template-simple","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minooo%2Freact-template-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minooo%2Freact-template-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minooo%2Freact-template-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minooo%2Freact-template-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minooo","download_url":"https://codeload.github.com/minooo/react-template-simple/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minooo%2Freact-template-simple/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278542673,"owners_count":26004060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T23:13:25.250Z","updated_at":"2025-10-06T00:41:14.401Z","avatar_url":"https://github.com/minooo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#嘟嘟拼团插件项目前端\n\n## 前端约定\n\n* [next.js 6 文档](https://nextjs.org/docs/#setup)\n* 前期没图片的情况下，一律使用这个格式的图片，https://dummyimage.com/600x400，自定义图片参照这个格式 想玩点花样可以 https://dummyimage.com/600x400/ff0/f00\u0026text=plugin\n* 人民币的符号统一使用 `¥`\n* 测试 http://plugins.duduapp.net/\n* 模拟登陆 http://mp.dev.duduapp.net/h5/zKB4Db0a2PVqyV8YPve3?token=NkFtSlpUZFNrd1QxbUZRWkRCSExSUT09\n* 本地网址 http://mp.duduapp.localhost/#/\n* 填坑大全之如果支付出现问题，首先排查 Window.AppConfig.wx.jsConfig 是否有值，然后看url中#前面是否有 ?index, 最后是调起支付时，传的支付参数是否对应。\n* http://mp.dev.duduapp.net/h5/w8LO1dXy9zzN9lRkjGEx?index=1\u0026token=NkFtSlpUZFNrd1QxbUZRWkRCSExSUT09#/\n\n```\n// 开发\nnpm start\n\n// 部署\nnpm run build\n// 完事之后，将dist 中的 index.html 格式化，取bundle后面的那一串。\n\n```\n\n## 后端约定\n\n以下建议是根据近期项目开发总结而来，请各位务必认真对待。有问题随时提，我们要将此作为今后的约定规范\n\n* 所有请求的数据统一用 data 作为键名\n\n* 请求数据的状态字段为 errcode（0 表示成功，其他后端商定），值类型必须为数字；消息字段为 msg，值类型必须为字符串，这俩字段每个接口都必须返回。\n\n* 一些极常用的约定字段关于物的标题，副标题，内容 分别为 ：title, caption, con；关于人的标题，副标题，内容 分别为 ：nickname (real_name, 如果需要）, intro, con，产品/人物 的 id 是必须的，创建时间 created_time (其他涉及时间的，统一用 xxx_time 的格式) 手机号 mobile 地址 address\n  缩略图 thumb (thumb 统一用于列表中的图片字段，image(s)用于详情里的图片)，头像，avatar，价格 price (优惠价：low_price)\n  其他字段，按需发挥，但是尽量简明扼要，统一下划线命名\n\n## 公共组件库\n\n### Data Display\n\n#### 1.0 Steps 步骤条\n\n##### 代码演示\n\n```\nimport { Steps } from \"@components\";\n\n\u003cSteps step={3} /\u003e\n```\n\n| 属性 |          说明          |  类型  | 默认值 |\n| :--: | :--------------------: | :----: | :----: |\n| step | 制定当前步骤，从 1~4。 | number |   -    |\n\n### 倒计时\n\n```js\n// 引入格式化时间插件\n  import { parse } from \"date-fns\";\n  // 创建一个state获取函数返回值\n  state = {\n    surplusTime: \"\"\n  };\n// 设置定时器\n  componentDidMount() {\n    // 格式化传入时间\n    const upDateParse = parse(this.props.item.time);\n    this.interval = setInterval(\n      () =\u003e this.timeUpdate(upDateParse, this.interval),\n      1000\n    );\n  }\n  // 结束时消除定时器\n  componentWillUnmount() {\n    clearInterval(this.interval);\n  }\n  // 创建定时函数\n   timeUpdate = (upDateParse, interval) =\u003e {\n    this.setState(() =\u003e ({\n      surplusTime: countDown(upDateParse, interval)\n    }));\n  };\n\n  // 返回值为\n  {\n    getdays,天数\n    getHours,小时数\n    getMinutes,分钟数\n    getSeconds 秒数\n  };\n  // 当时间已经低于现在时间返回false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminooo%2Freact-template-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminooo%2Freact-template-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminooo%2Freact-template-simple/lists"}