From 798504339c2d14e72006d34bba9294d759d00273 Mon Sep 17 00:00:00 2001 From: shidongli Date: Mon, 15 Apr 2024 15:51:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=92=A8=E8=AF=A2=E4=BF=A1=E6=81=AF=20?= =?UTF-8?q?=E5=92=A8=E8=AF=A2=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/manage/category.js | 44 ++ src/api/manage/info.js | 44 ++ src/api/system/stationAvatar.js | 10 +- src/views/manage/category/index.vue | 589 ++++++++++++++ src/views/manage/info/index.vue | 967 +++++++++++++++++++++++ src/views/system/stationAvatar/index.vue | 18 + 6 files changed, 1670 insertions(+), 2 deletions(-) create mode 100644 src/api/manage/category.js create mode 100644 src/api/manage/info.js create mode 100644 src/views/manage/category/index.vue create mode 100644 src/views/manage/info/index.vue diff --git a/src/api/manage/category.js b/src/api/manage/category.js new file mode 100644 index 0000000..003a7b7 --- /dev/null +++ b/src/api/manage/category.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询资讯分类列表 +export function listCategory(query) { + return request({ + url: '/manage/category/list', + method: 'get', + params: query + }) +} + +// 查询资讯分类详细 +export function getCategory(id) { + return request({ + url: '/manage/category/' + id, + method: 'get' + }) +} + +// 新增资讯分类 +export function addCategory(data) { + return request({ + url: '/manage/category', + method: 'post', + data: data + }) +} + +// 修改资讯分类 +export function updateCategory(data) { + return request({ + url: '/manage/category', + method: 'put', + data: data + }) +} + +// 删除资讯分类 +export function delCategory(id) { + return request({ + url: '/manage/category/' + id, + method: 'delete' + }) +} diff --git a/src/api/manage/info.js b/src/api/manage/info.js new file mode 100644 index 0000000..095298e --- /dev/null +++ b/src/api/manage/info.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询资讯信息列表 +export function listInfo(query) { + return request({ + url: '/manage/info/list', + method: 'get', + params: query + }) +} + +// 查询资讯信息详细 +export function getInfo(id) { + return request({ + url: '/manage/info/' + id, + method: 'get' + }) +} + +// 新增资讯信息 +export function addInfo(data) { + return request({ + url: '/manage/info', + method: 'post', + data: data + }) +} + +// 修改资讯信息 +export function updateInfo(data) { + return request({ + url: '/manage/info', + method: 'put', + data: data + }) +} + +// 删除资讯信息 +export function delInfo(id) { + return request({ + url: '/manage/info/' + id, + method: 'delete' + }) +} diff --git a/src/api/system/stationAvatar.js b/src/api/system/stationAvatar.js index 6792fde..f171375 100644 --- a/src/api/system/stationAvatar.js +++ b/src/api/system/stationAvatar.js @@ -23,8 +23,14 @@ export function uploadScriptInfo(data) { data: data }) } - - +// 咨询图标 +export function picUpload(data) { + return request({ + url: '/manage/info/picUpload', + method: 'post', + data: data + }) +} //海报视频上传 export function updatePoserHeads(data) { return request({ diff --git a/src/views/manage/category/index.vue b/src/views/manage/category/index.vue new file mode 100644 index 0000000..061c464 --- /dev/null +++ b/src/views/manage/category/index.vue @@ -0,0 +1,589 @@ + + + diff --git a/src/views/manage/info/index.vue b/src/views/manage/info/index.vue new file mode 100644 index 0000000..0376b0d --- /dev/null +++ b/src/views/manage/info/index.vue @@ -0,0 +1,967 @@ + + + diff --git a/src/views/system/stationAvatar/index.vue b/src/views/system/stationAvatar/index.vue index 1ee100b..55116bb 100644 --- a/src/views/system/stationAvatar/index.vue +++ b/src/views/system/stationAvatar/index.vue @@ -127,6 +127,7 @@ import { uploadVideoUrl, uploadTrainingCategoryPicture, updatePoserHeads, + picUpload, uploadUrl, uploadFilefm, uploadScriptInfo @@ -400,6 +401,23 @@ export default { } }); } + + else if(this.types == "infoMainThumbnailUrl"){ + let formDatanew = new FormData(); + formDatanew.append("file", this.previews.data); + picUpload(formDatanew).then(response => { + if (response.code == 200) { + this.options.img = process.env.VUE_APP_BASE_API + response.msg; + this.$emit("imgUrl", response.msg); + this.openimg = false; + } else { + setTimeout(e => { + this.openimg = false; + }, 1000); + } + }); + } + else {