{{include file=Main_View('head')}}
<style>
	.bind{
		margin-top: 10px;
		position: relative; 
		width: 80%;
		min-width: 1145px;
		left: 10%;
		height: 200px;
		background-color: #fff;
		margin-bottom: 10px;
	}
	.sort{
		font-size: 16px;
	    font-weight: bold;
	   
	    float: left;
	    width: 100%;
	    line-height: 45px;
	    line-height: 45px;
	}
	.bind .sort span{
		padding-left: 10px;
		float: left; !important
	}
	.select_bind{
		float: left;
		width: 100%;
		border-top: 1px solid #DDD;
	}
	.select_bind .radio{
		line-height: 80px;
	}
	.select_bind .radio .layui-form-radio {
		padding-left: 10px;
	}
	.msg{
		padding-left: 10px;
		line-height: 30px;
	}
	red{
		color: red;
	}
	.layui-input{
		width: 30%;
		float: left;
		margin-top: 5px;
    	margin-left: 10px;
	}
	label{
		float: left;
		line-height: 50px;
		padding-left: 20px;
	}
</style>

<if condition="$_GET['step']==1">
<form method="post" class="bind layui-form">
	<div class="sort"><span>绑定已有帐号</span></div>
	<div class="select_bind" style="float: left; width: 100%;">
		<div class="radio">
			<div style="float: left;width: 100%;">
				<label>账号:</label><input name="username"  type="text" class="layui-input" placeholder="请输入你已有的账号">
			</div>
			<div style="float: left;width: 100%;">
				<label>密码:</label><input name="password"  type="password" class="layui-input" placeholder="请输入密码">
			</div>
			
		</div>
		<div class="layui-form-item" style="text-align: center;">
			<input type="hidden" name="step" id="step" value="post" />
		    <button class="layui-btn">提交</button>
		</div>
	</div>
</form>
<else>
<div class="bind layui-form">
	<div class="sort"><span>绑定帐号选择</span></div>
	<div class="select_bind">
		
		<div class="radio">
			<input name="bind" lay-filter='bind' value="1" title="绑定已有账号" type="radio">
			<input name="bind" lay-filter='bind'  value="2" title="新注册账号进行绑定"  type="radio">
		</div>
		<div class="msg">
			你现在可以选择当前QQ捆绑原有帐号,也可以重新注册一个帐号进行捆绑.如果没有旧帐号的话,只能选择新注册一个帐号进行捆绑 <br>
			<red>提示:捆绑成功之后,下次QQ方式登录即可直接登录到捆绑后的帐号.</red>
		</div>
	</div>
</div>
<div style="clear: both;"></div>
<script>
	layui.use('form', function(){
		var form = layui.form;
		form.on('radio(bind)', function(data){
		  	if(data.value=='1'){
		  		window.location.href='?step=1';
		  	}else{
		  		window.location.href='/login/index/reg.{{C('html')}}';
		  	}
		});
	});
</script>
</if>
{{include file=Main_View('foot')}}