图书分类
This commit is contained in:
@@ -231,6 +231,11 @@
|
||||
<text v-for="item in tagList" :key="item.splId" :class="[tabsid == item.splId ? 'cur' :'']" @click="tabsChange(item)">{{item.labelName}}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="scroll-view_H " scroll-x="true" scroll-left="0" v-if="tabsid == 16">
|
||||
<view class="wzProTabs">
|
||||
<text v-for="item in wztaglist" :key="item.splId" :class="[wztabsid == item.splId ? 'cur' :'']" @click="wztabsChange(item)">{{item.labelName}}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 商品展示 -->
|
||||
<view class="goods">
|
||||
<!-- 精选 -->
|
||||
@@ -325,6 +330,12 @@
|
||||
color: '#54a966',
|
||||
},
|
||||
tagList:[] ,// 推荐标签列表
|
||||
wztaglist:[
|
||||
{splId:"",labelName:"全部"},
|
||||
{splId:"5",labelName:"文学"},
|
||||
{splId:"6",labelName:"哲学"},
|
||||
],
|
||||
wztabsid: '',
|
||||
pageSize:10,
|
||||
page:1,
|
||||
totalPage:0,
|
||||
@@ -438,11 +449,19 @@
|
||||
});
|
||||
},
|
||||
tabsChange(item){
|
||||
this.tjProList = []
|
||||
this.tabsid = item.splId
|
||||
this.page = 1
|
||||
// 获取推荐数据
|
||||
this.getJtData()
|
||||
this.tjProList = []
|
||||
this.tabsid = item.splId
|
||||
this.wztabsid = ''
|
||||
this.page = 1
|
||||
// 获取推荐数据
|
||||
this.getJtData()
|
||||
},
|
||||
wztabsChange(item){
|
||||
this.tjProList = []
|
||||
this.wztabsid = item.splId
|
||||
this.page = 1
|
||||
// 获取推荐数据
|
||||
this.getJtData()
|
||||
},
|
||||
getJtData(){
|
||||
this.$http
|
||||
@@ -450,7 +469,8 @@
|
||||
.post('book/label/getProductsByLabel',{
|
||||
'splId': this.tabsid,
|
||||
'limit': this.pageSize,
|
||||
'page': this.page
|
||||
'page': this.page,
|
||||
'type': this.wztabsid
|
||||
})
|
||||
.then(res => {
|
||||
|
||||
@@ -774,6 +794,15 @@
|
||||
color: #55aa7f; margin-right: 10rpx;}
|
||||
text.cur{background-color:#55aa7f ; color: #fff;}
|
||||
}
|
||||
.wzProTabs{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding:0 20rpx;
|
||||
text{padding: 8rpx 14rpx; font-size: 32rpx; display: inline-block; border-radius: 10rpx; overflow: hidden;
|
||||
// background-color: #eee;
|
||||
color: #55aa7f; margin-right: 10rpx;}
|
||||
text.cur{background-color:#55aa7f ; color: #fff;}
|
||||
}
|
||||
// .newBook{margin-top: 10rpx;}
|
||||
.scroll-view_H{background-color: #fff;white-space: nowrap;
|
||||
padding:10rpx ; margin-top: 12rpx;}
|
||||
|
||||
Reference in New Issue
Block a user