wangfei 6 lat temu
rodzic
commit
0085036027

+ 2
- 0
src/pages/user/library/booksSearch/index.vue Wyświetl plik

@@ -102,6 +102,7 @@ export default {
102 102
       'getMineBook',
103 103
       'reserveBook',
104 104
       "updateBookLeftNum",
105
+      "updateRecommendBookLeftNum",
105 106
     ]),
106 107
     search () { // 搜索
107 108
       if (this.searchKey !== '') {
@@ -120,6 +121,7 @@ export default {
120 121
         bookid: this.reserveBookId,
121 122
       }).then(() => {
122 123
         this.updateBookLeftNum(this.reserveBookId)
124
+        this.updateRecommendBookLeftNum(this.reserveBookId)
123 125
         this.getMineBook({
124 126
           page: 1,
125 127
           pagesize: 1000,

+ 1
- 1
src/pages/user/library/borrowedRecord/index.vue Wyświetl plik

@@ -56,7 +56,7 @@
56 56
             <span class="title">{{currentItem.BookName}}</span>
57 57
             <span>借阅时间:{{toolClass.dateFormat(currentItem.BorrowDate)}}</span>
58 58
             <span>应还时间:{{toolClass.dateFormat(currentItem.EndDate, 'yyyy-MM-dd')}}</span>
59
-            <span>归还时间:{{currentItem.BorrowStatus == '2' || currentItem.BorrowStatus == '3' ? '暂未归还' : toolClass.dateFormat(currentItem.ReturnDate)}}</span>
59
+            <span>归还时间:{{currentItem.BorrowStatus == '1' || currentItem.BorrowStatus == '0' ? '暂未归还' : toolClass.dateFormat(currentItem.ReturnDate)}}</span>
60 60
           </div>
61 61
         </div>
62 62
       </div>

+ 3
- 1
src/util/util.js Wyświetl plik

@@ -3,10 +3,12 @@ import api from './api'
3 3
 import wechatConfig from '../config/index'
4 4
 const toolClass = {
5 5
   dateFormat: (timestamp, fmt) => {
6
+    if (timestamp == '0001-01-01T00:00:00Z') {
7
+      return ''
8
+    }
6 9
     if (!fmt) {
7 10
       fmt = 'yyyy-MM-dd hh:mm'
8 11
     }
9
-
10 12
     let date = new Date(timestamp)
11 13
     var o = {
12 14
       'M+': date.getMonth() + 1,