|
@@ -1,5 +1,4 @@
|
|
|
import { createSubscribe } from "applet-page-component";
|
|
|
-import { getAuthUser } from "../../../../core/utils/jsapi";
|
|
|
import {
|
|
|
getTestTimeList,
|
|
|
getQuestionnaire,
|
|
@@ -10,7 +9,7 @@ import { getPatientList } from "../edit-patient/service";
|
|
|
import history from "../../utils/history";
|
|
|
import { tradePay } from "../../utils/tradePay";
|
|
|
import { reportCmPV_YL } from "../../utils/cloudMonitorHelper";
|
|
|
-import { submitAuthCode } from "../../../../core/utils/ywtService";
|
|
|
+import { getSubscribeAuth } from "../../../../core/utils/ywtService";
|
|
|
const deptCodeMap = {
|
|
|
黄石总院: 500,
|
|
|
沙河分院: 499,
|
|
@@ -108,7 +107,6 @@ Component(
|
|
|
const { questionList: formList } = await getQuestionnaire({
|
|
|
hospitalDistrictId,
|
|
|
});
|
|
|
- console.log("query", query);
|
|
|
my.showLoading();
|
|
|
const projects = await getItemList({
|
|
|
hospitalDistrictId,
|
|
@@ -297,26 +295,8 @@ Component(
|
|
|
doctorCode,
|
|
|
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: "消息订阅成功",
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ // 获取智能消息推送授权
|
|
|
+ await getSubscribeAuth();
|
|
|
if (res.amount && onlinePay) {
|
|
|
// const orderRes = await tradeNoQuery({
|
|
|
// type: 1,
|
|
@@ -353,26 +333,6 @@ Component(
|
|
|
}
|
|
|
)
|
|
|
.then(async () => {
|
|
|
- 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({
|
|
|
query: {
|
|
|
hospitalDistrictId,
|