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);
|
console.log(errors);
|
||||||
// message.error("handleFinishFailed");
|
// message.error("handleFinishFailed");
|
||||||
};
|
};
|
||||||
const updateTask = (res) => {
|
const updateTask = async (res) => {
|
||||||
if (props.isLevel == 1) {
|
if (props.isLevel == 1) {
|
||||||
RouterEditTask({
|
RouterEditTask({
|
||||||
chapterId: props.isactive,
|
chapterId: props.isactive,
|
||||||
@@ -186,9 +186,9 @@ export default {
|
|||||||
routerTaskId: props.routerTaskId || 0,
|
routerTaskId: props.routerTaskId || 0,
|
||||||
type: 7,
|
type: 7,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
// message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
// message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||||
ctx.emit("changeData", false);
|
await ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
})
|
})
|
||||||
@@ -254,18 +254,18 @@ export default {
|
|||||||
if (props.edit) {
|
if (props.edit) {
|
||||||
api
|
api
|
||||||
.updateLinks(obj)
|
.updateLinks(obj)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
} else {
|
} else {
|
||||||
api
|
api
|
||||||
.createExternalChain(obj)
|
.createExternalChain(obj)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|||||||
Reference in New Issue
Block a user