From 299defd48ee1b56878da256aee866db03ef8a336 Mon Sep 17 00:00:00 2001 From: zhangjiabao Date: Sun, 25 Feb 2024 11:39:31 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(=E5=B9=BF=E5=91=8A):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B9=BF=E5=91=8A=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ad.js | 81 ++++++ src/router/index.js | 11 +- src/views/ad/adModify.vue | 230 +++++++++++++++ src/views/ad/adModifyPage.vue | 271 ++++++++++++++++++ src/views/ad/index.vue | 526 ++++++++++++++++++++++++++++++++++ 5 files changed, 1117 insertions(+), 2 deletions(-) create mode 100644 src/api/ad.js create mode 100644 src/views/ad/adModify.vue create mode 100644 src/views/ad/adModifyPage.vue create mode 100644 src/views/ad/index.vue diff --git a/src/api/ad.js b/src/api/ad.js new file mode 100644 index 0000000..80c0123 --- /dev/null +++ b/src/api/ad.js @@ -0,0 +1,81 @@ +/* + * @Description: + * @version: v1 + * @Author: zhangjiabao + * @Date: 2024-02-24 23:38:16 + */ +import request from "@/utils/request"; +export default { + getList(data, page, size) { + return request({ + url: `/luoo-music/cms/ad/search/${page}/${size}`, + method: "post", + data: data + }); + }, + getDetail(id) { + return request({ + url: `/luoo-music/cms/ad/${id}`, + method: "get" + }); + }, + /** + * 删除 + * @param {*} id + * @returns + */ + delete(id) { + return request({ + url: `/luoo-music/cms/ad/${id}`, + method: "delete" + }); + }, + /** + * 发布 + * @param {*} id + * @returns + */ + publish(id, type, time) { + return request({ + url: `/luoo-music/cms/ad/publish/${id}`, + method: "put", + data: { + isScheduled: type, + pubTime: time + } + }); + }, + /** + * 更新状态 + * @param {*} id + * @param {*} state + * @returns + */ + updateStatus(id, state) { + return request({ + url: `/luoo-music/cms/ad/update/state/${id}`, + method: "put", + data: state + }); + }, + /** + * 更新 + * @param {*} id + * @param {*} data + * @returns + */ + update(id, data) { + return request({ + url: `/luoo-music/cms/ad/${id}`, + method: "put", + data: data + }); + }, + add(data) { + return request({ + url: `/luoo-music/cms/ad/add`, + method: "post", + data: data + }); + } +}; diff --git a/src/router/index.js b/src/router/index.js index 26e4fd0..c96841f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,7 +2,7 @@ * @Author: zhangjiabao * @Date: 2024-01-25 11:05:17 * @LastEditors: zhangjiabao - * @LastEditTime: 2024-02-24 20:59:42 + * @LastEditTime: 2024-02-25 11:12:29 * @FilePath: /luoo_manage_fe/src/router/index.js */ import Vue from "vue"; @@ -197,8 +197,15 @@ export const constantRouterMap = [ { path: "ad", name: "Ad", - component: () => import("@/views/common/unfinished"), + component: () => import("@/views/ad/index"), meta: { title: "广告管理" } + }, + { + path: "adModify", + name: "AdDetail", + hidden: true, + component: () => import("@/views/ad/adModifyPage"), + meta: { title: "文章详情" } } ] }, diff --git a/src/views/ad/adModify.vue b/src/views/ad/adModify.vue new file mode 100644 index 0000000..1512a4d --- /dev/null +++ b/src/views/ad/adModify.vue @@ -0,0 +1,230 @@ + + + + diff --git a/src/views/ad/adModifyPage.vue b/src/views/ad/adModifyPage.vue new file mode 100644 index 0000000..b4bf25c --- /dev/null +++ b/src/views/ad/adModifyPage.vue @@ -0,0 +1,271 @@ + + + + + diff --git a/src/views/ad/index.vue b/src/views/ad/index.vue new file mode 100644 index 0000000..0170c1b --- /dev/null +++ b/src/views/ad/index.vue @@ -0,0 +1,526 @@ + + + + +