升级写法兼容
This commit is contained in:
@ -38,7 +38,7 @@ div
|
||||
<script>
|
||||
export default {
|
||||
async asyncData({ route, app, $axios }) {
|
||||
const { data } = await $axios.$get(`/public/article/details?id=${route.params.id}`)
|
||||
const data = await $axios.$get(`/public/article/details?id=${route.params.id}`)
|
||||
const result = data.result
|
||||
result.post_date = app.$moment(result.post_date).utc().format('lll')// 格式化时间
|
||||
// 热度值计算
|
||||
|
Reference in New Issue
Block a user