以下代码正常执行时没有反应,但是打开手机端调试(vconsole),就可以正常执行完毕,请问可能是什么原因,多谢?
wx.request({
url: ‘https://dragoncn.site/machine_room.php’,
header: {
“Content-Type”: “application/x-www-form-urlencoded;charset=utf-8”
},
method: “POST”,
data: { door: e.detail.value.door, op_name: e.detail.value.op_name, picker1: e.detail.value.picker1, bz: e.detail.value.bz },
success: function (res) {
if (res.data.status == 0) {
wx.showToast({
//title: res.data.info,
title: ‘登记中。。’,
icon: ‘loading’,
duration: 1000
})
} else {
wx.showToast({
title:‘已成功登记’,
icon: ‘success’,
duration: 2000
})
setTimeout(function () {
wx.switchTab({
url: ‘…/index/index’
})
},2000)
}
}
})