代码如下:
wx.request({
url: configUrl.loginCheck + “?mobile=” + cache.GetMobile(),
header: { ‘content-type’: ‘application/x-www-form-urlencoded’ },
method: ‘post’,
success: function (res) {
console.log(‘loginCheck-success’)
if (res.data.toString() == “false”) {
cache.SetMobile(’’)
wx.navigateTo({
url: ‘page/Register/register’
})
}
},
fail: function (res) {
console.log(‘loginCheck-fail’)
cache.SetMobile(’’)
wx.navigateTo({
url: ‘page/Register/register’
})
}
})
同样的地址,success中可以跳转,但是fail中无法跳转,说app.json中没有配置该URL