<template>
	<view class="exhibit-detail exhibitor-detail">
		<nav-bar title="展品介绍" @init="onInitNavbar"></nav-bar>
		<u-scroll-view>
			<view class="main-container">
				<view class="exhibit-image">
					<image src="https://oss.starify.cn/prod/starify/up/0001000075/20241113/67343f1c494de.png?x-oss-process=image/resize,w_800" mode="aspectFit"/>
					<view class="exhibit-tag">2025新品</view>
				</view>
				<view class="exhibit-name">汽车连接器 86W MLK 1,2 SD-HOLDER</view>
				<view class="exhibit-desc">适用于连接器、连接器系统的生产加工，汽车零部件、电子元器件、机械设备及其零配件、工具、模具、连接器产品及其生产设备的批发、进出口、佣金代理（拍卖除外），并提供相关配套服务（包括上门安装、保养、维修服务）。</view>
				<view class="exhibit-tags exhibitor-tags">
					<view class="exhibitor-tags-category">产品分类：</view>
					<view class="exhibitor-tags-list">
						<view class="exhibitor-tag">柔性与印刷电子</view>
						<view class="exhibitor-tag">电子制造服务</view>
						<view class="exhibitor-tag">PCB焊接和连接技术</view>
						<view class="exhibitor-tag">线束和连接器</view>
						<view class="exhibitor-tag">柔性与印刷电子</view>
						<view class="exhibitor-tag">电子制造服务</view>
					</view>
				</view>
				<view class="exhibit-tags exhibitor-tags">
					<view class="exhibitor-tags-category">应用领域：</view>
					<view class="exhibitor-tags-list"></view>
					<view class="exhibitor-tag">电脑和周边设备</view>
					<view class="exhibitor-tag">新能源</view>
				</view>
				<view class="exhibit-operation exhibitor-operation">
					<view class="exhibitor-views">浏览：30911</view>
					<view class="exhibitor-action">
						<view>
							<view class="iconfont icon-xiaochengxu-renqiicon"></view>
							<view>人气：11192</view>
						</view>
						<view>
							<button open-type="share" :plain="true">
								<view>
									<view class="iconfont icon-zhuanfa"></view>
									<view>分享</view>
								</view>
							</button>
						</view>
						<view>
							<view v-if="exhibitor.favourited" class="iconfont icon-favourites-filled-star-symbol active"></view>
							<view v-else class="iconfont icon-Favourites-Add-Large"></view>
							<view>收藏</view>
						</view>
						<view>
							<view v-if="exhibitor.liked" class="iconfont icon-aixin active"></view>
							<view v-else class="iconfont icon-heart1"></view>
							<view>点赞</view>
						</view>
						<view>
							<view v-if="exhibitor.voted" class="iconfont icon-Ticket1 active"></view>
							<view v-else class="iconfont icon-xiaochengxu-toupiaoicon"></view>
							<view>投票</view>
						</view>
					</view>
				</view>
				<u-panel title="展商信息">
					<view class="exhibitor-card">
						<view class="exhibitor-info">
							<view class="exhibitor-logo">
								<image src="/static/img/example/kostal_log.png" mode="aspectFit" />
							</view>
							<view class="exhibitor-name-cn">科世达（上海）连接器有限公司</view>
							<view class="exhibitor-name-en">Leopold Kostal GmbH & Co. KG</view>
							<view class="exhibitor-detail-link">
								<van-button type="primary" @click="onClickDetail">
									<template>
										<view>点击了解展商更多信息</view> <view class="arrow iconfont icon-right-s"></view>
									</template>
								</van-button>
							</view>
						</view>
						<view class="exhibitor-number">
							<view class="exhibitor-number-label">我们的展位号</view>
							<view class="exhibitor-number-text">E1馆 1101</view>
						</view>
					</view>
				</u-panel>
			</view>
		</u-scroll-view>
		<u-share-action-sheet :show.sync="showShare" :show-info="shareInfo" />
	</view>
</template>

<script>
	import NavBar from '@/components/layout/nav-bar'
	import UScrollView from '@/components/common/u-scroll-view'
	import UShareActionSheet from '@/components/common/u-share-action-sheet'
	import UPanel from '@/components/common/u-panel'
	
	export default {
		options: {
			styleIsolation: 'shared'
		},
		components: {
			NavBar,
			UScrollView,
			UShareActionSheet,
			UPanel
		},
		computed: {},
		data() {
			return {
				showShare: false,
				shareInfo: null,
				exhibit: {
					favourited: true,
					liked: false,
					voted: false
				}
			}
		},
		created() {
			this.loadFontFace('Poppins')
		},
		methods: {
			onShareAppMessage(ops) {
				const item = ops.target.dataset.item || {}
				this.shareInfo = null
				this.showShare = false
				return {
					title: item.name || '汽车连接器 86W MLK 1,2 SD-HOLDER',
					path: `/pages/exhibitor/exhibit-detail`,
					imageUrl: 'https://oss.starify.cn/prod/starify/up/0001000075/20241113/67343f1c494de.png?x-oss-process=image/resize,w_600,h_600,limit_0,m_pad'
				}
			},
			onShare(item) {
				this.shareInfo = item
				this.showShare = true
			},
			onClickDetail(e) {
				this.navigateTo('/pages/exhibitor/detail')
			}
		}
	}
</script>

<style lang="scss">
	@import "@/static/style/pages/exhibitor-detail.scss";
	.exhibit-detail{
		.exhibit-image{
			position: relative;
			height: 438rpx;
			background-color: #FFFFFF;
			border-radius: 5rpx;
			border: 1rpx solid #D6D6D6;
			.exhibit-tag{
				position: absolute;
				top: 28rpx;
				left: 29rpx;
				padding: 12rpx 22rpx;
				color: $textActionColor;
				font-size: $fontSize0;
				background-color: lighten($textActionColor, 43%);
			}
		}
		.exhibitor-detail-link{
			@include link-button;
		}
		.exhibit-name{
			margin-top: 28rpx;
			font-family: Poppins, Poppins;
			font-weight: bold;
			font-size: $fontSize6;
			color: #000000;
			line-height: 42rpx;
		}
		.exhibit-desc{
			margin-top: 18rpx;
			font-family: Poppins, Poppins;
			font-size: $fontSize2;
			color: #555555;
			line-height: 35rpx;
		}
		.exhibitor-card{
			display: flex;
			background-color: #FFFFFF;
			.exhibitor-info{
				padding: 36rpx;
			}
			.exhibitor-logo{
				width: 194rpx;
			}
			.exhibitor-detail-link{
				margin-top: 36rpx;
			}
			.exhibitor-name-cn,.exhibitor-name-en{
				font-family: Poppins, Poppins;
				font-size: $fontSize3;
				color: #000000;
				line-height: 28rpx;
			}
			.exhibitor-name-en{
				margin-top: 10rpx;
				font-size: $fontSize2;
			}
			.exhibitor-number{
				@include display-flex-center;
				flex-direction: column;
				width: 267rpx;
				background-color: $buttonPrimaryColor;
				color: #FFFFFF;
			}
			.exhibitor-number-text{
				width: 161rpx;
				text-align: center;
				font-family: Poppins, Poppins;
				font-weight: bold;
				font-size: 55rpx;
				line-height: 64rpx;
				margin-top: 30rpx;
			}
			.exhibitor-number-label{
				font-family: Poppins, Poppins;
				font-size: $fontSize3;
				line-height: 28rpx;
				color: rgba(255, 255,  255, 0.74);
			}
		}
		.u-panel{
			margin-top: 54rpx;
			padding: 0;
			.u-panel-title{
				&:after{
					display: none;
				}
			}
		}
	}
</style>