Browse Source

修复用时的bug前

zhangyujun 3 years ago
parent
commit
d013cda87a

+ 3 - 0
src/components/m-do-topic/m-do-topic.vue

@@ -1284,6 +1284,9 @@ export default {
   },
   mounted() {
     let that =this
+   uni.showLoading({
+        title: "加载题目中"
+      });
     switch (that.type) {
       case "specify":
         api.open

+ 5 - 4
src/otherPages/exercise/index.vue

@@ -4,10 +4,10 @@
     <!-- <view style="text-align:center;">
       <van-count-down :time="time"></van-count-down>
     </view> -->
-
     <m-do-topic
-      :bottomFunc="['previous', 'next', 'score','explain','selectCatalogue']"
-      :midFunc="['collect','readQuestion','readQuestionAndAnswer','skill']"
+      v-if="isGetQuery"
+      :bottomFunc="['previous', 'next', 'score', 'explain', 'selectCatalogue']"
+      :midFunc="['collect', 'readQuestion', 'readQuestionAndAnswer', 'skill']"
       :trueNum.sync="trueNum"
       :falseNum.sync="falseNum"
       :query="query"
@@ -26,7 +26,6 @@
         <span>读题</span>
       </div>
     </view> -->
-
     <van-overlay
       @click-overlay="
         () => {
@@ -122,6 +121,7 @@ import mDoTopic from "@/components/m-do-topic/m-do-topic.vue";
 export default {
   data() {
     return {
+      isGetQuery: false,
       query: {
         cert: "",
         vehicle: "",
@@ -499,6 +499,7 @@ export default {
   onLoad(query) {
     let that = this;
     this.query = query;
+    this.isGetQuery = true;
     // api.exam
     //   .studentQuestionInfoList({
     //     ...this.query,

+ 4 - 0
src/otherPages/exerciseCollect/index.vue

@@ -5,6 +5,7 @@
       <van-count-down :time="time"></van-count-down>
     </view> -->
     <m-do-topic
+      v-if="isGetQuery"
       type="collect"
       :trueNum.sync="trueNum"
       :falseNum.sync="falseNum"
@@ -159,6 +160,7 @@ export default {
         },
         {},
       ],
+      isGetQuery: false,
       explainJsVisible: false,
       time: 45 * 60 * 1000,
       problemListTotal: 1,
@@ -512,6 +514,8 @@ export default {
   onLoad(query) {
     let that = this;
     this.query = query;
+    // 获取到参数再进行渲染
+    this.isGetQuery = true;
   },
   computed: {
     //liceCar=1&liceTruck=&liceBus=&liceMoto=&name=科目一&cert=C1/C2/C3&vehicle=轿车&subject=1&title=顺序练习&sort=3

+ 3 - 0
src/otherPages/exerciseExam/index.vue

@@ -9,6 +9,7 @@
     </view>
 
     <m-do-topic
+      v-if="isGetQuery"
       :hiddenAnswer="true"
       :hiddenMode="true"
       :bottomFunc="['previous', 'next', 'selectCatalogue', 'submitExam']"
@@ -210,6 +211,7 @@ export default {
           userAnswer: [],
         },
       ],
+      isGetQuery: false,
       problemListIndex: 0,
     };
   },
@@ -504,6 +506,7 @@ export default {
   onLoad(query) {
     let that = this;
     this.query = query;
+    this.isGetQuery = true;
   },
   computed: {
     //liceCar=1&liceTruck=&liceBus=&liceMoto=&name=科目一&cert=C1/C2/C3&vehicle=轿车&subject=1&title=顺序练习&sort=3

+ 3 - 1
src/otherPages/exerciseFree/index.vue

@@ -6,6 +6,7 @@
     </view> -->
 
     <m-do-topic
+      v-if="isGetQuery"
       type="free"
       :bottomFunc="['previous', 'next', 'score', 'explain', 'selectCatalogue']"
       :midFunc="['collect', 'readQuestion', 'readQuestionAndAnswer', 'skill']"
@@ -129,6 +130,7 @@ export default {
         subject: "",
         title: "",
       },
+      isGetQuery:false,
       gsMap: {
         xc: "小车",
         hc: "货车",
@@ -500,7 +502,7 @@ export default {
   onLoad(query) {
     let that = this;
     this.query = query;
-  
+    this.isGetQuery =true;
   },
   computed: {
     //liceCar=1&liceTruck=&liceBus=&liceMoto=&name=科目一&cert=C1/C2/C3&vehicle=轿车&subject=1&title=顺序练习&sort=3

+ 6 - 3
src/otherPages/exerciseSpecify/index.vue

@@ -5,6 +5,7 @@
       <van-count-down :time="time"></van-count-down>
     </view> -->
     <m-do-topic
+      v-if="isGetQuery"
       type="specify"
       :trueNum.sync="trueNum"
       :falseNum.sync="falseNum"
@@ -143,6 +144,7 @@ export default {
         subject: "",
         title: "",
       },
+      isGetQuery: false,
       gsMap: {
         xc: "小车",
         hc: "货车",
@@ -352,7 +354,7 @@ export default {
       this.problemListIndex = this.problemListIndex - 1;
     },
     goNextTopics() {
-      if (this.problemListIndex >= this.problemListTotal-1) {
+      if (this.problemListIndex >= this.problemListTotal - 1) {
         uni.showToast({
           title: "到底了",
           icon: "none",
@@ -512,7 +514,7 @@ export default {
   onLoad(query) {
     let that = this;
     this.query = query;
-
+    this.isGetQuery = true;
   },
   computed: {
     //liceCar=1&liceTruck=&liceBus=&liceMoto=&name=科目一&cert=C1/C2/C3&vehicle=轿车&subject=1&title=顺序练习&sort=3
@@ -522,7 +524,8 @@ export default {
         this.query.classIssueName ||
         this.query.placeIssueName ||
         this.query.excellIssueName ||
-        this.query.sequeIssueName||""
+        this.query.sequeIssueName ||
+        ""
       }`;
     },
   },

+ 6 - 3
src/otherPages/exerciseWrong/index.vue

@@ -5,6 +5,7 @@
       <van-count-down :time="time"></van-count-down>
     </view> -->
     <m-do-topic
+      v-if="isGetQuery"
       type="wrong"
       :trueNum.sync="trueNum"
       :falseNum.sync="falseNum"
@@ -143,6 +144,7 @@ export default {
         subject: "",
         title: "",
       },
+      isGetQuery: false,
       gsMap: {
         xc: "小车",
         hc: "货车",
@@ -352,7 +354,7 @@ export default {
       this.problemListIndex = this.problemListIndex - 1;
     },
     goNextTopics() {
-      if (this.problemListIndex >= this.problemListTotal-1) {
+      if (this.problemListIndex >= this.problemListTotal - 1) {
         uni.showToast({
           title: "到底了",
           icon: "none",
@@ -512,7 +514,7 @@ export default {
   onLoad(query) {
     let that = this;
     this.query = query;
-
+    this.isGetQuery = true;
   },
   computed: {
     //liceCar=1&liceTruck=&liceBus=&liceMoto=&name=科目一&cert=C1/C2/C3&vehicle=轿车&subject=1&title=顺序练习&sort=3
@@ -522,7 +524,8 @@ export default {
         this.query.classIssueName ||
         this.query.placeIssueName ||
         this.query.excellIssueName ||
-        this.query.sequeIssueName||""
+        this.query.sequeIssueName ||
+        ""
       }`;
     },
   },

+ 7 - 0
src/otherPages/mockExamEnd/index.vue

@@ -84,6 +84,13 @@ export default {
       });
     },
     goExerciseSpecify() {
+      if(!this.query.questionIds){
+        uni.showToast({
+          title:"没有错题",
+          icon:"none"
+        })
+        return
+      }
       uni.navigateTo({
         url:
           "/otherPages/exerciseSpecify/index?" +