|
@@ -162,8 +162,7 @@ import {
|
|
|
courseReviewAdd,
|
|
|
getReviewInfo,
|
|
|
updateReviewInfo,
|
|
|
- checkeIsAssignHomework,
|
|
|
- getCourseStudents
|
|
|
+ checkeIsAssignHomework
|
|
|
} from "@/api/teacher";
|
|
|
import { browser } from "@/common/common";
|
|
|
import MHeader from "@/components/MHeader";
|
|
@@ -198,7 +197,7 @@ export default {
|
|
|
memberStatus: 0, // 是否有学生或者乐团是会员
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
+ async mounted() {
|
|
|
let params = this.$route.query;
|
|
|
if (params.Authorization) {
|
|
|
localStorage.setItem("Authorization", decodeURI(params.Authorization));
|
|
@@ -210,16 +209,26 @@ export default {
|
|
|
if (!this.courseId) {
|
|
|
this.$toast("课程信息错误");
|
|
|
}
|
|
|
- },
|
|
|
- async mounted() {
|
|
|
- let params = this.$route.query;
|
|
|
- if (params.Authorization) {
|
|
|
- localStorage.setItem("Authorization", decodeURI(params.Authorization));
|
|
|
- localStorage.setItem("userInfo", decodeURI(params.Authorization));
|
|
|
- }
|
|
|
if (browser().android || browser().iPhone) {
|
|
|
this.headerStatus = false;
|
|
|
}
|
|
|
+
|
|
|
+ await checkeIsAssignHomework({ courseScheduleId: this.courseId }).then((res) => {
|
|
|
+ let result = res.data;
|
|
|
+ if (result.code == 200) {
|
|
|
+ let tempData = result.data || {}
|
|
|
+ this.isAssignHomework = tempData.isAssignHomework;
|
|
|
+ this.enableAssignHomework = tempData.enableAssignHomework;
|
|
|
+ const memberNum = tempData.memberNum;
|
|
|
+ const courseStudentNum = tempData.courseStudentNum;
|
|
|
+ if(courseStudentNum == memberNum) {
|
|
|
+ this.memberStatus = 1
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$toast(result.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// 获取头部信息
|
|
|
if (this.reviewId) {
|
|
|
// 获取老评价
|
|
@@ -270,32 +279,24 @@ export default {
|
|
|
this.classType = result.courseScheduleType;
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
- await checkeIsAssignHomework({ courseScheduleId: this.courseId }).then((res) => {
|
|
|
- let result = res.data;
|
|
|
- if (result.code == 200) {
|
|
|
- let tempData = result.data || {}
|
|
|
- this.isAssignHomework = tempData.isAssignHomework;
|
|
|
- this.enableAssignHomework = tempData.enableAssignHomework;
|
|
|
- // const courseViewType = tempData.courseViewType || 0;
|
|
|
- const memberNum = tempData.memberNum;
|
|
|
- const courseStudentNum = tempData.courseStudentNum;
|
|
|
- if(courseStudentNum == memberNum) {
|
|
|
- this.memberStatus = 1
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$toast(result.msg);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- await getCourseStudents({ courseScheduleId: this.courseId }).then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
|
|
|
- let courseEvaluationObj = sessionStorage.getItem('courseEvaluationObj')
|
|
|
- courseEvaluationObj = courseEvaluationObj ? JSON.parse(courseEvaluationObj) : null
|
|
|
- // if()
|
|
|
- // console.log(courseEvaluationObj)
|
|
|
+ // 只有添加的时候才会有缓存数据
|
|
|
+ let courseEvaluationObj = sessionStorage.getItem('courseEvaluationObj')
|
|
|
+ courseEvaluationObj = courseEvaluationObj ? JSON.parse(courseEvaluationObj) : null
|
|
|
+ sessionStorage.removeItem('courseEvaluationObj')
|
|
|
+ if(courseEvaluationObj) {
|
|
|
+ this.teachingMaterial = courseEvaluationObj.teachingMaterial
|
|
|
+ this.song = courseEvaluationObj.song
|
|
|
+ this.pronunciation = courseEvaluationObj.pronunciation
|
|
|
+ this.tempo = courseEvaluationObj.tempo
|
|
|
+ this.musicTheory = courseEvaluationObj.musicTheory
|
|
|
+ this.memo = courseEvaluationObj.memo
|
|
|
+ this.hasLiaison = courseEvaluationObj.hasLiaison
|
|
|
+ this.handHomework = courseEvaluationObj.handHomework
|
|
|
+ this.courseId = courseEvaluationObj.courseId
|
|
|
+ }
|
|
|
+ // console.log(courseEvaluationObj)
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
submitReview() {
|
|
@@ -462,7 +463,7 @@ export default {
|
|
|
/deep/.van-field__control,
|
|
|
/deep/.van-cell__value {
|
|
|
font-size: 16px;
|
|
|
- color: #666;
|
|
|
+ color: #1A1A1A !important;
|
|
|
width: 70%;
|
|
|
flex: auto;
|
|
|
}
|