<template>
	<view>

		<view class="user" v-for="item in rolePowers" :key="item.code">
			<view class="img">
				<image src="../../static/权限管理/管理员@2x.png" class="image"></image>
			</view>

			<view class="hang">
				<text class="title">角色：{{item.roleFlag}}</text>

				<view class="content">
					<text>角色权限：{{item.powerFlag}}&nbsp;</text>
				</view>
			</view>

		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				rolePowers: [],
			}
		},

		onLoad(e) {
			console.log(e.flag);
			uni.request({
				url: 'http://127.0.0.1:9999/rolePower/list?roleFlag=' + e.flag,
				method: 'GET',
				data: {},
				success: res => {
					this.rolePowers = res.data.data.rolePowers;
					console.log(res);
				},

			});
		},
		methods: {

		}
	}
</script>

<style>
	.img{
		margin-top: 20rpx;
	}
	.image {
		margin-top: 40rpx;
		width: 90rpx;
		height: 90rpx;
		margin-top: 20rpx;
		margin-left: 20rpx;
	}

	.anniu {
		width: 116rpx;
		height: 116rpx;
		float: right;
		margin-top: 10rpx;
		margin-right: 4rpx;
	}

	.user {
		width: 702rpx;
		height: 210rpx;
		background-color: white;
		margin-top: 30rpx;
		margin-left: 24rpx;
		border-radius: 10rpx;
		padding-top: 30rpx;
		display: flex;
		flex-direction: row;
	}

	.hang {
		margin-top: 30rpx;
		display: flex;
		flex-direction: column;
	}

	.content {
		display: flex;
		flex-direction: column;
		margin-top: 30rpx;
		margin-left: 30rpx;
		line-height: 55rpx;
		font-size: 28rpx;
		color: #444546;
	}

	.title {
		font-size: 36rpx;
		margin-left: 30rpx;
		color: #282828;
		font-weight: 600;
	}
</style>
