Commit 1883bfbf authored by Xuguangxing's avatar Xuguangxing

feat: 优化跳转链接判断代码

parent 3307c669
...@@ -377,7 +377,13 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle ...@@ -377,7 +377,13 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
} }
return; return;
} else { } else {
if (isApp) { let url = pageUrl;
if (!isApp && !isWxMp) {
if (vccChannel) { url = this.addOrEditUrlParams(url, 'vccChannel', vccChannel); }
if (fromHost) { url = this.addOrEditUrlParams(url, 'fromHost', fromHost); }
}
window.location.href = pageUrl;
// if (isApp) {
// nativeBridge = new Bridge(); // nativeBridge = new Bridge();
// nativeBridge.openNewUrl({ // nativeBridge.openNewUrl({
// data: { // data: {
...@@ -385,9 +391,9 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle ...@@ -385,9 +391,9 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
// newUrl: `xyqb://openHttp?jumpUrl=${pageUrl}` // newUrl: `xyqb://openHttp?jumpUrl=${pageUrl}`
// }, // },
// }); // });
window.location.href = pageUrl; // window.location.href = pageUrl;
// nativeBridge = null; // nativeBridge = null;
} else if (isWxMp) { // } else if (isWxMp) {
// mpBridge = new MpBridge(); // mpBridge = new MpBridge();
// const jumpConfig = { // const jumpConfig = {
// // 需要打开的新链接 // // 需要打开的新链接
...@@ -395,13 +401,12 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle ...@@ -395,13 +401,12 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
// }; // };
// mpBridge.openNewUrl(jumpConfig); // mpBridge.openNewUrl(jumpConfig);
// mpBridge = null; // mpBridge = null;
window.location.href = pageUrl; // window.location.href = pageUrl;
} else { // } else {
let url = pageUrl; // if (vccChannel) { url = this.addOrEditUrlParams(url, 'vccChannel', vccChannel); }
if (vccChannel) { url = this.addOrEditUrlParams(url, 'vccChannel', vccChannel); } // if (fromHost) { url = this.addOrEditUrlParams(url, 'fromHost', fromHost); }
if (fromHost) { url = this.addOrEditUrlParams(url, 'fromHost', fromHost); } // window.location.href = url;
window.location.href = url; // }
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment