|
@@ -8,7 +8,7 @@ export default function request (url, options = {}) {
|
8
|
8
|
|
9
|
9
|
Object.keys(options.headers || {}).forEach(key => headers.append(key, options.headers[key]))
|
10
|
10
|
|
11
|
|
- return fetch(url, { ...options, headers, credentials: 'include', mode: 'cors' })
|
|
11
|
+ return fetch(url, { ...options, headers, credentials: 'include' })
|
12
|
12
|
.then(response => response.json())
|
13
|
13
|
.then(data => {
|
14
|
14
|
if (data.code === 1000) return data.data
|
|
@@ -16,6 +16,4 @@ export default function request (url, options = {}) {
|
16
|
16
|
})
|
17
|
17
|
}
|
18
|
18
|
|
19
|
|
-export const domain = process.env.NODE_ENV === 'development' ? '' : 'https://hhdlots.njyunzhi.com'
|
20
|
|
-
|
21
|
|
-export const baseURL = `${domain}/api/h5`
|
|
19
|
+export const baseURL = `${import.meta.env.VITE_SERVER_BASE}/api/h5`
|