Update claim.vue

This commit is contained in:
huxuejian 2026-08-12 10:11:51 +08:00
parent 2ac04ba97e
commit 68436fc7f4

View File

@ -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;