Browse Source

三力测试中

JXDS18FUJT 2 years ago
parent
commit
6b96c225eb
3 changed files with 261 additions and 26 deletions
  1. 3 0
      src/App.vue
  2. 17 12
      src/otherPages/teacherVideo/index.vue
  3. 241 14
      src/otherPages/threeExam/index.vue

+ 3 - 0
src/App.vue

@@ -105,4 +105,7 @@ html {
 .mt40{
   margin-top: 40rpx;
 }
+.no-bg{
+  background: transparent !important;
+}
 </style>

+ 17 - 12
src/otherPages/teacherVideo/index.vue

@@ -26,13 +26,16 @@
     </view>
     <view class="subject">
       <view v-for="(item, index) in kemu" :key="index" class="list">
-        <image
-          mode="widthFix"
-          class="subject-bg"
-          src="https://ct.zzxcx.net/ctjk/mp-wx/teacherVideo/kemubg1.png"
-        ></image>
-        <view class="text1"> 科目{{ item }} </view>
-        <view class="text2"> 《视频讲解》 </view>
+        <navigator url="/otherPages/videoSubjectList/index">
+          <image
+            mode="widthFix"
+            class="subject-bg"
+            src="https://ct.zzxcx.net/ctjk/mp-wx/teacherVideo/kemubg1.png"
+          ></image>
+
+          <view class="text1"> 科目{{ item }} </view>
+          <view class="text2"> 《视频讲解》 </view>
+        </navigator>
       </view>
     </view>
     <view class="wxad">
@@ -51,17 +54,19 @@ export default {
   data() {
     return {
       bottom_arrrow,
+      query: {},
       kemu: ["一", "二", "三", "四"],
     };
   },
   methods: {
-    goPath(){
+    goPath() {
       uni.navigateTo({
-        url:"/otherPages/examRoadVideo/index"
-      })
-
+        url: "/otherPages/examRoadVideo/index",
+      });
+    },
+    onLoad(query) {
+      this.query = query;
     },
-    name() {},
   },
 };
 </script>

+ 241 - 14
src/otherPages/threeExam/index.vue

@@ -246,7 +246,20 @@
         <view @click="nextPage" class="next"> 下一题</view>
       </view>
       <view class="submit">
-        <view @click="submitExam" class="submit-button"><text>交卷</text><countDown @end="submitExam" background='' :time="examTime"></countDown> </view>
+        <view
+          @click="
+            () => {
+              submitExamVisible = true;
+            }
+          "
+          class="submit-button"
+          ><text>交卷</text
+          ><countDown
+            @end="submitExam"
+            background=""
+            :time="examTime"
+          ></countDown>
+        </view>
         <view class="count">
           <view class="col">
             <icon type="success" size="26rpx" color="#33CDA4"></icon>
@@ -269,6 +282,96 @@
         </view>
       </view>
     </view>
+    <van-popup :zIndex="1000" round :show="submitExamVisible">
+      <view class="tip1">
+        <view class="title"> 确认交卷 </view>
+        <view class="score">
+          <view class="score-list">
+            <view class="score-dont"> 20</view>
+            <view style="font-size: 28rpx; color: #8a9099">未答题数</view>
+          </view>
+          <view class="score-list"
+            ><view class="score-rest" style="margin: 0 auto"> 19:59</view>
+            <view style="font-size: 28rpx; color: #8a9099">未答题数</view></view
+          >
+          <view class="score-list"
+            ><view class="score-exam"> 2</view>
+            <view style="font-size: 28rpx; color: #8a9099">未答题数</view></view
+          >
+        </view>
+        <view class="bottom">
+          <view
+            @click="
+              () => {
+                submitExamVisible = false;
+              }
+            "
+            class="left"
+            >继续答题</view
+          >
+          <view
+            @click="
+              () => {
+                submitExamVisible = true;
+              }
+            "
+            class="right"
+            >现在交卷</view
+          >
+        </view>
+      </view>
+    </van-popup>
+    <van-popup
+      custom-class="no-bg"
+      :zIndex="1001"
+      round
+      :show="resultExamVisible"
+    >
+      <view class="tip2">
+        <view style="position: relative">
+          <image
+            mode="widthFix"
+            style="width: 628rpx"
+            src="https://ct.zzxcx.net/ctjk/mp-wx/threeExam/bg_dialog.png"
+          ></image>
+          <image
+            mode="widthFix"
+            v-if="score < 90"
+            class="tip2-cry"
+            style="width: 187rpx"
+            src="https://ct.zzxcx.net/ctjk/mp-wx/threeExam/cry.png"
+          ></image>
+          <image
+            mode="widthFix"
+            v-if="score >= 90"
+            class="tip2-cry"
+            style="width: 187rpx"
+            src="https://ct.zzxcx.net/ctjk/mp-wx/threeExam/laugh.png"
+          ></image>
+          <view class="tip2-text">
+            <view>恭喜您</view>
+            <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>
+              题</view
+            >
+            <view class="tip2-bottom">
+              <!-- <view class="tip2-bottom-1">试试答题技巧,提分更快</view> -->
+              <view class="tip2-bottom-2">现在交卷</view>
+              <view class="tip2-bottom-3">继续答题</view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </van-popup>
   </view>
 </template>
 
@@ -353,8 +456,11 @@ export default {
       ],
       trueNum: 0,
       falseNum: 0,
+      score: 90,
       problemListIndex: 0,
-      examTime: 1000 * 60 * 20
+      submitExamVisible: false,
+      resultExamVisible: false,
+      examTime: 1000 * 60 * 20,
     };
   },
   onLoad() {
@@ -369,20 +475,17 @@ export default {
     });
   },
   methods: {
-    submitExam(e){
+    submitExam(e) {
       uni.showModal({
-        title:"是否交卷",
-        success(res){
-          if(res.confirm){
+        title: "是否交卷",
+        success(res) {
+          if (res.confirm) {
             uni.navigateTo({
-              url:""
-            })
-
+              url: "",
+            });
           }
-
-        }
-      })
-
+        },
+      });
     },
     getFileType(src) {
       let suffix = src.substring(src.lastIndexOf(".") + 1);
@@ -413,7 +516,10 @@ export default {
         this.problemList[this.problemListIndex]["an" + e.detail];
 
       this.problemList[this.problemListIndex].isComplete = true;
-       this.problemList[this.problemListIndex].userAnswerIndex==this.problemList[this.problemListIndex].answertrue?this.trueNum++:this.falseNum++
+      this.problemList[this.problemListIndex].userAnswerIndex ==
+      this.problemList[this.problemListIndex].answertrue
+        ? this.trueNum++
+        : this.falseNum++;
     },
     prePage(e) {
       if (this.problemListIndex <= 0) {
@@ -521,6 +627,7 @@ export default {
     width: 100%;
     display: flex;
     justify-content: center;
+    padding-top: 15rpx;
     > image {
       width: 100%;
     }
@@ -594,4 +701,124 @@ export default {
     }
   }
 }
+.tip1 {
+  width: 580rpx;
+  height: 402rpx;
+  padding: 0 30rpx;
+  .title {
+    color: #0a1a33;
+    width: 100%;
+    font-size: 42rpx;
+    font-weight: bold;
+    margin-top: 48rpx;
+    text-align: center;
+  }
+  .score {
+    display: flex;
+    justify-content: space-between;
+    font-size: 0;
+    width: 100%;
+    .score-list {
+      text-align: center;
+      color: #ff4d53;
+      font-size: 28rpx;
+      display: inline-block;
+      margin-top: 64rpx;
+    }
+    .score-dont {
+      font-size: 42rpx;
+
+      text-align: center;
+    }
+    .score-rest {
+      text-align: center;
+      font-size: 42rpx;
+      color: #0a1a33;
+    }
+    .score-exam {
+      text-align: center;
+      font-size: 42rpx;
+      color: #0a1a33;
+    }
+  }
+  .bottom {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    margin-top: 48rpx;
+    .left {
+      width: 250rpx;
+      line-height: 80rpx;
+      border-radius: 40rpx 40rpx 40rpx 40rpx;
+      opacity: 1;
+      border: 2rpx solid #707070;
+      text-align: center;
+
+      font-size: 30rpx;
+    }
+    .right {
+      width: 250rpx;
+      line-height: 80rpx;
+      background: #498ef5;
+      border-radius: 40rpx 40rpx 40rpx 40rpx;
+      opacity: 1;
+      color: #fff;
+      text-align: center;
+      font-size: 30rpx;
+    }
+  }
+}
+.tip2 {
+  .tip2-cry {
+    position: absolute;
+    z-index: 1002;
+    left: 50%;
+    top: 48rpx;
+    transform: translate(-50%, 0);
+  }
+  .tip2-text {
+    position: absolute;
+    top: 284rpx;
+    width: 100%;
+    color: #0a1a33;
+    font-size: 42rpx;
+    text-align: center;
+    font-weight: bold;
+    line-height: 1.5;
+  }
+  .tip2-text-line3 {
+    color: #0a1a33;
+    font-size: 30rpx;
+    margin-top: 25rpx;
+  }
+  .tip2-bottom {
+    width: 100%;
+    .tip2-bottom-1 {
+      width: 480rpx;
+      line-height: 80rpx;
+      background: #498ef5;
+      border-radius: 40rpx 40rpx 40rpx 40rpx;
+      opacity: 1;
+      margin: 0 auto;
+      font-size: 30rpx;
+      color: #ffffff;
+      margin-top: 60rpx;
+    }
+    .tip2-bottom-2 {
+      width: 480rpx;
+      line-height: 80rpx;
+      border-radius: 40rpx 40rpx 40rpx 40rpx;
+      opacity: 1;
+      border: 2rpx solid #707070;
+      margin: 0 auto;
+      font-size: 30rpx;
+      margin-top: 30rpx;
+    }
+    .tip2-bottom-3 {
+      margin-top: 30rpx;
+      color: #5c6066;
+      font-size: 30rpx;
+    }
+  }
+}
 </style>