Browse Source

样式修改

luxf 1 week ago
parent
commit
e81c4af09a

+ 1 - 0
components/common/u-share-action-sheet/index.vue

@@ -5,6 +5,7 @@
 		cancel-text="取消"
 		:close-on-click-overlay="true"
 		@select="onSelect"
+		@close="onCancel"
 	  @cancel="onCancel"
 	/>
 </template>

+ 7 - 3
pages/news/components/news-item.vue

@@ -15,6 +15,7 @@
 		components: {
 		},
 		props: {
+			type: String,
 			item: Object
 		},
 		data() {
@@ -25,9 +26,12 @@
 		},
 		methods: {
 			onClickDetail(item) {
-				uni.navigateTo({
-					url: '/pages/index/webview?url=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'
-				})
+				console.log(this.type)
+				if (this.type === 'exhibitor')  {
+					this.navigateTo('https://mp-test-onlinecatelogue.matchexpo.cn/Selis-responds-to-Guangzhou-s-inquiry-on-M7-accident-identification-the-owner-does-not-recognize-the-analysis-conclusion-that-the-case-has-entered-the-judicial-procedure')
+				} else {
+					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')
+				}
 			}
 		}
 	}

+ 10 - 8
pages/news/components/news-recommend.vue

@@ -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')
 			}
 		}
 	}