这个微信小程序太奇怪了,做了一点小改动要上线,在本地连接真机调试好好的,上到体验环境手机打开就不行了。
而且奇怪,体验版打开调试后又正常了,加载页面的时候报了一个错
"(in promise) MiniProgramError\nInvalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\nTypeError: Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\nat (app-service.js:26137:2505)\nat (app-service.js:26137:4670)\nat tryCatch (app-service.js:10539:44)\nat invoke (app-service.js:10765:30)\nat l (app-service.js:26137:2791)\nat i (app-service.js:26137:2995)\nat (WASubContext.js:1:48256)\nat n (WASubContext.js:1:24591)\nat (WASubContext.js:1:35042)\nat E (WASubContext.js:1:34774)\nat (WASubContext.js:1:34812)\nat f (WASubContext.js:1:122528)\nat (WASubContext.js:1:90030)\nat (WASubContext.js:1:117997)\nat p (WAServiceMainContext.js:1:120560)\nat (WAServiceMainContext.js:1:108820)\n_onNativeTimer@\nglobal code@"
然后我又顺着这个方向找,这还真不好找,毕竟还是Uniapp打包过的,更是一头雾水!
最后到处找头绪,包括在服务端打了很多日志,发现在页面上不开调试,没有反应的时候,实际上是没有请求到后端的!
这就提醒了我!因为我这次改动为了对之前的部署不做影响,配置了一个新的域名!微信小程序是需要在小程序后台配置域名白名单的!
剩下的就很好办了,打开小程序后台,配置一下新的域名即可。
文章来源:https://www.toymoban.com/news/detail-506778.html
OK,稳了。文章来源地址https://www.toymoban.com/news/detail-506778.html
到了这里,关于微信小程序-开了调试Vconsole能正常运行,不开调试不能正常运行的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!