...
|
...
|
@@ -90,14 +90,12 @@ const Payment = { |
|
|
beforePay(user, order, method, bankCode) {
|
|
|
return Promise.all([
|
|
|
OrderData.updateOrderPayment(order.order_code, method, user.uid),
|
|
|
PayData.savePrePayInfo(order.order_code, method, user.uid),
|
|
|
PayData.getBankByOrder(order.order_code)
|
|
|
]).then(result => {
|
|
|
let paymentRecord = result[0];
|
|
|
let prePayResult = result[1];
|
|
|
let bankRecord = result[2];
|
|
|
let bankRecord = result[1];
|
|
|
|
|
|
if (!paymentRecord || paymentRecord.code !== 200 || !prePayResult || prePayResult.code !== 200) {
|
|
|
if (!paymentRecord || paymentRecord.code !== 200) {
|
|
|
let message = paymentRecord && paymentRecord.message ? paymentRecord.message : '系统繁忙,请稍后再试';
|
|
|
|
|
|
return {code: 400, message: message};
|
...
|
...
|
|