diff --git a/src/api/courseTag.js b/src/api/courseTag.js index d9b8b03f..000ea788 100644 --- a/src/api/courseTag.js +++ b/src/api/courseTag.js @@ -12,10 +12,10 @@ import http from "./config"; export const portalPageList = (obj) => http.get('/admin/courseTag/list', {params: obj}) //改变标签的公共属性 -export const changeTagPublic = (obj = {}) => http.post(`/admin/courseTag/changePublicStatus`, {params: obj}); +export const changeTagPublic = (id = {}) => http.post(`/admin/courseTag/changePublicStatus`, id); //改变标签的热点属性 -export const changeTagHot = (obj = {}) => http.post(`/admin/courseTag/changeHotStatus`, {params: obj}); +export const changeTagHot = (id = {}) => http.post(`/admin/courseTag/changeHotStatus`, id); //查询指定id的标签关联的所有课程 export const showCourseByTag = (obj = {}) => http.post(`/admin/courseTag/showCourseByTag`, {params: obj}); diff --git a/src/views/tag/TagManage.vue b/src/views/tag/TagManage.vue index 6ad87f3c..b96b7318 100644 --- a/src/views/tag/TagManage.vue +++ b/src/views/tag/TagManage.vue @@ -233,25 +233,25 @@ export default { }); const columns = ref([ - { + /*{ title: "标签ID", dataIndex: "id", key: "id", width: 200, align: "center" - }, + },*/ { title: "标签名称", dataIndex: "tagName", key: "tagName", - width: 235, + width: 250, align: "center" }, { title: "已关联课程", dataIndex: "useCount", key: "useCount", - width: 100, + width: 200, align: "center", sorter: true }, @@ -429,7 +429,8 @@ export default { try { // await apiCourseTag.changeTagPublic(record); console.log("修改公共显示 参数 : ",record); - changeTagPublic(record).then ((res) => { + console.log("修改公共显示 参数 : ",record.id); + changeTagPublic(record.id).then ((res) => { console.log("更新公共显示 结果 : ",res); if (res.status === 200) { message.success('更新成功'); @@ -455,7 +456,7 @@ export default { message.warning(res.message); }*/ console.log("修改热点 参数 : ",record); - changeTagHot(record).then ((res) => { + changeTagHot(record.id).then ((res) => { console.log("修改热点 结果 : ",res); if (res.status === 200) { message.success(res.message);