<!-- 验证码接口验证 -->
<view class="pack-center get-code-lay" wx:if="{{getCodeLay}}">
    <form class="get-code-lay-form" bindsubmit="getPhoneCode">
        <image class="get-code-lay-remove" bindtap="showImgCode" src="/static/icons/remove_icon.png" mode="widthFix"></image>
        <view class="get-code-lay-title">获取验证码</view>
        <view class="get-code-lay-input">
            <input type="text" name="imgcode" placeholder="输入验证码"></input>
            <image class="get-code-lay-img" src="{{codeImg}}" mode="heightFix" bindtap="getCodeImg"></image>
        </view>
        <button size="default" class="get-code-lay-btn" form-type="submit">提交</button>
    </form>
</view>

<!-- 登录区域 -->
<form class="login" bindsubmit="loginForm">
    <view class="login-header">
        <image class="login-logo" src="/static/images/logo.png" mode="aspectFill"></image>
        <view class="login-title">登录体验更多服务</view>
        <view class="login-subhead">{{loginWechat ? '请使用您本人的手机号码登录/注册平台账户' : '使用手机号码登录/注册平台账号'}}</view>
    </view>
    <block wx:if="{{loginWechat}}">
        <button class="login-btn" size="default" open-type="getPhoneNumber" bindgetphonenumber="PhoneNumber">微信授权</button>
    </block>
    <block wx:else>
        <view class="phone-inputs">
            <input type="number" placeholder="输入手机号码" name="mobileNo" bindblur="userPhone"></input>
        </view>
        <view class="phone-inputs">
            <input type="number" placeholder="验证码" name="code"></input>
            <button class="phone-code-btn" size="mini" disabled="{{codeBtnStat}}" bindtap="showImgCode" data-type="imgcode">{{codeBtnStat ? '重新获取' + codeTime + 's' : "获取验证码"}}</button>
        </view>
        <button class="login-btn" size="default" form-type="submit">登录</button>
    </block>
    <view class="login-way" bindtap="loginWayTab">{{loginWechat ? '手机号码登录' : '微信快捷登录'}}</view>
    <view class="login-agree">登录表示您已阅读并同意
        <navigator hover-class="none" url="/pages/richText/richText?key=user_servies_licence">用户服务协议</navigator>，
        <navigator hover-class="none" url="/pages/richText/richText?key=user_private_licence">隐私声明</navigator>
    </view>
</form>


<!--  -->

<userinfo-layer
    show-layer="{{userInfo}}"
    bind:updateinfo="userInfo"
></userinfo-layer>
