fix:直播活动签到修改

This commit is contained in:
wyx
2023-02-16 10:38:44 +08:00
parent 9e91f41ca7
commit a51d75a8e5
2 changed files with 19 additions and 4 deletions

View File

@@ -87,7 +87,7 @@
<botton
class="btn"
:style="{background: `${isAllowSign ? 'rgb(59, 191, 252)' : '#999' }`,}"
:style="{background: `${data.signFlag ? '#999' :isAllowSign ? 'rgb(59, 191, 252)' : '#999' }`,}"
@click="signClick">
{{ data.signFlag ? "已签到" : "签到" }}
</botton>
@@ -227,8 +227,15 @@ const signClick = () => {
return;
}
data.value.signFlag = 1;
ElMessage.warning("签到成功");
request(TASK_BROADCAST_SIGN, { courseId: liveId, taskId, type });
request(TASK_BROADCAST_SIGN, { courseId: liveId, taskId, type }).then(res=>{
console.log(res)
if(res.code==200){
ElMessage.success("签到成功");
}
}).catch(err=>{
console.log(err)
ElMessage.warning("签到失败");
});
};
let timer = null;
//判断能否签到

View File

@@ -198,11 +198,19 @@ const signClick = (tab, event) => {
}
data.value.signFlag = true;
ElMessage.warning("签到成功");
request(TASK_ACTIVITY_SIGN, {
courseId: activityId,
taskId,
type,
}).then(res=>{
console.log(res)
if(res.code==200){
ElMessage.success("签到成功");
}
}).catch(err=>{
console.log(err)
ElMessage.warning("签到失败");
});
};
let timer = null;