{"id":13654420,"url":"https://github.com/gxmzjxk/wxreading","last_synced_at":"2025-04-23T09:33:28.970Z","repository":{"id":215851233,"uuid":"73702916","full_name":"gxmzjxk/wxreading","owner":"gxmzjxk","description":"微信小程序跟读","archived":false,"fork":false,"pushed_at":"2019-07-09T08:49:59.000Z","size":513,"stargazers_count":100,"open_issues_count":4,"forks_count":49,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-10T06:32:23.450Z","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/gxmzjxk.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":"2016-11-14T12:34:09.000Z","updated_at":"2024-10-27T16:16:25.000Z","dependencies_parsed_at":"2024-01-18T03:48:05.942Z","dependency_job_id":null,"html_url":"https://github.com/gxmzjxk/wxreading","commit_stats":null,"previous_names":["gxmzjxk/wxreading"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gxmzjxk%2Fwxreading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gxmzjxk%2Fwxreading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gxmzjxk%2Fwxreading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gxmzjxk%2Fwxreading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gxmzjxk","download_url":"https://codeload.github.com/gxmzjxk/wxreading/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250407706,"owners_count":21425549,"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":[],"created_at":"2024-08-02T03:00:32.200Z","updated_at":"2025-04-23T09:33:28.518Z","avatar_url":"https://github.com/gxmzjxk.png","language":"JavaScript","funding_links":[],"categories":["Demo","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# wxreading\n[小程序跟读]\n\u003e 本项目为兴趣项目，已从原公司离职，预计不再维护。\n## 项目介绍\n本项目是基于\u003c微信小程序\u003e做的一套语音跟读，分为【用户/登陆系统、查看教材、查看课程安排、参与跟读(录音/上传/合成)、结果展示】等功能\n## 开发/调试环境\n- 微信版本：6.3.30\n- IOS版本：IOS_10.0.2\n- 微信开发调试工具：v0.10.102800\n- 操作系统：Win7\n- 开发/调试：`iPhone6S`真机/微信工具预览，`PHPstorm`编码\n\n## 使用说明\n1. 由于微信安全域名的限制，如果你填了自己的`APPID`，所有请求都会失败\n2. 无`APPID`的情况下，使用微信登录会存在问题，请使用手机号登录\n3. 目前是测试版本，故未接入短信平台，所以手机是收不到验证码的，直接点获取验证码就已经填上了\n\n## 使用过程遇到的坑丶记录\n1. 背景图不生效，改用`image`或者`Base64`\n2. 执行`POST`请求异常，将`data`中的JSON对象格式化为from序列\n3. 页面切换的参数接收异常，在onload方法中，默认的参数即使上一页面传过来的Object参数\n4. 在使用`data-readingItem`的时候，微信解析为`dataset`的时候会转成小写\n5. 多页面的时候，在`app.json`中重复配置，会编译失败\n6. 直接使用 `this.data.XXX = XXX` 赋值的时候，数据是不会同步更新到VM即WXML中的，必须使用其setData方法\n7. 循环加载JSON数据集合时，如果其中有项是`null`，在开发工具中加载正常，但是在手机中浏览时显示空白页，并且调试时没有错误信息，所以需要对可能为`null`的数据进行判断\n\u003e PS:由于数据有预处理，所以没有遇到这个问题\n8. 针对`swiper`控件，设置`min-height`不生效，必须设置`height`，同时`swiper-item`的间隙也有坑，项目中有实践\n9. 使用`uploadFile-formData`传递参数的时候，`formData`是个三项的JSON,PHP通过`$_REQUEST`竟然只能接到最后一个参数\n\u003e PS:怀疑是微信的坑，后来使用的是将其以GET方式提交，才正常接到\n10. 在使用for循环的时候，用的是立即执行的闭包函数，但是PHP端接到的三个请求的time竟然是一样的，这直接导致了文件获取的异常，\n目前未找到真实原因，是本人对for循环理解太浅？后通过额外加参数解决\n11. 微信录制的音频格式为`.silk`格式，具体可以`Google`，强大的`ffmpeg`都没法直接解码，最后使用了`GitHub`上的一个开源`Decoder`库，\n解码成功转成了MP3，感谢作者，地址：https://github.com/kn007/silk-v3-decoder\n12. 使用循环的时候注意for-items里面要有大括号，而for-item里面没有大括号，同时谨慎使用IDE的代码format功能\n\n## 未解之谜|改进方向\n1. `for循环`中的立即执行函数时间是完全一致的？\n2. 在页面切换的时候，切换到特定页面，需要先校验其是否登陆，然后跳转登陆页，结果真机上实践，几乎都是失败的\n3. 后期考虑使用登陆蒙层来解决，但是每个页面怎么自动引入登陆的template？\n4. 代码执行完之后，在回调中直接`navigateTo`或者`redirectTo`失败率很高，暂时用`setTimeOut`缓解。\n5. 下拉刷新的样式后期考虑自己定制，封装成方法\n6. 进一步扩充工具类，封装实用方法\n\n## Connect Me\n- email:  jxk854613@163.com\n- blog:   [jiangxiaokun.com/blog](https://jiangxiaokun.com/blog/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgxmzjxk%2Fwxreading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgxmzjxk%2Fwxreading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgxmzjxk%2Fwxreading/lists"}