{extend name="default/base" /}
{block name="title"}登录 - {__block__}{/block}
{block name="css"}
<link rel="stylesheet"  href="__MOBILE__/css/user.css?v={$v}">
<style>body{background:#fff}</style>
{/block}
{block name="header"}
       <header style="background:#ffffff;" class="ui-header ui-header-positive wst-header">
       	   <i id="return" class="ui-icon-return" onclick="location.href='{:url('mobile/index/index')}'"></i><h1 id="login-w">{if $type==1}账号登录{else}手机登录{/if}</h1>
       </header>
{/block}
{block name="footer"}
		{/* 大加载 */}
		<div class="ui-loading-block" id="Loadl">
		    <div class="ui-loading-cnt">
		        <i class="ui-loading-bright"></i>
		        <p id="j-Loadl">正在加载中...</p>
		    </div>
		</div>
{/block}
{block name="main"}
		{php}$mobileLoginTypeArr = explode(',',WSTConf('CONF.mobileLoginType'));{/php}
		{/* 登录页面 */}
		{if in_array(2,$mobileLoginTypeArr) && $type==2}
		<section class="ui-container" id="login2">
			<div class="wst-lo-frame">
				<div class="frame"><input id="regName" type="number" placeholder="手机号"></div>
				{if(WSTConf('CONF.smsVerfy')==1)}
				{if (int)WSTConf('CONF.isAddonCaptcha')!=1}
				<div class="verify phone">
					<input id="smsVerfy" type="text" placeholder="验证码" maxlength="10">
					<img id='verifyImg3' src="{:url('mobile/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg3")'>
				</div>
				{/if}
				{/if}
				{/* 获取验证码 prompt */}
				<div class="verify phone">
					<input id="phoneCode" type="text" placeholder="短信验证码" maxlength="8">
					{if (int)WSTConf('CONF.isAddonCaptcha')!=1}
					<button id="obtain" class="ui-btn ui-btn-primary" onclick="javascript:obtainCode(2)">获取验证码</button>
					{else}
					{:hook('mobileDocumentLoginSmsCaptcha')}
					{/if}
				</div>
			</div>
			<div class="wst-lo-button">
				<button id="loginButton2" class="button" onclick="javascript:login2();">登录</button>
			</div>
			<ul class="ui-row wst-lo-term">
				<li class="ui-col ui-col-50">
					{php}if(in_array(1,$mobileLoginTypeArr)){{/php}<a href="{:url('mobile/users/login')}" class="term">账号登录</a>{php}}{/php}&nbsp;
				</li>
				<li class="ui-col ui-col-50" style="text-align:right;"><a href="{:url('mobile/users/toRegister')}" class="term">注册新账号</a></li>
			</ul>
		</section>
		{/if}
		{if in_array(1,$mobileLoginTypeArr) && $type==1}
		<section class="ui-container" id="login1">
			<div class="wst-lo-frame">
				<div class="frame"><input id="loginName" type="text" placeholder="邮箱/用户名/手机号"></div>
				<div class="frame"><input id="loginPwd" type="password" placeholder="密码" style="width:50%;"><a style='text-align:right;float:right;color:#666666;line-height: 0.40rem;font-size:0.14rem;' href="{:url('mobile/users/forgetpass')}" class="term">忘记密码</a></div>
				<div class="verify">
					<input id="loginVerfy" type="text" placeholder="验证码" maxlength="10">
					<img id='verifyImg1' src="{:url('mobile/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg1")'>
				</div>
			</div>
			<div class="wst-lo-button">
				<button id="loginButton" class="button" onclick="javascript:login();">登录</button>
			</div>
			<ul class="ui-row wst-lo-term">
				<li class="ui-col ui-col-50">
					{php}if(in_array(2,$mobileLoginTypeArr)){{/php}<a href="{:url('mobile/users/login','logintype=2')}" class="term">手机登录</a>{php}}{/php}&nbsp;
				</li>
				<li class="ui-col ui-col-50" style="text-align:right;"><a href="{:url('mobile/users/toRegister')}" class="term">注册新账号</a></li>
			</ul>
		</section>
		{/if}
		{:hook('mobileDocumentLogin')}
		{/* 登录页面end */}
{/block}
{block name="js"}
<script type='text/javascript' src='__MOBILE__/js/jquery.min.js'></script>
<script type='text/javascript' src='__MOBILE__/js/login.js?v={$v}'></script>
{/block}