Browse Source

修复广告被遮挡的bug

JXDS18FUJT 1 year ago
parent
commit
cf84685e8e

+ 3 - 3
src/otherPages/beforeColorExam/index.vue

@@ -133,7 +133,7 @@ export default {
         return {};
     },
     computed: {
-        ...mapGetters(['nbjk_set'])
+        ...mapGetters(['nbjk_sph'])
     },
     onLoad(){
         let interstitialAd
@@ -170,8 +170,8 @@ export default {
             let that = this
             console.log(that.nbjk_set)
             wx.openChannelsActivity({
-                finderUserName: "sphQVbhe9O04tqB",
-                feedId: that.nbjk_set.CTJK_SP_YJ
+                finderUserName: that.nbjk_sph.video_accout_id,
+                feedId: that.nbjk_sph.color_impaired_glasses_feedId
             })
 
         },

+ 1 - 1
src/otherPages/colorExam/index.vue

@@ -394,7 +394,7 @@ export default {
           explainjsmp3: "https://sucai.kuaitongjiakao.com/mp3/explainJS120004.mp3",
           id: 120004,
           idYdt: null,
-          image: "https://sucai.app.kuaitongjiakao.com/kuaitong/issue_xin/image/image120004.jpg",
+          image: "https://ndata.zzxcx.net/tk/se/1.jpg",
           imageYdt: "",
           isNew: 0,
           issue: "下图文字的颜色是红色。",

+ 3 - 3
src/otherPages/colorExamScore/index.vue

@@ -38,7 +38,7 @@
 import {mapGetters} from 'vuex'
 export default {
     computed: {
-       ...mapGetters(['nbjk_set'])
+       ...mapGetters(['nbjk_sph'])
     },
     onLoad(query){
         console.log(query)
@@ -62,8 +62,8 @@ export default {
             let that =this
             console.log(that.nbjk_set)
             wx.openChannelsActivity({
-                finderUserName: "sphQVbhe9O04tqB",
-                feedId: that.nbjk_set.CTJK_SP_YJ
+                finderUserName: that.nbjk_sph.video_accout_id,
+                feedId: that.nbjk_sph.color_impaired_glasses_feedId
             })
 
         },

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

@@ -77,10 +77,10 @@ export default {
   methods: {
     goSkillBook(){
       let that =this
-      console.log(that.nkjk_sph)
+      console.log(that.nbjk_sph)
       wx.openChannelsActivity({
-        finderUserName:that.nkjk_sph.video_accout_id,
-        feedId:that.nkjk_sph.skill_book
+        finderUserName:that.nbjk_sph.video_accout_id,
+        feedId:that.nbjk_sph.tip_book_feedId
       })
     },
     refreshTest() {
@@ -125,7 +125,7 @@ export default {
     this.hegeScore = Math.ceil(this.totalScore * 0.9)
   },
   computed: {
-    ...mapGetters(['nkjk_sph'])
+    ...mapGetters(['nbjk_sph'])
   },
 };
 //提交考试成绩

+ 9 - 7
src/otherPages/threeExam/index.vue

@@ -394,7 +394,7 @@ export default {
           explainjsmp3: "https://sucai.kuaitongjiakao.com/mp3/explainJS120004.mp3",
           id: 120004,
           idYdt: null,
-          image: "https://sucai.app.kuaitongjiakao.com/kuaitong/issue_xin/image/image120004.jpg",
+          image: "https://ndata.zzxcx.net/tk1/image/image120004.jpg",
           imageYdt: "",
           isNew: 0,
           issue: "下图文字的颜色是红色。",
@@ -517,14 +517,16 @@ export default {
         });
       } else {
         if (
-          userThreeIds.indexOf(
-            this.problemList[this.problemListIndex].id
-          ) > 0
+          userThreeIds.some((item) => {
+            return item.id === this.problemList[this.problemListIndex].id;
+          })
         ) {
+      
           userThreeIds.splice(
-            userThreeIds.indexOf(
-              this.problemList[this.problemListIndex].id
-            ),
+            userThreeIds.findIndex((item)=>{
+              return item.id == this.problemList[this.problemListIndex].id
+
+            }),
             1
           );
           uni.setStorageSync(storageName, userThreeIds);

+ 13 - 1
src/pages.json

@@ -17,6 +17,12 @@
       "path": "pages/teacherVideo/index",
       "style": {}
     },
+    {
+      "path": "pages/buyExamTool/index",
+      "style": {
+        "navigationStyle":"custom"
+      }
+    },
     {
       "path": "pages/carVideo/videoList",
       "style": {
@@ -434,7 +440,7 @@
         {
           "path": "mockExamEnd/index",
           "style": {
-            "navigationBarTitleText": "模拟考试结果",
+            "navigationBarTitleText": "测验结果",
             "enablePullDownRefresh": false
           }
         },
@@ -528,6 +534,12 @@
         "iconPath": "static/imgs/user.png",
         "selectedIconPath": "static/imgs/user-active.png",
         "text": "我的"
+      },
+      {
+        "pagePath": "pages/buyExamTool/index",
+        "iconPath": "static/imgs/tool.png",
+        "selectedIconPath": "static/imgs/tool-active.png",
+        "text": "驾考神器"
       }
     ]
   },

+ 99 - 5
src/pages/buyExamTool/index.vue

@@ -1,15 +1,109 @@
 <template>
-    <div>
 
-    </div>
+
+    <view class="bg">
+        <topbar>
+            <view class="nav">
+                <!-- <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="goods">
+            <view @click="goGoodsVideo(nbjk_sph.tip_book_feedId)" class="goods-item">
+                <image mode="widthFix" src="https://ndata.zzxcx.net/ctjk/mp-wx/buyExamTool/tip_book@2x.png"></image>
+            </view>
+            <view @click="goGoodsVideo(nbjk_sph.color_impaired_glasses_feedId)" class="goods-item">
+                <image mode="widthFix"
+                    src="https://ndata.zzxcx.net/ctjk/mp-wx/buyExamTool/color_impaired_glasses@2x.png"></image>
+            </view>
+            <view @click="goGoodsVideo(nbjk_sph.ice_silk_cuff_feedId)" class="goods-item">
+                <image mode="widthFix" src="https://ndata.zzxcx.net/ctjk/mp-wx/buyExamTool/ice_silk_cuff@2x.png">
+                </image>
+            </view>
+            <view @click="goGoodsVideo(nbjk_sph.sun_protection_hat_feedId)" class="goods-item">
+                <image mode="widthFix" src="https://ndata.zzxcx.net/ctjk/mp-wx/buyExamTool/sun_protection_hat@2x.png">
+                </image>
+            </view>
+            <view @click="goGoodsVideo(nbjk_sph.booster_cushion_feedId)" class="goods-item">
+                <image mode="widthFix" src="https://ndata.zzxcx.net/ctjk/mp-wx/buyExamTool/booster_cushion@2x.png">
+                </image>
+            </view>
+
+        </view>
+        <view class="wxad">
+            <ad ad-type="video" :ad-intervals="100" unit-id="adunit-8eb44bbd7e3147d4"></ad>
+        </view>
+        <view style="height: 48px;"></view>
+    </view>
+
 </template>
 
 <script>
-    export default {
-        
-    }
+import { mapGetters } from 'vuex'
+export default {
+    data() {
+        return {
+
+        }
+    },
+    methods: {
+        goGoodsVideo(feedId) {
+            wx.openChannelsActivity({
+                finderUserName: this.nbjk_sph.video_accout_id,
+                feedId: feedId || this.nbjk_sph.tip_book_feedId
+            })
+        }
+    },
+    onLoad(query) {
+
+
+
+    },
+    computed: {
+        ...mapGetters(['nbjk_sph'])
+    },
+
+}
 </script>
 
 <style lang="less" scoped>
+.bg {
+    background: linear-gradient(180deg, #EBF5FE 0%, #6CB1F5 100%);
+    width: 750rpx;
+    min-height: 100vh;
+    overflow-y: scroll;
+    padding-bottom: constant(safe-area-inset-bottom);
+    padding-bottom: env(safe-area-inset-bottom);
+
+    .nav {
+        width: 100%;
+        height: 100%;
+        position: relative;
+        display: flex;
+        align-items: center;
+
+        .leftArrow {
+            width: 18rpx;
+            position: absolute;
+            left: 30rpx;
+        }
+
+        .title {
+            position: absolute;
+            left: 50%;
+        }
+    }
+
+    .goods {
+        width: 690rpx;
+        margin: 0 auto;
+
+        image {
+            width: 100%;
+            margin-bottom: 25rpx;
+        }
+    }
 
+}
 </style>

+ 7 - 7
src/pages/carVideo/index.vue

@@ -268,22 +268,22 @@ export default {
     //科目一
     rightList1: [
       {
-        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/LocalTopics@2x.png",
+        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/localTopics%402x.png",
         text: "地方专题",
         path: "/otherPages/classifyArea/index",
       },
       {
-        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/WrongTopicCollection@2x.png",
+        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/wrongTopicCollection%402x.png",
         text: "错题·收藏",
         path: "/otherPages/collection/index",
       },
       {
-        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/NotesBeforeExamination@2x.png",
+        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/ColorBlindnessTest@2x.png",
         text: "色盲测试",
         path: "/otherPages/beforeColorExam/index",
       },
       {
-        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/learnToSee@2x.png",
+        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/ThreeExam@2x.png",
         text: "三力测试",
         path: "/otherPages/beforeThreeExam/index",
       },
@@ -336,12 +336,12 @@ export default {
         path: "/otherPages/collection/index",
       },
       {
-        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/notesBeforeExamination%402x.png",
+        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/ColorBlindnessTest@2x.png",
         text: "色盲测试",
         path: "/otherPages/beforeColorExam/index",
       },
       {
-        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/learnToSee@2x.png",
+        img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/ThreeExam@2x.png",
         text: "三力测试",
         path: "/otherPages/beforeThreeExam/index",
       },
@@ -480,7 +480,7 @@ export default {
         this.$store.dispatch("GetRoadExamVip");
         this.$store.dispatch("GetNbjkSet");
         this.$store.dispatch("GetNbjkSph");
-        
+
         // if (!res.data.nickName) {
         //   uni.showModal({
         //     title: "新用户更新信息",

+ 1 - 1
src/store/getters.js

@@ -77,7 +77,7 @@ const getters = {
   nbjk_set:state=>{
     return state.user.nbjk_set
   },
-  nkjk_sph:state=>{
+  nbjk_sph:state=>{
     return state.user.nbjk_sph
   },
   avatar: state => state.user.avatar,

+ 9 - 7
src/store/modules/user.js

@@ -178,15 +178,17 @@ const user = {
 			// let GZH_GUANZHU = res.data.filter(item=>{
 			// 	return item.dictLabel=='GZH_GUANZHU'
 			// })
-			console.log(IS_VIDEO_FREE, "IS_VIDEO_FREE")
-			store.commit("SET_ISVIDEOFREE", IS_VIDEO_FREE[0].dictValue)
-			store.commit('SET_BAZIISPAY', BAZI_IS_PAY[0].dictValue)
-			store.commit('SET_NBJK_SET', {
-				IS_SWITCH: res.data[0].dictValue,
-				BAZI_IS_PAY: res.data[7].dictValue,
-				CTJK_SP_YJ: res.data[8].dictValue
+			let config = {
+
+			}
+			res.data.forEach(item=>{
+				config[item.dictLabel] = item.dictValue
 
 			})
+			// console.log(IS_VIDEO_FREE, "IS_VIDEO_FREE")
+			store.commit("SET_ISVIDEOFREE", IS_VIDEO_FREE[0].dictValue)
+			store.commit('SET_BAZIISPAY', BAZI_IS_PAY[0].dictValue)
+			store.commit('SET_NBJK_SET', config)
 			// store.commit('SET_GZH_GUANZHU',GZH_GUANZHU[0].dictValue)
 		},
 		async GetNbjkSph(store){