...
|
...
|
@@ -502,7 +502,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
return co(function * () {
|
|
|
let result = yield Promise.props({
|
|
|
orders: that.getOrders(uid, page, limit, type, true),
|
|
|
cancelReason: new OrderApi(that.ctx).closeReasons().then(res => _.get(res, 'data', ''))
|
|
|
cancelReason: new OrderApi(that.ctx).closeReasons(uid).then(res => _.get(res, 'data', ''))
|
|
|
});
|
|
|
|
|
|
result.pager = pager(_.get(result, 'orders.pager.total', 0), {page, limit, type});
|
...
|
...
|
@@ -937,8 +937,8 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
}
|
|
|
|
|
|
|
|
|
closeReason() {
|
|
|
return new OrderApi(this.ctx).closeReasons().then((result) => {
|
|
|
closeReason(uid) {
|
|
|
return new OrderApi(this.ctx).closeReasons(uid).then((result) => {
|
|
|
return _.get(result, 'data', []);
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -955,7 +955,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
return co(function * () {
|
|
|
let apiData = yield Promise.props({
|
|
|
detailData: that._getOrderDetail(uid, orderId),
|
|
|
reason: that.closeReason()
|
|
|
reason: that.closeReason(uid)
|
|
|
});
|
|
|
|
|
|
if (apiData.detailData.code === 400) {
|
...
|
...
|
|