diff --git a/src/doc/purchase.js b/src/doc/purchase.js index 8d7b2682e..12a06f0cb 100644 --- a/src/doc/purchase.js +++ b/src/doc/purchase.js @@ -31,6 +31,7 @@ export const ACTIVITY_ITEM = { id: 'id', name: 'name', pic: 'pic', + list_pic: 'list_pic', pages_template_id: 'pages_template_id', role: ({ is_employee, is_relative }) => { if (is_employee == 1) { diff --git a/src/hooks/usePayment.js b/src/hooks/usePayment.js index 822507385..2ff3bfd99 100644 --- a/src/hooks/usePayment.js +++ b/src/hooks/usePayment.js @@ -300,13 +300,19 @@ export default (props = {}) => { query['pay_channel'] = pay_channel } - const { payment } = await api.cashier.getPayment(query) + const res = await api.cashier.getPayment(query) + if (res.pay_status) { + paySuccess(params, orderInfo) + return + } + const payment = res.payment + if (!payment) { + payError(orderInfo) + return + } const el = document.createElement('div') el.setAttribute('class', 'alipay_submit_div') - //el.innerHTML='
' - el.innerHTML = payment - // .replace(/