Merge branch 'feature/task1.0.0_xg' into 'feature/task1.0.0'

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

See merge request yanxuan-frontend/shop-pc!44
merge-requests/45/head
肖广 3 years ago
commit c16126e94e

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

Loading…
Cancel
Save