...
|
...
|
@@ -2,6 +2,7 @@ |
|
|
* @author: weiqingting<qingting.wei@yoho.cn>
|
|
|
*/
|
|
|
'use strict';
|
|
|
const moment = require('moment');
|
|
|
|
|
|
module.exports = class extends global.yoho.BaseModel {
|
|
|
constructor(ctx) {
|
...
|
...
|
@@ -41,7 +42,23 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
order_code: orderCode
|
|
|
};
|
|
|
|
|
|
return this.get({data: options});
|
|
|
return this.get({data: options}).then(result => {
|
|
|
if (result.code === 200 && result.data) {
|
|
|
if (result.data.pay_lefttime) {
|
|
|
result.data.pay_lefttime = +result.data.pay_lefttime - 3600;
|
|
|
|
|
|
if (result.data.pay_lefttime < 0) {
|
|
|
result.data.pay_lefttime = 0;
|
|
|
}
|
|
|
}
|
|
|
if (result.data.pay_expire) {
|
|
|
result.data.pay_expire = moment(result.data.pay_expire)
|
|
|
.subtract(1, 'hour')
|
|
|
.format('YYYY-MM-DD HH:mm:ss');
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|