Jelajahi Sumber

Merge branch 'master' of http://git.izouma.com/xiongzhu/raex_front into dev

panhui 3 tahun lalu
induk
melakukan
8c2bcc6146
2 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 4 1
      src/components/product/ActivityRecord.vue
  2. 2 1
      src/views/Home.vue

+ 4 - 1
src/components/product/ActivityRecord.vue

@@ -47,6 +47,9 @@ export default {
     },
     computed: {
         time() {
+            if (this.info.startTime) {
+                return this.dayjs(this.info.startTime).format('YYYY-MM-DD HH:mm');
+            }
             if (this.info.createdAt) {
                 return this.dayjs(this.info.createdAt).format('YYYY-MM-DD HH:mm');
             }
@@ -55,7 +58,7 @@ export default {
         },
         isNew() {
             if (this.info.createdAt) {
-                let time = this.dayjs(this.info.createdAt).add(1, 'day');
+                let time = this.dayjs(this.info.startTime || this.info.createdAt).add(1, 'day');
                 return this.dayjs().isBefore(time);
             } else {
                 return false;

+ 2 - 1
src/views/Home.vue

@@ -401,7 +401,8 @@ export default {
                             del: false,
                             companyId: 1
                         },
-                        size: 5
+                        size: 5,
+                        sort:'id,desc'
                     },
                     { body: 'json' }
                 )