...
|
...
|
@@ -32,16 +32,16 @@ |
|
|
<div class="order-option">
|
|
|
<div class="goods-total">合计 <b>¥{{order.amount}}</b></div>
|
|
|
<div class="options">
|
|
|
<button v-if="order.isCancel === 'Y'" @click="deleteOrder(order,index)" class="normal">删除订单</button>
|
|
|
<button v-if="order.isCancel === 'Y'" @click="deleteOrder(order, index)" class="normal">删除订单</button>
|
|
|
<template v-else>
|
|
|
<button v-if="order.status == 0" @click="cancelOrder(order.orderCode)" class="leftpad">取消订单</button>
|
|
|
<button v-if="order.status == 0 " class="countdown" @click="goBuy(order)">去支付
|
|
|
<span v-count-down :left-time="order.payLefttime" :callback="autoCancel(order.orderCode)"></span>
|
|
|
<span class="count-down" v-count-down :left-time="order.payLefttime" :callback="autoCancel(order)"></span>
|
|
|
</button>
|
|
|
<a v-if="order.status == 4 || order.status == 5 " class="leftpad"
|
|
|
href="/me/logistic?order_code={{order.orderCode}}">查看物流</a>
|
|
|
<button v-if="order.status == 4 || order.status == 5 " class="black" @click="confirmGoods(order.orderCode)">确认收货</button>
|
|
|
<button v-if="order.status == 6" @click="deleteOrder(order,index)" class="normal">删除订单</button>
|
|
|
<button v-if="order.status == 6" @click="deleteOrder(order, index)" class="normal">删除订单</button>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -177,28 +177,9 @@ |
|
|
tip('操作失败');
|
|
|
});
|
|
|
},
|
|
|
autoCancel(code) {
|
|
|
autoCancel(order) {
|
|
|
return () => {
|
|
|
let reasonId;
|
|
|
let reason;
|
|
|
|
|
|
if (yoho.isiOS && this.options.length > 1) {
|
|
|
reasonId = this.options[1].id;
|
|
|
reason = this.options[1].reason;
|
|
|
} else if (this.options.length) {
|
|
|
reasonId = this.options[0].id;
|
|
|
reason = this.options[0].reason;
|
|
|
}
|
|
|
|
|
|
this.order().cancel({
|
|
|
orderCode: code,
|
|
|
reasonId: reasonId,
|
|
|
reason: reason
|
|
|
}, (result) => {
|
|
|
if (result.code === 200) {
|
|
|
this.reload();
|
|
|
}
|
|
|
});
|
|
|
order.isCancel = 'Y';
|
|
|
};
|
|
|
},
|
|
|
order() {
|
...
|
...
|
|