Skip to content

Commit

Permalink
购物车问题修复
Browse files Browse the repository at this point in the history
* 修复删除购物车商品时,购物车列表不刷新的问题。
* 修复购物车为空时,点击页面返回首页按钮无效的问题。
  • Loading branch information
exsystem committed Jan 16, 2023
1 parent 81519b6 commit 39201a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pages/cart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ Page({
}).then(() => {
this.deleteGoodsService({ spuId, skuId }).then(() => {
Toast({ context: this, selector: '#t-toast', message: '商品删除成功' });
this.setData({ cartGroupData: null });
this.refreshData();
});
});
Expand Down
2 changes: 1 addition & 1 deletion pages/cart/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/>
</block>
<!-- 购物车空态 -->
<cart-empty wx:else bindbtnclick="onBtnClick" />
<cart-empty wx:else bind:handleClick="onGotoHome" />
<t-toast id="t-toast" />
<t-dialog id="t-dialog" t-class-confirm="add-notes__confirm" />

0 comments on commit 39201a3

Please sign in to comment.