<template>
	<view class="mine">
		<view class="mine-header">
			<view class="mine-header-avatar">
				<u-avatar :src="userInfo.avatar" size="60"></u-avatar>
			</view>
			<view class="mine-header-user">
				<view>张三丰</view>
				<view>巡检员</view>
			</view>
		</view>
		<view class="mine-cell">
			<u-cell-group :border="false">
				<u-cell icon="setting-fill" title="" :border="false" :isLink="true"
					:rightIconStyle="{color: '#638EE3', fontSize: '30rpx', fontWeight: 600}"
					:customStyle="{ marginBottom: '10rpx' }" @click="jumpPage('pages/mine/problemReporting/problemReporting')">
					<view slot="icon">
						<u--image src="./../../static/icons/question-icon.png" width="44rpx" height="44rpx"></u--image>
					</view>
					<view class="cell-title" slot="title">
						问题上报
					</view>
				</u-cell>
				<u-cell icon="integral-fill" title="" :border="false" :isLink="true"
					:rightIconStyle="{color: '#638EE3', fontSize: '30rpx', fontWeight: 600}"
					:customStyle="{ marginBottom: '10rpx' }">
					<view slot="icon">
						<u--image src="./../../static/icons/config-icon.png" width="44rpx" height="44rpx"></u--image>
					</view>
					<view class="cell-title" slot="title">
						配置管理
					</view>
				</u-cell>
				<u-cell icon="integral-fill" title="" :border="false" :isLink="true"
					:rightIconStyle="{color: '#638EE3', fontSize: '30rpx', fontWeight: 600}"
					:customStyle="{ marginBottom: '10rpx' }" @click="jumpPage('pages/mine/changePassword/changePassword')">
					<view slot="icon">
						<u--image src="./../../static/icons/password-icon.png" width="44rpx" height="44rpx"></u--image>
					</view>
					<view class="cell-title" slot="title">
						修改密码
					</view>
				</u-cell>
				<u-cell icon="integral-fill" title="" :border="false" :isLink="true"
					:rightIconStyle="{color: '#638EE3', fontSize: '30rpx', fontWeight: 600}"
					:customStyle="{ marginBottom: '10rpx' }" @click="logout">
					<view slot="icon">
						<u--image src="./../../static/icons/logout-icon.png" width="44rpx" height="44rpx"></u--image>
					</view>
					<view class="cell-title" slot="title">
						退出账号
					</view>
				</u-cell>
			</u-cell-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {
					avatar: 'https://cdn.uviewui.com/uview/album/1.jpg'
				}
			}
		},
		methods: {
			logout() {
				uni.$u.route({
					url: 'pages/login/login'
				})
			},
			jumpPage(url, params) {
				uni.$u.route({
					url, params
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import './mine.scss';
</style>
