|
|
@@ -144,7 +144,7 @@ import CarouselCard from "@/views/PortalPage/components/CarouselCard";
|
|
|
import CourseCard from "@/components/CourseCard";
|
|
|
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";
|
|
|
import TestCard from "@/components/TestCard";
|
|
|
|
|
|
export default {
|
|
|
@@ -208,17 +208,15 @@ export default {
|
|
|
|
|
|
this.courseList = (await this.$apis.getExampleCourses()).data.data;
|
|
|
this.evalExamList = (await this.$apis.getExampleEvalExams()).data.data;
|
|
|
- // todo ERROR: 缺少 token 就无法请求
|
|
|
- // this.coderExamList = (await this.$apis.getAllCoderExams()).data.data;
|
|
|
- this.coderExamList = this.$apis.getAllCoderExams().data.data.res;
|
|
|
+ this.coderExamList = (await this.$apis.getExampleCoderExams({})).data.data.res;
|
|
|
|
|
|
if (this.isLogin && this.isStudent) {
|
|
|
- this.$apis.getStudentCourses(this.$store.state.user.id).then(res => {
|
|
|
+ this.$apis.getStudentCourses().then(res => {
|
|
|
this.myCourseList = res.data.data;
|
|
|
this.myCourseLoading = false;
|
|
|
that.handleResize();
|
|
|
});
|
|
|
- this.$apis.getStudentEvalExams({ state: 0 }).then(res => {
|
|
|
+ this.$apis.getStudentEvalExams({state: 0}).then(res => {
|
|
|
this.myEvalExamList = res.data.data.examVOList;
|
|
|
this.myTestLoading = false;
|
|
|
that.handleResize();
|