首页图片获取,行业报告中行业新闻及详情页和新品发布及详情页接口对接完毕

This commit is contained in:
clay
2022-12-28 22:15:56 +08:00
parent 8c63db07ab
commit b3b0b620bf
9 changed files with 89 additions and 184 deletions

View File

@@ -18,19 +18,17 @@
</template>
<script>
import {
dateFormatXwDetail
} from '../../utills/date.js'
export default {
data() {
return {
id: '',
detailList: []
// title: '2022近50款食品饮料新品创新的方向都在这里',
// time: '2022-12-03 09:59',
// place: '第一食品资讯官方账号',
// news: '<h1>一级标题</h1><br/><h2>二级标题</h2>'
detailList: [],
}
},
onLoad(option) {
console.log('新闻详情id', option.id);
this.id = option.id
this.getNewsDetail()
},
@@ -38,9 +36,11 @@
//获取行业新闻详情
getNewsDetail() {
this.$apiServe.getNewsDetail(this.id).then(res => {
console.log('新闻详情页', res.data.data)
// console.log('新闻详情页', res.data.data)
let detail = res.data.data
detail.pub_time = dateFormatXwDetail(detail.pub_time)
this.detailList = res.data.data
}).finally(_ => {})
},
}