From 67124e17ba3eb64e84caa9a9f70a63de67b8eae7 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sun, 20 Sep 2026 11:07:21 +0800 Subject: [PATCH] 1 --- utils/sharePath.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/utils/sharePath.js b/utils/sharePath.js index 6db04ae..5461285 100644 --- a/utils/sharePath.js +++ b/utils/sharePath.js @@ -33,6 +33,27 @@ export function buildGroupTargetPath(params) { return targetPath } +export function buildGroupShopTargetPath(shopId) { + if (!shopId) return '' + return '/package2/group/groupBuySingle?type=shop&shopId=' + encodeURIComponent(shopId) +} + +export function resolveMiniCodeSceneTarget(scene) { + let value = String(scene || '').trim() + if (!value) return '' + try { + value = decodeURIComponent(value) + } catch (e) {} + if (!value) return '' + if (value.indexOf('groupShop:') === 0) { + return buildGroupShopTargetPath(value.replace('groupShop:', '')) + } + if (/^s[A-Za-z0-9_-]{1,31}$/.test(value)) { + return buildGroupShopTargetPath(value.slice(1)) + } + return '' +} + export function normalizeShareTargetPath(value) { let targetPath = String(value || '') if (targetPath.indexOf('%2F') === 0 || targetPath.indexOf('%2f') === 0) {