张田田 пре 7 месеци
родитељ
комит
b25abd4977

+ 8 - 3
miniprogram/components/button/button.ts

@@ -5,7 +5,7 @@ Component({
     loading(this: any, val: boolean) {
       // 当外部声明 loading 时,同步禁用状态
       this.setData({ isDisabled: !!val });
-    }
+    },
   },
   lifetimes: {
     attached(this: any) {
@@ -56,22 +56,27 @@ Component({
   },
   methods: {
     handleSubmit(this: any) {
+      console.log(this.data.isDisabled, "handleSubmit");
       if (this.data.isDisabled) {
         return;
       }
 
       // 如果是刚刚重置的按钮(100ms内),不要立即禁用
       const now = Date.now();
-
+      console.log(
+        now - this.data._lastResetTime < 100,
+        "now - this.data._lastResetTime < 100"
+      );
       if (now - this.data._lastResetTime < 100) {
         this.triggerEvent("submit");
         return;
       }
-
+      console.log(this.data.disableOnClick, "this.data.disableOnClick");
       // 点击后可选地禁用按钮,防止重复提交;外部完成后请调用 resetState 或将 loading 置为 false
       if (this.data.disableOnClick) {
         this.setData({ isDisabled: true });
       }
+      console.log("triggerEvent");
       this.triggerEvent("submit");
     },
 

+ 0 - 1
miniprogram/components/form-picker/form-picker.ts

@@ -47,7 +47,6 @@ Component({
   },
   lifetimes: {
     attached() {
-      console.log('attached');
 
     }
   },

+ 0 - 10
miniprogram/module/chats/components/guide/guide.ts

@@ -21,12 +21,6 @@ Component({
       this.setAnalysisCount();
     },
   },
-
-  observers: {
-    active(newVal, oldVal) {
-      console.log("active=>>>", newVal, oldVal);
-    },
-  },
   properties: {
     id: { type: String, value: "" },
     active: { type: Boolean, value: false },
@@ -40,7 +34,6 @@ Component({
   methods: {
     // 获取评估剩余次数
     async setAnalysisCount(this: any) {
-      console.log("setAnalysisCount");
       try {
         // 获取剩余次数
         const residuedCount = await Post(
@@ -53,7 +46,6 @@ Component({
           }
         );
         this.setData({ analysisCount: residuedCount });
-        console.log(this.data.analysisCount, "this.data.analysisCount");
       } catch (error) {
         console.error("获取剩余次数失败:", error);
       }
@@ -62,7 +54,6 @@ Component({
       const { patient } = await getPatients(/*this.data.patientId*/);
       if (!patient) await toCertificationPage();
       else {
-        console.log("patient", this.data.active);
         if (this.data.active) {
           this.triggerEvent("next", {
             component: "questionnaire",
@@ -102,7 +93,6 @@ Component({
     handleD() {
       // if (this.data.active) wx.navigateBack();
       if (this.data.active) {
-        console.log("tiaohzuan1");
         wx.redirectTo({ url: "/pages/home/home" });
       }
     },

+ 5 - 1
miniprogram/module/health/components/report-health-patient/report-health-patient.scss

@@ -83,9 +83,13 @@
 
   .row {
     display: flex;
-
+    column-gap: 12px;
     .col {
       flex: 1 1 50%;
+      display: flex;
+      align-items: center;
+      white-space: nowrap; /* 防止真机 50% 宽度下换行 */
+      min-width: 0; /* 修复部分机型 flex 子项计算导致的换行 */
     }
   }
 }

+ 16 - 16
miniprogram/module/health/components/report-health-patient/report-health-patient.wxml

@@ -45,44 +45,44 @@
         <view>{{dataset.willillStateName}}</view>
       </view>
       <view class="row">
-        <span class="col" wx:if="{{dataset.height}}" style="display:flex">
-          <text style="color:#8C8C8C">身高:</text>
-          <text>{{dataset.height}}cm</text>
-        </span>
-        <span class="col" wx:if="{{dataset.weight}}">
+        <view class="col" wx:if="{{dataset.height}}" style="display:flex">
+          <view style="color:#8C8C8C">身高:</view>
+          <view>{{dataset.height}}cm</view>
+        </view>
+        <view class="col" wx:if="{{dataset.weight}}" style="display:flex">
           <text style="color:#8C8C8C">体重:</text>
           <text>{{dataset.weight}}kg</text>
-        </span>
+        </view>
       </view>
       <view class="row">
-        <span class="col" wx:if="{{dictionary.label($dictionaries, 'sys_yes_no', dataset.drinkState)}}">
+        <view class="col" wx:if="{{dictionary.label($dictionaries, 'sys_yes_no', dataset.drinkState)}}" style="display:flex">
           <text style="color:#8C8C8C">饮酒:</text>
           <text>{{dictionary.label($dictionaries, 'sys_yes_no', dataset.drinkState)}}</text>
-        </span>
-        <span class="col" wx:if="{{dictionary.label($dictionaries, 'sys_yes_no', dataset.smokeState)}}">
+        </view>
+        <view class="col" wx:if="{{dictionary.label($dictionaries, 'sys_yes_no', dataset.smokeState)}}" style="display:flex">
           <text style="color:#8C8C8C">抽烟:</text>
           <text>{{dictionary.label($dictionaries, 'sys_yes_no', dataset.smokeState)}}</text>
-        </span>
+        </view>
       </view>
-      <span class="row">
+      <view class="row" style="display:flex">
         <text style="color:#8C8C8C">喜好口味:</text>
         <t-tag t-class="tag" variant="outline" wx:for="{{hobbyFlavor}}" wx:key="*this">
           {{dictionary.label($dictionaries, 'hobby_flavor', item)}}
         </t-tag>
         <t-tag variant="outline" wx:if="{{!hobbyFlavor.length}}">无</t-tag>
-      </span>
-      <span class="row">
+      </view>
+      <view class="row" style="display:flex">
         <text style="color:#8C8C8C">食物过敏:</text>
         <t-tag t-class="tag" variant="outline" wx:for="{{foodAllergy}}" wx:key="*this">
           {{dictionary.label($dictionaries, 'food_allergy', item)}}
         </t-tag>
         <t-tag variant="outline" wx:if="{{!foodAllergy.length}}">无</t-tag>
-      </span>
-      <span class="row">
+      </view>
+      <view class="row">
         <text class="text-item" wx:if="{{dataset.willillDegreeName}}">{{dataset.willillDegreeName}}</text>
         <text class="text-item" wx:if="{{dataset.willillSocialName}}">{{dataset.willillSocialName}}</text>
         <text class="text-item" wx:if="{{dataset.willillFunctionName}}">{{dataset.willillFunctionName}}</text>
-      </span>
+      </view>
     </view>
   </view>
 

+ 1 - 0
miniprogram/module/user/pages/user-edit/user-edit.scss

@@ -35,6 +35,7 @@
   // background: #fff;
   background-color: var(--td-cell-bg-color,var(--td-bg-color-container,var(--td-font-white-1,#fff)));
   position: relative;
+  border-bottom: 1px solid #F0F0F0; /* 更浅的下划线 */
 }
 .cell-row + .cell-row { border-top: 0; }
 

+ 5 - 1
miniprogram/module/user/pages/user-edit/user-edit.ts

@@ -112,10 +112,13 @@ Component({
       }
     },
     async onSubmit(event: WechatMiniprogram.FormSubmit) {
+      console.log(event, "onSubmit");
       const that = this as any;
       const submitBtn = that.selectComponent("#submitBtn");
+      console.log(event, "event",that.data.model);
       that.setData({ dirty: true });
-      const data = { ...(that.data.model || {}), ...event.detail.value } as any;
+      const data = { ...(that.data.model || {}), ...event?.detail?.value } as any;
+      console.log(data, "穿的数据");
       // 如填写了身份证,进行18位身份证合法性校验
       if (data.cardno) {
         const { valid, message } = (this as any).validateIdCard18((data.cardno || '').toString());
@@ -150,6 +153,7 @@ Component({
         return getTickleContext.call(that).showWarnMessage("请填写体重");
       }
       try {
+        console.log(data, "data");
         await updateUserInfoMethod(<any>data)
           .then(() => wx.navigateBack())
           .then(() => {

+ 1 - 1
miniprogram/module/user/pages/user-edit/user-edit.wxml

@@ -25,8 +25,8 @@
       <t-cell title="性别" note="{{dictionary.label($dictionaries, 'sys_user_sex', model['sex'])}}" required />
     </block>
     <user-data-edit model="{{model}}" dirty="{{dirty}}"></user-data-edit>
-
     <form-button block index="1" id="submitBtn"></form-button>
+
   </form>
 </scroll-view>