Ver código fonte

三力测试结构修改

JXDS18FUJT 1 ano atrás
pai
commit
3259b48ede

+ 7 - 7
src/components/m-do-topic/m-do-topic.vue

@@ -1545,7 +1545,7 @@ export default {
       case "specify":
         api.exam
           .studentQuestion2InfoGetQuestionInfoByIds({
-            ids: this.query.questionIds,
+            ids: this.query.questionIds.split(","),
           })
           .then((res) => {
             res.rows.forEach((element) => {
@@ -1599,12 +1599,12 @@ export default {
         break;
       case "exam":
         api.exam
-          .studentQuestionInfo2SelectTestQuestionInfo({
-            gs: this.query.gs,
+          .studentQuestion2InfoSelectTestQuestionInfo({
+            model: this.query.model,
             subject: this.query.subject,
           })
           .then((res) => {
-            res.rows.forEach((element) => {
+            res.data.forEach((element) => {
               element.optsArr = [];
               element.isCollect = false;
               element.opts.split("-").forEach((item, index) => {
@@ -1628,9 +1628,9 @@ export default {
               element.userAnswer = [];
             });
             that.problemListTotal = res.total;
-            origProblemList = JSON.parse(JSON.stringify(res.rows));
+            origProblemList = JSON.parse(JSON.stringify(res.data));
 
-            that.problemList = res.rows;
+            that.problemList = res.data;
 
             that.$emit("update:problemListTotal", res.total);
             uni.hideLoading();
@@ -1792,7 +1792,7 @@ export default {
         break;
       case "mi":
         api.exam
-          .studentQuestionInfoSelectMiQuestionInfoList({
+          .studentQuestion2InfoSelectMiQuestionInfoList({
             category: this.query.category,
             gs: this.query.gs,
 

+ 188 - 81
src/otherPages/beforeThreeExam/index.vue

@@ -1,38 +1,41 @@
 <template>
   <view class="threeExam">
+    <!-- <view style="position: absolute;top: 0;left: 0;z-index:99;">
+      <image style="width: 100vw;" mode="widthFix" src="https://ndata.zzxcx.net/ctjk/mp-wx/threeExam/bg.png"></image>
+    </view> -->
     <topbar>
       <view class="nav">
-        <image
-          @click="back"
-          mode="widthFix"
-          class="leftArrow"
-          src="https://ndata.zzxcx.net/ctjk/mp-wx/mockExamEnd/arrow-left.png"
-        ></image>
+        <image @click="back" mode="widthFix" class="leftArrow"
+          src="https://ndata.zzxcx.net/ctjk/mp-wx/mockExamEnd/arrow-left.png"></image>
         <text class="title">三力测试</text>
       </view>
     </topbar>
+
     <view class="mid1">
       <view class="mid1-line1">
         <view class="mid1-line1-title">考试类型 </view>
-        <view class="mid1-line1-content"
-          ><view>小车(C1/C2)</view> <view>摩托车(D/E/F)</view>
+        <view class="mid1-line1-content">
+          <view>小车(C1/C2)</view>
+          <view>摩托车(D/E/F)</view>
           <view>轻型牵引挂车(C6)</view>
         </view>
       </view>
       <view class="mid1-line1">
         <view class="mid1-line1-title">考试标准 </view>
-        <view class="mid1-line1-content"><view>20题,20分钟 </view> </view>
+        <view class="mid1-line1-content">
+          <view>20题,20分钟 </view>
+        </view>
       </view>
       <view class="mid1-line1">
         <view class="mid1-line1-title">合格标准 </view>
-        <view class="mid1-line1-content"
-          ><view>90分及格(满分100分) </view>
+        <view class="mid1-line1-content">
+          <view>90分及格(满分100分) </view>
         </view>
       </view>
       <view class="mid1-line1">
         <view class="mid1-line1-title">出题规则 </view>
-        <view class="mid1-line1-content"
-          ><view>根据公安部出题规则组卷</view>
+        <view class="mid1-line1-content">
+          <view>根据公安部出题规则组卷</view>
         </view>
       </view>
       <view class="mid1-line2">
@@ -41,21 +44,42 @@
         </view>
       </view>
       <view class="mid1-submit">
-       
-          <view @click="watchAdTobegin" class="mid1-submit-begin"> 开始考试</view>
-       
+
+        <view @click="watchAdTobegin" class="mid1-submit-begin">
+          <view style="width: 300rpx;">
+            <view class="mid1-submit-begin-line1">
+              模拟考试
+            </view>
+            <view class="mid1-submit-begin-line2">
+              仿真模拟考试
+            </view>
+          </view>
+          <view class="mid1-submit-begin-button1">
+            开始考试
+          </view>
+        </view>
+
         <navigator url="/otherPages/threeExam/index?showSubmit=0">
-          <view class="mid1-submit-continue">继续练习</view>
+          <view class="mid1-submit-continue">
+            <view style="width: 300rpx;">
+              <view class="mid1-submit-continue-line1">
+                全部题库
+              </view>
+              <view class="mid1-submit-continue-line2">
+                顺序练习全部题目
+              </view>
+            </view>
+            <view class="mid1-submit-continue-button1">
+              开始考试
+            </view>
+          </view>
         </navigator>
       </view>
     </view>
     <view class="mid2">
       <view class="mid2-line1">
-        <image
-          class="mid2-line1-icon"
-          src="https://ndata.zzxcx.net/ctjk/mp-wx/threeExam/%E9%97%AE%E5%8F%B7%402x.png"
-          mode="widthFix"
-        ></image>
+        <image class="mid2-line1-icon" src="https://ndata.zzxcx.net/ctjk/mp-wx/threeExam/%E9%97%AE%E5%8F%B7%402x.png"
+          mode="widthFix"></image>
         <text style="color: #498ef5; font-size: 34rpx">什么是三力测试?</text>
       </view>
       <view class="mid2-line2">
@@ -64,6 +88,10 @@
         满分100分,90分合格,未通过的可以在三个月内补测两侧。
       </view>
     </view>
+    <view style="height: 2vw;"></view>
+    <view class="wxad">
+      <ad ad-type="video" :ad-intervals="100" unit-id="adunit-8eb44bbd7e3147d4"></ad>
+    </view>
   </view>
 </template>
 
@@ -73,54 +101,54 @@ export default {
     return {};
   },
   methods: {
-    watchAdTobegin(){
+    watchAdTobegin() {
       let that = this
-			let videoAd = null;
+      let videoAd = null;
       uni.showModal({
-        title:'观看激励广告',
-        content:'广告结束后开始考试',
-        success(res){
-          if(res.confirm){
+        title: '观看激励广告',
+        content: '广告结束后开始考试',
+        success(res) {
+          if (res.confirm) {
             if (wx.createRewardedVideoAd) {
-				videoAd = wx.createRewardedVideoAd({
-					adUnitId: "adunit-f0e94618f34d4baf",
-				});
-				videoAd.onLoad(() => { 
-				
-				});
-				videoAd.onError((err) => {
-					console.log(err)
-				});
-				videoAd.offClose();
-				videoAd.onClose((res) => {
-
-					if (!res.isEnded) {
-						return
-					}
-				//	that.wxadWatchTip=false
-				  uni.navigateTo({
-        url:"/otherPages/threeExam/index?showSubmit=1"
-      })
-				});
-				videoAd.show().catch(() => {
-					// 失败重试
-					videoAd
-						.load()
-						.then(() => videoAd.show())
-						.catch((err) => {
-							console.log("激励视频 广告显示失败");
-						});
-				});
-			} else if (res.cancel) {
-				console.log('用户点击取消')
-			}
+              videoAd = wx.createRewardedVideoAd({
+                adUnitId: "adunit-f0e94618f34d4baf",
+              });
+              videoAd.onLoad(() => {
+
+              });
+              videoAd.onError((err) => {
+                console.log(err)
+              });
+              videoAd.offClose();
+              videoAd.onClose((res) => {
+
+                if (!res.isEnded) {
+                  return
+                }
+                //	that.wxadWatchTip=false
+                uni.navigateTo({
+                  url: "/otherPages/threeExam/index?showSubmit=1"
+                })
+              });
+              videoAd.show().catch(() => {
+                // 失败重试
+                videoAd
+                  .load()
+                  .then(() => videoAd.show())
+                  .catch((err) => {
+                    console.log("激励视频 广告显示失败");
+                  });
+              });
+            } else if (res.cancel) {
+              console.log('用户点击取消')
+            }
           }
-          
+
         }
 
       })
-		
-    
+
+
 
     },
     back() {
@@ -137,37 +165,44 @@ export default {
   background-repeat: no-repeat;
   padding-bottom: constant(safe-area-inset-bottom);
   padding-bottom: env(safe-area-inset-bottom);
+  position: relative;
+  background-color: #fff;
+  background-size: 100% auto;
+
   .nav {
     width: 100%;
     height: 100%;
     position: relative;
     display: flex;
     align-items: center;
+
     .leftArrow {
       width: 18rpx;
       position: absolute;
       left: 30rpx;
     }
+
     .title {
       position: absolute;
       left: 50%;
     }
   }
+
   .mid1 {
+
     width: 690rpx;
     padding-bottom: 60rpx;
-    background: #fff;
     margin: 0 auto;
-    padding-top: 60rpx;
+    padding-top: 40rpx;
+    background-size: 100%;
 
-    box-shadow: 0px 0px 12px 2px rgba(0, 0, 0, 0.1);
     .mid1-line1 {
       display: flex;
 
       flex-direction: row;
-      
-      padding: 20rpx 30rpx;
-   
+
+      padding: 10rpx 30rpx;
+
 
       .mid1-line1-title {
         width: 270rpx;
@@ -176,6 +211,7 @@ export default {
         color: #8a9099;
         font-size: 30rpx;
       }
+
       .mid1-line1-content {
         width: 412rpx;
         padding-right: 30rpx;
@@ -184,8 +220,9 @@ export default {
         color: #5c6066;
       }
     }
+
     .mid1-line2 {
-      padding: 0 30rpx;
+      padding: 0 10rpx;
       margin-top: 28rpx;
 
       .mid1-line2-content {
@@ -195,34 +232,101 @@ export default {
         font-size: 26rpx;
       }
     }
+
     .mid1-submit {
-      margin-top: 60rpx;
+      margin-top: 30rpx;
       display: flex;
-      justify-content: center;
+      justify-content: space-between;
       flex-wrap: wrap;
+      height: 256rpx;
+      flex-direction: column;
+      align-items: center;
+      align-content: center;
+
+
       .mid1-submit-begin {
-        width: 532rpx;
-        height: 80rpx;
+        width: 630rpx;
+        height: 108rpx;
         background: #498ef5;
         border-radius: 40px 40px 40px 40px;
         opacity: 1;
         color: #fff;
-        line-height: 80rpx;
+        padding: 0 50rpx;
         text-align: center;
+        display: flex;
+        align-items: center;
+        align-content: center;
+        justify-content: space-between;
+
+        .mid1-submit-begin-line1 {
+          font-size: 30rpx;
+          text-align: left;
+
+
+        }
+
+        .mid1-submit-begin-line2 {
+          font-size: 24rpx;
+          color: #CCE0FF;
+          text-align: left;
+
+
+        }
+
+        .mid1-submit-begin-button1 {
+          width: 200rpx;
+          height: 68rpx;
+          background: linear-gradient(90deg, #FFFFFF 0%, #BAD5FF 100%);
+          border-radius: 34rpx 34rpx 34rpx 34rpx;
+          line-height: 68rpx;
+          color: #498EF5;
+        }
       }
+
       .mid1-submit-continue {
-        width: 532rpx;
-        height: 80rpx;
-        line-height: 80rpx;
+        width: 630rpx;
+        height: 108rpx;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        align-content: center;
         border-radius: 40rpx 40rpx 40rpx 40rpx;
         opacity: 1;
-        border: 2rpx solid #498ef5;
-        margin-top: 40rpx;
-        color: #498ef5;
+
+
+
         text-align: center;
+        padding: 0 50rpx;
+        background: linear-gradient(265deg, #31CC74 0%, #63E897 100%);
+
+        .mid1-submit-continue-line1 {
+          font-size: 30rpx;
+          text-align: left;
+          color: #fff;
+
+
+        }
+
+        .mid1-submit-continue-line2 {
+          font-size: 24rpx;
+          color: #CCE0FF;
+          text-align: left;
+
+
+        }
+
+        .mid1-submit-continue-button1 {
+          width: 200rpx;
+          height: 68rpx;
+          background: linear-gradient(90deg, #FFFFFF 0%, #BDFFD9 100%);
+          border-radius: 34rpx 34rpx 34rpx 34rpx;
+          line-height: 68rpx;
+          color: #31CC74;
+        }
       }
     }
   }
+
   .mid2 {
     width: 690rpx;
     background: #fff;
@@ -231,6 +335,7 @@ export default {
     box-shadow: 0px 0px 12px 2px rgba(0, 0, 0, 0.1);
     padding-top: 40rpx;
     padding-bottom: 40rpx;
+
     .mid2-line1 {
       display: flex;
 
@@ -239,11 +344,13 @@ export default {
       padding-right: 30rpx;
       align-content: center;
       align-items: center;
+
       .mid2-line1-icon {
         width: 58rpx;
         margin-right: 16rpx;
       }
     }
+
     .mid2-line2 {
       width: 630rpx;
       margin: 0 auto;

+ 32 - 58
src/otherPages/classifyArea/index.vue

@@ -1,53 +1,28 @@
 <template>
   <div class="cell-box">
-    <van-cell
-      title-class="uni-app-fontsize-paragraph"
-      class="cell"
-      value-class="custom-right-cell"
-      :title="
-        item.placeIssueName ||
-        item.classIssueName ||
-        item.excellIssueName ||
-        item.sequeIssueName
-      "
-      center
-      v-for="(item, index) in classData"
-      :key="index"
-      :border="false"
-    >
+    <van-cell title-class="uni-app-fontsize-paragraph" class="cell" value-class="custom-right-cell" :title="item.title"
+      center v-for="(item, index) in classData" :key="index" :border="false">
       <div class="select">
-        <div
-          class="select-item0 uni-app-fontsize-paragraph"
-          @click="
-            () => {
-              goExercise({
-                placeIssueName: item.placeIssueName,
-                placeIssue: item.placeIssue,
-              });
-            }
-          "
-        >
-          <image
-            style="width: 22rpx; height: 26rpx; padding-right: 6rpx"
-            src="https://ndata.zzxcx.net/ctjk/mp-wx/classifyOrder/yuyin.png"
-          ></image>
+        <div class="select-item0 uni-app-fontsize-paragraph" @click="() => {
+          goExercise({
+            columnAll: item.columnId,
+            chapter: item.title
+          });
+        }
+        ">
+          <image style="width: 22rpx; height: 26rpx; padding-right: 6rpx"
+            src="https://ndata.zzxcx.net/ctjk/mp-wx/classifyOrder/yuyin.png"></image>
           语音讲解
         </div>
-        <div
-          @click="
-            () => {
-              goExerciseExam({
-                placeIssueName: item.placeIssueName,
-                placeIssue: item.placeIssue,
-              });
-            }
-          "
-          class="select-item1 uni-app-fontsize-paragraph"
-        >
-          <image
-            style="width: 26rpx; height: 26rpx; padding-right: 6rpx"
-            src="https://ndata.zzxcx.net/ctjk/mp-wx/classifyOrder/danxiang.png"
-          ></image>
+        <div @click="() => {
+          goExerciseExam({
+            columnAll: item.columnId,
+            chapter: item.title
+          });
+        }
+        " class="select-item1 uni-app-fontsize-paragraph">
+          <image style="width: 26rpx; height: 26rpx; padding-right: 6rpx"
+            src="https://ndata.zzxcx.net/ctjk/mp-wx/classifyOrder/danxiang.png"></image>
           单项测试
         </div>
       </div>
@@ -58,11 +33,7 @@
     <div style="height: 40rpx; width: 750rpx"></div>
     <m-classify-tip :content="classifyTip"></m-classify-tip>
     <view class="wxad">
-      <ad
-        :ad-intervals="100"
-        ad-type="video"
-        unit-id="adunit-8eb44bbd7e3147d4"
-      ></ad>
+      <ad :ad-intervals="100" ad-type="video" unit-id="adunit-8eb44bbd7e3147d4"></ad>
     </view>
   </div>
 </template>
@@ -86,7 +57,7 @@ export default {
   methods: {
     goExercise(extraQuery) {
       console.log(extraQuery);
-      
+
       let query = Object.assign({}, this.query);
       if (extraQuery) {
         query = {
@@ -102,7 +73,7 @@ export default {
     },
     goExerciseExam(extraQuery) {
       console.log(extraQuery);
-      
+
       let query = Object.assign({}, this.query);
       if (extraQuery) {
         query = {
@@ -117,12 +88,12 @@ export default {
       });
     },
     getClassData() {
-      api.exam
-        .studentQuestionInfoSelectDfQuestionInfo(this.query)
-        .then((res) => {
-          res.data.shift();
-          this.classData = res.data;
-        });
+      api.exam.studentQuestion2InfoGetQuestionColumn({
+        subject: `k${this.query.subject}_4`,
+        model: this.query.model
+      }).then(res => {
+        this.classData = res.data;
+      })
     },
   },
   mounted() {
@@ -154,6 +125,7 @@ export default {
 
   flex-wrap: wrap;
   justify-content: space-between;
+
   .select {
     display: flex;
     flex-direction: row;
@@ -184,11 +156,13 @@ export default {
       border-radius: 50rpx;
     }
   }
+
   .cell {
     width: 100%;
     border-bottom: 2rpx solid #e8e8e8;
     font-size: $uni-app-fontsize-paragraph;
   }
+
   .icon {
     width: 40rpx;
     height: 40rpx;

+ 0 - 1
src/otherPages/classifyChoose/index.vue

@@ -6,7 +6,6 @@
       <van-cell title-class="uni-app-fontsize-paragraph" class="cell" :title="item.title" is-link center v-for="(item, index) in classDataLeft" :key="index" :border="false" @click="
   () => {
     goExercise({
-      model:'cart',
       columnAll: item.columnId,
       chapter:item.title
 

+ 1 - 0
src/otherPages/classifyKind/index.vue

@@ -15,6 +15,7 @@
   </div>
 </template>
 
+
 <script>
 import api from "@/api/index";
 import utils from "@/utils/index";

+ 32 - 47
src/otherPages/classifyOrder/index.vue

@@ -2,49 +2,29 @@
   <view class="bg-white">
     <div class="cell-box">
       <view v-for="(item, index) in classData" :key="index">
-        <van-cell
-          title-class="uni-app-fontsize-paragraph"
-          value-class="custom-right-cell"
-          class="cell"
-          :title="
-            item.title
-          "
-          center
-          :border="false"
-        >
+        <van-cell title-class="uni-app-fontsize-paragraph" value-class="custom-right-cell" class="cell" :title="item.title
+        " center :border="false">
           <div class="select">
-            <div
-              class="select-item0 uni-app-fontsize-paragraph"
-              @click="
-                () => {
-                  goExercise({
-                    columnAll: item.columnId,
-      chapter:item.title
-                  });
-                }
-              "
-            >
-              <image
-                style="width: 22rpx; height: 26rpx;padding-right:6rpx;"
-                src="https://ndata.zzxcx.net/ctjk/mp-wx/classifyOrder/yuyin.png"
-              ></image>
+            <div class="select-item0 uni-app-fontsize-paragraph" @click="() => {
+          goExercise({
+            columnAll: item.columnId,
+            chapter: item.title
+          });
+        }
+        ">
+              <image style="width: 22rpx; height: 26rpx;padding-right:6rpx;"
+                src="https://ndata.zzxcx.net/ctjk/mp-wx/classifyOrder/yuyin.png"></image>
               语音讲解
             </div>
-            <div
-              @click="
-                () => {
-                  goExerciseExam({
-                    sequeIssueName: item.sequeIssueName,
-                    sequeIssue: item.sequeIssue,
-                  });
-                }
-              "
-              class="select-item1 uni-app-fontsize-paragraph"
-            >
-              <image
-                style="width: 26rpx; height: 26rpx;padding-right:6rpx;"
-                src="https://ndata.zzxcx.net/ctjk/mp-wx/classifyOrder/danxiang.png"
-              ></image>
+            <div @click="() => {
+          goExerciseExam({
+            columnAll: item.columnId,
+            chapter: item.title
+          });
+        }
+        " class="select-item1 uni-app-fontsize-paragraph">
+              <image style="width: 26rpx; height: 26rpx;padding-right:6rpx;"
+                src="https://ndata.zzxcx.net/ctjk/mp-wx/classifyOrder/danxiang.png"></image>
               单项测试
             </div>
           </div>
@@ -77,7 +57,7 @@ export default {
   },
   methods: {
     goExercise(extraQuery) {
-  
+
       let query = Object.assign({}, this.query);
       if (extraQuery) {
         query = {
@@ -111,11 +91,11 @@ export default {
   },
   mounted() {
     api.exam.studentQuestion2InfoGetQuestionColumn({
-        subject:`k${ this.query.subject}`,
-        model:this.query.model
-      }).then(res=>{
-        this.classData = res.data;
-      })
+      subject: `k${this.query.subject}`,
+      model: this.query.model
+    }).then(res => {
+      this.classData = res.data;
+    })
   },
 };
 </script>
@@ -129,15 +109,18 @@ export default {
 .bg-white {
   background: #ffffff;
 }
+
 .cell-box {
   display: flex;
   padding: 10rpx 0rpx;
   flex-wrap: wrap;
   justify-content: space-between;
-  > view {
+
+  >view {
     width: 100%;
     border-bottom: 1px solid #ddd;
   }
+
   .cell {
     width: 100%;
 
@@ -145,6 +128,7 @@ export default {
 
     // box-shadow: 0px 0px 10px rgba(124, 129, 136, 0.2);
   }
+
   .select {
     display: flex;
     flex-direction: row;
@@ -175,6 +159,7 @@ export default {
       border-radius: 50rpx;
     }
   }
+
   .icon {
     width: 40rpx;
     height: 40rpx;

+ 68 - 62
src/otherPages/threeExam/index.vue

@@ -13,10 +13,10 @@
       <rich-text style="font-size: 42rpx; vertical-align: top" :nodes="createProblemTypeHtml(problemList[problemListIndex].type) +
         (problemListIndex + 1) +
         '、' +
-        problemList[problemListIndex].question
+        problemList[problemListIndex].issue
         "></rich-text>
 
-<view class="problem-media">
+      <view class="problem-media">
         <image mode="widthFix" v-if="getFileType(problemList[problemListIndex].mediaUrl) == 'image'"
           :src="problemList[problemListIndex].mediaUrl"></image>
         <video :controls="false" autoplay loop v-if="getFileType(problemList[problemListIndex].mediaUrl) == 'video'"
@@ -31,8 +31,8 @@
               <view class="problem-radio-flex">
                 <view class="problem-radio-icon">
                   <view class="problem-radio-letter">{{
-                    numberToLetter(index)
-                  }}</view>
+        numberToLetter(index)
+      }}</view>
                 </view>
                 <text style="
                     font-size: 42rpx;
@@ -166,18 +166,18 @@
               <view class="problem-radio-flex">
                 <view class="problem-radio-icon">
                   <icon type="clear" v-if="index + 1 ==
-                    problemList[problemListIndex].userAnswerIndex &&
-                    problemList[problemListIndex].userAnswerIndex !=
-                    problemList[problemListIndex].answertrue
-                    " class="problem-radio-letter" color="red" size="60rpx"></icon>
+        problemList[problemListIndex].userAnswerIndex &&
+        problemList[problemListIndex].userAnswerIndex !=
+        problemList[problemListIndex].answertrue
+        " class="problem-radio-letter" color="red" size="60rpx"></icon>
                   <icon type="success" v-else-if="index + 1 ==
-                    problemList[problemListIndex].userAnswerIndex &&
-                    problemList[problemListIndex].userAnswerIndex ==
-                    problemList[problemListIndex].answertrue
-                    " class="problem-radio-letter" color="#33CDA4" size="60rpx"></icon>
+        problemList[problemListIndex].userAnswerIndex &&
+        problemList[problemListIndex].userAnswerIndex ==
+        problemList[problemListIndex].answertrue
+        " class="problem-radio-letter" color="#33CDA4" size="60rpx"></icon>
                   <view v-else class="problem-radio-letter">{{
-                    numberToLetter(index)
-                  }}</view>
+        numberToLetter(index)
+      }}</view>
                 </view>
                 <text style="
                     font-size: 42rpx;
@@ -189,7 +189,7 @@
           </view>
         </van-radio-group>
       </view>
-  
+
     </view>
     <view class="bottom">
       <view class="switch">
@@ -199,9 +199,9 @@
       <view class="submit">
         <view>
           <view v-if="query.showSubmit == '1'" @click="() => {
-            submitExamVisible = true;
-          }
-            " class="submit-button"><text>交卷</text>
+        submitExamVisible = true;
+      }
+        " class="submit-button"><text>交卷</text>
             <countDown @change="getThreeExamTime" @end="submitExam" background="" :time="examTime"></countDown>
           </view>
         </view>
@@ -210,21 +210,21 @@
           <view class="col">
             <icon type="success" size="26rpx" color="#33CDA4"></icon>
             <text style="font-size: 24rpx; color: #8a9099; margin-left: 8rpx">{{
-              trueNum
-            }}</text>
+        trueNum
+      }}</text>
           </view>
           <view class="col">
             <icon type="clear" size="26rpx" color="#FF4D53"></icon>
             <text style="font-size: 24rpx; color: #8a9099; margin-left: 8rpx">{{
-              falseNum
-            }}</text>
+          falseNum
+        }}</text>
           </view>
           <view @click="() => {
-                selectQuestionVisible = true
-              }" class="col">
+          selectQuestionVisible = true
+        }" class="col">
             <van-icon name="description" />
             <text style="font-size: 24rpx; color: #8a9099; margin-left: 8rpx">{{ problemListIndex + 1 }}/{{
-              problemList.length }}</text>
+        problemList.length }}</text>
           </view>
         </view>
       </view>
@@ -250,14 +250,14 @@
         </view>
         <view class="bottom">
           <view @click="() => {
-            submitExamVisible = false;
-          }
-            " class="left">继续答题</view>
+        submitExamVisible = false;
+      }
+        " class="left">继续答题</view>
           <view @click="() => {
-            resultExamVisible = true;
-            submitExamVisible = false;
-          }
-            " class="right">现在交卷</view>
+        resultExamVisible = true;
+        submitExamVisible = false;
+      }
+        " class="right">现在交卷</view>
         </view>
       </view>
     </van-popup>
@@ -275,19 +275,19 @@
             <view>您的成绩<text style="color: #01c18d" v-if="score >= 90">合格</text><text style="color: #ff4d53"
                 v-if="score < 90">不合格</text></view>
             <view class="tip2-text-line3">当前已答错<text style="color: #ff4d53; padding: 0 8rpx">{{
-              falseNum
-            }}</text>
+        falseNum
+      }}</text>
               题</view>
             <view class="tip2-bottom">
               <!-- <view class="tip2-bottom-1">试试答题技巧,提分更快</view> -->
               <view @click="
-              goPath('/otherPages/threeExamScore/index?score=' + score)
-                " class="tip2-bottom-2">现在交卷</view>
+      goPath('/otherPages/threeExamScore/index?score=' + score)
+        " class="tip2-bottom-2">现在交卷</view>
               <view @click="() => {
-                resultExamVisible = false;
-                submitExamVisible = false;
-              }
-                " class="tip2-bottom-3">继续答题</view>
+        resultExamVisible = false;
+        submitExamVisible = false;
+      }
+        " class="tip2-bottom-3">继续答题</view>
             </view>
           </view>
         </view>
@@ -310,21 +310,21 @@
             <view class="problem-header-right">
               <van-icon size="18px" name="description" />
               <view style="font-size: 14px; display: flex; align-items: center">{{ problemListIndex + 1 }}/{{
-                problemList.length }}</view>
+        problemList.length }}</view>
             </view>
           </view>
           <view class="problem-body">
             <scroll-view scroll-y class="problem-listBody">
               <view class="problem-listItem" :key="index" @click="() => {
-                 problemListIndex=index
-                }
-                " v-for="(item, index) in problemList" :class="{
-    'problem-listItem_current': problemListIndex == index,
-    'problem-listItem_dui':
-      item.userAnswer.length && item.userAnswer == item.answer,
-    'problem-listItem_cuo':
-      item.userAnswer.length && item.userAnswer !== item.answer,
-  }">
+        problemListIndex = index
+      }
+        " v-for="(item, index) in problemList" :class="{
+        'problem-listItem_current': problemListIndex == index,
+        'problem-listItem_dui':
+          item.userAnswer.length && item.userAnswer == item.answer,
+        'problem-listItem_cuo':
+          item.userAnswer.length && item.userAnswer !== item.answer,
+      }">
                 {{ index + 1 }}
               </view>
             </scroll-view>
@@ -337,9 +337,9 @@
               " class="problem-bottom-sure">确定
               </view> -->
             <view @click="() => {
-                selectQuestionVisible = false;
-              }
-              " class="problem-bottom-close">
+        selectQuestionVisible = false;
+      }
+        " class="problem-bottom-close">
               关闭</view>
           </view>
         </view>
@@ -449,7 +449,9 @@ export default {
   onLoad(query) {
     this.query = query;
     if (this.query.showSubmit == "1") {
-      api.exam.studentThreeForceSelectTestQuestionInfoList().then((res) => {
+      api.exam.studentQuestion2InfoList({
+        subject: 9
+      }).then((res) => {
         if (Array.isArray(res.rows) && res.rows.length > 0) {
           res.rows.forEach((element) => {
             element.userAnswerIndex = -1;
@@ -457,14 +459,16 @@ export default {
           });
           this.problemList = res.rows;
         } else {
-          Toast({
-            type: "fail",
-            message: "加载失败",
+          uni.showToast({
+            icon: "error",
+            title: "加载失败",
           });
         }
       });
     } else if (this.query.showSubmit == "0") {
-      api.exam.studentThreeForceList().then((res) => {
+      api.exam.studentQuestion2InfoList({
+        subject: 9
+      }).then((res) => {
         if (Array.isArray(res.rows) && res.rows.length > 0) {
           res.rows.forEach((element) => {
             element.userAnswerIndex = -1;
@@ -472,9 +476,9 @@ export default {
           });
           this.problemList = res.rows;
         } else {
-          Toast({
-            type: "fail",
-            message: "加载失败",
+          uni.showToast({
+            icon: "error",
+            title: "加载失败",
           });
         }
       });
@@ -606,6 +610,7 @@ export default {
 .wxad {
   border: none;
 }
+
 .select-problem {
   display: flex;
   width: 100vw;
@@ -687,7 +692,7 @@ export default {
       display: inline-block;
       overflow-y: scroll;
       height: 440rpx;
-  
+
       .problem-listItem {
         display: inline-block;
         width: 99rpx;
@@ -722,6 +727,7 @@ export default {
     }
   }
 }
+
 .problem {
   padding: 0 30rpx;
   height: 500rpx;

+ 29 - 30
src/pages/carVideo/index.vue

@@ -54,9 +54,9 @@
     <view class="carType">
       <view v-for="(item, index) in carType" @click="changeVehicle(item)" :key="index">
         <view @click="() => {
-            carTypeIndex = index;
-          }
-          " class="col" :class="{
+    carTypeIndex = index;
+  }
+    " class="col" :class="{
     col_selected: carTypeIndex == index,
   }">
           <image :class="['carType-img' + index]" :src="item.img"></image>
@@ -68,8 +68,8 @@
     </view>
     <view class="point">
       <view :style="{
-        left: carTypeIndex * 172 + 'rpx',
-      }" class="point-area">
+    left: carTypeIndex * 172 + 'rpx',
+  }" class="point-area">
         <image class="" src="https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/triangle1@2x.png"></image>
       </view>
     </view>
@@ -101,22 +101,22 @@
     <view class="subject">
       <view class="subject-tab">
         <view class="subject-slider" :class="{
-          left0: active == 0,
-          right0: active == 1,
-        }"></view>
+    left0: active == 0,
+    right0: active == 1,
+  }"></view>
         <view @click="() => {
-            active = 0;
-            tabQuery.subject = 1;
-          }
-          " class="subject-tabs">
+    active = 0;
+    tabQuery.subject = 1;
+  }
+    " class="subject-tabs">
           <span v-if="active == 0">科目一</span>
           <span style="color: #498ef5" v-else>科目一</span>
         </view>
         <view @click="() => {
-            active = 1;
-            tabQuery.subject = 4;
-          }
-          " class="subject-tabs">
+    active = 1;
+    tabQuery.subject = 4;
+  }
+    " class="subject-tabs">
           <span v-if="active == 1">科目四</span>
           <span style="color: #498ef5" v-else>科目四</span>
         </view>
@@ -124,13 +124,13 @@
     </view>
     <view class="tab">
       <scroll-view @scrolltoupper="() => {
-          active = 0;
-          tabQuery.subject = 1;
-        }
-        " @scrolltolower="() => {
-      active = 1;
-      tabQuery.subject = 4;
-    }
+    active = 0;
+    tabQuery.subject = 1;
+  }
+    " @scrolltolower="() => {
+    active = 1;
+    tabQuery.subject = 4;
+  }
     " scroll-with-animation :scroll-into-view="'tab-container' + active" enhanced
         style="width: 100%; white-space: nowrap" enable-flex :scroll-x="true">
         <view id="tab-container0" style="display: inline-block; white-space: nowrap">
@@ -256,7 +256,7 @@ export default {
     recomVideos0: [],
     recomVideos3: [],
     tabQuery: {
-      
+      gs: "xc",
       name: "科目一",
       model: "cart",
       cert: "C1/C2/C3",
@@ -556,19 +556,19 @@ export default {
       this.tabQuery.cert = item.title;
       switch (item.typeName) {
         case "小车":
-        
+          this.tabQuery.gs = "xc"
           this.tabQuery.model = "cart";
           break;
         case "货车":
-         
+          this.tabQuery.gs = "hc"
           this.tabQuery.model = "truck";
           break;
         case "客车":
-          
+          this.tabQuery.gs = "kc"
           this.tabQuery.model = "bus";
           break;
         case "摩托车":
-         
+          this.tabQuery.gs = "mtc"
           this.tabQuery.model = "mtc";
           break;
         default:
@@ -714,7 +714,7 @@ swiper-item {
   background: #fff;
   min-height: 100vh;
   width: 100%;
- // padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
+  // padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
   //padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
 }
 
@@ -866,4 +866,3 @@ swiper-item {
   right: 0;
 }
 </style>
-