mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
feat:讨论活动的修改接口对接,添加关卡的编辑
This commit is contained in:
@@ -817,9 +817,10 @@ export default {
|
||||
isactive: -1,
|
||||
isActive: false,
|
||||
projectChecked: null, //项目单选框
|
||||
updateChapterID: null, //修改关卡id
|
||||
});
|
||||
|
||||
//新建或编辑关卡
|
||||
//新建关卡
|
||||
const editChapter = () => {
|
||||
if(!state.value1) return message.warning("请输入关卡名称");
|
||||
let obj = {
|
||||
@@ -845,6 +846,25 @@ export default {
|
||||
console.log("创建失败", err);
|
||||
});
|
||||
}
|
||||
|
||||
//编辑关卡
|
||||
const updateChapter = () => {
|
||||
let obj = {
|
||||
chapterId: state.updateChapterID,
|
||||
name: "",
|
||||
remark:"",
|
||||
routerId: 0,
|
||||
};
|
||||
api
|
||||
.updateChapter(obj)
|
||||
.then((res) => {
|
||||
console.log("修改成功",res);
|
||||
message.success("修改成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改失败",err);
|
||||
})
|
||||
};
|
||||
const showDrawer = () => {
|
||||
state.visible = true;
|
||||
};
|
||||
@@ -973,7 +993,9 @@ export default {
|
||||
<span style="color:#4EA6FF;margin-right:25px;cursor:pointer">
|
||||
编辑
|
||||
</span>
|
||||
<span style="color:#4EA6FF;cursor:pointer">删除</span>
|
||||
<span style="color:#4EA6FF;cursor:pointer" onClick={() => {
|
||||
updateChapter();
|
||||
}}>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -1204,6 +1226,7 @@ export default {
|
||||
delete_exit,
|
||||
drawertableColumns,
|
||||
editChapter,
|
||||
updateChapter,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user