|
@@ -494,109 +494,129 @@ export default {
|
|
this.xcx_video_open = Number(res.data)
|
|
this.xcx_video_open = Number(res.data)
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.selectComponent("#tabs").resize() // 需要延迟
|
|
this.selectComponent("#tabs").resize() // 需要延迟
|
|
|
|
+
|
|
|
|
+ api.user.getInfo().then(res => {
|
|
|
|
+ uni.setStorageSync("userInfo", res.data);
|
|
|
|
+ this.$store.commit('SET_USERINFO', res.data)
|
|
|
|
+ // if (!res.data.nickName) {
|
|
|
|
+ // uni.showModal({
|
|
|
|
+ // title: "新用户更新信息",
|
|
|
|
+ // confirmText: "去更新",
|
|
|
|
+ // success: function (res) {
|
|
|
|
+ // if (res.confirm) {
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
+ // url:"/otherPages/userInfoAuth/index"
|
|
|
|
+ // })
|
|
|
|
+ // } else if (res.cancel) {
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ })
|
|
|
|
+
|
|
})
|
|
})
|
|
- console.log(this.xcx_video_open)
|
|
|
|
- })
|
|
|
|
- api.user.getInfo().then(res => {
|
|
|
|
- uni.setStorageSync("userInfo", res.data);
|
|
|
|
- this.$store.commit('SET_USERINFO', res.data)
|
|
|
|
- // if (!res.data.nickName) {
|
|
|
|
- // uni.showModal({
|
|
|
|
- // title: "新用户更新信息",
|
|
|
|
- // confirmText: "去更新",
|
|
|
|
- // success: function (res) {
|
|
|
|
- // if (res.confirm) {
|
|
|
|
- // uni.navigateTo({
|
|
|
|
- // url:"/otherPages/userInfoAuth/index"
|
|
|
|
- // })
|
|
|
|
- // } else if (res.cancel) {
|
|
|
|
-
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // }
|
|
|
|
})
|
|
})
|
|
- // this.$nextTick(() => {
|
|
|
|
- // this.selectComponent("#tabs").resize();
|
|
|
|
- // });
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- clickCell(carVideoList) {
|
|
|
|
- this.$utils.route.goPage(`/pages/carVideo/moreVideo?active=${this.active}`, null, {
|
|
|
|
- carVideoList: carVideoList,
|
|
|
|
- active: this.active
|
|
|
|
- });
|
|
|
|
|
|
+
|
|
|
|
+ // api.user.getInfo().then(res => {
|
|
|
|
+ // uni.setStorageSync("userInfo", res.data);
|
|
|
|
+ // this.$store.commit('SET_USERINFO', res.data)
|
|
|
|
+ // // if (!res.data.nickName) {
|
|
|
|
+ // // uni.showModal({
|
|
|
|
+ // // title: "新用户更新信息",
|
|
|
|
+ // // confirmText: "去更新",
|
|
|
|
+ // // success: function (res) {
|
|
|
|
+ // // if (res.confirm) {
|
|
|
|
+ // // uni.navigateTo({
|
|
|
|
+ // // url:"/otherPages/userInfoAuth/index"
|
|
|
|
+ // // })
|
|
|
|
+ // // } else if (res.cancel) {
|
|
|
|
+
|
|
|
|
+ // // }
|
|
|
|
+ // // }
|
|
|
|
+ // // })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // // }
|
|
|
|
+ // })
|
|
|
|
+ // this.$nextTick(() => {
|
|
|
|
+ // this.selectComponent("#tabs").resize();
|
|
|
|
+ // });
|
|
},
|
|
},
|
|
- goPath(url, extraQuery = {}, needVip = false) {
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ clickCell(carVideoList) {
|
|
|
|
+ this.$utils.route.goPage(`/pages/carVideo/moreVideo?active=${this.active}`, null, {
|
|
|
|
+ carVideoList: carVideoList,
|
|
|
|
+ active: this.active
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ goPath(url, extraQuery = {}, needVip = false) {
|
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url:
|
|
|
|
- url + "?" + utils.mapToUrlQuery({ ...this.tabQuery, ...extraQuery }),
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- scrollTabs(e) {
|
|
|
|
- console.log(e);
|
|
|
|
- },
|
|
|
|
- changeVehicle(item) {
|
|
|
|
- this.tabQuery.vehicle = item.typeName;
|
|
|
|
- this.tabQuery.cert = item.title;
|
|
|
|
- switch (item.typeName) {
|
|
|
|
- case "轿车":
|
|
|
|
- this.tabQuery.liceCar = 1;
|
|
|
|
- this.tabQuery.liceTruck = "";
|
|
|
|
- this.tabQuery.liceBus = "";
|
|
|
|
- this.tabQuery.liceMoto = "";
|
|
|
|
- this.tabQuery.gs = "xc";
|
|
|
|
- break;
|
|
|
|
- case "货车":
|
|
|
|
- this.tabQuery.liceCar = "";
|
|
|
|
- this.tabQuery.liceTruck = 1;
|
|
|
|
- this.tabQuery.liceBus = "";
|
|
|
|
- this.tabQuery.liceMoto = "";
|
|
|
|
- this.tabQuery.gs = "hc";
|
|
|
|
- break;
|
|
|
|
- case "客车":
|
|
|
|
- this.tabQuery.liceCar = "";
|
|
|
|
- this.tabQuery.liceTruck = "";
|
|
|
|
- this.tabQuery.liceBus = 1;
|
|
|
|
- this.tabQuery.liceMoto = "";
|
|
|
|
- this.tabQuery.gs = "kc";
|
|
|
|
- break;
|
|
|
|
- case "摩托车":
|
|
|
|
- this.tabQuery.liceCar = "";
|
|
|
|
- this.tabQuery.liceTruck = "";
|
|
|
|
- this.tabQuery.liceBus = "";
|
|
|
|
- this.tabQuery.liceMoto = 1;
|
|
|
|
- this.tabQuery.gs = "mtc";
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- changeSubject(e) {
|
|
|
|
- this.tabQuery.subject = e.detail.title == '科目一' ? 1 : 4;
|
|
|
|
- this.tabQuery.name = e.detail.title;
|
|
|
|
- },
|
|
|
|
- goLightMock(e) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/lightMock/index",
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- goAprilExam() {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/extraWeb/index?src=https://mn.zzxcx.net/#/aprilExam/test",
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- async search(e) {
|
|
|
|
- let { data } = await this.$api.carVideo.getSearchList(e.detail);
|
|
|
|
- console.log(data);
|
|
|
|
- this.$utils.route.goPage("/pages/carVideo/more", null, {
|
|
|
|
- carVideoList: data,
|
|
|
|
- });
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:
|
|
|
|
+ url + "?" + utils.mapToUrlQuery({ ...this.tabQuery, ...extraQuery }),
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ scrollTabs(e) {
|
|
|
|
+ console.log(e);
|
|
|
|
+ },
|
|
|
|
+ changeVehicle(item) {
|
|
|
|
+ this.tabQuery.vehicle = item.typeName;
|
|
|
|
+ this.tabQuery.cert = item.title;
|
|
|
|
+ switch (item.typeName) {
|
|
|
|
+ case "轿车":
|
|
|
|
+ this.tabQuery.liceCar = 1;
|
|
|
|
+ this.tabQuery.liceTruck = "";
|
|
|
|
+ this.tabQuery.liceBus = "";
|
|
|
|
+ this.tabQuery.liceMoto = "";
|
|
|
|
+ this.tabQuery.gs = "xc";
|
|
|
|
+ break;
|
|
|
|
+ case "货车":
|
|
|
|
+ this.tabQuery.liceCar = "";
|
|
|
|
+ this.tabQuery.liceTruck = 1;
|
|
|
|
+ this.tabQuery.liceBus = "";
|
|
|
|
+ this.tabQuery.liceMoto = "";
|
|
|
|
+ this.tabQuery.gs = "hc";
|
|
|
|
+ break;
|
|
|
|
+ case "客车":
|
|
|
|
+ this.tabQuery.liceCar = "";
|
|
|
|
+ this.tabQuery.liceTruck = "";
|
|
|
|
+ this.tabQuery.liceBus = 1;
|
|
|
|
+ this.tabQuery.liceMoto = "";
|
|
|
|
+ this.tabQuery.gs = "kc";
|
|
|
|
+ break;
|
|
|
|
+ case "摩托车":
|
|
|
|
+ this.tabQuery.liceCar = "";
|
|
|
|
+ this.tabQuery.liceTruck = "";
|
|
|
|
+ this.tabQuery.liceBus = "";
|
|
|
|
+ this.tabQuery.liceMoto = 1;
|
|
|
|
+ this.tabQuery.gs = "mtc";
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ changeSubject(e) {
|
|
|
|
+ this.tabQuery.subject = e.detail.title == '科目一' ? 1 : 4;
|
|
|
|
+ this.tabQuery.name = e.detail.title;
|
|
|
|
+ },
|
|
|
|
+ goLightMock(e) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "/pages/lightMock/index",
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ goAprilExam() {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "/pages/extraWeb/index?src=https://mn.zzxcx.net/#/aprilExam/test",
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ async search(e) {
|
|
|
|
+ let { data } = await this.$api.carVideo.getSearchList(e.detail);
|
|
|
|
+ console.log(data);
|
|
|
|
+ this.$utils.route.goPage("/pages/carVideo/more", null, {
|
|
|
|
+ carVideoList: data,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- },
|
|
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|