<template>
	<view class="pages">
		<u-navbar
			title="店铺详情"
			:placeholder="true"
			:autoBack="true"
			 @leftClick="leftClick"
			 :safeAreaInsetTop="true"
		>
		</u-navbar>
		<view class="page-wrap">
			<u-swiper
				v-if="details.slideImgList.length>0"
				:list="details.slideImgList"
				height="700rpx"
				@change="e => currentNum = e.current"
				:autoplay="false"
				indicatorStyle="right: 20px"
			>
				<view
					slot="indicator"
					class="indicator-num"
				>
					<text class="indicator-num__text">{{ currentNum + 1 }}/{{ details.slideImgList.length }}</text>
				</view>
			</u-swiper>
			<view class="info">
				<view class="title">
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				details:{slideImgList:[]},
				currentNum:0,
			}
		},
		onShow() {
		},
		onLoad(page) {
			this.id = page.id;
			this.getPageData();
		},
		methods: {
			getPageData(){
				this.$u.api.shopById({id:this.id}).then(res=>{
					this.details = res.data;
					console.log('getPageData',this.details);
				}).catch(err=>{
					console.log('getPageData',err);
				})
			},
		}
	}
</script>
<style>
page{
	background-color: #F5F5F5;
}
</style>
<style lang="scss" scoped>

</style>