337 lines
8.4 KiB
Vue
337 lines
8.4 KiB
Vue
<template>
|
||
<view style="background-color: #EBF4F7;letter-spacing: 1rpx;">
|
||
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
|
||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
|
||
<view style="padding-left: 15rpx;" @click="goBack()">
|
||
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
|
||
</view>
|
||
<view class="tn-margin-top"
|
||
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
|
||
|
||
<tn-tabs :list="[{name:'会员名录'}]" :current="topCurrent" activeColor="#000" :bold="false"
|
||
:fontSize="36"></tn-tabs>
|
||
</view>
|
||
</view>
|
||
</tn-nav-bar>
|
||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||
<view class="tn-flex tn-flex-col-center tn-flex-row-between" style="padding: 30rpx;">
|
||
<view>
|
||
<text>河南省青年企业家协会</text>
|
||
<text class="tn-icon-down-triangle"></text>
|
||
</view>
|
||
<view>
|
||
<text>筛选</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="tn-classify__container">
|
||
<view class="tn-classify__container__wrap tn-flex tn-flex-nowrap tn-flex-row-around"
|
||
style="height: 100vh;background-color: #EBF4F7;">
|
||
<!-- 左边容器 -->
|
||
<scroll-view class="tn-classify__left-box left-width" scroll-y scroll-with-animation>
|
||
<view v-for="(item, index) in tabbar" :key="index" :id="`tabbar_item_${index}`"
|
||
style="padding-left: 20rpx;" class="tn-classify__tabbar__item tn-flex tn-flex-col-center"
|
||
:class="[tabbarItemClass(index)]" @tap.stop="clickClassifyNav(index)">
|
||
<view class="tn-classify__tabbar__item__title">{{ item }}</view>
|
||
</view>
|
||
</scroll-view>
|
||
|
||
<!-- 右边容器 -->
|
||
<scroll-view class="tn-classify__right-box" scroll-y>
|
||
<block>
|
||
<view class="tn-classify__content">
|
||
<!-- 分类内容子栏目 -->
|
||
<view class="tn-classify__content__sub-classify__content ">
|
||
<view v-for="(item,index) in list" :key="index">
|
||
<view
|
||
style="font-weight: 300;;background-color: #EBF4F7;color:#4AA2EF;width: 100%;height: 60rpx;line-height: 60rpx;text-align: center;">
|
||
{{item.name}}
|
||
</view>
|
||
<view v-for="(v,k) in item.list" @click="tn('/pages/index/user_info')"
|
||
class="tn-classify__content__sub-classify__content__item tn-flex tn-flex-center tn-flex-col-center">
|
||
<!-- 标题,有需要可以显示出来 -->
|
||
<view style="width: 100rpx;height: 100rpx">
|
||
<image src="/static/u1.jpg"
|
||
style="width: 100rpx;height: 100rpx;border-radius:50%;">
|
||
</image>
|
||
</view>
|
||
<view style="margin-left: 20rpx;">
|
||
<view style="font-size: 28rpx;">
|
||
<text>{{v.name}}</text>
|
||
<text style="margin-left: 50rpx;">{{v.family}}</text>
|
||
</view>
|
||
<view style="font-size: 24rpx;margin-top: 10rpx;">
|
||
<text>{{v.desc}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
</view>
|
||
</block>
|
||
</scroll-view>
|
||
</view>
|
||
</view>
|
||
<view style="line-height: 40rpx;text-align: center;position: fixed;bottom:15%;right: 20rpx;width: 120rpx;height: 120rpx;border-radius: 50%;background: linear-gradient(270deg, #EE7E45, #EE9657);
|
||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.2);">
|
||
<view style="color: #fff;letter-spacing: 2rpx;padding: 20rpx;font-size: 32rpx;">申请入会
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
data() {
|
||
return {
|
||
tabbar: [
|
||
'房产建设行业',
|
||
'服务行业',
|
||
'高新技术行业',
|
||
'教育文卫行业',
|
||
'能源生产供应',
|
||
'农林牧渔',
|
||
'物流贸易行业',
|
||
'信息行业',
|
||
'制造行业',
|
||
],
|
||
list: [{
|
||
name: '主任',
|
||
list: [{
|
||
'name': '朱荣梅',
|
||
'family': '汉族',
|
||
'desc': '康桥集团执行总裁'
|
||
}]
|
||
}, {
|
||
name: '副主任',
|
||
list: [{
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}, {
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}]
|
||
}, {
|
||
name: '会员',
|
||
list: [{
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}, {
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}, {
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}, {
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}, {
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}, {
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}, {
|
||
'name': '李小冰',
|
||
'family': '汉族',
|
||
'desc': '恒达集团(控股)有限公司董事长'
|
||
}]
|
||
}],
|
||
topCurrent: 0,
|
||
tabbarIndex: 0,
|
||
// 分类菜单item的信息
|
||
tabbarItemInfo: [],
|
||
// scrollView的top值
|
||
scrollViewBasicTop: 0,
|
||
// scrollView的高度
|
||
scrollViewHeight: 0,
|
||
// 左边scrollView的滚动高度
|
||
leftScrollViewTop: 0,
|
||
// 右边scrollView的滚动高度
|
||
rightScrollViewTop: 0,
|
||
// 当前选中的tabbar序号
|
||
currentTabbarIndex: 0
|
||
}
|
||
},
|
||
computed: {
|
||
tabbarItemClass() {
|
||
return index => {
|
||
if (index === this.currentTabbarIndex) {
|
||
return 'tn-classify__tabbar__item--active tn-bg-white'
|
||
} else {
|
||
let clazz = ''
|
||
if (this.currentTabbarIndex > 0 && index === this.currentTabbarIndex - 1) {
|
||
clazz += ' tn-classify__tabbar__item--active--prev'
|
||
}
|
||
if (this.currentTabbarIndex < this.tabbar.length && index === this.currentTabbarIndex + 1) {
|
||
clazz += ' tn-classify__tabbar__item--active--next'
|
||
}
|
||
return clazz
|
||
}
|
||
}
|
||
}
|
||
},
|
||
mounted() {
|
||
|
||
},
|
||
methods: {
|
||
clickClassifyNav(index) {
|
||
this.currentTabbarIndex = index
|
||
//this.handleLeftScrollView(index)
|
||
//this.switchClassifyContent();
|
||
},
|
||
// 点击分类后,处理scrollView滚动到居中位置
|
||
handleLeftScrollView(index) {
|
||
const tabbarItemTop = this.tabbarItemInfo[index].top - this.scrollViewBasicTop
|
||
if (tabbarItemTop > this.scrollViewHeight / 2) {
|
||
this.leftScrollViewTop = tabbarItemTop - (this.scrollViewHeight / 2) + this.tabbarItemInfo[index]
|
||
.height
|
||
} else {
|
||
this.leftScrollViewTop = 0
|
||
}
|
||
},
|
||
// 切换对应分类的数据
|
||
switchClassifyContent() {
|
||
this.rightScrollViewTop = 1
|
||
this.$nextTick(() => {
|
||
this.rightScrollViewTop = 0
|
||
})
|
||
//this.classifyContent.subClassify[0].title = this.tabbar[this.currentTabbarIndex]
|
||
},
|
||
tn(url) {
|
||
uni.navigateTo({
|
||
url: url
|
||
})
|
||
},
|
||
goBack() {
|
||
if (getCurrentPages().length > 1) {
|
||
uni.navigateBack()
|
||
} else {
|
||
uni.redirectTo({
|
||
url: '/pages/index/index'
|
||
})
|
||
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
|
||
<style lang="scss" scoped>
|
||
/* 自定义导航栏内容 start */
|
||
.custom-nav {
|
||
height: 100%;
|
||
|
||
&__back {
|
||
margin: auto 30rpx;
|
||
margin-right: 10rpx;
|
||
flex-basis: 5%;
|
||
width: 100rpx;
|
||
position: absolute;
|
||
}
|
||
}
|
||
|
||
|
||
.left-width {
|
||
flex-basis: 42%;
|
||
}
|
||
|
||
/* 自定义导航栏内容 end */
|
||
.tn-classify {
|
||
|
||
/* 搜索栏 start */
|
||
|
||
|
||
/* 搜索栏 end */
|
||
|
||
/* 分类列表和内容 strat */
|
||
&__container {}
|
||
|
||
&__left-box {}
|
||
|
||
&__right-box {
|
||
background-color: #FFFFFF;
|
||
}
|
||
|
||
/* 分类列表和内容 end */
|
||
|
||
/* 侧边导航 start */
|
||
&__tabbar {
|
||
&__item {
|
||
height: 90rpx;
|
||
|
||
&:first-child {
|
||
border-top-right-radius: 0rpx;
|
||
}
|
||
|
||
&:last-child {
|
||
border-bottom-right-radius: 0rpx;
|
||
}
|
||
|
||
&--active {
|
||
background-color: #FFFFFF;
|
||
position: relative;
|
||
// font-weight: bold;
|
||
color: #4AA2EF;
|
||
|
||
&--prev {
|
||
border-bottom-right-radius: 26rpx;
|
||
}
|
||
|
||
&--next {
|
||
border-top-right-radius: 26rpx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 侧边导航 end */
|
||
|
||
/* 分类内容 start */
|
||
&__content {
|
||
margin: 18rpx;
|
||
|
||
/* 推荐商品 start */
|
||
&__recomm {
|
||
margin-bottom: 40rpx;
|
||
|
||
&__swiper {}
|
||
}
|
||
|
||
/* 推荐商品 end */
|
||
|
||
/* 子栏目 start */
|
||
&__sub-classify {
|
||
margin-bottom: 20rpx;
|
||
padding-bottom: 40rpx;
|
||
|
||
&--title {
|
||
font-weight: bold;
|
||
margin-bottom: 18rpx;
|
||
|
||
}
|
||
|
||
&__content {
|
||
|
||
&__item {
|
||
padding: 20rpx;
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 子栏目 end */
|
||
}
|
||
|
||
/* 分类内容 end */
|
||
}
|
||
</style> |