|
@@ -58,7 +58,8 @@
|
|
|
color: '#fff'
|
|
|
}
|
|
|
],
|
|
|
- statusInfo: true
|
|
|
+ statusInfo: true,
|
|
|
+ pointNeedPoint: false
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -70,7 +71,8 @@
|
|
|
const statusInfo = await request.getstatus({ activityId: this.activityId });
|
|
|
res.data.image = BASE_URL.fileUrl + res.data.image;
|
|
|
this.info = res.data;
|
|
|
- this.statusInfo = statusInfo.status
|
|
|
+ this.statusInfo = statusInfo.status;
|
|
|
+ this.pointNeedPoint = false;
|
|
|
const newDateTime = new Date().getTime();
|
|
|
const endTime = Date.parse(res.data.regEndTime);
|
|
|
const startTime = Date.parse(res.data.regStartTime);
|
|
@@ -126,7 +128,13 @@
|
|
|
// this.buttonGroup[1].disable = true;
|
|
|
// }
|
|
|
if(statusInfo.status && newDateTime > startActiveTime){
|
|
|
- this.buttonGroup[1].text = '获取积分';
|
|
|
+ if(res.data.pointHowTo == '1'){
|
|
|
+ this.buttonGroup[1].text = '获取积分';
|
|
|
+ this.pointNeedPoint = true;
|
|
|
+ }else{
|
|
|
+ this.buttonGroup[1].text = '签到';
|
|
|
+ }
|
|
|
+
|
|
|
this.buttonGroup[1].backgroundColor = '#ffa200';
|
|
|
delete this.buttonGroup[1].disable;
|
|
|
}
|
|
@@ -147,7 +155,13 @@
|
|
|
this.report();
|
|
|
} else {
|
|
|
if (e.content.disable) return;
|
|
|
- this.submitPhoto();
|
|
|
+
|
|
|
+ console.log(e.content)
|
|
|
+
|
|
|
+ if(this.pointNeedPoint)
|
|
|
+ this.submitPhoto();
|
|
|
+ else
|
|
|
+ this.submitSignIn();
|
|
|
}
|
|
|
},
|
|
|
async report() {
|
|
@@ -170,6 +184,15 @@
|
|
|
},
|
|
|
async submitPhoto() {
|
|
|
uni.navigateTo({ url: `/pages/activity/uploadFiel?activityId=${this.activityId}` })
|
|
|
+ },
|
|
|
+ async submitSignIn(){
|
|
|
+ const res = await request.signIn({ activityId: this.activityId });
|
|
|
+ if (res.code == 200) {
|
|
|
+ wx.showToast({
|
|
|
+ title: '签到成功'
|
|
|
+ })
|
|
|
+ this.query();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|