feat: 获取购物车商品前端判断是否登录

merge-requests/44/head
xiaoguang 3 years ago
parent 465f2508f9
commit 279b82b8fc

@ -101,7 +101,7 @@ export default {
};
},
computed: {
...mapState(["cartProducts"]),
...mapState(["cartProducts", "token"]),
},
watch: {
cartProducts: {
@ -126,7 +126,9 @@ export default {
},
},
created() {
this.$store.dispatch("getCartProducts");
if (this.token) {
this.$store.dispatch("getCartProducts");
}
},
methods: {
onJumpCart() {

Loading…
Cancel
Save