<template>
	<view class="main-block">
		<view class="page-block">
			<view class="btn-list">
			
				<block v-for="(item,index) in power_list" :key='index'>
					
					<navigator  class="item flex flex-col flex-center" 
					:url="`${item.address}?id=${item.id}&type=${type}&sid=${sid}`">
						<image  class="icon-img"  :src="item.image"></image>
						<view  class="name">{{item.name}}</view>
					</navigator>
					
				<!-- 	<navigator v-if="item.id==803||item.id==242" class="item flex flex-col flex-center" 
					:url="`${item.address}?id=${item.id}&type=${type}&sid=${sid}`">
						<image  class="icon-img"  :src="item.image"></image>
						<view  class="name">{{item.name}}</view>
					</navigator> -->
					
				</block>
			
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				store_id:"",
				type:2, //门店 
				power_list:[],
				sid:'',
			}
		},
		
		onLoad(e) {
			this.sid=e.id;
			if(e.id==800){
				this.type=1;
			}else{
				this.type=e.type||2;
			}
			var management_list_store;
			if(uni.getStorageSync("is_shop")){
				management_list_store=this.$store.state.management_list||[]
			}else{
				management_list_store=this.$store.state.management_list_store||[]
			}
			let { list } = management_list_store.find((v, i) => v.id == e.id)
			this.power_list = list
		},
		
	}
</script>

<style>
	
	.main-block {
		padding: 50rpx 25rpx 0;
	}

	.btn-list {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		-webkit-flex-flow: row wrap;
		flex-flow: row wrap;
		-webkit-box-pack: start;
		-webkit-justify-content: flex-start;
		justify-content: flex-start;
		-webkit-align-content: flex-start;
		align-content: flex-start;
	}

	.page-block {
		width: 700rpx;
		background-color: #fff;
		box-sizing: border-box;
		border-radius: 8rpx;
		margin-bottom: 30rpx;

	}

	.btn-list .item {
		width: 33.33%;
		height: 145rpx;
	}

	.btn-list .item .icon-img {
		display: block;
		width: 48rpx;
		height: 48rpx;
	}

	.btn-list .item .name {
		font-size: 24rpx;
		line-height: 33rpx;
		margin-top: 16rpx;
		color: #666;
	}
</style>
