{"id":13498702,"url":"https://github.com/Samciu/CouponToday","last_synced_at":"2025-03-29T01:32:27.761Z","repository":{"id":100699989,"uuid":"326706868","full_name":"Samciu/CouponToday","owner":"Samciu","description":"美团饿了么外卖红包CPS小程序项目，带管理后台，使用uni-app + uniCloud，云函数订阅消息功能","archived":false,"fork":false,"pushed_at":"2021-07-01T08:58:08.000Z","size":3248,"stargazers_count":118,"open_issues_count":1,"forks_count":38,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-01T21:47:39.522Z","etag":null,"topics":["cps","uniapp","unicloud"],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Samciu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-04T14:19:15.000Z","updated_at":"2024-07-19T02:12:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"341b863e-41b3-4f11-9f33-fe8d90299de4","html_url":"https://github.com/Samciu/CouponToday","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samciu%2FCouponToday","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samciu%2FCouponToday/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samciu%2FCouponToday/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samciu%2FCouponToday/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samciu","download_url":"https://codeload.github.com/Samciu/CouponToday/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222445226,"owners_count":16985791,"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","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":["cps","uniapp","unicloud"],"created_at":"2024-07-31T21:00:41.151Z","updated_at":"2024-10-31T16:30:36.821Z","avatar_url":"https://github.com/Samciu.png","language":"Vue","funding_links":[],"categories":["应用场景"],"sub_categories":["微信小程序"],"readme":"\n# 今日神券\n\n美团饿了吗CPS小程序项目，别人领红包下单，你拿推广佣金\n\n### 介绍\n\n源码为 uni-app + uniCloud 项目，需下载hbuilder导入项目打包，可编译成微信小程序(跳转地址为小程序路径)\n\nmaster 分支是新版UI前端代码，依赖管理后台数据，需要先部署[管理后台](https://ext.dcloud.net.cn/plugin?id=4324)，部署到 uniCloud 后，可以永久免费使用。参考文章：\n\n- [《外卖CPS小程序2.0！带管理后台，可过审核》](https://mp.weixin.qq.com/s/YvTKaEcrNguYsDo8rea7LQ)\n\n### 使用方法\n\n#### 一、部署管理后台\n1. 打开[管理后台项目](https://ext.dcloud.net.cn/plugin?id=4324)，将插件导入HBuilderX（强烈建议使用优秀且免费的阿里云）\n2. 右键点击 uniCloud 关联云服务空间\n3. 右键点击 db_init.json 初始化数据库\n4. 右键上传 cloudfunctions 下的所有云函数\n5. 在HBuilderX顶部菜单点击 发行 -\u003e 上传网站到服务器\n6. 在弹出的对话框中选中将编译后的资源部署到云服务空间。\n7. 点击上传，等待项目编译部署上传\n8. 添加跨域配置，在uniCloud后台操作，将 `前端网页托管` -\u003e `参数配置` 中的 `默认域名` 添加到 `跨域配置`\n9. 使用该默认域名地址即可访问管理后台，创建管理员\n\n- 注意: uniCloud 选择上传所有云函数和上传选择所有schema的时候有可能失败，根据提示在cloudfunctions目录或database目录重新上传单个云函数模块和schema即可\n\n#### 二、部署小程序前端\n1. 下载或者 clone 本前端项目，导入到 HBuilderX\n2. 根目录右键创建uniCloud云开发环境，右键uniCloud目录关联到与管理后台同一个服务空间\n3. 在小程序开发管理中配置服务器request合法域名：https://api.bspapp.com、https://apis.map.qq.com\n4. 在HBuilderX顶部菜单点击发行 -\u003e 发行到微信小程序（注意鼠标先选中这个前端项目，不要选中后台项目哦）\n5. 上传版本并提交审核\n\n- 注意：manifest.json 中微信小程序权限配置 `位置接口` 需要勾选上\n\n#### 三、高级教程（订阅消息配置）\n1. 修改 `cloudfunctions/common/utils/index.js` 所有配置信息，修改 `cloudfunctions/common/uni-id/config.json` 里 weixin 属性的 appid 和appsecret\n2. 右键上传部署所有云函数及公共模块\n3. 在 unicloud 后台，函数列表中找到send函数，查看详情，根据[文档](https://uniapp.dcloud.io/uniCloud/trigger)编辑触发定时器\n\n- 注意：需要更新插件到1.0.9以上版本\n- 注意：不配置订阅消息功能不影响正常使用，前台将默认显示为 `添加小程序`\n### 交流\n\n如有疑问，可以提issue，或者加我微信： samciu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSamciu%2FCouponToday","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSamciu%2FCouponToday","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSamciu%2FCouponToday/lists"}