Browse Source

更新时间显示

guhongwei 5 năm trước cách đây
mục cha
commit
45717b3db8
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      src/layout/index/cause.vue
  2. 1 1
      src/layout/index/danwei.vue

+ 1 - 1
src/layout/index/cause.vue

@@ -10,7 +10,7 @@
                 <el-link :underline="false" @click="$router.push({ path: `/info/detail?id=${tag.id}` })">{{ tag.title }} </el-link>
               </el-col>
               <el-col :span="4" class="time">
-                {{ tag.publish_time }}
+                {{ tag.meta && tag.meta.createdAt ? new Date(tag.meta.createdAt).toLocaleDateString() : '' || '' }}
               </el-col>
             </el-col>
           </el-tab-pane>

+ 1 - 1
src/layout/index/danwei.vue

@@ -10,7 +10,7 @@
                 <el-link :underline="false" @click="$router.push({ path: `/info/detail?id=${tag.id}` })">{{ tag.title }}</el-link>
               </el-col>
               <el-col :span="4" class="time">
-                {{ tag.time }}
+                {{ tag.meta && tag.meta.createdAt ? new Date(tag.meta.createdAt).toLocaleDateString() : '' || '' }}
               </el-col>
             </el-col>
           </el-tab-pane>