mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 00:06:47 +08:00
-- 任务
This commit is contained in:
@@ -176,7 +176,7 @@ export default {
|
||||
console.log(errors);
|
||||
// message.error("handleFinishFailed");
|
||||
};
|
||||
const updateTask = (res) => {
|
||||
const updateTask = async (res) => {
|
||||
if (props.isLevel == 1) {
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
@@ -186,9 +186,9 @@ export default {
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 7,
|
||||
})
|
||||
.then(() => {
|
||||
// message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
.then(async () => {
|
||||
// message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
await ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
state.addLoading = false;
|
||||
})
|
||||
@@ -254,18 +254,18 @@ export default {
|
||||
if (props.edit) {
|
||||
api
|
||||
.updateLinks(obj)
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
message.success("编辑成功");
|
||||
updateTask(res);
|
||||
await updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
api
|
||||
.createExternalChain(obj)
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
message.success("提交成功");
|
||||
updateTask(res);
|
||||
await updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {});
|
||||
|
||||
Reference in New Issue
Block a user