diff --git a/src/api/academician.js b/src/api/academician.js index 476c536..33cd319 100644 --- a/src/api/academician.js +++ b/src/api/academician.js @@ -25,7 +25,7 @@ export const addAcademician = (data) => { // @Summary 删除 // @Produce application/json -// @Param ID int +// @Param id int // @Router /cms/academician/delete [delete] export const deleteAcademician = (data) => { return service({ diff --git a/src/api/adContent.js b/src/api/adContent.js index 898c359..8f8051e 100644 --- a/src/api/adContent.js +++ b/src/api/adContent.js @@ -25,7 +25,7 @@ export const addAdContent = (data) => { // @Summary 删除 // @Produce application/json -// @Param ID int +// @Param id int // @Router /cms/adContent/delete [delete] export const deleteAdContent = (data) => { return service({ diff --git a/src/api/adPosition.js b/src/api/adPosition.js index 7688139..40ae251 100644 --- a/src/api/adPosition.js +++ b/src/api/adPosition.js @@ -25,7 +25,7 @@ export const addAdPosition = (data) => { // @Summary 删除 // @Produce application/json -// @Param ID int +// @Param id int // @Router /cms/adPosition/delete [delete] export const deleteAdPosition = (data) => { return service({ diff --git a/src/api/article.js b/src/api/article.js index 49c4a3c..5aac0ca 100644 --- a/src/api/article.js +++ b/src/api/article.js @@ -25,7 +25,7 @@ export const addArticle = (data) => { // @Summary 删除文章 // @Produce application/json -// @Param ID int +// @Param id int // @Router /cms/article/delete [delete] export const deleteArticle = (data) => { return service({ diff --git a/src/api/category.js b/src/api/category.js index 5c47920..84e4d5f 100644 --- a/src/api/category.js +++ b/src/api/category.js @@ -24,7 +24,7 @@ export const addCategory = (data) => { // @Summary 删除分类 // @Produce application/json -// @Param ID int +// @Param id int // @Router /category/delete [delete] export const deleteCategory = (data) => { return service({ diff --git a/src/api/channel.js b/src/api/channel.js index 3eafd3a..5cc759b 100644 --- a/src/api/channel.js +++ b/src/api/channel.js @@ -24,7 +24,7 @@ export const addChannel = (data) => { // @Summary 删除栏目 // @Produce application/json -// @Param ID int +// @Param id int // @Router /cms/channel/delete [delete] export const deleteChannel = (data) => { return service({ diff --git a/src/api/entrepreneur.js b/src/api/entrepreneur.js index dbdb6ce..b93f794 100644 --- a/src/api/entrepreneur.js +++ b/src/api/entrepreneur.js @@ -25,7 +25,7 @@ export const addEntrepreneur = (data) => { // @Summary 删除 // @Produce application/json -// @Param ID int +// @Param id int // @Router /cms/entrepreneur/delete [delete] export const deleteEntrepreneur = (data) => { return service({ diff --git a/src/api/live.js b/src/api/live.js new file mode 100644 index 0000000..d36b47f --- /dev/null +++ b/src/api/live.js @@ -0,0 +1,63 @@ +import service from '@/utils/request' + +// @Summary 获取列表 +// @Produce application/json +// @Router /cms/live/getList [post] +export const getLiveList = (data) => { + return service({ + url: '/cms/live/getList', + method: 'post', + data + }) +} + +// @Summary 新增 +// @Produce application/json +// @Param menu Object +// @Router /cms/live/add [post] +export const addLive = (data) => { + return service({ + url: '/cms/live/add', + method: 'post', + data + }) +} + +// @Summary 删除 +// @Produce application/json +// @Param ID int +// @Router /cms/live/delete [delete] +export const deleteLive = (data) => { + return service({ + url: '/cms/live/delete', + method: 'delete', + data + }) +} + +// @Summary 修改 +// @Produce application/json +// @Param menu Object +// @Router /cms/live/update [put] +export const updateLive = (data) => { + return service({ + url: '/cms/live/update', + method: 'put', + data + }) +} + +// @Summary 根据id获取 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body api.GetById true "根据id获取" +// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" +// @Router /cms/live/get [get] +export const getLiveById = (params) => { + return service({ + url: '/cms/live/get', + method: 'get', + params + }) +} diff --git a/src/api/menu.js b/src/api/menu.js index 163b5a6..627ade6 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -74,7 +74,7 @@ export const getMenuAuthority = (data) => { // @Summary 删除menu // @Produce application/json -// @Param ID float64 +// @Param id uint // @Router /menu/deleteBaseMenu [post] export const deleteBaseMenu = (data) => { return service({ diff --git a/src/api/organize.js b/src/api/organize.js index 63c9db0..35e3b87 100644 --- a/src/api/organize.js +++ b/src/api/organize.js @@ -40,7 +40,7 @@ export const addOrganize = (data) => { // @Summary 删除部门 // @Produce application/json -// @Param ID int +// @Param id int // @Router /organize/delete [delete] export const deleteOrganize = (data) => { return service({ diff --git a/src/api/sensitiveWords.js b/src/api/sensitiveWords.js index 13f77f2..dd68805 100644 --- a/src/api/sensitiveWords.js +++ b/src/api/sensitiveWords.js @@ -25,7 +25,7 @@ export const addSensitiveWord = (data) => { // @Summary 删除 // @Produce application/json -// @Param ID int +// @Param id int // @Router /cms/sensitiveWord/delete [delete] export const deleteSensitiveWord = (data) => { return service({ diff --git a/src/api/tag.js b/src/api/tag.js index aaa8b0d..a43ba21 100644 --- a/src/api/tag.js +++ b/src/api/tag.js @@ -25,7 +25,7 @@ export const addTag = (data) => { // @Summary 删除 // @Produce application/json -// @Param ID int +// @Param id int // @Router /cms/tag/delete [delete] export const deleteTag = (data) => { return service({ diff --git a/src/view/ad/content.vue b/src/view/ad/content.vue index 98b7231..b1aa9e3 100644 --- a/src/view/ad/content.vue +++ b/src/view/ad/content.vue @@ -135,7 +135,6 @@ const page = ref(1) const total = ref(0) const pageSize = ref(10) const isDateEndGtStart = (rule, value, callback) => { - console.log('isDateEndGtStart', editForm.value.validStart, value) if (value < editForm.value.validStart) { callback(new Error(rule.message)) } else { @@ -317,7 +316,7 @@ const handleDelete = (ID) => { type: 'warning' }) .then(async () => { - const res = await deleteAdContent({ ID }) + const res = await deleteAdContent({ id: ID }) if (res.code === 0) { ElMessage({ type: 'success', @@ -373,7 +372,7 @@ const handleAdd = (id) => { // 修改方法 const handleEdit = async (ID) => { dialogTitle.value = '编辑广告内容' - const res = await getAdContentById({ ID }) + const res = await getAdContentById({ id: ID }) editForm.value = res.data.adContent handleChangePosition(editForm.value.adPositionId) handleChangeAdType(editForm.value.adType) diff --git a/src/view/ad/position.vue b/src/view/ad/position.vue index 9b38235..813bee9 100644 --- a/src/view/ad/position.vue +++ b/src/view/ad/position.vue @@ -172,7 +172,7 @@ const handleCloseDialog = () => { dialogFormVisible.value = false } -// 删除菜单 +// 删除 const handleDelete = (ID) => { ElMessageBox.confirm('此操作将永久删除广告位, 是否继续?', '提示', { confirmButtonText: '确定', @@ -180,7 +180,7 @@ const handleDelete = (ID) => { type: 'warning' }) .then(async () => { - const res = await deleteAdPosition({ ID }) + const res = await deleteAdPosition({ id: ID }) if (res.code === 0) { ElMessage({ type: 'success', @@ -210,7 +210,7 @@ const handleAdd = (id) => { // 修改菜单方法 const handleEdit = async (ID) => { dialogTitle.value = '编辑广告位' - const res = await getAdPositionById({ ID }) + const res = await getAdPositionById({ id: ID }) editForm.value = res.data.adPosition isEdit.value = true dialogFormVisible.value = true diff --git a/src/view/content/academician/index.vue b/src/view/content/academician/index.vue index ffe29b3..2d75de3 100644 --- a/src/view/content/academician/index.vue +++ b/src/view/content/academician/index.vue @@ -180,7 +180,7 @@ const handleRowDelete = (ID) => { cancelButtonText: '取消', type: 'warning' }).then(async valid => { - const res = await deleteAcademician({ ID }) + const res = await deleteAcademician({ id: ID }) if (res.code === 0) { ElMessage({ type: 'success', diff --git a/src/view/content/article/index.vue b/src/view/content/article/index.vue index b4aefb6..ea6e964 100644 --- a/src/view/content/article/index.vue +++ b/src/view/content/article/index.vue @@ -298,7 +298,7 @@ const handleRowDelete = (ID) => { cancelButtonText: '取消', type: 'warning' }).then(async valid => { - const res = await deleteArticle({ ID }) + const res = await deleteArticle({ id: ID }) if (res.code === 0) { ElMessage({ type: 'success', diff --git a/src/view/content/category/index.vue b/src/view/content/category/index.vue index c953ece..9b63841 100644 --- a/src/view/content/category/index.vue +++ b/src/view/content/category/index.vue @@ -185,7 +185,7 @@ const clickDelete = (ID) => { type: 'warning' }) .then(async () => { - const res = await deleteCategory({ ID }) + const res = await deleteCategory({ id: ID }) if (res.code === 0) { ElMessage({ type: 'success', @@ -218,7 +218,7 @@ const clickAdd = (id) => { // 修改方法 const clickEdit = async (ID) => { dialogTitle.value = '编辑分类' - const res = await getCategoryById({ ID }) + const res = await getCategoryById({ id: ID }) form.value = res.data.category isEdit.value = true setOptions() diff --git a/src/view/content/channel/index.vue b/src/view/content/channel/index.vue index 98f930b..ddf907e 100644 --- a/src/view/content/channel/index.vue +++ b/src/view/content/channel/index.vue @@ -271,7 +271,7 @@ const handleCloseDialog = () => { dialogFormVisible.value = false } -// 删除菜单 +// 删除 const handleDelete = (ID) => { ElMessageBox.confirm('此操作将永久删除栏目, 是否继续?', '提示', { confirmButtonText: '确定', @@ -279,7 +279,7 @@ const handleDelete = (ID) => { type: 'warning' }) .then(async () => { - const res = await deleteChannel({ ID }) + const res = await deleteChannel({ id: ID }) if (res.code === 0) { ElMessage({ type: 'success', @@ -312,7 +312,7 @@ const handleAdd = (id) => { // 修改菜单方法 const handleEdit = async (ID) => { dialogTitle.value = '编辑栏目' - const res = await getChannelById({ ID }) + const res = await getChannelById({ id: ID }) form.value = res.data.channel isEdit.value = true setOptions() diff --git a/src/view/content/components/academicianEdit.vue b/src/view/content/components/academicianEdit.vue index cc0ca8b..58cfe89 100644 --- a/src/view/content/components/academicianEdit.vue +++ b/src/view/content/components/academicianEdit.vue @@ -317,7 +317,7 @@ const openPage = async (params) => { } const initFormById = async (ID) => { - const res = await getAcademicianById({ ID: ID }) + const res = await getAcademicianById({ id: ID }) if (res.code === 0) { // 初始化表单数据 editForm.value = res.data.academician diff --git a/src/view/content/components/articleEdit.vue b/src/view/content/components/articleEdit.vue index fdc4478..cc68739 100644 --- a/src/view/content/components/articleEdit.vue +++ b/src/view/content/components/articleEdit.vue @@ -15,7 +15,8 @@