order-detail.wxml 5.2 KB
<!--pages/order/order-detail/order-detail.wxml-->
<view class="content">
    <view class="state-box">

        <view class="line"></view>
        <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
        <!--sonType=1发布人,2拼餐/拼活动人-->
        <view class="state1">
            <view class="circle change"></view>
            <text wx:if="{{detail.sonType === 1}}">已发布</text>
            <text wx:if="{{detail.sonType === 2}}">已加入</text>
        </view>
        <view class="state2">
            <!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}-->
            <view class="circle change"></view>
            <text wx:if="{{detail.status === 5 || detail.status === 10}}">已取消</text>
            <text wx:if="{{detail.status === 11}}">已过期</text>
            <text wx:if="{{detail.status === 4 || detail.status === 6 || detail.status === 7 || detail.status === 8}}">已拼成</text>
            <text wx:if="{{detail.status === 2}}" class="{{detail.status === 2?'change-text':''}}">待拼成</text>
            <text wx:if="{{detail.status === 3}}" class="{{detail.status === 3?'change-text':''}}">未拼成</text>
        </view>
        <view class="state3">
            <view class="circle {{detail.status === 6?'change':''}}"></view>
            <text wx:if="{{detail.status === 6}}">已完成</text>
            <text wx:if="{{detail.status === 4 || detail.status === 2 || detail.status === 3||detail.status === 5|| detail.status === 8 || detail.status === 10|| detail.status === 11}}" class="{{detail.status === 4 || detail.status === 2 ||detail.status === 5?'change-text':''}}">待完成</text>
        </view>
    </view>

    <view class="box"  bindtap="goDetail">
        <view class="top">
            <!--<image src="../../../images/avatar@2x.png"></image>-->
            <image src="{{detail.userPic}}" class="user-avatar"></image>
            <image src="{{detail.userSex === 1?'../../../images/man.png':'../../../images/women.png'}}" class="sex-icon"></image>
            <text class="name">{{detail.userName}}</text>
        </view>
        <view class="order-info">
            <image src="{{detail.pic}}" class="banner" mode="aspectFill"></image>
            <view class="info-right">
                <text class="address">{{detail.title}}</text>
                <text class="time">{{detail.time}}</text>
            </view>
        </view>
    </view>


    <view class="complain" catchtap="goComplain"><text>去投诉</text></view>

    <view class="order-detail">
        <text>订单编号:{{detail.order_sn}}</text>
        <text>交易时间:{{detail.create_time}}</text>
    </view>

    <view class="bottom">
        <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除,10已取消(已拼成取消),11已过期-->
        <text class="cancel-btn light" wx:if="{{detail.status === 2}}" bindtap="cancel">取消订单</text>
        <text class="cancel-btn gray" wx:if="{{detail.status === 2}}">待拼成</text>
        <!--<text class="cancel-btn gray" wx:if="{{detail.status === 8}}">已拼成</text>-->
        <!--sonType=1发布人,2拼餐/拼活动人-->
        <block wx:if="{{detail.sonType === 1}}">
            <!--is_canCancel=1 是可以点-->
            <text class="cancel-btn light" wx:if="{{detail.is_canCancel ===1 && (detail.status === 4 || detail.status === 3 || detail.status === 8)}}" bindtap="cancel">取消订单</text><!--发布人在截止时间以后不能取消-->
            <text class="cancel-btn gray" wx:if="{{detail.status === 8}}">待完成</text>
            <text class="cancel-btn gray" wx:if="{{detail.status === 3}}">未拼成</text>
            <block wx:if="{{detail.is_canCheck === 1}}">
                <!--1是可以点-->
                <text class="confirm-btn light add-width" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text><!--待完成时并且活动时间已开始,发布人可点击完成-->
            </block>
            <block wx:if="{{detail.is_canCheck === 2}}">
                <!--2是不可以点,且灰色-->
                <text class="confirm-btn gray {{detail.is_canCancel ===1?'':'add-width'}}" wx:if="{{detail.status === 4}}" bindtap="">待完成</text><!--待完成时并且活动时间已开始,发布人可点击完成-->
            </block>
            <text class="confirm-btn add-width gray" wx:if="{{detail.status === 6}}">已完成</text>
        </block>
        <block wx:if="{{detail.sonType === 2}}">
            <!--<text class="cancel-btn gray border" wx:if="{{detail.status === 8}}">取消订单</text>-->
            <text class="cancel-btn gray add-width" wx:if="{{detail.status === 8}}">待完成</text>
            <text class="confirm-btn gray add-width" wx:if="{{detail.status === 3}}">未拼成</text>
            <text class="confirm-btn gray add-width" wx:if="{{detail.status === 4}}">待完成</text>
            <text class="confirm-btn add-width gray" wx:if="{{detail.status === 6}}">已完成</text>
        </block>
    </view>
</view>