diff --git a/src/api/indexExternalChain.js b/src/api/indexExternalChain.js index 9de46f42..653a5883 100644 --- a/src/api/indexExternalChain.js +++ b/src/api/indexExternalChain.js @@ -1,19 +1,39 @@ import http from "./config"; //创建外链接口 -export const createExternalChain = (obj) => http.post('/link/createLinks', obj) +export const createExternalChain = (obj) => http.post('/link/createLinks', obj, { + headers: { + 'token': '123' + } +}) //外链信息删除接口 -export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj }) +export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj }, { + headers: { + 'token': '123' + } +}) //获取外链详细信息接口 export const getLink = (obj) => http.post('/link/getOne', { params: obj }) // 更新外链数据 -export const updateLinks = (obj) => http.post('/link/updateLinks', obj) +export const updateLinks = (obj) => http.post('/link/updateLinks', obj, { + headers: { + 'token': '123' + } +}) //修改为必修的接口 -export const updateToCompulsory = (obj) => http.post('/link/updateToCompulsory', { params: obj }) +export const updateToCompulsory = (obj) => http.post('/link/updateToCompulsory', { params: obj }, { + headers: { + 'token': '123' + } +}) //修改为选修的接口 -export const updateToElective = (obj) => http.post('/link/updateToElective', { params: obj }) \ No newline at end of file +export const updateToElective = (obj) => http.post('/link/updateToElective', { params: obj }, { + headers: { + 'token': '123' + } +}) \ No newline at end of file diff --git a/src/api/indexLiveBroadcast.js b/src/api/indexLiveBroadcast.js index ef05e98e..1f5bb7a6 100644 --- a/src/api/indexLiveBroadcast.js +++ b/src/api/indexLiveBroadcast.js @@ -4,10 +4,22 @@ import http from "./config"; export const getLiveBroadcastInfor = (obj) => http.get('/liveBroadcast', { params: obj }) //创建直播接口 -export const createLiveBroadcast = (obj) => http.post('/liveBroadcast/createLiveBroadcast', obj) +export const createLiveBroadcast = (obj) => http.post('/liveBroadcast/createLiveBroadcast', obj, { + headers: { + 'token': '123' + } +}) //直播信息删除接口 -export const deleteLiveBroadcast = (obj) => http.post('/liveBroadcast/deleteLiveBroadcast', obj) +export const deleteLiveBroadcast = (obj) => http.post('/liveBroadcast/deleteLiveBroadcast', obj, { + headers: { + 'token': '123' + } +}) //直播信息修改接口 -export const updateLiveBroadcastMessage = (obj) => http.post('/liveBroadcast/updateLiveBroadcastMessage', obj) \ No newline at end of file +export const updateLiveBroadcastMessage = (obj) => http.post('/liveBroadcast/updateLiveBroadcastMessage', obj, { + headers: { + 'token': '123' + } +}) \ No newline at end of file diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index 9845b38c..b92a81fc 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -985,14 +985,7 @@ export default { > 编辑 - { - showDelete(); - deleteEvalText(); - deleteInvistText(); - }} - > + {}}> 删除 @@ -1042,11 +1035,14 @@ export default { const deleteExternalChain = () => { let obj = { linkId: state.deleteExternalID, + // linkId: 11, }; apiExternal .deleteLink(obj) .then((res) => { console.log(res); + //重新获取列表 + getTask(); }) .catch((err) => { console.log(err); @@ -1144,6 +1140,69 @@ export default { }); }; + //编辑直播信息 + const editLiveBroadcast = () => { + let obj = { + afterSignIn: "", + beforeSignIn: "", + createTime: "", + createUser: 0, + liveCover: "", + liveDuration: 0, + liveEndTime: "", + liveExplain: "", + liveFlag: "", + liveId: 0, + liveLink: "", + liveName: "", + livePlayback: "", + livePlaybackLink: "", + liveStartTime: "", + liveTag: "", + liveTeacherId: 0, + otherSettings: "", + signOutTime: "", + standardSettings: "", + updateTime: "", + updateUser: 0, + }; + apilive + .updateLiveBroadcastMessage(obj) + .then((res) => { + console.log(res); + message.success("修改成功"); + }) + .catch((err) => { + console.log(err); + message.warn("修改失败"); + }); + }; + //编辑外链信息 + const editExternal = () => { + let obj = { + createTime: "", + createUser: 0, + linkAddress: "", + linkDescription: "", + linkFlag: "", + linkId: 0, + linkName: "", + linkTag: "", + updateTime: "", + updateUser: 0, + }; + apiExternal + .updateLinks(obj) + .then((res) => { + console.log(res); + message.success("修改成功"); + }) + .catch((err) => { + console.log(err); + message.warn("修改失败"); + }); + }; + //删除评估测试 const deleteInvistText = () => { let obj = { @@ -1295,6 +1354,8 @@ export default { deleteActivity, editEvalPath, deleteInvistText, + editLiveBroadcast, + editExternal, }; }, };