Sfoglia il codice sorgente

首页基本完成,去除电影的页面的路由注册,代码仍然保留1

zhangyujun 3 anni fa
parent
commit
8a54f2ff8c

+ 95 - 89
package-lock.json

@@ -3028,44 +3028,6 @@
           "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
           "dev": true
         },
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true,
-          "optional": true
-        },
         "globby": {
           "version": "9.2.0",
           "resolved": "https://registry.npm.taobao.org/globby/download/globby-9.2.0.tgz?cache=0&sync_timestamp=1616407139482&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobby%2Fdownload%2Fglobby-9.2.0.tgz",
@@ -3082,13 +3044,6 @@
             "slash": "^2.0.0"
           }
         },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
         "hash-sum": {
           "version": "2.0.0",
           "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz",
@@ -3101,28 +3056,6 @@
           "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=",
           "dev": true
         },
-        "json5": {
-          "version": "2.2.0",
-          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
-          "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "minimist": "^1.2.5"
-          }
-        },
-        "loader-utils": {
-          "version": "2.0.2",
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
-          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
         "slash": {
           "version": "2.0.0",
           "resolved": "https://registry.npm.taobao.org/slash/download/slash-2.0.0.tgz?cache=0&sync_timestamp=1618384508676&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fslash%2Fdownload%2Fslash-2.0.0.tgz",
@@ -3137,28 +3070,6 @@
           "requires": {
             "minipass": "^3.1.1"
           }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
-        "vue-loader-v16": {
-          "version": "npm:vue-loader@16.8.3",
-          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
-          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chalk": "^4.1.0",
-            "hash-sum": "^2.0.0",
-            "loader-utils": "^2.0.0"
-          }
         }
       }
     },
@@ -15652,6 +15563,101 @@
         "vue-style-loader": "^4.1.0"
       }
     },
+    "vue-loader-v16": {
+      "version": "npm:vue-loader@16.8.3",
+      "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
+      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chalk": "^4.1.0",
+        "hash-sum": "^2.0.0",
+        "loader-utils": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "hash-sum": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz",
+          "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
+          "dev": true,
+          "optional": true
+        },
+        "json5": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.1.tgz",
+          "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz",
+          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
     "vue-style-loader": {
       "version": "4.1.3",
       "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.3.tgz",

+ 4 - 1
src/api/modules/carVideo.js

@@ -9,6 +9,7 @@ const cleanData = (item) => {
 		cover: item.coverFileUrl,
 		title: item.title,
 		remarks: item.videoDescribe,
+		permission:item.permission,
 		duration: dayjs(item.videoDuration * 1000).subtract(8, 'hour').format('HH:mm:ss'),
 	}
 }
@@ -52,7 +53,7 @@ class CarVideo {
 	 */
 	async getCarVideoList(id) {
 		let res = await request({
-			url: `open-api/teachingVideo/info/getTeachingVideoByTypeId`,
+			url: `https://zzjs.zzxcx.net/prod-api/open-api/teachingVideo/info/getTeachingVideoByTypeId`,
 			params: {
 				videoTypeId: id
 			}
@@ -64,6 +65,7 @@ class CarVideo {
 				videoUrl: item.fileUrl,
 				cover: item.coverFileUrl,
 				title: item.title,
+				permission:item.permission,
 				remarks: item.videoDescribe,
 				duration: dayjs(item.videoDuration * 1000).subtract(8, 'hour').format(
 					'HH:mm:ss'),
@@ -87,6 +89,7 @@ class CarVideo {
 			newObj.id = obj.id
 			newObj.children = obj.children.map(mapFn)
 			newObj.list = obj.videos.map(cleanData)
+
 			return newObj
 		}
 

+ 1 - 1
src/api/modules/user.js

@@ -8,7 +8,7 @@ const user = {
 	async login() {
 		let res = await wx.login()
 		return request({
-			url: 'https://jpcj-admin1.zzxcx.net/twzd-admin/login/jscode',
+			url: `${process.env.NODE_ENV==='development'?'https://jpcj-admin1.zzxcx.net/twzd-admin':'https://jpcj-admin.zzxcx.net/twzd-admin'}/login/jscode`,
 			method: 'post',
 			params: {
 				jscode: res.code

BIN
src/assets/img/backArrow1.png


BIN
src/assets/img/leftArrow1.png


BIN
src/assets/img/shikan.png


BIN
src/assets/img/vip.png


+ 101 - 77
src/components/m-video-leftright/m-video-leftright.vue

@@ -1,89 +1,113 @@
 <template>
-	<view class="video-item" @click="gotoPaly">
-		<view class="img-box">
-			<image class="image" :src="carVideoItem.cover" mode="aspectFill"></image>
-			<m-icon class="icon" type="bofangshipin"></m-icon>
-		</view>
-		<view class="tit-box">
-			<text>{{carVideoItem.title}}</text>
-			<text>{{carVideoItem.duration}}</text>
-		</view>
-	</view>
+  <view class="video-item" @click="gotoPaly">
+    <view class="img-box">
+      <image class="image" :src="carVideoItem.cover" mode="aspectFill"></image>
+      <m-icon class="icon" type="bofangshipin"></m-icon>
+      <image
+        v-if="carVideoItem.permission == 2"
+        class="img-tip"
+        :src="vip"
+      ></image>
+      <image
+        v-if="carVideoItem.permission == 1"
+        class="img-tip"
+        :src="shikan"
+      ></image>
+    </view>
+    <view class="tit-box">
+      <text>{{ carVideoItem.title }}</text>
+      <text>{{ carVideoItem.duration }}</text>
+    </view>
+  </view>
 </template>
 
 <script>
-	export default {
-		props: {
-			carVideoItem: {
-				type: Object,
-				default: {}
-			},
-			palyObj: {
-				type: Object,
-				default: null
-			}
-		},
-		name: "m-video-leftright",
-		data() {
-			return {
-
-			};
-		},
-		methods:{
-			gotoPaly(){
-				if(!this.palyObj){
-					this.$utils.route.goPage('/pages/carVideo/play',null,{carVideoItem:this.carVideoItem})
-				}else{
-					this.$emit('click')
-				}
-			}
-		}
-	}
+import shikan from "@/assets/img/shikan.png";
+import vip from "@/assets/img/vip.png";
+export default {
+  props: {
+    carVideoItem: {
+      type: Object,
+      default: {},
+    },
+    palyObj: {
+      type: Object,
+      default: null,
+    },
+  },
+  name: "m-video-leftright",
+  mounted () {
+	  console.log(this.carVideoItem);
+  },
+  data() {
+    return {
+		shikan,
+		vip
+	};
+  },
+  methods: {
+    gotoPaly() {
+      if (!this.palyObj) {
+        this.$utils.route.goPage("/pages/carVideo/play", null, {
+          carVideoItem: this.carVideoItem,
+        });
+      } else {
+        this.$emit("click");
+      }
+    },
+  },
+};
 </script>
 
 <style lang="scss">
-	.video-item {
-		display: flex;
-		margin: 20rpx;
-
-		.img-box {
-			flex-shrink: 0;
-			width: 240rpx;
-			height: 160rpx;
-			position: relative;
+.video-item {
+  display: flex;
+  margin: 20rpx;
 
-			.image {
-				width: 100%;
-				height: 100%;
-			}
-			.icon {
-				position: absolute;
-				left: 50%;
-				top: 50%;
-				transform: translate(-50%, -50%);
-			}
-		}
+  .img-box {
+    flex-shrink: 0;
+    width: 240rpx;
+    height: 160rpx;
+    position: relative;
+    .img-tip {
+      position: absolute;
+      top: 10rpx;
+      right: 10rpx;
+      width: 50rpx;
+      height: 28rpx;
+    }
 
+    .image {
+      width: 100%;
+      height: 100%;
+    }
+    .icon {
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%, -50%);
+    }
+  }
 
-		.tit-box {
-			display: flex;
-			flex-direction: column;
-			justify-content: space-between;
-			padding: 16rpx 16rpx;
+  .tit-box {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    padding: 16rpx 16rpx;
 
-			text {
-				&:nth-child(1) {
-					font-size: 30rpx;
-					font-weight: 400;
-					color: #0F0404;
-				}
+    text {
+      &:nth-child(1) {
+        font-size: 30rpx;
+        font-weight: 400;
+        color: #0f0404;
+      }
 
-				&:nth-child(2) {
-					font-size: 26rpx;
-					font-weight: 400;
-					color: #999999;
-				}
-			}
-		}
-	}
-</style>
+      &:nth-child(2) {
+        font-size: 26rpx;
+        font-weight: 400;
+        color: #999999;
+      }
+    }
+  }
+}
+</style>

+ 111 - 85
src/components/m-video-topbottom/m-video-topbottom.vue

@@ -1,98 +1,124 @@
 <template>
-	<view class="video-item ^video-item" :style="{width: `${(750-30*column-30)/column}rpx`}"
-		@click="gotoPaly">
-		<view class="image-box">
-			<view class="img-box">
-				<image class="image" :src="carVideoItem.cover" mode="aspectFill"></image>
-			</view>
-			<text>{{carVideoItem.duration}}</text>
-			<m-icon class="icon" type="bofangshipin"></m-icon>
-		</view>
-		<text>{{carVideoItem.title}}</text>
-	</view>
+  <view
+    class="video-item ^video-item"
+    :style="{ width: `${(750 - 30 * column - 30) / column}rpx` }"
+    @click="gotoPaly"
+  >
+    <view class="image-box">
+      <view class="img-box">
+        <image
+          class="image"
+          :src="carVideoItem.cover"
+          mode="aspectFill"
+        ></image>
+      </view>
+      <image v-if="carVideoItem.permission==2" class="img-tip" :src="vip"></image>
+      <image v-if="carVideoItem.permission==1" class="img-tip" :src="shikan"></image>
+      <text>{{ carVideoItem.duration }}</text>
+      <m-icon class="icon" type="bofangshipin"></m-icon>
+    </view>
+    <text>{{ carVideoItem.title }}</text>
+  </view>
 </template>
 
 <script>
-	export default {
-		props: {
-			carVideoItem: {
-				type: Object,
-				default: {}
-			},
-			column: {
-				type: Number,
-				default: 2
-			},
-			palyObj: {
-				type: Object,
-				default: null
-			}
-		},
-		name: "m-video-topbottom",
-		methods:{
-			gotoPaly(){
-				if(!this.palyObj){
-					this.$utils.route.goPage('/pages/carVideo/play',null,{carVideoItem:this.carVideoItem})
-				}else{
-					this.$emit('click')
-				}
-			}
-		}
-	}
+import shikan from "@/assets/img/shikan.png";
+import vip from "@/assets/img/vip.png";
+export default {
+  data() {
+    return {
+      shikan: shikan,
+      vip: vip,
+    };
+  },
+  props: {
+    carVideoItem: {
+      type: Object,
+      default: {},
+    },
+    column: {
+      type: Number,
+      default: 2,
+    },
+    palyObj: {
+      type: Object,
+      default: null,
+    },
+  },
+  name: "m-video-topbottom",
+  mounted() {
+    console.log(this.carVideoItem);
+  },
+  methods: {
+    gotoPaly() {
+      if (!this.palyObj) {
+        this.$utils.route.goPage("/pages/carVideo/play", null, {
+          carVideoItem: this.carVideoItem,
+        });
+      } else {
+        this.$emit("click");
+      }
+    },
+  },
+};
 </script>
 
 <style lang="scss">
-	.video-item {
-		margin-right: 30rpx;
-		margin-top: 30rpx;
-		position: relative;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		text-align: center;
+.video-item {
+  margin-right: 30rpx;
+  margin-top: 30rpx;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  text-align: center;
 
-		.image-box {
-			position: relative;
+  .image-box {
+    position: relative;
+    .img-tip {
+      position: absolute;
+      top: 10rpx;
+      right: 10rpx;
+      width: 50rpx;
+      height: 28rpx;
+    }
+    .img-box {
+      width: 100%;
+      padding-bottom: 64%;
+      position: relative;
 
-			.img-box {
-				width: 100%;
-				padding-bottom: 64%;
-				position: relative;
+      .image {
+        position: absolute;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 100%;
+      }
+    }
 
-				.image {
-					position: absolute;
-					left: 0;
-					top: 0;
-					width: 100%;
-					height: 100%;
-				}
-			}
+    text {
+      position: absolute;
+      color: #8a9099;
+      right: 2rpx;
+      bottom: 2rpx;
+    }
 
+    .icon {
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%, -50%);
+    }
+  }
 
-			text {
-				position: absolute;
-				color: #8A9099;
-				right: 2rpx;
-				bottom: 2rpx;
-
-			}
-
-			.icon {
-				position: absolute;
-				left: 50%;
-				top: 50%;
-				transform: translate(-50%, -50%);
-			}
-		}
-
-		text {
-			font-size: 30rpx;
-			font-weight: 400;
-			line-height: 39rpx;
-			color: #0F0404;
-			white-space: nowrap;
-			text-overflow: ellipsis;
-			overflow: hidden;
-		}
-	}
+  text {
+    font-size: 30rpx;
+    font-weight: 400;
+    line-height: 39rpx;
+    color: #0f0404;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+  }
+}
 </style>

+ 0 - 1
src/otherPages/buyVip/index.vue

@@ -114,7 +114,6 @@ export default {
             uni.requestPayment({
                 ...res.data
             })
-
         })
 
 

+ 66 - 56
src/otherPages/classifyArea/index.vue

@@ -1,41 +1,36 @@
 <template>
-	<div class="cell-box">
-		<van-cell
-			
-			class="cell"
-			:title="item.placeIssueName || item.classIssueName || item.excellIssueName || item.sequeIssueName"
-			is-link
-			center
-			v-for="(item, index) in classData"
-			:key="index"
-			:border="false"
-			@click="
-				() => {
-					push({
-						name: 'exercise',
-						query: {
-							...query,
-							classIssueName: item.classIssueName,
-							placeIssueName: item.placeIssueName,
-							excellIssueName: item.excellIssueName,
-							sequeIssueName: item.sequeIssueName,
-							placeIssue: item.placeIssue,
-							classIssue: item.classIssue,
-							excellIssue: item.excellIssue,
-							sequeIssue: item.sequeIssue,
-						},
-					});
-				}
-			">
-			<template #icon>
-				<div class="icon">{{ index + 1 }}</div>
-			</template>
-		</van-cell>
-	</div>
+  <div class="cell-box">
+    <van-cell
+      class="cell"
+      :title="
+        item.placeIssueName ||
+        item.classIssueName ||
+        item.excellIssueName ||
+        item.sequeIssueName
+      "
+      is-link
+      center
+      v-for="(item, index) in classData"
+      :key="index"
+      :border="false"
+      @click="
+        () => {
+          goExercise({
+            placeIssueName: item.placeIssueName,
+          });
+        }
+      "
+    >
+      <template #icon>
+        <div class="icon">{{ index + 1 }}</div>
+      </template>
+    </van-cell>
+  </div>
 </template>
 
 <script>
 import api from "@/api/index";
+import utils from "@/utils/index";
 export default {
   data() {
     return {
@@ -47,10 +42,25 @@ export default {
     this.query = op;
   },
   methods: {
+    goExercise(extraQuery) {
+      let query = Object.assign({}, this.query);
+      if (extraQuery) {
+        query = {
+          ...query,
+          ...extraQuery,
+        };
+      } else {
+      }
+
+      uni.navigateTo({
+        url: "/otherPages/exercise/index?" + utils.mapToUrlQuery(query),
+      });
+    },
     getClassData() {
       api.exam
         .studentQuestionInfoSelectDfQuestionInfo(this.query)
         .then((res) => {
+           res.data.shift()
           this.classData = res.data;
         });
     },
@@ -76,28 +86,28 @@ export default {
 
 <style lang="scss" scoped>
 .cell-box {
-	display: flex;
-	padding: 5px 15px;
-	flex-wrap: wrap;
-	justify-content: space-between;
-	.cell {
-		width: 167px;
-		margin-top: 10px;
-		box-shadow: 0px 0px 10px rgba(124, 129, 136, 0.2);
-	}
-	.icon {
-		width: 20px;
-		height: 20px;
-		background: #498ef5;
-		border-radius: 50%;
-		font-weight: 500;
-		font-family: PingFang SC;
-		font-size: 13px;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		color: #ffffff;
-		margin-right: 5px;
-	}
+  display: flex;
+  padding: 5px 15px;
+  flex-wrap: wrap;
+  justify-content: space-between;
+  .cell {
+    width: 167px;
+    margin-top: 10px;
+    box-shadow: 0px 0px 10px rgba(124, 129, 136, 0.2);
+  }
+  .icon {
+    width: 20px;
+    height: 20px;
+    background: #498ef5;
+    border-radius: 50%;
+    font-weight: 500;
+    font-family: PingFang SC;
+    font-size: 13px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    color: #ffffff;
+    margin-right: 5px;
+  }
 }
 </style>

+ 54 - 40
src/otherPages/classifyChoose/index.vue

@@ -16,19 +16,8 @@
         :border="false"
         @click="
           () => {
-            push({
-              name: 'exercise',
-              query: {
-                ...query,
-                classIssueName: item.classIssueName,
-                placeIssueName: item.placeIssueName,
-                excellIssueName: item.excellIssueName,
-                sequeIssueName: item.sequeIssueName,
-                placeIssue: item.placeIssue,
-                classIssue: item.classIssue,
-                excellIssue: item.excellIssue,
-                sequeIssue: item.sequeIssue,
-              },
+            goExercise({
+              excellIssueName: item.excellIssueName,
             });
           }
         "
@@ -37,7 +26,7 @@
           <div class="icon-blue">{{ index + 1 }}</div>
         </template>
       </van-cell>
-      <van-cell
+      <!-- <van-cell
         v-if="query.title !== '地方专题'"
         @click="
           () => {
@@ -61,7 +50,7 @@
         <template #icon>
           <div class="icon-blue">{{ "地" }}</div>
         </template>
-      </van-cell>
+      </van-cell> -->
     </div>
     <div class="cell-box">
       <van-cell
@@ -88,6 +77,7 @@
 
 <script>
 import api from "@/api/index";
+import utils from "@/utils/index";
 export default {
   data() {
     return {
@@ -101,32 +91,56 @@ export default {
     this.getClassData();
   },
   methods: {
+    goExercise(extraQuery) {
+      let query = Object.assign({}, this.query);
+      if (extraQuery) {
+        query = {
+          ...query,
+          ...extraQuery,
+        };
+      } else {
+      }
+
+      uni.navigateTo({
+        url: "/otherPages/exercise/index?" + utils.mapToUrlQuery(query),
+      });
+    },
     getClassData() {
-      api.exam
-        .studentQuestionInfoSelectJxQuestionInfo({
-          ...this.query,
-          excellIssueName: "选学",
-        })
-        .then((res) => {
-          this.classDataRight = res.data;
-        });
-      api.exam
-        .studentQuestionInfoSelectJxQuestionInfo({
-          ...this.query,
-          excellIssueName: "必",
-        })
-        .then((res) => {
-          res.data.shift();
-          this.classDataLeft = res.data;
-          api.exam
-            .studentQuestionInfoSelectJxQuestionInfo({
-              ...this.query,
-              excellIssueName: "新增",
-            })
-            .then((res) => {
-              this.classDataLeft = [...this.classDataLeft, ...res.data];
-            });
-        });
+      if (this.query.vehicle === "摩托车") {
+        api.exam
+          .studentQuestionInfoSelectJxQuestionInfo({
+            ...this.query,
+          })
+          .then((res) => {
+            this.classDataLeft = res.data;
+          });
+      } else {
+        api.exam
+          .studentQuestionInfoSelectJxQuestionInfo({
+            ...this.query,
+            excellIssueName: "选学",
+          })
+          .then((res) => {
+            this.classDataRight = res.data;
+          });
+        api.exam
+          .studentQuestionInfoSelectJxQuestionInfo({
+            ...this.query,
+            excellIssueName: "必",
+          })
+          .then((res) => {
+            // res.data.shift();
+            this.classDataLeft = res.data;
+            api.exam
+              .studentQuestionInfoSelectJxQuestionInfo({
+                ...this.query,
+                excellIssueName: "新增",
+              })
+              .then((res) => {
+                this.classDataLeft = [...this.classDataLeft, ...res.data];
+              });
+          });
+      }
     },
   },
 };

+ 20 - 0
src/otherPages/classifyKind/index.vue

@@ -9,6 +9,10 @@
         item.sequeIssueName
       "
       is-link
+      @click="goExercise({
+        classIssueName:item.classIssueName
+
+      })"
       center
       v-for="(item, index) in classData"
       :key="index"
@@ -23,6 +27,7 @@
 
 <script >
 import api from "@/api/index";
+import utils from "@/utils/index";
 export default {
   data() {
     return {
@@ -34,6 +39,21 @@ export default {
     this.query = op;
   },
   methods: {
+    goExercise(extraQuery) {
+      let query = Object.assign({}, this.query);
+      if (extraQuery) {
+        query = {
+          ...query,
+          ...extraQuery,
+        };
+      } else {
+       
+      }
+
+      uni.navigateTo({
+        url: "/otherPages/exercise/index?" + utils.mapToUrlQuery(query),
+      });
+    },
     getClassData() {
       api.exam
         .studentQuestionInfoSelectFlQuestionInfo(this.query)

+ 24 - 33
src/otherPages/classifyOrder/index.vue

@@ -19,19 +19,8 @@
               class="select-item0"
               @click="
                 () => {
-                  push({
-                    name: 'exercise',
-                    query: {
-                      ...query,
-                      classIssueName: item.classIssueName,
-                      placeIssueName: item.placeIssueName,
-                      excellIssueName: item.excellIssueName,
-                      sequeIssueName: item.sequeIssueName,
-                      placeIssue: item.placeIssue,
-                      classIssue: item.classIssue,
-                      excellIssue: item.excellIssue,
-                      sequeIssue: item.sequeIssue,
-                    },
+                  goExercise({
+                    sequeIssueName: item.sequeIssueName,
                   });
                 }
               "
@@ -41,19 +30,8 @@
             <div
               @click="
                 () => {
-                  push({
-                    name: 'exerciseStrict',
-                    query: {
-                      ...query,
-                      classIssueName: item.classIssueName,
-                      placeIssueName: item.placeIssueName,
-                      excellIssueName: item.excellIssueName,
-                      sequeIssueName: item.sequeIssueName,
-                      placeIssue: item.placeIssue,
-                      classIssue: item.classIssue,
-                      excellIssue: item.excellIssue,
-                      sequeIssue: item.sequeIssue,
-                    },
+                  goExercise({
+                    sequeIssueName: item.sequeIssueName,
                   });
                 }
               "
@@ -73,18 +51,33 @@
 
 <script>
 import api from "@/api/index";
+import utils from "@/utils/index";
 export default {
   data() {
     return {
       classData: [],
       query: {
         title: "",
-        vehicle:""
+        vehicle: "",
       },
     };
   },
   methods: {
-    name() {},
+    goExercise(extraQuery) {
+      let query = Object.assign({}, this.query);
+      if (extraQuery) {
+        query = {
+          ...query,
+          ...extraQuery,
+        };
+      } else {
+       
+      }
+
+      uni.navigateTo({
+        url: "/otherPages/exercise/index?" + utils.mapToUrlQuery(query),
+      });
+    },
   },
   onLoad(op) {
     this.query = op;
@@ -93,11 +86,9 @@ export default {
     api.exam.studentQuestionInfoSelectSxQuestionInfo(this.query).then((res) => {
       if (this.query.vehicle === "摩托车") {
         this.classData = res.data;
-        
-      }
-      else{
-        res.data.shift()
-        this.classData  = res.data
+      } else {
+        res.data.shift();
+        this.classData = res.data;
       }
     });
   },

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

@@ -0,0 +1,151 @@
+<template>
+  <van-overlay z-index="10" :show="show">
+    <div class="skills-box">
+      <div class="skills">
+        <div class="title">官方解释</div>
+        <div class="text">{{ explainJs }}</div>
+        <div class="btn">
+          <span
+            @click="
+              () => {
+                $emit('close');
+              }
+            "
+          >
+            关闭
+          </span>
+          <span
+            @click="
+              () => {
+                playExplainjsmp3();
+              }
+            "
+          >
+            语音重播
+          </span>
+        </div>
+      </div>
+    </div>
+  </van-overlay>
+</template>
+
+<script>
+import utils from "@/utils/index";
+export default {
+  data() {
+    return {};
+  },
+  methods: {
+    playExplainjsmp3() {
+      let audio = utils.wxUtils.getGlobAudio();
+      audio.stop();
+      audio.src = this.explainjsmp3;
+      //体验比较好
+      setTimeout(() => {
+        audio.play();
+      }, 1000);
+    },
+  },
+  watch: {
+    show(newValue, oldValue) {
+      let audio = utils.wxUtils.getGlobAudio();
+      if (newValue) {
+        audio.src = this.explainjsmp3;
+        audio.play();
+      } else {
+        audio.stop();
+      }
+    },
+  },
+  props: {
+    show: {
+      type: Boolean,
+      default: false,
+    },
+    explainJs: {
+      type: String,
+      default: "",
+    },
+    explainjsmp3: {
+      type: String,
+      default: "",
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.skills-box {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 100%;
+  .skills {
+    width: 290px;
+    background: #ffffff;
+    box-shadow: 0px 0px 8px rgba(124, 129, 136, 0.16);
+    border-radius: 10px;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 20px 16px;
+    box-sizing: border-box;
+    .title {
+      font-size: 15px;
+      font-family: PingFang SC;
+      font-weight: bold;
+      line-height: 21px;
+      color: #0a1a33;
+    }
+    .img {
+      width: 258px;
+      height: 129px;
+      border: 1px solid #e8e8e8;
+      margin-top: 16px;
+    }
+    .divider {
+      margin-top: 20px;
+      color: #0a1a33;
+      background: #ffffff;
+    }
+    .text {
+      font-size: 13px;
+      font-family: PingFang SC;
+      font-weight: 400;
+      line-height: 19px;
+      color: #5c6066;
+      margin-top: 10px;
+    }
+    .btn {
+      width: 100%;
+      display: flex;
+      justify-content: space-between;
+      padding: 0 40px;
+      box-sizing: border-box;
+      margin-top: 20px;
+      span {
+        width: 76px;
+        height: 30px;
+        border-radius: 15px;
+        font-size: 13px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        &:active {
+          background-color: #afaaaa;
+          filter: brightness(50%);
+        }
+        &:nth-of-type(1) {
+          border: 1px solid #707070;
+          color: #5c6066;
+        }
+        &:nth-of-type(2) {
+          background: #498ef5;
+          border: 1px solid #498ef5;
+          color: #ffffff;
+        }
+      }
+    }
+  }
+}
+</style>

+ 184 - 27
src/otherPages/exercise/index.vue

@@ -31,23 +31,18 @@
         >
           <van-radio
             @change="changeCheckbox"
-            :value="
-              problemList[problemListIndex].userAnswer.includes(
-                problemList[problemListIndex].answer
-              )
-            "
+            :value="item.value"
             class="problem-checkbox"
             use-icon-slot
             v-for="(item, index) in problemList[problemListIndex].optsArr"
             :key="index"
             :name="item"
           >
-            <text>{{ item }}</text>
+            <text>{{ item.value }}</text>
             <view
               class="problem-op"
               :class="{
-                'problem-op_selected':
-                  problemList[problemListIndex].userAnswer.includes(item),
+                'problem-op_selected': item.selected,
               }"
               slot="icon"
               >{{ numberToLetter(index) }}</view
@@ -66,8 +61,27 @@
           :key="index"
           class="problem-select"
         >
-          <icon class="icon-box-img" type="success" size="70rpx"></icon>
-          <text class="problem-opAnswer">{{ numberToLetter(index) }}</text>
+          <icon
+            v-if="item.isAnswer && item.selected"
+            class="icon-box-img"
+            type="success"
+            size="75rpx"
+          ></icon>
+          <icon
+            v-if="!item.isAnswer && item.selected"
+            class="icon-box-img"
+            type="cancel"
+            size="75rpx"
+          ></icon>
+          <text v-if="!item.isAnswer && !item.selected" class="problem-op">{{
+            numberToLetter(index)
+          }}</text>
+          <text
+            v-if="item.isAnswer && !item.selected"
+            class="problem-op_green"
+            >{{ numberToLetter(index) }}</text
+          >
+          <text class="problem-opAnswer">{{ item.value }}</text>
         </view>
       </view>
       <!-- 多选 -->
@@ -79,34 +93,76 @@
         class="problem-ops"
       >
         <van-checkbox-group
+          @change="changeCheckGroup"
           :value="problemList[problemListIndex].userAnswer"
           :max="4"
         >
           <van-checkbox
             @change="changeCheckbox"
-            :value="
-              problemList[problemListIndex].userAnswer.includes(
-                problemList[problemListIndex].answer
-              )
-            "
+            :value="item.selected"
             class="problem-checkbox"
             use-icon-slot
             v-for="(item, index) in problemList[problemListIndex].optsArr"
             :key="index"
-            :name="item"
+            :name="item.value"
           >
-            <text>{{ item }}</text>
+            <text>{{ item.value }}</text>
             <view
               class="problem-op"
               :class="{
-                'problem-op_selected':
-                  problemList[problemListIndex].userAnswer.includes(item),
+                'problem-op_selected': problemList[
+                  problemListIndex
+                ].userAnswer.includes(item.value),
               }"
               slot="icon"
               >{{ numberToLetter(index) }}</view
             >
           </van-checkbox>
         </van-checkbox-group>
+        <view class="flex-center">
+          <van-button
+            @click="confirmMult"
+            color="#498ef5"
+            round
+            custom-style="width:600rpx"
+            type="primary"
+            >确定</van-button
+          >
+        </view>
+      </view>
+      <view
+        v-if="
+          problemList[problemListIndex].questionType == 3 &&
+          problemList[problemListIndex].isCompleted
+        "
+      >
+        <view
+          v-for="(item, index) in problemList[problemListIndex].optsArr"
+          :key="index"
+          class="problem-select"
+        >
+          <icon
+            v-if="item.isAnswer && item.selected"
+            class="icon-box-img"
+            type="success"
+            size="75rpx"
+          ></icon>
+          <icon
+            v-if="!item.isAnswer && item.selected"
+            class="icon-box-img"
+            type="cancel"
+            size="75rpx"
+          ></icon>
+          <text v-if="!item.isAnswer && !item.selected" class="problem-op">{{
+            numberToLetter(index)
+          }}</text>
+          <text
+            v-if="item.isAnswer && !item.selected"
+            class="problem-op_green"
+            >{{ numberToLetter(index) }}</text
+          >
+          <text class="problem-opAnswer">{{ item.value }}</text>
+        </view>
       </view>
       <view class="function-list">
         <div class="function-item">
@@ -144,6 +200,9 @@
         <view>答案是:{{ problemList[problemListIndex].answer }}</view>
       </view>
     </view>
+    <explainJs @close="()=>{
+      explainJsVisible=false
+      }" :explainJs="problemList[problemListIndex].explainJs" :explainjsmp3="problemList[problemListIndex].explainjsmp3" :show="explainJsVisible"></explainJs>
 
     <van-tabbar>
       <van-tabbar-item @click="goBeforeTopics"
@@ -155,13 +214,29 @@
           size="18px"
         />上一题
       </van-tabbar-item>
+      <van-tabbar-item>
+        <icon slot="icon" class="icon-box-img" type="success" size="18px"></icon
+        >{{ trueNum }}</van-tabbar-item
+      >
+      <van-tabbar-item
+        ><icon
+          slot="icon"
+          class="icon-box-img"
+          type="cancel"
+          size="18px"
+        ></icon>
+        {{ falseNum }}
+      </van-tabbar-item>
       <van-tabbar-item
         ><van-icon slot="icon" size="18px" name="description" />{{
           problemListIndex + 1
         }}/{{ problemListTotal }}
       </van-tabbar-item>
-      <van-tabbar-item @click="submitExam"
-        ><van-icon slot="icon" size="18px" name="records" />交卷
+      <van-tabbar-item
+      @click="()=>{
+        explainJsVisible=true
+      }"
+        ><icon slot="icon" type="warn" size="18px" />解释
       </van-tabbar-item>
       <van-tabbar-item @click="goNextTopics"
         ><van-icon
@@ -179,6 +254,7 @@
 import navBar from "./components/navBar.vue";
 import api from "@/api/index";
 import utils from "@/utils/index";
+import explainJs from './components/explainJs.vue'
 export default {
   data() {
     return {
@@ -188,13 +264,17 @@ export default {
         subject: "",
         title: "",
       },
-      currentAnswer: [
+      trueNum: 0,
+      falseNum: 0,
+      currentOptions: [
         {
           selected: false,
           value: "",
           isAnswer: false,
         },
+        {},
       ],
+      explainJsVisible:false,
       time: 45 * 60 * 1000,
       problemListTotal: 1,
       problemList: [
@@ -358,17 +438,59 @@ export default {
         globalAudio.play();
       }
     },
+    confirmMult(e) {
+      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++;
+      }
+      // this.problemList[this.problemListIndex]
+    },
+    changeCheckGroup(e) {
+      //console.log(e);
+      // this.$set()
+      this.$set(
+        this.problemList[this.problemListIndex],
+        "userAnswer",
+        e.detail
+      );
+      this.problemList[this.problemListIndex].optsArr.forEach((item) => {
+        if (e.detail.includes(item.value)) {
+          item.selected = true;
+        } else {
+          item.selected = false;
+        }
+      });
+    },
     changeRadioGroup(e) {
-      //   console.log(e);
+      console.log(e);
       this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
       this.$set(
         this.problemList[this.problemListIndex],
         "userAnswer",
+        e.detail.value
+      );
+      e.detail.selected = true;
+      this.$set(
+        this.problemList[this.problemListIndex].optsArr,
+        e.detail.index,
         e.detail
       );
+      e.detail.value === this.problemList[this.problemListIndex].answer
+        ? (this.trueNum = this.trueNum + 1)
+        : (this.falseNum = this.falseNum + 1);
+      // this.problemList[this.problemListIndex].optsArr
     },
     changeCheckbox(e) {
-      console.log(e);
+      // console.log(e);
     },
     numberToLetter(index) {
       index = Number(index);
@@ -384,9 +506,26 @@ export default {
       })
       .then((res) => {
         res.rows.forEach((element) => {
-          element.optsArr = element.opts.split("-");
+          element.optsArr = [];
+          element.opts.split("-").forEach((item, index) => {
+            if (element.questionType == 3) {
+              element.optsArr.push({
+                selected: false,
+                value: item,
+                index: index,
+                isAnswer: element.answer.split("-").includes(item),
+              });
+            } else {
+              element.optsArr.push({
+                selected: false,
+                value: item,
+                index: index,
+                isAnswer: item === element.answer,
+              });
+            }
+          });
           element.isCompleted = false;
-          element.userAnswer = "";
+          element.userAnswer = [];
         });
         that.problemListTotal = res.total;
         that.problemList = res.rows;
@@ -413,6 +552,7 @@ export default {
 
   components: {
     navBar,
+    explainJs
   },
 };
 </script>
@@ -423,6 +563,11 @@ export default {
   height: 24rpx;
   background-color: #f2f3f5;
 }
+.flex-center {
+  display: flex;
+  justify-content: center;
+  width: 100%;
+}
 
 .box {
   width: 100%;
@@ -469,6 +614,7 @@ export default {
   }
   .problem-box {
     padding: 15rpx;
+    padding-bottom: 50rpx;
     background: #fff;
     /deep/ .van-checkbox {
       padding-bottom: 15rpx;
@@ -503,8 +649,19 @@ 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-opAnswer {
-      font-size: 40rpx;
+      font-size: 16px;
       margin-left: 12rpx;
     }
     .problem-op_selected {

+ 3 - 2
src/pages.json

@@ -233,7 +233,7 @@
         },
         {
           "path": "classifyChoose/index",
-          "styles": {
+          "style": {
             "navigationBarTitleText": "精选练习",
             "enablePullDownRefresh": false
           }
@@ -332,6 +332,7 @@
     "navigationBarBackgroundColor": "#F8F8F8",
     "backgroundColor": "#F8F8F8",
     "usingComponents": {
+      "van-overlay": "./wxcomponents/vant/overlay/index",
       "van-tabbar": "./wxcomponents/vant/tabbar/index",
       "van-tabbar-item": "./wxcomponents/vant/tabbar-item/index",
       "van-search": "./wxcomponents/vant/search/index",
@@ -408,7 +409,7 @@
       {
         "name": "练习",
         "path": "otherPages/exercise/index",
-        "query":"liceCar=1&liceTruck=&liceBus=&liceMoto=&name=科目一&cert=C1/C2/C3&vehicle=轿车&subject=1&title=顺序练习&sort=3&sequeIssueName=练习一"
+        "query":"liceCar=1&liceTruck=&liceBus=&liceMoto=&name=科目一&cert=C1/C2/C3&vehicle=轿车&subject=4&title=顺序练习&sort=3&excellIssueName=新增题库"
       }
       
     ]

+ 3 - 0
src/pages/carVideo/components/branchTwo.vue

@@ -29,6 +29,9 @@ export default {
       type: Array,
     },
   },
+  mounted () {
+    console.log(this.carVideoList);
+  },
   data: () => ({
     bannerList: [],
     loading: true,

+ 12 - 5
src/pages/carVideo/components/tabCenter.vue

@@ -1,8 +1,14 @@
 <template>
   <view class="center">
-    <view @click="goPath(item)" class="center-item" v-for="(item, index) in centerList" :key="index">
-      <image  class="center-img" :src="item.img"></image>
-      <text class="center-text">{{ item.text }}</text>
+    <view
+      @click="goPath(item)"
+      class="center-item"
+      v-for="(item, index) in centerList"
+      :key="index"
+    >
+      <image class="center-img" :src="item.img"></image>
+      <text v-if="index == 0"  class="center-text">{{ item.text+'\n500题'}}</text>
+      <text v-if="index == 1" class="center-text">{{ item.text }}</text>
     </view>
   </view>
 </template>
@@ -16,9 +22,10 @@ export default {
   },
   methods: {
     goPath(item) {
-      console.log(item);
+      let query = Object.assign({}, this.query);
+      query.title = item.text;
       if (item.path) {
-        let str = utils.mapToUrlQuery(this.query);
+        let str = utils.mapToUrlQuery(query);
         console.log(item.path + "?" + str, "str");
         uni.navigateTo({
           url: item.path + "?" + str,

+ 3 - 2
src/pages/carVideo/components/tabLeft.vue

@@ -15,9 +15,10 @@ export default {
   },
   methods: {
     goPath(item) {
-      console.log(item);
+     let query = Object.assign({}, this.query);
+      query.title = item.text;
       if (item.path) {
-        let str = utils.mapToUrlQuery(this.query);
+        let str = utils.mapToUrlQuery(query);
         console.log(item.path + "?" + str,'str')
         uni.navigateTo({
           url: item.path + "?" + str,

+ 7 - 2
src/pages/carVideo/components/tabRight.vue

@@ -8,16 +8,21 @@
 </template>
 
 <script>
+import utils from "@/utils/index";
 export default {
   data() {
     return {};
   },
   methods: {
     goPath(item) {
+      let query = Object.assign({}, this.query);
+      query.title = item.text;
       console.log(item);
-      if (item.path) {
+        if (item.path) {
+        let str = utils.mapToUrlQuery(query);
+        console.log(item.path + "?" + str, "str");
         uni.navigateTo({
-          url: item.path,
+          url: item.path + "?" + str,
         });
       }
     },

+ 16 - 2
src/pages/carVideo/components/videoListBox.vue

@@ -5,8 +5,10 @@
 			<view class="video-item" @click="gotoPaly(currentItem.list[0])">
 				<view class="image-box">
 					<view class="img-box">
-						<image class="image" :src="currentItem.list[0].cover" mode="aspectFill"></image>
+						<image  class="image" :src="currentItem.list[0].cover" mode="aspectFill"></image>
 					</view>
+					<image v-if="currentItem.list[0].permission==1" class="img-tip" :src="shikan"></image>
+					<image v-if="currentItem.list[0].permission==2" class="img-tip" :src="vip"></image>
 					<text>{{currentItem.list[0].duration}}</text>
 					<m-icon class="icon" type="bofangshipin"></m-icon>
 				</view>
@@ -25,6 +27,8 @@
 </template>
 
 <script>
+import shikan from "@/assets/img/shikan.png";
+import vip from "@/assets/img/vip.png";
 	export default {
 		name: "video-listBox",
 		props: {
@@ -37,11 +41,14 @@
 		},
 		data() {
 			return {
-				active: 0
+				active: 0,
+				shikan,
+				vip
 			};
 		},
 		computed: {
 			currentItem() {
+				console.log(this.carVideoList,'this.carVideoList')
 				return this.carVideoList.children[this.active]
 			}
 		},
@@ -119,6 +126,13 @@
 
 			.image-box {
 				position: relative;
+				.img-tip{
+					position: absolute;
+					right: 10rpx;
+					top: 10rpx;
+					width: 50rpx;
+					height: 28rpx;
+				}
 
 				.img-box {
 					width: 100%;

+ 13 - 11
src/pages/carVideo/index.vue

@@ -123,7 +123,7 @@
         </van-tab>
         <van-tab title="科目三">
           <van-grid column-num="4">
-            <van-grid-item @click="goLightMock" icon="photo-o" text="灯光模拟">
+            <van-grid-item @click="goLightMock" icon="https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/lightmock.png" text="灯光模拟">
             </van-grid-item>
           </van-grid>
           <view v-for="(item, index) in typeList" :key="index">
@@ -135,9 +135,9 @@
         </van-tab>
         <van-tab title="科目四">
           <view class="tab-container">
-            <tab-left :subject="4" :leftList="leftList4"></tab-left>
-            <tab-center :subject="4" :centerList="centerList4"></tab-center>
-            <tab-right :subject="4" :rightList="rightList4"></tab-right>
+            <tab-left :query="tabQuery" :subject="4" :leftList="leftList4"></tab-left>
+            <tab-center :query="tabQuery" :subject="4" :centerList="centerList4"></tab-center>
+            <tab-right :query="tabQuery" :subject="4" :rightList="rightList4"></tab-right>
           </view>
         </van-tab>
       </van-tabs>
@@ -206,7 +206,7 @@ export default {
     centerList1: [
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/SelectedTestQuestions@2x.png",
-        text: "精选考题\n500题",
+        text: "精选考题",
         path:"/otherPages/classifyChoose/index"
       },
       {
@@ -243,12 +243,12 @@ export default {
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/LocalTopics@2x.png",
         text: "地方专题",
-        path: "",
+        path: "/otherPages/classifyArea/index",
       },
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/WrongTopicCollection@2x.png",
         text: "错题·收藏",
-        path: "",
+         path: "/otherPages/marked/index?markdown=考前须知",
       },
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/NotesBeforeExamination@2x.png",
@@ -264,23 +264,25 @@ export default {
     centerList4: [
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/SelectedTestQuestions@2x.png",
-        text: "精选考题\n500题",
+        text: "精选考题",
+        path:"/otherPages/classifyChoose/index"
       },
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/SimulationTestTopics@2x.png",
         text: "模拟考试\n仿真题目",
+        path:"/otherPages/beforeMockExam/index"
       },
     ],
     leftList4: [
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/SequentialPractice@2x.png",
         text: "顺序练习",
-        path: "",
+       path: "/otherPages/classifyOrder/index",
       },
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/ClassificationExercise@2x.png",
         text: "分类练习",
-        path: "",
+       path: "/otherPages/classifyKind/index",
       },
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/RealExaminationRoomSimulation@2x.png",
@@ -291,7 +293,7 @@ export default {
       {
         img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/SimulationResults@2x.png",
         text: "模拟成绩",
-        path: "",
+         path: "/otherPages/testScores/index",
       },
     ],
     active: 0,

+ 260 - 81
src/pages/carVideo/play.vue

@@ -1,100 +1,279 @@
 <template>
-	<view>
-		<view class="video-box">
-			<video unit-id="adunit-c169acee32b4aa9f" class="video" :src="carVideoItem.videoUrl" controls
-				autoplay></video>
-			<view class="des">
-				<text>{{carVideoItem.title}}</text>
-				<!-- <text>{{carVideoItem.remarks}}</text> -->
-			</view>
-		</view>
+  <view>
+    <view class="video-box">
+      <video
+        id="myVideo"
+        v-if="videoVisible"
+        @play="playVideo"
+        unit-id="adunit-c169acee32b4aa9f"
+        class="video"
+        :src="carVideoItem.videoUrl"
+        controls
+        autoplay
+      ></video>
+      <view
+        class="video-tip"
+        v-if="!videoVisible && carVideoItem.permission == 1"
+      >
+        <text class="video-tip-text1" style="font-size: 32rpx"
+          >试看结束,开通会员观看完整视频</text
+        >
+        <button @click="goBuyVip" class="video-tip-open">立即开通</button>
+        <image
+          @click="backFront"
+          class="video-tip-leftArrow1"
+          :src="leftArrow1"
+        ></image>
+        <image
+          @click="
+            () => {
+              refreshVideo();
+            }
+          "
+          class="video-tip-backArrow1"
+          :src="backArrow1"
+        ></image>
+        <text class="video-tip-text2">重播</text>
+      </view>
+      <view
+        class="video-tip"
+        v-if="!videoVisible && carVideoItem.permission == 2"
+      >
+        <text class="video-tip-text1" style="font-size: 32rpx"
+          >只有vip可以观看</text
+        >
+        <button @click="goBuyVip" class="video-tip-open">立即开通</button>
+        <image
+          @click="backFront"
+          class="video-tip-leftArrow1"
+          :src="leftArrow1"
+        ></image>
+        <!-- <image
+          @click="
+            () => {
+              refreshVideo();
+            }
+          "
+          class="video-tip-backArrow1"
+          :src="backArrow1"
+        ></image> -->
+      </view>
+      <view class="des">
+        <text>{{ carVideoItem.title }}</text>
 
-		<loading v-if="loading"></loading>
-		<scroll-view v-else>
-			<m-video-leftright :palyObj='{}' @click="videoListClick(item)" :carVideoItem='item' v-for="(item,index) in carVideoList"
-				:key='index'></m-video-leftright>
-		</scroll-view>
+        <!-- <text>{{carVideoItem.remarks}}</text> -->
+      </view>
+    </view>
 
-		<!-- <loading v-if="loading"></loading>
+    <loading v-if="loading"></loading>
+    <scroll-view v-else>
+      <m-video-leftright
+        :palyObj="{}"
+        @click="videoListClick(item)"
+        :carVideoItem="item"
+        v-for="(item, index) in carVideoList"
+        :key="index"
+      ></m-video-leftright>
+    </scroll-view>
+
+    <!-- <loading v-if="loading"></loading>
 		<view v-else>
 			<m-video-box :palyObj.sync='carVideoItem' :column="[2, 1, 3][index % 3]"
 				:type="[1, 1, 1][index % 3]==1?'left-right':'top-bottom'" :carVideoList='item'
 				v-for="(item,index) in carVideoList" :key='index'></m-video-box>
 		</view> -->
-
-	</view>
+  </view>
 </template>
 
 <script>
-	export default {
-		data: () => ({
-			loading: true,
-			carVideoList: [],
-			carVideoItem: {},
-			videoAd: null,
-			switchingTimes: 1,
-		}),
-		watch: {
-			carVideoItem() {
-				//用于激励广告计数
-				this.switchingTimes++
-			}
-		},
-		onLoad: async function(option) {
-			let data = await this.goPageGetData()
-			this.carVideoItem = data.carVideoItem
-		},
-		async mounted() {
-			let {
-				data: carVideoData
-			} = await this.$api.carVideo.getCarVideoList(this.carVideoItem.pid)
-			this.carVideoList = carVideoData
-			this.loading = false
-		},
-		methods: {
-			videoListClick(item) {
-				this.carVideoItem = item
-			}
-		}
-	}
+import backArrow1 from "@/assets/img/backArrow1.png";
+import leftArrow1 from "@/assets/img/leftArrow1.png";
+export default {
+  data: () => ({
+    videoTimer: 0,
+    isInit: false,
+    backArrow1,
+    leftArrow1,
+    loading: true,
+    videoVisible: false,
+    carVideoList: [],
+    carVideoItem: {},
+    videoAd: null,
+    switchingTimes: 1,
+    videoVisible: true,
+  }),
+  watch: {
+    carVideoItem() {
+      //用于激励广告计数
+      this.switchingTimes++;
+    },
+  },
+  computed: {
+    isVip() {
+      return this.$store.getters.isVip;
+    },
+  },
+  onLoad: async function (option) {
+    let data = await this.goPageGetData();
+    this.carVideoItem = data.carVideoItem;
+  },
+  async mounted() {
+    // console.log(wx.createVideoContext("myVideo"));
+    let { data: carVideoData } = await this.$api.carVideo.getCarVideoList(
+      this.carVideoItem.pid
+    );
+    this.carVideoList = carVideoData;
+    console.log(this.carVideoList, "carVideoList");
+    this.loading = false;
+  },
+  methods: {
+    goBuyVip() {
+      uni.navigateTo({
+        url: "/otherPages/buyVip/index",
+      });
+    },
+    refreshVideo() {
+      this.isInit = false;
+      this.videoVisible = true;
+
+      //   clearTimeout(this.videoTimer);
+      //   if (!this.isInit && this.carVideoItem.permission == 1) {
+      //     this.isInit = true;
+      //     this.videoTimer = setTimeout(() => {
+      //       this.videoVisible = false;
+      //     }, 15 * 1000);
+      //   }
+    },
+    playVideo(e) {
+      clearTimeout(this.videoTimer);
+	  //vip 不需要判断
+      if (this.isVip) {
+        return;
+      }
+      if (!this.isInit && this.carVideoItem.permission == 1) {
+        this.isInit = true;
+        this.videoTimer = setTimeout(() => {
+          this.videoVisible = false;
+        }, 15 * 1000);
+      } else if (!this.isInit && this.carVideoItem.permission == 2) {
+        this.isInit = true;
+        this.videoVisible = false;
+      }
+    },
+    backFront(e) {
+      uni.navigateBack();
+    },
+    loadedmetadata(e) {
+      if (this.carVideoItem.permission == 1) {
+        this.videoTimer = setTimeout(() => {
+          this.videoVisible = false;
+        }, 15 * 1000);
+      } else {
+        clearTimeout(this.videoTimer);
+      }
+    },
+    adTimeupdate(e) {
+      //小程序专用
+      if (e.detail.currentTime > 15 && this.carVideoItem.permission >= 1) {
+        this.videoVisible = false;
+      }
+    },
+
+    videoListClick(item) {
+      this.carVideoItem = item;
+      this.isInit = false;
+      this.videoVisible = true;
+    },
+  },
+};
 </script>
 
 <style lang="scss">
-	.video-box {
-		width: 100vw;
-		box-sizing: border-box;
-		margin-bottom: 30rpx;
-		background-color: #FFFFFF;
-		position: sticky;
-		top: 0;
-		z-index: 100;
+.video-box {
+  width: 100vw;
+  box-sizing: border-box;
+  margin-bottom: 30rpx;
+  background-color: #ffffff;
+  position: sticky;
+  top: 0;
+  z-index: 100;
+  video {
+    width: 100%;
+    height: 450rpx;
+  }
+  .video-tip {
+    width: 100%;
+    height: 450rpx;
+    background: #0a1a33;
+    position: relative;
+
+    .video-tip-text1 {
+      position: absolute;
+      top: 120rpx;
+      color: #dba05c;
+      width: 100%;
+      text-align: center;
+    }
+    .video-tip-text2 {
+      position: absolute;
+      bottom: 40rpx;
+      color: #fff;
+      left: 85rpx;
+      font-size: 24rpx;
+    }
+    .video-tip-open {
+      width: 180rpx;
+      height: 60rpx;
+      background: linear-gradient(90deg, #dba05c 0%, #f3c085 100%);
+      position: absolute;
+      left: 50%;
+      color: #91540f;
+      font-size: 26rpx;
+      top: 200rpx;
+      transform: translate(-50%);
+    }
+    .video-tip-leftArrow1 {
+      position: absolute;
+      top: 24rpx;
+      left: 34rpx;
+      width: 16rpx;
+      height: 32rpx;
+    }
+    .video-tip-backArrow1 {
+      position: absolute;
+      bottom: 42rpx;
+      left: 40rpx;
+      width: 30rpx;
+      height: 28rpx;
+    }
+  }
 
-		.video {
-			width: 100%;
-		}
+  .video {
+    width: 100%;
+  }
 
-		.des {
-			display: flex;
-			flex-direction: column;
-			padding: 30rpx;
-			padding-top: 24rpx;
+  .des {
+    display: flex;
+    flex-direction: column;
+    padding: 30rpx;
+    padding-top: 24rpx;
 
-			text {
-				&:nth-of-type(1) {
-					font-size: 30rpx;
-					font-weight: 400;
-					line-height: 39rpx;
-					color: #0F0404;
-				}
+    text {
+      &:nth-of-type(1) {
+        font-size: 30rpx;
+        font-weight: 400;
+        line-height: 39rpx;
+        color: #0f0404;
+      }
 
-				&:nth-of-type(2) {
-					margin-top: 6rpx;
-					font-size: 26rpx;
-					font-weight: 400;
-					line-height: 20rpx;
-					color: #666666;
-				}
-			}
-		}
-	}
+      &:nth-of-type(2) {
+        margin-top: 6rpx;
+        font-size: 26rpx;
+        font-weight: 400;
+        line-height: 20rpx;
+        color: #666666;
+      }
+    }
+  }
+}
 </style>

+ 15 - 15
src/pages/cinema/index.vue

@@ -99,7 +99,7 @@
 		}),
 		async mounted() {
 			this.setFilmDiscount()
-			await this.getLocation()
+			// await this.getLocation()
 			await this.getCityList()
 			this.init()
 			this.cinemaListInit()
@@ -167,19 +167,19 @@
 					this.$store.commit('SET_FILMDISCOUNT', res.data)
 				})
 			},
-			async getLocation() {
-				try {
-					let location = await wx.getLocation()
-					this.location = [location.longitude.toFixed(6), location.latitude.toFixed(6)]
-					let address = await this.$api.amap.regeo({
-						location: this.location.toString()
-					})
-					this.address = address.regeocode.addressComponent.city.slice(0, -1)
-				} catch (e) {
-					console.log(e)
-					this.address = '北京'
-				}
-			},
+			// async getLocation() {
+			// 	try {
+			// 		let location = await wx.getLocation()
+			// 		this.location = [location.longitude.toFixed(6), location.latitude.toFixed(6)]
+			// 		let address = await this.$api.amap.regeo({
+			// 			location: this.location.toString()
+			// 		})
+			// 		this.address = address.regeocode.addressComponent.city.slice(0, -1)
+			// 	} catch (e) {
+			// 		console.log(e)
+			// 		this.address = '北京'
+			// 	}
+			// },
 			async getCityList() {
 				let cityListRes = await this.$api.cinema.getCityList()
 				let cityList = cityListRes.data.data.list
@@ -402,4 +402,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 2 - 1
src/pages/mockExam/begin.vue

@@ -56,6 +56,7 @@
 
 <script>
 import backButton from "@/assets/img/backButton.png";
+import utils from '@/utils/index'
 // import { getCurrentPage } from '../../../dist/build/mp-weixin/wxcomponents/vant/common/utils';
 export default {
   data() {
@@ -93,7 +94,7 @@ export default {
 
       let params = page.$page.fullPath.split("?")[1];
       uni.navigateTo({
-        url: "/pages/mockExam/test?" + params,
+        url: "/pages/mockExam/test?" + utils.mapToUrlQuery(this.query),
       });
     },
   },

+ 1 - 1
src/pages/mockExam/test.vue

@@ -991,7 +991,7 @@ export default {
     border-left: 1rpx solid #d2d1cf;
     border-top: 1rpx solid #d2d1cf;
     display: flex;
-    width: 185rpx;
+    width: 100%;
     flex-wrap: wrap;
 
     .coll-table-topicTr {