|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
<view class="news-recommend">
|
|
|
<view v-if="recommendType === 'home'" class="news-tab">
|
|
|
- <u-tabs :active.sync="tabActive" :tabs="tabs" tab-style="default" @change="tabChange"/>
|
|
|
+ <u-tabs :active.sync="newsType" :tabs="tabs" tab-style="default" @change="tabChange"/>
|
|
|
</view>
|
|
|
<view class="news-list">
|
|
|
<template v-for="(item, index) in newsList">
|
|
|
- <news-item :item="item" :key="index" />
|
|
|
+ <news-item :item="item" :key="index" :type="newsType" />
|
|
|
</template>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -21,6 +21,8 @@
|
|
|
NewsItem
|
|
|
},
|
|
|
props: {
|
|
|
+ // 特定的展商ID
|
|
|
+ exhibitorId: Number,
|
|
|
recommendType: {
|
|
|
type: String,
|
|
|
default: 'home'
|
|
@@ -28,25 +30,25 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- tabActive: '1',
|
|
|
+ newsType: 'exhibition',
|
|
|
tabs: [{
|
|
|
label: '展会新闻',
|
|
|
- value: 1
|
|
|
+ value: 'exhibition'
|
|
|
}, {
|
|
|
label: '展商新闻',
|
|
|
- value: 2
|
|
|
+ value: 'exhibitor'
|
|
|
}],
|
|
|
newsList: [{}, {}, {}]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ if (recommendType === 'detail') {
|
|
|
+ this.newsType = 'exhibitor'
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
tabChange() {
|
|
|
|
|
|
- },
|
|
|
- onClickDetail(item) {
|
|
|
- this.navigateTo('https://www.productronicachina.com.cn/2025%E6%85%95%E5%B0%BC%E9%BB%91%E4%B8%8A%E6%B5%B7%E7%94%B5%E5%AD%90%E7%94%9F%E4%BA%A7%E8%AE%BE%E5%A4%87%E5%B1%953%E6%9C%88%E5%A5%8F%E5%93%8D%E6%96%B0%E7%AF%87%E7%AB%A0-%E6%8E%A2%E7%B4%A2%E7%94%B5%E5%AD%90%E5%88%B6%E9%80%A0%E7%9A%84%E6%97%A0%E9%99%90%E5%8F%AF%E8%83%BD')
|
|
|
}
|
|
|
}
|
|
|
}
|