diff --git a/src/api/spring/avatar/index.js b/src/api/spring/avatar/index.js new file mode 100644 index 0000000..fe076f3 --- /dev/null +++ b/src/api/spring/avatar/index.js @@ -0,0 +1,55 @@ +import request from '@/utils/request' + +export function getList(data) { + return request({ + url: '/management/api/spring/avatar/list', + method: 'get', + params: data, + }) +} + +export function doAdd(data) { + return request({ + url: '/management/api/spring/avatar', + method: 'post', + data, + }) +} + +export function doEdit(id, data) { + return request({ + url: `/management/api/spring/avatar/${id}`, + method: 'put', + data, + }) +} + +export function doDelete(data) { + return request({ + url: '/management/api/spring/avatar/delete', + method: 'put', + data, + }) +} + +export function doMoveUp(id) { + return request({ + url: `/management/api/spring/avatar/moveUp/${id}`, + method: 'patch', + }) +} + +export function doMoveDown(id) { + return request({ + url: `/management/api/spring/avatar/moveDown/${id}`, + method: 'patch', + }) +} + +export function toggleEnable(id, isEnabled) { + return request({ + url: `/management/api/spring/avatar/enable/${id}`, + method: 'patch', + data: { isEnabled }, + }) +} diff --git a/src/router/index.js b/src/router/index.js index ea4b2c9..752d6bc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -87,6 +87,26 @@ export const asyncRoutes = [ }, ], }, + { + path: 'avatar', + component: EmptyLayout, + alwaysShow: true, + redirect: 'noRedirect', + name: 'Avatar', + meta: { + title: '头像', + icon: 'user', + permissions: ['admin'], + }, + children: [ + { + path: 'systemAvatar', + name: 'SystemAvatar', + component: () => import('@/views/spring/avatar/systemAvatar/index'), + meta: { title: '系统头像' }, + }, + ], + }, { path: 'fortune', component: EmptyLayout, diff --git a/src/views/spring/avatar/systemAvatar/components/AppManagementEdit.vue b/src/views/spring/avatar/systemAvatar/components/AppManagementEdit.vue new file mode 100644 index 0000000..58ef3d4 --- /dev/null +++ b/src/views/spring/avatar/systemAvatar/components/AppManagementEdit.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/views/spring/avatar/systemAvatar/index.vue b/src/views/spring/avatar/systemAvatar/index.vue new file mode 100644 index 0000000..b4de94e --- /dev/null +++ b/src/views/spring/avatar/systemAvatar/index.vue @@ -0,0 +1,187 @@ + + +