From 68436fc7f4532c6eef9675bb583e18969533d971 Mon Sep 17 00:00:00 2001 From: huxuejian Date: Wed, 12 Aug 2026 10:11:51 +0800 Subject: [PATCH] Update claim.vue --- pages/experience-coupon/claim.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pages/experience-coupon/claim.vue b/pages/experience-coupon/claim.vue index 5e22f25..ffc21bc 100644 --- a/pages/experience-coupon/claim.vue +++ b/pages/experience-coupon/claim.vue @@ -215,7 +215,25 @@ async function bootstrap() { } } -onLoad((options = {}) => { +function parseOptions(options = {}) { + const href = typeof options.q === "string" ? decodeURIComponent(options.q) : ""; + const [, url = ""] = href.split("?"); + return url.split("&").reduce((acc, cur) => { + if (!cur) return acc; + const [key, val = ''] = cur.split("="); + if (!key) return acc; + acc[key] = val + return acc; + }, {}); +} + +onLoad((opts = {}) => { + let options = {}; + if (opts.q) { + options = { ...parseOptions(opts) } + } else { + options = { ...opts } + } corpId.value = normalizeCorpId(options.corpId || ""); issueId.value = options.issueId || options.id || ""; memberId.value = options.memberId || options.customerId || ""; @@ -249,6 +267,7 @@ onShow(() => { font-size: 28rpx; color: #999; } + .poster-mask { position: fixed; inset: 0;