浏览代码

bug修改

wangfei 6 年前
父节点
当前提交
5a4a220141
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6
    4
      src/components/libraryListItem/index.vue

+ 6
- 4
src/components/libraryListItem/index.vue 查看文件

@@ -105,12 +105,14 @@ export default {
105 105
       return status
106 106
     },
107 107
     lateDay () {
108
-      const nowdata = new Date()
109
-      return toolClass.diffDate(new Date(this.data.EndDate), nowdata)
108
+      const nowdata = toolClass.dateFormat(new Date(),'yyyy-MM-dd 00:00:00')
109
+      const EndDate = new Date(toolClass.dateFormat(new Date(this.data.EndDate),'yyyy-MM-dd 00:00:00'))
110
+      return toolClass.diffDate(EndDate, nowdata)
110 111
     },
111 112
     borrowDay () {
112
-      const nowdata = new Date()
113
-      return toolClass.diffDate(new Date(this.data.BorrowDate), nowdata)
113
+      const nowdata = toolClass.dateFormat(new Date(),'yyyy-MM-dd 00:00:00')
114
+      const BorrowDate = new Date(toolClass.dateFormat(new Date(this.data.BorrowDate),'yyyy-MM-dd 00:00:00'))
115
+      return toolClass.diffDate(BorrowDate, nowdata)
114 116
     }
115 117
   },
116 118
   components: {