|
@@ -43,28 +43,20 @@
|
|
|
<view>
|
|
|
<swiper :indicator-dots="false" style="height: 200rpx">
|
|
|
<swiper-item class="swiperBanner">
|
|
|
- <image class="banner" src="https://t1-1305573081.file.myqcloud.com/ctjk/mp-wx/carVideo/banner.png"></image>
|
|
|
+ <image class="banner" src="https://t1-1305573081.file.myqcloud.com/ctjk/mp-wx/carVideo/banner.png"></image>
|
|
|
</swiper-item>
|
|
|
-
|
|
|
+
|
|
|
</swiper>
|
|
|
</view>
|
|
|
<view class="carType">
|
|
|
- <view
|
|
|
- v-for="(item, index) in carType"
|
|
|
- @click="changeVehicle(item)"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <view
|
|
|
- @click="
|
|
|
- () => {
|
|
|
- carTypeIndex = index;
|
|
|
- }
|
|
|
- "
|
|
|
- class="col"
|
|
|
- :class="{
|
|
|
- col_selected: carTypeIndex == index,
|
|
|
- }"
|
|
|
- >
|
|
|
+ <view v-for="(item, index) in carType" @click="changeVehicle(item)" :key="index">
|
|
|
+ <view @click="
|
|
|
+ () => {
|
|
|
+ carTypeIndex = index;
|
|
|
+ }
|
|
|
+ " class="col" :class="{
|
|
|
+ col_selected: carTypeIndex == index,
|
|
|
+}">
|
|
|
<image :class="['carType-img' + index]" :src="item.img"></image>
|
|
|
<view class="h6"></view>
|
|
|
<text class="carType-title">{{ item.title }}</text>
|
|
@@ -73,46 +65,23 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="point">
|
|
|
- <view
|
|
|
- :style="{
|
|
|
- left: carTypeIndex * 172 + 'rpx',
|
|
|
- }"
|
|
|
- class="point-area"
|
|
|
- >
|
|
|
- <image
|
|
|
- class=""
|
|
|
- src="https://t1-1305573081.file.myqcloud.com/ctjk/mp-wx/carVideo/triangle1@2x.png"
|
|
|
- ></image>
|
|
|
+ <view :style="{
|
|
|
+ left: carTypeIndex * 172 + 'rpx',
|
|
|
+ }" class="point-area">
|
|
|
+ <image class="" src="https://t1-1305573081.file.myqcloud.com/ctjk/mp-wx/carVideo/triangle1@2x.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<view class="tab">
|
|
|
- <van-tabs
|
|
|
- animated
|
|
|
- class="custom-tabs"
|
|
|
- :active="active"
|
|
|
- id="tabs"
|
|
|
- @change="changeSubject"
|
|
|
- :sticky="true"
|
|
|
- >
|
|
|
- <!-- <van-tab title="教学视频"><subjectVideoSelect></subjectVideoSelect></van-tab> -->
|
|
|
+ <van-tabs animated class="custom-tabs" :active="active" id="tabs" @change="changeSubject" :sticky="true">
|
|
|
+ <van-tab v-if="xcx_video_open" title="教学视频">
|
|
|
+ <subjectVideoSelect></subjectVideoSelect>
|
|
|
+ </van-tab>
|
|
|
<van-tab title="科目一">
|
|
|
<view class="tab-container">
|
|
|
- <tab-left
|
|
|
- :subject="1"
|
|
|
- :query="tabQuery"
|
|
|
- :leftList="leftList1"
|
|
|
- ></tab-left>
|
|
|
- <tab-center
|
|
|
- :subject="1"
|
|
|
- :query="tabQuery"
|
|
|
- :centerList="centerList1"
|
|
|
- ></tab-center>
|
|
|
- <tab-right
|
|
|
- :subject="1"
|
|
|
- :query="tabQuery"
|
|
|
- :rightList="rightList1"
|
|
|
- ></tab-right>
|
|
|
+ <tab-left :subject="1" :query="tabQuery" :leftList="leftList1"></tab-left>
|
|
|
+ <tab-center :subject="1" :query="tabQuery" :centerList="centerList1"></tab-center>
|
|
|
+ <tab-right :subject="1" :query="tabQuery" :rightList="rightList1"></tab-right>
|
|
|
</view>
|
|
|
</van-tab>
|
|
|
<!-- <van-tab title="科目二">
|
|
@@ -141,21 +110,9 @@
|
|
|
</van-tab> -->
|
|
|
<van-tab title="科目四">
|
|
|
<view class="tab-container">
|
|
|
- <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>
|
|
|
+ <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>
|
|
@@ -163,72 +120,39 @@
|
|
|
<!-- #endif -->
|
|
|
<!-- #ifdef MP-TOUTIAO -->
|
|
|
<view class="tabTitle">
|
|
|
- <view
|
|
|
- :style="{
|
|
|
- left: active * 25 + '%',
|
|
|
- }"
|
|
|
- class="rect"
|
|
|
- >
|
|
|
+ <view :style="{
|
|
|
+ left: active * 25 + '%',
|
|
|
+ }" class="rect">
|
|
|
<view class="rect-color"> </view>
|
|
|
</view>
|
|
|
- <view
|
|
|
- @click="
|
|
|
- () => {
|
|
|
- active = index;
|
|
|
- tabQuery.name = item;
|
|
|
- tabQuery.subject = index + 1;
|
|
|
- }
|
|
|
- "
|
|
|
- v-for="(item, index) in subjectMap"
|
|
|
- :key="index"
|
|
|
- class="tabTitle-row"
|
|
|
- >
|
|
|
+ <view @click="
|
|
|
+ () => {
|
|
|
+ active = index;
|
|
|
+ tabQuery.name = item;
|
|
|
+ tabQuery.subject = index + 1;
|
|
|
+ }
|
|
|
+ " v-for="(item, index) in subjectMap" :key="index" class="tabTitle-row">
|
|
|
{{ item }}
|
|
|
</view>.
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
<view class="tab">
|
|
|
- <swiper
|
|
|
- scroll-x
|
|
|
- id="tabs"
|
|
|
- circular
|
|
|
- :current="active"
|
|
|
- :scroll-left="50"
|
|
|
- @change="
|
|
|
- (e) => {
|
|
|
- active = e.detail.current;
|
|
|
- }
|
|
|
- "
|
|
|
- >
|
|
|
+ <swiper scroll-x id="tabs" circular :current="active" :scroll-left="50" @change="
|
|
|
+ (e) => {
|
|
|
+ active = e.detail.current;
|
|
|
+ }
|
|
|
+ ">
|
|
|
<swiper-item id="tab1" style="display: inline-block; width: 100%">
|
|
|
<view class="tab-container">
|
|
|
- <tab-left
|
|
|
- :needVipList="[0, 1]"
|
|
|
- :subject="1"
|
|
|
- :query="tabQuery"
|
|
|
- :leftList="leftList1"
|
|
|
- ></tab-left>
|
|
|
- <tab-center
|
|
|
- :needVipList="[0, 1]"
|
|
|
- :subject="1"
|
|
|
- :query="tabQuery"
|
|
|
- :centerList="centerList1"
|
|
|
- ></tab-center>
|
|
|
- <tab-right
|
|
|
- :needVipList="[0, 1]"
|
|
|
- :subject="1"
|
|
|
- :query="tabQuery"
|
|
|
- :rightList="rightList1"
|
|
|
- ></tab-right>
|
|
|
+ <tab-left :needVipList="[0, 1]" :subject="1" :query="tabQuery" :leftList="leftList1"></tab-left>
|
|
|
+ <tab-center :needVipList="[0, 1]" :subject="1" :query="tabQuery" :centerList="centerList1"></tab-center>
|
|
|
+ <tab-right :needVipList="[0, 1]" :subject="1" :query="tabQuery" :rightList="rightList1"></tab-right>
|
|
|
</view>
|
|
|
</swiper-item>
|
|
|
|
|
|
<swiper-item id="tab2" style="display: inline-block; width: 100%">
|
|
|
<view v-for="(item, index) in typeList" :key="index">
|
|
|
- <branch-two
|
|
|
- v-if="index == 1"
|
|
|
- :carVideoList="item.children"
|
|
|
- ></branch-two>
|
|
|
+ <branch-two v-if="index == 1" :carVideoList="item.children"></branch-two>
|
|
|
</view>
|
|
|
</swiper-item>
|
|
|
|
|
@@ -242,55 +166,34 @@
|
|
|
</van-grid-item>
|
|
|
</van-grid> -->
|
|
|
<view v-for="(item, index) in typeList" :key="index">
|
|
|
- <branch-two
|
|
|
- v-if="index == 2"
|
|
|
- :carVideoList="item.children"
|
|
|
- ></branch-two>
|
|
|
+ <branch-two v-if="index == 2" :carVideoList="item.children"></branch-two>
|
|
|
</view>
|
|
|
</swiper-item>
|
|
|
<swiper-item id="tab4" style="display: inline-block; width: 100%">
|
|
|
<view class="tab-container">
|
|
|
- <tab-left
|
|
|
- :needVipList="[0, 1]"
|
|
|
- :query="tabQuery"
|
|
|
- :subject="4"
|
|
|
- :leftList="leftList4"
|
|
|
- ></tab-left>
|
|
|
- <tab-center
|
|
|
- :needVipList="[0, 1]"
|
|
|
- :query="tabQuery"
|
|
|
- :subject="4"
|
|
|
- :centerList="centerList4"
|
|
|
- ></tab-center>
|
|
|
- <tab-right
|
|
|
- :needVipList="[0, 1]"
|
|
|
- :query="tabQuery"
|
|
|
- :subject="4"
|
|
|
- :rightList="rightList4"
|
|
|
- ></tab-right>
|
|
|
+ <tab-left :needVipList="[0, 1]" :query="tabQuery" :subject="4" :leftList="leftList4"></tab-left>
|
|
|
+ <tab-center :needVipList="[0, 1]" :query="tabQuery" :subject="4" :centerList="centerList4"></tab-center>
|
|
|
+ <tab-right :needVipList="[0, 1]" :query="tabQuery" :subject="4" :rightList="rightList4"></tab-right>
|
|
|
</view>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
|
<!-- #endif -->
|
|
|
<view v-if="tabQuery.name !== '教学视频'" class="two">
|
|
|
- <view
|
|
|
- @click="
|
|
|
- goPath(
|
|
|
- '/otherPages/selectRulePaper/index',
|
|
|
- {
|
|
|
- title: '新规秘卷',
|
|
|
- },
|
|
|
- true
|
|
|
- )
|
|
|
- "
|
|
|
- class="two-item"
|
|
|
- >
|
|
|
+ <view @click="
|
|
|
+ goPath(
|
|
|
+ '/otherPages/selectRulePaper/index',
|
|
|
+ {
|
|
|
+ title: '新规秘卷',
|
|
|
+ },
|
|
|
+ true
|
|
|
+ )
|
|
|
+ " class="two-item">
|
|
|
<image class="" src="https://t1-1305573081.file.myqcloud.com/ctjk/mp-wx/carVideo/xingui.png"></image>
|
|
|
- <text style="color: #fff;font-size: 46rpx;top:34rpx" class="twp-text">新规秘卷</text>
|
|
|
+ <text style="color: #fff;font-size: 46rpx;top:34rpx" class="twp-text">新规秘卷</text>
|
|
|
<text style="color: #fff;font-size: 30rpx;top:104rpx" class="twp-text">考前秘籍 直击考点</text>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
<!-- <view v-if="active == 0 || active == 3">
|
|
|
<van-cell
|
|
@@ -341,6 +244,7 @@ import userInfoHead from "./components/userInfoHead.vue";
|
|
|
import freeUseBg from "@/assets/img/freeUseBg.png";
|
|
|
import newRulesBg from "@/assets/img/newRulesPaperBg.png";
|
|
|
import utils from "@/utils/index";
|
|
|
+import api from '@/api'
|
|
|
import subjectVideoSelect from './components/subjectVideoSelect.vue'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -355,6 +259,7 @@ export default {
|
|
|
subjectVideoSelect
|
|
|
},
|
|
|
data: () => ({
|
|
|
+ xcx_video_open: 0,
|
|
|
freeUseBg,
|
|
|
newRulesBg,
|
|
|
subjectMap: ["科目一", "科目二", "科目三", "科目四"],
|
|
@@ -561,6 +466,7 @@ export default {
|
|
|
}),
|
|
|
computed: {
|
|
|
userData() {
|
|
|
+ console.log(this.$store.state)
|
|
|
return this.$store.state.user.userInfo || {};
|
|
|
},
|
|
|
},
|
|
@@ -580,6 +486,18 @@ export default {
|
|
|
// this.recomVideos3 = data[3].children[0];
|
|
|
this.loading = false;
|
|
|
this.$store.dispatch("GetInfo");
|
|
|
+ api.system.systemConfigConfigKey('xcx_video_open').then(res => {
|
|
|
+
|
|
|
+ this.xcx_video_open = Number(res.data)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.selectComponent("#tabs").resize() // 需要延迟
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ console.log(this.xcx_video_open)
|
|
|
+ })
|
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
// this.selectComponent("#tabs").resize();
|
|
@@ -589,11 +507,11 @@ export default {
|
|
|
clickCell(carVideoList) {
|
|
|
this.$utils.route.goPage(`/pages/carVideo/moreVideo?active=${this.active}`, null, {
|
|
|
carVideoList: carVideoList,
|
|
|
- active:this.active
|
|
|
+ active: this.active
|
|
|
});
|
|
|
},
|
|
|
goPath(url, extraQuery = {}, needVip = false) {
|
|
|
-
|
|
|
+
|
|
|
uni.navigateTo({
|
|
|
url:
|
|
|
url + "?" + utils.mapToUrlQuery({ ...this.tabQuery, ...extraQuery }),
|
|
@@ -639,7 +557,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeSubject(e) {
|
|
|
- this.tabQuery.subject = e.detail.title=='科目一'?1:4;
|
|
|
+ this.tabQuery.subject = e.detail.title == '科目一' ? 1 : 4;
|
|
|
this.tabQuery.name = e.detail.title;
|
|
|
},
|
|
|
goLightMock(e) {
|
|
@@ -670,20 +588,24 @@ export default {
|
|
|
padding: 0 30rpx;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
+
|
|
|
.two-item {
|
|
|
position: relative;
|
|
|
+
|
|
|
.twp-text {
|
|
|
position: absolute;
|
|
|
top: 32rpx;
|
|
|
left: 30rpx;
|
|
|
font-size: 32rpx;
|
|
|
}
|
|
|
+
|
|
|
image {
|
|
|
width: 690rpx;
|
|
|
height: 192rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.tabTitle {
|
|
|
width: 690rpx;
|
|
|
margin: 0 auto;
|
|
@@ -695,9 +617,11 @@ export default {
|
|
|
height: 66rpx;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
+
|
|
|
.tabTitle-row {
|
|
|
width: 172rpx;
|
|
|
}
|
|
|
+
|
|
|
.rect {
|
|
|
width: 25%;
|
|
|
text-align: center;
|
|
@@ -705,6 +629,7 @@ export default {
|
|
|
bottom: 0;
|
|
|
left: 0;
|
|
|
height: 4rpx;
|
|
|
+
|
|
|
.rect-color {
|
|
|
width: 60%;
|
|
|
height: 4rpx;
|
|
@@ -713,18 +638,22 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
swiper-item {
|
|
|
overflow-y: scroll;
|
|
|
}
|
|
|
+
|
|
|
.h6 {
|
|
|
height: 6rpx;
|
|
|
}
|
|
|
+
|
|
|
.carVideo {
|
|
|
position: relative;
|
|
|
background: #fff;
|
|
|
min-height: 100vh;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
.swiperBanner {
|
|
|
width: 690rpx;
|
|
|
height: 200rpx;
|
|
@@ -733,10 +662,12 @@ swiper-item {
|
|
|
align-content: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+
|
|
|
.banner {
|
|
|
width: 690rpx;
|
|
|
height: 200rpx;
|
|
|
}
|
|
|
+
|
|
|
.carType {
|
|
|
width: 690rpx;
|
|
|
height: 152rpx;
|
|
@@ -745,9 +676,11 @@ swiper-item {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
margin-top: 32rpx;
|
|
|
+
|
|
|
.col_selected {
|
|
|
background: #bfd8ff;
|
|
|
}
|
|
|
+
|
|
|
.col {
|
|
|
width: 172rpx;
|
|
|
height: 100%;
|
|
@@ -756,42 +689,51 @@ swiper-item {
|
|
|
align-items: center;
|
|
|
align-content: center;
|
|
|
justify-content: center;
|
|
|
+
|
|
|
.carType-img0 {
|
|
|
width: 133rpx;
|
|
|
height: 45rpx;
|
|
|
}
|
|
|
+
|
|
|
.carType-img1 {
|
|
|
width: 108rpx;
|
|
|
height: 56rpx;
|
|
|
}
|
|
|
+
|
|
|
.carType-img2 {
|
|
|
width: 82rpx;
|
|
|
height: 60rpx;
|
|
|
}
|
|
|
+
|
|
|
.carType-img3 {
|
|
|
width: 86rpx;
|
|
|
height: 59rpx;
|
|
|
}
|
|
|
+
|
|
|
.carType-typeName {
|
|
|
color: #333;
|
|
|
font-size: 26rpx;
|
|
|
}
|
|
|
+
|
|
|
.carType-title {
|
|
|
color: #333;
|
|
|
font-size: 26rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.point {
|
|
|
width: 690rpx;
|
|
|
margin: 0 auto;
|
|
|
height: 16rpx;
|
|
|
display: flex;
|
|
|
position: relative;
|
|
|
+
|
|
|
image {
|
|
|
width: 30rpx;
|
|
|
height: 14rpx;
|
|
|
}
|
|
|
+
|
|
|
.point-area {
|
|
|
width: 25%;
|
|
|
display: flex;
|
|
@@ -810,11 +752,13 @@ swiper-item {
|
|
|
overflow-y: scroll;
|
|
|
height: 800rpx;
|
|
|
}
|
|
|
+
|
|
|
.custom-tabs {
|
|
|
/deep/ .van-tabs__line {
|
|
|
background: #498ef5;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.tab-container {
|
|
|
width: 690rpx;
|
|
|
display: flex;
|
|
@@ -823,9 +767,11 @@ swiper-item {
|
|
|
align-items: flex-start;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.vant-tab {
|
|
|
height: 100px;
|
|
|
}
|
|
|
+
|
|
|
.video-box {
|
|
|
background-color: #ffffff;
|
|
|
display: flex;
|
|
@@ -836,6 +782,7 @@ swiper-item {
|
|
|
margin-bottom: 30rpx;
|
|
|
z-index: 0;
|
|
|
justify-content: space-between;
|
|
|
+
|
|
|
.custom-video-topbottom ::v-deep .video-item {
|
|
|
margin-right: 0;
|
|
|
margin-bottom: 0;
|