修改广告跳转页面异常的问题

This commit is contained in:
赵毅 2025-08-05 09:39:45 +08:00
parent d64fa80c13
commit f52d8cbcc6

View File

@ -427,26 +427,27 @@ export default {
headerServerClick(e) {
console.log("当前点击内容", e);
if (!e.link_url) {
if (!e.target_page) {
this.NotOpen();
return;
}
if (e.link_url) {
if (e.target_page) {
// #ifdef APP-PLUS
uni.navigateTo({
url: "/pages/webview/webview?url=" + encodeURIComponent(e.link_url),
url:
"/pages/webview/webview?url=" + encodeURIComponent(e.target_page),
});
// #endif
// #ifdef H5
window.open(e.link_url, "_blank");
window.open(e.target_page, "_blank");
// #endif
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU
if (e.appid) {
uni.navigateToMiniProgram({
appId: e.appid,
path: e.link_url,
path: e.target_page,
//
extraData: {
data1: "test",
@ -456,18 +457,23 @@ export default {
},
});
} else {
NavgateTo(e.link_url);
//
let targetPage = e.target_page;
if (!targetPage.startsWith("/")) {
targetPage = "/" + targetPage;
}
NavgateTo(targetPage);
// NavgateTo('/packages/localLife/index/index')
}
// 使web-view
// uni.showModal({
// title: '',
// content: ': ' + e.link_url,
// content: ': ' + e.target_page,
// confirmText: '',
// success(res) {
// if (res.confirm) {
// uni.setClipboardData({
// data: e.link_url,
// data: e.target_page,
// success() {
// uni.showToast({
// title: '',