diff --git a/src/api/app.js b/src/api/app.js index 8a5e1b6..16c17d7 100644 --- a/src/api/app.js +++ b/src/api/app.js @@ -224,6 +224,11 @@ export const addAD = (params) => { return postBodyRequest('/mall/adPosition/add', params) } +//删除广告位 +export const delAD = (id,params) => { + return postRequest(`/mall/adPosition/delete/${id}`, params) +} + //获取商品分类 export const goodsType = (params) => { return getRequest('/app/productCategory/list', params) diff --git a/src/views/app/business/lineManage/addEdit.vue b/src/views/app/business/lineManage/addEdit.vue index 8fb1219..dbed405 100644 --- a/src/views/app/business/lineManage/addEdit.vue +++ b/src/views/app/business/lineManage/addEdit.vue @@ -37,13 +37,10 @@ -
- -
- + @@ -57,7 +54,7 @@ - +
import { - getADList + getADList, + delAD } from "@/api/app"; import addEdit from "@/views/app/business/lineManage/addEdit.vue"; import goodsList from "./dictManage.vue"; @@ -258,7 +259,22 @@ }, }, "编辑" - ) + ), + h("Divider", { + props: { + type: "vertical", + }, + }), + h( + "a", { + on: { + click: () => { + this.del(params.row); + }, + }, + }, + "删除" + ), ]); }, }, @@ -345,6 +361,22 @@ this.showType = "1"; this.showCompany = true; }, + del(v){ + this.$Modal.confirm({ + title: "确认删除", + content: "您确认要删除该条广告吗?", + loading: true, + onOk: () => { + delAD(v.id).then((res) => { + this.$Modal.remove(); + if (res.success) { + this.$Message.success("删除成功"); + this.getDataList(); + } + }); + }, + }); + }, dropDown() { this.drop = !this.drop; }