Przeglądaj źródła

修改了排序的问题

JXDS18FUJT 2 lat temu
rodzic
commit
69ef6fb690

+ 14 - 15
src/otherPages/examRoadVideo/index.vue

@@ -202,6 +202,7 @@ export default {
         api.amap
           .wxmapGetLocation({
             location: res.latitude + "," + res.longitude,
+            // location: "31,121"
           })
           .then((result) => {
             console.log(result);
@@ -225,7 +226,6 @@ export default {
                     return that.province.province == item.province;
                   })
                 ) {
-                  
                   api.exam
                     .studentExamInfoCityProviceId(that.province.provinceId)
                     .then((res) => {
@@ -261,20 +261,19 @@ export default {
           });
       },
       fail(res) {
-        if (that.city.cityId && that.province.provinceId) {
-          api.exam
-            .studentExamInfoCityProviceId(that.province.provinceId)
-            .then((res) => {
-              that.examCityList = res.data;
-            });
-          api.exam
-            .studentExamInfoList({
-              ...that.city,
-            })
-            .then((res) => {
-              that.examRoomList = res.rows;
-            });
-        }
+        api.exam
+          .studentExamInfoCityProviceId(that.province.provinceId)
+          .then((res) => {
+            that.examCityList = res.data;
+          });
+        api.exam
+          .studentExamInfoList({
+            ...that.city,
+          })
+          .then((res) => {
+            that.examRoomList = res.rows;
+          });
+
         console.log(res);
       },
     });

+ 1 - 1
src/pages.json

@@ -356,7 +356,7 @@
         {
           "path": "classifyChoose/index",
           "style": {
-            "navigationBarTitleText": "精选练习",
+            "navigationBarTitleText": "精选考题",
             "enablePullDownRefresh": false
           }
         },

+ 17 - 27
src/pages/carVideo/components/tabLeft.vue

@@ -22,30 +22,19 @@ 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: "提示",
-          content: "需要vip才能使用这个功能",
-          confirmText: "购买vip",
-          cancelText: "取消",
-          success(res) {
-            console.log(res);
-            if (res.confirm) {
-              uni.navigateTo({
-                url: "/otherPages/buyVip/index",
-              });
-            }
-          },
-        });
-
-        return;
+      switch (query.title) {
+        case "分类练习":
+          query.sort = 1;
+          break;
+        case "精选考题":
+          query.sort = 2;
+          break;
+        case "顺序练习":
+          query.sort = 3;
+          break;
+        case "地方练习":
+          query.sort = 4
+          break;
       }
       if (item.path) {
         let str = utils.mapToUrlQuery(query);
@@ -54,7 +43,7 @@ export default {
           url: item.path + "?" + str,
         });
       }
-    }
+    },
   },
   props: {
     needVipList: {
@@ -86,7 +75,7 @@ export default {
 <style lang="scss" scoped>
 .left {
   width: 160rpx;
-  font-size:30rpx;
+  font-size: 30rpx;
   padding-top: 50rpx;
   .left-item {
     width: 100%;
@@ -110,4 +99,5 @@ export default {
     height: 40rpx;
     background: gray;
   }
-}</style>
+}
+</style>

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

@@ -350,7 +350,7 @@ export default {
     centerList1: [
       {
         img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/selectedTestQuestions@2x.png",
-        text: "精选练习",
+        text: "精选考题",
         path: "/otherPages/classifyChoose/index",
       },
       {
@@ -408,7 +408,7 @@ export default {
     centerList4: [
       {
         img: "https://ndata.zzxcx.net/ctjk/mp-wx/carVideo/selectedTestQuestions@2x.png",
-        text: "精选练习",
+        text: "精选考题",
         path: "/otherPages/classifyChoose/index",
       },
       {