wangfei 6 年前
父节点
当前提交
3575d95e9b
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10
    0
      src/store/book/index.js

+ 10
- 0
src/store/book/index.js 查看文件

@@ -32,6 +32,16 @@ export default {
32 32
         }
33 33
         return x
34 34
       })}
35
+      // let list = state.recommends.list
36
+      // list = list.map(x => {
37
+      //   if(x.BookId == bookid){
38
+      //     x.LeftNum = x.LeftNum - 1
39
+      //     return x
40
+      //   }
41
+      //   return x
42
+      // })
43
+      // list.splice(list.findIndex(item => item.LeftNum < 1), 1)
44
+      // state.recommends = {...state.recommends, list}
35 45
     },
36 46
     updateBookLeftNum(state, bookid) {
37 47
       state.books = {...state.books, list: state.books.list.map(x => {