|
@@ -6,7 +6,7 @@ const { shared, Easing, timing } = wx.worklet
|
|
|
const offset = shared(0);
|
|
const offset = shared(0);
|
|
|
|
|
|
|
|
// pages/home/home.ts
|
|
// pages/home/home.ts
|
|
|
-import { getPatients, healthReportMethod, healthIndexMethod, getSolarTerms, getShortScienceList } from "./request";
|
|
|
|
|
|
|
+import { getPatients, healthReportMethod, healthIndexMethod, getSolarTerms, getShortScienceList, getPatientDescription } from "./request";
|
|
|
import { toCertificationPage } from "./router";
|
|
import { toCertificationPage } from "./router";
|
|
|
import { useLocation } from "../../lib/use/use-location";
|
|
import { useLocation } from "../../lib/use/use-location";
|
|
|
|
|
|
|
@@ -38,12 +38,13 @@ Page({
|
|
|
},
|
|
},
|
|
|
onShareTimeline() {
|
|
onShareTimeline() {
|
|
|
return {
|
|
return {
|
|
|
- title: `健康为基,从容赏生活之美`,
|
|
|
|
|
|
|
+ title: `健康为基,从容赏生活之美`,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data: {
|
|
data: {
|
|
|
patients: [] as (App.Patient.Model & { isDefault: 'Y' | 'N' })[],
|
|
patients: [] as (App.Patient.Model & { isDefault: 'Y' | 'N' })[],
|
|
|
patient: null as App.Patient.Model | null,
|
|
patient: null as App.Patient.Model | null,
|
|
|
|
|
+ patientDescription: '',
|
|
|
|
|
|
|
|
healthId: '',
|
|
healthId: '',
|
|
|
healthReport: { data: null, message: '' },
|
|
healthReport: { data: null, message: '' },
|
|
@@ -262,12 +263,14 @@ Page({
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- observerPatient(model: { patientId: string, sex: 0 | 1 }) {
|
|
|
|
|
|
|
+ observerPatient(model: { patientId: string, sex: '0' | '1' }) {
|
|
|
wx.setStorageSync('patientId', model.patientId);
|
|
wx.setStorageSync('patientId', model.patientId);
|
|
|
this._getHealthReport();
|
|
this._getHealthReport();
|
|
|
this._getAbnormalHealthIndex();
|
|
this._getAbnormalHealthIndex();
|
|
|
const patientIcon = { 0: 'gender-male', 1: 'gender-female' }[model.sex];
|
|
const patientIcon = { 0: 'gender-male', 1: 'gender-female' }[model.sex];
|
|
|
const patientIconColor = { 0: '#0f40f5', 1: '#E560B3' }[model.sex];
|
|
const patientIconColor = { 0: '#0f40f5', 1: '#E560B3' }[model.sex];
|
|
|
this.setData({ patientIcon, patientIconColor })
|
|
this.setData({ patientIcon, patientIconColor })
|
|
|
|
|
+
|
|
|
|
|
+ getPatientDescription(model).then((patientDescription) => { this.setData({ patientDescription }) })
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|