<template>
	<view class="img-list">
		<view class="img-navs">
			<view v-for="(item,index) in navList" :key="index" class="nav-btn" :class="{'check-nav':index==curNavIndex}">
				{{item.key}}
			</view>
		</view>
		  <view class="img-list">
			<view v-for="(item,index) in imgList" :key="item.ID" class="img-list-item" @click="">
				<view class="">
					<image src="" mode=""></image>
				</view>	
			</view>
		  </view>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				ID:0,
				navList:[],
				curNavIndex:0,
			    imgList:[]
	
			}
		},
		components: {

		},
		watch:{
			curNavIndex(val){
				
			}
		},
		created() {
			uni.setNavigationBarTitle({
				title: "风景图片",
			});
		
		},
		onLoad(option) {
			if (options && options.id) {
				this.ID = options.id
				this.getDetail()
			}
		},
		methods: {
			//获取详情
			getDetail(index) {
				this.request2({
						url: '/api/AppletDining/GetTicketCouponsDetails',
						data: {
							ID: this.ID
						}
					},
					res => {
						if (res.resultCode == 1) {
							this.navList = res.data.AllPicList;
							this.imgList=res.data.AllPicList[index].TagPicList
							console.log(this.imgList)
							
						}
					}
				);
		    },
	    }
	}
</script>

<style lang="scss" scoped>
	.img-list{
		.img-navs{
			display: flex;
			.nav-btn{
				width: 230rpx;
				height: 60rpx;
				background-color: #FFFFFF;
				border: 1rpx solid #111111;
				border-radius: 20rpx;
				font-family: PingFang SC;
				font-weight: 500;
				text-align: center;
				vertical-align: middle;
			}
			.check-nav{
				background-color: #111111;
				color: #FFFFFF;
			}
		}
	}
</style>
