李志伟 3 年之前
父節點
當前提交
4e9629fdbd
共有 3 個檔案被更改,包括 4 行新增13 行删除
  1. 2
    1
      .env
  2. 0
    8
      src/pages/resumeWorkForm/index.vue
  3. 2
    4
      src/utils/request.js

+ 2
- 1
.env 查看文件

1
-# 通用配置
1
+# 通用配置
2
+VITE_SERVER_BASE=

+ 0
- 8
src/pages/resumeWorkForm/index.vue 查看文件

97
 import { addResume } from '../../services/resume'
97
 import { addResume } from '../../services/resume'
98
 import { upload } from '@/services/oss'
98
 import { upload } from '@/services/oss'
99
 
99
 
100
-// const form = reactive({
101
-//   orgId: null,
102
-//   userName: null,
103
-//   antigenImage: null,
104
-//   antigenIsNormal: null,
105
-//   nucleicImage: null,
106
-//   nucleicIsNormal: null,
107
-// })
108
 const orgId = ref('');
100
 const orgId = ref('');
109
 const userName = ref('');
101
 const userName = ref('');
110
 const antigenImage = ref();
102
 const antigenImage = ref();

+ 2
- 4
src/utils/request.js 查看文件

8
 
8
 
9
   Object.keys(options.headers || {}).forEach(key => headers.append(key, options.headers[key]))
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
     .then(response => response.json())
12
     .then(response => response.json())
13
     .then(data => {
13
     .then(data => {
14
       if (data.code === 1000) return data.data
14
       if (data.code === 1000) return data.data
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`