From 1ccebfe824df2fa6ac17784e23b2247f105e6d81 Mon Sep 17 00:00:00 2001
From: skjia <106962133@qq.com>
Date: Fri, 18 Jul 2025 15:55:30 +0800
Subject: [PATCH 1/2] =?UTF-8?q?jsk=20=20bug=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 pages/mine/me/healthInformation.vue | 53 +++++++++++++++++++++--------
 1 file changed, 39 insertions(+), 14 deletions(-)
diff --git a/pages/mine/me/healthInformation.vue b/pages/mine/me/healthInformation.vue
index 5009664..e5c4a1a 100644
--- a/pages/mine/me/healthInformation.vue
+++ b/pages/mine/me/healthInformation.vue
@@ -65,8 +65,19 @@
 			
 		  
 
-		  
+		  
+		  
+		  
+		  			
+		  			
 		  
 		  
 		  
@@ -135,8 +146,9 @@ export default {
         weightControl: { options: [{ name: '减重', value: '1' }, { name: '增重', value: '2' }], title: '请选择体重控制' },
         labourIntensity: { options: [{ name: '轻劳力', value: '1' }, { name: '中等强度劳动', value: '2' }, { name: '重强度劳动', value: '3' }], title: '请选择劳动强度' },
         ifHospitalized: { options: [{ name: '是', value: '1' }, { name: '否', value: '2' }], title: '是否住院' },
-		pregnantStatus: { options: [{ name: '保密', value: '0' },{ name: '是', value: '2' }, { name: '否', value: '1' }], title: '是否怀孕' }
-      },
+		pregnantStatus: { options: [{ name: '保密', value: '0' },{ name: '是', value: '2' }, { name: '否', value: '1' }], title: '是否怀孕' },
+		doctorAdvice: { options: [{ name: '禁食', value: '1' }, { name: '流食', value: '2' }, { name: '半流食', value: '3' }, { name: '治疗饮食', value: '4' }], title: '请选择医嘱' },
+	  },
       chronicDiseaseOptions: [
         { label: '糖尿病', value: 'diabetes' },
         { label: '肾结石', value: 'kidney_stone' },
@@ -148,15 +160,16 @@ export default {
         weight: { type: 'number', required: true, message: '请输入体重', trigger: ['blur', 'change'] },
         // labourIntensity: { type: 'string',required: true, message: '请选择劳动强度', trigger: ['change'] }
       },
-	  doctorAdvices:'暂无医嘱',
+	  // doctorAdvices:'暂无医嘱',
       weightControlName: '',
       labourIntensityName: '',
       ifHospitalizedName: '',
 	  pregnantStatusName: '',
+	  doctorAdviceName:'',
 	  chronicList:[],
 	  form: {
 	      nickName:null,
-	      userId:null,
+	      userId:uni.getStorageSync('userId'),
 	      orgFullName:null,
 	      userType:null,
 	      mobile:null,
@@ -186,6 +199,7 @@ export default {
     'form.labourIntensity': 'updateDisplayLaborIntensityName',
     'form.ifHospitalized': 'updateDisplayHousingName',
     'form.pregnantStatus': 'updatePregnantStatusName',
+	'form.doctorAdvice': 'updateDoctorAdviceName',
 	
   },
   onLoad() {
@@ -206,18 +220,24 @@ export default {
 			"userId": uni.getStorageSync('userId')
 		}
 	  	const res = await healthDetailApi(param)
+		console.log("无信息",res);
+		if(res.data==null||res.data==undefined||res.data==''){
+			return;
+		}
 		this.form = res.data;
+		this.form.userId=uni.getStorageSync('userId');
+		console.log("this.form",this.form)
 		if(this.form.chronicIds){
 			this.form.chronicDiseases = this.form.chronicIds.split(",")
-			if(this.form.doctorAdvice=='1'){
-				this.doctorAdvices='禁食';
-			}else if(this.form.doctorAdvice=='2'){
-				this.doctorAdvices='流食';
-			}else if(this.form.doctorAdvice=='3'){
-				this.doctorAdvices='半流食';
-			}else if(this.form.doctorAdvice=='4'){
-				this.doctorAdvices='治疗饮食';
-			}
+			// if(this.form.doctorAdvice=='1'){
+			// 	this.doctorAdvices='禁食';
+			// }else if(this.form.doctorAdvice=='2'){
+			// 	this.doctorAdvices='流食';
+			// }else if(this.form.doctorAdvice=='3'){
+			// 	this.doctorAdvices='半流食';
+			// }else if(this.form.doctorAdvice=='4'){
+			// 	this.doctorAdvices='治疗饮食';
+			// }
 		}
 	  	console.log(res, '详情')  
 	  }, 
@@ -257,9 +277,14 @@ export default {
     },
     updateDisplayHousingName() {
 		this.ifHospitalizedName = this.getDisplayName('ifHospitalized', this.form.ifHospitalized);
+		console.log("this.ifHospitalizedName",this.ifHospitalizedName);
     },
 	updatePregnantStatusName() {
 		this.pregnantStatusName = this.getDisplayName('pregnantStatus', this.form.pregnantStatus);
+    },
+	updateDoctorAdviceName() {
+		this.doctorAdviceName = this.getDisplayName('doctorAdvice', this.form.doctorAdvice);
+		console.log("this.doctorAdviceName",this.doctorAdviceName);
     },
     getDisplayName(selector, value) {
       const options = this.selectors[selector]?.options || [];
From 17ca4824611b775b673ae09a9ab9dacaf63791b1 Mon Sep 17 00:00:00 2001
From: skjia <106962133@qq.com>
Date: Mon, 28 Jul 2025 09:44:05 +0800
Subject: [PATCH 2/2] jsk
---
 api/mine/health.js                  | 2 +-
 pages/mine/me/healthInformation.vue | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/api/mine/health.js b/api/mine/health.js
index de4ef80..2dee896 100644
--- a/api/mine/health.js
+++ b/api/mine/health.js
@@ -5,7 +5,7 @@ import request from '@/utils/request';
   */
  export function healthDetailApi(data) {
    return request({
-     url: '/smart-canteen/health_person_info/detail-health-info',
+     url: '/smart-canteen/health_person_info/detail-health-appinfo',
      method: 'post',
      data
    })
diff --git a/pages/mine/me/healthInformation.vue b/pages/mine/me/healthInformation.vue
index e5c4a1a..411f274 100644
--- a/pages/mine/me/healthInformation.vue
+++ b/pages/mine/me/healthInformation.vue
@@ -311,7 +311,7 @@ export default {
         }
       }).catch(errors => {
         console.error('Validation failed:', errors);
-        uni.$u.toast('请检查并修正错误');
+        uni.$u.toast('请填写完整信息');
       });
     },
     hideKeyboard() {