diff --git a/components/address.vue b/components/address.vue index e944095..bbaccdb 100644 --- a/components/address.vue +++ b/components/address.vue @@ -32,10 +32,22 @@ export default { selectAddress: {}, } }, + created() { + uni.$on('refreshAddressList', this.getAddressList); + }, mounted() { this.getAddressList(); }, - activated () { + beforeUnmount() { + uni.$off('refreshAddressList', this.getAddressList); + }, + beforeDestroy() { + uni.$off('refreshAddressList', this.getAddressList); + }, + onShow() { + this.getAddressList(); + }, + activated() { this.getAddressList(); }, methods: {