diff --git a/components/certifiedCj/certifiedCj.vue b/components/certifiedCj/certifiedCj.vue
index bf8ff9d..428243c 100644
--- a/components/certifiedCj/certifiedCj.vue
+++ b/components/certifiedCj/certifiedCj.vue
@@ -1,16 +1,17 @@
-
-
+
+
- {{item.title}}
+ {{item.name}}
-
+
+ {{item.tag}}
@@ -21,48 +22,56 @@
export default {
data() {
return {
+ cjsList: [
- cjsList: [{
- src: '/static/report/zhanwei_xf(1).png',
- title: '西安兴沃丰餐饮管理有限责任公司',
- tags: [{
- tag: '咖啡'
- },
- {
- tag: '饮品'
- }
- ]
- },
- {
- src: '/static/report/zhanwei_xf(1).png',
- title: '福建省海纳川食品有限公司',
- tags: [{
- tag: '活冻鲍鱼'
- },
- {
- tag: '鲍鱼罐头'
- },
- {
- tag: '佛跳墙'
- },
- {
- tag: '海螺片'
- }
+ // {
+ // src: '/static/report/zhanwei_xf(1).png',
+ // title: '西安兴沃丰餐饮管理有限责任公司',
+ // tags: [{
+ // tag: '咖啡'
+ // },
+ // {
+ // tag: '饮品'
+ // }
+ // ]
+ // },
+ // {
+ // src: '/static/report/zhanwei_xf(1).png',
+ // title: '福建省海纳川食品有限公司',
+ // tags: [{
+ // tag: '活冻鲍鱼'
+ // },
+ // {
+ // tag: '鲍鱼罐头'
+ // },
+ // {
+ // tag: '佛跳墙'
+ // },
+ // {
+ // tag: '海螺片'
+ // }
- ]
- },
+ // ]
+ // },
]
}
},
+ created() {
+ this.getCertifiedCj()
+ },
methods: {
+ // 获取认证厂家列表
+ getCertifiedCj() {
+ this.$apiServe.getCertifiedCj().then(res => {
+ // console.log('认证厂家', res.data.data)
+ this.cjsList = res.data.data
+ }).finally(_ => {})
+ },
// 跳转到认证厂家详情页
- clickCj(index) {
- if (index == 0) {
- uni.navigateTo({
- url: '../../packageReport/certifiedCjDetail/certifiedCjDetail'
- })
-
- }
+ clickCj(item) {
+ uni.navigateTo({
+ url: '../../packageReport/certifiedCjDetail/certifiedCjDetail?id=' + item.id
+ })
}
}
}
diff --git a/components/news/news.vue b/components/news/news.vue
index bced60a..9ef6be4 100644
--- a/components/news/news.vue
+++ b/components/news/news.vue
@@ -1,7 +1,7 @@
-
-
+
+
@@ -9,10 +9,10 @@
- {{item.time}}
+ {{item.pub_time}}
- {{item.place}}
+ {{item.pub_name}}
@@ -24,35 +24,43 @@
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: '腾讯新闻 '
- },
- {
- src: '/static/report/zhanwei_xf.png',
- title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
- time: '2022-10-18 14:43',
- place: '腾讯新闻'
- },
+ 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: '腾讯新闻 '
+ // },
+
],
}
},
+ created() {
+ this.getNews()
+ },
methods: {
+ //获取行业新闻
+ // {
+ // pageSize: 2,
+ // pageNum: 1
+ // }
+ getNews() {
+ this.$apiServe.getNews().then(res => {
+ // console.log('行业新闻', res.data.data)
+ this.newsList = res.data.data
+ }).finally(_ => {})
+ },
// 跳转到新闻详情页
- clickNews(index) {
- if (index == 0) {
- uni.navigateTo({
- url: '../../packageReport/xwDetail/xwDetail'
- })
- }
+ clickNews(item) {
+ uni.navigateTo({
+ url: '../../packageReport/xwDetail/xwDetail?id=' + item.id
+ })
},
}
}
diff --git a/components/products/products.vue b/components/products/products.vue
index adda211..97c8465 100644
--- a/components/products/products.vue
+++ b/components/products/products.vue
@@ -2,31 +2,29 @@
-
+
-
+
- {{item.img_tag}}
+ {{item.cate_name}}
- {{item.title}}
+ {{item.name}}
-
- {{item.desc}}
+ {{item.title}}
发布日期:
- {{item.time}}
+ {{item.pub_time}}
@@ -37,49 +35,72 @@
diff --git a/packageReport/xwDetail/xwDetail.vue b/packageReport/xwDetail/xwDetail.vue
index 29f55f2..aca9aca 100644
--- a/packageReport/xwDetail/xwDetail.vue
+++ b/packageReport/xwDetail/xwDetail.vue
@@ -1,18 +1,18 @@
- {{title}}
+ {{detailList.title}}
- {{time}}
+ {{detailList.pub_time}}
- {{place}}
+ {{detailList.pub_name}}
-
+
@@ -21,14 +21,28 @@
export default {
data() {
return {
- title: '2022近50款食品饮料新品,创新的方向都在这里',
- time: '2022-12-03 09:59',
- place: '第一食品资讯官方账号',
- news: '一级标题
二级标题
'
+ id: '',
+ detailList: []
+ // title: '2022近50款食品饮料新品,创新的方向都在这里',
+ // time: '2022-12-03 09:59',
+ // place: '第一食品资讯官方账号',
+ // news: '一级标题
二级标题
'
}
},
+ onLoad(option) {
+ console.log('新闻详情id', option.id);
+ this.id = option.id
+ this.getNewsDetail()
+ },
methods: {
+ //获取行业新闻详情
+ getNewsDetail() {
+ this.$apiServe.getNewsDetail(this.id).then(res => {
+ console.log('新闻详情页', res.data.data)
+ this.detailList = res.data.data
+ }).finally(_ => {})
+ },
}
}
diff --git a/pages/detail/productsDetail/productsDetail.vue b/pages/detail/productsDetail/productsDetail.vue
index a73f97b..d48ade3 100644
--- a/pages/detail/productsDetail/productsDetail.vue
+++ b/pages/detail/productsDetail/productsDetail.vue
@@ -1,7 +1,8 @@
-
-
+
+
@@ -19,19 +20,19 @@
- {{item.title}}
- {{item.tag}}
+ {{detailList.name}}
+ {{detailList.cate_bname}}
- {{item.desc}}
+ {{detailList.title}}
- {{item.classify}}
+ {{detailList.cate_name}}
- {{item.tagOne}}
- {{item.tagTwo}}
+ {{detailList.tags}}
+
- 122赞
+ {{detailList.thumb}}赞
@@ -54,9 +55,9 @@
发布日期:
- {{item.time}}
+ {{detailList.pub_time}}
-
+
@@ -66,26 +67,44 @@
export default {
data() {
return {
+ id: '',
showStar: false,
showHeart: false,
- isThumb: true,
- detailList: [{
- title: '锅巴',
- tag: '零食铺子',
- desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
- classify: '薯片膨化',
- tagOne: '无添加剂1',
- tagTwo: '无添加剂',
- time: '2022年12月04日',
- content: '一级标题
二级标题
'
- }],
+ isThumb: false,
+ detailList: [
+ // {
+ // title: '锅巴',
+ // tag: '零食铺子',
+ // desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
+ // classify: '薯片膨化',
+ // tagOne: '无添加剂1',
+ // tagTwo: '无添加剂',
+ // time: '2022年12月04日',
+ // content: '一级标题
二级标题
'
+ // },
+ ],
swiperList: [
'/static/detail/zhanwei_xppx.png',
'/static/detail/zhanwei_xppx.png'
]
}
},
+ onLoad(option) {
+ console.log('产品id', option.id);
+ this.id = option.id
+ this.getProductDetail()
+ },
methods: {
+ //获取详情信息
+ getProductDetail() {
+ this.$apiServe.getProductDetail(this.id).then(res => {
+ // console.log('详情页', res.data.data.thumb)
+ if (res.data.data.thumb) {
+ this.isThumb = true
+ }
+ this.detailList = res.data.data
+ }).finally(_ => {})
+ },
//收藏按钮
starTap() {
this.showStar = !this.showStar
diff --git a/pages/index/index.vue b/pages/index/index.vue
index e703bdf..e8e517d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -14,9 +14,10 @@
-
+
- {{listItem.title}}
+
+ {{listItem.name}}
@@ -37,54 +38,58 @@
-
+