wangfukang 3 weeks ago
parent
commit
963595cebd
  1. 51
      pages/index/index.vue

51
pages/index/index.vue

@ -139,7 +139,7 @@
</view>
</view>
<view class="like-box">
<view class="like-content-box">
<view class="like-content-box" :class="{'like-content-box--ad-closed': !homeCenterAdEnabled}">
<view class="brand-memory-strip">
<view class="campus-switch campus-switch--strip" @tap.stop="checkArea">
<text class="campus-switch-name">{{areaName || '选择区域'}}</text>
@ -151,11 +151,11 @@
<view class="heat-dot heat-dot-b"></view>
<view class="seckill-entry-light"></view>
<view class="seckill-entry-info" style="padding-left: 20rpx;">
<view class="seckill-entry-title">极速团</view>
<view class="seckill-entry-title">参与拼团</view>
</view>
<view class="seckill-entry-btn">抢</view>
<view class="seckill-entry-btn">省</view>
</view>
<swiper v-if="homeCenterAds.length > 4" class="group-flat-row group-flat-row--swiper"
<swiper v-if="homeCenterAdEnabled && homeCenterAds.length > 4" class="group-flat-row group-flat-row--swiper"
circular :autoplay="true" :interval="2600" :duration="500" :display-multiple-items="4"
:indicator-dots="false">
<swiper-item class="flat-card-swiper-item" v-for="(item,index) in homeCenterAds" :key="index">
@ -165,6 +165,7 @@
<view class="flat-card-tag">🔥 <text class="flat-card-origin-price">¥{{item.productList && item.productList[0] ? item.productList[0].originalPrice : ''}}</text></view>
</view>
<view class="flat-card-name">{{item.title}}</view>
<view class="flat-card-merchant" v-if="item.merchantName">{{item.merchantName}}</view>
<view class="flat-card-price">¥{{item.productList && item.productList[0] ? item.productList[0].groupPrice : ''}}</view>
<view class="flat-card-foot">
<text>{{item.productList && item.productList[0] ? item.productList[0].groupMembers : ''}}人团</text>
@ -173,13 +174,14 @@
</view>
</swiper-item>
</swiper>
<view v-else class="group-flat-row">
<view v-else-if="homeCenterAdEnabled" class="group-flat-row">
<view class="flat-card" v-for="(item,index) in homeCenterAds" :key="index" @tap="goAdPage(item)">
<view class="flat-card-img">
<img :src="item.adDisplayImage" alt="">
<view class="flat-card-tag">🔥 <text class="flat-card-origin-price">¥{{item.productList && item.productList[0] ? item.productList[0].originalPrice : ''}}</text></view>
</view>
<view class="flat-card-name">{{item.title}}</view>
<view class="flat-card-merchant" v-if="item.merchantName">{{item.merchantName}}</view>
<view class="flat-card-price">¥{{item.productList && item.productList[0] ? item.productList[0].groupPrice : ''}}</view>
<view class="flat-card-foot">
<text>{{item.productList && item.productList[0] ? item.productList[0].groupMembers : ''}}人团</text>
@ -720,6 +722,7 @@
indicatorDots: false,
autoplay: true,
mallAds: [],
homeCenterAdEnabled: true,
homePopupAd: {},
deliveryItem: [],
rejectOrderSubmittingMap: {},
@ -1947,6 +1950,7 @@
if (res.code == 200) {
that.homeReminders = res.result.homeReminders || {}
that.handleHomePopupAd(res.result.homePopupAd)
that.homeCenterAdEnabled = res.result.homeCenterAdEnabled !== false
that.mallAds = res.result.mallAds || []
that.applyCachedAdImages(that.mallAds)
for(let i=0;i<that.mallAds.length;i++){
@ -3735,7 +3739,7 @@
}
.seckill-entry {
width: 198rpx;
width: 220rpx;
height: 56rpx;
padding: 0 10rpx;
box-sizing: border-box;
@ -3862,6 +3866,10 @@
position: relative;
}
.like-content-box--ad-closed {
height: 96rpx;
}
.brand-memory-strip {
position: absolute;
left: 20rpx;
@ -3925,7 +3933,7 @@
min-width: 0;
height: 95%;
margin: 0 6rpx;
padding: 12rpx 12rpx 16rpx;
padding: 12rpx 12rpx 12rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
@ -3977,9 +3985,9 @@
}
.flat-card-name {
margin-top: 12rpx;
height: 34rpx;
line-height: 34rpx;
margin-top: 8rpx;
height: 30rpx;
line-height: 30rpx;
font-size: 23rpx;
font-weight: 900;
color: #173f36;
@ -3989,11 +3997,24 @@
text-overflow: ellipsis;
}
.flat-card-merchant {
margin-top: 8rpx;
height: 22rpx;
line-height: 22rpx;
font-size: 18rpx;
font-weight: 700;
color: rgba(23, 63, 54, 0.56);
text-align: left;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.flat-card-price {
height: 40rpx;
line-height: 40rpx;
margin-top: 4rpx;
font-size: 27rpx;
height: 34rpx;
line-height: 34rpx;
margin-top: 6rpx;
font-size: 29rpx;
font-weight: 900;
color: #ff6a23;
text-align: left;
@ -4026,7 +4047,7 @@
justify-content: center;
flex: 0 0 60rpx;
width: 60rpx;
height: 36rpx;
height: 32rpx;
margin-left: 8rpx;
border-radius: 999rpx;
border: 1px solid rgba(165, 255, 226, 0.9);

Loading…
Cancel
Save