From 199f5366669ff7eaa5470b76e04aa674e4739b07 Mon Sep 17 00:00:00 2001 From: Double-_-Z <2492419643@qq.com> Date: Sat, 18 Jan 2025 12:01:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BD=9C=E5=93=81=E5=A2=99+?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=BA=94=E7=94=A8=E6=9C=8D=E5=8A=A1=E7=AE=A1?= =?UTF-8?q?=E7=90=86+=E5=AE=8C=E5=96=84=E5=9B=BE=E7=89=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/attachment/index.ts | 9 + src/api/photos/index.ts | 11 +- src/api/service/recommend/index.ts | 10 +- src/api/service/wall/index.ts | 52 +++ src/i18n/lang/en.ts | 1 + src/i18n/lang/zh-cn.ts | 1 + src/i18n/lang/zh-tw.ts | 1 + src/router/route.ts | 17 + src/views/article/index.vue | 4 +- src/views/photos/index.vue | 2 +- src/views/service/apply/index.vue | 1 + src/views/service/recommend/index.vue | 178 ++++++- src/views/service/wall/index.vue | 645 ++++++++++++++++++++++++++ 13 files changed, 912 insertions(+), 20 deletions(-) create mode 100644 src/api/service/wall/index.ts create mode 100644 src/views/service/wall/index.vue diff --git a/src/api/attachment/index.ts b/src/api/attachment/index.ts index cfd2a73..711a7c2 100644 --- a/src/api/attachment/index.ts +++ b/src/api/attachment/index.ts @@ -9,6 +9,7 @@ import { baseUrlHost } from '../baseUrlHost'; * @method getAttachmentList 分页查询附件 * @method getAttachmentDetail 查看单个附件 * @method downloadFiles 批量文件下载 + * @method uploadByType 公开附件上传 */ export function attachmentApi() { @@ -32,6 +33,14 @@ export function attachmentApi() { method: 'get', responseType: 'blob', }) + }, + uploadByType: (data: object) => { + return request({ + url: baseUrlHost + '/enAttachment/uploadByType', + method: 'post', + data, + headers: { 'Content-Type': 'application/x-www-form-urlencoded'} + }) } }; } diff --git a/src/api/photos/index.ts b/src/api/photos/index.ts index 1a56ef8..ab99d2e 100644 --- a/src/api/photos/index.ts +++ b/src/api/photos/index.ts @@ -14,6 +14,7 @@ import { baseUrlHost } from '../baseUrlHost'; * @method updatePhotos 更新图片 * @method deletePhotos 删除图片 * @method uploadFile 上传图片 + * @method uploadPictrue 公开图片上传,返回图片id */ export function photosApi() { @@ -70,6 +71,14 @@ export function photosApi() { data, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }) - } + }, + uploadPictrue:(data: object) => { + return request({ + url: baseUrlHost + '/cpPhoto/uploadPictrue', + method: 'post', + data, + headers: { 'Content-Type': 'application/x-www-form-urlencoded' } + }) + }, }; } diff --git a/src/api/service/recommend/index.ts b/src/api/service/recommend/index.ts index f7aa505..e635849 100644 --- a/src/api/service/recommend/index.ts +++ b/src/api/service/recommend/index.ts @@ -9,6 +9,7 @@ import { pixelUrlHost } from '/@/api/baseUrlHost'; * @method getRecommendList 获取推荐作品列表 * @method saveRecommend 保存推荐作品 * @method deleteRecommend 删除推荐作品 + * @method updateRecommend 修改推荐作品 */ export function recommendApi() { @@ -32,6 +33,13 @@ export function recommendApi() { url: pixelUrlHost + `/paRecommend/${id}`, method: 'delete', }) - } + }, + updateRecommend: (data: object) => { + return request({ + url: pixelUrlHost + '/paRecommend', + method: 'put', + data, + }) + }, }; } diff --git a/src/api/service/wall/index.ts b/src/api/service/wall/index.ts new file mode 100644 index 0000000..8d4722e --- /dev/null +++ b/src/api/service/wall/index.ts @@ -0,0 +1,52 @@ +import request from '/@/utils/request'; +import { pixelUrlHost } from '/@/api/baseUrlHost'; + +/** + * (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参) + * 注意在写get请求时,参数是params,而不是data,要标注好 + * + * 登录api接口集合 + * @method getWallList 获取作品墙列表 + * @method saveWall 保存作品墙推荐作品 + * @method deleteWall 删除作品墙推荐作品 + * @method updateWall 修改作品墙推荐作品 + * @method singleWall 获取作品墙作品详情 + */ + +export function recommendWallApi() { + return { + getWallList: (params: object) => { + return request({ + url: pixelUrlHost + '/paPictureWall', + method: 'get', + params, + }); + }, + saveWall: (data: object) => { + return request({ + url: pixelUrlHost + '/paPictureWall', + method: 'post', + data, + }) + }, + deleteWall: (id: Number) => { + return request({ + url: pixelUrlHost + `/paPictureWall/${id}`, + method: 'delete', + }) + }, + updateWall: (data: object) => { + return request({ + url: pixelUrlHost + '/paPictureWall', + method: 'put', + data, + }) + }, + singleWall: (id: Number) => { + return request({ + url: pixelUrlHost + `/paPictureWall/${id}`, + method: 'get', + }) + }, + }; +} diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index deccaf7..e264a17 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -108,6 +108,7 @@ export default { apply: 'apply', shares: 'shares', recommend: 'recommend', + recommendWall: 'recommendWall', /** * 业务模块end diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 6ff25cc..0bd97ee 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -111,6 +111,7 @@ export default { apply: '应用管理', shares: '发布管理', recommend: '推荐管理', + recommendWall: '作品墙', /** * 业务模块end diff --git a/src/i18n/lang/zh-tw.ts b/src/i18n/lang/zh-tw.ts index dfda40d..0f55516 100644 --- a/src/i18n/lang/zh-tw.ts +++ b/src/i18n/lang/zh-tw.ts @@ -108,6 +108,7 @@ export default { apply: '應用管理', shares: '發佈管理', recommend: '推薦管理', + recommendWall: '作品墻', /** * 业务模块end diff --git a/src/router/route.ts b/src/router/route.ts index fdc42bc..d20607a 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -306,6 +306,23 @@ export const dynamicRoutes: Array = [ icon: 'ele-Upload', }, }, + // 推荐管理 + { + path: '/recommendWall', + name: 'recommendWall', + component: () => import('/@/views/service/wall/index.vue'), + meta: { + title: 'message.router.recommendWall', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + roles: ['admin', 'user'], + icon: 'ele-Upload', + }, + }, + /** * 业务模块end diff --git a/src/views/article/index.vue b/src/views/article/index.vue index a201150..5434018 100644 --- a/src/views/article/index.vue +++ b/src/views/article/index.vue @@ -190,7 +190,7 @@ const toEditArticle = (row: any) => { const copyLink = (row: any) => { if(row.id == null||row.id == ''){ ElMessage.warning('链接为空');return;} var aux = document.createElement("input"); - aux.setAttribute("value", `${viteUrl}vueAdmin/#article/content?id=${row.id}`); + aux.setAttribute("value", `${viteUrl}pixelAdmin/#article/content?id=${row.id}`); document.body.appendChild(aux); aux.select(); document.execCommand("copy"); @@ -206,7 +206,7 @@ const toShowDetail = (row: any) => { // 预览 const toPreview = (row: any) => { - window.open(`${viteUrl}vueAdmin/#article/content?id=${row.id}`); + window.open(`${viteUrl}pixelAdmin/#article/content?id=${row.id}`); } // 文章删除 diff --git a/src/views/photos/index.vue b/src/views/photos/index.vue index 9ce6a78..f6ee4ce 100644 --- a/src/views/photos/index.vue +++ b/src/views/photos/index.vue @@ -328,7 +328,7 @@ const jpgFormatter = (row: any) => { // } else { // newPath = row.path.replaceAll('\\\\', '/') // } - newPath = newPath.includes('://')?newPath : encodeURI(newPath); + newPath = newPath.includes('://')?newPath : newPath; return `${newPath}`; } diff --git a/src/views/service/apply/index.vue b/src/views/service/apply/index.vue index d866e84..fa5d51b 100644 --- a/src/views/service/apply/index.vue +++ b/src/views/service/apply/index.vue @@ -337,6 +337,7 @@ onMounted(() => { overflow: hidden; white-space: nowrap; .cir-one{ + line-height: 1.3em; font-size: 1.3em; font-weight: bold; color: rgba($color: #000000, $alpha: 0.8); diff --git a/src/views/service/recommend/index.vue b/src/views/service/recommend/index.vue index e79d95f..a70cade 100644 --- a/src/views/service/recommend/index.vue +++ b/src/views/service/recommend/index.vue @@ -43,11 +43,12 @@ preview-teleported="true" :preview-src-list="[getImagePath(scope.row.path)]"/> - + @@ -93,6 +94,59 @@ + + + + + + + + + + + + + + + + + + + + + + +