<!--pages/login/index.wxml-->
<image class="bg-img" src="/images/bg.png" mode="aspectFill" />
<view class="top">
  <text class="nh">您好！</text>
  <text class="des">欢迎来到鲜水镇“智慧鲜水”数字化平台</text>
</view>
<view class="v-div v-center form">
  <!-- 登录 -->
  <view wx:if="{{showLogin}}" class="item v-div v-center">
    <text class="title">手机号登录</text>
    <view class="h-div v-center in-bg">
      <image src="/images/user_icon.png"></image>
      <input type="text" value="{{username}}" placeholder="请输入用户名" bindinput="inputMethed" data-type="username" />
    </view>
    <view class="h-div v-center in-bg">
      <image src="/images/pws-icon.png"></image>
      <input password type="text" value="{{password}}" placeholder="请输入密码" bindinput="inputMethed" data-type="password" />
    </view>

    <view catchtap="login" class="btn" data-type="{{1}}">登录</view>
    <view class="h-div v-center bot">
      <text class="tag" catchtap="changeWay" data-type="{{false}}">还没有账号？立即注册</text>
      <view class="forget-pwd">忘记密码</view>
    </view>
  </view>
  <!-- 注册 -->
  <view wx:else class="item v-div v-center">
    <text class="title">注册</text>
    <view class="h-div v-center in-bg">
      <text class="lab">姓名</text>
      <input type="text" value="{{form.name}}" placeholder="请输入姓名" bindinput="inputMethed" data-type="name" />
    </view>
    <view class="h-div v-center in-bg">
      <text class="lab">手机号码</text>
      <input type="text" value="{{form.phone}}" placeholder="请输入手机号码" bindinput="inputMethed" data-type="phone" />
    </view>
    <view class="h-div v-center in-bg">
      <text class="lab">登录密码</text>
      <input type="text" value="{{form.password}}" placeholder="请输入登录密码" bindinput="inputMethed" data-type="password" />
    </view>
    <view class="h-div v-center in-bg">
      <text class="lab">所属社区</text>
    </view>

    <view catchtap="login" class="btn" data-type="{{1}}">立即注册</view>
    <view class="h-div v-center" style="margin-top: 30rpx;">
      <text class="tag" catchtap="changeWay" data-type="{{true}}">已有账号？立即登录</text>
    </view>
  </view>
</view>