order-detail.wxml 2.1 KB
<!--pages/order/order-detail/order-detail.wxml-->
<view class="content">
    <view class="complain" catchtap="goComplain"><text>去投诉</text></view>

    <view class="state-box">

        <view class="line"></view>
        <!--(0全部,2待处理,4已拼成,5已取消,6已完成)-->
        <view class="state1">
            <view class="circle change"></view>
            <text>已拍下</text>
        </view>
        <view class="state2">
            <view class="circle {{detail.status === 4 ||detail.status === 5 ?'change':''}}"></view>
            <text wx:if="{{detail.status === 5}}">已取消</text>
            <text wx:if="{{detail.status === 4}}">已拼成</text>
            <text wx:if="{{detail.status === 2}}" class="{{detail.status === 2?'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 === 5}}" class="{{detail.status === 4 || detail.status === 2 ||detail.status === 5?'change-text':''}}">待完成</text>
        </view>
    </view>

    <view class="order-info">
        <view class="top">
            <!--<image src="../../../images/avatar@2x.png"></image>-->
            <image src="{{detail.userPic}}"></image>
            <text class="name">{{detail.userName}}</text>
        </view>
        <text class="address">{{detail.title}}</text>
        <text class="time">{{detail.time}}</text>
    </view>


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

    <view class="bottom">
        <text class="cancel-btn" wx:if="{{detail.status === 4 || detail.status === 2}}" bindtap="cancel">取消订单</text>
        <text class="cancel-btn" wx:if="{{detail.status === 2}}">待拼成</text>
        <text class="confirm-btn" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text>
    </view>
</view>