Commit 25041cb7 authored by 徐光星's avatar 徐光星

feat: 处理购物车上报购物车数量接口错误上报

parent 119af22a
......@@ -215,8 +215,8 @@ export default {
},
async getCartCount() {
if (localStorage.get('vccToken') && isDef(this.cartIndex) && isApp) {
const [res] = await api.getShopCartCount();
this.cartCount = res.count;
const [res, err] = await api.getShopCartCount();
this.cartCount = err ? 0 : res.count || 0;
this.$nextTick(() => {
this.$refs.crBackTop.$forceUpdate();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment