<!--pages/phoneLogin.wxml-->
<import src="/templates/global/global"/>
<template is="toast" data="{{...toastData}}"></template>
<view class="container" style="background: url('https://www.nongshen.net/static/wechat/container_bg.jpg') center center  no-repeat; background-size: 100% 100%;">    
    <view style="position: absolute;left:2.5%;top:{{isIPX?'57px':'32px'}};display: flex;align-items: center;" bindtap="back">
      <image src="/image/icon/cancel_icon.png" style="width: 35px;height: 35px;"></image>
    </view>
    <view class="header" style="text-align: center;" >
        <!-- <view class="principal">农村事项审批与记账</view>
         <view class="instructions">报账简单，操作便捷</view> -->
         <image src="/image/login/login_text.png" style="width: 80%;margin: 0 auto;" mode="widthFix"></image>
    </view>
    <view class="quick-login" style="bottom:{{isIPhoneX?'6vh':'10vh'}}">

      <van-field value="{{ formData.username }}" bind:change="onChange" placeholder="请输入账号" required data-value="formData.username" label-width="auto">
        <view slot="left-icon">
          <image src="/image/icon/input_name.png" style="width: 15px;vertical-align: middle;margin-right: 10px;" mode="widthFix"/>
        </view>
      </van-field>
      <van-field value="{{ formData.password }}" type="password" bind:change="onChange" placeholder="请输入密码" required data-value="formData.password" label-width="auto">
        <view slot="left-icon">
          <image src="/image/icon/input_password.png" style="width: 15px;vertical-align: middle;margin-right: 10px;" mode="widthFix"/>
        </view>
      </van-field>
      <van-field value="{{ formData.code }}" bind:change="onChange" placeholder="请输入验证码" required data-value="formData.code" label-width="auto">
        <view slot="left-icon">
          <image src="/image/icon/input_yzm.png" style="width: 15px;vertical-align: middle;margin-right: 10px;" mode="widthFix"/>
        </view>
        <view slot="button">
          <image src="{{codeUrl}}" style="width: 70px;vertical-align: middle;" mode="widthFix" bind:tap="getCode"/>
        </view>
      </van-field>

      <view class="bottom">
        <view class="btn2" bindtap="onSubmit">登录</view>
      </view>
    </view>
</view>