From f9a89a7129820a12fe23f543a391f9c8d4beef14 Mon Sep 17 00:00:00 2001 From: linxi Date: Mon, 24 Feb 2025 17:01:26 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A3262=20=E3=80=90=E7=A4=BC=E5=93=81?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E3=80=91=E6=AF=8F=E6=AC=A1=E9=A2=86=E5=8F=96?= =?UTF-8?q?=E7=A4=BC=E5=93=81=E6=97=B6=E8=BE=93=E5=85=A5=E6=96=B0=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=EF=BC=8C=E9=83=BD=E4=BC=9A=E6=8A=8A=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E4=BF=9D=E5=AD=98=E7=9A=84=E5=9C=B0=E5=9D=80=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E6=8E=89=EF=BC=8C=E8=AE=BE=E7=BD=AE=E6=96=B0=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E4=B9=9F=E8=A6=81=E4=BF=9D=E7=95=99=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E7=9A=84=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/gift/components/AddressList.vue | 22 ++++++++++++------- pkg_user/views/gift/components/GiftCard.vue | 7 +++--- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/pkg_user/views/gift/components/AddressList.vue b/pkg_user/views/gift/components/AddressList.vue index cba6451..27a79d7 100644 --- a/pkg_user/views/gift/components/AddressList.vue +++ b/pkg_user/views/gift/components/AddressList.vue @@ -10,22 +10,25 @@ @open="open" > 收货地址 - + - + 收货地址: - {{ addressList.realName }} - {{ addressList.phone }} + {{ item.realName }} + {{ item.phone }} - {{ addressList.province + addressList.city + addressList.district + addressList.detail }} + {{ item.province + item.city + item.district + item.detail }} @@ -45,8 +48,8 @@ export default { props: { addressList: { - type: Object, - default: () => {} + type: Array, + default: () => [] } }, data() { @@ -106,6 +109,8 @@ export default { .address-list { padding: 20rpx; width: 640rpx; + height: 800rpx; + overflow: auto; } .address-item { @@ -141,6 +146,7 @@ export default { background-color: #fff; border: 1rpx solid #ddd; border-radius: 100rpx; - + position: sticky; + bottom: 0; } \ No newline at end of file diff --git a/pkg_user/views/gift/components/GiftCard.vue b/pkg_user/views/gift/components/GiftCard.vue index 78b86bc..c58104b 100644 --- a/pkg_user/views/gift/components/GiftCard.vue +++ b/pkg_user/views/gift/components/GiftCard.vue @@ -76,7 +76,7 @@ export default { // 组件数据 giftNotice: '', isReceive: false, - address: {}, + address: [], order: '' } }, @@ -84,7 +84,8 @@ export default { addr: { handler(newVal, oldVal) { if (newVal && newVal.id) { - this.address = newVal + // this.address = newVal + this.setAddress() } }, deep: true @@ -132,7 +133,7 @@ export default { if (res.data.length === 0) { this.$refs.addressDialog.open() } else { - this.address = res.data.filter(item => item.isDefault === 1).length === 0 ? res.data[0] : res.data.filter(item => item.isDefault === 1)[0] + this.address = res.data this.$refs.AddressList.open() } })