{extend name="default/base" /}
{block name="title"}账户管理 - {__block__}{/block}
{block name="css"}
<link rel="stylesheet"  href="__MOBILE__/css/userinfo.css?v={$v}">
{/block}
{block name="header"}
    <div id="useri_infos">
	   	<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
	   		<a href="{:url('mobile/users/index')}"><i class="ui-icon-return return_users"></i></a><h1 class="useri_info">账户管理</h1>
	   		<i onclick="javascript:closeUploadArea()" style="display:none;float: right;" id="upload_close">关闭</i>
	   		<a href="javascript:void(0);"  class="wst-btns" style="display:none;" id="upload_button">上传</a> 
        </header>
{/block}
{block name="main"}
    <section class="ui-container" id="useri_info">
      	<ul class="ui-list ui-list-one ui-list-link wst-ed-info">
	    <li class="ui-border-t">
	        <div class="ui-list-info">
	            <h4 class="ui-nowrap" id="chooseImages">头像</h4>
	            <input type="file" id="uploadImg" class="uploadfile-input" accept="image/*">
		        <div class="ui-list-thumb" id="previewImages" style="width: 65px;">
		            <span>
			        {if ($user['userPhoto'])}
	     			    <img src="{if(substr($user['userPhoto'],0,4)=='http')}{else}__RESOURCE_PATH__/{/if}{$user['userPhoto']}" class="wst-useri_portrait" id="imgurl">
	     			{else}
		       		    <img src="__RESOURCE_PATH__/{:WSTConf('CONF.userLogo')}" class="wst-useri_portrait" id="imgurl">
		        	{/if}
			        </span>
			    </div>
		     </div>
		</li>
		</ul>
		<div class="wst-useri_line"></div>
		<ul class="ui-list ui-list-text wst-ed-info">
		    <li>
		        <h4 class="ui-nowrap">用户名</h4>
		        <div class="ui-txt-info">{$user['loginName']}</div>
		    </li>
		</ul>
		<div class="wst-useri_line"></div>
		<ul class="ui-list ui-list-text ui-list-link wst-ed-info">
		    <li onclick="javascript:openNickName();">
		        <h4 class="ui-nowrap">昵称</h4>
		        <div class="ui-txt-info" id="nickname">{$user['userName']}</div>
		    </li>
		<div class="wst-useri_line"></div>
		    <li onclick="javascript:openUserSex();">
		        <h4 class="ui-nowrap">性别</h4>
		        <?php $usersex = array('保密','男','女');?>
		        <div class="ui-txt-info" id="usersex"><?php echo $usersex[$user['userSex']];?></div>
		    </li>
		</ul>
		<div class="wst-useri_line"></div>
    </section>
    <sction class="ui-container" id="upload_modal">
    <div class="upload-modal">
     <div id="clipArea" class="clipArea"></div>
     <input type="hidden" id="imgData" autocomplete="off">
 	</div>
	</sction>
	</div>
	<div id="useri_nickname" style="display:none;">
	  <header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
   		<i class="ui-icon-return" onclick="javascript:returnUserinfo()"></i><h1>修改昵称</h1>
      </header>
      <section class="ui-container" style="height:80%;">
      	<div class="wst-useri_determine">
  	     <input type="text" id="userName" placeholder="昵称">
  	    </div>
     
      </section>
       <footer>
        <div class="ui-btn-wrap">
          <button class="ui-btn-lg ui-btn-danger wst-ed-button" onclick="javascript:editNickName()">
              确定
          </button>
      </div>
      </footer>
    </div>
	<div id="useri_sex" style="display:none;">
		   	<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
	   		<i class="ui-icon-return" onclick="javascript:returnUserinfo()"></i><h1>修改性别</h1>
        </header>
      <section class="ui-container" id="useri_sex">
      	<ul class="ui-list wst-listse wst-listse1" onclick="javascript:eidtUserSex(this, 0);">
              <li>
               <div class="wst-list-infose1">
                <span>保密</span>
               </div>
              </li>
              <div class="wst-list-infose2">
              <?php if($user['userSex']==0){ ?>
              	<i class="ui-icon-checked-s wst-icon-checked-s_se"></i>
             	<?php } ?>
              </div>
          </ul>
          <ul class="ui-list wst-listse wst-listse2" onclick="javascript:eidtUserSex(this, 1);">
              <li>
               <div class="wst-list-infose1">
                <span>男</span>
               </div>
              </li>
              <div class="wst-list-infose2">
              <?php if($user['userSex']==1){ ?>
              	<i class="ui-icon-checked-s wst-icon-checked-s_se"></i>
             	<?php } ?>
              </div>
          </ul>
          <ul class="ui-list wst-listse wst-listse3" onclick="javascript:eidtUserSex(this, 2);">
              <li>
               <div class="wst-list-infose1">
                <span>女</span>
               </div>
              </li>
              <div class="wst-list-infose2">
              <?php if($user['userSex']==2){ ?>
              	<i class="ui-icon-checked-s wst-icon-checked-s_se"></i>
             	<?php } ?>
              </div>
          </ul>
      </section>
	</div>
{/block}
{block name="js"}
<script type='text/javascript' src='__MOBILE__/js/jquery.min.js'></script>
<script type='text/javascript' src='__MOBILE__/js/photoclip/iscroll-zoom.js'></script>
<script type='text/javascript' src='__MOBILE__/js/photoclip/hammer.js'></script>
<script type='text/javascript' src='__MOBILE__/js/photoclip/jquery.photoClip.min.js'></script>
<script type='text/javascript' src='__MOBILE__/js/photoclip/upload.hpictures.js'></script>
<script type='text/javascript' src='__MOBILE__/users/user.js?v={$v}'></script>
{/block}