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