首页初次对接口
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
detailList: [],
|
||||
// src: '/static/detail/cj_bg.png',
|
||||
features: '活冻鲍鱼,冻煮鲍鱼,鲍鱼罐头 佛跳墙,海螺片',
|
||||
business_introduce: '福建省海纳川食品有限公司是一家从事水产养殖,加工与销售为一体的现代化企业,公司主要加工:活冻鲍鱼,溏心皇金鲍,兰花蟹,黄金鲍片,佛跳墙,大盆菜,火锅小章鱼,鲨鱼礼盒等系列产品。公司位于福建省自由贸易试验区马尾片区,离全国大的水产交易市场--马尾名成水产市场不到一公里,这里交通方便,商贾云集,冷链物流通达全国。',
|
||||
@@ -53,8 +55,20 @@
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log('认证厂家id', option.id);
|
||||
this.id = option.id
|
||||
this.getCertifiedCjDetail()
|
||||
},
|
||||
methods: {
|
||||
//获取认证厂家详情
|
||||
getCertifiedCjDetail() {
|
||||
this.$apiServe.getCertifiedCjDetail().then(res => {
|
||||
console.log('认证厂家详情页', res)
|
||||
|
||||
// this.detailList = res.data.data
|
||||
}).finally(_ => {})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<view style="padding: 12rpx 16rpx;">
|
||||
<view class="xwD_title">
|
||||
{{title}}
|
||||
{{detailList.title}}
|
||||
</view>
|
||||
<view style="display: flex;">
|
||||
<text class="xwD_time">
|
||||
{{time}}
|
||||
{{detailList.pub_time}}
|
||||
</text>
|
||||
<text class="xwD_time xwD_place">
|
||||
{{place}}
|
||||
{{detailList.pub_name}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="xwD_content">
|
||||
<u-parse :content="news" @preview="preview" @navigate="navigate"></u-parse>
|
||||
<u-parse :content="detailList.content" @preview="preview" @navigate="navigate"></u-parse>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -21,14 +21,28 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '2022近50款食品饮料新品,创新的方向都在这里',
|
||||
time: '2022-12-03 09:59',
|
||||
place: '第一食品资讯官方账号',
|
||||
news: '<h1>一级标题</h1><br/><h2>二级标题</h2>'
|
||||
id: '',
|
||||
detailList: []
|
||||
// title: '2022近50款食品饮料新品,创新的方向都在这里',
|
||||
// time: '2022-12-03 09:59',
|
||||
// place: '第一食品资讯官方账号',
|
||||
// news: '<h1>一级标题</h1><br/><h2>二级标题</h2>'
|
||||
}
|
||||
},
|
||||
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(_ => {})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user