dengjie commit : 发布日期格式解决

This commit is contained in:
clay
2022-12-26 22:19:45 +08:00
parent d3c83c4c7d
commit ff682aedc3
3 changed files with 25 additions and 3 deletions

View File

@@ -9,7 +9,7 @@
</view>
<view style="display: flex;">
<text class="xw_time">
{{item.pub_time}}
{{item.pub_time_str}}
</text>
<text class="xw_time xw_place">
{{item.pub_name}}
@@ -21,6 +21,9 @@
</template>
<script>
import {
dateFormat
} from '../../utills/date.js'
export default {
data() {
return {
@@ -52,7 +55,10 @@
// }
getNews() {
this.$apiServe.getNews().then(res => {
// console.log('行业新闻', res.data.data)
console.log('行业新闻', res.data.data)
for (const item of res.data.data) {
item.pub_time_str = dateFormat(item.pub_time_str)
}
this.newsList = res.data.data
}).finally(_ => {})
},

View File

@@ -24,7 +24,7 @@
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>
<text>{{item.pub_time}}</text>
<text>{{item.pub_time_str}}</text>
</view>
</view>
</view>