Переглянути джерело

mx-paper component - teacher / student / headteacher logic

hare8999@163.com 2 роки тому
батько
коміт
0689ddad49

+ 2 - 2
.env.development

@@ -2,9 +2,9 @@
 ENV = 'development'
 
 # 名学金榜学习系统/生产环境
-#VUE_APP_BASE_API = 'https://front.mingxuejinbang.com/prod-api'
+VUE_APP_BASE_API = 'https://www.mingxuejinbang.com/prod-api'
 #VUE_APP_BASE_API = 'http://192.168.0.106:1024/prod-api'
-VUE_APP_BASE_API = '/prod-api'
+#VUE_APP_BASE_API = '/prod-api'
 
 VUE_APP_MOBILE = "https://h5.mingxuejinbang.com"
 

+ 2 - 2
src/components/MxPaper/mx-paper-mixin.js

@@ -114,10 +114,10 @@ export default {
       return this.currentTab < this.paper.questions?.length - 1
     },
     queryApi() {
-      return this.isFrontTeacher ? loadExamineePaper : openExamineePaper
+      return this.isFrontStudent ? openExamineePaper : loadExamineePaper
     },
     scoreApi() {
-      return this.isFrontTeacher ? teacherScoreExamineeQuestions : scoreExamineeQuestion
+      return this.isFrontStudent ? scoreExamineeQuestion : teacherScoreExamineeQuestions
     }
   },
   methods: {

+ 2 - 2
src/components/MxPaper/mx-question-event-mixin.js

@@ -5,7 +5,7 @@ import { mapGetters } from 'vuex'
 
 export default {
   computed: {
-    ...mapGetters(['isFrontTeacher'])
+    ...mapGetters(['isFrontTeacher', 'isFrontStudent'])
   },
   methods: {
     // local data
@@ -124,7 +124,7 @@ export default {
         examineeType: options.examineeType,
         questions: [commit]
       }
-      const scoreApi = this.isFrontTeacher ? teacherScoreExamineeQuestions : scoreExamineeQuestion
+      const scoreApi = this.isFrontStudent ? scoreExamineeQuestion : teacherScoreExamineeQuestions
       scoreApi(singleCommit)
         .then(res => {
           // assign after succeed