|
@@ -1,28 +1,27 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
<el-row>
|
|
|
- <el-col :span="24" class="con">
|
|
|
+ <el-col :span="24" class="main">
|
|
|
<el-col :span="24" class="top">
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="info">
|
|
|
<span v-if="itemIndex == 0">
|
|
|
<onlineEx :province="province" :place="place"></onlineEx>
|
|
|
</span>
|
|
|
- <span v-if="itemIndex == 1">
|
|
|
- <channel :province="province" :place="place"></channel>
|
|
|
+ <span v-else-if="itemIndex == 1">
|
|
|
+ <channel></channel>
|
|
|
</span>
|
|
|
- <span v-if="itemIndex == 2">
|
|
|
+ <span v-else-if="itemIndex == 2">
|
|
|
<span v-if="chooseText == '嘉宾访谈'">
|
|
|
<interview></interview>
|
|
|
</span>
|
|
|
<span v-else-if="chooseText == '技能培训'">
|
|
|
<skill></skill>
|
|
|
</span>
|
|
|
- <!-- <training :province="province" :place="place" :chooseText="chooseText"> </training> -->
|
|
|
</span>
|
|
|
- <span v-if="itemIndex == 3">
|
|
|
- <roadshow :province="province" :place="place"></roadshow>
|
|
|
+ <span v-else-if="itemIndex == 3">
|
|
|
+ <roadshow></roadshow>
|
|
|
</span>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="foot">
|
|
@@ -31,7 +30,7 @@
|
|
|
<van-tabbar-item icon="search">科技频道</van-tabbar-item>
|
|
|
<van-tabbar-item icon="friends-o" class="train" @click="trainClick"
|
|
|
>培训访谈
|
|
|
- <el-col :span="4" class="itemCon" v-if="show">
|
|
|
+ <el-col :span="4" class="itemCon" v-if="trainShow">
|
|
|
<el-col :span="24" class="text" @click.native.stop="interviewClick('嘉宾访谈')">嘉宾访谈</el-col>
|
|
|
<el-col :span="24" class="text" @click.native.stop="interviewClick('技能培训')">技能培训</el-col>
|
|
|
</el-col>
|
|
@@ -73,12 +72,12 @@ export default {
|
|
|
onlineEx,
|
|
|
//科技频道
|
|
|
channel,
|
|
|
- //项目路演
|
|
|
- roadshow,
|
|
|
//嘉宾访谈
|
|
|
interview,
|
|
|
//技能培训
|
|
|
skill,
|
|
|
+ //项目路演
|
|
|
+ roadshow,
|
|
|
},
|
|
|
data: function() {
|
|
|
return {
|
|
@@ -88,16 +87,18 @@ export default {
|
|
|
isleftarrow: '',
|
|
|
// 返回
|
|
|
navShow: true,
|
|
|
- //底部标签
|
|
|
- active: 0,
|
|
|
- //默认显示item的index值
|
|
|
- itemIndex: 0,
|
|
|
// 省
|
|
|
province: [],
|
|
|
// 市
|
|
|
place: [],
|
|
|
+ //底部标签
|
|
|
+ active: 0,
|
|
|
+ //默认显示item的index值
|
|
|
+ itemIndex: 0,
|
|
|
+ // 培训访谈菜单显示
|
|
|
+ trainShow: false,
|
|
|
+ // 菜单选择
|
|
|
chooseText: '',
|
|
|
- show: false,
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -106,54 +107,43 @@ export default {
|
|
|
methods: {
|
|
|
...mapMutations(['setUser']),
|
|
|
...place({ palcequery: 'query', transactiondtetle: 'delete' }),
|
|
|
+ // 查询省市
|
|
|
async searchPlace() {
|
|
|
- let res1 = await this.palcequery({ level: 1 });
|
|
|
+ let res = await this.palcequery({ level: 1 });
|
|
|
let arr = await this.palcequery({ level: 2 });
|
|
|
- if (res1 || arr) {
|
|
|
- this.$set(this, `province`, res1.data);
|
|
|
+ if (res || arr) {
|
|
|
+ this.$set(this, `province`, res.data);
|
|
|
this.$set(this, `place`, arr.data);
|
|
|
}
|
|
|
},
|
|
|
- sesstoken() {
|
|
|
- if (this.token) {
|
|
|
- sessionStorage.setItem('token', this.token);
|
|
|
- let user = jwt.decode(this.token);
|
|
|
- if (user && user.uid) {
|
|
|
- this.setUser(user);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
//点击底部标签显示对应的组件
|
|
|
clickItem(index) {
|
|
|
- // console.log(index);
|
|
|
this.$set(this, `itemIndex`, index);
|
|
|
- if (index == 0) {
|
|
|
- this.$set(this, `show`, false);
|
|
|
- this.$set(this, `title`, '在线展会');
|
|
|
- } else if (index == 1) {
|
|
|
- this.$set(this, `show`, false);
|
|
|
- this.$set(this, `title`, '科技频道');
|
|
|
- } else if (index == 2) {
|
|
|
- this.$set(this, `title`, '培训访谈');
|
|
|
- // if (this.chooseText == '嘉宾访谈') {
|
|
|
- // this.$set(this, `title`, '嘉宾访谈');
|
|
|
- // console.log(this.title);
|
|
|
- // } else if (this.chooseText == '技能培训') {
|
|
|
- // this.$set(this, `title`, '技能培训');
|
|
|
- // }
|
|
|
- } else if (index == 3) {
|
|
|
- this.$set(this, `show`, false);
|
|
|
- this.$set(this, `title`, '项目路演');
|
|
|
- }
|
|
|
+ this.$set(this, `trainShow`, false);
|
|
|
+ if (index == 0) this.$set(this, `title`, '在线展会');
|
|
|
+ else if (index == 1) this.$set(this, `title`, '科技频道');
|
|
|
+ else if (index == 2) this.$set(this, `title`, '培训访谈');
|
|
|
+ else if (index == 3) this.$set(this, `title`, '项目路演');
|
|
|
+ },
|
|
|
+ // 点击培训访谈
|
|
|
+ trainClick() {
|
|
|
+ this.trainShow = true;
|
|
|
},
|
|
|
//嘉宾访谈和技能培训
|
|
|
interviewClick(name) {
|
|
|
- this.$set(this, `show`, false);
|
|
|
+ this.$set(this, `trainShow`, false);
|
|
|
this.$set(this, `chooseText`, name);
|
|
|
this.$set(this, `title`, name);
|
|
|
},
|
|
|
- trainClick() {
|
|
|
- this.show = true;
|
|
|
+ // 获取用户
|
|
|
+ sesstoken() {
|
|
|
+ if (this.token) {
|
|
|
+ sessionStorage.setItem('token', this.token);
|
|
|
+ let user = jwt.decode(this.token);
|
|
|
+ if (user && user.uid) {
|
|
|
+ this.setUser(user);
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
@@ -178,42 +168,45 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.con {
|
|
|
+.main {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
position: relative;
|
|
|
background-color: #f9fafc;
|
|
|
-}
|
|
|
-.top {
|
|
|
- height: 46px;
|
|
|
- overflow: hidden;
|
|
|
- position: relative;
|
|
|
- z-index: 999;
|
|
|
-}
|
|
|
-.train {
|
|
|
- position: relative;
|
|
|
-}
|
|
|
-// .itemCon_active {
|
|
|
-// display: block;
|
|
|
-// }
|
|
|
-.itemCon {
|
|
|
- width: 100px;
|
|
|
- height: 87px;
|
|
|
- padding: 13px;
|
|
|
- // background-color: gold;
|
|
|
- position: absolute;
|
|
|
- left: -6px;
|
|
|
- bottom: 50px;
|
|
|
- box-shadow: 0px -1px 5px;
|
|
|
- z-index: 999;
|
|
|
- background-color: #fff;
|
|
|
- .text {
|
|
|
- color: #646566;
|
|
|
- font-size: 14px;
|
|
|
- line-height: 30px;
|
|
|
- height: 30px;
|
|
|
- text-align: center;
|
|
|
- // background: green;
|
|
|
+ .top {
|
|
|
+ height: 46px;
|
|
|
+ overflow: hidden;
|
|
|
+ position: relative;
|
|
|
+ z-index: 999;
|
|
|
+ }
|
|
|
+ .info {
|
|
|
+ position: relative;
|
|
|
+ padding: 0 0 40px 0;
|
|
|
+ }
|
|
|
+ .foot {
|
|
|
+ .train {
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .itemCon {
|
|
|
+ position: absolute;
|
|
|
+ z-index: 999;
|
|
|
+ width: 93px;
|
|
|
+ padding: 5px;
|
|
|
+ bottom: 50px;
|
|
|
+ left: 0px;
|
|
|
+ border-radius: 5px;
|
|
|
+ box-shadow: 0 0 5px #ccc;
|
|
|
+ .text {
|
|
|
+ font-size: 15px;
|
|
|
+ color: #666;
|
|
|
+ padding: 8px 0;
|
|
|
+ border-bottom: 1px dashed #ccc;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .text:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|