Selaa lähdekoodia

收藏和错题修改中

zhangyujun 3 vuotta sitten
vanhempi
commit
61b4d400cf

+ 75 - 26
src/api/modules/exam.js

@@ -1,8 +1,8 @@
 import request from '../request'
 
-const exam={
+const exam = {
 	//获取顺序练习分类
-     studentQuestionInfoSelectSxQuestionInfo(params) {
+	studentQuestionInfoSelectSxQuestionInfo(params) {
 		return request({
 			url: 'student/question/info/selectSxQuestionInfo',
 			method: 'get',
@@ -10,71 +10,120 @@ const exam={
 		})
 	},
 	//获取分类专题分类
-	studentQuestionInfoSelectFlQuestionInfo(params){
+	studentQuestionInfoSelectFlQuestionInfo(params) {
 		return request({
-			url:"student/question/info/selectFlQuestionInfo",
-			method:'get',
+			url: "student/question/info/selectFlQuestionInfo",
+			method: 'get',
 			params
 		})
 	},
 	//获取地方题分类
-	studentQuestionInfoSelectDfQuestionInfo(params){
+	studentQuestionInfoSelectDfQuestionInfo(params) {
 		return request({
-			url:"student/question/info/selectDfQuestionInfo",
-			method:'get',
+			url: "student/question/info/selectDfQuestionInfo",
+			method: 'get',
 			params
 		})
 	},
 	//获取精选题目
-	studentQuestionInfoSelectJxQuestionInfo(params){
+	studentQuestionInfoSelectJxQuestionInfo(params) {
 		return request({
-			url:"student/question/info/selectJxQuestionInfo",
-			method:'get',
+			url: "student/question/info/selectJxQuestionInfo",
+			method: 'get',
 			params
 		})
 
 	},
 	//获取最大成绩,平均成绩,预测成绩
-	studentScoreInfoGetScoreInfoAll(params){
+	studentScoreInfoGetScoreInfoAll(params) {
 		return request({
-			url:"student/score/info/getScoreInfoAll",
-			method:'get',
+			url: "student/score/info/getScoreInfoAll",
+			method: 'get',
 			params
 		})
 	},
 	//查询模拟考成绩列表
-	studentScoreInfoList(params){
+	studentScoreInfoList(params) {
 		return request({
-			url:"student/score/info/list",
-			method:'get',
+			url: "student/score/info/list",
+			method: 'get',
 			params
 		})
 
 	},
 	//查询模拟考试题库
-	studentQuestionInfoSelectTestQuestionInfo(params){
+	studentQuestionInfoSelectTestQuestionInfo(params) {
 		return request({
-			url:"student/question/info/selectTestK14QuestionInfoList",
-			method:'get',
+			url: "student/question/info/selectTestK14QuestionInfoList",
+			method: 'get',
 			params
 		})
 	},
 	//查询题库
-	studentQuestionInfoList(params){
+	studentQuestionInfoList(params) {
 		return request({
-			url:"student/question/info/list",
-			method:'get',
+			url: "student/question/info/list",
+			method: 'get',
 			params
 		})
 	},
 	//新增模拟考成绩
-	studentScoreInfo(data){
+	studentScoreInfo(data) {
+		return request({
+			url: 'student/score/info',
+			method: "post",
+			data
+		})
+
+	},
+	//新增收藏
+	studentQuestionCollection(data) {
+		return request({
+			url: "student/question/collection",
+			method: "post",
+			data
+		})
+	},
+	//新增错题
+	studentQuestionWrong(data) {
 		return request({
-			url:'student/score/info',
-			method:"post",
+			url: "student/question/wrong",
+			method: "post",
+			data
+		})
+	},
+	//查询错题
+	studentQuestionWrongList(data) {
+		return request({
+			url: "student/question/wrong/list",
+			method: "get",
 			data
 		})
 
+	},
+	//查询收藏题
+	studentQuestionCollectionList(data) {
+		return request({
+			url: "student/question/collection/list",
+			method: "get",
+			data
+		})
+	},
+	//清空错题
+	studentQuestionWrongCancelAll(data) {
+		return request({
+			url: "student/question/wrong/cancelAll",
+			method: "DELETE",
+			data
+		})
+	},
+	//清空收藏题
+	studentQuestionCollectionCancelAll(data) {
+		return request({
+			url: "student/question/collection/cancelAll",
+			method: "DELETE",
+			data
+		})
 	}
 }
 

+ 1 - 1
src/api/request.js

@@ -15,7 +15,7 @@ const service = axios.create({
 	baseURL: process.env.NODE_ENV === 'development' ? 'https://jpcj-admin1.zzxcx.net/stage-api' : 'https://jpcj-admin.zzxcx.net/prod-api',
 	//#endif
 	//#ifdef MP-TOUTIAO
-	baseURL: process.env.NODE_ENV === 'development' ? 'https://sdjk-admin1.zzxcx.net/stage-api' : 'https://sdjk-admin1.zzxcx.net/stage-api',
+	baseURL: process.env.NODE_ENV === 'development' ? 'https://sdjk-admin1.zzxcx.net/stage-api' : 'https://sdjk-admin.zzxcx.net/prod-api',
 	//#endif
 })
 mock.init(service)

BIN
src/assets/img/collectionBg.png


BIN
src/assets/img/collectionBottomBg.png


BIN
src/assets/img/collectionHeader.png


BIN
src/assets/img/goArrow.png


BIN
src/assets/img/wrongBg.png


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

@@ -90,27 +90,27 @@ export default {
 <style lang="scss" scoped>
 .cell-box {
   display: flex;
-  padding: 5px 15px;
+  padding: 10rpx 30rpx;
   flex-wrap: wrap;
   justify-content: space-between;
   .cell {
-    width: 167px;
-    margin-top: 10px;
-    box-shadow: 0px 0px 10px rgba(124, 129, 136, 0.2);
+    width: 334rpx;
+    margin-top: 20rpx;
+    box-shadow: 0rpx 0rpx 10rpx rgba(124, 129, 136, 0.2);
   }
   .icon {
-    width: 20px;
-    height: 20px;
+    width: 40rpx;
+    height: 40rpx;
     background: #498ef5;
     border-radius: 50%;
     font-weight: 500;
     font-family: PingFang SC;
-    font-size: 13px;
+    font-size: 26rpx;
     display: flex;
     justify-content: center;
     align-items: center;
     color: #ffffff;
-    margin-right: 5px;
+    margin-right: 10rpx;
   }
 }
 </style>

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

@@ -74,29 +74,29 @@ export default {
 <style lang="scss" scoped>
 .cell-box {
   display: flex;
-  padding: 5px 15px;
+  padding: 10rpx 30rpx;
   flex-wrap: wrap;
   justify-content: space-between;
   .cell {
-    width: 167px;
-    margin-top: 10px;
-    box-shadow: 0px 0px 10px rgba(124, 129, 136, 0.2);
+    width: 334rpx;
+    margin-top: 20rpx;
+    box-shadow: 0rpx 0rpx 20rpx rgba(124, 129, 136, 0.2);
     background: #fff;
   }
   //地区
   .icon {
-    width: 20px;
-    height: 20px;
+    width: 40rpx;
+    height: 40rpx;
     background: #498ef5;
     border-radius: 50%;
     font-weight: 500;
     font-family: PingFang SC;
-    font-size: 13px;
+    font-size: 26rpx;
     display: flex;
     justify-content: center;
     align-items: center;
     color: #ffffff;
-    margin-right: 5px;
+    margin-right: 10rpx;
   }
 }
 </style>

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

@@ -110,7 +110,7 @@ export default {
 }
 .cell-box {
   display: flex;
-  padding: 5px 15px;
+  padding: 10rpx 30rpx;
   flex-wrap: wrap;
   justify-content: space-between;
   > view {
@@ -120,7 +120,7 @@ export default {
   .cell {
     width: 100%;
 
-    line-height: 28px;
+    line-height: 56rpx;
 
     // box-shadow: 0px 0px 10px rgba(124, 129, 136, 0.2);
   }

+ 186 - 53
src/otherPages/collection/index.vue

@@ -1,76 +1,209 @@
 <template>
   <div class="collection-box">
-    <view class="header">
-      <view class="title">
-        <span :class="{ active: isType == 0 }" @click="isType = 0">做错题</span>
-        <span :class="{ active: isType == 1 }" @click="isType = 1">收藏题</span>
-      </view>
-    </view>
-    <swiper :current="isType" :duration="500">
-      <swiper-item>
-        <scroll-view :scroll-y="true"> </scroll-view>
-      </swiper-item>
-      <swiper-item>
-        <scroll-view :scroll-y="true"> </scroll-view>
-      </swiper-item>
-    </swiper>
+    <div>
+      <img class="collectionHeader" mode="widthFix" :src="collectionHeader" />
+    </div>
+    <div class="choose">
+      <div class="choose-img">
+        <span class="choose-text1"> 做错题 </span>
+        <span class="choose-text2"> 共 {{ wrongList.length }} 题 </span>
+        <image mode="widthFix" class="bg" :src="wrongBg" />
+        <image mode="widthFix" class="goArrow" :src="goArrow" />
+        <button
+          @click="clearTopics('wrong')"
+          style="color: #498ef5"
+          class="clear"
+        >
+          清空错题
+        </button>
+      </div>
+      <div class="choose-img">
+        <span class="choose-text1">收藏题</span>
+        <span class="choose-text2"> 共 {{ collectionList.length }} 题 </span>
+        <image mode="widthFix" class="bg" :src="collectionBg" />
+        <image mode="widthFix" class="goArrow" :src="goArrow" />
+        <button
+          @click="clearTopics('collection')"
+          style="color: #01c18d"
+          class="clear"
+        >
+          清空收藏
+        </button>
+      </div>
+    </div>
+    <div class="bottom">
+      <image mode="widthFix" :src="collectionBottomBg" />
+    </div>
+    <!-- <van-swipe ref="swiper" :show-indicators="false" :touchable="false">
+      <van-swipe-item> <listCom type="wrong" /> </van-swipe-item>
+      <van-swipe-item> <listCom type="collection" /> </van-swipe-item>
+    </van-swipe> -->
   </div>
 </template>
 
-<script >
+<script>
+import collectionHeader from "@/assets/img/collectionHeader.png";
+import collectionBg from "@/assets/img/collectionBg.png";
+import wrongBg from "@/assets/img/wrongBg.png";
+import collectionBottomBg from "@/assets/img/collectionBottomBg.png";
+import goArrow from "@/assets/img/goArrow.png";
+import api from "@/api/index";
 export default {
   data() {
     return {
-      isType: 0,
+      wrongBg,
+      collectionBottomBg,
+      goArrow,
+      collectionBg,
+      collectionHeader,
+      query: {},
+      gsMap: {
+        xc: "小车",
+        hc: "货车",
+        mtc: "摩托车",
+        kc: "客车",
+      },
+      wrongList: [],
+      collectionList: [],
     };
   },
+  onLoad(query) {
+    this.query = query;
+    api.exam
+      .studentQuestionWrongList({
+        carType: this.gsMap[query.gs],
+        km: query.subject === "1" ? "科目一" : "科目四",
+        pageNum: 1,
+        pageSize: 10000,
+      })
+      .then((res) => {
+        this.wrongList = res.rows;
+      });
+  },
   methods: {
-    onClickLeft() {},
+    clearTopics(type) {
+      let that = this;
+      if (type === "wrong") {
+        uni.showModal({
+          title: "是否清空错题",
+          success(res) {
+            if (res.confirm) {
+              api.exam
+                .studentQuestionWrongCancelAll({
+                  carType: that.gsMap[that.query.gs],
+                  km: that.query.subject === "1" ? "科目一" : "科目四",
+                })
+                .then((res) => {
+                  api.exam
+                    .studentQuestionWrongList({
+                      carType: that.gsMap[that.query.gs],
+                      km: that.query.subject === "1" ? "科目一" : "科目四",
+                      pageNum: 1,
+                      pageSize: 10000,
+                    })
+                    .then((res) => {
+                      that.wrongList = res.rows;
+                    });
+                });
+            }
+          },
+        });
+      } else if (type === "collection") {
+        uni.showModal({
+          title: "是否清空收藏题",
+          success(res) {
+            if (res.confirm) {
+              api.exam
+                .studentQuestionCollectionCancelAll({
+                  carType: that.gsMap[that.query.gs],
+                  km: that.query.subject === "1" ? "科目一" : "科目四",
+                })
+                .then((res) => {
+                  api.exam
+                    .studentQuestionCollectionList({
+                      carType: that.gsMap[that.query.gs],
+                      km: that.query.subject === "1" ? "科目一" : "科目四",
+                      pageNum: 1,
+                      pageSize: 10000,
+                    })
+                    .then((res) => {
+                      that.collectionList = res.rows;
+                    });
+                });
+            }
+          },
+        });
+      }
+    },
   },
-  components: {},
 };
 </script>
 
 <style lang="scss" scoped>
-.collection-box {
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-  background: #fff;
+.bottom {
+  bottom: 0;
+  image {
+    width: 100%;
+  }
 }
-.header {
+.choose {
   width: 100%;
-  border-bottom: 2rpx solid #dddddd;
-  padding-bottom: 15rpx;
-  .title {
-    display: flex;
-    width: 260rpx;
-    margin: 0 auto;
-    justify-content: space-between;
-    align-items: center;
-    span {
-      font-size: 15px;
-      font-family: PingFang SC;
-      font-weight: 400;
-      line-height: 13px;
-      color: #0a1a33;
-      position: relative;
-      padding: 8px;
+  display: flex;
+  justify-content: center;
+  align-content: space-between;
+  align-items: space-between;
+  flex-wrap: wrap;
+  transform: translate(0%, -8%);
+
+  .choose-img {
+    width: 690rpx;
+    position: relative;
+    margin-bottom: 25rpx;
+    .bg {
+      width: 690rpx;
     }
-    .active {
-      &:after {
-        position: absolute;
-        content: "";
-        width: 20px;
-        height: 4px;
-        border-radius: 3px;
-        background-color: #498ef5;
-        bottom: 0;
-        left: 50%;
-        transform: translateX(-50%);
-        z-index: 100;
-      }
+    .clear {
+      background: #fff;
+      border-radius: 30rpx;
+      position: absolute;
+      bottom: 40rpx;
+      width: 200rpx;
+      height: 60rpx;
+      left: 40rpx;
+      bottom: 40rpx;
+      border: 0;
+      font-size: 26rpx;
+    }
+    .goArrow {
+      position: absolute;
+      top: 64rpx;
+      right: 40rpx;
+      width: 146rpx;
+    }
+    .choose-text1 {
+      position: absolute;
+      font-size: 50rpx;
+      color: #fff;
+      left: 40rpx;
+      top: 40rpx;
+    }
+    .choose-text2 {
+      position: absolute;
+      top: 112rpx;
+      left: 44rpx;
+      color: #fff;
+    }
+    img {
+      width: 100%;
     }
   }
 }
+.collectionHeader {
+  width: 100%;
+}
+.collection-box {
+  height: 100vh;
+  display: flex;
+  flex-direction: column;
+}
 </style>

+ 9 - 0
src/otherPages/exercise/components/explainJs.vue

@@ -40,6 +40,15 @@ export default {
       let audio = utils.wxUtils.getGlobAudio();
       audio.stop();
       audio.src = this.explainjsmp3;
+      audio.onCanplay(() => {
+        console.log("onCanplay");
+      });
+      audio.onPlay(() => {
+        console.log("onPlay");
+      });
+      audio.onError((res) => {
+        console.log(res);
+      });
       //体验比较好
       setTimeout(() => {
         audio.play();

+ 34 - 11
src/otherPages/exercise/index.vue

@@ -301,7 +301,7 @@
           }}</text>
           <text
             v-if="item.isAnswer && !item.selected"
-            class="problem-op_green"
+            class="problem-op_green problem-op "
             >{{ numberToLetter(index) }}</text
           >
           <text class="problem-opAnswer">{{ item.value }}</text>
@@ -478,6 +478,12 @@ export default {
         subject: "",
         title: "",
       },
+      gsMap: {
+        xc: "小车",
+        hc: "货车",
+        mtc: "摩托车",
+        kc: "客车",
+      },
       trueNum: 0,
       falseNum: 0,
       currentOptions: [
@@ -712,6 +718,11 @@ export default {
         this.trueNum++;
       } else {
         this.falseNum++;
+        api.exam.studentQuestionWrong({
+          questionId: this.problemList[this.problemListIndex].id,
+          carType: this.gsMap[this.query.gs],
+          km: this.query.subject === "4" ? "科目四" : "科目一",
+        });
       }
       // this.problemList[this.problemListIndex]
     },
@@ -756,13 +767,18 @@ export default {
         }
       });
       //#endif
-      this.problemList[this.problemListIndex].answer
-        .split("-")
-        .sort()
-        .toString() ===
-      this.problemList[this.problemListIndex].userAnswer.sort().toString()
-        ? (this.trueNum = this.trueNum + 1)
-        : (this.falseNum = this.falseNum + 1);
+      if (
+        this.problemList[this.problemListIndex].answer
+          .split("-")
+          .sort()
+          .toString() ===
+        this.problemList[this.problemListIndex].userAnswer.sort().toString()
+      ) {
+        this.trueNum = this.trueNum + 1;
+      } else {
+        this.falseNum = this.falseNum + 1;
+      
+      }
     },
     changeRadioGroup(e) {
       console.log(e, "changeRadioGroup");
@@ -808,9 +824,16 @@ export default {
           );
         }
       });
-      e.detail.value === this.problemList[this.problemListIndex].answer
-        ? (this.trueNum = this.trueNum + 1)
-        : (this.falseNum = this.falseNum + 1);
+      if (e.detail.value === this.problemList[this.problemListIndex].answer) {
+        this.trueNum = this.trueNum + 1;
+      } else {
+        this.falseNum = this.falseNum + 1;
+        api.exam.studentQuestionWrong({
+          questionId: this.problemList[this.problemListIndex].id,
+          carType: this.gsMap[this.query.gs],
+          km: this.query.subject === "4" ? "科目四" : "科目一",
+        });
+      }
 
       //#endif
     },

+ 65 - 7
src/otherPages/mockExam/index.vue

@@ -141,9 +141,10 @@
           }}</text>
           <text
             v-if="item.isAnswer && !item.selected"
-            class="problem-op_green"
+            class="problem-op problem-op_green"
             >{{ numberToLetter(index) }}</text
           >
+          <view style="width: 8px"></view>
           <text class="problem-opAnswer">{{ item.value }}</text>
         </view>
       </view>
@@ -174,7 +175,7 @@
           >
           </m-checkbox>
         </m-checkbox-group>
-        <!-- <view class="flex-center">
+        <view class="flex-center">
           <van-button
             @click="confirmMult"
             color="#498ef5"
@@ -183,7 +184,7 @@
             type="primary"
             >确定</van-button
           >
-        </view> -->
+        </view>
       </view>
       <view
         v-if="
@@ -214,9 +215,10 @@
           }}</text>
           <text
             v-if="item.isAnswer && !item.selected"
-            class="problem-op_green"
+            class="problem-op problem-op_green"
             >{{ numberToLetter(index) }}</text
           >
+          <view style="width: 8px"></view>
           <text class="problem-opAnswer">{{ item.value }}</text>
         </view>
       </view>
@@ -335,6 +337,12 @@ export default {
         subject: "",
         title: "",
       },
+      gsMap: {
+        xc: "小车",
+        hc: "货车",
+        mtc: "摩托车",
+        kc: "客车",
+      },
       examTimer: 0,
       examTimeUse: 0,
       time: 45 * 60 * 1000,
@@ -419,6 +427,26 @@ export default {
     },
   },
   methods: {
+    confirmMult() {
+      this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
+      if (
+        JSON.stringify(
+          this.problemList[this.problemListIndex].answer.split("-").sort()
+        ) ===
+        JSON.stringify(
+          this.problemList[this.problemListIndex].userAnswer.sort()
+        )
+      ) {
+        this.trueNum++;
+      } else {
+        this.falseNum++;
+        api.exam.studentQuestionWrong({
+          questionId: this.problemList[this.problemListIndex].id,
+          carType: this.gsMap[this.query.gs],
+          km: this.query.subject === "4" ? "科目四" : "科目一",
+        });
+      }
+    },
     touchStart(e) {
       var that = this;
 
@@ -467,8 +495,8 @@ export default {
       let score = 0;
       let query = this.query;
       let that = this;
-      let scorePerQuestion = 0
-      query.subject === "4"?scorePerQuestion=2:scorePerQuestion=1
+      let scorePerQuestion = 0;
+      query.subject === "4" ? (scorePerQuestion = 2) : (scorePerQuestion = 1);
       this.problemList.forEach((item, index) => {
         if (
           typeof item.userAnswer == "object" &&
@@ -484,7 +512,9 @@ export default {
             score = score + scorePerQuestion;
           }
         } else if (typeof item.userAnswer == "string") {
-          item.answer === item.userAnswer ? (score = score + scorePerQuestion) : "";
+          item.answer === item.userAnswer
+            ? (score = score + scorePerQuestion)
+            : "";
         }
       });
       uni.showModal({
@@ -544,6 +574,15 @@ export default {
         "userAnswer",
         e.detail
       );
+      //错题
+      if (e.detail !== this.problemList[this.problemListIndex].answer) {
+        api.exam.studentQuestionWrong({
+          questionId: this.problemList[this.problemListIndex].id,
+          carType: this.gsMap[this.query.gs],
+          km: this.query.subject === "4" ? "科目四" : "科目一",
+        });
+      }
+
       this.problemList[this.problemListIndex].optsArr.forEach((item, index) => {
         if (e.detail === item.value) {
           item.selected = true;
@@ -561,6 +600,7 @@ export default {
           );
         }
       });
+      this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
       // this.problemList[this.problemListIndex].optsArr.forEach((item) => {
       //   if (e.detail.value === item.value) {
       //     item.selected = true;
@@ -726,6 +766,13 @@ export default {
     .problem-issue {
       font-size: 42rpx;
     }
+    .problem-select {
+      display: flex;
+      align-content: center;
+      align-items: center;
+      margin-top: 15rpx;
+      padding-left: 30rpx;
+    }
     .problem-type {
       padding-left: 10rpx;
       padding-right: 10rpx;
@@ -755,6 +802,17 @@ export default {
       background: #fff;
       box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.16);
     }
+    .problem-op_green {
+      width: 75rpx;
+      height: 75rpx;
+      line-height: 75rpx;
+      border-radius: 50%;
+      text-align: center;
+      overflow: hidden;
+      background: #01c18d;
+
+      box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.16);
+    }
     .problem-op_selected {
       background: #498ef5;
     }

+ 19 - 5
src/pages/carVideo/components/userInfoHead.vue

@@ -1,7 +1,12 @@
 <template>
   <view class="box">
-    <image class="headImage" :src="userData.headImage"></image>
-    <view style="margin-left: 10px" class="">{{ userData.nickName }}</view>
+    <image
+      class="headImage"
+      v-if="userData.headImage"
+      :src="userData.headImage"
+    ></image>
+    <image class="headImage" v-else :src="unLoginHead"></image>
+    <view style="margin-left: 10px" class="">{{ userData.nickName?userData.nickName:'新用户' }}</view>
     <view
       @click="goBuyVip"
       v-if="!isVip"
@@ -9,9 +14,14 @@
       >开通VIP</view
     >
     <!-- <view v-if="isVip" style="color: #0a1a33; margin-left: 10px">VIP会员</view> -->
-    <view  @click="goBuyVip" v-if="isVip" style="color: #0a1a33; margin-left: 10px">{{expireTime}}</view>
+    <view
+      @click="goBuyVip"
+      v-if="isVip"
+      style="color: #0a1a33; margin-left: 10px"
+      >{{ expireTime }}</view
+    >
     <image
-     @click="goBuyVip"
+      @click="goBuyVip"
       v-if="isVip"
       style="margin-left: 8px"
       class="diamond"
@@ -28,11 +38,13 @@
 </template>
 
 <script>
+import unLoginHead from "@/assets/img/unLoginHead.png";
 export default {
   data() {
     return {
       diamond: require("@/assets/img/diamond.png"),
       diamondGray: require("@/assets/img/diamond_gray.png"),
+      unLoginHead,
     };
   },
   props: {
@@ -48,7 +60,9 @@ export default {
       return this.$store.state.user.jpcjUserInfo || {};
     },
     expireTime() {
-      return this.$store.state.user.userInfo.expireTime?this.$store.state.user.userInfo.expireTime.split(/\s+/)[0]:"";
+      return this.$store.state.user.userInfo.expireTime
+        ? this.$store.state.user.userInfo.expireTime.split(/\s+/)[0]
+        : "";
     },
     isVip() {
       console.log(this.$store.getters.isVip);

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

@@ -374,7 +374,7 @@ export default {
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/WrongTopicCollection@2x.png",
         text: "错题·收藏",
-        path: "/otherPages/marked/index?markdown=考前须知",
+        path: "/otherPages/collection/index",
       },
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/NotesBeforeExamination@2x.png",
@@ -498,13 +498,13 @@ export default {
     },
   },
   onReady() {
-    const query = tt.createSelectorQuery();
+    // const query = tt.createSelectorQuery();
 
-    // 选择 ttml 中的示例按钮,并添加一个对它布局信息的查询
-    query.select("#btn").boundingClientRect();
+    // // 选择 ttml 中的示例按钮,并添加一个对它布局信息的查询
+    // query.select("#btn").boundingClientRect();
 
-    // 选择显示区域,并查询它的滚动位置信息
-    query.selectViewport().scrollOffset();
+    // // 选择显示区域,并查询它的滚动位置信息
+    // query.selectViewport().scrollOffset();
   },
 
   async mounted() {

+ 52 - 39
src/pages/user/index.vue

@@ -1,29 +1,29 @@
 <template>
   <scroll-view scroll-y class="content">
     <div class="user">
-      <van-cell center :value="userInfo.nickName?userInfo.nickName:'新用户'" @tap="getUserProfile">
+      <van-cell
+        center
+        :value="userInfo.nickName ? userInfo.nickName : '新用户'"
+        @tap="getUserProfile"
+      >
         <view slot="title">
           <image
             class="user-headImg"
             v-if="userInfo.headImage"
             :src="userInfo.headImage"
           ></image>
-          <image
-            class="user-headImg"
-            v-else
-            :src="unLoginHead"
-          ></image>
+          <image class="user-headImg" v-else :src="unLoginHead"></image>
         </view>
       </van-cell>
-      <van-cell-group class="group">
-        <!-- <van-cell title="我要提现" value="" is-link center @click="goCashOut">
+
+      <!-- <van-cell title="我要提现" value="" is-link center @click="goCashOut">
         </van-cell> -->
-        <!-- <van-cell title="我的下级" value="" is-link center @click="goMyBranch">
+      <!-- <van-cell title="我的下级" value="" is-link center @click="goMyBranch">
 				<template #icon>
 					<m-icon type="hyyxq" class="cell-icon" />
 				</template>
 			</van-cell> -->
-        <!-- <van-cell
+      <!-- <van-cell
           title="我的推广积分"
           value=""
           is-link
@@ -31,28 +31,41 @@
           @click="goMyIntegral"
         >
         </van-cell> -->
-        <van-cell
-          title="会员有效期"
-          :value="expireTime ? expireTime : '开通会员'"
-          is-link
-          center
-          url="/otherPages/buyVip/index"
-        >
-        </van-cell>
-      </van-cell-group>
       <!-- #ifdef MP-WEIXIN -->
-      <van-cell-group class="group">
-        <van-cell
-          title="反馈帮助"
-          is-link
-          center
-          url="/pages/webview/webview?src=https://support.qq.com/product/359609"
-        >
-          <template #icon>
-            <m-icon type="fkbz" class="cell-icon" />
-          </template>
-        </van-cell>
-      </van-cell-group>
+      <van-cell
+        title="会员有效期"
+        :value="expireTime ? expireTime : '开通会员'"
+        is-link
+        center
+        url="/otherPages/buyVip/index"
+      >
+      </van-cell>
+
+      <!-- #endif -->
+      <!-- #ifdef MP-TOUTIAO -->
+      <van-cell
+        title="会员有效期"
+        :value="isVip ? '已开通' : '开通会员'"
+        is-link
+        center
+        url="/otherPages/buyVip/index"
+      >
+      </van-cell>
+
+      <!-- #endif -->
+      <!-- #ifdef MP-WEIXIN -->
+
+      <van-cell
+        title="反馈帮助"
+        is-link
+        center
+        url="/pages/webview/webview?src=https://support.qq.com/product/359609"
+      >
+        <template #icon>
+          <m-icon type="fkbz" class="cell-icon" />
+        </template>
+      </van-cell>
+
       <!-- #endif -->
     </div>
 
@@ -64,11 +77,11 @@
 
 <script>
 import api from "@/api/index";
-import unLoginHead from "@/assets/img/unLoginHead.png"
+import unLoginHead from "@/assets/img/unLoginHead.png";
 export default {
   computed: {
-    unLoginHead(){
-      return unLoginHead
+    unLoginHead() {
+      return unLoginHead;
     },
     userInfo() {
       return this.$store.state.user.userInfo;
@@ -79,13 +92,16 @@ export default {
         ? this.$store.state.user.userInfo.expireTime.split(" ")[0]
         : null;
     },
+    isVip() {
+      return this.$store.getters.isVip;
+    },
   },
   mounted() {
     this.$store.dispatch("GetInfo");
   },
   methods: {
     getUserProfile(e) {
-      let that =this
+      let that = this;
       uni.getUserProfile({
         desc: "业务需要",
         success(res) {
@@ -96,10 +112,7 @@ export default {
               nickName: res.userInfo.nickName,
             })
             .then((res) => {
-               that.$store.dispatch("GetInfo");
-            
-            
-
+              that.$store.dispatch("GetInfo");
             });
         },
       });

+ 1 - 0
src/utils/modules/wx.js

@@ -1,4 +1,5 @@
 let globAudio = uni.createInnerAudioContext()
+globAudio.obeyMuteSwitch = false
 const wxUtils = {
 	//返回全局的audio实例
 	getGlobAudio() {