index.wxml 10.3 KB
<view class="layout">
  <block wx:if="{{showAddr}}">
    <view class="delivery">
        <text>{{deliveryList[deliveryType]}}</text>
        <view class="line"></view>
    </view>
    <view class="store" wx:if="{{deliveryType == 1}}">
        <view class="top">
        <view class="info">
            <view class="name">{{merchantDetail.merchantName}}</view>
            <view class="address">
            <view>
                <glsx-image class="digital-loca" webp src="discover/version/1_0_0/digital_loca.png"></glsx-image>
            </view>
            <view>{{merchantDetail.merchantAddress || ''}}</view>
            </view>
        </view>
        <!-- 地址展示区 -->
        <block>
            <view class="btn" bindtap="openLocation" data-item="{{merchantDetail}}">
            <view class="icon">
                <glsx-image webp src="discover/version/1_0_0/mipmap.png"></glsx-image>
            </view>
            <view class="distance-text">{{merchantDetail.Distance?merchantDetail.Distance:0}}km</view>
            </view>
        </block>
        </view>
        <view class="bottom">
        <view class="info-title">预留电话</view>
        <view class="info-text">
            {{merchantDetail.merchantLegalPerson}}
            <text class="ml12">{{merchantDetail.merchantLegalPersonPhone}}</text>
        </view>
        </view>
    </view>
    <block wx:if="{{deliveryType == 0}}">
        <block>
        <view class="address-box" bindtap="jump">
            <block wx:if="{{contactInfo.contactAddress}}">
            <view class="left">
                <view class="top">
                <view class="name text-hide">{{contactInfo.contactName}}</view>
                <block wx:if="{{isDefault}}">
                    <view class="default text-center">默认地址</view>
                </block>
                <view class="phone">{{contactInfo.contactPhone}}</view>
                </view>
                <view class="bottom text-hide">{{contactInfo.contactAddress}}</view>
            </view>
            </block>
            <block wx:else>选择收货地址</block>
            <view class="right text-center">
            <view class="sprite-icon icon-mine-arrow"></view>
            </view>
        </view>
        </block>
    </block>
  </block>
  
 
  
  <view class="content-box">
    <view class="merchantName text-hide" wx:if="{{deliveryType==1}}">{{goodsList.goodsType == 2?merchantName:goodsList.merchantName}}</view>
    <view class="merchantName text-hide" wx:if="{{deliveryType==0}}">{{goodsList[0].goodsType == 2?merchantName:(goodsList[0].merchantName || merchantName)}}</view>
    <block wx:if="{{deliveryType==1}}">
      <view class="item">
        <view class="content">
          <view class="goods-info">
            <view class="preview">
              <image webp src="{{goodsList.goodsImage}}"></image>
            </view>
            <view class="text">
              <view class="name">
                <view class="text-hide">{{goodsList.goodsName}}</view>
                <view class="deposit-logo" wx:if="{{goodsList.paymentType == 2}}">
                  <text class="deposit-title">定金</text>
                  <text class="deposit-price">¥{{goodsList.depositPrice}}</text>
                </view>
                <!-- <view bindtap="showSkuFun" data-item="{{item}}" data-index="{{index}}" class="text-hide description" wx:if="{{item.specificationData}}">{{item.specificationData || ''}}
                  <glsx-image class="selct-icon" webp src="glsx/discover/version/4_24_1/select-icon.png"></glsx-image>
                </view> -->
              </view>
              <view class="price-box">
                <view class="price">
                  <text class="unit">¥</text>
                  {{goodsList.activityPrice}}
                </view>
                <view wx:if="{{!goodsList.isPay}}" data-index="{{index}}" class="goodsNumber" bindtap="handleModification">
                  x{{goodsList.goodsNumber}}
                </view>
                <stepper wx:if="{{goodsList.isPay}}" data-item="{{goodsList}}" count="{{goodsList.goodsNumber}}" max="{{goodsList.goodsStock||goodsList.stock}}" data-id="{{goodsList.goodsId}}" bindchange="changeCount" data-index="{{index}}"></stepper>
              </view>
            </view>
          </view>
        </view>
      </view>
    </block>
    <block wx:if="{{deliveryType==0}}">
      <block wx:for="{{goodsList}}" wx:key="index">
        <view class="item">
          <view class="content">
            <view class="goods-info">
              <view class="preview">
                <image webp src="{{item.goodsImage}}"></image>
              </view>
              <view class="text">
                <view class="name">
                  <view class="text-hide">{{item.goodsName}}</view>
                </view>
                <view class="price-box">
                  <view class="price">
                    <text class="unit">¥</text>
                    {{item.activityPrice}}
                  </view>
                  <view wx:if="{{!item.isPay}}" data-index="{{index}}" class="goodsNumber" bindtap="handleModification">
                    x{{item.goodsNumber}}
                  </view>
                  <stepper wx:if="{{item.isPay}}" data-item="{{item}}" count="{{item.goodsNumber}}" max="{{item.goodsStock||item.stock}}" data-id="{{item.goodsId}}" bindchange="changeCount" data-index="{{index}}"></stepper>
                </view>
              </view>
            </view>
          </view>
        </view>
      </block>
    </block>
  </view>
  <view class="payInfo">
    <block wx:if="{{expressFee != null}}">
      <view class="tips flex_scb">
        支付方式:
        <view wx:if="{{deliveryType==1}}" class="info">
          {{goodsList.paymentType==1?'全款':'定金+尾款'}}
        </view>
        <view wx:if="{{deliveryType==0}}" class="info">全款</view>
      </view>
    </block>
    <view class="tips flex_scb">
      商品总价:
      <view class="info">¥{{sum}}</view>
    </view>
    <block wx:if="{{goodsList.paymentType ==2}}">
      <view class="tips flex_scb" wx:if="{{goodsList.depositPrice}}">
        商品定金:
        <view class="price">¥{{goodsList.depositPrice}}</view>
      </view>
      <view class="tips flex_scb" wx:if="{{goodsList.retainagePrice}}">
        商品尾款:
        <view class="price">¥{{goodsList.retainagePrice}}</view>
      </view>
    </block>
    <block wx:if="{{deliveryType ==0 && showAddr}}">
      <view class="tips flex_scb">
        运费:
        <view wx:if="{{expressFee}}" class="price">¥{{expressFee}}</view>
        <view wx:else class="info">包邮</view>
      </view>
    </block>
    <block wx:if="{{couponData.length&&isCoupon}}">
      <view class="tips flex_scb" style="position: relative;" bindtap="showCouponFun">
        <view class="flex_cc">
          <view class="logo">券</view>
          优惠券
        </view>
        <view class="price">
          <text wx:if="{{couponInfo&&isHaveCoupons&&couponCost}}">-¥{{(couponInfo.denomination)/100}}</text>
          <view class="sprite-icon icon-mine-arrow"></view>
        </view>
      </view>
    </block>
    <view class="tips flex_end" style="margin-bottom: 100rpx;">
      <block wx:if="{{deliveryType==1}}">
        <block wx:if="{{goodsList.paymentType == 2}}">
          <view class="price fw6">
            定金¥
            <text class="text-40">{{depositPrice}}</text>
          </view>
          <view class="info ml12">
            待支付尾款
            <text class="text-36 ">¥{{retainagePrice}}</text>
          </view>
        </block>
        <block wx:else>
          <view class="price fw6">
            <text class="gray fw5">合计</text>
            ¥
            <text class="text-40">{{money}}</text>
          </view>
        </block>
      </block>
      <block wx:if="{{deliveryType==0}}">
        <view class="price fw6">
          <text class="gray fw5">合计</text>
          ¥
          <text class="text-40">{{money}}</text>
        </view>
      </block>
    </view>
  </view>
  <view style="height:188rpx"></view>
</view>
<discoupon-goods show="{{showCoupon}}" only="{{false}}" couponData="{{couponData}}" bindclick="confirmCoupon"></discoupon-goods>
<block>
  <goods-action bindready="goodsActionReady" custom>
    <view class="goods-action">
      <view wx:if="{{deliveryType==1}}" class="total">
        共{{goodsList.goodsNumber}}件,合计:
        <block wx:if="{{goodsList.paymentType==1}}">
          <view class="price">
            <text class="unit">¥</text>
            {{money||0}}
          </view>
        </block>
        <block wx:else>
          <view class="priceType">
            <text class="fw6">定金¥</text>
            <text class="text-40">{{depositPrice}}</text>
            <view class="gray">待支付尾款¥{{retainagePrice}}</view>
          </view>
        </block>
      </view>
      <view wx:if="{{deliveryType==0}}" class="total">
        共{{goodsNumber}}件,合计:
        <view style="margin-left:0" class="price">
          <text class="unit">¥</text>
          {{money||0}}
        </view>
      </view>
      <view class="btn text-center" bindtap="checkOut">结算({{deliveryType==1?goodsList.goodsNumber||0:goodsNumber}})</view>
    </view>
  </goods-action>
</block>
<discovery-sku show="{{showSku}}" specificationDetailList="{{goodsList[currentIndex]}}" showName="showSku" skuData="{{goodsInfo}}"></discovery-sku>
<!-- 支付成功 -->
<view wx:if="{{showSuccessModal}}" class="modal-container flex_ccc">
  <view class="modal-body">
    <glsx-image webp src="equity/return_success.png?v={{img_version}}" class="icon"></glsx-image>
    <view class="text">支付成功</view>
    <view class="btn flex_ccc" catch:tap="closeSuccessModal">我知道了</view>
  </view>
</view>
<popup show="{{isConcat}}" only="{{only}}" bindconfirm="confirm" confirmText="立即支付" height="35%">
  <view class="concat-wrap">
    <view class="cell">
      <view class="label">姓名</view>
      <input class="weui-input" name="input" placeholder="请填写您的姓名" value="{{contactInfo.contactName}}" bindinput="getConcatInfo" data-index="0" />
    </view>
    <view class="cell">
      <view class="label">电话</view>
      <input class="weui-input" name="input" maxlength='11' type="number" placeholder="请填写您的联系方式" value="{{contactInfo.contactPhone}}" bindinput="getConcatInfo" data-index="1" />
    </view>
  </view>
</popup>