如下代码片段,安卓机型会先弹出showmodal组件,按确定后跳转。ios 直接showmodal一闪而过跳转到首页
onShow: function () {
let token=wx.getStorageSync('token')
if(token==undefined||token==""||token==null){
wx.showModal({
title: '提示',
content: '未登录,是否前往登录?',
showCancel:false,
success (res) {
if (res.confirm) {
console.log('用户点击确定')
wx.navigateTo({
url: '/pages/login/index',
})
}
}
})
return;
}
console.log(this.data.merchantid)
this.get_detail()
},
你好,麻烦具体描述问题流程,提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html