From e00888cdf5b5273d6a2f32bdfc560e1e7409e778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Mon, 3 Apr 2023 15:19:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/address/edit.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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() {},