更新通证权益相关页面
This commit is contained in:
@@ -87,12 +87,22 @@
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<!-- 行业分类 -->
|
||||
<scroll-view class="industry-tabs" scroll-x>
|
||||
<view class="industry-item" :class="{'show':index === industryIndex}" v-for="(item, index) in industryBus" :key="index" @click="onBusIndustry(index)">{{item.title}}</view>
|
||||
</scroll-view>
|
||||
<v-tabs
|
||||
v-model="industryIndex"
|
||||
:tabs="industryBus"
|
||||
color="#555555"
|
||||
activeColor="#e93340"
|
||||
fontSize="30rpx"
|
||||
height="80rpx"
|
||||
lineHeight="6rpx"
|
||||
lineColor="#e93340"
|
||||
bgColor="#f5f5f5"
|
||||
@change="onBusIndustry"
|
||||
></v-tabs>
|
||||
<!-- 商家 -->
|
||||
<industry-list :list="busList" @on-industry="onOpenWechat"/>
|
||||
<!-- 分页 -->
|
||||
<uni-load-more v-if="busList.length > 0" :status="pageStatus" :iconSize="16"></uni-load-more>
|
||||
</block>
|
||||
<!-- 易货商城 -->
|
||||
<block v-if="tabIndex === 0">
|
||||
@@ -207,16 +217,16 @@
|
||||
coupons : [],
|
||||
position : {},
|
||||
goods : [],
|
||||
goodsPage : 1,
|
||||
// 广场部分
|
||||
industryIndex: 0,
|
||||
recommendBus : [],
|
||||
hotBus : [],
|
||||
industryBus : [],
|
||||
busList : [],
|
||||
busPages : {},
|
||||
busPage : 1,
|
||||
// 分页
|
||||
pageStatus : '',
|
||||
page : 1
|
||||
pageStatus : ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -258,15 +268,21 @@
|
||||
// 企业广场行业
|
||||
onBusIndustry(index){
|
||||
this.industryIndex = index
|
||||
this.busPage = 1
|
||||
this.getCompaniesList()
|
||||
},
|
||||
// 企业列表
|
||||
getCompaniesList(){
|
||||
companiesList({
|
||||
industry_id: this.industryBus[this.industryIndex].industry_id
|
||||
industry_id: this.industryBus[this.industryIndex].industry_id,
|
||||
page : this.busPage
|
||||
}).then(res => {
|
||||
this.busList = res.data
|
||||
this.busPages = res.pages
|
||||
if(res.page.current === 1){
|
||||
this.busList = []
|
||||
}
|
||||
this.busList = this.busList.concat(res.data)
|
||||
this.busPage = res.page.current
|
||||
this.pageStatus = res.page.has_more ? 'more': 'noMore'
|
||||
})
|
||||
},
|
||||
// 易货首页
|
||||
@@ -338,9 +354,15 @@
|
||||
onReachBottom() {
|
||||
if(this.pageStatus == 'more'){
|
||||
this.pageStatus = 'loading'
|
||||
if(this.tabIndex === 0) {
|
||||
this.goodsPage += 1
|
||||
this.getGoods()
|
||||
switch (this.tabIndex){
|
||||
case 0:
|
||||
this.goodsPage += 1
|
||||
this.getGoods()
|
||||
break;
|
||||
case 1:
|
||||
this.busPage += 1
|
||||
this.getCompaniesList()
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -550,25 +572,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
// 行业分类
|
||||
.industry-tabs{
|
||||
white-space:nowrap;
|
||||
.industry-item{
|
||||
margin-left: $margin;
|
||||
display: inline-block;
|
||||
line-height: 50rpx;
|
||||
font-size: $title-size-lg;
|
||||
color: $text-gray;
|
||||
&:last-child{
|
||||
margin-right: $margin;
|
||||
}
|
||||
&.show{
|
||||
color: $text-price;
|
||||
font-size: $title-size;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 热易商家
|
||||
.hot-swiper{
|
||||
margin: 0 $margin $margin $margin;
|
||||
|
||||
Reference in New Issue
Block a user