diff --git a/.env.development b/.env.development index 5bbd0a4..11276d8 100644 --- a/.env.development +++ b/.env.development @@ -6,4 +6,5 @@ VITE_APP_ENV = 'development' # 开发环境 VITE_APP_BASE_API = 'http://192.168.18.99:8080' +# VITE_APP_BASE_API = 'http://192.168.18.151:8080' VITE_APP_PLATFORM = 'http://localhost:9000/platform' \ No newline at end of file diff --git a/package.json b/package.json index 28f7cc6..5ca32ee 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@element-plus/icons-vue": "2.3.1", "@vueup/vue-quill": "1.2.0", "@vueuse/core": "10.11.0", + "@wangeditor/editor-for-vue": "^5.1.12", "address": "^2.0.3", "address-parse": "^1.2.19", "axios": "0.28.1", @@ -37,7 +38,8 @@ "vue": "3.4.31", "vue-cropper": "1.1.1", "vue-router": "4.4.0", - "vuedraggable": "^4.1.0" + "vuedraggable": "^4.1.0", + "wangeditor": "^4.7.15" }, "devDependencies": { "@vitejs/plugin-vue": "5.0.5", diff --git a/src/api/content/index.js b/src/api/content/index.js new file mode 100644 index 0000000..d3a2435 --- /dev/null +++ b/src/api/content/index.js @@ -0,0 +1,49 @@ +import request from "@/utils/request"; + +// 获取内容列表 +export function getInformation(query) { + return request({ + url: "/contentManage/information/informationPage", + method: "get", + params: query, + }); +} +//新增内容 +export function addConten(data) { + return request({ + url: "/contentManage/information/informationAdd", + method: "post", + data: data, + }); +} +//编辑内容 +export function updateInformation(data) { + return request({ + url: "/contentManage/information/informationEdit", + method: "PUT", + data: data, + }); +} +// 删除内容 +export function deleteInformation(id) { + return request({ + url: '/contentManage/information/informationDelete?id=' + id, + method: "delete", + }); +} +//内容启用停用 +export function updateInformationEnable(data) { + return request({ + url: "/contentManage/information/informationEnable", + method: "put", + data: data, + }); +} + +// 获取内容信息(id) +export function getInfo(id) { + return request({ + url: `/contentManage/information/informationInfo/${id}`, + method: "get", + }); +} \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index ef198ed..7cdb96f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -540,30 +540,30 @@ export const constantRoutes = [ ], }, - //内容管理,没有子菜单 - // { - // path: '/content', - // name: "content", - // meta: { - // title: "内容管理", - // icon: "education", - // }, - // component: Layout, - // children: [ - // { - // path: 'content/index', - // component: () => import('@/views/content/index'), - // name: 'content', - // hidden: false, - // meta: { - // title: "内容管理", - // icon: "", - // noCache: false, - // link: null, - // }, - // }, - // ], - // } + // 内容管理,没有子菜单 + { + path: '/content', + name: "content", + meta: { + title: "内容管理", + icon: "education", + }, + component: Layout, + children: [ + { + path: 'content/index', + component: () => import('@/views/content/index'), + name: 'content', + hidden: false, + meta: { + title: "内容管理", + icon: "", + noCache: false, + link: null, + }, + }, + ], + } ] diff --git a/src/views/content/index.vue b/src/views/content/index.vue index 45d7f68..589e190 100644 --- a/src/views/content/index.vue +++ b/src/views/content/index.vue @@ -1,5 +1,618 @@ \ No newline at end of file + + +