mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-09 02:46:48 +08:00
init
This commit is contained in:
6
.env
6
.env
@@ -1 +1,5 @@
|
||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||
VITE_BASE=/fe-student
|
||||
VITE_BASE_API=
|
||||
VITE_PROXY_URL=123
|
||||
|
||||
|
||||
5
.env.boe
5
.env.boe
@@ -1 +1,4 @@
|
||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||
VITE_BASE=/fe-student
|
||||
VITE_BASE_API=/manageApi
|
||||
VITE_PROXY_URL=
|
||||
@@ -1 +1,4 @@
|
||||
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc/course/studyindex?id=
|
||||
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc/course/studyindex?id=
|
||||
VITE_BASE=/fe-student
|
||||
VITE_BASE_API=/manageApi
|
||||
VITE_PROXY_URL=
|
||||
@@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"server": "vite build && vite preview",
|
||||
"build": "vite build"
|
||||
"build": "vite build --mode prod"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.1.3",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -146,7 +146,6 @@ import completed from "../../assets/image/completed.png";
|
||||
import ongoing from "../../assets/image/ongoing.png";
|
||||
import {boeRequest, request, usePage, useRequest} from "@/api/request";
|
||||
import {
|
||||
BASE_URL,
|
||||
ROUTER_CHAPTER_LIST,
|
||||
ROUTER_LIST,
|
||||
ROUTER_UNCOMPLETE_LIST,
|
||||
|
||||
@@ -317,7 +317,7 @@ import medal2 from '@/assets/image/medal/medal2.png'
|
||||
import medal3 from '@/assets/image/medal/medal3.png'
|
||||
import img from '@/assets/image/uploadimg.png'
|
||||
import {boeRequest, useRequest} from "@/api/request";
|
||||
import {BASE_URL, ROUTER_PROCESS} from "@/api/api";
|
||||
import {ROUTER_PROCESS} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
|
||||
Reference in New Issue
Block a user