Browse Source

底部导航改版,顶部自定义导航去除

zhangyujun 3 years ago
parent
commit
012f8a4bad

+ 8 - 3
src/App.vue

@@ -58,10 +58,15 @@ export default {
 /* #endif  */
 
 /*每个页面公共css */
+// page {
+//   font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
+//     Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB",
+//     "Microsoft Yahei", sans-serif;
+// }
 page {
-  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
-    Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB",
-    "Microsoft Yahei", sans-serif;
+  font-family:-apple-system,Arial,"Helvetica Neue", Helvetica, "PingFang SC",
+    "Hiragino Sans GB", "Heiti SC", "MicrosoftYaHei", "WenQuanYi Micro Hei",
+    sans-serif;
 }
 view {
   margin: 0;

+ 1 - 1
src/components/m-checkbox/m-checkbox.vue

@@ -10,7 +10,7 @@
       >{{ name }}</view
     >
     <view :data-item="item" style="width: 8px"></view>
-    <text style="font-weight: 600" :data-item="item">{{ item.value }}</text>
+    <text :data-item="item">{{ item.value }}</text>
   </view>
 </template>
 

+ 18 - 5
src/components/m-do-topic/m-do-topic.vue

@@ -5,7 +5,7 @@
     }}</span>
     <!-- <text>{{ problemListIndex + 1 }}、</text> -->
     <text class="problem-issue"
-      >{{ problemListIndex + 1 }}.{{
+      >{{ problemListIndex + 1 }}{{
         problemList[problemListIndex].issue
       }}</text
     >
@@ -81,7 +81,9 @@
           >{{ numberToLetter(index) }}</text
         >
         <view style="width: 8px"></view>
-        <text class="problem-opAnswer">{{ item.value }}</text>
+        <text style="font-weight: 500" class="problem-opAnswer">{{
+          item.value
+        }}</text>
       </view>
     </view>
 
@@ -129,6 +131,7 @@
       </view>
     </view>
     <view
+      class="problem-ops"
       v-if="
         problemList[problemListIndex].questionType == 3 &&
         problemList[problemListIndex].isCompleted
@@ -192,6 +195,7 @@
       </m-radio-group>
     </view>
     <view
+      class="problem-ops"
       v-if="
         problemList[problemListIndex].questionType == 1 &&
         problemList[problemListIndex].isCompleted
@@ -251,6 +255,7 @@
       </m-radio-group>
     </view>
     <view
+      class="problem-ops"
       v-if="
         problemList[problemListIndex].questionType == 2 &&
         problemList[problemListIndex].isCompleted
@@ -325,6 +330,7 @@
       </view>
     </view>
     <view
+      class="problem-ops"
       v-if="
         problemList[problemListIndex].questionType == 3 &&
         problemList[problemListIndex].isCompleted
@@ -475,6 +481,10 @@ export default {
     query(newValue, oldValue) {
       let that = this;
       console.log(this.type);
+      uni.showLoading({
+        title: "加载题目中",
+        mask: true,
+      });
       if (this.type == "wrong") {
         api.exam
           .studentQuestionInfoGetQuestionInfoByIds({
@@ -506,6 +516,7 @@ export default {
             that.problemListTotal = res.total;
             that.problemList = res.rows;
             that.$emit("update:problemListTotal", res.total);
+            uni.hideLoading();
           });
       } else {
         api.exam
@@ -538,6 +549,7 @@ export default {
             that.problemListTotal = res.total;
             that.problemList = res.rows;
             that.$emit("update:problemListTotal", res.total);
+            uni.hideLoading();
           });
       }
     },
@@ -799,14 +811,15 @@ export default {
     padding-bottom: 15rpx;
   }
   .problem-issue {
-    font-size: 42rpx;
+    font-size: 38rpx;
+    font-weight: 500;
   }
   .problem-select {
     display: flex;
     align-content: center;
     align-items: center;
-    margin-top: 15rpx;
-    padding-left: 30rpx;
+    padding-top: 16rpx;
+    padding-bottom: 16rpx;
   }
   .problem-type {
     padding-left: 10rpx;

+ 1 - 1
src/components/m-radio/m-radio.vue

@@ -10,7 +10,7 @@
       >{{ name }}</view
     >
     <view :data-item="item" style="width: 8px"></view>
-    <text style="font-weight: 600" :data-item="item">{{ value }}</text>
+    <text  :data-item="item">{{ value }}</text>
   </view>
 </template>
 

+ 1 - 1
src/components/topbar/topbar.vue

@@ -15,7 +15,7 @@
 			tophight: uni.getMenuButtonBoundingClientRect(),
 		}),
 		mounted() {
-			console.log(uni.getMenuButtonBoundingClientRect())
+	
 		}
 	};
 </script>

+ 2 - 2
src/otherPages/classifyArea/index.vue

@@ -90,12 +90,12 @@ export default {
 <style lang="scss" scoped>
 .cell-box {
   display: flex;
-  padding: 10rpx 30rpx;
+  padding: 30rpx 30rpx;
   flex-wrap: wrap;
   justify-content: space-between;
   .cell {
     width: 334rpx;
-    margin-top: 20rpx;
+    margin-bottom: 30rpx;
     box-shadow: 0rpx 0rpx 10rpx rgba(124, 129, 136, 0.2);
   }
   .icon {

+ 2 - 2
src/otherPages/classifyChoose/index.vue

@@ -206,7 +206,7 @@ export default {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
-  padding: 10rpx 30rpx;
+  padding: 30rpx 30rpx;
   justify-content: space-between;
   width: 100%;
   box-sizing: border-box;
@@ -222,7 +222,7 @@ export default {
 
   .cell {
     width: 334rpx;
-    margin-top: 10rpx;
+    margin-bottom: 30rpx;
     box-shadow: 0px 0px 10rpx rgba(124, 129, 136, 0.2);
   }
   .icon-blue {

+ 2 - 2
src/otherPages/classifyKind/index.vue

@@ -74,12 +74,12 @@ export default {
 <style lang="scss" scoped>
 .cell-box {
   display: flex;
-  padding: 10rpx 30rpx;
+  padding: 30rpx 30rpx;
   flex-wrap: wrap;
   justify-content: space-between;
   .cell {
     width: 334rpx;
-    margin-top: 20rpx;
+    margin-bottom: 30rpx;
     box-shadow: 0rpx 0rpx 20rpx rgba(124, 129, 136, 0.2);
     background: #fff;
   }

+ 1 - 0
src/otherPages/exercise/components/navBar.vue

@@ -53,6 +53,7 @@ export default {
   position: relative;
   background: #fff;
   .header-title {
+    font-size: 32rpx;
     width: 100%;
     height: 100%;
     text-align: center;

+ 2 - 2
src/otherPages/exercise/components/tabbar.vue

@@ -2,8 +2,7 @@
   <view
     class="box"
     :style="{
-      height: height,
-      lineHeight:height
+      height: height
     }"
   >
     <slot></slot>
@@ -37,6 +36,7 @@ export default {
     bottom: 0;
     font-size: 14px;
     background: #fff;
+    padding:0 16rpx;
 
 
 }

+ 51 - 36
src/otherPages/exercise/index.vue

@@ -5,7 +5,12 @@
       <van-count-down :time="time"></van-count-down>
     </view> -->
     <view class="divider"></view>
-    <m-do-topic :trueNum.sync="trueNum" :falseNum.sync="falseNum" :query="query" :problemListIndex="problemListIndex"></m-do-topic>
+    <m-do-topic
+      :trueNum.sync="trueNum"
+      :falseNum.sync="falseNum"
+      :query="query"
+      :problemListIndex="problemListIndex"
+    ></m-do-topic>
     <!-- <view class="function-list">
       <div class="function-item">
         <van-icon name="star-o" size="25px" />
@@ -78,33 +83,39 @@
     </van-tabbar>
     <!-- #endif -->
     <!-- #ifdef MP-TOUTIAO -->
-    <tabbar height="35px">
-      <view @click="goBeforeTopics" class="flex-all-center h-full">
-        <van-icon
-          slot="icon"
-          custom-style="transform: rotate(90deg);"
-          custom-class="last-subject"
-          name="down"
-          size="18px"
-        /><text> 上一题 </text>
-      </view>
-      <view class="flex-all-center h-full">
-        <icon
-          class="icon-box-img"
-          color="#06c05f"
-          type="success"
-          size="18px"
-        ></icon
-        ><text style="margin-left: 5rpx">{{ trueNum }}</text>
+    <tabbar height="45px">
+      <view class="h-full tabbar-item">
+        <view @click="goBeforeTopics">
+          <van-icon
+            slot="icon"
+            custom-style="transform: rotate(90deg);"
+            custom-class="last-subject"
+            name="down"
+            size="18px"
+          />
+          <view> 上一题 </view>
+        </view>
       </view>
-      <view class="flex-all-center h-full">
-        <icon class="icon-box-img" type="clear" size="18px"></icon>
-        <text style="margin-left: 5rpx">{{ falseNum }}</text>
+
+      <view class="h-full tabbar-item">
+        <view class="tabbar-item">
+          <icon
+            class="icon-box-img"
+            color="#06c05f"
+            type="success"
+            size="18px"
+          ></icon
+          ><view style="width: 100%">{{ trueNum }}</view>
+        </view>
+        <view style="margin-left: 15rpx" class="tabbar-item">
+          <icon class="icon-box-img" type="clear" size="18px"></icon>
+          <view style="width: 100%">{{ falseNum }}</view>
+        </view>
       </view>
-      <view class="flex-all-center h-full">
-        <van-icon size="18px" name="description" />{{ problemListIndex + 1 }}/{{
-          problemListTotal
-        }}
+      <view class="h-full tabbar-item">
+        <van-icon size="18px" name="description" /><view style="width: 100%"
+          >{{ problemListIndex + 1 }}/{{ problemListTotal }}</view
+        >
       </view>
 
       <view
@@ -113,21 +124,22 @@
             explainJsVisible = true;
           }
         "
-        class="flex-all-center h-full"
+        class="h-full tabbar-item"
       >
-        <icon type="warn" size="18px" /><text style="margin-left: 5rpx"
-          >解释</text
+        <icon type="warn" size="18px" /><view
+          style="width: 100%; text-align: center"
+          >解释</view
         >
       </view>
 
-      <view @click="goNextTopics" class="flex-all-center h-full">
-        下一题
+      <view @click="goNextTopics" class="h-full tabbar-item">
         <van-icon
           custom-style="transform: rotate(-90deg);"
           custom-class="last-subject"
           name="down"
           size="18px"
         />
+        <view style="width: 100%"> 下一题 </view>
       </view>
     </tabbar>
     <!-- #endif -->
@@ -587,6 +599,12 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.tabbar-item {
+  display:flex;
+  flex-wrap: wrap;
+  justify-content: center;
+  text-align: center;
+}
 .divider {
   width: 100%;
   height: 24rpx;
@@ -595,11 +613,8 @@ export default {
 .h-full {
   height: 100%;
 }
-.flex-all-center {
-  display: flex;
-  justify-content: center;
-  align-content: center;
-  align-items: center;
+.inline-block {
+  display: inline-block;
 }
 .flex-center {
   display: flex;

+ 37 - 17
src/pages.json

@@ -1,18 +1,16 @@
 {
   "pages": [
-    // {
-    //   "path": "pages/home/index",
-    //   "style": {
-    //     "navigationBarTitleText": "",
-    //     "navigationStyle": "custom"
-    //   }
-    // },
     {
       "path": "pages/carVideo/index",
       "style": {
         "navigationBarTitleText": "学车",
         "enablePullDownRefresh": false,
+        // #ifdef MP-WEIXIN
         "navigationStyle": "custom"
+        // #endif
+        // #ifdef MP-TOUTIAO
+        "navigationStyle": "default"
+        // #endif
       }
     },
     {
@@ -20,7 +18,12 @@
       "style": {
         "navigationBarTitleText": "学车视频",
         "enablePullDownRefresh": false,
+        // #ifdef MP-WEIXIN
         "navigationStyle": "custom"
+        // #endif
+        // #ifdef MP-TOUTIAO
+        "navigationStyle": "default"
+        // #endif
       }
     },
     {
@@ -38,7 +41,12 @@
       "path": "pages/index/index",
       "style": {
         "navigationBarTitleText": "极速生活圈",
-        "navigationStyle": "custom"
+           // #ifdef MP-WEIXIN
+           "navigationStyle": "custom"
+           // #endif
+           // #ifdef MP-TOUTIAO
+           "navigationStyle": "default"
+           // #endif
       }
     },
     {
@@ -74,7 +82,12 @@
         "navigationBarTitleText": "",
         "enablePullDownRefresh": false,
         "pageOrientation": "landscape",
+        // #ifdef MP-WEIXIN
         "navigationStyle": "custom"
+        // #endif
+        // #ifdef MP-TOUTIAO
+        "navigationStyle": "default"
+        // #endif
       }
     },
     {
@@ -83,7 +96,12 @@
         "navigationBarTitleText": "",
         "enablePullDownRefresh": false,
         "pageOrientation": "landscape",
+        // #ifdef MP-WEIXIN
         "navigationStyle": "custom"
+        // #endif
+        // #ifdef MP-TOUTIAO
+        "navigationStyle": "default"
+        // #endif
       }
     },
     {
@@ -150,8 +168,14 @@
     {
       "path": "pages/carVideo/shortVideoPaly",
       "style": {
-        "navigationStyle": "custom",
-        "disableScroll": true
+        "disableScroll": true,
+        // #ifdef MP-WEIXIN
+        "navigationStyle": "custom"
+        // #endif
+        // #ifdef MP-TOUTIAO
+        "navigationStyle": "default"
+        // #endif
+      
       }
     }
   ],
@@ -329,10 +353,7 @@
     "a": ""
     // #endif
     // #ifdef MP-TOUTIAO
-    "usingComponents": {
-    
-
-    }
+    "usingComponents": {}
     // #endif
   },
   "condition": {
@@ -382,10 +403,9 @@
         "query": "liceCar=1&liceTruck=&liceBus=&liceMoto=&name=科目一&cert=C1/C2/C3&vehicle=轿车&subject=4&title=顺序练习&sort=3&excellIssueName=新增题库"
       },
       {
-        "name":"指定的练习",
+        "name": "指定的练习",
         "path": "otherPages/specifyExercise/index",
-        "query":"liceCar=1&liceTruck=&liceBus=&liceMoto=&name=%E7%A7%91%E7%9B%AE%E4%B8%80&gs=xc&cert=C1%2FC2%2FC3&vehicle=%E8%BD%BF%E8%BD%A6&subject=1&title=%E7%B2%BE%E9%80%89%E8%80%83%E9%A2%98&sort=3&__id__=1"
-
+        "query": "liceCar=1&liceTruck=&liceBus=&liceMoto=&name=%E7%A7%91%E7%9B%AE%E4%B8%80&gs=xc&cert=C1%2FC2%2FC3&vehicle=%E8%BD%BF%E8%BD%A6&subject=1&title=%E7%B2%BE%E9%80%89%E8%80%83%E9%A2%98&sort=3&__id__=1"
       }
     ]
   }

+ 6 - 1
src/pages/carVideo/components/userInfoHead.vue

@@ -54,6 +54,10 @@ export default {
         return {};
       },
     },
+    mode:{
+      type:String,
+      default:"default"
+    }
   },
   computed: {
     jpcjUserInfo() {
@@ -91,11 +95,12 @@ export default {
   margin-left: 7px;
   height: 100%;
   display: flex;
-  justify-content: center;
+  justify-content: flex-start;
   align-items: center;
   align-content: center;
   flex-wrap: wrap;
   width: 100%;
+  padding: 15rpx 15rpx;
 }
 .diamond {
   width: 16px;

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

@@ -32,9 +32,14 @@
         <branch-two v-else :carVideoList="item.children"></branch-two>
       </van-tab>
     </van-tabs> -->
+    <!-- #ifdef MP-WEIXIN -->
     <topbar>
       <userInfoHead :userData="userData"></userInfoHead>
     </topbar>
+    <!-- #endif -->
+    <!-- #ifdef MP-TOUTIAO -->
+    <userInfoHead :userData="userData"></userInfoHead>
+    <!-- #endif -->
     <view>
       <swiper :indicator-dots="true" style="height: 200rpx">
         <swiper-item class="swiperBanner">
@@ -499,10 +504,8 @@ export default {
   },
   onReady() {
     // const query = tt.createSelectorQuery();
-
     // // 选择 ttml 中的示例按钮,并添加一个对它布局信息的查询
     // query.select("#btn").boundingClientRect();
-
     // // 选择显示区域,并查询它的滚动位置信息
     // query.selectViewport().scrollOffset();
   },

+ 4 - 1
src/store/getters.js

@@ -24,9 +24,12 @@ const getters = {
     //#ifdef MP-TOUTIAO
     // console.log(tt.getStorageSync("unionid"),state.user.userInfo)
     if(uni.getStorageSync("unionid")!==state.user.userInfo.unionId){
-     
       return false
     }
+    if(Number(state.user.userInfo.isVip)==0){
+      return false
+
+    }
     let publicKey = "-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCzR04LMmDlwyVRfK+Kgsm/vFMOFyqvGk4QIVC" +
       "Gj2CKKfhycRExm15N3tKOOouIjl/EU79It45oS+ltJkscvYrJn1zz+1bSoBLelZzJrn7K0NpHF8k" +
       "bCprsFHd60x+YJ4l8C3SDxfFebo4kqveJzx6JNZKwzFm7LPEO5XB9pEBRwIDAQAB-----END PUBLIC KEY-----"