<template>
	<view class="pages">
		<u-navbar title="经营场所详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
			title-size='36' height='44'></u-navbar>
		<view class="xqtop">
			<view class="tit">
				{{obj.name == undefined ? '--' : obj.name}}
			</view>
			<view class="xiao">
				<view class="one">渠道商：</view>
				<view class="two">{{obj.bizManCount == undefined ? '--' : obj.bizManCount}}人</view>
			</view>
			<view class="xiao">
				<view class="one">创业者：</view>
				<view class="two">{{obj.investorCount == undefined ? '--' : obj.investorCount}}人</view>
			</view>
		</view>
		<!-- 修改场所 -->
		<view class="edit" @click="btnedit">
			<view class="">修改场所</view> <u-icon name="arrow-right" color="#333" size="28"></u-icon>
		</view>
		<!-- 基本信息 -->
		<view class="jiben">
			<view class="tit">
				基本信息
			</view>
			<view class="xiao">
				<view class="one">联系人：</view>
				<view class="two">{{obj.contactName}}</view>
			</view>
			<view class="xiao">
				<view class="one">联系电话：</view>
				<view class="two">{{obj.contactMobile}}</view>
			</view>
			<view class="xiao">
				<view class="one">设备数：</view>
				<view class="two">{{obj.deviceCount}}</view>
			</view>
			<view class="xiao">
				<view class="one">营业时间：</view>
				<view class="two">{{obj.businessTimeStart == undefined ? '' : obj.businessTimeStart}}~{{obj.businessTimeEnd == undefined ? '' : obj.businessTimeEnd}}</view>
			</view>
			<view class="xiao">
				<view class="one" style="width: 160rpx;">详细地址：</view>
				<view class="two">{{obj.address}}</view>
			</view>
			<view class="xiao">
				<view class="one">创建时间：</view>
				<view class="two">{{obj.createTime}}</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgc: {
					backgroundColor: "#8883f0",
				},
				storeId:'',
				obj:{}
			}
		},
		onLoad(option) {
            this.storeId = option.storeId
		},
		// 分享到好友（会话）
		onShareAppMessage: function() {
			return {
				title: '创亿康',
				path: '/pages/index/index'
			}
		},
		onShow() {
			setTimeout(()=>{
				this.getxq()
			},1)
		},

		// 分享到朋友圈  
		onShareTimeline: function() {
			return {
				title: '创亿康',
				query: '',
				path: '/pages/index/index'
			}
		},
		methods: {
			// 请求店铺详情
			getxq(){
				this.$u.get(`/app/store/mch/${this.storeId}`).then(res => {
					if(res.code == 200){
						this.obj = res.data
					}
				})
			},
			
			// 跳转
			btnedit() {
				uni.navigateTo({
					url: '/page_user/dianpuedit?obj=' + JSON.stringify(this.obj)
				})
			},

		}
	}
</script>

<style lang="scss" scoped>
	/deep/ .u-title {
		padding-bottom: 15rpx;
	}

	/deep/ .u-icon__icon {
		padding-bottom: 15rpx;
	}

	/deep/ .uicon-arrow-right {
		padding-bottom: 0 !important;
	}

	.pages {
		background-color: #F7FAFE !important;
		height: 100vh;
		width: 100%;

		.del {
			width: 584rpx;
			height: 90rpx;
			background: red;
			border-radius: 54rpx 54rpx 54rpx 54rpx;
			margin: auto;
			text-align: center;
			line-height: 90rpx;
			position: fixed;
			left: 50%;
			transform: translateX(-50%);
			bottom: 60rpx;
			font-weight: 500;
			font-size: 40rpx;
			color: #FFFFFF;
		}

		.xqtop {
			width: 680rpx;
			height: 210rpx;
			background: #FFFFFF;
			border-radius: 24rpx 24rpx 24rpx 24rpx;
			margin: auto;
			margin-top: 32rpx;
			padding: 30rpx;
			box-sizing: border-box;

			.tit {
				font-size: 32rpx;
				color: #3D3D3D;
				font-weight: 600;
				padding-bottom: 28rpx;
				border-bottom: 1px solid #D8D8D8;
				padding-left: 8rpx;
				box-sizing: border-box;
			}

			.xiao {
				display: flex;
				justify-content: space-between;
				margin-top: 12rpx;

				.one {
					font-size: 24rpx;
					color: #808080;
				}

				.two {
					font-size: 24rpx;
					color: #3D3D3D;
				}
			}
		}

		.edit {
			width: 680rpx;
			height: 88rpx;
			line-height: 88rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 30rpx;
			box-sizing: border-box;
			margin: auto;
			margin-top: 32rpx;
			background-color: #fff;
			border-radius: 15rpx;
		}

		.jiben {
			width: 680rpx;
			height: 400rpx;
			background: #FFFFFF;
			border-radius: 24rpx 24rpx 24rpx 24rpx;
			margin: auto;
			margin-top: 32rpx;
			padding: 30rpx;
			box-sizing: border-box;

			.tit {
				font-size: 32rpx;
				color: #3D3D3D;
				font-weight: 600;
				padding-bottom: 28rpx;
				border-bottom: 1px solid #D8D8D8;
				padding-left: 8rpx;
				box-sizing: border-box;
			}

			.xiao {
				display: flex;
				justify-content: space-between;
				margin-top: 12rpx;

				.one {
					font-size: 24rpx;
					color: #808080;
				}

				.two {
					font-size: 24rpx;
					color: #3D3D3D;
				}
			}
		}
	}
</style>