This commit is contained in:
xiaozhiyong
2025-05-26 14:35:03 +08:00
parent 76299211a9
commit 9f0072b506
16 changed files with 209 additions and 161 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view class="page-content">
<image src="../../../static/img/start.jpg" width="" mode="widthFix"></image>
<image src="../../../static/img/start-second.jpg" width="" mode="widthFix"></image>
</view>
</template>
@@ -59,50 +59,61 @@
this.getFilterData()
}
}
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2500)
// 在页面中定义插屏广告
let interstitialAd = null
// let interstitialAd = null
// 在页面onLoad回调事件中创建插屏广告实例
if (wx.createInterstitialAd) {
interstitialAd = wx.createInterstitialAd({
adUnitId: 'adunit-a7faf57adeed211f'
})
}
interstitialAd.onLoad((err) => {
// console.log('onLoad event emit', err)
})
interstitialAd.onError((err) => {
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2000)
})
// if (wx.createInterstitialAd) {
// interstitialAd = wx.createInterstitialAd({
// adUnitId: 'adunit-a7faf57adeed211f'
// })
// }
// interstitialAd.onLoad((err) => {
// // console.log('onLoad event emit', err)
// })
// interstitialAd.onError((err) => {
// setTimeout(() => {
// if (key == '在线') {
// uni.switchTab({
// url: '/pages/tabbar/home/home',
// })
// } else {
// uni.redirectTo({
// url: '/BagAuth/pages/login/login'
// })
// }
// }, 2000)
// })
// 在适合的场景显示插屏广告
if (interstitialAd) {
interstitialAd.show().catch((err) => {
// console.error(err)
})
}
interstitialAd.onClose(res => {
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 1000)
})
// if (interstitialAd) {
// interstitialAd.show().catch((err) => {
// // console.error(err)
// })
// }
// interstitialAd.onClose(res => {
// setTimeout(() => {
// if (key == '在线') {
// uni.switchTab({
// url: '/pages/tabbar/home/home',
// })
// } else {
// uni.redirectTo({
// url: '/BagAuth/pages/login/login'
// })
// }
// }, 1000)
// })
},
onReady(option) {
const updateManager = uni.getUpdateManager();