<!--pages/register/register.wxml-->

	<view class="register">
	    
		<view class="con">
			<image src="../../images/icon/logo.png" bindtap="toIndex"></image>
			<!-- 第一步 -->
			<block wx:if="{{registerStep==1}}">
				<view class="login-form">
					<view class="item {{errorTips==1? 'error':''}}">
						<!-- 手机号 -->
						<view class="account">
							<text class="input-item">+86</text>
							<input type="text" bindinput="getInputVal" maxlength="11" data-type="mobile" placeholder-class="inp-palcehoder" placeholder="请输入手机号"></input>
						</view>
						<view class="error-text" wx:if="{{errorTips==1}}">请输入正确的手机号</view>
					</view>
					<view class="item {{errorTips==2? 'error':''}}">
						<!-- 验证码 -->
						<view class="account">
							<input type="text" class="int-yzm" bindinput="getInputVal" data-type="validCode" placeholder-class="inp-palcehoder" placeholder="请输入验证码"></input>
							<view class="input-item get-yzm" bindtap="getCode" wx:if="{{show}}">获取验证码</view>
							<view class="input-item get-yzm" bindtap="getCode" wx:if="{{!show}}">{{count}} s</view>
						</view>
						<view class="error-text" wx:if="{{errorTips==2}}">请输入验证码</view>
					</view>
          <view class="to-login" bindtap="toLogin">已有账号？<text>去登录></text></view>
				</view>
				<!-- 按钮 -->
				<view>
					<button class="authorized-btn" bindtap="registerNext">下一步</button>
					<button class="to-idx-btn" bindtap="toIndex">回到首页</button>
				</view>
			</block>
			
			<!-- 第二步 -->
			<block wx:if="{{registerStep==2}}">
				<view class="login-form">
					<view class="item {{errorTips==3? 'error':''}}">
						<!-- 设置账号 -->
						<view class="account">
							<text class="input-item">设置账号</text>
							<input type="text" bindinput="getInputVal" data-type="userName" placeholder-class="inp-palcehoder" placeholder="请您设置账号"></input>
						</view>
						<view class="error-text" wx:if="{{errorTips==3}}">账号为4~16位字母、数字或下划线</view>
					</view>
					<view class="item {{errorTips==4? 'error':''}}">
						<!-- 密码 -->
						<view class="account">
							<text class="input-item">设置密码</text>
							<input type="password" bindinput="getInputVal" data-type="password" placeholder-class="inp-palcehoder" placeholder="请您设置密码"></input>
						</view>
						<view class="error-text" wx:if="{{errorTips==4}}">请输入密码</view>
					</view>
					<view class="item {{errorTips==5? 'error':''}}">
						<!-- 确认密码 -->
						<view class="account">
							<text class="input-item">确认密码</text>
							<input type="password" bindinput="getInputVal" data-type="confirmPwd" placeholder-class="inp-palcehoder" placeholder="请再次输入密码"></input>
						</view>
						<view class="error-text" wx:if="{{errorTips==5}}">两次密码不一致</view>
					</view>
				</view>
				<!-- 按钮 -->
				<view>
					<button class="authorized-btn" bindtap="registerNext">下一步</button>
					<button class="to-idx-btn" bindtap="toIndex">回到首页</button>
				</view>
			</block>
			
			<!-- 第三步 -->
			<block wx:if="{{registerStep==3}}">
				<view class="login-form">
					<view class="successful">恭喜你，注册成功！</view>
				</view>
				<!-- 按钮 -->
				<view>
          <button class="authorized-btn" bindtap="toIndex">回到首页</button>
				</view>
			</block>
			
		</view>
	</view>