浏览代码

去除无关界面前

JXDS18FUJT 10 月之前
父节点
当前提交
165b8510f5

+ 19 - 0
src/api/modules/open.js

@@ -0,0 +1,19 @@
+import request from '../request'
+const open = {
+    wxMaterialList(params){
+        return request({
+            url:"open-api/wx/material/list",
+            method:'GET',
+            params,
+            headers:{
+                isLogin:'1'
+            }
+        })
+    }
+    
+
+
+}
+
+
+export default open

+ 6 - 7
src/pages.json

@@ -1,5 +1,11 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/textCheatsList/index",
+			"style": {
+				"navigationBarTitleText": "文字技巧列表"
+			}
+		},
 		{
 			"path": "pages/home/index",
 			"style": {
@@ -163,19 +169,12 @@
 			"path": "pages/lookBeforeExam/index",
 			"style": {
 				"navigationBarTitleText": "考前必看"
-				
 			}
 		},
 		{
 			"path": "pages/subjectTextCheats/index",
 			"style": {
 				"navigationBarTitleText": "文字技巧"
-				
-			}
-		},{
-			"path":"pages/textCheatsList/index",
-			"style":{
-				"navigationBarTitleText": "文字技巧列表"
 			}
 		}
 	],

+ 4 - 9
src/pages/lookBeforeExam/index.vue

@@ -158,12 +158,7 @@
         </div>
       </div>
 
-      <ad
-        
-          ad-type="video"
-          :ad-intervals="100"
-          unit-id="adunit-173f2958099a2b25"
-        ></ad>
+      <ad ad-type="video" :ad-intervals="100" unit-id="adunit-173f2958099a2b25"></ad>
       <div style="height: 30rpx"></div>
     </div>
   </div>
@@ -183,7 +178,7 @@ export default {
         adUnitId: "adunit-cb696895e6fdcfb7",
       });
       interstitialAd.onLoad(() => {
-        console.log("ad load")
+        console.log("ad load");
       });
       interstitialAd.onError((err) => {
         console.error(err);
@@ -193,7 +188,7 @@ export default {
     // 在适合的场景显示插屏广告
     if (interstitialAd) {
       interstitialAd.show().catch((err) => {
-        console.log(err)
+        console.log(err);
       });
     }
   },
@@ -204,7 +199,7 @@ export default {
     }
     return {
       title: "科目一四宝典",
-      imageUrl:"https://ndata.zzxcx.net/ctjk/mp-wx/textCheatsList/share_cover@2x.jpg",
+      imageUrl: "https://ndata.zzxcx.net/ctjk/mp-wx/textCheatsList/share_cover@2x.jpg",
       path: `/pages/textCheatsList/index`,
     };
   },

+ 27 - 18
src/pages/subjectTextCheats/index.vue

@@ -62,7 +62,7 @@
           v-if="index > 1 && index % 5 == 0"
           ad-type="video"
           :ad-intervals="100"
-          unit-id="adunit-9b5e62e2a8260b23"
+          unit-id="adunit-173f2958099a2b25"
         ></ad>
       </div>
     </div>
@@ -71,6 +71,7 @@
 
 <script>
 import api from "@/api";
+import request from "@/api/request";
 export default {
   data() {
     return {
@@ -87,9 +88,9 @@ export default {
   },
   methods: {
     touchCountWxAd(e) {
-      let that =this
+      let that = this;
       this.touchCount = this.touchCount + 1;
-      if (this.touchCount % 5 == 0&&this.touchCount!==0) {
+      if (this.touchCount % 5 == 0 && this.touchCount !== 0) {
         // 在页面中定义插屏广告
         let interstitialAd = null;
         // 在页面onLoad回调事件中创建插屏广告实例
@@ -102,20 +103,23 @@ export default {
           });
           interstitialAd.onError((err) => {
             console.error(err);
-            that.touchCount=0
+            that.touchCount = 0;
           });
           interstitialAd.onClose(() => {
-            that.touchCount=0
+            that.touchCount = 0;
           });
         }
         // 在适合的场景显示插屏广告
         if (interstitialAd) {
-          interstitialAd.show().then(()=>{
-            that.touchCount=0
-          }).catch((err) => {
-            that.touchCount=0
-            console.log(err);
-          });
+          interstitialAd
+            .show()
+            .then(() => {
+              that.touchCount = 0;
+            })
+            .catch((err) => {
+              that.touchCount = 0;
+              console.log(err);
+            });
         }
       }
     },
@@ -132,15 +136,20 @@ export default {
     };
   },
   mounted() {
-    api.wx
-      .wxMaterialList({
+    request({
+      url: "https://nbjk1.zzxcx.net/nbjk-admin/open-api/wx/material/list",
+      method: "GET",
+      headers: {
+        isLogin: "1",
+      },
+      params: {
         subject: this.query.subject,
         status: 1,
-      })
-      .then((res) => {
-        this.imgList = res.rows;
-        // console.log(res)
-      });
+      },
+    }).then((res) => {
+      this.imgList = res.rows;
+      // console.log(res)
+    });
   },
 };
 </script>

+ 1 - 1
src/pages/textCheatsList/index.vue

@@ -266,7 +266,7 @@ export default {
     return {
       title: "科目一四宝典",
       imageUrl: "https://ndata.zzxcx.net/ctjk/mp-wx/textCheatsList/share_cover@2x.jpg",
-      path: `/otherPages/textCheatsList/index`,
+      path: `/pages/textCheatsList/index`,
     };
   },
   methods: {