|
|
@@ -27,11 +27,16 @@ Page({
|
|
|
try {
|
|
|
wx.showLoading({ title: "加载中" });
|
|
|
const { patient } = await getPatients();
|
|
|
- const { phone } = await getPatientPhone();
|
|
|
+ const res = await getPatientPhone();
|
|
|
+ console.log(res, "获取手机号");
|
|
|
+ if (res && res.phone) {
|
|
|
+ this.setData({
|
|
|
+ phone: res.phone
|
|
|
+ });
|
|
|
+ }
|
|
|
wx.setStorageSync("patientName", patient?.name);
|
|
|
this.setData({
|
|
|
patient: patient || null,
|
|
|
- phone
|
|
|
});
|
|
|
} catch (error) {
|
|
|
console.error('加载失败:', error);
|
|
|
@@ -73,11 +78,11 @@ Page({
|
|
|
},
|
|
|
|
|
|
onLoad() {
|
|
|
- this.load();
|
|
|
+ // this.load();
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
// 如果需要每次显示页面时刷新数据,可以在这里调用 load
|
|
|
- // this.load();
|
|
|
+ this.load();
|
|
|
},
|
|
|
});
|