<template>
	<view>
		<view class="home-store flex-y-center">
			
			<view class="flex-grow-1">
				<view class="box-pack-between flex-grow-1 flex-y-center">
					<text>{{systemInfo.title}}</text>
					<view class="more-businessTime flex-y-center" @click="getShop"><text
							style="margin-right: 6rpx;">更多门店</text><text class="iconfont icon-jiantou1"></text></view>
				</view>
				<view class="businessTime flex-grow-1 box-pack-between flex-y-center">
					<view class="flex-grow-1">
						<view class="businessTime businessTimeItem" v-if="systemInfo.is_rest==2 && systemInfo.time">
							营业时间：{{systemInfo.time}}-{{systemInfo.time2}}
						</view>
						<view class=" box-pack-between flex-grow-1" @click="getNavigation">
							<text class="iconfont icon-dizhi">{{systemInfo.address}}</text>
							<text class="iconfont icon-icon-test"></text>
						</view>
					</view>
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex'
	export default {
		data() {
			return {
		
			}
		},
		
		computed: {
			...mapState(['systemInfo'])
		},
		methods:{
			getShop(e) {
				uni.navigateTo({
					url: "../../shop/index/index"
				})
			},
			
			// 打开地图
			getNavigation() {
				// console.log(this.systemInfo.set.coordinates)
				let obj = this.systemInfo.set.coordinates.split(",");
				uni.openLocation({
					latitude: Number(obj[0]),
					longitude: Number(obj[1]),
					name: this.systemInfo.title,
					address: this.systemInfo.address,
					success: function() {
						console.log('success');
					}
				});
			},
		}
	}
</script>

<style>
	
	.home-store {
		font-size: 30rpx;
		/* width: 690rpx; */
		background-color: #FFFFFF;
		margin: 0 auto;
		/* height: 180rpx; */
		margin-top: 25rpx;
		padding: 20rpx 40rpx;
		border-radius: 14rpx;
		box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(204, 215, 230, 0.08);
	}
	
	.home-pay-title {
		font-size: 30rpx;
	}
	
	.more-businessTime {
		font-size: 24rpx;
	}
	
	.businessTime {
		font-size: 24rpx;
		color: #999999;
		padding-top: 10rpx;
	}
	
	.businessTimeItem {
		margin-bottom: 10rpx;
	}
	
	.businessTime .icon-dizhi {
		font-size: 24rpx;
	}
</style>
