增加登录判断

This commit is contained in:
TOP糯米 2023-04-03 15:19:19 +08:00
parent d9b275aceb
commit e00888cdf5
1 changed files with 11 additions and 1 deletions

View File

@ -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() {},