From 451458eb1e98aa42f8b6bcf7b2e1f7fbb974c0d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=AE=E6=A2=A6?= Date: Wed, 23 Aug 2023 10:23:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BC=9A=E5=91=98=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E8=B7=B3=E8=BD=AC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/member/user/index.vue | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/views/member/user/index.vue b/src/views/member/user/index.vue index 18e4f370..777fa8d5 100644 --- a/src/views/member/user/index.vue +++ b/src/views/member/user/index.vue @@ -114,10 +114,10 @@ - 编辑 + 详情 @@ -130,14 +130,10 @@ @pagination="getList" /> - - - + + + + diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 38c8712c..569277d4 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -142,28 +142,25 @@ - - + + + diff --git a/src/views/member/user/components/PointList.vue b/src/views/member/user/components/PointList.vue index 2b2b98e4..a98a622f 100644 --- a/src/views/member/user/components/PointList.vue +++ b/src/views/member/user/components/PointList.vue @@ -17,7 +17,7 @@ > @@ -112,7 +112,7 @@ const queryParams = reactive({ bizType: undefined, title: null, createDate: [], - userId: null + userId: NaN }) const queryFormRef = ref() // 搜索的表单 @@ -140,9 +140,8 @@ const resetQuery = () => { handleQuery() } -// TODO @梦:改成 userId 哈 -const { memberId } = defineProps({ - memberId: { +const { userId } = defineProps({ + userId: { type: Number, required: true } @@ -150,7 +149,7 @@ const { memberId } = defineProps({ /** 初始化 **/ onMounted(() => { - queryParams.userId = memberId + queryParams.userId = userId getList() }) diff --git a/src/views/member/user/components/SignList.vue b/src/views/member/user/components/SignList.vue index 479e18a7..47fbd155 100644 --- a/src/views/member/user/components/SignList.vue +++ b/src/views/member/user/components/SignList.vue @@ -92,6 +92,7 @@ const list = ref([]) // 列表的数据 const queryParams = reactive({ pageNo: 1, pageSize: 10, + userId: NaN, nickname: null, day: null, createTime: [] @@ -122,9 +123,8 @@ const resetQuery = () => { handleQuery() } -// TODO @梦:改成 userId 哈 -const { memberId } = defineProps({ - memberId: { +const { userId } = defineProps({ + userId: { type: Number, required: true } @@ -132,7 +132,7 @@ const { memberId } = defineProps({ /** 初始化 **/ onMounted(() => { - queryParams.userId = memberId + queryParams.userId = userId getList() }) diff --git a/src/views/member/user/components/UserBasicInfo.vue b/src/views/member/user/components/UserBasicInfo.vue index c6449d3a..50d16413 100644 --- a/src/views/member/user/components/UserBasicInfo.vue +++ b/src/views/member/user/components/UserBasicInfo.vue @@ -1,7 +1,90 @@ - - + + 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/descriptions/DescriptionsItemLabel.vue b/src/views/member/user/components/descriptions/DescriptionsItemLabel.vue new file mode 100644 index 00000000..35783351 --- /dev/null +++ b/src/views/member/user/components/descriptions/DescriptionsItemLabel.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 569277d4..967a4110 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -1,12 +1,11 @@ - + - + 成长值(WIP) 余额(WIP) + + + + 订单管理(WIP) + 售后管理(WIP) + 收藏记录(WIP) + 优惠劵(WIP) @@ -150,34 +63,37 @@ import PointList from '@/views/member/user/components/PointList.vue' import SignList from '@/views/member/user/components/SignList.vue' import CardTitle from '@/views/member/user/components/CardTitle.vue' import * as UserApi from '@/api/member/user' -import { formatDate } from '@/utils/formatTime' -import { DICT_TYPE } from '@/utils/dict' import UserForm from '@/views/member/user/UserForm.vue' -// TODO @梦:把用户信息,也抽成一个组件,类似 AccountInfo import AccountInfo from '@/views/member/user/components/AccountInfo.vue' +import UserBasicInfo from '@/views/member/user/components/UserBasicInfo.vue' +import AddressList from '@/views/member/user/components/AddressList.vue' defineOptions({ name: 'MemberDetail' }) const activeName = ref('point') // 账户明细 选中的 tabs const loading = ref(true) // 加载中 -let user = ref({ +let user = ref({ areaId: undefined, avatar: undefined, birthday: undefined, createTime: undefined, - id: undefined, + id: NaN, loginDate: undefined, loginIp: '', mark: '', mobile: '', name: '', nickname: '', - password: null, - registerIp: undefined, + registerIp: '', sex: 0, - status: 0 + status: 0, + areaName: '' }) - +/** 添加/修改操作 */ +const formRef = ref() +const openForm = (type: string, id?: number) => { + formRef.value.open(type, id) +} /** 获得用户 */ const getUserData = async (id: number) => { loading.value = true @@ -188,16 +104,10 @@ const getUserData = async (id: number) => { } } -/** 添加/修改操作 */ -const formRef = ref() -const openForm = (type: string, id?: number) => { - formRef.value.open(type, id) -} - /** 初始化 */ const route = useRoute() const router = useRouter() -const member_id = route.params.member_id as number +const member_id = Number(route.params.userId as string) onMounted(() => { if (!member_id) { // TODO @@ -222,11 +132,4 @@ onMounted(() => { justify-content: space-between; align-items: center; } -.cell-item { - display: inline; -} -/** TODO 下面 css 貌似没啥用? */ -.cell-item::after { - content: ':'; -}