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
肖广 2 years ago
commit c16126e94e

@ -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