|
|
@@ -127,12 +127,46 @@ export default {
|
|
|
if (!Object.keys(params).length) return;
|
|
|
|
|
|
this.cacheEntryParams(params);
|
|
|
+ if (params.bianhao) {
|
|
|
+ this.routeToPacketIndex(params.bianhao);
|
|
|
+ }
|
|
|
if (this.globalData.isColdLaunch) return;
|
|
|
|
|
|
if (params.upsellCode || params.reduceCode) {
|
|
|
eventBus.emit('appShowActivity', { params });
|
|
|
}
|
|
|
},
|
|
|
+ routeToPacketIndex(bianhao) {
|
|
|
+ const targetUrl = '/packet/pages/index?bianhao=' + bianhao;
|
|
|
+ setTimeout(() => {
|
|
|
+ const pages = getCurrentPages();
|
|
|
+ const currentPage = pages[pages.length - 1];
|
|
|
+ const currentRoute = currentPage?.route || '';
|
|
|
+ const currentBianhao = currentPage?.options?.bianhao || '';
|
|
|
+
|
|
|
+ if (currentRoute === 'packet/pages/index' && currentBianhao === String(bianhao)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!pages.length || this.globalData.isColdLaunch) {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: targetUrl
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (currentRoute === 'packet/pages/index') {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: targetUrl
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ uni.navigateTo({
|
|
|
+ url: targetUrl
|
|
|
+ });
|
|
|
+ }, 0);
|
|
|
+ },
|
|
|
slientLogin(params = {}) {
|
|
|
let that = this;
|
|
|
uni.login({
|