|
@@ -31,23 +31,27 @@ Component({
|
|
|
|
|
|
async handlePrePayConfirm() {
|
|
|
my.showLoading({ mask: true });
|
|
|
- const { hisOrderNo: hisOrdNum, hisPatientId: patientId, hisClinicCode: clinicCode, authCode, total: orderSum, orderInsType } = this.$page.data.query
|
|
|
- const [err, result] = await prePayConfirm({
|
|
|
- patientId,
|
|
|
- clinicCode,
|
|
|
- hisOrdNum,
|
|
|
- orderSum,
|
|
|
- payInsType: '2',
|
|
|
- orderInsType,
|
|
|
- authCode,
|
|
|
- })
|
|
|
- if (!err) {
|
|
|
- // 预结算成功
|
|
|
- this.setData({
|
|
|
- }, () => {
|
|
|
- my.hideLoading()
|
|
|
- });
|
|
|
- } else {
|
|
|
+ try {
|
|
|
+ const { hisOrderNo: hisOrdNum, hisPatientId: patientId, hisClinicCode: clinicCode, authCode, total: orderSum, orderInsType } = this.$page.data.query
|
|
|
+ const [err, result] = await prePayConfirm({
|
|
|
+ patientId,
|
|
|
+ clinicCode,
|
|
|
+ hisOrdNum,
|
|
|
+ orderSum,
|
|
|
+ payInsType: '2',
|
|
|
+ orderInsType,
|
|
|
+ authCode,
|
|
|
+ })
|
|
|
+ if (!err) {
|
|
|
+ // 预结算成功
|
|
|
+ this.setData({
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ throw `${err}`
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.log('error ===>', error)
|
|
|
+ } finally {
|
|
|
my.hideLoading()
|
|
|
}
|
|
|
},
|