<!-- 我的 -->
<template>
	<view class="content">
		<view class="head">
			<view class="row">
				<u--image class="flex-end" :showLoading="true" src="../../static/images/mine/saoma.png" width="20px"
					height="20px"></u--image>
			</view>
			<u--image class="flex-end" :showLoading="true" src="https://cdn.uviewui.com/uview/album/1.jpg" width="60px"
				height="60px"></u--image>
			<view @click="toLogin" class="information">{{hasLogin? userName : '立即登录' }}</view>

			<view></view>
		</view>
		<view class="content1">
			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/driverCertification')">
				<view>身份管理</view>
				<view>已认证></view>
			</view>
			<!-- <view class="flex flex-space-between" @click="goDetailPage('/pages/mine/driverCertification')">
				<view>货主评价</view>
				<view> > </view>
			</view> -->
			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/manageBankCards/index')">
				<view>管理银行卡</view>
				<view> > </view>
			</view>
			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/manageVehicles/index')">
				<view>管理车辆</view>
				<view> > </view>
			</view>
			<view class="flex flex-space-between" @click="$helper.contactCustomerService">
				<view>联系客服</view>
				<view> > </view>
			</view>
			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/helpDescription')">
				<view>帮助说明</view>
				<view> > </view>
			</view>
			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/set')">
				<view>设置</view>
				<view> > </view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	export default {
		data() {
			return {
				userName:'',
			};
		},
		onLoad() {
			debugger
			this.userName = this.userInfo.userName
		},
		computed: {
			...mapState(['hasLogin', 'userInfo']),
			// 手机号中间4位加*
			// starUserphone() {
			// 	let reg = /^(\d{3})\d{4}(\d{4})$/;
			// 	if (this.userphone) {
			// 		return this.userphone.replace(reg, "$1****$2");
			// 	}
			// }
		},
		methods: {
			goDetailPage(src) {
				uni.$u.route(src);
			},
			toLogin() {
				debugger
				console.log("userInfo", this.userInfo)
				if (!this.hasLogin || !this.userInfo || this.userName == "立即登录") {
					uni.$u.route('/pages/public/login');
				} else {}
				// else if(!this.userInfo.nickname){
				// 	this.inputShow = true
				// 	this.inputStatus = 'inline'
				// 	this.feild = "nickname"
				// 	this.inputContent = ''
				// }
			},
		}
	}
</script>

<style lang="scss">

</style>
