瀏覽代碼

增加科目一秘卷页面

zhangyujun 3 年之前
父節點
當前提交
b51d085f86

二進制
src/assets/img/freeUseBg.png


二進制
src/assets/img/newRulesPaperBg.png


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

@@ -859,7 +859,6 @@ export default {
   methods: {
     getUseTime(leftTime,useTime){
       this.useTime = useTime
-
     },
     stopAudio() {
       let audio = utils.wxUtils.getGlobAudio();

+ 3 - 4
src/otherPages/mockExamEnd/index.vue

@@ -45,15 +45,14 @@
   </view>
 </template>
 <script>
-import hege from "@/assets/img/hege.png";
-import buhege from "@/assets/img/buhege.png";
+
 import api from "@/api/index";
 import utils from "@/utils/index";
 export default {
   data() {
     return {
-      hege,
-      buhege,
+      hege:"https://t1-1305573081.cos.ap-shanghai.myqcloud.com/wxapp/static/imgs/mockExamEnd/hege.png",
+      buhege:"https://t1-1305573081.cos.ap-shanghai.myqcloud.com/wxapp/static/imgs/mockExamEnd/buhege.png",
       score: 0,
       useTime: "",
       subject: 1,

+ 56 - 0
src/otherPages/selectRulePaper/index.vue

@@ -0,0 +1,56 @@
+<template>
+  <view style="display:flex">
+    <image class="bg" mode="widthFix" :src="bg"></image>
+    <view class="buttons">
+      <view class="buttons-left">进入秘卷一</view>
+      <view class="buttons-right">进入秘卷二</view>
+    </view>
+  </view>
+</template>
+
+<script>
+//试卷
+export default {
+  data() {
+    return {
+      bg: "https://t1-1305573081.cos.ap-shanghai.myqcloud.com/wxapp/static/imgs/selectRulePaperBg/selectRulePaperBg.png",
+    };
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.bg {
+  width: 100%;
+}
+.buttons {
+  position: absolute;
+  top: 875rpx;
+  width: 100%;
+  padding: 0 76rpx;
+  display: flex;
+  justify-content: space-between;
+  .buttons-left {
+    width: 287rpx;
+    height: 90rpx;
+    background: linear-gradient(0deg, #df262a, #c3060a, #e33135);
+    border-radius: 45rpx;
+    color: #fff;
+    font-size: 38rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  .buttons-right {
+    width: 287rpx;
+    height: 90rpx;
+    background: linear-gradient(0deg, #df262a, #c3060a, #e33135);
+    border-radius: 45rpx;
+    color: #fff;
+    font-size: 38rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+}
+</style>

+ 12 - 0
src/pages.json

@@ -300,6 +300,13 @@
             "navigationBarTitleText": "单选测试",
             "enablePullDownRefresh": false
           }
+        },
+        {
+          "path":"selectRulePaper/index",
+          "style":{
+            "navigationBarTitleText":"科一考前秘卷",
+            "enablePullDownRefresh": false
+          }
         }
       ]
     }
@@ -438,6 +445,11 @@
         "name": "指定的练习",
         "path": "otherPages/exerciseSpecify/index",
         "query": "liceCar=1&liceTruck=&liceBus=&liceMoto=&name=%E7%A7%91%E7%9B%AE%E4%B8%80&gs=xc&cert=C1%2FC2%2FC3&vehicle=%E8%BD%BF%E8%BD%A6&subject=1&title=%E7%B2%BE%E9%80%89%E8%80%83%E9%A2%98&sort=3&__id__=1"
+      },
+      {
+        "name":"科一秘卷",
+        "path":"otherPages/selectRulePaper/index",
+        "query": "liceCar=1&liceTruck=&liceBus=&liceMoto=&name=%E7%A7%91%E7%9B%AE%E4%B8%80&gs=xc&cert=C1%2FC2%2FC3&vehicle=%E8%BD%BF%E8%BD%A6&subject=1&title=%E7%B2%BE%E9%80%89%E8%80%83%E9%A2%98&sort=3&__id__=1"
       }
     ]
   }

+ 7 - 0
src/pages/carVideo/components/tabLeft.vue

@@ -22,6 +22,13 @@ export default {
   goPath(item, index) {
       let query = Object.assign({}, this.query);
       query.title = item.text;
+      if(item.text==='真实模拟考试'){
+        uni.showToast({
+          title:"请到速达驾考App体验",
+          icon:"none"
+        })
+        return
+      }
       if (this.needVipList.includes(index) && !this.isVip) {
         uni.showModal({
           title: "提示",

+ 57 - 3
src/pages/carVideo/index.vue

@@ -276,6 +276,30 @@
       </swiper>
     </view>
     <!-- #endif -->
+    <view v-if="active == 0" class="two">
+      <view
+        @click="
+          goPath('/otherPages/exerciseFree/index', {
+            title: '免费试用',
+          })
+        "
+        class="two-item"
+      >
+        <image class="" :src="freeUseBg"></image>
+        <text style="color: #486ea5" class="twp-text">免费试用</text>
+      </view>
+      <view
+        @click="
+          goPath('/otherPages/exerciseFree/index', {
+            title: '新规秘卷',
+          })
+        "
+        class="two-item"
+      >
+        <image :src="newRulesBg"></image>
+        <text style="color: #3b917a" class="twp-text">新规秘卷</text>
+      </view>
+    </view>
   </view>
 </template>
 
@@ -289,6 +313,8 @@ import tabRight from "./components/tabRight.vue";
 import TabCenter from "./components/tabCenter.vue";
 import VideoListBox from "./components/videoListBox.vue";
 import userInfoHead from "./components/userInfoHead.vue";
+import freeUseBg from "@/assets/img/freeUseBg.png";
+import newRulesBg from "@/assets/img/newRulesPaperBg.png";
 import utils from "@/utils/index";
 
 export default {
@@ -303,6 +329,8 @@ export default {
     userInfoHead,
   },
   data: () => ({
+    freeUseBg,
+    newRulesBg,
     subjectMap: ["科目一", "科目二", "科目三", "科目四"],
     tabQuery: {
       liceCar: 1,
@@ -365,7 +393,7 @@ export default {
       },
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/RealExaminationRoomSimulation@2x.png",
-        text: "免费试用",
+        text: "真实模拟考试",
         path: "/otherPages/classifyFree/index",
       },
 
@@ -423,8 +451,8 @@ export default {
       },
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/RealExaminationRoomSimulation@2x.png",
-        text: "免费试用",
-       path: "/otherPages/classifyFree/index",
+        text: "真实模拟考试",
+        path: "/otherPages/classifyFree/index",
       },
 
       {
@@ -527,6 +555,12 @@ export default {
     // });
   },
   methods: {
+    goPath(url, extraQuery = {}) {
+      uni.navigateTo({
+        url:
+          url + "?" + utils.mapToUrlQuery({ ...this.tabQuery, ...extraQuery }),
+      });
+    },
     scrollTabs(e) {
       console.log(e);
     },
@@ -592,6 +626,26 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.two {
+  width: 100%;
+  height: 140rpx;
+  padding: 0 30rpx;
+  display: flex;
+  justify-content: space-between;
+  .two-item {
+    position: relative;
+    .twp-text {
+      position: absolute;
+      top: 32rpx;
+      left: 30rpx;
+      font-size: 32rpx;
+    }
+    image {
+      width: 334rpx;
+      height: 140rpx;
+    }
+  }
+}
 .tabTitle {
   width: 690rpx;
   margin: 0 auto;