import { useAuthStore } from "@/store/auth"; import { computed } from "vue"; const WEB_URL = 'https://zycj.wenlvti.net'; export function useWebPageUrl(subPath: string) { const authStore = useAuthStore(); const src = computed(() => { const authInfo = { token: authStore.token, userId: authStore.userId, expireAt: authStore.expireAt, userInfo: authStore.userInfo, loginType: authStore.loginType, }; return WEB_URL + `?inMiniProgram=true&directAuthInfo=${encodeURIComponent(JSON.stringify(authInfo))}#${subPath}` }); return { src } }