ensure.wxml 5.66 KB
<wxs src="../../../wxs/helper.wxs" module="helper" />

<view class="container">
    <view wx:if="{{choosedAddress}}" class="address" bindtap="chooseAddress">
        <text class="iconfont icon-location"></text>
        <view class="consignee">
            <text class="name">{{choosedAddress.consignee}}</text>
            <text class="phone">{{choosedAddress.mobile}}</text>
            <text class="direction">{{choosedAddress.area}} {{choosedAddress.address}}</text>
        </view>
        <text class="iconfont icon-right"></text>
    </view>
    <view wx:else class="address address-empty">
        <view class="add-address" bindtap="enterAddress">
            <text class="left-icon">+</text>
            <text class="text">手动新增收获地址</text>
            <text class="iconfont icon-right"></text>
        </view>
        <view class="add-address add-wechat-address" bindtap="chooseWechatAddress">
            <text class="iconfont icon-wechat left-icon"></text>
            <text class="text">一键获取微信地址</text>
            <text class="iconfont icon-right"></text>
        </view>
    </view>

    <view class="split-line"></view>
    <view class="goods-list" wx:for="{{goodsList}}" wx:key="unique">
        <view class="goods-item">
            <image class="thumb" src="{{helper.image(item.goods_images, 76, 100)}}"></image>
            <view class="goods-type price-gift-tag" wx:if="{{item.goods_type === 'price_gift'}}">
                <text>加价购</text>
            </view>
            <view class="goods-type gift-tag" wx:if="{{item.goods_type === 'gift'}}">
                <text>赠品</text>
            </view>
            <view class="name-price">
                <text class="name item-left">{{item.product_name}}</text>
                <text class="price item-right red">¥ {{helper.round(item.sales_price)}}</text>
            </view>
            <view class="color-size-num">
                <text class="color-size item-left">颜色:{{item.factory_goods_name}}  尺码:{{item.size_name}}</text>
                <text class="num item-right">x {{item.buy_number}}</text>
            </view>
            <block wx:for="{{item.tags}}" wx:key="unique">
                <view class="warn-tip red" wx:if="{{item === 'LRE'}}">
                    <text class="iconfont icon-warn-fill"></text>
                    <text class="tip">不支持7天无理由退换</text>
                </view>
                <view class="warn-tip red" wx:if="{{item === 'L15DE'}}">
                    <text class="iconfont icon-warn-fill"></text>
                    <text class="tip">不支持15天无理由换货</text>
                </view>
            </block>
        </view>
    </view>
    <view class="split-line"></view>
    <view class="choose-wrap">
        <view class="choose-item delivery-way">
            配送方式
            <view class="change-btn" bindtap="toggleDeliveryWayList">
                <text class="btn-text">{{deliveryWayText}}</text>
                <text class="iconfont {{deliveryWayEditStatus ? 'icon-top' : 'icon-bottom'}}"></text>
            </view>
        </view>
        <view wx:if="{{deliveryWayEditStatus}}" class="edit-wrap delivery-way-wrap">
            <view wx:for="{{deliveryWayList}}" wx:key="{{index}}" class="edit-item delivery-way-item" data-id="{{item.delivery_way_id}}" data-name="{{item.delivery_way_name}}:运费¥{{item.delivery_way_cost}}" bindtap="changeDeliveryWay">
                <text class="left-name">{{item.delivery_way_name}}: 运费¥{{item.delivery_way_cost}}</text>
                <text class="iconfont {{item.checked ? 'icon-round-checked' : 'icon-round'}}"></text>
            </view>
        </view>
        <view class="choose-item delivery-time">
            送货时间
            <view class="change-btn" bindtap="toggleDeliveryTimeList">
                <text class="btn-text">{{deliveryTimeText}}</text>
                <text class="iconfont {{deliveryTimeEditStatus ? 'icon-top' : 'icon-bottom'}}"></text>
            </view>
        </view>
        <view wx:if="{{deliveryTimeEditStatus}}" class="edit-wrap delivery-way-wrap">
            <view wx:for="{{deliveryTimeList}}" wx:key="unique" class="edit-item delivery-way-item" data-id="{{item.delivery_time_id}}" data-name="{{item.delivery_time_string}}" bindtap="changeDeliveryTime">
                <text class="left-name">{{item.delivery_time_string}}</text>
                <text class="iconfont {{item.checked ? 'icon-round-checked' : 'icon-round'}}"></text>
            </view>
        </view>
        <view class="choose-item invoice">
            发票
            <switch checked="{{invoiceNeedStatus}}" class="switch" bindchange="toggleInvoiceWrap"/>
        </view>
        <view wx:if="{{invoiceNeedStatus}}" class="choose-item invoice">
            发票信息
            <view class="change-btn" bindtap="changeInvoiceInfo">
                <text class="btn-text">{{invoiceInfo.invoiceType === 2 ? '电子发票' : '纸质发票'}} - {{invoiceInfo.invoiceTitleShow}}</text>
                <text class="iconfont icon-right"></text>
            </view>
        </view>
    </view>
    <view class="split-line"></view>
    <view class="payment-wrap">
        <view wx:for="{{promotionList}}" wx:key="unique" class="payment-cell">
            <text class="name">{{item.promotion}}</text>
            <text class="price">{{item.promotion_amount}}</text>
        </view>

        <view class="payment-cell">
            <text class="name">实付金额</text>
            <text class="price red">¥{{helper.round(paymentAmount)}}</text>
        </view>
    </view>
    <view class="submit-wrap">
        <button bindtap="submitOrder" class="submit-btn">使用微信安全支付</button>
    </view>
</view>