wx.showModal({
title: '温馨提示',
content: '请先登录',
showCancel: true,
confirmText: '登录',
success: function (res) {
if (res.confirm) {
that.pm.navigateTo({
url: '/pages/login/login',
fail: function (res) {
console.log(res)
}
})
} else if (res.cancel) {
that.pm.navigateBack()
}
}
})
您好,需要用户点击过页面才可以调用。
fail打印:
errMsg: "navigateTo: fail can only be invoked after user TAP gesture"
我点击了confirmText的文字登录,打印消息
fail打印:
errMsg: "navigateTo: fail can only be invoked after user TAP gesture" 问题是我点击了confirmText的文字登录,还打印这个