<!DOCTYPE HTML>
<html>

<head>
  <meta charset="UTF-8">
  <title></title>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta name="applicable-device" content="mobile">
  <link href="__CSS__/iconfont.css" rel="stylesheet">
  <link href="__CSS__/common-cz.css" rel="stylesheet">
  <link href="__CSS__/unlr.css" rel="stylesheet">
  <script src="__JS__/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="__JS__/getRem.js"></script>
  <link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
  <link rel="stylesheet" type="text/css" href="__CSS__/foot_tabbar.css">
  <link rel="stylesheet" type="text/css" href="__CSS__/user/setting.css">
<style>
.btnbox {
    width: 5.5rem;
    height: 0.8rem;
    background: #389AED;
    border-radius: 0.4rem;
    /* margin-top: 0.5rem; */
    font-size: 0.32rem;
    color: #fff;
    text-align: center;
    line-height: 0.8rem;
    border: 0;
    outline: 0;
    margin: .5rem auto;
}
.btnbox a{
  color: white;
}
</style>
</head>

<body>
  <div class="setting">
    <!-- 子页公共头部 -->
    <div class="subpage-heard">设置中心
      <a href="{:U('User/index')}" class="arrows"></a>
    </div>
    <div class="setting-box">
      <div class="setting-info">
        <div class="left">
          <img src="__IMG__/user/touxiang-icon.png" alt="">
          <span>头像</span>
        </div>
        <!-- //img/touxiang.png -->
       <img class="portraitbtn portrait" onerror="this.src='__IMG__/empty.jpg';this.onerror=null" src="<notempty name='user.head_img'>{$user['head_img']}<else /><eq name='user.sex' value='1'>__IMG__/head_women.png<else />__IMG__/head_men.png</eq></notempty>" alt="">
      </div>
      <div class="setting-info">
        <div class="left">
          <img src="__IMG__/user/haoma.png" alt="">
          <span>账号</span>
        </div>
        <div>{$user.account}</div>
      </div>
      <div class="setting-info arror">
        <div class="left">
          <img src="__IMG__/user/mingzibianji.png" alt="">
          <span>昵称</span>
        </div>
        <a href="{:U('usernick')}" class="right">{$user['nickname']}</a>
      </div>
      <div class="setting-info arror">
        <div class="left">
          <img src="__IMG__/user/mingzibianji.png" alt="">
          <span>性别</span>
        </div>
        <a href="{:U('User/usersex')}" class="right"><if condition="$user['sex'] == 0">男<else/>女</if></a>
      </div>
      <div class="setting-info arror">
        <div class="left">
          <img src="__IMG__/user/shoujibangding.png" alt="">
          <span>绑定手机</span>
        </div>
        <a href="{:U('userphone')}" class="right rightSel"><empty name="user.phone">去绑定<else/>已绑定</empty></a>
      </div>
      <div class="setting-info arror">
        <div class="left">
          <img src="__IMG__/user/shimingrenzhengmoren.png" alt="">
          <span>实名认证</span>
        </div>
        <div class="right">
          <switch name='user["age_status"]'>
            <case value="0">
              <a href="{:U('User/userauth')}" class="auth on">未认证</a>
            </case>
            <case value="2">
              <a href="{:U('User/userauth')}" class="auth on">已认证</a>
            </case>
            <case value="3">
              <a href="{:U('User/userauth')}" class="auth on">未成年</a>
            </case>
            <default /><a href="{:U('User/userauth')}" class="auth on">未认证</a>
          </switch>
        </div>
      </div>
      <a href="{:U('userpassword')}" class="setting-info arror">
          <div class="left">
            <img src="__IMG__/user/xiugaimima.png" alt="">
            <span>修改密码</span>
          </div>
      </a>
    </div>
    
  </div>
  <div class="btnbox user-set-btnbox">
    <a href="javascript:;" class="btn jsquit">退出登录</a>
  </div>

  <div class="pop pop-window" style="font-size: .28rem">
    <div class="pop-box pop-sign">
      <div class="pop-wrap"></div>
    </div>
  </div>

  <div class="popmsg pop-dialog"></div>
</body>
<script src="__JS__/pop.lwx.min.js"></script>
<script>
  $(function () {
    var pmsg = $('.popmsg').pop();

    $('.portraitbtn').click(function () {
      //pmsg.msg('请到PC端网站或APP应用上更改');
      var pop = $('.pop').addClass('pop-head').pop();
      pop.open(800, '<h2 class="pop-title"><span>请到APP上更改头像</span><a href="javascript:;" class="pop-close">X</a></h2><div class="pop-btnbox"><a href="/media.php?s=/Index/download.html" class="pop-btn">去下载APP</a></div>');
      pop.find('.pop-close').click(function () { pop.close() });
    });

    $(".jsquit").click(function () {
      $.ajax({
        url: "{:U('base/logout')}",
        type: "post",
        dataType: "json",
        success: function (result) {
          pmsg.msg(result.msg);
          setTimeout(function () {
            window.location.href = "{:U('Index/index')}";
          }, 2000);
        },
        error: function () {

        }
      })
    })

  });


</script>

</html>