新换域名后,小程序在开发工具中运行正常,但手机端不正常
新换的域名,也设置了合法域名,现在是开发工具中都正常,但是预览和体验版都不能正常运行,获取不到数据,这是怎么回事呢?有没有遇到同样问题的,求指教。
现在就是完全不知道是什么原因造成的,开发工具也没有错误提示,没法调试啊……
新换的域名,也设置了合法域名,现在是开发工具中都正常,但是预览和体验版都不能正常运行,获取不到数据,这是怎么回事呢?有没有遇到同样问题的,求指教。
现在就是完全不知道是什么原因造成的,开发工具也没有错误提示,没法调试啊……
机型分别是OPPOR7、OPPOR9。微信版本都是:6.5.22。
代码如下:
getMyInfo: function () { var page = this; var appid = 'wx77891cd8843069e8'; var secret = '16e7143a2681b2cc905719c10438d656'; var baseUrl = "https://76act.com/"; wx.login({ success: function (re) { console.log('wx.login:%o', re); if (re.code) { wx.getUserInfo({ success: function (res) { console.log('userinfo:%o',res); wx.setStorageSync('userInfo', res.userInfo); var address = wx.getStorageSync('address'); var data = { 'username': re.code, 'password': '123123123', 'loginType': 'xcx', 'userSaveBean': { 'username': re.code, 'password': '123123123', 'nickname': res.userInfo.nickName, 'birth': new Date().getTime, 'address': res.userInfo.city, 'mobile': 13111111111, 'headimg': res.userInfo.avatarUrl } } wx.request({ url: baseUrl + "user/wxlogin", data: data, method: 'POST', header: { 'content-type': 'application/json' }, success: function (res) { console.log('success url:%s,res:%o', baseUrl + "user/wxlogin", res); }, fail: function (res) { console.log('fail url:%s,res:%o', baseUrl + "user/wxlogin", res); } }); } }); } else { console.log('获取用户登录态失败!' + res.errMsg) } } }) }, |
在电脑端开发工具可以正常调用后台接口,在手机端无法正常调用,并且返回错误。
手机环境错误截图如下:
另外在电脑端的开发工具中已经关闭了禁用SSL检查选项,运行正常,截图如下: