<template>
	<view class="setting-wrapper ">
		<view class="top-banner justify-center align-center text-center">
			<view>
				<image width="130" src="/static/personal-head.png"></image>
				<view class="userName">admin</view>
				<view>上海永天科技股份有限公司</view>
			</view>
		</view>
		<view class="cu-list menu-avatar  padding-lr">
			<view class="cu-item shadow" @tap="goMessagePush()">
				<view class="cu-avatar ">
					<image class="image-bg" src="/static/push-icon.png"/>
				</view>
				<view class="content">
					<view class="">推送设置</view>
				</view>
				<view class="nav-right">
					<view class="text-grey">
						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
					</view>
				</view>
			</view>
			
			<view class="cu-item shadow" @tap="goBuilding()">
				<view class="cu-avatar ">
					<image class="image-bg" src="/static/building-icon.png"/>
				</view>
				<view class="content">
					<view class="">建筑管理</view>
				</view>
				<view class="nav-right">
					<view class="text-grey">
						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
					</view>
				</view>
			</view>
			<!-- <view class="cu-item" @tap="goSiteManage" v-if="permissionLabel==1">
				<view class="cu-avatar " style="background-image:url(../../static/setting-icon2.png)"></view>
				<view class="content">
					<view class="">站点管理</view>
				</view>
				<view class="nav-right">
					<view class="text-grey">
						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
					</view>
				</view>
			</view>
			<view class="cu-item" @tap="goAuthManage" v-if="permissionLabel==1">
				<view class="cu-avatar " style="background-image:url(../../static/setting-icon4.png)"></view>
				<view class="content">
					<view class="">权限管理</view>
				</view>
				<view class="nav-right">
					<view class="text-grey">
						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
					</view>
				</view>
			</view> -->
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				permissionLabel:0
			}
		},
		onLoad() {
			// this.getAuthorization()
		},
		methods: {
			
			async getAuthorization(params) {
				const res = await this.$myRequest({
					url: 'Com/getAuthorization',
					showLoading: true,
					data: params
				})
			
				console.log(res.data.permissionLabel)
				 this.permissionLabel = res.data.permissionLabel
			},
			
			
			// goSiteManage() {
			// 	uni.navigateTo({
			// 		url: '/pages/siteManage/siteManage?type=1',
			// 		success: res => {},
			// 		fail: () => {},
			// 		complete: () => {}
			// 	});
			// },
			// goDeviceManage() {
			// 	uni.navigateTo({
			// 		url: '/pages/siteManage/siteManage?type=2',
			// 		success: res => {},
			// 		fail: () => {},
			// 		complete: () => {}
			// 	});
			// },
			// goAuthManage() {
			// 	uni.navigateTo({
			// 		url: '/pages/authManage/authManage',
			// 		success: res => {},
			// 		fail: () => {},
			// 		complete: () => {}
			// 	});
			// },
			goMessagePush() {
				uni.navigateTo({
					url: '/pages/setting/messagePush/messagePush',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			},
			goBuilding() {
				uni.navigateTo({
					url: '/pages/setting/building/building',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			},

		}
	}
</script>

<style lang="scss">
	.setting-wrapper {
		.top-banner {
			width: 100%;
			height: 380rpx;
			background: url(../../static/setting-bg.png) no-repeat;
			background-size:cover;
			color: #fff;
			display: flex;
			justify-content: center;
			align-items: center;
			image {
				width: 130rpx;
				height: 130rpx;
			}
			.userName {
				margin-top: 30rpx;
				margin-bottom: 10rpx;
			}
		}
		
		.cu-list.menu-avatar .cu-item{
			margin:30rpx 0 0;
			margin-left:0;
			.cu-avatar{
				background-color:rgba(0,0,0,0);
				background-size:100% 100%;
				left:26rpx;
			}
			.content{
				left:130rpx;
				font-size:32rpx;
			}
		}
	}
	
	
		
	
</style>
<style>
	.shadow {
		box-shadow: 1px 1px 4px rgb(26 26 26 / 10%);
	}
</style>
