wangfei 6 anni fa
parent
commit
0085036027

+ 2
- 0
src/pages/user/library/booksSearch/index.vue Vedi File

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

+ 1
- 1
src/pages/user/library/borrowedRecord/index.vue Vedi File

56
             <span class="title">{{currentItem.BookName}}</span>
56
             <span class="title">{{currentItem.BookName}}</span>
57
             <span>借阅时间:{{toolClass.dateFormat(currentItem.BorrowDate)}}</span>
57
             <span>借阅时间:{{toolClass.dateFormat(currentItem.BorrowDate)}}</span>
58
             <span>应还时间:{{toolClass.dateFormat(currentItem.EndDate, 'yyyy-MM-dd')}}</span>
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
           </div>
60
           </div>
61
         </div>
61
         </div>
62
       </div>
62
       </div>

+ 3
- 1
src/util/util.js Vedi File

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