|
|
@@ -21,7 +21,8 @@
|
|
|
<div style="font-size: small; font-weight: bold; color: #666666">登录以查看</div>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="isLogin && isStudent && myCourseList!==null && myCourseList.length!==0" :style="{height: (courseRowHeight - 63) + 'px'}"
|
|
|
+ <div v-if="isLogin && isStudent && myCourseList!==null && myCourseList.length!==0"
|
|
|
+ :style="{height: (courseRowHeight - 63) + 'px'}"
|
|
|
class="portal-card-main">
|
|
|
<div class="portal-my-card-main">
|
|
|
<MyCourseCard v-for="course in myCourseList" :key="course.id" :courseVO="course"/>
|
|
|
@@ -83,7 +84,8 @@
|
|
|
<div style="font-size: small; font-weight: bold; color: #666666">登录以查看</div>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="isLogin && isStudent && myTestList!==null && myTestList.length!==0" :style="{height: (testRowHeight - 63) + 'px'}"
|
|
|
+ <div v-if="isLogin && isStudent && myTestList!==null && myTestList.length!==0"
|
|
|
+ :style="{height: (testRowHeight - 63) + 'px'}"
|
|
|
class="portal-card-main">
|
|
|
<div class="portal-my-card-main">
|
|
|
<MyTestCard v-for="test in myTestList" :key="test.id" :testVO="test"/>
|
|
|
@@ -153,7 +155,7 @@ import EvalCard from "@/components/EvalCard";
|
|
|
import CoderCard from "@/components/CoderCard";
|
|
|
import MyCourseCard from "@/views/PortalPage/components/MyCourseCard";
|
|
|
import MyTestCard from "@/views/PortalPage/components/MyTestCard";
|
|
|
-import { Lock, SetUp, ShoppingCart } from "@element-plus/icons-vue";
|
|
|
+import {Lock, SetUp, ShoppingCart} from "@element-plus/icons-vue";
|
|
|
|
|
|
export default {
|
|
|
//数据
|
|
|
@@ -213,31 +215,30 @@ export default {
|
|
|
|
|
|
this.$apis.getExampleCourses().then(res => {
|
|
|
this.courseList = res.data.data;
|
|
|
- while (this.courseList.length < 6) {
|
|
|
- this.courseList.push({});
|
|
|
- }
|
|
|
- });
|
|
|
- this.$apis.getAllEvalExams().then(res => {
|
|
|
- // todo ERROR: 缺少 token 就无法请求
|
|
|
- this.evalExamList = res.data.data.examVOList;
|
|
|
- while (this.evalExamList.length < 6) {
|
|
|
- this.evalExamList.push({});
|
|
|
- }
|
|
|
+ // while (this.courseList.length < 6) {
|
|
|
+ // this.courseList.push({});
|
|
|
+ // }
|
|
|
});
|
|
|
- this.$apis.getAllCoderExams().then(res => {
|
|
|
- // todo ERROR: 缺少 token 就无法请求
|
|
|
- this.coderExamList = res.data.data.res;
|
|
|
- while (this.coderExamList.length < 6) {
|
|
|
- this.coderExamList.push({});
|
|
|
- }
|
|
|
+ this.$apis.getExampleEvalExams().then(res => {
|
|
|
+ this.evalExamList = res.data.data;
|
|
|
+ // while (this.evalExamList.length < 6) {
|
|
|
+ // this.evalExamList.push({});
|
|
|
+ // }
|
|
|
});
|
|
|
+ // this.$apis.getAllCoderExams().then(res => {
|
|
|
+ // todo ERROR: 缺少 token 就无法请求
|
|
|
+ // this.coderExamList = res.data.data.res;
|
|
|
+ // while (this.coderExamList.length < 6) {
|
|
|
+ // this.coderExamList.push({});
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
if (this.isLogin && this.isStudent) {
|
|
|
this.$apis.getStudentCourses(this.$store.state.user.id).then(res => {
|
|
|
this.myCourseList = res.data.data;
|
|
|
that.handleResize();
|
|
|
});
|
|
|
- this.$apis.getStudentEvalExams({ state: 0 }).then(res => {
|
|
|
+ this.$apis.getStudentEvalExams({state: 0}).then(res => {
|
|
|
this.myEvalExamList = res.data.data.examVOList;
|
|
|
that.handleResize();
|
|
|
});
|