0521
This commit is contained in:
@@ -237,15 +237,16 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0">
|
<scroll-view class="ProTabsBox">
|
||||||
<view class="ProTabs">
|
<view class="New_ProTabs flexbox">
|
||||||
<text v-for="(item,index) in catTagList" :key="item.splId" :class="[tabsid == item.id ? 'cur' :'']"
|
<text v-for="(item,index) in catTagList" :key="item.splId" :class="[tabsid == item.id ? 'cur' :'']"
|
||||||
@click="tabsChange(item,index)">{{item.title}}</text>
|
@click="tabsChange(item,index)">{{item.title}}</text>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="children_cate flexbox" v-if="childrenCatList && childrenCatList.length > 0">
|
<view class="children_cate flexbox" v-if="childrenCatList && childrenCatList.length > 0">
|
||||||
|
|
||||||
<view @click="childrenChange(item,index)" :class="['item',curChildrenId == item.id ? 'cur':'']" v-for="(item, index) in childrenCatList" :key="item.id">
|
<view @click="childrenChange(item,index)" :class="['item',curChildrenId == item.id ? 'cur':'']"
|
||||||
|
v-for="(item, index) in childrenCatList" :key="item.id">
|
||||||
<text>{{item.title}}</text>
|
<text>{{item.title}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -264,7 +265,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="goodsPrice">
|
<view class="goodsPrice">
|
||||||
<span class="price"
|
<span class="price"
|
||||||
v-if="item.activity_price && item.activity_price > 0">¥{{item.activityPrice}}</span>
|
v-if="item.activityPrice && item.activityPrice > 0">¥{{item.activityPrice}}</span>
|
||||||
<span class="price" v-else>¥{{item.price}}</span>
|
<span class="price" v-else>¥{{item.price}}</span>
|
||||||
<span class="Salesnum">已售:{{item.sum_sales}} 件</span>
|
<span class="Salesnum">已售:{{item.sum_sales}} 件</span>
|
||||||
</view>
|
</view>
|
||||||
@@ -395,6 +396,7 @@
|
|||||||
status: 3,
|
status: 3,
|
||||||
userMsg: {}, // 用户信息
|
userMsg: {}, // 用户信息
|
||||||
yxCurIndex: 0, // 当前营销标签序号
|
yxCurIndex: 0, // 当前营销标签序号
|
||||||
|
SystemInfoSync: {}, // 屏幕尺寸
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
@@ -409,7 +411,7 @@
|
|||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
this.page = 1
|
this.page = 1
|
||||||
this.tjProList = []
|
// this.tjProList = []
|
||||||
// if(this.tagList.length > 0){
|
// if(this.tagList.length > 0){
|
||||||
// this.tabsid = this.tagList[0].splId
|
// this.tabsid = this.tagList[0].splId
|
||||||
// }
|
// }
|
||||||
@@ -417,24 +419,32 @@
|
|||||||
//页面显示
|
//页面显示
|
||||||
onShow() {
|
onShow() {
|
||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
this.tjProList = []
|
// this.getUserInfo()
|
||||||
uni.hideTabBar();
|
// this.tjProList = []
|
||||||
this.getData();
|
// uni.hideTabBar();
|
||||||
this.getTags()
|
// this.getData();
|
||||||
this.getUserInfo()
|
// this.getTags()
|
||||||
this.getYXTgs()
|
// this.getYXTgs()
|
||||||
|
this.requestAll()
|
||||||
|
},
|
||||||
|
onTabItemTap() {
|
||||||
|
|
||||||
},
|
},
|
||||||
// 页面加载完毕
|
// 页面加载完毕
|
||||||
onReady() {
|
onReady() {
|
||||||
// this.requestIapOrder()
|
// this.requestIapOrder()
|
||||||
|
// console.log(uni.getSystemInfoSync(), '屏幕')
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.requestAll()
|
||||||
},
|
},
|
||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.page = 1
|
this.page = 1
|
||||||
this.tjProList = []
|
this.tjProList = []
|
||||||
this.getData()
|
|
||||||
this.getTags()
|
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
|
// this.getData()
|
||||||
|
this.getTags()
|
||||||
this.getYXTgs()
|
this.getYXTgs()
|
||||||
// this.requestIapOrder()
|
// this.requestIapOrder()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
@@ -475,12 +485,20 @@
|
|||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setUserInfo']),
|
...mapMutations(['setUserInfo']),
|
||||||
|
requestAll() {
|
||||||
|
this.getUserInfo()
|
||||||
|
this.tjProList = []
|
||||||
|
uni.hideTabBar();
|
||||||
|
// this.getData();
|
||||||
|
this.getTags()
|
||||||
|
this.getYXTgs()
|
||||||
|
},
|
||||||
// 获取营销标签列表
|
// 获取营销标签列表
|
||||||
getYXTgs() {
|
getYXTgs() {
|
||||||
this.$http
|
this.$http
|
||||||
.post('book/labelAndMarket/marketTree')
|
.post('book/labelAndMarket/marketTree')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res, '营销标签列表')
|
// console.log(res, '营销标签列表')
|
||||||
if (res.result.length > 0) {
|
if (res.result.length > 0) {
|
||||||
this.yingxiaoTags = res.result
|
this.yingxiaoTags = res.result
|
||||||
this.getYXproducts()
|
this.getYXproducts()
|
||||||
@@ -494,7 +512,7 @@
|
|||||||
getYXproducts(item) {
|
getYXproducts(item) {
|
||||||
var tag_id = null
|
var tag_id = null
|
||||||
if (!item) {
|
if (!item) {
|
||||||
console.log('没有传参')
|
/// console.log('没有传参')
|
||||||
tag_id = this.yingxiaoTags[0].id
|
tag_id = this.yingxiaoTags[0].id
|
||||||
} else {
|
} else {
|
||||||
tag_id = item.id
|
tag_id = item.id
|
||||||
@@ -504,8 +522,15 @@
|
|||||||
'marketId': tag_id
|
'marketId': tag_id
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res.result, '营销商品列表')
|
if (res.code == 0 && res.result.length > 0) {
|
||||||
this.YXBookList = res.result
|
this.YXBookList = res.result
|
||||||
|
}else{
|
||||||
|
this.YXBookList = []
|
||||||
|
}
|
||||||
|
// console.log(res.result, '营销商品列表')
|
||||||
|
|
||||||
|
}).catch( e =>{
|
||||||
|
this.YXBookList = []
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取用户详情
|
// 获取用户详情
|
||||||
@@ -549,7 +574,7 @@
|
|||||||
this.getJtData(this.childrenCatList[index].id)
|
this.getJtData(this.childrenCatList[index].id)
|
||||||
},
|
},
|
||||||
tabsChange(item, cindex) {
|
tabsChange(item, cindex) {
|
||||||
this.tjProList = []
|
// this.tjProList = []
|
||||||
this.tabsid = item.id
|
this.tabsid = item.id
|
||||||
this.childrenCatList = []
|
this.childrenCatList = []
|
||||||
if (this.catTagList[cindex].isLast == 1) {
|
if (this.catTagList[cindex].isLast == 1) {
|
||||||
@@ -582,10 +607,10 @@
|
|||||||
this.wztabsid = item.splId
|
this.wztabsid = item.splId
|
||||||
this.page = 1
|
this.page = 1
|
||||||
// 获取推荐数据
|
// 获取推荐数据
|
||||||
this.getJtData()
|
// this.getJtData()
|
||||||
},
|
},
|
||||||
getJtData(cid) {
|
getJtData(cid) {
|
||||||
this.tjProList = []
|
|
||||||
this.$http
|
this.$http
|
||||||
// .post('book/label/list',{
|
// .post('book/label/list',{
|
||||||
.post('book/labelAndMarket/getShopProductListByLabelId', {
|
.post('book/labelAndMarket/getShopProductListByLabelId', {
|
||||||
@@ -594,29 +619,30 @@
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0 && res.result.length > 0) {
|
if (res.code == 0 && res.result.length > 0) {
|
||||||
this.tjProList = res.result
|
this.tjProList = res.result
|
||||||
}
|
} else {
|
||||||
else {
|
this.tjProList = []
|
||||||
this.status = 3
|
this.status = 3
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
this.tjProList = []
|
||||||
console.log(e, '商品分类列表报错')
|
console.log(e, '商品分类列表报错')
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取折扣图书
|
// 获取折扣图书
|
||||||
getOffSale() {
|
// getOffSale() {
|
||||||
this.$http
|
// this.$http
|
||||||
.post('book/shopproduct/listactivityprice?limit=10&page=1')
|
// .post('book/shopproduct/listactivityprice?limit=10&page=1')
|
||||||
.then(res => {
|
// .then(res => {
|
||||||
console.log(res, '折扣')
|
// console.log(res, '折扣')
|
||||||
if (res.code == 0 && res.page.list.length > 0) {
|
// if (res.code == 0 && res.page.list.length > 0) {
|
||||||
this.offSaleList = res.page.list
|
// this.offSaleList = res.page.list
|
||||||
this.tabsNumber = 0
|
// this.tabsNumber = 0
|
||||||
}
|
// }
|
||||||
|
|
||||||
}).catch(e => {
|
// }).catch(e => {
|
||||||
console.log(e, 'e')
|
// console.log(e, 'e')
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
// 新书上市
|
// 新书上市
|
||||||
// getNewBook() {
|
// getNewBook() {
|
||||||
// this.$http
|
// this.$http
|
||||||
@@ -882,13 +908,39 @@
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '@/style/mixin.scss';
|
@import '@/style/mixin.scss';
|
||||||
|
|
||||||
.children_cate {
|
.children_cate {
|
||||||
background-color: #fff; justify-items: normal;
|
justify-content: space-evenly;
|
||||||
margin-bottom: 12rpx;
|
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
.item{padding: 10rpx; background-color: #eee;}
|
background-color: #fff;
|
||||||
.cur{ color:#55aa7f ;}
|
display: flex;
|
||||||
|
justify-items: normal;
|
||||||
|
padding-top: 12rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 100%; text-align: center;
|
||||||
|
margin-right: 1px;
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
color: #fff;
|
||||||
|
// background-color: #55aa7f;
|
||||||
|
background-color: #eee;
|
||||||
|
color: #333;
|
||||||
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cur {
|
||||||
|
color: #55aa7f; font-weight: bold;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.fiveIcon {
|
.fiveIcon {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -936,6 +988,7 @@
|
|||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
|
|
||||||
padding: 8rpx 14rpx;
|
padding: 8rpx 14rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -952,6 +1005,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.New_ProTabs {
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #fff;
|
||||||
|
padding-left: 5px; padding-right: 5px;
|
||||||
|
text {
|
||||||
|
// max-width: 12.5%;
|
||||||
|
// background-color: #56565633;
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding: 5px 3px;
|
||||||
|
font-weight: bold;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
// background-color: #eee;
|
||||||
|
color: #333;
|
||||||
|
// white-space:wrap !important;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
text.cur {
|
||||||
|
background-color: #55aa7f;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.wzProTabs {
|
.wzProTabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -1441,6 +1520,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 0 50rpx 0;
|
margin: 0 0 50rpx 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
|
||||||
.goodsItem {
|
.goodsItem {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@@ -707,11 +707,21 @@
|
|||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
|
// 跳转底部导航
|
||||||
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
// uni.switchTab({
|
||||||
|
// url: "/pages/home/home"
|
||||||
|
// });
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/home/home"
|
url: "/pages/home/home",
|
||||||
});
|
success: function () {
|
||||||
}, 2000);
|
let page = getCurrentPages()[0];
|
||||||
|
page.$vm.requestAll();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -767,10 +777,17 @@
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
// uni.switchTab({
|
||||||
|
// url: "/pages/home/home"
|
||||||
|
// });
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/home/home"
|
url: "/pages/home/home",
|
||||||
});
|
success: function () {
|
||||||
}, 2000);
|
let page = getCurrentPages()[0];
|
||||||
|
page.$vm.requestAll();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
Reference in New Issue
Block a user