<!-- 商品详情头部 -->
<view class="goodsheads">
  <view class="headleft">
    <image src="https://ndnd.duiduiedu.com/uploads/pics/goodsaddress.png"></image>
  </view>

  <view class="headmiddle" bindtap="modfiyclick" id="{{listdatamorei.id}}">
    <view class="middleup"><text class="bigfont">{{listdatamorei['name']}}</text><text class="smallfont">{{listdatamorei['phone']}}</text>
      <text class="moreiaddress">[默认地址]</text>
    </view>
    <view class="middledown">{{listdatamorei['addressinfo']}}</view>
  </view>

  <view class="headright" bindtap="delclick" id="{{listdatamorei.id}}">
    <image src="https://ndnd.duiduiedu.com/uploads/pics/stoppng.png"></image>
  </view>
</view>
<!-- 商品详情头部 -->
<!-- 分割线 -->
<view class="feigeixian"></view>
<!-- 分割线 -->

<!-- 商品详情头部 -->
<view class="goodsheads" wx:for="{{listdata}}" wx:for-item="item" wx:for-index="index" wx:key="key">
  <view class="headleft">
    <image src="https://ndnd.duiduiedu.com/uploads/pics/goodsaddress.png"></image>
  </view>

  <view class="headmiddle" bindtap="modfiyclick" id="{{item.id}}">
    <view class="middleup"><text class="bigfont">{{item.name}}</text><text class="smallfont">{{item.phone}}</text>
    </view>
    <view class="middledown">{{item.addressinfo}}</view>
  </view>

  <view class="headright" bindtap="delclick" id="{{item.id}}">
    <image src="https://ndnd.duiduiedu.com/uploads/pics/stoppng.png"></image>
  </view>
</view>
<!-- 商品详情头部 -->
<button type="primary" class="btnmyaddress" bindtap="onClickShow">+新增收货地址</button>
<van-overlay show="{{ show }}">
  <view class="wrapper">
    <form bindsubmit="submit">
      <view class="wrapperup">
        <text>添加新地址</text>
      </view>
      <view class="wrappermiddle">
        <van-cell-group>
          <van-field name="name" required value="{{ currentdata['name'] }}" label="收货人" placeholder="请输入收货人姓名"  />
          <van-field name="phone" required value="{{ currentdata['phone'] }}" label="手机号码" placeholder="请输入手机号"  />
          <van-field name="areaname" required value="{{ currentdata['region'] }}" label="所在地区" placeholder="请输入所在地区"   />
          <van-field name="address" required value="{{ currentdata['addressinfo'] }}" label="详细地址" placeholder="请输入详细地址"  />

          <van-cell title="设为默认地址">
            <van-switch name="checkvalue" checked="{{ checked }}" active-color="#1ccfd6" inactive-color="#ee0a24" size="24px"
              bind:change="onChange" />
          </van-cell>

        </van-cell-group>

      </view>

      <view class="wrapperdown">
        <button form-type="submit" class="savebtnclass">保存新地址</button>
      </view>
    </form>
  </view>
</van-overlay>