|
|
|
@ -572,7 +572,7 @@ |
|
|
|
import myCenter from "@/components/tab-bar/myCenter.vue"; |
|
|
|
import homeGroupPending from "@/components/tab-bar/homeGroupPending.vue"; |
|
|
|
import { getIeRealNameAuditSetting } from '@/common/ieApi.js' |
|
|
|
import { resolveHomeShareTarget, normalizeShareTargetPath, resolveMiniCodeSceneTarget } from '@/utils/sharePath.js' |
|
|
|
import { resolveHomeShareTarget, normalizeShareTargetPath, resolveMiniCodeSceneTarget, isShareTargetHandled, completeShareEnter, reopenShareEnter, consumeShareRedirectSuppression } from '@/utils/sharePath.js' |
|
|
|
|
|
|
|
const HOME_AD_IMAGE_CACHE_KEY = 'home_ad_image_cache_v1' |
|
|
|
const HOME_POPUP_AD_SHOWN_KEY_PREFIX = 'home_popup_ad_shown_v1' |
|
|
|
@ -977,6 +977,7 @@ |
|
|
|
} |
|
|
|
const shareTargetPath = resolveMiniCodeSceneTarget(option && option.scene) || resolveHomeShareTarget(option) |
|
|
|
if (shareTargetPath) { |
|
|
|
reopenShareEnter(shareTargetPath) |
|
|
|
this.pendingShareTargetPath = shareTargetPath |
|
|
|
uni.setStorageSync('pendingShareTargetPath', shareTargetPath) |
|
|
|
} |
|
|
|
@ -985,7 +986,9 @@ |
|
|
|
this.enableShareMenu() |
|
|
|
this.startDeliveryTimeTimer() |
|
|
|
this.runHomeInit() |
|
|
|
if (this.openShareTargetIfNeeded()) return |
|
|
|
if (consumeShareRedirectSuppression()) { |
|
|
|
this.discardHandledShareRedirect() |
|
|
|
} else if (this.openShareTargetIfNeeded()) return |
|
|
|
if (this.pendingTabIndex !== null) { |
|
|
|
const tabIndex = this.pendingTabIndex |
|
|
|
const shouldShowDeliveryRuleConfirm = this.pendingDeliveryRuleConfirm && tabIndex == 1 |
|
|
|
@ -1141,6 +1144,13 @@ |
|
|
|
} |
|
|
|
return this.normalizeShareTargetPath(targetPath) |
|
|
|
}, |
|
|
|
discardHandledShareRedirect() { |
|
|
|
const targetPath = this.pendingShareTargetPath || this.resolveShareTargetPath(uni.getStorageSync('pendingShareTargetPath') || '') |
|
|
|
if (!targetPath || !isShareTargetHandled(targetPath)) return |
|
|
|
this.pendingShareTargetPath = '' |
|
|
|
this.openingShareTargetPath = '' |
|
|
|
uni.removeStorageSync('pendingShareTargetPath') |
|
|
|
}, |
|
|
|
openShareTargetIfNeeded() { |
|
|
|
if (!this.pendingShareTargetPath) { |
|
|
|
this.pendingShareTargetPath = this.resolveShareTargetPath(uni.getStorageSync('pendingShareTargetPath') || '') |
|
|
|
@ -1149,11 +1159,16 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
if (!this.pendingShareTargetPath) return false |
|
|
|
if (isShareTargetHandled(this.pendingShareTargetPath)) { |
|
|
|
this.discardHandledShareRedirect() |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!uni.getStorageSync('area')) return true |
|
|
|
const targetPath = this.pendingShareTargetPath |
|
|
|
if (this.openingShareTargetPath === targetPath) return true |
|
|
|
this.openingShareTargetPath = targetPath |
|
|
|
this.pendingShareTargetPath = '' |
|
|
|
completeShareEnter(targetPath) |
|
|
|
uni.removeStorageSync('pendingShareTargetPath') |
|
|
|
uni.removeStorageSync('authPendingTargetPath') |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -1168,12 +1183,15 @@ |
|
|
|
uni.navigateTo({ |
|
|
|
url: targetPath, |
|
|
|
fail: () => { |
|
|
|
reopenShareEnter(targetPath) |
|
|
|
this.pendingShareTargetPath = targetPath |
|
|
|
uni.setStorageSync('pendingShareTargetPath', targetPath) |
|
|
|
this.openingShareTargetPath = '' |
|
|
|
this.openingShareTargetPath = targetPath |
|
|
|
uni.redirectTo({ |
|
|
|
url: targetPath, |
|
|
|
success: () => { |
|
|
|
completeShareEnter(targetPath) |
|
|
|
this.pendingShareTargetPath = '' |
|
|
|
uni.removeStorageSync('pendingShareTargetPath') |
|
|
|
this.openingShareTargetPath = '' |
|
|
|
}, |
|
|
|
|