{"id":15129964,"url":"https://github.com/uxxhans/rainbow-cats-personal-wechat-miniprogram","last_synced_at":"2025-10-08T07:44:51.664Z","repository":{"id":39586239,"uuid":"477995919","full_name":"UxxHans/Rainbow-Cats-Personal-WeChat-MiniProgram","owner":"UxxHans","description":"给女朋友做的微信小程序！情侣自己的任务和商城系统！","archived":false,"fork":false,"pushed_at":"2023-08-16T04:15:24.000Z","size":29247,"stargazers_count":2006,"open_issues_count":11,"forks_count":488,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-22T14:08:24.746Z","etag":null,"topics":["miniprogram","wechat","wechat-mini-program","weixin"],"latest_commit_sha":null,"homepage":"","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/UxxHans.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}},"created_at":"2022-04-05T06:04:27.000Z","updated_at":"2025-05-22T05:55:17.000Z","dependencies_parsed_at":"2024-01-14T05:18:52.991Z","dependency_job_id":null,"html_url":"https://github.com/UxxHans/Rainbow-Cats-Personal-WeChat-MiniProgram","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UxxHans/Rainbow-Cats-Personal-WeChat-MiniProgram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UxxHans%2FRainbow-Cats-Personal-WeChat-MiniProgram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UxxHans%2FRainbow-Cats-Personal-WeChat-MiniProgram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UxxHans%2FRainbow-Cats-Personal-WeChat-MiniProgram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UxxHans%2FRainbow-Cats-Personal-WeChat-MiniProgram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UxxHans","download_url":"https://codeload.github.com/UxxHans/Rainbow-Cats-Personal-WeChat-MiniProgram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UxxHans%2FRainbow-Cats-Personal-WeChat-MiniProgram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278909713,"owners_count":26066887,"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-08T02:00:06.501Z","response_time":56,"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":["miniprogram","wechat","wechat-mini-program","weixin"],"created_at":"2024-09-26T02:25:24.921Z","updated_at":"2025-10-08T07:44:51.624Z","avatar_url":"https://github.com/UxxHans.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 云开发情侣互动小程序（做任务，攒积分，换商品）\n## 序言\n这是使用云开发能力构建的情侣互动小程序，可以跟女朋友互动哦，其中使用了云开发基础能力的使用：\n- **数据库**：对文档型数据库进行读写和管理\n- **云函数**：在云端运行的代码，开发者只需编写业务逻辑代码\n## 使用逻辑\n打个比方:\n- 女朋友发布任务-\u003e女朋友来做任务-\u003e做完后由你来确认完成-\u003e女朋友收到积分\n- 你发布商品(洗碗券)-\u003e女朋友使用积分购买-\u003e商品进入到女朋友的库存-\u003e女朋友拿着洗碗券叫你洗碗-\u003e你洗碗-\u003e女朋友将物品(洗碗券)标记为已使用(不可逆)\n- 这样做的原因是 不想给任何一方能自说自话 增加自己或者对方积分的能力[点击完成任务的人不能是获得积分的人也不能是自己]\n## 版本新增\n- 将所有非云函数的云逻辑**封装为云函数**\n- 新增了**仓库系统**，购买了的商品会存入仓库，然后再被使用\n- 新增了**搜索框**，可以搜索物品和任务\n- 新增了**滑动窗**，可以自动播放显示多张图片\n- 新增了**商品和任务预设**，添加商品或任务可以使用预设，非常迅速\n- 将新增按钮变为可拖拽的**页面悬浮按钮**\n- 购买，上架，新建任务的**时间都会被记录**并显示\n- 取消了点击左边圆圈来完成或者购买，统一改为**左滑菜单**\n- 左滑菜单统一用**图标**显示，更加精简\n- 使用**特效升级**了详细信息页面与添加页面的美观度\n- 添加任务或物品界面积分文本框改为**滑块**\n- 在商城添加了**顶栏**显示积分，更直观\n- 使用**表情符号**简单的增加了美感\n## 效果图与动画\n\u003e![Image](Pics/Animation.gif)\n\u003e![Image](Pics/Main.jpg)\n## 部署方式\n- 在这里注册小程序开发者: https://mp.weixin.qq.com/cgi-bin/wx\n- 在这里登录开发者账号: https://mp.weixin.qq.com/\n\u003e![Image](Pics/Link.jpg)\n- 登录之后先在`主页`完成小程序`信息`和`类目`\n- 然后可以在`管理`中的`版本管理`与`成员管理`中发布小程序体验版并邀请对象使用\n\u003e![Image](Pics/Account.jpg)\n- 随后可以在`开发`中的`开发工具`里下载**微信开发者工具**\n- 打开微信开发工具-\u003e登录-\u003e导入我的文件夹-进入工具\n- 在左上角五个选项中选择`云开发`-\u003e按照提示开通云开发(这里可以选择免费的，不过限量，我开发用的多，6块够用了)\n\u003e![Image](Pics/DatabaseOption.jpg)\n- 进入后点击数据库-\u003e在集合名称添加四个集合：`MarketList`, `MissionList`, `StorageList`, `UserList`\n- 之前使用过上一个版本的，需要清空所有数据，因为字段结构不一样\n\u003e![Image](Pics/Database.jpg)\n- 在`UserList`中添加两个默认记录, 在两个记录中分别添加两个字段:\n```\n字段 = _openid | 类型 = string | 值 = 先不填\n字段 = credit | 类型 = number | 值 = 0\n```\n- 打开云开发的控制台的`概览`选项-\u003e复制环境ID\n- 打开 `miniprogram/envList.js` 将内容全部替换成如下，注意替换环境ID\n```js\nmodule.exports = {\n  envList: [{\n    envId:'上述步骤中你获得的环境ID (保留单引号)'\n  }]\n}\n```\n- 右键点击 `cloudfunctions` 中的每个文件夹并选择云函数云端安装依赖上传 (有点麻烦但是这是一定要做的)\n\u003e![Image](Pics/CloudFunction.jpg)\n- 如果云开发里面的云函数页面是这样的就是成功了\n\u003e![Image](Pics/CloudFunctionList.jpg)\n\n- 没有安装npm或者NodeJs, 需要先在这里安装: https://nodejs.org/dist/v16.15.1/node-v16.15.1-x64.msi\n- 安装好的，就直接运行`cloudfunctions/Install-WX-Server-SDK.bat` \n- 不成功的话可以在命令行输入 `npm install --save wx-server-sdk@latest`\n- 然后创建体验版小程序-\u003e通过开发者账号分享到女朋友手机上(要先登录小程序开发者账号)\n- 在两个手机上运行小程序-\u003e分别在两个手机上的小程序里新建任务\n- 然后回到云开发控制台的`missionlist`数据库集合-\u003e找自己和女朋友的`_openid`变量并记录\n- 把这两个记录下来的`_openid`拷贝到云开发控制台`UserList`数据集合里刚刚没填的`_openid`变量中\n- 把这两个记录下来的`_openid`拷贝到`miniprogram/app.js`里的`_openidA`和`_openidB`的值里(A是卡比，B是瓦豆)\n- 在`miniprogram/app.js`里把`userA`和`userB`改成自己和女朋友的名字\n- 然后再试试看是不是成功了! (别忘了任务和物品**左滑**可以完成和购买)\n- 消息提醒功能：\n- 参考https://blog.csdn.net/hell_orld/article/details/110675777?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168490366016800180699170%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D\u0026request_id=168490366016800180699170\u0026biz_id=0\u0026utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-2-110675777-null-null.142^v87^insert_down28v1,239^v2^insert_chatgpt\u0026utm_term=%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F%E9%80%9A%E7%9F%A5%E4%BA%91%E5%BC%80%E5%8F%91\u0026spm=1018.2226.3001.4187配置自己想要的模板\n- 在`miniprogram/pages/MainPage/index.js`和`miniprogram/pages/MissionAdd/index.js`里把模板号换成自己想要的模板号\n- 在`cloudfunctions/information/index.js`里把UserA和UserB的openid值进行修改就能使用消息提醒功能了\n\u003e![Image](Pics/information.jpg)\n- 别忘了最后点击右上角上传-\u003e然后在开发者账号上设置小程序为**体验版**-\u003e不用去发布去审核\n\u003e![Image](Pics/UploadOption.jpg)\n- 最后如果有兴趣可以继续深入开发, 开发文档: https://developers.weixin.qq.com/miniprogram/dev/component/\n## 旧版效果图\n\u003e![Image](Pics/Previous.jpg)\n## 声明\n- 小程序内所有图片均来自网络，此项目非商用，侵删。\n- 若想使用此项目为商用，请先告知我，谢谢。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuxxhans%2Frainbow-cats-personal-wechat-miniprogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuxxhans%2Frainbow-cats-personal-wechat-miniprogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuxxhans%2Frainbow-cats-personal-wechat-miniprogram/lists"}