|
@@ -86,6 +86,7 @@
|
86
|
86
|
</template>
|
87
|
87
|
|
88
|
88
|
<script>
|
|
89
|
+import dayjs from 'dayjs'
|
89
|
90
|
import { createNamespacedHelpers, mapState } from 'vuex'
|
90
|
91
|
|
91
|
92
|
const { mapState: mapLibSate, mapActions } = createNamespacedHelpers('library')
|
|
@@ -196,9 +197,8 @@ export default {
|
196
|
197
|
},
|
197
|
198
|
|
198
|
199
|
diffToday(dt) {
|
199
|
|
- const days =
|
200
|
|
- (new window.Date().getTime() - (new Date(dt)).getTime()) / (1000 * 60 * 60 * 24)
|
201
|
|
- return days <= 0 ? 0 : days
|
|
200
|
+ const days = dayjs(new Date()).startOf('day').diff(dayjs(dt).startOf('day'), 'day')
|
|
201
|
+ return days < 0 ? 0 : days
|
202
|
202
|
},
|
203
|
203
|
cancel() {
|
204
|
204
|
this.customerInfo = ''
|