Skip to content

Commit b7b57fe

Browse files
committedJun 16, 2021
fix: 修复详情页时间显示bug
1 parent 490ba22 commit b7b57fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎pages/detail/_id.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ export default {
9999
return result
100100
},
101101
time() {
102-
return dayjs(this.info.articleUpdateTime).format('YYYY-MM-DD HH:mm:ss')
102+
return this.info.articleUpdateTime
103+
? dayjs(this.info.articleUpdateTime).format('YYYY-MM-DD HH:mm:ss')
104+
: dayjs(this.info.articleCreateTime).format('YYYY-MM-DD HH:mm:ss')
103105
},
104106
handleDetail() {
105107
let res = this.info.articleContentHtml

0 commit comments

Comments
 (0)
Please sign in to comment.