revert: sync production code to verified test version

This commit is contained in:
stefanfeng
2026-09-16 14:57:37 +08:00
parent e6a4988cf9
commit b3367eedaa
7 changed files with 34 additions and 213 deletions
+1 -6
View File
@@ -1,7 +1,6 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
import { getAuthToken } from '@/api'
import { isInUniWebView } from '@/utils/uniapp-bridge'
const routes: RouteRecordRaw[] = [
{
@@ -56,7 +55,7 @@ const routes: RouteRecordRaw[] = [
path: '/token/charge',
name: 'TokenCharge',
component: () => import('@/views/TokenCharge.vue'),
meta: { title: '积分充值', requiresAuth: true, requiresUniWebView: true }
meta: { title: '积分充值', requiresAuth: true }
},
{
path: '/avatar/card',
@@ -134,10 +133,6 @@ const router = createRouter({
router.beforeEach((to, from, next) => {
document.title = to.meta.title as string || '会会数字分身'
if (to.meta.requiresUniWebView && !isInUniWebView()) {
next({ path: '/avatar/manage' })
return
}
const hasLocalSession = Boolean(localStorage.getItem('hh_app_token'))
const hasInjectedSession = Boolean(getAuthToken())
if (to.meta.requiresAuth && !hasLocalSession && !hasInjectedSession) {