diff --git a/api/activity.js b/api/activity.js
index 523c518..f3dcc8b 100644
--- a/api/activity.js
+++ b/api/activity.js
@@ -24,6 +24,11 @@ export const list = () => {
load: false
})
}
+//秒杀商品列表
+export const sharplist = (data) => {
+ console.log(data)
+ return request.get(api.list, data)
+}
// 秒杀活动首页
export const data = () => {
return request.get(api.data, {}, {
diff --git a/pages/activity/seckill.vue b/pages/activity/seckill.vue
index 6971c63..c184fa2 100644
--- a/pages/activity/seckill.vue
+++ b/pages/activity/seckill.vue
@@ -4,27 +4,22 @@
-
+
-
-
-
-
-
- {{item.active_time}}
-
-
- {{item.status_text}}
-
-
+
+
+ {{item.active_time}}
-
-
+
+ {{item.status_text}}
+
+
+
@@ -130,7 +125,7 @@
background: 'url(https://www.royaum.com.cn/static/rank/rank1.png) center top no-repeat',
backgroundSize: '100% auto',
},
- backgroundImg: '',
+ backgroundImg:'',
}
},
/**
@@ -164,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)
@@ -188,12 +183,13 @@
getListData(pageNo = 1) {
const app = this
const activeTimeId = app.getCurTabbarId()
+ let pamars = {
+ // store_id: 10001,
+ activeTimeId: activeTimeId,
+ }
+ console.log(activeTimeId)
return new Promise((resolve, reject) => {
- Api.list(activeTimeId, {
- page: pageNo
- }, {
- load: false
- })
+ Api.sharplist(pamars)
.then(result => {
// 合并新数据
let newList = result.data.list
@@ -230,10 +226,12 @@
// 点击切换标签(会场场次)
handleTab(index) {
const app = this
+ console.log(this)
app.curTabIndex = index
- // 刷新列表数据
- app.goodsList = getEmptyPaginateObj()
- app.mescroll.resetUpScroll()
+ app.goodsList = app.getListData()
+ // // 刷新列表数据
+ // app.goodsList = getEmptyPaginateObj()
+ // app.mescroll.resetUpScroll()
},
// 获取当前选择的会场
@@ -244,21 +242,19 @@
// 获取当前会场场次ID
getCurTabbarId() {
const curTabbar = this.getCurTabbar()
+ console.log(curTabbar)
return curTabbar ? curTabbar.active_time_id : 0
},
// 跳转到秒杀商品详情
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/detail?goodsId=' + sharpGoodsId+"&isSeckill="+true+'&isBuy='+count_down_time+'&seckillText='+(this.tabbar[this.curTabIndex].status == this.ActiveStatusEnum.STATE_BEGIN.value ? '结束' : '开始' )
})
},
-
-
+
+
// 设置微信公众号链接分享卡片内容
setWxofficialShareData() {
this.updateShareCardData({
@@ -302,10 +298,12 @@
width: 100%;
height: 100%;
}
-
+ .active{
+ background-color: #A9A9A9;
+ }
.title {
width: 100%;
- height: 220rpx;
+ height: 500rpx;
position: relative;
.bgImg {
@@ -333,41 +331,45 @@
.time {
display: flex;
align-items: center;
- padding: 0 24rpx;
- align-items: center;
+ width: 100%;
+ //justify-content: space-around;
z-index: 30;
-
- .typeList {
- white-space: nowrap;
- }
-
+ overflow: auto;
+ bottom: 0;
+ position: absolute;
.timeItem {
- margin-right: 15rpx;
+ margin-bottom: 5px;
.num {
- width: 135rpx;
+ width: 150rpx;
font-size: 28rpx;
font-weight: 500;
- color: #FFFFFF;
+ color: #C3C3C3;
line-height: 33rpx;
text-shadow: 0px 0px 11px #FB3A22;
text-align: center;
margin-top: 10rpx;
}
-
+ .numselected{
+ color:#ffffff;
+ }
.desc {
- width: 135rpx;
+ width: 150rpx;
height: 36rpx;
- background: #FFFFFF;
+ //background: #FFFFFF;
border-radius: 62rpx 62rpx 62rpx 62rpx;
opacity: 1;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
- color: #FB3D27;
+ color: #C3C3C3;
line-height: 36rpx;
margin-top: 10rpx;
text-align: center;
}
+ .descselected{
+ color:#FB3D27;
+ background: #FFFFFF;
+ }
}
}
}
@@ -425,7 +427,6 @@
.goodsList {
overflow: hidden;
-
.goodItem {
width: 686rpx;
height: 342rpx;
@@ -436,12 +437,10 @@
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,7 +471,6 @@
.info {
display: flex;
-
.price {
height: 40rpx;
font-size: 28rpx;
@@ -491,7 +489,6 @@
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;
@@ -534,13 +531,12 @@
background-size: 100% 100%;
.killPrice {
- font-size: 24rpx;
+ font-size: 20rpx;
font-weight: 500;
color: #FF423D;
margin-left: 26rpx;
-
- text {
- font-size: 36rpx;
+ text{
+ font-size: 34rpx;
}
}