From 5b6563a16e448ad74ef55bf6d8aa39ea697a22a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8=E6=A0=88=E5=B0=8F=E5=AD=A6=E7=94=9F?= <1518079521@qq.com> Date: Wed, 21 Jun 2023 16:57:03 +0800 Subject: [PATCH] update web --- web/app.vue | 2 +- web/utils/request.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app.vue b/web/app.vue index e79482d5b..0afd71334 100644 --- a/web/app.vue +++ b/web/app.vue @@ -19,7 +19,7 @@ import useMemberStore from '@/stores/member' import '@/assets/styles/index.scss' if (process.client) { - const match = location.href.match(/\/s(\d*)\//) + const match = location.href.match(/\/web\/(\d*)\//) const cookie = useCookie('siteId') match ? cookie.value = match[1] : cookie.value = null } diff --git a/web/utils/request.ts b/web/utils/request.ts index 247571647..f62f33b01 100644 --- a/web/utils/request.ts +++ b/web/utils/request.ts @@ -94,6 +94,7 @@ class Http { // 处理首次请求baseurl空的问题 const runtimeConfig = useRuntimeConfig() !this.options.baseURL && (this.options.baseURL = runtimeConfig.public.VITE_APP_BASE_URL || `${location.origin}/api/`) + this.options.baseURL.substr(-1) != '/' && (this.options.baseURL += '/') useFetch(url, { ...this.options }).then((response) => { const { data: { value }, error } = response