mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
fix:修改任务频繁点击增加多条问题
This commit is contained in:
@@ -317,6 +317,7 @@ export default {
|
||||
textV2: "",
|
||||
radioV1: "",
|
||||
time: "",
|
||||
isClick: false
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addactiveVisible", false);
|
||||
@@ -464,6 +465,13 @@ export default {
|
||||
return message.warning("请输入活动地址");
|
||||
}
|
||||
|
||||
if(state.isClick){
|
||||
message.destroy();
|
||||
message.error('请勿频繁点击')
|
||||
return
|
||||
}
|
||||
state.isClick = true;
|
||||
|
||||
let obj = {
|
||||
activityAddress: state.inputV3, //活动地址
|
||||
activityDuration: state.inputV2, //活动时长
|
||||
@@ -489,10 +497,12 @@ export default {
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy();
|
||||
message.success("更新成功");
|
||||
state.isClick = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("更新失败");
|
||||
state.isClick = false;
|
||||
});
|
||||
} else {
|
||||
//新建活动信息
|
||||
@@ -504,10 +514,12 @@ export default {
|
||||
closeDrawer();
|
||||
await updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
state.isClick = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("创建失败");
|
||||
state.isClick = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user