Kaynağa Gözat

看视频关注公众号

JXDS18FUJT 2 yıl önce
ebeveyn
işleme
a453d48184

+ 1 - 1
src/otherPages/courseCatalog/components/courseCatalog.vue

@@ -145,7 +145,7 @@ export default {
       console.log(this.userAgreement);
     },
     playRoadExamVideo(item) {
-      if (!this.roadExamIds.includes(this.examId)) {
+      if (!this.roadExamIds.includes(this.examId)&&item.permission==2) {
         uni.showToast({
           title: "请购买",
           icon: "none",

+ 2 - 1
src/otherPages/courseCatalog/index.vue

@@ -72,7 +72,8 @@ export default {
   data() {
     return {
       query:{
-        price:0
+        price:0,
+        state:1
       },
       examRoadList:[],
       active: 0,

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

@@ -13,6 +13,7 @@
         >
           <input
             readonly
+            disabled
             v-model="province.province"
             @click="
               () => {
@@ -24,6 +25,7 @@
             type="text"
           />
           <input
+            disabled
             readonly
             @click="isShowCity()"
             v-model="city.city"
@@ -212,7 +214,7 @@ export default {
       api.exam
         .studentExamInfoCityProviceId(this.province.provinceId)
         .then((res) => {
-         this.examCityList = res.data;
+          this.examCityList = res.data;
         });
       api.exam
         .studentExamInfoList({

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

@@ -1,189 +0,0 @@
-<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://ndata.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://ndata.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>

+ 41 - 7
src/pages/teacherVideo/index.vue

@@ -21,24 +21,35 @@
           <view>熟记考场</view>
           <view>考试不用慌</view>
           <navigator url=""></navigator>
-          <view  @click="goPath('/otherPages/examRoadVideo/index')" class="look">去看考场</view>
+          <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)">
+        <view
+          @click="
+            goPath('/otherPages/videoSubjectList/index?subject=' + (index + 1))
+          "
+        >
           <image
             mode="widthFix"
             class="subject-bg"
-            :src="'https://ndata.zzxcx.net/ctjk/mp-wx/teacherVideo/kemubg'+(index+1)+'.png'"
+            :src="
+              'https://ndata.zzxcx.net/ctjk/mp-wx/teacherVideo/kemubg' +
+              (index + 1) +
+              '.png'
+            "
           ></image>
 
           <view class="text1"> 科目{{ item }} </view>
           <view class="text2"> 《视频讲解》 </view>
-        </navigator>
+        </view>
       </view>
     </view>
+    <official-account></official-account>
     <view class="wxad">
       <ad
         ad-type="video"
@@ -51,6 +62,7 @@
 
 <script>
 import bottom_arrrow from "@/assets/img/bottom_arrrow.png";
+import api from "@/api";
 export default {
   data() {
     return {
@@ -61,14 +73,36 @@ export default {
   },
   methods: {
     goPath(url) {
-      uni.navigateTo({
-        url,
-      });
+      let userInfo = uni.getStorageSync("userInfo");
+      let gzhOpenid = userInfo.gzhOpenid;
+      console.log(userInfo)
+      if (gzhOpenid) {
+        uni.navigateTo({
+          url,
+        });
+      } else {
+        uni.showModal({
+          title: "请关注公众号",
+          content: "关注后回到这里观看相关视频",
+          success(res) {
+            if (res.confirm) {
+              uni.navigateTo({ url: "/otherPages/careGzh/index" });
+            } else if (res.cancel) {
+            }
+          },
+        });
+      }
     },
     onLoad(query) {
       this.query = query;
     },
   },
+  onShow() {
+    // api.user.getInfo().then((res) => {
+    //   uni.setStorageSync("userInfo", res.data);
+    //   this.$store.commit("SET_USERINFO", res.data);
+    // });
+  },
 };
 </script>