<template>
	<view>
		<grid :column="4" :gridList="gridList" :border="false" @tapGrid="tapGrid"></grid>
		<u-divider bg-color="#f1f1f1" height="100">到底了</u-divider>
	</view>
</template>

<script>
	import grid from "@/comps/grid/grid.vue"
	export default {
		components:{
			grid
		},
		data() {
			return {
				//提示：如果点击某项，不进行跳转页面，那么请添加type属性为click
				gridList:[
				   {
				       title:'业主认证',
				       subList:[
				           {
				               src:'/static/home/fangwu.png',  name:'我的房屋', url:"/pages/myhome/myhome"
				           },
				           {
				               src:'/static/home/luru.png',  name:'人脸录入', url:"/pages/uploadFace/uploadFace"
				           },
				           {
				               src:'/static/home/renyuan.png',  name:'家人管理', url:"/pages/myFamily/myFamily"
				           },
						   {
				               src:'/static/home/fangwu.png',  name:'老人关爱', url:"/pages/community/community?current=1",type:'switchTab'
				           },
				       ]
				   },
				   {
				       title:'小区出入',
				       subList:[
				           {
				               src:'/static/home/kaimen.png',  name:'一键开门', url:"/pages/index/index?openDoor",type:'switchTab'
				           },
						   {
				               src:'/static/home/fangke1.png',  name:'访客授权', url:"/pages/authorize_record/authorize_record"
				           },
				           {
				               src:'/static/home/jilu.png',  name:'访客记录', url:"/pages/record/record"
				           },
						   {
						       src:'/static/home/cheliang.png',  name:'车辆关爱', url:"/pages/community/community?current=2",type:'switchTab'
						   },
						   {
						       src:'/static/home/fanyi1.png',  name:'防疫登记', url:"/pages/tool-list/epidemic-pass/epidemic-pass"
						   }
				       ]
				   },
				   {
				       title:'小区应用',
				       subList:[
						   {
						       src:'/static/home/baoxiu.png',  name:'物业报修', url:"/pages/services/property/property"
						   },
				           {
				               src:'/static/home/jiaofei.png',  name:'物业缴费', url:"/pages/index/index", type:'click'
				           }
						   ,
						   {
				               src:'/static/home/gonggao.png',  name:'公告查看', url:"/pages/notice/notice"
				           }
						   ,
						   {
						       src:'/static/home/shanghu.png',  name:'周边商户', url:"/pages/life/life", type:'switchTab'
						   }
				       ]
				   }
				]
			}
		},
		onLoad() {
			//小程序audit期间隐藏掉人脸录入功能
			let appletType= uni.getStorageSync('appletType')
			if (appletType=='0') {
				this.gridList[0].subList.splice(1,1)
				console.log(this.gridList);
			}
		},
		methods: {
			tapGrid ( data ) {
				uni.showToast({
					title:"待开发",
					icon:"none"
				})
		   }
		}
	}
</script>

<style>

</style>
