{"id":13671402,"url":"https://github.com/lishuaixingNewBee/gordanTv","last_synced_at":"2025-04-27T18:31:17.904Z","repository":{"id":112256389,"uuid":"133324066","full_name":"lishuaixingNewBee/gordanTv","owner":"lishuaixingNewBee","description":"微信小程序-狗蛋TV是一个分享打动人心事物的微信小程序。gordanLee每天都会推荐一首歌、一篇文章、一段短视频，每天用十分钟的细碎时光，点燃内心的光明。","archived":false,"fork":false,"pushed_at":"2021-12-22T06:17:10.000Z","size":267,"stargazers_count":455,"open_issues_count":5,"forks_count":125,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-11T09:43:41.791Z","etag":null,"topics":["javascript","nodejs"],"latest_commit_sha":null,"homepage":"https://juejin.im/post/5af951bff265da0b9d7855ce","language":"JavaScript","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/lishuaixingNewBee.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":"2018-05-14T07:46:33.000Z","updated_at":"2024-07-26T07:06:03.000Z","dependencies_parsed_at":"2023-05-12T02:15:24.394Z","dependency_job_id":null,"html_url":"https://github.com/lishuaixingNewBee/gordanTv","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/lishuaixingNewBee%2FgordanTv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lishuaixingNewBee%2FgordanTv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lishuaixingNewBee%2FgordanTv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lishuaixingNewBee%2FgordanTv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lishuaixingNewBee","download_url":"https://codeload.github.com/lishuaixingNewBee/gordanTv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251187120,"owners_count":21549588,"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":["javascript","nodejs"],"created_at":"2024-08-02T09:01:08.710Z","updated_at":"2025-04-27T18:31:16.950Z","avatar_url":"https://github.com/lishuaixingNewBee.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# 狗蛋TV\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100\" src=\"https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2018/5/15/163622f528556b3d~tplv-t2oaga2asx-image.image\"\u003e\n\u003c/p\u003e\n\n狗蛋TV是基于微信小程序开发的一款App。gordanLee每天都会推荐一首歌、一篇文章、一段短视频，每天用十分钟的细碎时光，点燃内心的光明。目前分为音乐，短视频，影评三个模块。\n\n![banner.png](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2018/5/15/163621cf53070049~tplv-t2oaga2asx-image.image)\n\n- [线上开源地址](https://github.com/lishuaixingNewBee/gordanTv) https://github.com/lishuaixingNewBee/gordanTv 点个赞吧！\n- [小程序开发文档](https://developers.weixin.qq.com/miniprogram/dev/)\n\n![引导页](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2018/5/15/16363d00625d335a~tplv-t2oaga2asx-image.image)\n\n![音乐页](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2018/5/15/1635f631d527619f~tplv-t2oaga2asx-image.image)\n\n![短视频页](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2018/5/15/1635f631d52e422c~tplv-t2oaga2asx-image.image)\n\n![影评页](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2018/5/15/1635f631d5460ad5~tplv-t2oaga2asx-image.image)\n\n![搜索页](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2018/5/15/1635f631d55a00f9~tplv-t2oaga2asx-image.image)\n\n\n`以下所有 API 均由产品公司自身提供，本人皆从网络获取。获取与共享之行为或有侵犯产品权益的嫌疑。若被告知需停止共享与使用，本人会及时删除此页面与整个项目。请您暸解相关情况，并遵守产品协议。`\n\n为了方便大家学习和测试，我们提供了https的接口供大家使用，且用且珍惜。请在微信开发设置中加入request合法域名,或者在开发设置中勾选——不校验合法域名、web-view（业务域名）、TLS 版本以及 HTTPS 证书。\n\n### 感谢与支持\n```\n    -   狗蛋TVapi: https://api.gordantv.top\n    -   豆瓣api: https://api.douban.com\n    -   QQ音乐api: https://y.qq.com\n```\n\n###  项目介绍\n狗蛋TV是基于微信小程序+ES6进行开发，能同时运行在Android、iOS环境下。涵盖了音乐、短视频、影评三个版块。\n- 开屏引导图\n    1. 调用微信wx.onAccelerometerChange重力感应设备API,实现水波荡漾。\n    2. 调用wx.getUserInfo获取用户头像。\n- 工具类\n    1. 用Promise封装wx.request(),简化代码结构:\n    \n```\nconst $get = (url, data) =\u003e {\n  return new Promise((resolve, reject) =\u003e {\n    wx.request({\n      url,\n      data,\n      header: { 'Content-Type': 'json' },\n      success: resolve,\n      fail: reject\n    })\n  })\n}\n```\n\n  2.  电影评分实现\n\n```\nconst convertToStarsArray = (average) =\u003e {\n  const LENGTH = 5;\n  const CLS_ON = 'on'; // 全星\n  const CLS_HALF = 'half'; // 半星\n  const CLS_OFF = 'off'; // 无星\n  let result = [];\n  let score = Math.round(average) / 2;\n  let hasDecimal = score % 1 !== 0\n  let integer = Math.floor(score)\n  for (let i = 0; i \u003c integer; i++) {\n    result.push(CLS_ON)\n  }\n  if (hasDecimal) {\n    result.push(CLS_HALF)\n  }\n  while (result.length \u003c LENGTH) {\n    result.push(CLS_OFF)\n  }\n  return result;\n}\n```\n    \n- 小程序内部组件实现上拉刷新，下拉加载\n```\n    方法一：scroll-view 组件\n    方法二：onPullDownRefresh和onReachBottom方法实现小程序下拉加载和上拉刷新\n```\n\n- 阅读模块\n\n    1.  [微信小程序使用wxParse解析html](https://github.com/icindy/wxParse)\n    ```\n    项目中遇到在微信小程序里需要显示音乐文章的内容，文章内容是通过接口读取的服\n    务器中的富文本内容，是html格式的，小程序默认是不支持html格式的内容显示的，\n    那我们需要显示html内容的时候，就可以通过wxParse来实现。\n    ```\n### 项目安装\n```\n    git clone git@github.com:lishuaixingNewBee/gordanTv.git\n```\n\n### 目录结构\n------\n```shell\n|--- utils \u0026 Public Function              通用函数\n|--- components \u0026 components Public View  components和template模板\n|--- images \u0026 Img Resources               图片资源\n|--- pages \u0026 View Dir                     页面\n```\n### ○ 更新记录\n#### 2018.5.17\n```\n    -   解决微信小程序中Date.parse()获取时间戳IOS不兼容的问题(IOS为NaN的问题)\n```\n#### 2018.5.25\n```\n    -   微信废弃 获取 wx.getUserInfo 接口后续将不再出现授权弹窗，升级为 \u003cbutton class=\"getUserInfo_btn\" open-type=\"getUserInfo\" lang=\"zh_CN\" bindgetuserinfo=\"onGotUserInfo\"\u003e允许\u003c/button\u003e\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"200\" src=\"https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2019/8/27/16cd140d8008202a~tplv-t2oaga2asx-image.image\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FlishuaixingNewBee%2FgordanTv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FlishuaixingNewBee%2FgordanTv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FlishuaixingNewBee%2FgordanTv/lists"}