加个开屏广告判断是不是本小程序的appid

This commit is contained in:
DESKTOP-RQ919RC\Pc 2025-03-11 19:00:51 +08:00
parent 6a13c23b19
commit 569e5505ce

View File

@ -75,12 +75,15 @@ Component({
let url = this.data.openDate['url']
let appid = this.data.openDate['appid'] || ''
if (appid) {
const accountInfo = wx.getAccountInfoSync();
if (accountInfo.miniProgram.appId != appid) {
wx.navigateToMiniProgram({
appId: appid,
path: url,
})
return
}
}
if (url.indexOf('http') == 0) url = `/pages/webview/webview?url=${url}`
else url = url
wx.navigateTo({