mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
init
This commit is contained in:
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>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="title">
|
||||
{{ disDetail.projectName }}
|
||||
</div>
|
||||
<button class="btn">回复</button>
|
||||
<!-- <button class="btn">回复</button>-->
|
||||
</div>
|
||||
|
||||
<div class="line clearfix">
|
||||
|
||||
@@ -236,13 +236,13 @@ const state = reactive({
|
||||
const {textarea1} = toRefs(state);
|
||||
const router = useRouter()
|
||||
|
||||
const {query: {courseId:workId,type}} = useRoute()
|
||||
const {query: {courseId:workId,type,id:taskId}} = useRoute()
|
||||
|
||||
const {data} = useRequest(TASK_WORK_DETAIL, {workId})
|
||||
const {data: submitList} = useRequest(TASK_WORK_SUBMIT_LIST, {workId})
|
||||
|
||||
const handleClick = () => {
|
||||
request(TASK_WORK_COMMIT, {projectOrRouterLogo: type, workUploadContent: textarea1.value, workId}).then(res => {
|
||||
request(TASK_WORK_COMMIT, {projectOrRouterLogo: type, workUploadContent: textarea1.value, workId,taskId}).then(res => {
|
||||
submitList.value.unshift(res.data)
|
||||
})
|
||||
textarea1.value=''
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="threeBtn">
|
||||
<botton class="btn" style="background: rgb(59, 191, 252)" @click="commitClick">观看</botton>
|
||||
<botton class="btn" style="background: rgb(59, 191, 252)" @click="ShowClick">观看</botton>
|
||||
<botton class="btn" style="background: rgb(57, 146, 249)" @click="signClick" v-if="!data.signFlag">签到</botton>
|
||||
<botton class="btn" @click="commitClick" v-if="!data.evalFlag">评估</botton>
|
||||
<botton class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate!=='0'">评估</botton>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 基本信息 -->
|
||||
@@ -147,8 +147,10 @@ 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";
|
||||
|
||||
const {query: {courseId: liveId}} = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const {data} = useRequest(TASK_BROADCAST_DETAIL, {liveId})
|
||||
const state = reactive({
|
||||
@@ -166,18 +168,15 @@ 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 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() {
|
||||
|
||||
window.open(data.value.liveLink)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@ const types = ref({
|
||||
6: '去签到',
|
||||
7: '外链',
|
||||
8: '去讨论',
|
||||
9: '去完成',
|
||||
9: '去签到',
|
||||
10: '去完成',
|
||||
11: '去完成',
|
||||
12: '去投票',
|
||||
@@ -556,7 +556,7 @@ const types = ref({
|
||||
7: '',
|
||||
8: '/discusspage',
|
||||
9: '/moreactive',
|
||||
10: '/starttest',
|
||||
10: '/surveydetail',
|
||||
11: '/surveydetail',
|
||||
12: '/ballotpage',
|
||||
13: '去完成'
|
||||
|
||||
Reference in New Issue
Block a user