<template>
	<!-- '遗产讲述', '达人同游'， 我要跟拍 的共同详情页面 -->
	<view class="page">
		<navbar :title="titles[type]" leftClick @leftClick="$utils.navigateBack" />
		
		<view class="info">
			<!-- 上面 -->
			<view class="top">
				<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode="aspectFill"></image>
				<view class="left">
					<view class="title">
						摄影师协会
					</view>
					<view class="left-list">
						<view>
							<uv-icon
							name="star"
							size="50rpx"
							></uv-icon>
							收藏
						</view>
						<view>
							<uv-icon
							name="star"
							size="50rpx"
							></uv-icon>
							收藏
						</view>
						<view>
							<uv-icon
							name="star"
							size="50rpx"
							></uv-icon>
							收藏
						</view>
					</view>
				</view>
			</view>
			<!-- 下面 -->
			<view class="bottom">
				<view>
					<image src="../static/reservationDetail/1.png" mode=""></image>
					<view>
						预约时间
					</view>
				</view>
				<view>
					<image src="../static/reservationDetail/2.png" mode=""></image>
					<view>
						价格
					</view>
				</view>
				<view>
					<image src="../static/reservationDetail/3.png" mode=""></image>
					<view>
						预约
					</view>
				</view>
			</view>
		</view>
	
		<view class="detail">
			<view class="content">
				<view class="thumb-up">
					<uv-icon
					name="thumb-up"
					size="40rpx"
					color="#B12731"
					></uv-icon>
					
					<text>推荐度</text>  <text>9</text>
				</view>
				
				<view class="text">
					
					<view class="line">
						<view class="left">
							专业擅长
						</view>
						<view class="right">
							景德镇陶瓷考古研究所资料陈列馆副主任。累德镇交物鉴定小组成员。现为景德镇市第三批市级非物质文化遗产项目景德镇传统陶瓷书法”
						</view>
					</view>
					
					<view class="line">
						<view class="left">
							个人简介
						</view>
						<view class="right">
							景德镇陶瓷考古研究所资料陈列馆副主任。累德镇交物鉴定小组成员。现为景德镇市第三批市级非物质文化遗产项目景德镇传统陶瓷书法”
						</view>
					</view>
					
				</view>
			</view>
			
			<view class="video-list">
				<view class="title">
					讲解现场
				</view>
				<!-- <view class="list">
					<view 
					v-for="(item, index) in 10"
					:key="index">
						<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode="aspectFill"></image>
					</view>
				</view> -->
			</view>
			<videoList ref="videoList"/>
		</view>
		
		<tabber/>
	</view>
</template>

<script>
	import videoList from '@/components/list/videoList.vue'
	export default {
		components : {
			videoList,
		},
		data() {
			return {
				titles: ['遗产讲述', '达人同游', '我要跟拍'],
				type: 0,
				id : 0,
				detail : {},
			}
		},
		onLoad(args) {
			this.type = args.type
			this.id = args.id
		},
		onShow() {
			this.$refs.videoList.queryVideoList()
			this.getData()
		},
		onPullDownRefresh(){
			this.$refs.videoList.queryVideoList()
			this.getData()
		},
		//滚动到屏幕底部
		onReachBottom() {
			this.$refs.videoList.loadMoreData()
		},
		methods: {
			getData(){
				this.$api('queryRoleInfoById', {
					id : this.id,
				}, res => {
					uni.stopPullDownRefresh()
					if(res.code == 200){
						this.detail = res.result
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
.page{
	.info{
		.top{
			display: flex;
			padding: 40rpx;
			image{
				width: 240rpx;
				height: 280rpx;
				border-radius: 20rpx;
				margin-right: 40rpx;
			}
			.left{
				.title{
					font-size: 32rpx;
					margin-top: 20rpx;
				}
				.left-list{
					display: flex;
					font-size: 26rpx;
					background-color: #fff;
					border-radius: 20rpx;
					padding: 20rpx;
					margin-top: 50rpx;
					box-shadow: 0 0 10rpx 10rpx #00000010;
					>view{
						margin: 20rpx 30rpx;
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
					}
				}
			}
		}
		.bottom{
			display: flex;
			justify-content: space-around;
			image{
				width: 100rpx;
				height: 100rpx;
				margin-bottom: 10rpx;
			}
			>view{
				background-color: #fff;
				box-shadow: 0 0 10rpx 10rpx #00000010;
				border-radius: 20rpx;
				height: 180rpx;
				width: 180rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				flex-direction: column;
				color: $uni-color;
			}
		}
	}
	.detail{
		width: 100%;
		background-color: #fff;
		.content{
			padding: 40rpx;
			.thumb-up{
				background-color: #F6F2E7;
				color: $uni-color;
				font-size: 28rpx;
				font-weight: 900;
				padding: 10rpx 25rpx;
				display: flex;
				width: fit-content;
				border-radius: 30rpx;
				text{
					margin-left: 10rpx;
				}
			}
			
			.text{
				.line{
					margin-top: 40rpx;
					display: flex;
					line-height: 50rpx;
					.left{
						width: 180rpx;
						flex-shrink: 0;
						color: $uni-color;
						font-weight: 900;
					}
				}
			}
		}
		.video-list{
			padding: 15rpx;
			.title{
				font-weight: 900;
				color: $uni-color;
				padding: 15rpx;
			}
			.list{
				display: flex;
				flex-wrap: wrap;
				>view{
					margin: 15rpx;
					image{
						width: 330rpx;
						height: 350rpx;
						border-radius: 30rpx;
					}
				}
			}
		}
	}
}
</style>
