@php
	$safeNum = 0;
	if (!empty($user->mobile)) {
		$safeNum++;
	}
	if (!empty($user->real_name)) {
		$safeNum++;
	}
	$safeLevels = [0=>'低', 1=>'中', 2=>'高'];
@endphp
<div class="account-safe-range">
    当前安全等级：{{ $safeLevels[$safeNum] }}
    <span>
        <em class="current"></em>
 		@if ($safeNum == 2)
 		<em class="current"></em>
 		<em class="current"></em>
 		@elseif ($safeNum == 1)
        <em class="current"></em>
        <em></em>
        @else
        <em></em>
        <em></em>
        @endif
    </span>
</div>
<ul class="account-safe-list">
    <li class="icon-change-word">
        <h3>修改密码</h3>
        <p>当账号存在风险时可以重置密码</p>
        <a href="/user/change_password" class="btn">修改密码</a>
    </li>

    @if (empty($user->mobile))
    <li class="icon-bind-phone">
        <h3>绑定手机<span>未绑定</span></h3>
        <p>用于账号更新手机绑定信息</p>
        <a href="/user/bind_mobile" class="btn">绑定手机</a>
    </li>
    @else
    <li class="icon-bind-phone">
        <h3>绑定手机<span class="current">已绑定</span></h3>
        <p>用于账号更新手机绑定信息</p>
        <a href="/user/bind_mobile" class="btn">查看手机</a>
    </li>
    @endif

{{--    <li class="icon-bind-email">--}}
{{--        <h3>绑定邮箱<span>未绑定</span></h3>--}}
{{--        <p>用于忘记密码或账号被盗时快速重置密码标签</p>--}}
{{--        <a href="javascript:" class="btn current">已绑定</a>--}}
{{--    </li>--}}

	 @if (empty($user->real_name))
    <li class="icon-bind-realname">
        <h3>实名认证<span>未认证</span></h3>
        <p>用于帐号防沉迷认证</p>
        <a href="/user/bind_realname" class="btn">实名认证</a>
    </li>
    @else
    <li class="icon-bind-realname">
        <h3>实名认证<span class="current">已认证</span></h3>
        <p>用于帐号防沉迷认证</p>
        <a href="/user/bind_realname" class="btn">查看认证</a>
    </li>
    @endif

</ul>
