mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-17 14:56:48 +08:00
init
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
* @FilePath: /fe-stu/src/api/api.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
export const BASE = import.meta.env.DEV ? '' : '/manageApi'
|
||||
export const BASE_URL = import.meta.env.DEV ? '' : 'https://u-pre.boe.com/fe-student'
|
||||
export const LOGIN = '/admin/CheckUser/userLogin post'
|
||||
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
||||
export const FILE_UPLOAD = '/file/upload'
|
||||
|
||||
@@ -89,7 +89,7 @@ export async function request(_url, params) {
|
||||
'X-Token': localStorage.getItem('token'),
|
||||
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||
},
|
||||
baseURL: BASE,
|
||||
baseURL: import.meta.env.VITE_BASE_API,
|
||||
...method !== 'get' ? {data: JSON.stringify(body)} : {}
|
||||
}).then(resp => resp.data).then(response => {
|
||||
if (response.code !== 200 && response.code !== 0) {
|
||||
|
||||
Reference in New Issue
Block a user