问题模块 框架类型 问题类型 操作系统 工具版本
开发者工具 微信小程序 Bug Windows 1.02.18091111
- 当前 Bug 的表现(可附上截图)
代码如下

在模拟器中预览时,可以执行到then中的debug2,

但是在真机预览上,只能加载到debug1这一步,then没有执行,里面的数据也没有加载显示

区别主要在于,模拟器预览和真机预览之间的问题,真机调试反而是可以加载显示的;
执行的promis方法我是这样调用的

微信小程序开发问题解答
微信小程序开发者回答:
已解决,解决方案如下:
1、promise仅控制该promise后的then、catch、finally流程顺序,无法控制return promise().then()后的then()的流程顺序;
2、在开发工具开启不校验合法域名的时候,使用二维码预览或自动预览时,手机上是无法获取数据的,只有在预览时打开调试才能看到数据,或者真机调试下可看到数据,因此预览模式下需要打开调试,调试模式下可直接获取数据。
本文网址:http://www.91bianli.com/weixinxiaochengxu/46330.html