首页图片获取,行业报告中行业新闻及详情页和新品发布及详情页接口对接完毕
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="xw_content" v-for="(item,index) in newsList" :key="index" @click="clickNews(item)">
|
||||
<u--image :src="item.cover" width="192rpx" height="122rpx" :lazy-load="true">
|
||||
<u--image :src="imgUrl+item.cover" width="192rpx" height="122rpx" :lazy-load="true">
|
||||
</u--image>
|
||||
<view class="xw_right">
|
||||
<view class="xw_title">
|
||||
@@ -27,25 +27,13 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
newsList: [
|
||||
// {
|
||||
// src: '/static/report/zhanwei_xf.png',
|
||||
// title: '2022近50款食品饮料新品,创新的方向都在这里',
|
||||
// time: '2022-12-03 09:59',
|
||||
// place: '第一食品资讯官方账号'
|
||||
// },
|
||||
// {
|
||||
// src: '/static/report/zhanwei_xf.png',
|
||||
// title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
|
||||
// time: '2022-10-18 14:43',
|
||||
// place: '腾讯新闻 '
|
||||
// },
|
||||
|
||||
],
|
||||
imgUrl: '',
|
||||
newsList: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getNews()
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
},
|
||||
methods: {
|
||||
//获取行业新闻
|
||||
@@ -55,7 +43,7 @@
|
||||
// }
|
||||
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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user