diff --git a/eslintrc/.eslintrc-auto-import.json b/eslintrc/.eslintrc-auto-import.json index c2ef2ee..9c538cd 100644 --- a/eslintrc/.eslintrc-auto-import.json +++ b/eslintrc/.eslintrc-auto-import.json @@ -22,10 +22,6 @@ "elLoading": true, "elMessage": true, "elNotify": true, - "filterAsyncRouter": true, - "filterAsyncRouterByCodes": true, - "filterAsyncRoutesByMenuList": true, - "filterAsyncRoutesByRoles": true, "freshRouter": true, "getCurrentInstance": true, "getCurrentScope": true, @@ -74,6 +70,7 @@ "routerBack": true, "routerPush": true, "routerReplace": true, + "setRouterFromDatabase": true, "shallowReactive": true, "shallowReadonly": true, "shallowRef": true, diff --git a/src/api/user.ts b/src/api/user.ts index f0a4044..9ae67b9 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -47,13 +47,17 @@ export async function getUser(idList): Promise { return post('/user/get', { idList }) } +export async function editUser(data: IUser) { + return post('/user/edit', data) +} + /** * 按照文本搜索前十条用户 * @param keys * @return {Promise} */ export function userSearching(keys) { - return post('user/searching', { keys }) + return post('/user/searching', { keys }) } //修改密码 diff --git a/src/store/basic.ts b/src/store/basic.ts index 4b17e19..3eeb236 100644 --- a/src/store/basic.ts +++ b/src/store/basic.ts @@ -4,6 +4,7 @@ import { defineStore } from 'pinia' import type { RouterTypes } from '~/basic' import defaultSettings from '@/settings' import router, { constantRoutes } from '@/router' +import type { IUser } from '@/api/user' export const useBasicStore = defineStore('basic', { state: () => { @@ -129,3 +130,23 @@ export const useBasicStore = defineStore('basic', { } } }) + +export interface IUserInfo { + userName: string + realName: string + avatar: string + phone: string + id: string + isUse: boolean + team: string + iGameKey: string +} + +export interface IDatabaseType { + createdAt: string + updatedAt: string + createdBy?: string + updatedBy?: string +} + +export interface IUnionUserInfo extends IUserInfo, IUser, IDatabaseType {} diff --git a/src/views/user/profile/components/UserDetail.vue b/src/views/user/profile/components/UserDetail.vue new file mode 100644 index 0000000..78f9a8c --- /dev/null +++ b/src/views/user/profile/components/UserDetail.vue @@ -0,0 +1,180 @@ + + + + + + diff --git a/src/views/user/profile/components/UserDetailAvatarItem.vue b/src/views/user/profile/components/UserDetailAvatarItem.vue new file mode 100644 index 0000000..3824ebe --- /dev/null +++ b/src/views/user/profile/components/UserDetailAvatarItem.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/views/user/profile/components/UserDetailItem.vue b/src/views/user/profile/components/UserDetailItem.vue new file mode 100644 index 0000000..cb5f0e4 --- /dev/null +++ b/src/views/user/profile/components/UserDetailItem.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/src/views/user/profile/components/UserDetailPasswordItem.vue b/src/views/user/profile/components/UserDetailPasswordItem.vue new file mode 100644 index 0000000..fc1eb9e --- /dev/null +++ b/src/views/user/profile/components/UserDetailPasswordItem.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/src/views/user/profile/index.vue b/src/views/user/profile/index.vue index 8b223db..14acaa7 100644 --- a/src/views/user/profile/index.vue +++ b/src/views/user/profile/index.vue @@ -1,47 +1,11 @@