mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-13 21:06:47 +08:00
feat:合并
This commit is contained in:
1883
pnpm-lock.yaml
generated
1883
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
26
src/App.vue
26
src/App.vue
@@ -8,19 +8,19 @@
|
||||
-->
|
||||
<template>
|
||||
<div id="container">
|
||||
<div id="nav">
|
||||
<router-link
|
||||
v-for="item in routes"
|
||||
:key="item.path"
|
||||
:to="item.path"
|
||||
:class="{
|
||||
link: true,
|
||||
active: name === item.name,
|
||||
}"
|
||||
>
|
||||
{{ item.name }}
|
||||
</router-link>
|
||||
</div>
|
||||
<!-- <div id="nav">-->
|
||||
<!-- <router-link-->
|
||||
<!-- v-for="item in routes"-->
|
||||
<!-- :key="item.path"-->
|
||||
<!-- :to="item.path"-->
|
||||
<!-- :class="{-->
|
||||
<!-- link: true,-->
|
||||
<!-- active: name === item.name,-->
|
||||
<!-- }"-->
|
||||
<!-- >-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </router-link>-->
|
||||
<!-- </div>-->
|
||||
<main>
|
||||
<router-view />
|
||||
</main>
|
||||
|
||||
4
src/api/ThirdApi.js
Normal file
4
src/api/ThirdApi.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export const BASE = 'https://u-pre.boe.com'
|
||||
export const GET_USER_LIST = `/userbasic/user/list post`
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @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 = 'http://111.231.196.214:30001/manageApi'
|
||||
export const BASE = '/manageApi'
|
||||
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'
|
||||
@@ -47,7 +47,8 @@ export const COMMENT_ADD = '/comment post'
|
||||
export const COMMENT_PRAISE = '/comment/praise post'
|
||||
export const COMMENT_COLLECTION = '/comment/collection post'
|
||||
|
||||
export const ASSESSMENT_QUERY = assessmentId => `/assessmentSubmit/queryAssessmentSubmitDetailById?assessmentSubmitId=${assessmentId} post`
|
||||
export const ASSESSMENT_SUBMIT_QUERY = assessmentId => `/assessmentSubmit/queryAssessmentSubmitDetailById?assessmentSubmitId=${assessmentId} post`
|
||||
export const ASSESSMENT_QUERY = assessmentId => `/assessment/queryAssessmentDetailById?assessmentId=${assessmentId} post`
|
||||
export const ASSESSMENT_SUBMIT = '/assessmentSubmit/submitAssessmentDetail'
|
||||
|
||||
export const ACTIVITY = '/activity'
|
||||
@@ -1,6 +1,7 @@
|
||||
import router from "@/router";
|
||||
import {reactive, ref, toRefs, watch} from "vue";
|
||||
import axios from 'axios';
|
||||
import {getCookie} from "@/api/utils";
|
||||
|
||||
export function usePage(_url, param) {
|
||||
|
||||
@@ -110,3 +111,38 @@ export async function request(_url, params) {
|
||||
// router.push({path: '/login'})
|
||||
})
|
||||
}
|
||||
|
||||
export async function boeRequest(_url, params) {
|
||||
const s = _url.split(' ')
|
||||
let url = s[0]
|
||||
const method = s[1]?.toLowerCase() || 'get'
|
||||
if (method === 'get') {
|
||||
let paramsArray = [];
|
||||
//拼接参数
|
||||
if (params) {
|
||||
Object.keys(params).forEach(key => paramsArray.push(key + '=' + params[key]))
|
||||
if (url.search(/\?/) === -1) {
|
||||
url += '?' + paramsArray.join('&')
|
||||
} else {
|
||||
url += '&' + paramsArray.join('&')
|
||||
}
|
||||
}
|
||||
}
|
||||
const body = method !== 'get' ? params || {} : {}
|
||||
return axios({
|
||||
url,
|
||||
method,
|
||||
headers: {
|
||||
token: getCookie('token'),
|
||||
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||
},
|
||||
baseURL: '',
|
||||
...method !== 'get' ? {data: JSON.stringify(body)} : {}
|
||||
}).then(resp => resp.data).then(response => {
|
||||
return response
|
||||
}).catch(e => {
|
||||
console.log(2222)
|
||||
console.log(e)
|
||||
// router.push({path: '/login'})
|
||||
})
|
||||
}
|
||||
@@ -1,3 +1,9 @@
|
||||
import {watch, ref} from "vue";
|
||||
import {boeRequest} from "@/api/request";
|
||||
import {BASE, GET_USER_LIST} from "@/api/ThirdApi";
|
||||
|
||||
const BASE_AVATAR = import.meta.env.DEV ? `${BASE}/upload` : ''
|
||||
|
||||
export function useImage(src) {
|
||||
return new URL(`../assets/image/${src}`, import.meta.url).href
|
||||
}
|
||||
@@ -11,3 +17,14 @@ export function setCookie(name, value, perpetual) {
|
||||
export function getCookie(name) {
|
||||
return document.cookie?.split(";").find(e => e.includes(name)).replace(`${name}=`, '') || ''
|
||||
}
|
||||
|
||||
export function useUserInfo(id) {
|
||||
const userInfo = ref({})
|
||||
watch(id, () => {
|
||||
id.value && boeRequest(GET_USER_LIST, {id: id.value}).then(res => {
|
||||
userInfo.value = res.result.userInfoList[0]
|
||||
userInfo.value.avatar = BASE_AVATAR + userInfo.value.avatar
|
||||
})
|
||||
})
|
||||
return userInfo
|
||||
}
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="title">
|
||||
{{ disDetail.projectName }}
|
||||
</div>
|
||||
<button class="btn">回复</button>
|
||||
<!-- <button class="btn">回复</button>-->
|
||||
</div>
|
||||
|
||||
<div class="line clearfix">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn" v-if="data.planDto?.evalFlag">评估</div>
|
||||
<div class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag">评估</div>
|
||||
</div>
|
||||
<!-- 基本信息 -->
|
||||
|
||||
@@ -92,8 +92,8 @@
|
||||
</div>
|
||||
<div
|
||||
class="submit"
|
||||
@click="toWork(data.workDto)"
|
||||
v-if="!data.workDto.workId"
|
||||
@click="toWork"
|
||||
v-if="data.workDto?.workId"
|
||||
>
|
||||
提交
|
||||
</div>
|
||||
@@ -115,9 +115,9 @@
|
||||
<div class="tag3" style="margin-left: 11px">考试</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit" @click="toExamItem(data.examinationDto)">
|
||||
去考试
|
||||
</div>
|
||||
<!-- <div class="submit" @click="toExamItem(data.examinationDto)">-->
|
||||
<!-- 去考试-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -134,14 +134,14 @@
|
||||
</div>
|
||||
<!-- todo #面授课接口 讲师缺少img和介绍-->
|
||||
<div class="teacheritem">
|
||||
<img class="peopleimg" :src="data.planDto?.avatar" />
|
||||
<img class="peopleimg" :src="userAvatar"/>
|
||||
<div style="margin-left: 17px; width: 190px">
|
||||
<div class="teacherName" style="margin-right: 5px">
|
||||
{{ data.planDto?.teacher }}
|
||||
</div>
|
||||
<div class="introduce">{{ data.planDto?.bandDesc }}</div>
|
||||
</div>
|
||||
<div class="follow">+ 关注</div>
|
||||
<!-- <div class="follow">+ 关注</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -150,18 +150,22 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, toRefs, watch } from "vue";
|
||||
import {computed, reactive, toRefs, watch} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {STU_OFFCOURSE_DETAIL} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
|
||||
const router = useRouter();
|
||||
const {
|
||||
query: { courseId },
|
||||
query: {courseId, type},
|
||||
} = useRoute();
|
||||
|
||||
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
|
||||
const {avatar: userAvatar} = useUserInfo(computed(() => data.value?.planDto?.teacherId))
|
||||
|
||||
const state = reactive({
|
||||
activeName: "first",
|
||||
enclosure: "",
|
||||
@@ -174,8 +178,15 @@ const download = (url) => {
|
||||
window.open(url);
|
||||
};
|
||||
|
||||
function toWork(obj) {
|
||||
router.push({ path: "/homeworkpage", query: { id: obj.courseId } });
|
||||
function toSurvery() {
|
||||
router.push({path: "/surveydetail", query: {courseId: data.value.planDto.evaluateId}})
|
||||
}
|
||||
|
||||
function toWork() {
|
||||
router.push({
|
||||
path: "/homeworkpage",
|
||||
query: {courseId: data.value.workDto.workId, id: data.value.offcourseDto.categoryId, type}
|
||||
})
|
||||
}
|
||||
|
||||
function toExamItem(obj) {
|
||||
|
||||
@@ -269,10 +269,10 @@ const { textarea1 } = toRefs(state);
|
||||
const router = useRouter();
|
||||
|
||||
const {
|
||||
query: { courseId: workId, type },
|
||||
query: { courseId: workId, type,id: taskId },
|
||||
} = useRoute();
|
||||
|
||||
const { data } = useRequest(TASK_WORK_DETAIL, { workId });
|
||||
const { data } = useRequest(TASK_WORK_DETAIL, { workId,taskId });
|
||||
const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, { workId });
|
||||
|
||||
const handleClick = () => {
|
||||
@@ -280,6 +280,7 @@ const handleClick = () => {
|
||||
projectOrRouterLogo: type,
|
||||
workUploadContent: textarea1.value,
|
||||
workId,
|
||||
taskId,
|
||||
}).then((res) => {
|
||||
submitList.value.unshift(res.data);
|
||||
});
|
||||
|
||||
@@ -41,18 +41,21 @@
|
||||
<botton
|
||||
class="btn"
|
||||
style="background: rgb(59, 191, 252)"
|
||||
@click="commitClick"
|
||||
>观看</botton
|
||||
@click="showClick"
|
||||
>观看
|
||||
</botton
|
||||
>
|
||||
<botton
|
||||
class="btn"
|
||||
style="background: rgb(57, 146, 249)"
|
||||
@click="signClick"
|
||||
v-if="!data.signFlag"
|
||||
>签到</botton
|
||||
>签到
|
||||
</botton
|
||||
>
|
||||
<botton class="btn" @click="commitClick" v-if="!data.evalFlag"
|
||||
>评估</botton
|
||||
>评估
|
||||
</botton
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,24 +131,17 @@
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div
|
||||
v-for="(el, index) in teacher"
|
||||
:key="el.id"
|
||||
class="teacheritem"
|
||||
:style="{
|
||||
'border-bottom':
|
||||
index === teacher.length - 1
|
||||
? null
|
||||
: '1px solid rgba(56, 125, 247, 0.2)',
|
||||
}"
|
||||
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)'}"
|
||||
>
|
||||
<img class="peopleimg" :src="el.peopleimg" />
|
||||
<img class="peopleimg" :src="userAvatar"/>
|
||||
<div style="margin-left: 17px; width: 190px">
|
||||
<div class="teacherName" style="margin-right: 5px">
|
||||
{{ data.userInfoBo?.userName }}
|
||||
</div>
|
||||
<div class="introduce">{{ data.userInfoBo?.bandDesc }}</div>
|
||||
</div>
|
||||
<div class="follow">+ 关注</div>
|
||||
<!-- <div class="follow">+ 关注</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -155,21 +151,27 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import {computed, reactive, toRefs} from "vue";
|
||||
import img from "@/assets/image/uploadimg.png";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {
|
||||
TASK_BROADCAST_COMMIT,
|
||||
TASK_BROADCAST_DETAIL,
|
||||
TASK_BROADCAST_SIGN,
|
||||
} from "@/api/api";
|
||||
import {useRoute} from "vue-router/dist/vue-router";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
|
||||
const {
|
||||
query: {courseId: liveId},
|
||||
} = useRoute();
|
||||
const router = useRouter()
|
||||
|
||||
const {data} = useRequest(TASK_BROADCAST_DETAIL, {liveId});
|
||||
|
||||
const {avatar: userAvatar} = useUserInfo(computed(() => data.value.userInfoBo?.userId))
|
||||
|
||||
|
||||
const state = reactive({
|
||||
activeName: "first",
|
||||
teacher: [
|
||||
@@ -182,20 +184,19 @@ const state = reactive({
|
||||
},
|
||||
],
|
||||
});
|
||||
const { activeName, teacher } = toRefs(state);
|
||||
const signClick = (id) => {
|
||||
request(TASK_BROADCAST_SIGN, { id }).then(() => {
|
||||
console.log(data.value);
|
||||
data.value.signFlag = 1;
|
||||
});
|
||||
const {activeName, teacher} = toRefs(state)
|
||||
const signClick = () => {
|
||||
data.value.signFlag = 1
|
||||
request(TASK_BROADCAST_SIGN, {courseId: liveId})
|
||||
};
|
||||
const commitClick = (id) => {
|
||||
request(TASK_BROADCAST_COMMIT, { id }).then(() => {
|
||||
data.value.evalFlag = 1;
|
||||
});
|
||||
const commitClick = () => {
|
||||
router.push({path: '/surveydetail', query: {courseId: data.value.assessmentId}})
|
||||
};
|
||||
|
||||
function showClick() {}
|
||||
function showClick() {
|
||||
window.open(data.value.liveLink)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
|
||||
@@ -54,10 +54,8 @@ const form = ref({
|
||||
|
||||
async function loginUser() {
|
||||
const {data:token} = await request(LOGIN, form.value);
|
||||
console.log(2222222222)
|
||||
console.log(token)
|
||||
setCookie("token", token, 10);
|
||||
await router.push({path: "/BallotPage"});
|
||||
await router.push({path: "/learnpath"});
|
||||
// location.reload();
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,11 @@
|
||||
</el-popover>
|
||||
</el-table-column>
|
||||
|
||||
<<<<<<< HEAD
|
||||
<el-table-column align="center" prop="target" label="目标人群" />
|
||||
=======
|
||||
<el-table-column align="center" prop="organizationName" label="归属组织"/>
|
||||
>>>>>>> c75d463c401f71da9db53014bf96eb14db8ab0d8
|
||||
<el-table-column
|
||||
#default="scope"
|
||||
align="center"
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
<div>
|
||||
<div class="coursename">{{ value.name }}</div>
|
||||
<div class="coursetag">
|
||||
<div class="tag1" style="margin-right: 11px; margin-top: 16px">必修</div>
|
||||
<div class="tag1" style="margin-right: 11px; margin-top: 16px" v-if="value.flag">必修</div>
|
||||
<div class="tag2" style="margin-right: 11px; margin-top: 16px" v-if="!value.flag">选修</div>
|
||||
<div class="tag3" style="margin-right: 11px; margin-top: 16px">{{
|
||||
types.typeName[value.type] || ''
|
||||
}}
|
||||
@@ -101,9 +102,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goclass" @click="toFinish(value)">
|
||||
<div class="goclass" :style="{background:`${types.path[value.type]?'#2478ff':'#999'}`}"
|
||||
@click="toFinish(value)">
|
||||
{{
|
||||
types.toName[value.type] || ''
|
||||
types.path[value.type] ? types.toName[value.type] : '未开放'
|
||||
}}
|
||||
</div>
|
||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
||||
@@ -181,7 +183,7 @@
|
||||
class="teacheritem"
|
||||
:style="{'border-bottom': '1px solid rgba(56, 125, 247, 0.2)'}"
|
||||
>
|
||||
<img class="peopleimg" :src="data.userInfoBo?.peopleimg"/>
|
||||
<img class="peopleimg" :src="userAvatar"/>
|
||||
<div style="margin-left: 17px">
|
||||
<div class="teacherName">
|
||||
<div style="margin-right: 5px">{{ data.userInfoBo?.userName }}</div>
|
||||
@@ -212,7 +214,7 @@
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress
|
||||
:percentage="data.totalChapterCnt"
|
||||
:percentage="parseInt(data.currentChapterCnt/data.totalChapterCnt * 100)"
|
||||
:show-text="false"
|
||||
:stroke-width="8"
|
||||
:color="
|
||||
@@ -223,7 +225,7 @@
|
||||
3:'rgba(59, 94, 251, 1)',
|
||||
4:'rgba(57, 219, 183, 1)',
|
||||
5:'rgba(57, 219, 183, 1)'
|
||||
}[parseInt(data.totalChapterCnt/20)]
|
||||
}[parseInt(data.currentChapterCnt/data.totalChapterCnt)]
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
@@ -241,10 +243,10 @@
|
||||
3:'rgba(59, 94, 251, 1)',
|
||||
4:'rgba(57, 219, 183, 1)',
|
||||
5:'rgba(57, 219, 183, 1)'
|
||||
}[parseInt(data.totalChapterCnt/20)]
|
||||
}[parseInt(data.currentChapterCnt/data.totalChapterCnt)]
|
||||
}"
|
||||
>
|
||||
{{ data.totalChapterCnt }}%
|
||||
{{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -255,7 +257,7 @@
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress
|
||||
:percentage="data.currentChapterCnt"
|
||||
:percentage="parseInt(data.currentReqCnt/data.totalReqCnt * 100)"
|
||||
:show-text="false"
|
||||
:stroke-width="8"
|
||||
:color="
|
||||
@@ -266,7 +268,7 @@
|
||||
3:'rgba(59, 94, 251, 1)',
|
||||
4:'rgba(57, 219, 183, 1)',
|
||||
5:'rgba(57, 219, 183, 1)'
|
||||
}[parseInt(data.currentChapterCnt/20)]
|
||||
}[parseInt(data.currentReqCnt/data.totalReqCnt)]
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
@@ -286,10 +288,10 @@
|
||||
3:'rgba(59, 94, 251, 1)',
|
||||
4:'rgba(57, 219, 183, 1)',
|
||||
5:'rgba(57, 219, 183, 1)'
|
||||
}[parseInt(data.currentChapterCnt/20)]
|
||||
}[parseInt(data.currentReqCnt/data.totalReqCnt)]
|
||||
}"
|
||||
>
|
||||
{{ data.currentChapterCnt }}%
|
||||
{{ parseInt(data.currentReqCnt / data.totalReqCnt * 100) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -304,7 +306,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {reactive, ref} from "vue";
|
||||
import {computed, reactive, ref, watch} from "vue";
|
||||
import word from '@/assets/image/file/word.png'
|
||||
import ppt from '@/assets/image/file/ppt.png'
|
||||
import pdf from '@/assets/image/file/pdf.png'
|
||||
@@ -314,14 +316,17 @@ import medal1 from '@/assets/image/medal/medal1.png'
|
||||
import medal2 from '@/assets/image/medal/medal2.png'
|
||||
import medal3 from '@/assets/image/medal/medal3.png'
|
||||
import img from '@/assets/image/uploadimg.png'
|
||||
import {useRequest} from "@/api/request";
|
||||
import {boeRequest, useRequest} from "@/api/request";
|
||||
import {ROUTER_PROCESS} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
|
||||
const {query: {routerId}} = useRoute()
|
||||
const router = useRouter()
|
||||
const {data} = useRequest(ROUTER_PROCESS, {routerId})
|
||||
const {avatar: userAvatar} = useUserInfo(computed(() => data.value?.userInfoBo?.userId))
|
||||
|
||||
const state = reactive({
|
||||
course: [
|
||||
{
|
||||
@@ -539,23 +544,23 @@ const types = ref({
|
||||
6: '去签到',
|
||||
7: '外链',
|
||||
8: '去讨论',
|
||||
9: '去完成',
|
||||
9: '去签到',
|
||||
10: '去完成',
|
||||
11: '去完成',
|
||||
12: '去投票',
|
||||
13: '去完成',
|
||||
},
|
||||
path: {
|
||||
1: '去上课',
|
||||
1: '',
|
||||
2: '/faceteach',
|
||||
3: '案例',
|
||||
3: '',
|
||||
4: '/homeworkpage',
|
||||
5: '去完成',
|
||||
5: '',
|
||||
6: '/livebroadcast',
|
||||
7: '外链',
|
||||
7: '',
|
||||
8: '/discusspage',
|
||||
9: '/moreactive',
|
||||
10: '/starttest',
|
||||
10: '/surveydetail',
|
||||
11: '/surveydetail',
|
||||
12: '/ballotpage',
|
||||
13: '去完成'
|
||||
@@ -563,6 +568,10 @@ const types = ref({
|
||||
})
|
||||
|
||||
function toFinish(d) {
|
||||
if (!types.value.path[d.type]) {
|
||||
ElMessage.error('暂时未开放')
|
||||
return
|
||||
}
|
||||
router.push({path: types.value.path[d.type], query: {id: d.routerTaskId, type: 1, courseId: d.courseId}})
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import { viteMockServe } from 'vite-plugin-mock'
|
||||
import topLevelAwait from "vite-plugin-top-level-await";
|
||||
|
||||
const path = require('path')
|
||||
const url = 'http://111.231.196.214:30001'
|
||||
const url = 'http://localhost:30001'
|
||||
export default defineConfig(({command}) =>
|
||||
({
|
||||
base: '/fe-student',
|
||||
@@ -34,7 +34,8 @@ export default defineConfig(({ command }) =>
|
||||
alias: [
|
||||
{find: '@', replacement: path.resolve(__dirname, 'src')}
|
||||
]
|
||||
}, server: {
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/file/upload': {
|
||||
target: 'http://111.231.196.214:30001',
|
||||
@@ -83,6 +84,12 @@ export default defineConfig(({ command }) =>
|
||||
}, '/assessment': {
|
||||
target: url,
|
||||
changeOrigin: true,
|
||||
}, '/workSubmit': {
|
||||
target: url,
|
||||
changeOrigin: true,
|
||||
}, '/userbasic': {
|
||||
target: 'https://u-pre.boe.com',
|
||||
changeOrigin: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user