diff --git a/src/api/member/address/index.ts b/src/api/member/address/index.ts new file mode 100644 index 00000000..a914f979 --- /dev/null +++ b/src/api/member/address/index.ts @@ -0,0 +1,15 @@ +import request from '@/config/axios' + +export interface AddressVO { + id: number + name: string + mobile: string + areaId: number + detailAddress: string + defaultStatus: boolean +} + +// 查询用户收件地址列表 +export const getAddressList = async (params) => { + return await request.get({ url: `/member/address/list`, params }) +} diff --git a/src/api/member/user/index.ts b/src/api/member/user/index.ts index 3a789e9f..82d8d159 100644 --- a/src/api/member/user/index.ts +++ b/src/api/member/user/index.ts @@ -2,39 +2,20 @@ import request from '@/config/axios' export interface UserVO { id: number - mobile: string - password: string - status: number - registerIp: string + avatar: string | undefined + birthday: number | undefined + createTime: number | undefined + loginDate: number | undefined loginIp: string - loginDate: Date - nickname: string - avatar: string - name: string - sex: number - areaId: number - birthday: Date mark: string - createTime: Date -} - -// TODO @梦:和 UserVO 搞成一个把。 -export interface UserBaseInfoVO { - id: number | undefined | null mobile: string - password: string | null | undefined - status: number - registerIp: string | null | undefined - loginIp: string | null | undefined - loginDate: Date | null | undefined - nickname: string | null | undefined - avatar: string | null | undefined - name: string | null | undefined + name: string | undefined + nickname: string | undefined + registerIp: string sex: number - areaId: number | null | undefined - birthday: Date | null | undefined - mark: string | null | undefined - createTime: Date | null | undefined + status: number + areaId: number | undefined + areaName: string | undefined } // 查询会员用户列表 diff --git a/src/components/Card/index.ts b/src/components/Card/index.ts new file mode 100644 index 00000000..f4c0d86c --- /dev/null +++ b/src/components/Card/index.ts @@ -0,0 +1,3 @@ +import CardTitle from './src/CardTitle.vue' + +export { CardTitle } diff --git a/src/views/member/user/components/card-title.vue b/src/components/Card/src/CardTitle.vue similarity index 100% rename from src/views/member/user/components/card-title.vue rename to src/components/Card/src/CardTitle.vue diff --git a/src/components/Descriptions/index.ts b/src/components/Descriptions/index.ts index 91b0eb41..243bc397 100644 --- a/src/components/Descriptions/index.ts +++ b/src/components/Descriptions/index.ts @@ -1,3 +1,4 @@ import Descriptions from './src/Descriptions.vue' +import DescriptionsItemLabel from './src/DescriptionsItemLabel.vue' -export { Descriptions } +export { Descriptions, DescriptionsItemLabel } diff --git a/src/components/Descriptions/src/DescriptionsItemLabel.vue b/src/components/Descriptions/src/DescriptionsItemLabel.vue new file mode 100644 index 00000000..35783351 --- /dev/null +++ b/src/components/Descriptions/src/DescriptionsItemLabel.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 2d8e2b44..40909f4a 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -434,7 +434,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ meta: { hidden: true }, children: [ { - path: 'user/detail', + path: 'user/detail/:id', name: 'MemberUserDetail', meta: { title: '会员详情', diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index 5e5c854d..87409260 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -11,7 +11,7 @@ import dayjs from 'dayjs' * @description format 季度 + 星期 + 几周:"YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ" * @returns 返回拼接后的时间字符串 */ -export function formatDate(date: Date, format?: string): string { +export function formatDate(date: Date | number, format?: string): string { // 日期不存在,则返回空 if (!date) { return '' diff --git a/src/views/member/user/components/address-list.vue b/src/views/member/user/components/address-list.vue deleted file mode 100644 index 6d47bda5..00000000 --- a/src/views/member/user/components/address-list.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/src/views/member/user/components/account-info.vue b/src/views/member/user/detail/UserAccountInfo.vue similarity index 94% rename from src/views/member/user/components/account-info.vue rename to src/views/member/user/detail/UserAccountInfo.vue index 252f3f10..4eaa2bab 100644 --- a/src/views/member/user/components/account-info.vue +++ b/src/views/member/user/detail/UserAccountInfo.vue @@ -46,11 +46,6 @@ - diff --git a/src/views/member/user/detail/UserBasicInfo.vue b/src/views/member/user/detail/UserBasicInfo.vue new file mode 100644 index 00000000..4f822613 --- /dev/null +++ b/src/views/member/user/detail/UserBasicInfo.vue @@ -0,0 +1,90 @@ + + + diff --git a/src/views/member/user/components/point-list.vue b/src/views/member/user/detail/UserPointList.vue similarity index 94% rename from src/views/member/user/components/point-list.vue rename to src/views/member/user/detail/UserPointList.vue index 2b2b98e4..9754b297 100644 --- a/src/views/member/user/components/point-list.vue +++ b/src/views/member/user/detail/UserPointList.vue @@ -67,7 +67,6 @@ :formatter="dateFormatter" width="180" /> -