diff --git a/src/pages/address/edit.vue b/src/pages/address/edit.vue index b7a609d..4be4a6d 100644 --- a/src/pages/address/edit.vue +++ b/src/pages/address/edit.vue @@ -78,6 +78,7 @@ import AppLayout from "@/components/layout/layout"; import WidgetTips from "@/components/widgets/tips"; import WidgetSwitch from "@/components/widgets/switch"; +import { mapGetters } from "vuex"; export default { name: "address-add", data() { @@ -99,6 +100,11 @@ export default { WidgetTips, WidgetSwitch, }, + computed: { + ...mapGetters({ + isLogin: "user/isLogin", + }), + }, onLoad(e) { if (e.id) { this.pageTitle = "编辑地址"; @@ -116,7 +122,11 @@ export default { this.mobile = platformAddress.mobile; } }, - onShow() {}, + onShow() { + if (!this.isLogin) { + this.$store.commit("user/showLoginModal", true); + } + }, onReady() {}, onReachBottom() {}, onPullDownRefresh() {},