|
@@ -297,7 +297,26 @@ Component(
|
|
doctorCode,
|
|
doctorCode,
|
|
fee,
|
|
fee,
|
|
}); // 区分支持线上支付 和 不支持线上支付
|
|
}); // 区分支持线上支付 和 不支持线上支付
|
|
-
|
|
|
|
|
|
+ const [err, authResult] = await getAuthUser([
|
|
|
|
+ "auth_user",
|
|
|
|
+ "hospital_order",
|
|
|
|
+ ]);
|
|
|
|
+ if (err) {
|
|
|
|
+ my.showToast({
|
|
|
|
+ type: "fail",
|
|
|
|
+ content: "智能消息推送授权失败",
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ const [error, result] = await submitAuthCode({
|
|
|
|
+ authCode: authResult.authCode,
|
|
|
|
+ });
|
|
|
|
+ if (!error) {
|
|
|
|
+ my.showToast({
|
|
|
|
+ type: "success",
|
|
|
|
+ content: "消息订阅成功",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (res.amount && onlinePay) {
|
|
if (res.amount && onlinePay) {
|
|
// const orderRes = await tradeNoQuery({
|
|
// const orderRes = await tradeNoQuery({
|
|
// type: 1,
|
|
// type: 1,
|
|
@@ -370,26 +389,6 @@ Component(
|
|
});
|
|
});
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- const [err, authResult] = await getAuthUser([
|
|
|
|
- "auth_user",
|
|
|
|
- "hospital_order",
|
|
|
|
- ]);
|
|
|
|
- if (err) {
|
|
|
|
- my.showToast({
|
|
|
|
- type: "fail",
|
|
|
|
- content: "智能消息推送授权失败",
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- const [error, result] = await submitAuthCode({
|
|
|
|
- authCode: authResult.authCode,
|
|
|
|
- });
|
|
|
|
- if (!error) {
|
|
|
|
- my.showToast({
|
|
|
|
- type: "success",
|
|
|
|
- content: "消息订阅成功",
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
history.replace({
|
|
history.replace({
|
|
query: {
|
|
query: {
|
|
hospitalDistrictId,
|
|
hospitalDistrictId,
|