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() {