mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-14 19:52:48 +00:00
update web
This commit is contained in:
parent
b8b58102e2
commit
5b6563a16e
@ -19,7 +19,7 @@ import useMemberStore from '@/stores/member'
|
|||||||
import '@/assets/styles/index.scss'
|
import '@/assets/styles/index.scss'
|
||||||
|
|
||||||
if (process.client) {
|
if (process.client) {
|
||||||
const match = location.href.match(/\/s(\d*)\//)
|
const match = location.href.match(/\/web\/(\d*)\//)
|
||||||
const cookie = useCookie('siteId')
|
const cookie = useCookie('siteId')
|
||||||
match ? cookie.value = match[1] : cookie.value = null
|
match ? cookie.value = match[1] : cookie.value = null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -94,6 +94,7 @@ class Http {
|
|||||||
// 处理首次请求baseurl空的问题
|
// 处理首次请求baseurl空的问题
|
||||||
const runtimeConfig = useRuntimeConfig()
|
const runtimeConfig = useRuntimeConfig()
|
||||||
!this.options.baseURL && (this.options.baseURL = runtimeConfig.public.VITE_APP_BASE_URL || `${location.origin}/api/`)
|
!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) => {
|
useFetch(url, { ...this.options }).then((response) => {
|
||||||
const { data: { value }, error } = response
|
const { data: { value }, error } = response
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user