feat: security hardening, wechat pay v3 platform cert integration, companion certification revocation, and audit closed-loop
这个提交包含在:
@@ -276,6 +276,7 @@ import { getCompanions, getBanners, getNavCategories, bindInviteCode } from '@/c
|
||||
import { ICONS } from '@/common/icons.js';
|
||||
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
|
||||
import { getNavBarInfo } from '@/common/nav.js';
|
||||
import { getCurrentRole, ROLE_TYPES, isExpertCertified, safeRedirectToExpertHall } from '@/common/role.js';
|
||||
|
||||
const isLoading = ref(true);
|
||||
const banners = ref([]);
|
||||
@@ -403,6 +404,17 @@ const onThemeChanged = (key) => {
|
||||
applyThemeToNativeUI(key);
|
||||
};
|
||||
|
||||
let hasHandledRedirect = false;
|
||||
const checkExpertRedirect = () => {
|
||||
if (hasHandledRedirect) return true;
|
||||
if (getCurrentRole() === ROLE_TYPES.EXPERT && isExpertCertified()) {
|
||||
hasHandledRedirect = true;
|
||||
safeRedirectToExpertHall('/pages/expert/hall');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
onLoad((options) => {
|
||||
const rawInvite = options && (options.inviter_id || options.inviterId || options.code || options.scene);
|
||||
if (rawInvite) {
|
||||
@@ -415,9 +427,11 @@ onLoad((options) => {
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
if (checkExpertRedirect()) return;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (checkExpertRedirect()) return;
|
||||
navInfo.value = getNavBarInfo();
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
applyThemeToNativeUI(currentThemeKey.value);
|
||||
@@ -426,6 +440,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (checkExpertRedirect()) return;
|
||||
navInfo.value = getNavBarInfo();
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
applyThemeToNativeUI(currentThemeKey.value);
|
||||
|
||||
在新工单中引用
屏蔽一个用户