<template>
	<view>

		<u-navbar autoBack placeholder bgColor="">
			<view class="navSlot" slot="center">
				<!-- <u-icon name="arrow-left" size="19"></u-icon> -->
				<view class="title">店铺详情</view>
			</view>
		</u-navbar>
		<view class="bgMain1">

			<view class="shop">
				<view class="shopInfo">
					<view class="title">店铺名称：</view>
					<view class="value">{{data.storeName}}</view>
				</view>

				<view class="shopInfo">
					<view class="title">店铺类型：</view>
					<view class="value">{{data.storeType}}</view>
				</view>
				<view class="shopInfo">
					<view class="title">服务范围：</view>
					<view class="value">{{data.storeScope}})</view>
				</view>
				<view class="shopInfo">
					<view class="title">营业时间：</view>
					<view class="value">{{data.openingHours}}</view>
				</view>
				<view class="shopInfo">
					<view class="title">门店区域：</view>
					<view class="value">{{data.address}}</view>
				</view>
				<view class="shopInfo">
					<view class="title">详细地址：</view>
					<view class="value">{{data.detailedAddress}}</view>
				</view>
				<view class="shopInfo">
					<view class="title">服务电话：</view>
					<view class="value">{{data.personChargePhone}}</view>
				</view>
				<view class="shopInfo">
					<view class="title">负责人姓名</view>
					<view class="value">{{data.personChargeName}}</view>
				</view>
			</view>
			<view class="shopeImage">
				<view class="imgList">
					<view style="display: flex; padding-left: 10rpx;" v-for="(item,index) in data.pictures">
						<image class="applyPictures" :src="item"></image>
					</view>
				</view>
			</view>
			<view class="editInfo" @click="startEditInfo(data.id)">
				<view >
					编辑信息
				</view>
			</view>
	
		</view>
			
	</view>
</template>

<script>
	export default {
		data() {
			return {
				storeId: "",
				data: {},
				id:""
			}
		},
		onLoad(options) {
			console.log(options)
			this.storeId = options.storeId;
			this.getStoreDetails()
		},
		methods: {
			getStoreDetails() {
				this.$http.get("/api/store/clientUser/storeDetails", {
					storeId: this.storeId,
				}).then(res => {
					if (res.code == 200)
						console.log(res.data)
						this.id =res.data.id 
						this.data = res.data

				})
			},
			startEditInfo(id){
				uni.navigateTo({
					url:'/pages/storeManagement/editStoreManage?id='+this.id
				})
			}
		}
	}
</script>

<style lang="scss">
	.editInfo{
		width: 702rpx;
		height: 100rpx;
		background: linear-gradient( 90deg, #FF4502 0%, #FF8903 100%);
		border-radius: 50rpx 50rpx 50rpx 50rpx;
		text-align: center;
		line-height: 100rpx;
		color: white;
		font-weight: 800;
		position: absolute;
		bottom: 1%;
		margin-left: 24rpx;

	}
	.shopeImage {
		margin-top: 20rpx;
		padding: 24rpx;
		background: white;

		.imgList {
			display: flex;
			overflow-x: auto;
			width: 100%;

			.applyPictures {
				width: 345rpx;
				height: 219rpx;
			}
		}
	}

	.bgMain1 {
		padding-top: 10rpx;
		padding-bottom: 10rpx;
		background: #FAF7F6;
		height: 100%;
	}

	.shop {
		background: white;
		padding-bottom: 20rpx;
	}

	.shopInfo {
		display: flex;
		margin-top: 10rpx;
		justify-content: space-between;
		padding-top: 35rpx;
		padding-left: 20rpx;
		padding-right: 20rpx;

		.title {
			font-family: Microsoft YaHei, Microsoft YaHei;
			font-weight: 400;
			font-size: 28rpx;
			color: #333333;
		}

		.value {
			font-family: Microsoft YaHei, Microsoft YaHei;
			font-weight: 400;
			font-size: 28rpx;
			color: #666666;
			line-height: 0rpx;
		}
	}
</style>