Commit 6bf1e0b0 by zhangxw

弹窗重复弹出修改

1 parent 1c3464bd
......@@ -205,6 +205,8 @@ Page({
let { code, data } = res
if (code == 0) {
if (!data) {
if (wx.__HAS_NOREPORT_MODAL || wx.__HAS_NOTLOGIN_MODAL) return false
wx.__HAS_NOREPORT_MODAL = true
wx.showModal({
title: '交车目标',
content: '您有未填写的交车目标,请点击前往',
......@@ -219,6 +221,11 @@ Page({
}
},
complete: () => {
// 这个延迟的目的是为了避免短时间内重复弹出
// 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行
setTimeout(() => {
wx.__HAS_NOREPORT_MODAL = false
}, 2000)
}
})
}
......@@ -354,6 +361,7 @@ Page({
changeTabBar(e) {
// let { pageShow } = this.data,
wx.__HAS_NOREPORT_MODAL = false
let tabIndex = e.detail
// console.log(pageShow[tabIndex])
this.setData({
......
......@@ -368,6 +368,7 @@ Page({
})
},
onRoute(options) {
wx.__HAS_NOREPORT_MODAL = false
let {targetInfo} = this.data
if (options?.scene) {
let id = decodeURIComponent(options.scene).split('=')[1]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!