<!--pages/socialUserRegister/socialUserRegister.wxml-->
<view class='jigouRegistered'>
  <image src='../../img/2.jpg'></image>
  <view class='formtable'>
    <view>
      <text>用户姓名：</text>
      <van-cell-group>
        <van-field
          value="{{ name }}"
          placeholder="请输入用户姓名"
          bind:change="onChangeName"
          border="{{false}}"
        />
      </van-cell-group>
    </view>
    <view>
      <text>手机号码：</text>
      <van-cell-group>
        <van-field
          value="{{ mobile }}"
          placeholder="请输入手机号码"
          bind:change="onChangeMobile"
          border="{{false}}"
        />
      </van-cell-group>
    </view>
    <view style='justify-content: flex-end;font-size:12px;width:280px;padding-right:30px'>
      <van-checkbox value="{{ isOrganization }}" shape="square" bind:change="onChangeIsOrganization" icon-size="16px">
      </van-checkbox>
      <text style='width:60px;color:#0D76ED;font-size:12px'>认证机构</text>
    </view>
    <view wx:if="{{isOrganization==true}}">
      <text>机构名称：</text>
      <van-cell-group>
        <van-field
          value="{{ organizationTitle }}"
          placeholder="请输入机构名称"
          bind:change="onChangeOrganizationTitle"
          border="{{false}}"
        />
      </van-cell-group>
    </view>
    <view style='margin-bottom:5px' wx:if="{{isOrganization==true}}">
      <text>法人姓名：</text>
      <van-cell-group>
        <van-field
          value="{{ legalPerson }}"
          placeholder="请输入法人姓名"
          bind:change="onChangeLegalPerson"
          border="{{false}}"
        />
      </van-cell-group>
    </view>
    <view style='margin-bottom:5px' wx:if="{{isOrganization==true}}">
      <text>法人手机：</text>
      <van-cell-group>
        <van-field
          value="{{ organizationContact }}"
          placeholder="请输入法人手机"
          bind:change="onChangeOrganizationContact"
          border="{{false}}"
        />
      </van-cell-group>
    </view>
    <view class='uploadPic' wx:if="{{uploadPic==true}}">
      <view>
        <text>身份证：</text><image src='{{legalPersonImgage1}}'></image><image src='{{legalPersonImgage2}}'></image>
      </view>
      <view>
        <text>营业执照：</text><image src='{{licensenImgage}}'></image>
      </view>
      <view>
        <text>其他资料：</text><image src='{{otherImgage}}'></image>
      </view>
    </view>
    
    <view class='button'>
    <van-button type="default" style="margin:0 auto;" open-type="getUserInfo" bind:getuserinfo="regist">注册</van-button>
    </view>
  </view>
  <view class='surejigou' wx:if="{{showRule==true}}">
    <view class='conSurejigou'>
      <text>认证机构</text>
      <view class='content'>
        {{content}}
      </view>
      <view class='btnagreen button'><van-button type="default" style="margin:0 auto" bind:click="agree">同意</van-button></view>
    </view>
  </view>
  <view class='upload' wx:if="{{upload==1}}">
    <text>机构认证</text>
    <view class='mainUpload'>
      <view>
        <text>法人身份证：</text>
        <view>
          <van-uploader file-list="{{ fileList }}" 
            max-count="1"
            multiple
            bind:after-read="afterRead"
            bind:before-read="beforeRead"
            use-before-read="{{ true }}"
            bind:delete="delete"/>
            <view style='font-size:12px;color:#666'>只支持.jpg格式</view>
            <van-uploader file-list="{{ fileList1 }}" 
            max-count="1"
            multiple
            bind:after-read="afterRead1"
            bind:before-read="beforeRead"
            use-before-read="{{ true }}"
            bind:delete="delete1"/>
            <view style='font-size:12px;color:#666'>只支持.jpg格式</view>
        </view>
        <view>
          <text>(身份证正面)</text>
          <text>(身份证反面)</text>
        </view>
      </view>
      <view>
        <text>营业执照：</text>
        <view>
          <van-uploader file-list="{{ fileList2 }}" 
            max-count="1"
            multiple
            bind:after-read="afterRead2"
            bind:before-read="beforeRead"
            use-before-read="{{ true }}"
            bind:delete="delete2"/>
            <view style='font-size:12px;color:#666'>只支持.jpg格式</view>
        </view>
      </view>
      <view>
        <text>其他资料：</text>
        <view>
          <van-uploader file-list="{{ fileList3 }}" 
            max-count="1"
            multiple
            bind:after-read="afterRead3"
            bind:before-read="beforeRead"
            use-before-read="{{ true }}"
            bind:delete="delete3"/>
            <view style='font-size:12px;color:#666'>只支持.jpg格式</view>
        </view>
      </view>
      <view class='button'>
        <van-button type="default" style="margin:30px auto" bind:click="upload">上传</van-button>
      </view>
    </view>
  </view>
  <van-notify id="van-notify" />
</view>
