This commit is contained in:
parent
1a9e57c88f
commit
5160c52ad4
|
|
@ -136,32 +136,32 @@
|
||||||
<text class="brand-more">更多 ></text>
|
<text class="brand-more">更多 ></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 品牌特卖分页轮播 (以店铺为单位整体翻页) -->
|
||||||
|
<swiper class="brand-goods-swiper" :indicator-dots="true" indicator-active-color="#ff416c">
|
||||||
|
<swiper-item v-for="(shop, sIdx) in brandSaleShops" :key="sIdx">
|
||||||
<!-- 品牌主推位 -->
|
<!-- 品牌主推位 -->
|
||||||
<view class="brand-highlight">
|
<view class="brand-highlight">
|
||||||
<image class="highlight-bg" :src="brandFeature.bg" mode="aspectFill"></image>
|
<image class="highlight-bg" :src="shop.bg" mode="aspectFill"></image>
|
||||||
<view class="highlight-content">
|
<view class="highlight-content">
|
||||||
<view class="brand-logo-white-box">
|
<view class="brand-logo-white-box">
|
||||||
<image class="brand-logo-img" :src="brandFeature.logo" mode="aspectFit"></image>
|
<image class="brand-logo-img" :src="shop.logo" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="brand-feature-info">
|
<view class="brand-feature-info">
|
||||||
<view class="brand-name-row">
|
<view class="brand-name-row">
|
||||||
<text>{{ brandFeature.name }}</text>
|
<text>{{ shop.name }}</text>
|
||||||
<text class="arrow">></text>
|
<text class="arrow">></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="brand-discount-text">{{ brandFeature.desc }}</view>
|
<view class="brand-discount-text">{{ shop.desc }}</view>
|
||||||
<view class="brand-promo-tags">
|
<view class="brand-promo-tags">
|
||||||
<text class="p-tag">抢限量大额券</text>
|
<text class="p-tag" v-for="(tag, tIdx) in shop.tags" :key="tIdx">{{ tag }}</text>
|
||||||
<text class="p-tag">霸榜天猫3大榜单</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 品牌商品分页轮播 -->
|
<!-- 品牌商品格子 -->
|
||||||
<swiper class="brand-goods-swiper" :indicator-dots="true" indicator-active-color="#ff416c">
|
|
||||||
<swiper-item v-for="(p, pIdx) in 1" :key="pIdx">
|
|
||||||
<view class="brand-goods-grid">
|
<view class="brand-goods-grid">
|
||||||
<view class="brand-grid-item" v-for="(goods, gIdx) in brandGoods" :key="gIdx">
|
<view class="brand-grid-item" v-for="(goods, gIdx) in shop.items" :key="gIdx">
|
||||||
<view class="b-img-wrap">
|
<view class="b-img-wrap">
|
||||||
<view class="anniversary-tag">
|
<view class="anniversary-tag">
|
||||||
<text class="a-icon">🎂</text>
|
<text class="a-icon">🎂</text>
|
||||||
|
|
@ -278,38 +278,7 @@
|
||||||
{ logo: 'https://cdn-icons-png.flaticon.com/512/732/732244.png', image: 'https://images.unsplash.com/photo-1583743814966-8936f5b7be1a?w=400&q=80', price: '89.0', oldPrice: '299' },
|
{ logo: 'https://cdn-icons-png.flaticon.com/512/732/732244.png', image: 'https://images.unsplash.com/photo-1583743814966-8936f5b7be1a?w=400&q=80', price: '89.0', oldPrice: '299' },
|
||||||
{ logo: 'https://cdn-icons-png.flaticon.com/512/732/732221.png', image: 'https://images.unsplash.com/photo-1511556532299-8f662fc26c06?w=400&q=80', price: '129', oldPrice: '499' }
|
{ logo: 'https://cdn-icons-png.flaticon.com/512/732/732221.png', image: 'https://images.unsplash.com/photo-1511556532299-8f662fc26c06?w=400&q=80', price: '129', oldPrice: '499' }
|
||||||
],
|
],
|
||||||
brandFeature: {
|
brandSaleShops: [],
|
||||||
bg: 'https://images.unsplash.com/photo-1556228720-195a672e8a03?w=800&q=80',
|
|
||||||
logo: 'https://images.unsplash.com/photo-1560155016-bd4879ae8f21?w=200&q=80',
|
|
||||||
name: '贝德美',
|
|
||||||
desc: '不只4.1折! 婴童洗护心选'
|
|
||||||
},
|
|
||||||
brandGoods: [
|
|
||||||
{
|
|
||||||
img: 'https://images.unsplash.com/photo-1556228453-efd6c1ff04f6?w=300&q=80',
|
|
||||||
sold: '1.0万',
|
|
||||||
title: '【6月+可用】...',
|
|
||||||
promo: '官方立减10元',
|
|
||||||
price: '19.9',
|
|
||||||
coupon: 30
|
|
||||||
},
|
|
||||||
{
|
|
||||||
img: 'https://images.unsplash.com/photo-1556228515-919086f6f273?w=300&q=80',
|
|
||||||
sold: '70.0万',
|
|
||||||
title: '【0岁+可用】...',
|
|
||||||
promo: '立减10元+领10',
|
|
||||||
price: '24',
|
|
||||||
coupon: 10
|
|
||||||
},
|
|
||||||
{
|
|
||||||
img: 'https://images.unsplash.com/photo-1594820878367-0676999d734f?w=300&q=80',
|
|
||||||
sold: '30.0万',
|
|
||||||
title: '【贝德美】婴...',
|
|
||||||
promo: '官方立减10元',
|
|
||||||
price: '24',
|
|
||||||
coupon: 10
|
|
||||||
}
|
|
||||||
],
|
|
||||||
platformActive: 0,
|
platformActive: 0,
|
||||||
goodsList: []
|
goodsList: []
|
||||||
}
|
}
|
||||||
|
|
@ -405,26 +374,21 @@
|
||||||
uni.request({
|
uni.request({
|
||||||
url: 'https://api.cmspro.haodanku.com/brandItem/choiceness?cid=qOstW90',
|
url: 'https://api.cmspro.haodanku.com/brandItem/choiceness?cid=qOstW90',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.data && res.data.code === 200 && res.data.data.deserve_lists.length > 0) {
|
if (res.data && res.data.code === 200 && res.data.data.brand_prefecture) {
|
||||||
const firstItem = res.data.data.deserve_lists[0];
|
this.brandSaleShops = res.data.data.brand_prefecture.map(shop => ({
|
||||||
const act = firstItem.activity_info || {};
|
bg: shop.backimage || 'https://images.unsplash.com/photo-1556228720-195a672e8a03?w=800&q=80',
|
||||||
|
logo: shop.brand_logo || 'https://images.unsplash.com/photo-1560155016-bd4879ae8f21?w=200&q=80',
|
||||||
// 映射主推位信息
|
name: shop.fq_brand_name || '大牌特卖',
|
||||||
this.brandFeature = {
|
desc: shop.title || '官方直降 爆款秒杀',
|
||||||
bg: act.long_img || 'https://images.unsplash.com/photo-1556228720-195a672e8a03?w=800&q=80',
|
tags: shop.label ? shop.label.slice(0, 2) : ['抢限量大额券', '霸榜天猫3大榜单'],
|
||||||
logo: act.top_icon || firstItem.itempic,
|
items: (shop.items || []).slice(0, 3).map(goods => ({
|
||||||
name: act.name || firstItem.shopname,
|
img: goods.itempic,
|
||||||
desc: act.guide_article || '官方直降 爆款秒杀'
|
title: goods.itemshorttitle,
|
||||||
};
|
sold: goods.itemsale >= 10000 ? (goods.itemsale / 10000).toFixed(1) + '万' : goods.itemsale,
|
||||||
|
promo: goods.couponmoney ? '领' + goods.couponmoney + '元券' : '官方直降',
|
||||||
// 映射下方商品 (取前3个)
|
price: goods.itemendprice,
|
||||||
this.brandGoods = res.data.data.deserve_lists.slice(0, 3).map(item => ({
|
coupon: goods.couponmoney
|
||||||
img: item.itempic,
|
}))
|
||||||
title: item.itemshorttitle,
|
|
||||||
sold: item.itemsale >= 10000 ? (item.itemsale / 10000).toFixed(1) + '万' : item.itemsale,
|
|
||||||
promo: item.activity_info ? item.activity_info.guide_article : '官方立减',
|
|
||||||
price: item.itemendprice,
|
|
||||||
coupon: item.couponmoney
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1126,11 +1090,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-highlight {
|
.brand-highlight {
|
||||||
height: 220rpx;
|
height: 180rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight-bg {
|
.highlight-bg {
|
||||||
|
|
@ -1152,8 +1116,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-logo-white-box {
|
.brand-logo-white-box {
|
||||||
width: 160rpx;
|
width: 130rpx;
|
||||||
height: 160rpx;
|
height: 130rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -1164,8 +1128,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-logo-img {
|
.brand-logo-img {
|
||||||
width: 120rpx;
|
width: 100rpx;
|
||||||
height: 120rpx;
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-feature-info {
|
.brand-feature-info {
|
||||||
|
|
@ -1207,7 +1171,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-goods-swiper {
|
.brand-goods-swiper {
|
||||||
height: 440rpx;
|
height: 700rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-goods-grid {
|
.brand-goods-grid {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue