feat: security hardening, wechat pay v3 platform cert integration, companion certification revocation, and audit closed-loop

这个提交包含在:
xcbyy
2026-10-16 17:38:17 +08:00
父节点 3bf38db8b6
当前提交 78117bb4e1
共有 58 个文件被更改,包括 12971 次插入 和 952 次删除

查看文件

@@ -1,9 +1,9 @@
<script>
import { getCurrentThemeKey, applyThemeToNativeUI } from './common/theme.js';
import { installRoleGuard } from './common/role.js';
import { installRoleGuard, getCurrentRole, ROLE_TYPES, isExpertCertified, safeRedirectToExpertHall } from './common/role.js';
export default {
onLaunch: function () {
onLaunch: function (options) {
// #ifdef H5
if (typeof window !== 'undefined' && window.addEventListener) {
window.addEventListener('unhandledrejection', (event) => {
@@ -50,6 +50,16 @@ export default {
// 注册全流程角色权限守卫拦截器 (Role Guard)
installRoleGuard();
// 如果以大神身份冷启动或刷新进入首页根路径,自动平滑路由至大神接单大厅
try {
const launchPath = options && options.path;
if (!launchPath || launchPath === 'pages/index/index' || launchPath === '/pages/index/index') {
if (getCurrentRole() === ROLE_TYPES.EXPERT && isExpertCertified()) {
safeRedirectToExpertHall('/pages/expert/hall');
}
}
} catch (_) {}
// 注册全局路由切换拦截器,在跳转目标页面前预先同步 Native 导航栏与窗口背景,消除切页黑屏闪烁
const routeMethods = ['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'];
routeMethods.forEach((method) => {