소스 검색

fix: 优化授权函数引入

carver 2 년 전
부모
커밋
8f17988724
1개의 변경된 파일9개의 추가작업 그리고 6개의 파일을 삭제
  1. 9 6
      antbuilder/industry/hospitalV2/components/pay-result/index.js

+ 9 - 6
antbuilder/industry/hospitalV2/components/pay-result/index.js

@@ -1,5 +1,6 @@
 import { getDepositDetails, getsubscribeID } from "./service";
 import { reportApi } from "../../utils/cloudMonitorHelper";
+import { getAuthUser } from "../../../../core/utils/jsapi";
 Component({
 	data: {
 		showSubscrible: true,
@@ -61,12 +62,14 @@ Component({
 
 		async gotoSubscrible() {
 			try {
-				my.getAuthCode({
-					scopes: ["auth_user", "hospital_order"],
-					success: (res) => {
-						console.log("authCode ===>", res.authCode);
-					},
-				});
+				// my.getAuthCode({
+				// 	scopes: ["auth_user", "hospital_order"],
+				// 	success: (res) => {
+				// 		console.log("authCode ===>", res.authCode);
+				// 	},
+				// });
+				const authResult = await getAuthUser(["auth_user", "hospital_order"]);
+				console.log("authResult ===>", authResult);
 				const subscribeID = await getsubscribeID();
 				await this.requestSubscribeMessageFn(subscribeID.depositTemplateId);
 			} catch (error) {