Compare commits

..
Author SHA1 Message Date
stefanfeng 65363cbd77 fix(avatar): mark native shell before bridge readiness 2026-09-11 13:38:20 +08:00
2 changed files with 1 additions and 12 deletions
@@ -27,12 +27,7 @@ function readParams(search: string, target: UniLaunchParams): void {
function hasNativeShellMarker(): boolean { function hasNativeShellMarker(): boolean {
const params = getLaunchParams() const params = getLaunchParams()
if (params.nativeShell === 'uniapp') return true return params.nativeShell === 'uniapp'
// Compatibility for already-installed shells. They have always appended a
// timestamp together with the native SSO context, even before the explicit
// nativeShell marker existed.
return Boolean(params.ts && (params.token || params.userId))
} }
// 是否运行在 uniapp web-view 环境中 // 是否运行在 uniapp web-view 环境中
-6
View File
@@ -13,12 +13,6 @@ import { requestAppPayment } from '@/utils/payment'
const userStore = useUserStore() const userStore = useUserStore()
const webview = ref(null) const webview = ref(null)
const H5_BASE_URL = import.meta.env.VITE_AVATAR_H5_URL || 'https://digital.99hui.com/' const H5_BASE_URL = import.meta.env.VITE_AVATAR_H5_URL || 'https://digital.99hui.com/'
// Restore the native shell session before constructing the H5 URL. Without
// this, the web-view opens as an anonymous H5 page and cannot enter the
// authenticated avatar-management route.
userStore.init()
const h5Url = computed(() => buildH5Url(H5_BASE_URL, userStore.$state)) const h5Url = computed(() => buildH5Url(H5_BASE_URL, userStore.$state))
function runtimeSurface() { function runtimeSurface() {