Authored by 李奇

fixed: 不能取消订单

... ... @@ -82,8 +82,9 @@ const order = {
const orderCode = req.body.orderCode;
const reasonId = req.body.reasonId;
const reason = req.body.reason;
const uid = req.user.uid;
orderModel.cancelOrder(orderCode, reasonId, reason).then(result => {
orderModel.cancelOrder(uid, orderCode, reasonId, reason).then(result => {
return res.json(result);
}).catch(next);
},
... ...
... ... @@ -47,9 +47,10 @@ exports.getOrderDetail = (uid, orderCode) => {
* @param reason 原因描述
* @returns {Promise.<T>|*}
*/
exports.cancelOrder = (orderCode, reasonId, reason) => {
exports.cancelOrder = (uid, orderCode, reasonId, reason) => {
return api.post('', {
method: 'app.SpaceOrders.close',
uid,
order_code: orderCode,
reason_id: reasonId,
reason: reason ? reason : ''
... ...
... ... @@ -10,7 +10,7 @@
import $ from 'jquery';
import yoho from 'yoho';
import tip from 'common/tip';
export default {
data() {
return {
... ...
... ... @@ -53,7 +53,7 @@
<button @click="readdOrder(order)" class="normal">再次购买</button>
</template>
<template v-else>
<button v-if="order.status == 0" @click="cancelOrder()">取消订单</button>
<button v-if="order.status == 0" @click="cancelOrder">取消订单</button>
<button v-if="order.status == 0 " class="countdown" @click="goBuy(order)">去支付 <span class="count-down" v-count-down="{leftTime: order.pay_lefttime, callback: autoCancel()}"></span></button>
<a v-if="order.status == 4 || order.status == 5 || order.status == 6" :href="`/me/logistic?order_code=${order.order_code}`">查看物流</a>
<button v-if="order.status == 4 || order.status == 5 " class="black" @click="confirmGoods(order.order_code)">确认收货</button>
... ...