Update claim.vue
This commit is contained in:
parent
2ac04ba97e
commit
68436fc7f4
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user