Kaynağa Gözat

将关注公众号页面替换为视频页面,目前有资质了

JXDS18FUJT 2 yıl önce
ebeveyn
işleme
788827eeca

+ 26 - 0
src/otherPages/careEveryDay/index.vue

@@ -0,0 +1,26 @@
+<template>
+    <view style="display: flex; position: relative">
+        <image   :show-menu-by-longpress="true" style="width: 100%;" mode="widthFix" src="https://ct.zzxcx.net/ctjk/mp-wx/careGzh/care3.png"></image>
+         <image
+      mode="widthFix"
+      :show-menu-by-longpress="true"
+      class="hand"
+      src="https://ndata.zzxcx.net/ctjk/mp-wx/careGzh/hand.gif"
+    ></image>
+    </view>
+</template>
+
+<script>
+    export default {
+        
+    }
+</script>
+
+<style lang="less" scoped>
+.hand {
+  width: 154rpx;
+  top: 775rpx;
+  left: 482rpx;
+  position: absolute;
+}
+</style>

+ 61 - 8
src/otherPages/threeExamScore/index.vue

@@ -12,7 +12,7 @@
             height="300"
             type="2d"
           ></canvas>
-          <view style="border:none" class="wxad">
+          <view style="border: none" class="wxad">
             <ad
               :ad-intervals="100"
               ad-type="banner"
@@ -22,10 +22,19 @@
         </view>
       </view>
     </view>
+    <view class="split"> </view>
+    <view class="history">
+      <view class="title">
+        <view class="title-left">考试情况</view>
+        <view class="title-right">历史成绩<van-icon name="arrow" size="26rpx" /></view>
+       
+      </view>
+    </view>
   </view>
 </template>
 
 <script>
+
 export default {
   data() {
     return {
@@ -51,6 +60,7 @@ export default {
         const dpr = wx.getSystemInfoSync().pixelRatio;
         canvas.width = res[0].width * dpr;
         canvas.height = res[0].height * dpr;
+        ctx.dpr = dpr;
         ctx.scale(dpr, dpr);
         that.drawHalfCircleAndScore(ctx);
         // ctx.fillRect(0, 0, 100, 100);
@@ -62,9 +72,19 @@ export default {
      * @param ctx {WechatMiniprogram.CanvasContext}
      */
     drawHalfCircleAndScore(ctx) {
-      let x1 = 85;
+      console.log(ctx);
+      let x1 = ctx.canvas.width / ctx.dpr / 2;
       let y1 = 100;
       let r1 = 70;
+      //绘制白环
+      ctx.moveTo(x1, y1);
+      ctx.lineCap = "round";
+      ctx.lineWidth = 40;
+      ctx.strokeStyle = "#ffffff";
+      ctx.beginPath();
+      ctx.arc(x1, y1, r1, Math.PI, 0, false);
+      ctx.stroke();
+
       //绘制灰环
       ctx.moveTo(x1, y1);
       ctx.lineCap = "round";
@@ -75,7 +95,7 @@ export default {
       ctx.stroke();
       // ctx.draw()
 
-      //绘制渐变
+      //绘制渐变
       ctx.moveTo(x1, y1);
       var arcColor = ctx.createLinearGradient(15, 125, 155, 125);
       arcColor.addColorStop(0, "#FF6D4E");
@@ -89,24 +109,31 @@ export default {
       console.log(ctx);
       // ctx.draw()
       //绘制文字
+
       ctx.moveTo(x1, y1);
-      ctx.textAlign = "center";
+      ctx.textAlign = "right";
       ctx.lineWidth = 1;
       ctx.font = "30px sans-serif";
+      let score = 0;
+      let scoreWidth = ctx.measureText(String(score)).width;
+      console.log(scoreWidth);
       ctx.beginPath();
       ctx.fillStyle = "#FF4D53";
-      ctx.fillText("20", x1, y1);
+      ctx.fillText("100", x1 + 10, y1);
 
+      ctx.textAlign = "right";
       ctx.font = "14px sans-serif";
-      ctx.fillText("分", x1 + 25, y1);
-      ctx.stroke();
+      ctx.fillText("分", x1 + 10 + scoreWidth, y1);
 
+      ctx.textAlign = "center";
       ctx.font = "18px sans-serif";
       ctx.fillStyle = "#333333";
       ctx.fillText("很遗憾考试不合格", x1, y1 + 40);
-      ctx.stroke();
     },
   },
+  components: {
+
+  },
 };
 </script>
 
@@ -117,6 +144,7 @@ export default {
   background-image: url("https://ct.zzxcx.net/ctjk/mp-wx/threeExamScore/topBg.png");
   background-size: 100%;
   padding: 0 30rpx;
+
   overflow-x: hidden;
   .score {
     background: #fff;
@@ -130,8 +158,33 @@ export default {
         width: 340rpx;
         height: 300rpx;
         margin: 0 auto;
+        transform: translateY(-15%);
       }
     }
   }
 }
+.split {
+  width: 100%;
+  height: 20rpx;
+  border-bottom: 2rpx dashed #888;
+}
+.history {
+  background: #fff;
+  .title {
+    display: flex;
+    justify-content: space-between;
+    padding-top: 40rpx;
+    padding-left: 30rpx;
+    padding-right: 30rpx;
+    font-size: 26rpx;
+    .title-left {
+      font-size: 34rpx;
+      color: #0a1a33;
+      font-weight: bold;
+    }
+    .title-right{
+      color: #8A9099;
+    }
+  }
+}
 </style>

+ 6 - 1
src/pages.json

@@ -15,8 +15,9 @@
     },
     {
       "path": "pages/careGzh/index",
-      "styles": {}
+      "style": {}
     },
+   
     {
       "path": "pages/carVideo/videoList",
       "style": {
@@ -211,6 +212,10 @@
     {
       "root": "otherPages",
       "pages": [
+        {
+          "path": "careEveryDay/index",
+          "style": {}
+        },
         {
           "path": "videoSubjectList/index",
           "style": {}

+ 189 - 0
src/pages/teacherVideo/index.vue

@@ -0,0 +1,189 @@
+<template>
+  <view class="">
+    <!-- <view class="road">
+      <view class="nav"
+        ><view class="left">科目三真实考场</view
+        ><view class="right" @click="goPath('/otherPages/examRoadVideo/index')">
+          查找我的考场<van-icon color="#498EF5" name="arrow"
+        /></view>
+      </view>
+      <view class="mark">
+        <view class="button1">社会化驾驶人考场</view>
+        <image mode="widthFix" class="play" :src="bottom_arrrow"></image>
+      </view>
+      <view class="nav2">
+        <image
+          mode="widthFix"
+          class="left"
+          src="https://ct.zzxcx.net/ctjk/mp-wx/teacherVideo/kemu3.png"
+        ></image>
+        <view class="right">
+          <view>熟记考场</view>
+          <view>考试不用慌</view>
+          <navigator url=""></navigator>
+          <view  @click="goPath('/otherPages/examRoadVideo/index')" class="look">去看考场</view>
+        </view>
+      </view>
+    </view> -->
+    <view class="subject">
+      <view v-for="(item, index) in kemu" :key="index" class="list">
+        <navigator :url="'/otherPages/videoSubjectList/index?subject='+(index+1)">
+          <image
+            mode="widthFix"
+            class="subject-bg"
+            :src="'https://ct.zzxcx.net/ctjk/mp-wx/teacherVideo/kemubg'+(index+1)+'.png'"
+          ></image>
+
+          <view class="text1"> 科目{{ item }} </view>
+          <view class="text2"> 《视频讲解》 </view>
+        </navigator>
+      </view>
+    </view>
+    <view class="wxad">
+      <ad
+        ad-type="video"
+        :ad-intervals="100"
+        unit-id="adunit-8eb44bbd7e3147d4"
+      ></ad>
+    </view>
+  </view>
+</template>
+
+<script>
+import bottom_arrrow from "@/assets/img/bottom_arrrow.png";
+export default {
+  data() {
+    return {
+      bottom_arrrow,
+      query: {},
+      kemu: ["一", "二", "三", "四"],
+    };
+  },
+  methods: {
+    goPath(url) {
+      uni.navigateTo({
+        url,
+      });
+    },
+    onLoad(query) {
+      this.query = query;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.road {
+  width: 690rpx;
+  margin: 0 auto;
+  height: 478rpx;
+  background: linear-gradient(
+    188deg,
+    #edf4ff 0%,
+    rgba(237, 244, 255, 0.43) 100%
+  );
+  border-radius: 20rpx 20rpx 20rpx 20rpx;
+  opacity: 1;
+  .nav {
+    display: flex;
+    width: 100%;
+    justify-content: space-between;
+    align-content: center;
+    align-items: center;
+    padding-left: 30rpx;
+    padding-right: 30rpx;
+    padding-top: 36rpx;
+    .left {
+      font-size: 36rpx;
+      font-weight: bold;
+    }
+    .right {
+      color: #498ef5;
+    }
+  }
+  .mark {
+    position: relative;
+    padding-left: 30rpx;
+    padding-right: 30rpx;
+    margin-top: 22rpx;
+    width: 328rpx;
+    text-align: center;
+    font-size: 0;
+    .button1 {
+      width: 268rpx;
+      line-height: 64rpx;
+      background: #498ef5;
+      border-radius: 20rpx 20rpx 20rpx 20rpx;
+      opacity: 1;
+      color: #fff;
+      font-size: 26rpx;
+      text-align: center;
+    }
+    .play {
+      width: 36rpx;
+      margin-top: 4rpx;
+    }
+  }
+  .nav2 {
+    display: flex;
+    width: 100%;
+    padding-left: 30rpx;
+    padding-right: 30rpx;
+    justify-content: space-between;
+    margin-top: 20rpx;
+    .left {
+      width: 408rpx;
+    }
+    .right {
+      width: 200rpx;
+      color: #498ef5;
+      font-size: 30rpx;
+      text-align: center;
+      line-height: 1.5;
+      .look {
+        width: 200rpx;
+        line-height: 92rpx;
+        background: #498ef5;
+        border-radius: 50rpx 50rpx 50rpx 50rpx;
+        opacity: 1;
+        font-size: 34rpx;
+        color: #fff;
+        margin-top: 10rpx;
+      }
+    }
+  }
+}
+.subject {
+  padding: 0 30rpx;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  justify-content: space-between;
+
+  .list {
+    position: relative;
+    margin-bottom: 15rpx;
+    .subject-bg {
+      width: 334rpx;
+    }
+    .text1 {
+      font-size: 42rpx;
+      color: #fff;
+      position: absolute;
+      top: 30rpx;
+      left: 60rpx;
+    }
+    .text2 {
+      font-size: 42rpx;
+      color: #fff;
+      position: absolute;
+      top: 88rpx;
+      left: 40rpx;
+    }
+  }
+}
+.wxad {
+  border: none;
+  padding: 0 30rpx;
+}
+</style>

+ 23 - 19
src/pages/user/index.vue

@@ -40,6 +40,7 @@
           url="/otherPages/beforeThreeExam/index"
         >
         </van-cell>
+
         <van-cell
           title-class="uni-app-fontsize-paragraph"
           title="关注公众号"
@@ -48,7 +49,26 @@
           url="/otherPages/careGzh/index"
         >
         </van-cell>
-
+        <van-cell
+          title-class="uni-app-fontsize-paragraph"
+          title="电子资料"
+          is-link
+          @click="
+            goPath(
+              '/pages/extraWeb/index?src=https://nbjk-h5.zzxcx.net/pdfImages'
+            )
+          "
+          center
+        >
+        </van-cell>
+         <van-cell
+          title-class="uni-app-fontsize-paragraph"
+          title="每日驾考资讯"
+          is-link
+          center
+          url="/otherPages/careEveryDay/index"
+        >
+        </van-cell>
         <!-- <van-cell title="我要提现" value="" is-link center @click="goCashOut">
         </van-cell> -->
         <!-- <van-cell title="我的下级" value="" is-link center @click="goMyBranch">
@@ -97,7 +117,7 @@
           title="资料下载"
           is-link
           @click="goVipPath('/otherPages/pdfList/index')"
-          center
+          left
         >
           <template #icon>
             <m-icon type="fkbz" class="cell-icon" />
@@ -115,23 +135,7 @@
 
         <!-- #endif -->
       </div>
-      <view class="list">
-        <van-cell
-          title-class="uni-app-fontsize-paragraph"
-          title="电子资料"
-          is-link
-          @click="
-            goPath(
-              '/pages/extraWeb/index?src=https://nbjk-h5.zzxcx.net/pdfImages'
-            )
-          "
-          center
-        >
-          <template #icon>
-            <m-icon type="fkbz" class="cell-icon" />
-          </template>
-        </van-cell>
-      </view>
+      <view class="list"> </view>
       <view class="wxad">
         <ad
           ad-type="video"