<template>
	<view>
		<page-head title="view"></page-head>
		<view class="warp" style="margin: 10rpx 15rpx;">
			<view class="user" style="">
				<image class="user-avatar" mode="aspectFit" src="../../../static/logo.png"></image>
				<view class="user-info">
					<h2> 用户昵称 </h2>
					<text> UID 1234567897 </text>
					<text> 用户昵称</text>
				</view>
			</view>
			<view style="padding: 10rpx;"></view>
			<view class="Grid">
				<view class="Grid-Item">
					<view class="Grid-Item-1">
						<view class="GSimg">
							<image class="Image" src="../../../static/logo.png"></image>
						</view>
						<view class="GStitle">测试功能</view>
					</view>
				</view>
				<view class="Grid-Item">
					<view class="Grid-Item-1">
						<view class="GSimg">
							<image class="Image" src="../../../static/logo.png"></image>
						</view>
						<view class="GStitle">测试功能</view>
					</view>
				</view>
				<view class="Grid-Item">
					<view class="Grid-Item-1">
						<view class="GSimg">
							<image class="Image" src="../../../static/logo.png"></image>
						</view>
						<view class="GStitle">测试功能</view>
					</view>
				</view>
				<view class="Grid-Item">
					<view class="Grid-Item-1">
						<view class="GSimg">
							<image class="Image" src="../../../static/logo.png"></image>
						</view>
						<view class="GStitle">测试功能</view>
					</view>
				</view>
			</view>

			<view style="padding: 10rpx;"></view>
			<uni-list style="">
				<uni-list-item title="列表左侧带略缩图"
					thumb="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
					thumb-size="sm" rightText="右侧文字" showArrow></uni-list-item>
				<uni-list-item :showExtraIcon="true" :extraIcon="{color: '#4cd964',size: '25',type: 'gear'}"
					title="列表左侧带扩展图标" clickable showArrow>
				</uni-list-item>
				<uni-list-item :showExtraIcon="true" :extraIcon="{color: '#4cd964',size: '25',type: 'gear'}"
					title="列表左侧带扩展图标" clickable showArrow>
				</uni-list-item>
				<uni-list-item :showExtraIcon="true" :extraIcon="{color: '#4cd964',size: '25',type: 'gear'}"
					title="列表左侧带扩展图标" clickable showArrow>
				</uni-list-item>
			</uni-list>
			<view style="padding: 10rpx;"></view>
			<uni-list>
				<uni-list-item title="列表左侧带略缩图"
					thumb="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
					thumb-size="sm" rightText="右侧文字" showArrow></uni-list-item>
				<uni-list-item :showExtraIcon="true" :extraIcon="{color: '#4cd964',size: '25',type: 'gear'}" title="设置"
					clickable showArrow>
				</uni-list-item>
				<uni-list-item :showExtraIcon="true" :extraIcon="{color: '#4cd964',size: '25',type: 'info'}" title="关于"
					clickable showArrow>
				</uni-list-item>
				<uni-list-item :showExtraIcon="true" :extraIcon="{color: '#ff0000',size: '25',type: 'back'}" title="退出"
					clickable showArrow>
				</uni-list-item>
			</uni-list>
		</view>
	</view>
</template>

<script>
	import {mapState,mapGetters} from 'vuex'
	export default {
		computed: {
			...mapState({
				text: state => state.moduleA.text,
				timestamp: state => state.moduleB.timestamp
			}),
			...mapGetters({
			  isLogin: 'userIsLogin'
			})
		},
		data() {
			return {}
		},
		onLoad(){
			if (! this.isLogin) {
				uni.redirectTo({
					url:"/pages/login/login"
				})
			}		
		},
		methods: {

		},
		onBackPress() {
			// #ifdef APP-PLUS
			plus.key.hideSoftKeybord();
			// #endif
		}
	}
</script>

<style lang="scss">
	.user {
		box-sizing: border-box;
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: center;
		padding-top: 180rpx;
		padding-left: 15rpx;
		padding-bottom:25rpx;

		.user-avatar {
			width: 138rpx;
			height: 138rpx;
			border-radius: 50%;
		}

		.user-info {
			flex: 1;
			display: flex;
			flex-direction: column;
			justify-content: center;
			padding-left: 45rpx;
		}
	}

	.Grid {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-content: space-between;
		background: #f7f7f7;

		.Grid-Item {
			width: 25%;

			.Grid-Item-1 {
				margin-left: 10rpx;
				margin-right: 10rpx;
				text-align: center;
				border: 1rpx solid #efeded;
				border-radius: 25rpx;
				box-sizing: border-box;
				display: flex;
				flex-wrap: wrap;
				justify-content: space-around;
				flex-direction: column;
				align-items: center;
				padding-top: 20rpx;
				padding-bottom: 5rpx;
				background-color: #fff;
			}

			.GSimg {
				width: 96rpx;
				height: 96rpx;

				.Image {
					width: 96rpx;
					height: 96rpx;
				}
			}

			.GStitle {
				width: 100%;
				height: 34rpx;
				line-height: 34rpx;
				color: #06121e;
				font-size: 24rpx;
				margin-top: 10rpx;
			}
		}
	}
</style>
