Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into zmr
This commit is contained in:
@@ -23,9 +23,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
|
||||
<view class="logistics" v-if="order.order_state == 30">确认收货</view>
|
||||
<view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view>
|
||||
<view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view>
|
||||
<view class="calcel" v-if="order.order_state == 10">取消支付</view>
|
||||
<view class="calcel" v-if="order.order_state == 10" @click="cancelOrder">取消支付</view>
|
||||
<view class="payment" v-if="order.order_state == 10">立即支付</view>
|
||||
<view class="service" v-if="order.order_state == 20">联系官方客服</view>
|
||||
<view class="submit" v-if="order.order_state == 20">提交官方审核</view>
|
||||
@@ -36,7 +37,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付
|
||||
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付, 7: 售后
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -69,8 +70,23 @@ export default {
|
||||
break;
|
||||
}
|
||||
if(this.order.refund_state) state = '已退款';
|
||||
// 申请退款
|
||||
if(this.order.refund_data) {
|
||||
if([1, 2].indexOf(this.order.refund_data.refund_state) >= 0) state = '待退款';
|
||||
if(this.order.refund_data.refund_state == 3) state = '已退款';
|
||||
}
|
||||
|
||||
this.state = state;
|
||||
},
|
||||
cancelOrder() {
|
||||
this.$u.api.cancelOrder({
|
||||
order_id: this.order.order_id,
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$emit("refreshOrderList", { reload: 'again' });
|
||||
}
|
||||
})
|
||||
},
|
||||
toOtherPage(url) {
|
||||
this.$u.route('/pageE/order/' + url, {
|
||||
oid: this.order.order_id,
|
||||
|
||||
Reference in New Issue
Block a user