<view class="number">
  <view class="number-list">
    <view class="number-shu">
      <view class="number-text" style="background:#6282f4;">1</view>
      <view class="number-xian" style="color:{{current>0?'#6282f4':'#999'}};">-----------</view>
      <view class="number-text" style="background:{{current>0?'#6282f4':'#999'}};">2</view>
      <view class="number-xian" style="color:{{current==2?'#6282f4':'#999'}};">-----------</view>
      <view class="number-text" style="background:{{current==2?'#6282f4':'#999'}};">3</view>
    </view>
    <view class="number-title">
      <view style="color:#6282f4;">上传图片</view>
      <view style="color:{{current>0?'#6282f4':'#999'}};">填写资料</view>
      <view style="color:{{current==2?'#6282f4':'#999'}};">提交审核</view>
    </view>
  </view>
</view>
<form bindsubmit="formSubmit">
  <swiper current="{{swipercurrent}}" bindchange="swiper">
    <swiper-item>
      <view class="photo">
        <view class="photo-title">拍摄一张免冠头像照</view>
        <view class="photo-content">照片要保证光线充足，半身照要足够清晰</view>
        <view class="photo-images" bindtap="photo" wx:if='{{!photo}}'>
          <image src="/images/photo.png"></image>
          <text>选择图库</text>
        </view>
        <image wx:if='{{photo}}' bindtap="photo" mode="aspectFill" class='photo-show' src='{{photo}}'></image>
      </view>
    </swiper-item>
    <swiper-item wx:if='{{photo}}'>
      <view class="form">
        <view class="input">
          <view class="input-name"><text>访</text><text>客</text><text>姓名</text></view>
          <view>：</view>
          <input bindblur="name" name='name'></input>
        </view>
        <view class="input">
          <view class="input-name"><text>身</text><text>份</text><text>类</text><text>型</text></view>
          <view>：</view>
          <view class="picker">
            <picker name='type' bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
                <view class="weui-input">
                  <view>{{array[index]}}</view>
                  <image src='/images/jiantou-bottom.png'></image>
                </view>
              </picker>
          </view>
        </view>
        <view class="input">
          <view class="input-name"><text>身</text><text>份</text><text>证</text><text>号</text></view>
          <view>：</view>
          <input bindblur="idcard" maxlength="18" type="number" name='idcard'></input>
        </view>
        <view class="input">
          <view class="input-name"><text>手</text><text>机</text><text>号</text><text>码</text></view>
          <view>：</view>
          <input bindblur="phone" maxlength="11" type="number" name='phone'></input>
        </view>
        <!-- <view class="input">
          <view class="input-name"><text>验</text><text>证</text><text>码</text></view>
          <view>：</view>
          <input maxlength="6" type="number" name='code' style="width:240rpx"></input>
          <button bindtap="{{codetext>0?'':'code'}}" class="code">{{codetext}}</button>
        </view> -->
        <view class="textarea">
          <view class="input-name"><text>通</text><text>行</text><text>原</text><text>因</text></view>
          <view>：</view>
          <textarea maxlength="28" placeholder="最多输入28个汉字" bindblur="text" name='text'></textarea>
        </view>
      </view>
    </swiper-item>
    <swiper-item wx:if='{{photo&&isYesno}}'>
      <view class="result">
        <view style="padding-top:40rpx;text-align:center">
          <view wx:if='{{!photo}}' class="photo-images" style="margin:auto;">
            <image style="width:130rpx;height:130rpx;" src="/images/default-urser.png"></image>
          </view>
          <image wx:if='{{photo}}' bindtap="previewImage" mode="aspectFill" style="margin-top:0rpx;" class='photo-show' src='{{photo}}'></image>
          <view class="result-content" style="margin-top:20rpx;">
            <view class="result-name">访客姓名：</view>
            <view class="result-data">{{name?name:'未填'}}</view>
          </view>
          <view class="result-content">
            <view class="result-name">身份类型：</view>
            <view class="result-data">{{array[index]}}</view>
          </view>
          <view class="result-content">
            <view class="result-name">身份证号：</view>
            <view class="result-data">{{idcard?idcard:'未填'}}</view>
          </view>
          <view class="result-content">
            <view class="result-name">手机号码：</view>
            <view class="result-data">{{phone?phone:'未填'}}</view>
          </view>
          <view class="result-content">
            <view class="result-name">通行原因：</view>
            <view class="result-data1" style="text-align:left;word-break:break-all;">{{text?text:'未填'}}</view>
          </view>
          
        </view>
      </view>
      <view class="ps">
        <image src="/images/ps.png"></image>
        <view>审核结果会以短信形式发送到当前手机号，请注意查收</view>
      </view>
    </swiper-item>
  </swiper>
  <view class="bottom">
    <button class="next"  bindtap="{{current>0?'up':''}}" wx:if="{{current>0}}">上一步</button>
    <button class="next" bindtap="{{current==2?'':'next'}}" formType="{{current==2?'submit':''}}">{{current==2?'提交':'下一步'}}</button>
  </view>
</form>
