|
@@ -24,6 +24,8 @@ import {
|
|
|
getPatientDescription,
|
|
getPatientDescription,
|
|
|
getNotDealLists,
|
|
getNotDealLists,
|
|
|
getCareList,
|
|
getCareList,
|
|
|
|
|
+ getChronicDiseaseManageName,
|
|
|
|
|
+ getChronicDiseaseManageUrl,
|
|
|
} from "./request";
|
|
} from "./request";
|
|
|
import { toCertificationPage, toChats } from "./router";
|
|
import { toCertificationPage, toChats } from "./router";
|
|
|
import { Post } from "../../lib/request/method";
|
|
import { Post } from "../../lib/request/method";
|
|
@@ -41,6 +43,7 @@ Page({
|
|
|
NoteTitle: "",
|
|
NoteTitle: "",
|
|
|
isShowComplete: true,
|
|
isShowComplete: true,
|
|
|
careList: [],
|
|
careList: [],
|
|
|
|
|
+ chronicDiseaseName: "",
|
|
|
displayList: [] as {
|
|
displayList: [] as {
|
|
|
id: number;
|
|
id: number;
|
|
|
conditioningProgramType: string;
|
|
conditioningProgramType: string;
|
|
@@ -460,6 +463,14 @@ Page({
|
|
|
}
|
|
}
|
|
|
// 加载健康宣教的文章
|
|
// 加载健康宣教的文章
|
|
|
this.loadScienceList(true);
|
|
this.loadScienceList(true);
|
|
|
|
|
+ //获取慢病管理按钮名称:为空则不显示按钮,非空则作为按钮文案
|
|
|
|
|
+ getChronicDiseaseManageName()
|
|
|
|
|
+ .then((name) => {
|
|
|
|
|
+ this.setData({ chronicDiseaseName: name });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error) => {
|
|
|
|
|
+ wx.showToast({ title: error.message || "加载失败" });
|
|
|
|
|
+ });
|
|
|
if (!this.data._loaded) {
|
|
if (!this.data._loaded) {
|
|
|
getSolarTerms()
|
|
getSolarTerms()
|
|
|
.then((solarTerms) => {
|
|
.then((solarTerms) => {
|
|
@@ -691,6 +702,38 @@ Page({
|
|
|
toSciencePage() {
|
|
toSciencePage() {
|
|
|
wx.navigateTo({ url: `/module/article/pages/science-list/science-list` });
|
|
wx.navigateTo({ url: `/module/article/pages/science-list/science-list` });
|
|
|
},
|
|
},
|
|
|
|
|
+ //获取跳转慢病管理链接
|
|
|
|
|
+ async goChronicDisease() {
|
|
|
|
|
+ // 校验登录态:未登录(无 patientId)则提示并跳转登录页
|
|
|
|
|
+ if (!this.data.patient?.patientId) {
|
|
|
|
|
+ wx.showToast({ title: "请先登录", icon: "none" });
|
|
|
|
|
+ toCertificationPage();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ wx.showLoading({ title: "加载中" });
|
|
|
|
|
+ let url = "";
|
|
|
|
|
+ try {
|
|
|
|
|
+ url = await getChronicDiseaseManageUrl();
|
|
|
|
|
+ } catch (error: any) {
|
|
|
|
|
+ wx.hideLoading();
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ title: error?.errMsg || "加载失败",
|
|
|
|
|
+ icon: "none",
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ wx.hideLoading();
|
|
|
|
|
+ if (!url) {
|
|
|
|
|
+ wx.showToast({ title: "暂无链接", icon: "none" });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ wx.navigateTo({
|
|
|
|
|
+ url: "/module/article/pages/science-info/science-info",
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ res.eventChannel?.emit?.("load", { title: this.data.chronicDiseaseName, url });
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
async toReportPage() {
|
|
async toReportPage() {
|
|
|
// const { patient } = await getPatients(/*this.data.patientId*/);
|
|
// const { patient } = await getPatients(/*this.data.patientId*/);
|
|
|
if (!this.data.patient) await toCertificationPage();
|
|
if (!this.data.patient) await toCertificationPage();
|