|
@@ -13,7 +13,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<swiper @change="change" :current="isActive" class="swiper-content scroll-view-css">
|
|
<swiper @change="change" :current="isActive" class="swiper-content scroll-view-css">
|
|
|
<swiper-item class="swiperitem-content scroll-view-css" v-for="(item,index) in swiper_data" :key="index">
|
|
<swiper-item class="swiperitem-content scroll-view-css" v-for="(item,index) in swiper_data" :key="index">
|
|
|
- <scroll-view :scroll-y="true" class="scroll-view-css p-12-24 box-border-box">
|
|
|
|
|
|
|
+ <scroll-view v-if="item!==''" :scroll-y="true" class="scroll-view-css p-12-24 box-border-box">
|
|
|
<view class="item-goods-box b-rad-20 bgc-f p-24 box-border-box mb-32">
|
|
<view class="item-goods-box b-rad-20 bgc-f p-24 box-border-box mb-32">
|
|
|
<view class="fs-36 fw-600 fc-3 letter-spacing-3 mb-18">
|
|
<view class="fs-36 fw-600 fc-3 letter-spacing-3 mb-18">
|
|
|
{{item.title}}
|
|
{{item.title}}
|
|
@@ -74,7 +74,8 @@
|
|
|
{{item_item.name}}
|
|
{{item_item.name}}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="align-items-center flex-justify-space goods-info" v-for="(goods_item,goods_index) in item_item.goods" :key="goods_index">
|
|
|
|
|
|
|
+ <view class="align-items-center flex-justify-space goods-info"
|
|
|
|
|
+ v-for="(goods_item,goods_index) in item_item.goods" :key="goods_index">
|
|
|
<view class="">
|
|
<view class="">
|
|
|
{{goods_item.name}}
|
|
{{goods_item.name}}
|
|
|
</view>
|
|
</view>
|
|
@@ -117,7 +118,8 @@
|
|
|
<view class="mb-10 fs-30 fw-600 fc-3">
|
|
<view class="mb-10 fs-30 fw-600 fc-3">
|
|
|
使用规则
|
|
使用规则
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="align-items-center mb-10" v-for="(use_message_item,use_message_index) in item.use_message" :key="use_message_index">
|
|
|
|
|
|
|
+ <view class="align-items-center mb-10"
|
|
|
|
|
+ v-for="(use_message_item,use_message_index) in item.use_message" :key="use_message_index">
|
|
|
<view class="d"></view>
|
|
<view class="d"></view>
|
|
|
<view class="">
|
|
<view class="">
|
|
|
{{use_message_item.notice}}
|
|
{{use_message_item.notice}}
|
|
@@ -148,7 +150,8 @@
|
|
|
contentScrollW: 0, // 导航区宽度
|
|
contentScrollW: 0, // 导航区宽度
|
|
|
scrollLeft: 0, // 横向滚动条位置
|
|
scrollLeft: 0, // 横向滚动条位置
|
|
|
isActive: 0,
|
|
isActive: 0,
|
|
|
- swiper_data: []
|
|
|
|
|
|
|
+ swiper_data: [],
|
|
|
|
|
+ goodsList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad(data) {
|
|
onLoad(data) {
|
|
@@ -245,30 +248,39 @@
|
|
|
console.log(this.scrollLeft);
|
|
console.log(this.scrollLeft);
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- groupIndexGoods() {
|
|
|
|
|
|
|
+ groupIndexGoods() {
|
|
|
groupIndexGoods({
|
|
groupIndexGoods({
|
|
|
goods_id: this.goods_id,
|
|
goods_id: this.goods_id,
|
|
|
shop_id: this.shop_id
|
|
shop_id: this.shop_id
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.code === 1) {
|
|
if (res.code === 1) {
|
|
|
this.sift_data = res.data
|
|
this.sift_data = res.data
|
|
|
- this.swiper_data = []
|
|
|
|
|
this.sift_data.forEach((v, k) => {
|
|
this.sift_data.forEach((v, k) => {
|
|
|
- this.groupInfo(v.id)
|
|
|
|
|
|
|
+ this.groupInfo(v.id)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
groupInfo(goodsId) {
|
|
groupInfo(goodsId) {
|
|
|
- groupInfo({
|
|
|
|
|
- id: goodsId,
|
|
|
|
|
- shop_id: this.shop_id
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.code === 1) {
|
|
|
|
|
- if (res.data.usable_time === 2) {
|
|
|
|
|
- res.data.timeData = this.setTimeData(res.data.usable_time_arr)
|
|
|
|
|
- }
|
|
|
|
|
- this.swiper_data.push(res.data)
|
|
|
|
|
|
|
+ groupInfo({
|
|
|
|
|
+ id: goodsId,
|
|
|
|
|
+ shop_id: this.shop_id
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
|
+ // if (res.data.usable_time === 2) {
|
|
|
|
|
+ // res.data.timeData = this.setTimeData(res.data.usable_time_arr)
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.swiper_data.push(res.data)
|
|
|
|
|
+ this.goodsList[goodsId]=res.data
|
|
|
|
|
+ this.setGoods()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ setGoods(){
|
|
|
|
|
+ this.swiper_data=[]
|
|
|
|
|
+ this.goodsList.forEach(goods=>{
|
|
|
|
|
+ if (goods!==''){
|
|
|
|
|
+ this.swiper_data.push(goods)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -277,13 +289,14 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
- .d{
|
|
|
|
|
|
|
+ .d {
|
|
|
width: 10rpx;
|
|
width: 10rpx;
|
|
|
height: 10rpx;
|
|
height: 10rpx;
|
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
|
background: #ccc;
|
|
background: #ccc;
|
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.swiper-goods {
|
|
.swiper-goods {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 470rpx;
|
|
height: 470rpx;
|
|
@@ -330,10 +343,12 @@
|
|
|
.max-w-200:last-child {
|
|
.max-w-200:last-child {
|
|
|
margin-right: 0;
|
|
margin-right: 0;
|
|
|
}
|
|
}
|
|
|
- .goods-info{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .goods-info {
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
}
|
|
|
- .goods-info:last-child{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .goods-info:last-child {
|
|
|
padding-bottom: 10rpx;
|
|
padding-bottom: 10rpx;
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
border-bottom: 1rpx solid #F9F9F9;
|
|
border-bottom: 1rpx solid #F9F9F9;
|