|
@@ -2,9 +2,39 @@
|
|
|
<loading v-if="loading"></loading>
|
|
|
|
|
|
<view v-else class="carVideo">
|
|
|
- <topbar>
|
|
|
+ <!-- <topbar>
|
|
|
<van-search shape="round" placeholder="搜索学车视频" @search="search" />
|
|
|
</topbar>
|
|
|
+ <van-tabs id="tabs" :active="active" :sticky="true">
|
|
|
+ <van-tab
|
|
|
+ :title="item.chapterName"
|
|
|
+ v-for="(item, index) in typeList"
|
|
|
+ :key="index"
|
|
|
+ class="vant-tab"
|
|
|
+ >
|
|
|
+ <branch-one
|
|
|
+ v-if="index == 0"
|
|
|
+ :carVideoList="item.children"
|
|
|
+ ></branch-one>
|
|
|
+ <branch-two
|
|
|
+ v-else-if="index == 1"
|
|
|
+ :carVideoList="item.children"
|
|
|
+ ></branch-two>
|
|
|
+ <branch-two
|
|
|
+ v-else-if="index == 2"
|
|
|
+ :carVideoList="item.children"
|
|
|
+ ></branch-two>
|
|
|
+ <branch-one
|
|
|
+ v-else-if="index == 3"
|
|
|
+ :carVideoList="item.children"
|
|
|
+ ></branch-one>
|
|
|
+ <get-cert v-else-if="index == 4"></get-cert>
|
|
|
+ <branch-two v-else :carVideoList="item.children"></branch-two>
|
|
|
+ </van-tab>
|
|
|
+ </van-tabs> -->
|
|
|
+ <topbar>
|
|
|
+ <userInfoHead :userData="userData"></userInfoHead>
|
|
|
+ </topbar>
|
|
|
<view>
|
|
|
<swiper :indicator-dots="true" style="height: 200rpx">
|
|
|
<swiper-item class="swiperBanner">
|
|
@@ -52,7 +82,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="tab">
|
|
|
- <van-tabs class="custom-tabs" :active="active" bind:change="onChange">
|
|
|
+ <van-tabs
|
|
|
+ animated
|
|
|
+ class="custom-tabs"
|
|
|
+ :active="active"
|
|
|
+ id="tabs"
|
|
|
+ bind:change="onChange"
|
|
|
+ :sticky="true"
|
|
|
+ >
|
|
|
<van-tab title="科目一">
|
|
|
<view class="tab-container">
|
|
|
<tab-left :subject="1" :leftList="leftList1"></tab-left>
|
|
@@ -61,28 +98,24 @@
|
|
|
</view>
|
|
|
</van-tab>
|
|
|
<van-tab title="科目二">
|
|
|
- <view v-for="(item, index) in typeList[1]" :key="index">
|
|
|
- <m-video-box
|
|
|
- :column="[2, 1, 3][index % 3]"
|
|
|
- :type="[2, 1, 3][index % 3] == 1 ? 'left-right' : 'top-bottom'"
|
|
|
- :carVideoList="item"
|
|
|
- v-if="item.children.length == 0"
|
|
|
- />
|
|
|
- <VideoListBox :carVideoList="item" v-else />
|
|
|
+ <view v-for="(item, index) in typeList" :key="index">
|
|
|
+ <branch-two
|
|
|
+ v-if="index == 1"
|
|
|
+ :carVideoList="item.children"
|
|
|
+ ></branch-two>
|
|
|
</view>
|
|
|
- <!-- <view class="tab-container">
|
|
|
- <tab-left :leftList="leftList"></tab-left>
|
|
|
- <tab-center :centerList="centerList"></tab-center>
|
|
|
- <tab-right :rightList="rightList"></tab-right>
|
|
|
- </view> -->
|
|
|
</van-tab>
|
|
|
<van-tab title="科目三">
|
|
|
- <!-- <view class="tab-container">
|
|
|
- //不重要的 边角料
|
|
|
- <tab-left :leftList="leftList"></tab-left>
|
|
|
- <tab-center :centerList="centerList"></tab-center>
|
|
|
- <tab-right :rightList="rightList"></tab-right>
|
|
|
- </view> -->
|
|
|
+ <van-grid column-num="4">
|
|
|
+ <van-grid-item @click="goLightMock" icon="photo-o" text="灯光模拟">
|
|
|
+ </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>
|
|
|
+ </view>
|
|
|
</van-tab>
|
|
|
<van-tab title="科目四">
|
|
|
<view class="tab-container">
|
|
@@ -101,10 +134,11 @@ import shortVideo from "./components/shortVideo.vue";
|
|
|
import branchOne from "./components/branchOne.vue";
|
|
|
import branchTwo from "./components/branchTwo.vue";
|
|
|
import banner1 from "@/assets/img/banner1.jpg";
|
|
|
-import Test from "../mockExam/test.vue";
|
|
|
import tabLeft from "./components/tabLeft.vue";
|
|
|
import tabRight from "./components/tabRight.vue";
|
|
|
import TabCenter from "./components/tabCenter.vue";
|
|
|
+import VideoListBox from "./components/videoListBox.vue";
|
|
|
+import userInfoHead from "./components/userInfoHead.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
shortVideo,
|
|
@@ -113,6 +147,8 @@ export default {
|
|
|
tabLeft,
|
|
|
TabCenter,
|
|
|
tabRight,
|
|
|
+ VideoListBox,
|
|
|
+ userInfoHead,
|
|
|
},
|
|
|
data: () => ({
|
|
|
//科目一
|
|
@@ -130,7 +166,7 @@ export default {
|
|
|
{
|
|
|
img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/NotesBeforeExamination@2x.png",
|
|
|
text: "考前须知",
|
|
|
- path: "/otherPages/marked/index?markdown=学车必看",
|
|
|
+ path: "/otherPages/marked/index?markdown=考前须知",
|
|
|
},
|
|
|
{
|
|
|
img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/LearnToSee@2x.png",
|
|
@@ -152,7 +188,7 @@ export default {
|
|
|
{
|
|
|
img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/SequentialPractice@2x.png",
|
|
|
text: "顺序练习",
|
|
|
- path: "",
|
|
|
+ path: "/pages/classifyOrder/index",
|
|
|
},
|
|
|
{
|
|
|
img: "https://t1-1305573081.file.myqcloud.com/wxapp/static/imgs/home/ClassificationExercise@2x.png",
|
|
@@ -260,9 +296,9 @@ export default {
|
|
|
typeIcon: null,
|
|
|
typeSort: 0,
|
|
|
status: "0",
|
|
|
- children:[]
|
|
|
+ children: [],
|
|
|
},
|
|
|
- {
|
|
|
+ {
|
|
|
id: 2,
|
|
|
typeName: "科目二",
|
|
|
pid: 0,
|
|
@@ -270,9 +306,9 @@ export default {
|
|
|
typeIcon: null,
|
|
|
typeSort: 0,
|
|
|
status: "0",
|
|
|
- children:[]
|
|
|
+ children: [],
|
|
|
},
|
|
|
- {
|
|
|
+ {
|
|
|
id: 3,
|
|
|
typeName: "科目三",
|
|
|
pid: 0,
|
|
@@ -280,9 +316,9 @@ export default {
|
|
|
typeIcon: null,
|
|
|
typeSort: 0,
|
|
|
status: "0",
|
|
|
- children:[]
|
|
|
+ children: [],
|
|
|
},
|
|
|
- {
|
|
|
+ {
|
|
|
id: 4,
|
|
|
typeName: "科目四",
|
|
|
pid: 0,
|
|
@@ -290,23 +326,42 @@ export default {
|
|
|
typeIcon: null,
|
|
|
typeSort: 0,
|
|
|
status: "0",
|
|
|
- children:[]
|
|
|
+ children: [],
|
|
|
},
|
|
|
],
|
|
|
loading: true,
|
|
|
banner1,
|
|
|
query: {},
|
|
|
}),
|
|
|
+ computed: {
|
|
|
+ userData() {
|
|
|
+ return this.$store.state.user.userInfo || {};
|
|
|
+ },
|
|
|
+ },
|
|
|
+ // onLoad() {
|
|
|
+ // //获取code
|
|
|
+ // wx.login({
|
|
|
+ // success(res) {
|
|
|
+ // console.log(res);
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // },
|
|
|
|
|
|
async mounted() {
|
|
|
let { data } = await this.$api.carVideo.getTreeList();
|
|
|
this.typeList = data;
|
|
|
this.loading = false;
|
|
|
+ this.$store.dispatch("GetInfo");
|
|
|
this.$nextTick(() => {
|
|
|
this.selectComponent("#tabs").resize();
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ goLightMock(e) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/lightMock/index",
|
|
|
+ });
|
|
|
+ },
|
|
|
goAprilExam() {
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/extraWeb/index?src=https://mn.zzxcx.net/#/aprilExam/test",
|