新增VIP活动模块
This commit is contained in:
@@ -178,6 +178,26 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- vip活动 -->
|
||||
<view class="superBox" v-if="superList.length > 0">
|
||||
<view class="learnBox">
|
||||
<view class="titleBox flexbox">
|
||||
<image src="../../static/superVip_icon.png" mode="aspectFit"></image>
|
||||
<text>VIP活动</text>
|
||||
</view>
|
||||
|
||||
<view class="super_block">
|
||||
<scroll-view class="scroll-view" scroll-x="true" scroll-left="0">
|
||||
<view class="super_product_list">
|
||||
<view class="super_product_item" v-for="(item,index) in superList" :key="index" @click="goGoodsDetail(item, 0)">
|
||||
<image :src="item.productImages"></image>
|
||||
<text>{{item.productName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 限时秒杀 -->
|
||||
<view class="seckillBox" v-if="seckillList.length > 0">
|
||||
<view class="hightLightTitleBox">
|
||||
@@ -376,7 +396,9 @@
|
||||
//下标
|
||||
currentIndex: 0,
|
||||
currentIndex: null,
|
||||
fixed: null
|
||||
fixed: null,
|
||||
//vip活动
|
||||
superList: []
|
||||
};
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -629,6 +651,7 @@
|
||||
this.getNewsList();
|
||||
// this.getTags()
|
||||
// this.getYXTgs()
|
||||
this.getSuperData();
|
||||
},
|
||||
// 获取医学标签列表
|
||||
getMedicalTags(id) {
|
||||
@@ -691,6 +714,31 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取vip活动商品
|
||||
getSuperData(){
|
||||
$http
|
||||
.request({
|
||||
url: "medical/labelAndMarket/getMarketShopProductList",
|
||||
method: "POST",
|
||||
data: {
|
||||
current: 1,
|
||||
limit: 12,
|
||||
medicineMarketId: "6",
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (res.result.records.length > 0) {
|
||||
this.superList = res.result.records;
|
||||
} else {
|
||||
this.superList = [];
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取秒杀商品列表
|
||||
getSeckill() {
|
||||
$http
|
||||
@@ -700,7 +748,7 @@
|
||||
data: {
|
||||
current: 1,
|
||||
limit: 12,
|
||||
medicineMarketId: "1",
|
||||
medicineMarketId: "1", //vip活动 6
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
@@ -1335,7 +1383,7 @@
|
||||
|
||||
text {
|
||||
font-size: 30rpx;
|
||||
padding-left: 20rpx;
|
||||
padding-left: 10rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
@@ -1831,4 +1879,45 @@
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
}
|
||||
.superBox{
|
||||
padding: 0 5px;
|
||||
}
|
||||
.super_block{
|
||||
margin-top: 20rpx;
|
||||
|
||||
}
|
||||
.scroll-view{
|
||||
|
||||
}
|
||||
.super_product_list{
|
||||
display: inline-flex;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.super_product_item{
|
||||
width: 185rpx;
|
||||
margin-right: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
image{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 185rpx;
|
||||
}
|
||||
text{
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
margin-top: 10rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.super_product_item:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user