<template>
	<view class="garden-item-page">
		<view class="report-content">
			<view class="home-search">
				<view class="search-wrap">
					<up-search placeholder="搜索品种" v-model="typeSearch"></up-search>
				</view>
			</view>
			<view class="tips">
				下拉查看溯源报告
			</view>
			<view class="swipe-item">
				<video class="video-wrap" src="https://birdseye-img.sysuimars.com/temp/5-25lby.mp4" controls></video>
			</view>
		</view>
		<l-floating-panel v-model:height="panelHeight" :anchors="anchors" :defaultAnchor="2">
		  <view class="panel-content">
			  <view class="panel-title">
			  	<view class="title-l">
			  		<image class="garden-img" :src="`${config.BASIC_IMG}home/garden.png`" mode=""></image>
					<view class="title-info">
						<view class="title-garden">
							从化荔枝博览园
						</view>
						<view class="btn-second">
							有味指数
							<text>4.5分</text>
						</view>
					</view>
			  	</view>
				<view class="title-r">
					+
					<text class="add-text">关注</text>
				</view>
			  </view>
			  <view class="panel-video">
			  	<video class="video-dom" src="https://birdseye-img.sysuimars.com/temp/5-25lby.mp4" controls></video>
			  </view>
			  <hot-component-vue></hot-component-vue>
		  </view>
		</l-floating-panel>
	</view>
</template>

<script setup>
import { ref } from 'vue'
import config from "@/api/config.js"
import hotComponentVue from '../hotComponent.vue'


const typeSearch = ref(null)
	
	 const {windowHeight} = uni.getSystemInfoSync()
	    const anchors = [
	            50,
	            Math.round(0.5 * windowHeight),
	            Math.round(0.95 * windowHeight),
	    ];
	    const panelHeight = ref(anchors[2]);
		
		const myVideo = ref(null);
		const onVideoReady = () => {
		    myVideo.value.play();
		};
</script>

<style lang="scss" scoped>
	.garden-item-page {
		width: 100%;
		height: 100vh;
		.report-content {
			width: 100%;
			height: calc(100% - 140rpx);
			position: relative;
			.home-search {
				position: absolute;
				z-index: 2;
				top: 20rpx;
				left: 24rpx;
				display: flex;
				align-items: center;
				width: calc(100% - 48rpx);
				border: 2rpx solid rgba(255, 255, 255, 0.39);
				border-radius: 40rpx;
				margin-bottom: 40rpx;
				background-color: rgba(0, 0, 0, 0.31);
				.search-wrap {
					flex: 1;
					// padding-left: 22rpx;
					::v-deep {
						.u-search {
							.u-search__content {
								background-color: transparent !important;
								.u-search__content__input {
									background-color: transparent !important;
									
								}
							}
							.uni-input-input {
								color: rgba(255, 255, 255, 0.8);
							}
							.u-search__action {
								text-align: center;
								line-height: 52rpx;
								border-radius: 40rpx;
								font-size: 28rpx;
								background-color: rgba(255, 255, 255, 0.3);
								color: rgba(255, 255, 255, 0.3);
								margin: 6rpx 8rpx;
								width: 112rpx;
								height: 52rpx;
							}
						}
					}
				}
			}
			.tips {
				position: absolute;
				z-index: 2;
				top: 110rpx;
				left: 0;
				color: #FFFFFF;
				font-size: 24rpx;
				width: 100%;
				text-align: center;
			}
			.swipe-item {
				width: 100%;
				height: 100%;
				.video-wrap {
					width: 100%;
					height: 100%;
					object-fit: contain;
				}
			}
		}
	}
	
	.panel-content {
		padding: 24rpx;
		.panel-title {
			display: flex;
			align-items: center;
			justify-content: space-between;
			.title-l {
				flex: 1;
				display: flex;
				align-items: center;
				.garden-img {
					width: 100rpx;
					height: 100rpx;
					border-radius: 10rpx;
				}
				.title-info {
					padding-left: 20rpx;
					.title-garden {
						color: #000000;
						font-size: 28rpx;
						font-weight: 600;
						padding-bottom: 10rpx;
					}
					.btn-second {
						padding: 0 30rpx;
						border-radius: 40rpx;
						font-size: 24rpx;
						color: #C49600;
						background: rgba(255, 217, 94, 0.2);
						height: 56rpx;
						line-height: 56rpx;
					}
				}
			}
			.title-r {
				display: flex;
				font-size: 24rpx;
				padding: 8rpx 22rpx;
				background: #FFD95E;
				border-radius: 30rpx;
				.add-text {
					padding-left: 6rpx;
					font-weight: 600;
				}
			}
		}
		
		.panel-video {
			padding: 20rpx 0;
			height: 300rpx;
			width: 100%;
			.video-dom {
				width: 100%;
				height: 100%;
				object-fit: cover;
				border-radius: 10rpx;
			}
		}
	}
	       
</style>
