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() } })