Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
temple_material_request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-07-28 00:54:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
df194da9a07c234e4b4c564598064c1abaa78952
df194da9
1 parent
4d9ac2ae
fix 购物车删除选中值后处理逻辑优化
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
src/views/material_pre_request.vue
src/views/material_pre_request.vue
View file @
df194da
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-2
7 21:00:09
* @LastEditTime: 2024-07-2
8 00:53:21
* @FilePath: /temple_material_request/src/views/material_pre_request.vue
* @Description: 待申领物资页面
-->
...
...
@@ -252,10 +252,13 @@ const onClickDel = () => { // 点击删除回调
.then(async () => {
const { code, data } = await delCartAPI({ activity_id, good_ids: del_ids });
if (code) {
if (!list.value.length) {
// 还原列表显示
onClickCancel();
// 获取购物车列表
getCartList();
}
// 删除del_ids
list.value = list.value.filter(item => !del_ids.includes(item.good_id));
sum_num.value = list.value.length;
//
showToast('删除成功');
}
...
...
Please
register
or
login
to post a comment