<template>
	<view class="content">
		<view class=" topBox">
			<navigator url="/pages/user/set/setImg" class="headbox bb dfsb">
				<image :src="userInfo.userInfo.avatar" mode=""></image>
				<text class="fontbase flex1">修改头像</text>
				<u-icon size="10" color="#999" name="arrow-right"></u-icon>
			</navigator>
			<navigator url="/pages/user/set/set?type=1" class="ordtype pd30 bb dffs">
				<text class="oneTe fontbase">手机号</text>
				<text class="textgrey fontbase flex1">{{ userInfo.userInfo.phone || '手机号' }}</text>
				<u-icon size="10" color="#999" name="arrow-right"></u-icon>
			</navigator>
		</view>
		<view class="userCenter">
			<view class="order">
				<navigator url="/pages/user/set/set?type=2" class="ordtype bb dffs">
					<text class="oneTe flex1 fontbase">修改昵称</text>
					<text class="textgrey fontmid">{{ userInfo.userInfo.nickname || '昵称' }}</text>
					<u-icon size="10" color="#999" name="arrow-right"></u-icon>
				</navigator>
				<navigator url="/pages/user/set/set?type=3" class="ordtype bb dffs">
					<text class="oneTe flex1 fontbase">学校信息</text>
					<text class="textgrey fontmid">{{ userInfo.userInfo.school || '学校信息' }}</text>
					<u-icon size="10" color="#999" name="arrow-right"></u-icon>
				</navigator>
				<!-- "is_pay_pass": 1, //是否设置支付密码:  0=未设置   1=已设置 -->
				<view @click="navTo()" class="ordtype bb dffs">
					<text class="oneTe flex1 fontbase">支付密码</text>
					<u-icon size="10" color="#999" name="arrow-right"></u-icon>
				</view>
				<navigator url="/pages/user/address/address" class="ordtype bb dffs">
					<text class="oneTe flex1 fontbase">我的收货地址</text>
					<u-icon size="10" color="#999" name="arrow-right"></u-icon>
				</navigator>
			</view>
		</view>
	</view>
</template>

<script>
import { mapState, mapActions } from 'vuex';
import { pathToBase64 } from '@/common/tool/pathToBase64.js';
export default {
	data() {
		return {
		};
	},
	computed: {
		...mapState({ userInfo: state => state.userInfo })
	},
	methods: {
		  navTo(){
			  let type = this.userInfo.userInfo.is_pay_pass==1?6:4;
			  uni.navigateTo({
			  	url:'/pages/user/set/set?type=' +type
			  })
		  },
	}
};
</script>
<style lang="scss">
.content {
	padding-top: 20rpx;
	.topBox {
		width: 100%;
		margin: 20rpx auto;
		background-color: #fff;
		.oneTe {
			margin-right: 109rpx;
		}
	}
	.headbox {
		padding: 25rpx 30rpx;
		align-items: center;
		image {
			width: 110rpx;
			height: 110rpx;
			background-color: #fafafa;
			border-radius: 50%;
			margin-right: 35rpx;
		}
	}
}
.userCenter {
	.order {
		margin-bottom: 20rpx;
		background-color: #fff;
		.ordtype {
			padding: 30rpx;
			align-items: center;
			.flext {
				flex: 1;
				font-size: 30rpx;
				line-height: 30rpx;
				color: $textcom;
			}
			input,
			.putin {
				flex: 1;
				color: #666;
				font-size: 30rpx;
			}
			.oneTe {
				width: 30%;
			}
		}
	}
}
</style>
