|
|
|
@ -4,13 +4,13 @@ |
|
|
|
|
<u-navbar title="限时秒杀" back-icon-color="#fff" :border-bottom="false" title-color="#fff" |
|
|
|
|
:background="background"></u-navbar> |
|
|
|
|
</view> |
|
|
|
|
<view class="title" :style="{backgroundImage:'url('+backgroundImg+')'}" style="background-size: 100% 100%;" > |
|
|
|
|
<view class="title" :style="{backgroundImage:'url('+backgroundImg+')'}" style="background-size: 100% 100%;"> |
|
|
|
|
<image :src="$picUrl+'/static/seckill/topHeader.png'" mode="" class="bgImg"></image> |
|
|
|
|
<view class="limitTitle"> |
|
|
|
|
<image :src="$picUrl+'/static/seckill/limit.png'" mode="" class="img"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="time" v-if="tabbar.length"> |
|
|
|
|
<view class="timeItem" v-for="(item,index) in tabbar" :key="index" @click="handleTab(index)" > |
|
|
|
|
<view class="timeItem" v-for="(item,index) in tabbar" :key="index" @click="handleTab(index)"> |
|
|
|
|
<view class="num" :class="[index==curTabIndex ? 'numselected' : '']"> |
|
|
|
|
{{item.active_time}} |
|
|
|
|
</view> |
|
|
|
@ -32,7 +32,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsList"> |
|
|
|
|
<view class="goodItem" v-for="(item,index) in goodsList" :key="index" |
|
|
|
|
@click="handleTargetGoods(item.goods_id)"> |
|
|
|
|
@click="handleTargetGoods(item.sharp_goods_id)"> |
|
|
|
|
<view class="itemImg"> |
|
|
|
|
<image :src="item.goods_image" mode="widthFix" class="goodsImg"></image> |
|
|
|
|
</view> |
|
|
|
@ -125,7 +125,7 @@ |
|
|
|
|
background: 'url(https://www.royaum.com.cn/static/rank/rank1.png) center top no-repeat', |
|
|
|
|
backgroundSize: '100% auto', |
|
|
|
|
}, |
|
|
|
|
backgroundImg:'', |
|
|
|
|
backgroundImg: '', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
@ -159,8 +159,8 @@ |
|
|
|
|
.then(result => { |
|
|
|
|
app.tabbar = result.data.tabbar; |
|
|
|
|
app.goodsList = result.data.goodsList.data |
|
|
|
|
if(app.goodsList && app.goodsList.length > 0){ |
|
|
|
|
app.goodsList.map(a=>{ |
|
|
|
|
if (app.goodsList && app.goodsList.length > 0) { |
|
|
|
|
app.goodsList.map(a => { |
|
|
|
|
a.original_price = Number(a.original_price) |
|
|
|
|
a.seckill_price_max = Number(a.seckill_price_max) |
|
|
|
|
a.seckill_price_min = Number(a.seckill_price_min) |
|
|
|
@ -248,9 +248,13 @@ |
|
|
|
|
|
|
|
|
|
// 跳转到秒杀商品详情 |
|
|
|
|
handleTargetGoods(sharpGoodsId) { |
|
|
|
|
let count_down_time = new Date(this.tabbar[this.curTabIndex].count_down_time.replace(/-/g, '/')).getTime()-new Date().getTime() |
|
|
|
|
let count_down_time = new Date(this.tabbar[this.curTabIndex].count_down_time.replace(/-/g, '/')) |
|
|
|
|
.getTime() - new Date().getTime() |
|
|
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/goods/detail?goodsId=' + sharpGoodsId+"&isSeckill="+true+'&isBuy='+count_down_time+'&seckillText='+(this.tabbar[this.curTabIndex].status == this.ActiveStatusEnum.STATE_BEGIN.value ? '结束' : '开始' ) |
|
|
|
|
url: '/pages/goods/seckillDetail?activeTimeId=' + this.getCurTabbarId() + '&sharpGoodsId=' + sharpGoodsId + |
|
|
|
|
"&isSeckill=" + true + '&isBuy=' + count_down_time + '&seckillText=' + (this.tabbar[this |
|
|
|
|
.curTabIndex].status == this.ActiveStatusEnum.STATE_BEGIN.value ? '结束' : '开始') |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -298,9 +302,11 @@ |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
} |
|
|
|
|
.active{ |
|
|
|
|
|
|
|
|
|
.active { |
|
|
|
|
background-color: #A9A9A9; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 500rpx; |
|
|
|
@ -337,9 +343,11 @@ |
|
|
|
|
overflow: auto; |
|
|
|
|
bottom: 0; |
|
|
|
|
position: absolute; |
|
|
|
|
|
|
|
|
|
.timeItem { |
|
|
|
|
margin-bottom: 25rpx; |
|
|
|
|
padding: 0 0 0 20rpx; |
|
|
|
|
|
|
|
|
|
.num { |
|
|
|
|
width: 150rpx; |
|
|
|
|
font-size: 40rpx; |
|
|
|
@ -350,9 +358,11 @@ |
|
|
|
|
text-align: center; |
|
|
|
|
margin-top: 10rpx; |
|
|
|
|
} |
|
|
|
|
.numselected{ |
|
|
|
|
color:#ffffff; |
|
|
|
|
|
|
|
|
|
.numselected { |
|
|
|
|
color: #ffffff; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.desc { |
|
|
|
|
width: 150rpx; |
|
|
|
|
height: 40rpx; |
|
|
|
@ -367,8 +377,9 @@ |
|
|
|
|
margin-top: 10rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
.descselected{ |
|
|
|
|
color:#FB3D27; |
|
|
|
|
|
|
|
|
|
.descselected { |
|
|
|
|
color: #FB3D27; |
|
|
|
|
background: #FFFFFF; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -428,6 +439,7 @@ |
|
|
|
|
|
|
|
|
|
.goodsList { |
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
.goodItem { |
|
|
|
|
width: 686rpx; |
|
|
|
|
height: 342rpx; |
|
|
|
@ -438,10 +450,12 @@ |
|
|
|
|
padding: 48rpx 32rpx 36rpx 0; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
margin-top: 22rpx; |
|
|
|
|
|
|
|
|
|
.itemImg { |
|
|
|
|
width: 258rpx; |
|
|
|
|
height: 258rpx; |
|
|
|
|
margin-right: 10rpx; |
|
|
|
|
|
|
|
|
|
.goodsImg { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
@ -472,6 +486,7 @@ |
|
|
|
|
|
|
|
|
|
.info { |
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
|
|
.price { |
|
|
|
|
height: 40rpx; |
|
|
|
|
font-size: 28rpx; |
|
|
|
@ -490,6 +505,7 @@ |
|
|
|
|
background-image: url('https://www.royaum.com.cn/static/seckill/bottom.png'); |
|
|
|
|
background-size: 100% 100%; |
|
|
|
|
margin: 0 12rpx 0 14rpx; |
|
|
|
|
|
|
|
|
|
.delText { |
|
|
|
|
width: 132rpx; |
|
|
|
|
text-align: center; |
|
|
|
@ -536,7 +552,8 @@ |
|
|
|
|
font-weight: 500; |
|
|
|
|
color: #FF423D; |
|
|
|
|
margin-left: 26rpx; |
|
|
|
|
text{ |
|
|
|
|
|
|
|
|
|
text { |
|
|
|
|
font-size: 34rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|