{"id":25172599,"url":"https://github.com/makergyt/mini-add-tips","last_synced_at":"2025-05-05T23:15:27.087Z","repository":{"id":143921290,"uuid":"272476393","full_name":"MakerGYT/mini-add-tips","owner":"MakerGYT","description":"用于提示用户首次进入小程序时，点击右上角菜单进行【添加到我的小程序】操作","archived":false,"fork":false,"pushed_at":"2020-07-02T04:48:48.000Z","size":9,"stargazers_count":52,"open_issues_count":0,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T23:15:20.744Z","etag":null,"topics":["add","component","favorite","miniprogram","onaddtofavorites","tips","wechat"],"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/MakerGYT.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":"2020-06-15T15:32:17.000Z","updated_at":"2024-10-08T13:59:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"e898f29b-6b4c-4c40-8dfd-42adb7c29839","html_url":"https://github.com/MakerGYT/mini-add-tips","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerGYT%2Fmini-add-tips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerGYT%2Fmini-add-tips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerGYT%2Fmini-add-tips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerGYT%2Fmini-add-tips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MakerGYT","download_url":"https://codeload.github.com/MakerGYT/mini-add-tips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590633,"owners_count":21772940,"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":["add","component","favorite","miniprogram","onaddtofavorites","tips","wechat"],"created_at":"2025-02-09T10:15:17.557Z","updated_at":"2025-05-05T23:15:27.081Z","avatar_url":"https://github.com/MakerGYT.png","language":"JavaScript","readme":"# Mini-add-tips\n[![GitHub stars](https://img.shields.io/github/stars/MakerGYT/mini-add-tips?style=flat-square)](https://github.com/MakerGYT/mini-add-tips)\n\n\u003e 用于提示用户首次进入小程序时，点击右上角菜单进行【添加到我的小程序】操作\n\n## 特性\n与支付宝原收藏组件(添加到首页)保持样式一致,支持在自定义导航栏场景下保持一致效果。\n\n## 预览\n### 截图\n![screenshot](https://imgkr.cn-bj.ufileos.com/5acd4635-f326-4f9e-8969-424952b7886b.gif)\n### 样例\n在[开发者工具预览](https://developers.weixin.qq.com/s/egmClxmG7biw)\n\n![小程序使用预览](https://cdn.blog.makergyt.com/mini/assets/poster-H.png)\n## 安装使用\n### 1. 获取组件\n#### 下载release(稳定)\n[latest release](https://github.com/MakerGYT/mini-add-tips/releases/latest)\n#### master(最新)\n```sh\ngit clone https://github.com/MakerGYT/mini-add-tips.git\n```\n将项目中components/add-tips文件夹拷贝到组件路径下\n\n### 2. 引入组件\n在使用该组件的页面对应json文件中添加：\n```json\n{\n  \"usingComponents\": {\n    \"add-tips\":\"/components/add-tips/index\" \n  }\n}\n```\n\n### 3. 使用组件\n```html\n\u003c!-- index.wxml --\u003e\n\u003cadd-tips name=\"示例\"/\u003e\n```\n自定义导航栏请参考[/pages/index](https://github.com/makergyt/mini-add-tips/tree/master/pages/index)\n## 属性列表\n| 属性 |类型| 默认值|必填|说明|\n| -- | --|--|--|--|\n| name | String | 测试 | 否 |小程序名称|\n| logo | String | \u003cimg src=\"https://imgkr.cn-bj.ufileos.com/c958e4cd-6bab-43ed-93aa-697207cf33a5.png\" width=50/\u003e | 否 |小程序Logo|\n| duration | Number | 10 | 否 |持续显示时间(s)|\n| delay | Number | 2 | 否 |进入页面延迟时间(s)开始显示|\n| custom | Boolean | false | 否 |当前页面是否{\"navigationStyle\": \"custom\"}|\n\n## 开发说明\n鉴于目前微信基础库的设计:\n1. 收藏操作与添加到我的小程序对于用户容易混淆，但效应一样，故没必要具体引导用户。目前只有监听用户点击右上角菜单“收藏”按钮的行为,但实际上**兼听不到收藏行为，只能定义收藏内容**\n2. 无法获知是否已经收藏、是否已经添加到我的小程序,故提示可能对用户造成干扰。\n3. 目前没有可以调起添加小程序的api、button,或许出于\"降低干扰度\"的考虑，但就迫使手动设置引导,又会造成如2中所述干扰。\n4. 即便已经设置{\"navigationStyle\": \"custom\"},其[导航栏相关的api](https://developers.weixin.qq.com/miniprogram/dev/api/#%E5%AF%BC%E8%88%AA%E6%A0%8F)依然调用是有效的，无论组件还是页面内均无法据此获知导航栏是否custom,只能由外部传入。\n\n### Todo\n- [ ] 根据用户使用小程序频次、收藏等行为，智能控制显示区间及显示时机。\n\n## License\n[MIT](https://github.com/MakerGYT/mini-add-tips/blob/master/LICENSE) © MakerGYT","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakergyt%2Fmini-add-tips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakergyt%2Fmini-add-tips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakergyt%2Fmini-add-tips/lists"}