This commit is contained in:
yuping
2022-12-13 19:22:35 +08:00
parent 56875228a2
commit 5d17c8acc2
4 changed files with 9 additions and 7 deletions

View File

@@ -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'

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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>