加个开屏广告判断是不是本小程序的appid
This commit is contained in:
parent
6a13c23b19
commit
569e5505ce
@ -75,12 +75,15 @@ Component({
|
|||||||
let url = this.data.openDate['url']
|
let url = this.data.openDate['url']
|
||||||
let appid = this.data.openDate['appid'] || ''
|
let appid = this.data.openDate['appid'] || ''
|
||||||
if (appid) {
|
if (appid) {
|
||||||
|
const accountInfo = wx.getAccountInfoSync();
|
||||||
|
if (accountInfo.miniProgram.appId != appid) {
|
||||||
wx.navigateToMiniProgram({
|
wx.navigateToMiniProgram({
|
||||||
appId: appid,
|
appId: appid,
|
||||||
path: url,
|
path: url,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (url.indexOf('http') == 0) url = `/pages/webview/webview?url=${url}`
|
if (url.indexOf('http') == 0) url = `/pages/webview/webview?url=${url}`
|
||||||
else url = url
|
else url = url
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user