<!-- 选择地址 -->
<form bindsubmit="formSubmit" id="container" bindreset="formReset" report-submit='true'>
  <navigator class="site" url='../receivingaddress/receivingaddress?kid={{array.kid}}'>
    <view class="site-title" wx:if="{{msg === '0'}}" wx:key="index">
      添加收货地址
    </view>
    <view class="site-title" wx:elif="{{msg === '1'}}">
      请选择默认地址
    </view>
    <view wx:else>
      <view class="site-title">
        <text class="name">{{address.user_name}}</text>
        <text class="phone">{{address.user_mobile}}</text>
      </view>
      <view class="site-content">
        <text>{{address.province}}{{address.city}}{{address.district}}{{address.detail}}</text>
      </view>
    </view>
    <view class="extra">
      <image src="../../../../images/arrow.png"></image>
    </view>
  </navigator>
  <!-- 商品详情 -->
  <view class="goods">
    <view class="shop-name">
      <image class="icons" src="../../../../images/home.png"></image>
      <text>{{shop.name}}</text>
    </view>
    <view url="" class="goods-nav">
      <view class="image-img">
        <image src="{{prodUrl}}web-cp-all/img_pm/img/{{array.bid_file_id}}" mode="scaleToFill"></image>
      </view>
      <view class="goods-info">
        <view class="goods-title">
          <text>{{array.item_name}}</text>
        </view>

      </view>
      <view class="goods-num">
        <view class="price">
          <text class="price-text2">￥{{array.price_end}}</text>
        </view>
        <view class="price-right">
          <text class="goods-num-text1">共1件商品 小计：</text>
        </view>
      </view>
      <view class="red-packet">
        <view class="rp-text">
          <text>红包可抵扣 ￥</text>
          <text class="discount">{{discount}}</text> 
        </view>
        <view class="switch-box">
          <switch checked bindchange="switch1Change" />
        </view>
      </view>
      <view class="expressage">
        <text class="expressage-text1">配送 : </text>
        <text class="expressage-text2">由卖家配送</text>
      </view>
      <!-- 备注 -->
      <view class="remarks">
        <text>留言 : </text>
        <input placeholder="留言前建议先与商家沟通确认" value='{{textarea}}' bindblur='bindTextAreaBlur'></input>
      </view>
    </view>
  </view>
  <!-- 金额 -->
  <view class="sum">
    <button type="warn" size="{{defaultSize}}" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" formType="submit" hover-class="other-button-hover" class='submission' data-kid='{{array.kid}}' data-address_id='{{address.kid}}'>确认支付</button>
    <view class='prices'>
      <text>合计金额：</text>
      <text class="total-sum">￥{{totalSum}}</text>
    </view>
    <!-- <view class='submission' bindtap='submission' data-kid='{{array.kid}}' data-address_id='{{address.kid}}'>
      确认支付
    </view> -->
  </view>
</form>
<!-- 支付功能 -->