|
|
@@ -1,9 +1,9 @@
|
|
|
import { useAuthStore } from "@/store/auth";
|
|
|
-import { computed } from "vue";
|
|
|
+import { computed, type Ref } from "vue";
|
|
|
|
|
|
const WEB_URL = 'https://zycj.wenlvti.net';
|
|
|
|
|
|
-export function useWebPageUrl(subPath: string) {
|
|
|
+export function useWebPageUrl(subPath: Ref<string>|string) {
|
|
|
|
|
|
const authStore = useAuthStore();
|
|
|
|
|
|
@@ -15,7 +15,7 @@ export function useWebPageUrl(subPath: string) {
|
|
|
userInfo: authStore.userInfo,
|
|
|
loginType: authStore.loginType,
|
|
|
};
|
|
|
- return WEB_URL + `?inMiniProgram=true&directAuthInfo=${encodeURIComponent(JSON.stringify(authInfo))}#${subPath}`
|
|
|
+ return WEB_URL + `?inMiniProgram=true&directAuthInfo=${encodeURIComponent(JSON.stringify(authInfo))}#${typeof subPath === 'string' ? subPath : subPath.value || ''}`
|
|
|
});
|
|
|
|
|
|
return {
|