From 780facd765d3a71c8e608ab8356197cb5ca05b98 Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Sun, 25 Jan 2026 00:29:35 +0800 Subject: [PATCH] deat: Wallpaper api --- src/api/spring/wallpaper/system.js | 55 ++++++ src/api/spring/wallpaper/type.js | 62 +++++++ src/router/index.js | 26 +++ .../system/components/AppManagementEdit.vue | 111 +++++++++++ src/views/spring/wallpaper/system/index.vue | 175 ++++++++++++++++++ .../type/components/AppManagementEdit.vue | 79 ++++++++ src/views/spring/wallpaper/type/index.vue | 168 +++++++++++++++++ 7 files changed, 676 insertions(+) create mode 100644 src/api/spring/wallpaper/system.js create mode 100644 src/api/spring/wallpaper/type.js create mode 100644 src/views/spring/wallpaper/system/components/AppManagementEdit.vue create mode 100644 src/views/spring/wallpaper/system/index.vue create mode 100644 src/views/spring/wallpaper/type/components/AppManagementEdit.vue create mode 100644 src/views/spring/wallpaper/type/index.vue diff --git a/src/api/spring/wallpaper/system.js b/src/api/spring/wallpaper/system.js new file mode 100644 index 0000000..a3b0da1 --- /dev/null +++ b/src/api/spring/wallpaper/system.js @@ -0,0 +1,55 @@ +import request from '@/utils/request' + +export function getList(data) { + return request({ + url: '/management/api/spring/wallpaper/system/list', + method: 'get', + params: data, + }) +} + +export function doAdd(data) { + return request({ + url: '/management/api/spring/wallpaper/system', + method: 'post', + data, + }) +} + +export function doEdit(id, data) { + return request({ + url: `/management/api/spring/wallpaper/system/${id}`, + method: 'put', + data, + }) +} + +export function doDelete(data) { + return request({ + url: '/management/api/spring/wallpaper/system/delete', + method: 'put', + data, + }) +} + +export function doMoveUp(id) { + return request({ + url: `/management/api/spring/wallpaper/system/moveUp/${id}`, + method: 'patch', + }) +} + +export function doMoveDown(id) { + return request({ + url: `/management/api/spring/wallpaper/system/moveDown/${id}`, + method: 'patch', + }) +} + +export function toggleEnable(id, isEnabled) { + return request({ + url: `/management/api/spring/wallpaper/system/enable/${id}`, + method: 'patch', + data: { isEnabled }, + }) +} diff --git a/src/api/spring/wallpaper/type.js b/src/api/spring/wallpaper/type.js new file mode 100644 index 0000000..40857e7 --- /dev/null +++ b/src/api/spring/wallpaper/type.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +export function getList(data) { + return request({ + url: '/management/api/spring/wallpaper/type/list', + method: 'get', + params: data, + }) +} + +export function getAllList() { + return request({ + url: '/management/api/spring/wallpaper/type/list/all', + method: 'get', + }) +} + +export function doAdd(data) { + return request({ + url: '/management/api/spring/wallpaper/type', + method: 'post', + data, + }) +} + +export function doEdit(id, data) { + return request({ + url: `/management/api/spring/wallpaper/type/${id}`, + method: 'put', + data, + }) +} + +export function doDelete(data) { + return request({ + url: '/management/api/spring/wallpaper/type/delete', + method: 'put', + data, + }) +} + +export function doMoveUp(id) { + return request({ + url: `/management/api/spring/wallpaper/type/moveUp/${id}`, + method: 'patch', + }) +} + +export function doMoveDown(id) { + return request({ + url: `/management/api/spring/wallpaper/type/moveDown/${id}`, + method: 'patch', + }) +} + +export function toggleEnable(id, isEnabled) { + return request({ + url: `/management/api/spring/wallpaper/type/enable/${id}`, + method: 'patch', + data: { isEnabled }, + }) +} diff --git a/src/router/index.js b/src/router/index.js index 17b8c2a..fc4c6a5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -87,6 +87,32 @@ export const asyncRoutes = [ }, ], }, + { + path: 'wallpaper', + component: EmptyLayout, + alwaysShow: true, + redirect: 'noRedirect', + name: 'Wallpaper', + meta: { + title: '壁纸', + icon: 'clover', + permissions: ['admin'], + }, + children: [ + { + path: 'systemWallpaper', + name: 'SystemWallpaper', + component: () => import('@/views/spring/wallpaper/system/index'), + meta: { title: '系统壁纸' }, + }, + { + path: 'wallpaperType', + name: 'WallpaperType', + component: () => import('@/views/spring/wallpaper/type/index'), + meta: { title: '壁纸类型' }, + }, + ], + }, { path: 'avatar', component: EmptyLayout, diff --git a/src/views/spring/wallpaper/system/components/AppManagementEdit.vue b/src/views/spring/wallpaper/system/components/AppManagementEdit.vue new file mode 100644 index 0000000..29e5af4 --- /dev/null +++ b/src/views/spring/wallpaper/system/components/AppManagementEdit.vue @@ -0,0 +1,111 @@ + + + diff --git a/src/views/spring/wallpaper/system/index.vue b/src/views/spring/wallpaper/system/index.vue new file mode 100644 index 0000000..16684bd --- /dev/null +++ b/src/views/spring/wallpaper/system/index.vue @@ -0,0 +1,175 @@ + + + diff --git a/src/views/spring/wallpaper/type/components/AppManagementEdit.vue b/src/views/spring/wallpaper/type/components/AppManagementEdit.vue new file mode 100644 index 0000000..58bfdd0 --- /dev/null +++ b/src/views/spring/wallpaper/type/components/AppManagementEdit.vue @@ -0,0 +1,79 @@ + + + diff --git a/src/views/spring/wallpaper/type/index.vue b/src/views/spring/wallpaper/type/index.vue new file mode 100644 index 0000000..7dbf1c1 --- /dev/null +++ b/src/views/spring/wallpaper/type/index.vue @@ -0,0 +1,168 @@ + + +