Browse Source

修改时间显示格式

SanHQin 1 year ago
parent
commit
da62b42fe8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/components/pages/test/check/index.vue

+ 2 - 1
src/components/pages/test/check/index.vue

@@ -618,7 +618,8 @@ export default {
               topic.courseArray = [];
               topic.courseArray = [];
               topic.array.forEach(async i => {
               topic.array.forEach(async i => {
                 let data = await this.getCourse(i)
                 let data = await this.getCourse(i)
-                data.update_at = new Date(data.update_at).toLocaleString().replace('/', '-')
+								console.log(data.update_at)
+                data.update_at = new Date(data.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-')
                 topic.courseArray.push(data)
                 topic.courseArray.push(data)
               })
               })
             } else if (topic.type == 7) {
             } else if (topic.type == 7) {