修复可能的问题
This commit is contained in:
parent
bc28a5b099
commit
7585368757
|
@ -36,7 +36,7 @@
|
|||
|
||||
<script>
|
||||
import AuthLoginBox from "@/components/auth/login-box";
|
||||
import { mapState } from "vuex";
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
name: "component-layout",
|
||||
data() {
|
||||
|
@ -84,8 +84,8 @@ export default {
|
|||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
isLogin: (state) => state.user.token.length > 0,
|
||||
...mapGetters({
|
||||
isLogin: "user/isLogin",
|
||||
}),
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -80,9 +80,7 @@ export default {
|
|||
},
|
||||
});
|
||||
}
|
||||
}).catch(e => {
|
||||
throw e
|
||||
});
|
||||
}).catch(e => { });
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -173,7 +171,7 @@ export default {
|
|||
return resolve(list);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { throw e });
|
||||
}).catch(e => { });
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -242,9 +240,7 @@ export default {
|
|||
return resolve(order);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => {
|
||||
throw e
|
||||
});
|
||||
}).catch(e => { });
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
<script>
|
||||
import AppLayout from "@/components/layout/layout";
|
||||
import { mapState } from "vuex";
|
||||
import { mapGetters, mapState } from "vuex";
|
||||
export default {
|
||||
name: "member",
|
||||
data() {
|
||||
|
@ -76,9 +76,11 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
isLogin: (state) => state.user.token.length > 0,
|
||||
userInfo: (state) => state.user.info,
|
||||
}),
|
||||
...mapGetters({
|
||||
isLogin: "user/isLogin",
|
||||
}),
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {},
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<script>
|
||||
import AppLayout from "@/components/layout/layout";
|
||||
import { mapState } from "vuex";
|
||||
import { mapGetters, mapState } from "vuex";
|
||||
export default {
|
||||
name: "member-password",
|
||||
data() {
|
||||
|
@ -52,9 +52,11 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
isLogin: (state) => state.user.token.length > 0,
|
||||
userInfo: (state) => state.user.info,
|
||||
}),
|
||||
...mapGetters({
|
||||
isLogin: "user/isLogin",
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
if (!this.isLogin) {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
import AppLayout from "@/components/layout/layout";
|
||||
import AppCate from "@/components/cate/cate";
|
||||
import WidgetSearch from "@/components/widgets/search";
|
||||
import { mapState } from "vuex";
|
||||
import { mapGetters, mapState } from "vuex";
|
||||
export default {
|
||||
name: "service-cate",
|
||||
data() {
|
||||
|
@ -57,7 +57,9 @@ export default {
|
|||
...mapState({
|
||||
indexCateId: (state) => state.system.indexCateId,
|
||||
cartCount: (state) => state.cart.count,
|
||||
isLogin: (state) => state.user.token.length > 0,
|
||||
}),
|
||||
...mapGetters({
|
||||
isLogin: "user/isLogin",
|
||||
}),
|
||||
},
|
||||
async onLoad() {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<script>
|
||||
import AppLayout from "@/components/layout/layout";
|
||||
import AppCate from "@/components/cate/cate";
|
||||
import { mapState } from "vuex";
|
||||
import { mapGetters, mapState } from "vuex";
|
||||
export default {
|
||||
name: "service-list",
|
||||
data() {
|
||||
|
@ -48,7 +48,9 @@ export default {
|
|||
computed: {
|
||||
...mapState({
|
||||
cartCount: (state) => state.cart.count,
|
||||
isLogin: (state) => state.user.token.length > 0,
|
||||
}),
|
||||
...mapGetters({
|
||||
isLogin: "user/isLogin",
|
||||
}),
|
||||
},
|
||||
onLoad(e) {
|
||||
|
|
|
@ -13,7 +13,11 @@ export default {
|
|||
create_time: 0,
|
||||
},
|
||||
},
|
||||
getters: {},
|
||||
getters: {
|
||||
isLogin(state) {
|
||||
return state.token && state.token.length > 0;
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
showLoginModal(state, data) {
|
||||
state.showLoginModal = data;
|
||||
|
|
Loading…
Reference in New Issue