<!--pages/editAddress/editAddress.wxml-->
<nav navName="{{navName}}"></nav>
<view class="page">
  <view class="cellbox">
    <view class="cell">
      <view class="cellrow">
        <view class="name">
          收 货 人
        </view>
        <view class="iptbox">
           <input type="text" value="{{consignee_name}}" placeholder="" bindinput="inputChange"  data-id="consignee_name" placeholder-class="placeholder" data-value="hideConsignee_name" class="ipt" />
           <text class="placeholder"  hidden="{{hideConsignee_name}}">请输入收货人姓名</text>
        </view>
      </view>
    </view>
    <view class="cell">
      <view class="cellrow">
        <view class="name">
          联系电话
        </view>
        <view class="iptbox">
          <input type="text" placeholder="" value="{{consignee_tel}}" bindinput="inputChange" data-id="consignee_tel" placeholder-class="placeholder" data-value="hideConsignee_tel" class="ipt" />
          <text class="placeholder" hidden="{{hideConsignee_tel}}">请输入收货人联系电话</text>
        </view>
      </view>
    </view>
    <view class="cell">
      <view class="cellrow">
        <view class="name">
          所在地区
        </view>
        <view class="iptbox" bindtap="showArea">
          <input type="text" placeholder="请选择所在地区" value="{{area}}" placeholder-class="placeholdeript" class="ipt" disabled="true" style="margin-right: 4rpx;"/>
        
          <image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
        </view>
      </view>
    </view>
    <view class="cell">
      <view class="cellrow">
        <view class="name">
          详细地址 
        </view>
        <view class="iptbox">
          <input type="text" placeholder="" value="{{address}}" bindinput="inputChange" data-id="address" placeholder-class="placeholder" data-value="hideAddress" class="ipt" />
          <text class="placeholder" hidden="{{hideAddress}}">请填写乡镇街道、楼牌号等</text>
        </view>
      </view>
    </view>
  </view>
  <view class="bottombox">
    <view class="cell">
      <view class="row">
       <div class="label">标 签 </div>
       <view class="tagbox" >
          <view class="tag {{tag==1?'active':''}}" bindtap="selectTag" data-tag="1">家</view>
          <view class="tag {{tag==2?'active':''}}"  bindtap="selectTag" data-tag="2">公司</view>
          <view class="tag {{tag==3?'active':''}}"  bindtap="selectTag" data-tag="3">学校</view>
          <view class="tag {{tag==4?'active':''}}"  bindtap="selectTag" data-tag="4">其他</view>
       </view>
      
      </view>
    </view>
    <view class="cell" style="padding:0 32rpx">
      <view class="cellrow" >
        <view class="name" style="color: #666666;">
          设为默认
        </view>
        <view class="iptbox">
          <van-switch checked="{{is_default==1?true:false}}" active-color="#3CC7C0"  inactive-color="#f2f2f2" bind:change="onChange" size="26px" />
        </view>
      </view></view>
  </view>
  <view class="btn" bindtap="handleAddress">保存地址</view>
</view>
<van-popup
  show="{{ show }}"
  round
  position="bottom"
  custom-style="height: 50%"
  bind:close="onClose"
>
<van-picker columns="{{ columns }}"   show-toolbar
  title="选择地区"
  columns="{{ columns }}"
  value-key="area_name"
  bind:cancel="onCancel"
  bind:change="onChangePicker"
  bind:confirm="onConfirm"/>
</van-popup>