request请求404进入了success而不是进入fail
wx.request({
url: ‘https://***/LoginAPI/Index/’ + res.code,
data: {},
header: {
‘content-type’: ‘application/json’
}, fail: function () {
wx.showToast({
title: ‘服务器异常,请稍后重试’,
icon: ‘success’,
duration: 2000
})
},
success: function (res) {
//进入了这里
}
})