From 5fc56143ee7c267b7558abe496f67c72b61d0040 Mon Sep 17 00:00:00 2001 From: stefanfeng Date: Fri, 11 Sep 2026 15:46:31 +0800 Subject: [PATCH] fix(avatar): restore app shell session before loading h5 --- uniapp-avatar/src/pages/index/index.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uniapp-avatar/src/pages/index/index.vue b/uniapp-avatar/src/pages/index/index.vue index 992f4f1..94c7df0 100644 --- a/uniapp-avatar/src/pages/index/index.vue +++ b/uniapp-avatar/src/pages/index/index.vue @@ -13,6 +13,12 @@ import { requestAppPayment } from '@/utils/payment' const userStore = useUserStore() const webview = ref(null) 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)) function runtimeSurface() { -- 2.54.0