Update home.vue

This commit is contained in:
huxuejian 2026-09-11 14:45:53 +08:00
parent 09e59a751a
commit d503710595

View File

@ -116,6 +116,14 @@ async function changeTeam({ teamId, corpId, corpName }) {
} }
} }
function safeDecode(value) {
try {
return decodeURIComponent(value || "");
} catch (error) {
return value || "";
}
}
function parsePendingAction(options = {}) { function parsePendingAction(options = {}) {
const type = options.type || ""; const type = options.type || "";
if (type === "experienceCoupon" && options.issueId && options.corpId) { if (type === "experienceCoupon" && options.issueId && options.corpId) {
@ -136,8 +144,8 @@ function parsePendingAction(options = {}) {
corpId: normalizeCorpId(options.corpId), corpId: normalizeCorpId(options.corpId),
teamId: options.teamId || "", teamId: options.teamId || "",
customerId: options.customerId, customerId: options.customerId,
name: options.name || "", name: safeDecode(options.name),
corpName: options.corpName || "", corpName: safeDecode(options.corpName),
appointmentId: options.appointmentId || "", appointmentId: options.appointmentId || "",
month: options.month || "", month: options.month || "",
externalUserId: options.externalUserId || "", externalUserId: options.externalUserId || "",