<!--pages/handleLogin/index.wxml-->
<!-- <topbar /> -->
<navigator title="绑定商户" canBack="{{true}}" />
<van-tabs>
  <van-tab title="扫码绑定">
    <view class="codeContent">
      <view class="text">
        点击下方扫一扫，扫描管理员二维码直接绑定。
      </view>
      <view class="text">
        说明：系统预留手机号联系人为本系统管理员，其它人员可通过扫描管理员二维码进行绑定。
      </view>
      <view class="scan">
        <van-button type="info" block bind:click="scan"> 去扫码 </van-button>
      </view>
    </view>
  </van-tab>
  <van-tab title="手动绑定">
    <view>
      <van-field
        required
        value="{{ parkName }}"
        label="园区"
        placeholder="请选择园区"
        border="{{ true }}"
        readonly
        use-button-slot
      >
        <van-button slot="button" size="small" type="info" bind:click="onParkFocus">
          选择
        </van-button>
      </van-field>
      <van-field
        required
        value="{{ tenementName }}"
        label="商户"
        placeholder="请选择商户"
        border="{{ true }}"
        readonly
        use-button-slot
      >
        <van-button slot="button" size="small" type="info" bind:click="onTenementFocus">
          选择
        </van-button>
      </van-field>
      <van-field
        required
        value="{{ phone }}"
        placeholder="请输入预留手机号"
        border="{{ true }}"
        bind:change="onChangePhone"
      >
        <view slot="label"> 
          手机号 
          <van-icon 
            name="question-o" 
            style="margin-left: 8rpx;font-size: 36rpx;" 
            bind:tap="showTooltip"  
          />
        </view>
      </van-field>
      <van-field
        required
        value="{{ name }}"
        label="你的昵称"
        placeholder="请输入你的昵称"
        border="{{ true }}"
        bind:change="onChangeName"
      />
      <view class="submit">
        <van-button type="info" block bind:click="handleSubmit"> 提交 </van-button>
      </view>
      <view class="way">
        <view>
          不知道预留的手机号？可联系后台管理员查询！
        </view>
        <view class="phone" bind:tap="callPhone" data-phone="0311-83864830">
          <van-icon name="phone-o" class="phoneIcon" /> 0311-83864830
        </view>
      </view>
    </view>
  </van-tab>
</van-tabs>
<van-dialog id="van-dialog" />
<search-select 
    show="{{show}}" 
    title="{{title}}" 
    type="{{type}}" 
    park="{{park}}"
    bindconfirm="onConfirm"
    bindcancel="onCancel"
/>

