This commit is contained in:
lixuan
2022-11-02 15:06:33 +08:00
parent 91cf8b0fd7
commit f8543b24e7
2 changed files with 39 additions and 15 deletions

View File

@@ -59,21 +59,41 @@
this.getFilterData()
}
}
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
fail: (err) => {
console.log(err)
}
// url:'/BagStation/orderDetail/orderDetail'
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2000)
// 在页面中定义插屏广告
let interstitialAd = null
// 在页面onLoad回调事件中创建插屏广告实例
if (wx.createInterstitialAd) {
interstitialAd = wx.createInterstitialAd({
adUnitId: 'adunit-a7faf57adeed211f'
})
}
interstitialAd.onError((err) => {
console.log('onError event emit', err)
})
// 在适合的场景显示插屏广告
if (interstitialAd) {
interstitialAd.show().catch((err) => {
console.error(err)
})
}
interstitialAd.onClose(res => {
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
fail: (err) => {
console.log(err)
}
// url:'/BagStation/orderDetail/orderDetail'
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2000)
})
},
onReady(option) {
const updateManager = uni.getUpdateManager();