From abadbcee669a42f2796ff1f53a2e51cbebb5b9c9 Mon Sep 17 00:00:00 2001 From: linxi <957440651@qq.com> Date: Fri, 7 Nov 2025 15:59:28 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A4457=20=E3=80=90=E6=97=85=E5=B1=85?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E6=94=B6?= =?UTF-8?q?=E7=A4=BC=E2=80=94=E3=80=90=E5=95=86=E5=93=81=E3=80=91=E7=B1=BB?= =?UTF-8?q?=E7=9A=84=E5=A1=AB=E5=86=99=E5=9C=B0=E5=9D=80=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E9=9C=80=E6=94=B9=E5=9B=9E=E5=8E=9F=E6=9D=A5=E7=9A=84=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg_user/views/gift/components/GiftCard.vue | 25 ++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pkg_user/views/gift/components/GiftCard.vue b/pkg_user/views/gift/components/GiftCard.vue index 2799690..8147ca5 100644 --- a/pkg_user/views/gift/components/GiftCard.vue +++ b/pkg_user/views/gift/components/GiftCard.vue @@ -84,6 +84,8 @@ + + import { getGiftCardSendNotice, getGiftCardReceive, receiveSojoumGroupBuyGift } from '@/api/gift' import cookie from "@/utils/store/cookie"; -import { getAddressList } from '@/api/user' +import { getAddressList } from '@/api/user' import giftTips from './giftTips.vue' import GiftAddressForm from './GiftAddressForm.vue' +import AddressDialog from './AddressDialog.vue' +import AddressList from './AddressList.vue' export default { name: 'GiftCard', components: { giftTips, - GiftAddressForm + GiftAddressForm, + AddressDialog, + AddressList }, props: { isTravelGroup: { @@ -129,6 +135,7 @@ export default { // 组件数据 giftNotice: '', order: '', + address: [], showAddressForm: false, unavailableDates: ['2025-08-13', '2025-08-14', '2025-08-15', '2025-08-16', '2025-08-17', '2025-08-18', '2025-08-19', '2025-08-20', '2025-08-21', '2025-08-22', '2025-08-23'] } @@ -140,7 +147,7 @@ export default { return gitfNum === isReceiveNum }, isLogin() { - return !!cookie.get('login_status'); + return !!cookie.get('login_status'); }, myGift() { return this.card.giftProducts && this.card.giftProducts.filter(item => item.isCurrentUser === 1).length > 0 && this.card.giftProducts.filter(item => item.isCurrentUser === 1)[0] || this.card.giftProduct && this.card.giftProducts[0] @@ -218,8 +225,16 @@ export default { }).finally(() => { }) }, - setAddress() { - this.showAddressForm = true; + setAddress(flag) { + getAddressList().then(res => { + if (res.data.length === 0) { + this.$refs.addressDialog.open() + } else { + this.address = res.data + if(flag) return + this.$refs.AddressList.open() + } + }) }, closeAddressForm() {