|
@@ -73,11 +73,16 @@
|
|
|
const newDateTime = new Date().getTime();
|
|
|
const isTime = Date.parse(res.data.regEndTime);
|
|
|
const startTime = Date.parse(res.data.regStartTime);
|
|
|
+ const startActiveTime = Date.parse(res.data.startTime);
|
|
|
+
|
|
|
+ // 报名按钮状态设置
|
|
|
if (!statusInfo.status) {
|
|
|
this.buttonGroup[0].backgroundColor = '#ff0000';
|
|
|
this.buttonGroup[0].text = '报名活动';
|
|
|
delete this.buttonGroup[0].status
|
|
|
delete this.buttonGroup[0].disable
|
|
|
+ this.buttonGroup[1].disable = true;
|
|
|
+ this.buttonGroup[1].backgroundColor = '#999';
|
|
|
}
|
|
|
if (statusInfo.status) {
|
|
|
this.buttonGroup[0].backgroundColor = '#999';
|
|
@@ -96,12 +101,30 @@
|
|
|
this.buttonGroup[0].text = '报名已结束';
|
|
|
this.buttonGroup[0].disable = true;
|
|
|
}
|
|
|
- if (res.data.status == 0) res.data.statusText = '活动未开始';
|
|
|
- if (res.data.status == 3) res.data.statusText = '活动已结束';
|
|
|
- this.buttonGroup[1].text = res.data.statusText;
|
|
|
- if (res.data.status == 0 || res.data.status == 3 || !statusInfo.status) {
|
|
|
+
|
|
|
+ // 活动状态及积分获取按钮状态
|
|
|
+ if (res.data.status == 3) {
|
|
|
+ this.buttonGroup[1].text = '活动已结束';
|
|
|
this.buttonGroup[1].backgroundColor = '#999';
|
|
|
this.buttonGroup[1].disable = true;
|
|
|
+
|
|
|
+ }else if(res.data.status == 0) {
|
|
|
+ if(newDateTime < startActiveTime){
|
|
|
+ this.buttonGroup[1].text = '活动未开始';
|
|
|
+ this.buttonGroup[1].backgroundColor = '#999';
|
|
|
+ this.buttonGroup[1].disable = true;
|
|
|
+ }else{
|
|
|
+ console.log(statusInfo.status, 'statusInfo.status')
|
|
|
+ if(statusInfo.status){
|
|
|
+ this.buttonGroup[1].text = '获取积分';
|
|
|
+ this.buttonGroup[1].backgroundColor = '#ffa200';
|
|
|
+ delete this.buttonGroup[1].disable;
|
|
|
+ }else{
|
|
|
+ this.buttonGroup[1].text = '活动进行中';
|
|
|
+ this.buttonGroup[1].backgroundColor = '#999';
|
|
|
+ this.buttonGroup[1].disable = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
buttonClick(e) {
|