mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 19:36:48 +08:00
init
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
* @FilePath: /fe-stu/src/api/api.js
|
* @FilePath: /fe-stu/src/api/api.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
export const BASE = '/manageApi'
|
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 LOGIN = '/admin/CheckUser/userLogin post'
|
||||||
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
||||||
export const FILE_UPLOAD = '/file/upload'
|
export const FILE_UPLOAD = '/file/upload'
|
||||||
|
|||||||
@@ -83,13 +83,13 @@ export async function request(_url, params) {
|
|||||||
}
|
}
|
||||||
const body = method !== 'get' ? params || {} : {}
|
const body = method !== 'get' ? params || {} : {}
|
||||||
return axios({
|
return axios({
|
||||||
url: BASE + url,
|
url,
|
||||||
method,
|
method,
|
||||||
headers: {
|
headers: {
|
||||||
'X-Token': localStorage.getItem('token'),
|
'X-Token': localStorage.getItem('token'),
|
||||||
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||||
},
|
},
|
||||||
baseURL: '',
|
baseURL: BASE,
|
||||||
...method !== 'get' ? {data: JSON.stringify(body)} : {}
|
...method !== 'get' ? {data: JSON.stringify(body)} : {}
|
||||||
}).then(resp => resp.data).then(response => {
|
}).then(resp => resp.data).then(response => {
|
||||||
if (response.code !== 200 && response.code !== 0) {
|
if (response.code !== 200 && response.code !== 0) {
|
||||||
|
|||||||
@@ -189,8 +189,8 @@ function toUnTask() {}
|
|||||||
|
|
||||||
.learnpath {
|
.learnpath {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 734px;
|
min-height: 800px;
|
||||||
border-radius: 8px;
|
//border-radius: 8px;
|
||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ import medal2 from '@/assets/image/medal/medal2.png'
|
|||||||
import medal3 from '@/assets/image/medal/medal3.png'
|
import medal3 from '@/assets/image/medal/medal3.png'
|
||||||
import img from '@/assets/image/uploadimg.png'
|
import img from '@/assets/image/uploadimg.png'
|
||||||
import {boeRequest, useRequest} from "@/api/request";
|
import {boeRequest, useRequest} from "@/api/request";
|
||||||
import {ROUTER_PROCESS} from "@/api/api";
|
import {BASE_URL, ROUTER_PROCESS} from "@/api/api";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import {useUserInfo} from "@/api/utils";
|
import {useUserInfo} from "@/api/utils";
|
||||||
@@ -572,7 +572,8 @@ function toFinish(d) {
|
|||||||
ElMessage.error('暂时未开放')
|
ElMessage.error('暂时未开放')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
router.push({path: types.value.path[d.type], query: {id: d.routerTaskId, type: 1, courseId: d.courseId}})
|
window.parent.location.href = `${BASE_URL + types.value.path[d.type]}?id=${d.routerTaskId}&type=1&courseId=${d.courseId}`
|
||||||
|
// router.push({path: types.value.path[d.type], query: {id: d.routerTaskId, type: 1, courseId: d.courseId}})
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user