增加登录判断
This commit is contained in:
parent
d9b275aceb
commit
e00888cdf5
|
@ -78,6 +78,7 @@
|
||||||
import AppLayout from "@/components/layout/layout";
|
import AppLayout from "@/components/layout/layout";
|
||||||
import WidgetTips from "@/components/widgets/tips";
|
import WidgetTips from "@/components/widgets/tips";
|
||||||
import WidgetSwitch from "@/components/widgets/switch";
|
import WidgetSwitch from "@/components/widgets/switch";
|
||||||
|
import { mapGetters } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
name: "address-add",
|
name: "address-add",
|
||||||
data() {
|
data() {
|
||||||
|
@ -99,6 +100,11 @@ export default {
|
||||||
WidgetTips,
|
WidgetTips,
|
||||||
WidgetSwitch,
|
WidgetSwitch,
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters({
|
||||||
|
isLogin: "user/isLogin",
|
||||||
|
}),
|
||||||
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
if (e.id) {
|
if (e.id) {
|
||||||
this.pageTitle = "编辑地址";
|
this.pageTitle = "编辑地址";
|
||||||
|
@ -116,7 +122,11 @@ export default {
|
||||||
this.mobile = platformAddress.mobile;
|
this.mobile = platformAddress.mobile;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {
|
||||||
|
if (!this.isLogin) {
|
||||||
|
this.$store.commit("user/showLoginModal", true);
|
||||||
|
}
|
||||||
|
},
|
||||||
onReady() {},
|
onReady() {},
|
||||||
onReachBottom() {},
|
onReachBottom() {},
|
||||||
onPullDownRefresh() {},
|
onPullDownRefresh() {},
|
||||||
|
|
Loading…
Reference in New Issue