Sfoglia il codice sorgente

fix: 添加页面loading

carver 1 anno fa
parent
commit
6e63b60895

+ 4 - 2
antbuilder/industry/hospitalV2/components/hospital-payment-detail-yibao/index.js

@@ -80,6 +80,7 @@ Component(
 			},
 
 			async requestGetPayAuthInfo(authCode, callUrl, reqBizNo, lifeType) {
+				my.showLoading({ mask: true });
 				const _this = this;
 				const [err, result] = await getPayAuthInfo({
 					authCode,
@@ -87,6 +88,7 @@ Component(
 					reqBizNo,
 				});
 				if (!err) {
+					my.hideLoading();
 					const { payAuthNo, authNo, medicalCardInstId, medicalCardId } =
 						result;
 					if (result.authNo) {
@@ -118,10 +120,10 @@ Component(
 					}
 				} else {
 					console.log("err ==>", err);
-					return;
+					my.hideLoading();
 					my.showToast({
 						type: "fail",
-						content: "商户未上线",
+						content: err.info || "未知错误",
 						duration: 2000,
 						complete() {
 							my.navigateBack();