From 0577300e90d7c2d87bca88a8e90e86ec2fcdaf18 Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Fri, 10 Jul 2020 09:54:07 +0800 Subject: [PATCH] 礼包,通过链接进入的,活动还没有开始,就提示活动还没开始,不能购买 --- pages/giftpack/giftpacklist/giftpacklist.js | 26 ++++++++++++++++++++++++-- pages/giftpack/giftpacklist/giftpacklist.wxml | 13 +++++++------ pages/giftpack/giftpacklist/giftpacklist.wxss | 4 ++++ 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index bedc1bb..05050b3 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -61,6 +61,13 @@ Page({ var that = this.data; var th = this; // var id = e.currentTarget.dataset.id;//活动id + //如果还没有开始的话 + if(th.data.isStart!=1){ + getApp().my_warnning("活动还没有开始", 0, th); + return false; + } + + var money = e.currentTarget.dataset.money; var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( @@ -101,7 +108,7 @@ Page({ getApp().goto(url); }, fail: function(n) { - getApp().my_confirm("取消支付", 0, th); + getApp().my_warnning("取消支付", 0, th); } }); } else { @@ -125,6 +132,12 @@ Page({ GetBuyIntegral: function(e) { var that = this.data; var th = this; + + //如果还没有开始的话 + if(th.data.isStart!=1){ + getApp().my_warnning("活动还没有开始", 0, th); + return false; + } // var id = e.currentTarget.dataset.id;//活动id var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( @@ -260,6 +273,14 @@ Page({ }) } + var isStart=0; + var now=ut.gettimestamp(); + + var str = res.data.data.starTime.replace(/-/g,'/'); + var start = Date.parse(new Date(str)); + start = start / 1000; + if(start{{giftTitle}} - {{"兑换截至时间:"+giftDate}} + {{"兑换截至时间:"+giftDate}} + {{"活动结束至时间:"+giftDate}} @@ -102,22 +103,22 @@ - - 立即购买 + + 立即购买 - + 立即兑换 - + 立即购买 - + 立即兑换 diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxss b/pages/giftpack/giftpacklist/giftpacklist.wxss index be61320..26e7cbb 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.wxss +++ b/pages/giftpack/giftpacklist/giftpacklist.wxss @@ -197,6 +197,7 @@ font-size: 28rpx; line-height: 70rpx; border-radius: 40rpx; + margin-right: 20rpx; } .foot_button_right.data-v-3a5b7e36 { @@ -243,3 +244,6 @@ page.data-v-3a5b7e36 { .overdue.data-v-3a5b7e36{ background-color: rgb(153,153,153); } + +.foot_button_left.data-v-3a5b7e36.gray{ background-color: #aaa; } +.foot_button_right.data-v-3a5b7e36.gray{ background-color: #aaa;} -- libgit2 0.21.4