uniapp之uni.showModal 弹出多次导致重叠问题
场景:
端口权限过期后提示权限过期。但是同时调用多个接口导致多次报错弹窗。
代码:
if (code && code == 401) { let exists = uni.getStorageSync('token_expired') || false if (!exists) { uni.setStorageSync('token_expired', true) uni.showModal({ content: msg, showCancel: false, confirmText: "确认", success: (res) => { if (res.confirm) { store.dispatch('auth/logout') uni.reLaunch({ url: '/pages/login/index' }) } } }) } }
转载自:https://ask.dcloud.net.cn/question/160759
翻译
搜索
复制
<iframe height="240" width="320"></iframe> 标签:uniapp,code,false,重叠,showModal,uni From: https://www.cnblogs.com/s313139232/p/17930416.html