dengjie commit : 发布日期格式解决
This commit is contained in:
@@ -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(_ => {})
|
||||
},
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user