张田田 8 месяцев назад
Родитель
Сommit
f719e39b7f
32 измененных файлов с 760 добавлено и 414 удалено
  1. BIN
      miniprogram/assets/bg/bg_home.png
  2. BIN
      miniprogram/assets/bg/pic_body@2x.png
  3. 31 31
      miniprogram/components/button/button.ts
  4. 47 21
      miniprogram/components/calendar/index.ts
  5. BIN
      miniprogram/components/calendar/theme/cursorpool-1.0.24.vsix
  6. 1 1
      miniprogram/module/article/pages/confirm-receiving/confirm-receiving.wxml
  7. 12 11
      miniprogram/module/article/pages/order-detail/order-detail.scss
  8. 13 3
      miniprogram/module/article/pages/order-detail/order-detail.ts
  9. 54 58
      miniprogram/module/article/pages/order-detail/order-detail.wxml
  10. 46 14
      miniprogram/module/article/pages/order-list/order-list.scss
  11. 13 0
      miniprogram/module/article/pages/order-list/order-list.ts
  12. 5 0
      miniprogram/module/article/pages/order-list/order-list.wxml
  13. 1 1
      miniprogram/module/article/request.ts
  14. 39 19
      miniprogram/module/care/pages/careDetail/careDetail.scss
  15. 85 2
      miniprogram/module/care/pages/careDetail/careDetail.ts
  16. 92 102
      miniprogram/module/care/pages/careDetail/careDetail.wxml
  17. 3 1
      miniprogram/module/charts/record-care/record-care.scss
  18. 23 1
      miniprogram/module/chats/components/guide/guide.ts
  19. 1 1
      miniprogram/module/chats/components/guide/guide.wxml
  20. 1 1
      miniprogram/module/chats/components/message-select/message-select.ts
  21. 21 13
      miniprogram/module/chats/components/questionnaire/questionnaire.ts
  22. 15 10
      miniprogram/module/health/components/care-record/care-record.ts
  23. 2 1
      miniprogram/module/health/components/care-record/care-record.wxml
  24. 1 1
      miniprogram/module/health/pages/report/report.scss
  25. 1 1
      miniprogram/module/user/components/field-radio/field-radio.scss
  26. 21 14
      miniprogram/module/user/pages/user-edit/user-edit.ts
  27. 42 53
      miniprogram/pages/home/home.scss
  28. 140 7
      miniprogram/pages/home/home.ts
  29. 31 43
      miniprogram/pages/home/home.wxml
  30. 9 1
      miniprogram/pages/home/request.ts
  31. 2 1
      miniprogram/themes/t.cell.scss
  32. 8 2
      project.config.json

BIN
miniprogram/assets/bg/bg_home.png


BIN
miniprogram/assets/bg/pic_body@2x.png


+ 31 - 31
miniprogram/components/button/button.ts

@@ -1,81 +1,81 @@
 // components/button/button.ts
 Component({
-  behaviors: ['wx://form-field-button'],
+  behaviors: ["wx://form-field-button"],
   lifetimes: {
     attached() {
-      console.log('[Button] attached, initializing...');
-      const mode = this.data.block ? 'block' : 'line';
+      console.log("[Button] attached, initializing...");
+      const mode = this.data.block ? "block" : "line";
       const index = this.data.index;
-      this.setData({ 
+      this.setData({
         src: `../../assets/bg/button-${mode}-${index}.bg.png`,
-        className: this.data.block ? 'block' : `line-${index}`,
-        isDisabled: false
+        className: this.data.block ? "block" : `line-${index}`,
+        isDisabled: false,
       });
-      console.log('[Button] initialized with isDisabled:', this.data.isDisabled);
-    }
+      console.log(
+        "[Button] initialized with isDisabled:",
+        this.data.isDisabled
+      );
+    },
   },
   properties: {
     block: { type: Boolean, value: false },
     index: { type: Number, value: 1 },
     loading: { type: Boolean, value: false },
+    text: { type: String, value: "" },
   },
   data: {
     list: [
       {
-        name: '保存',
-        value: 'save',
+        name: "保存",
+        value: "save",
       },
       {
-        name: '提交',
-        value: 'submit',
+        name: "提交",
+        value: "submit",
       },
       {
-        name: '确定',
-        value: 'confirm',
+        name: "确定",
+        value: "confirm",
       },
       {
-        name: '取消',
-        value: 'cancel',
+        name: "取消",
+        value: "cancel",
       },
     ],
-    src: '',
+    src: "",
     isDisabled: false,
-    _lastResetTime: 0
+    _lastResetTime: 0,
   },
   methods: {
     handleSubmit() {
-      console.log('[Button] handleSubmit called, isDisabled:', this.data.isDisabled);
       if (this.data.isDisabled) {
-        console.log('[Button] button is disabled, returning');
         return;
       }
-      
+
       // 如果是刚刚重置的按钮(100ms内),不要立即禁用
       const now = Date.now();
 
       if (now - this.data._lastResetTime < 100) {
-        console.log('[Button] button was just reset, not disabling');
-        this.triggerEvent('submit');
+        this.triggerEvent("submit");
         return;
       }
 
-      console.log('[Button] setting isDisabled to true');
-      this.setData({ isDisabled: true });
+      if (this.data.text === "2") {
+        this.setData({ isDisabled: false });
+      } else {
+        this.setData({ isDisabled: true });
+      }
       this.triggerEvent("submit");
     },
 
     resetState() {
-      console.log("[Button] resetState called");
-      console.log("[Button] current isDisabled:", this.data.isDisabled);
-      this.setData({ 
+      this.setData({
         isDisabled: false,
-        _lastResetTime: Date.now()
+        _lastResetTime: Date.now(),
       });
-      console.log('[Button] isDisabled set to:', this.data.isDisabled);
     },
 
     valFailure() {
-      console.log("[Button] valFailure called");
       // 处理失败逻辑
       if (this) this.setData({ isDisabled: true }); // 重置按钮状态
     },

+ 47 - 21
miniprogram/components/calendar/index.ts

@@ -69,19 +69,26 @@ Component({
     lastDate: null,
     dateArrType: 1,
     days: [],
-    dayData: '',
+    dayData: "",
     isFutureDate: false,
   },
   observers: {
-    "calendar.days": function (newVal:any) {
-      if (newVal.length > 0) {
+    "calendar.days": function (newVal: any) {
+      // 简化条件判断,只检查 newVal
+      if (
+        newVal &&
+        newVal.length > 0 &&
+        newVal[0] &&
+        newVal[0].year &&
+        newVal[0].month
+      ) {
         this.setData({
           currentMonth: newVal[0].month,
           currentYear: newVal[0].year,
         });
         let firstDate = null;
         const empytGrids = this.data.calendar.empytGrids || [];
-        const days = this.data.calendar.days || [];
+        const days = newVal || [];
         let prevData = null;
         if (empytGrids.length > 0) {
           // 有上月补齐格子,第一个就是上月的
@@ -122,8 +129,15 @@ Component({
           firstDate,
           lastDate,
         });
+        this.setData({
+          id: wx.getStorageSync("recordId") || "",
+        });
         if (this.data.id) {
           this.getCaRecord(this.data.id, firstDate, lastDate);
+        } else {
+          setTimeout(() => {
+            this.getCaRecord(this.data.id, firstDate, lastDate);
+          }, 2000);
         }
       }
     },
@@ -131,9 +145,6 @@ Component({
   lifetimes: {
     attached: async function () {
       this.initComp();
-      this.setData({ 
-        id: wx.getStorageSync("recordId") || "",
-      });
     },
     detached: function () {
       initialTasks.flag = "finished";
@@ -145,14 +156,17 @@ Component({
     async onPatchCard(e: any) {
       try {
         const cardId = e.currentTarget.dataset.id;
-        const { firstDate, lastDate } = this.data;
-        await addPatientOnlineRecord(cardId)
+        await addPatientOnlineRecord(cardId);
         wx.showToast({
           title: "补卡成功",
           icon: "success",
           duration: 1500,
         });
-        await this.getCaRecord(this.data.id, this.data.firstDate, this.data.lastDate);
+        await this.getCaRecord(
+          this.data.id,
+          this.data.firstDate,
+          this.data.lastDate
+        );
       } catch (error: any) {
         getTickleContext.call(this).showWarnMessage(error.errMsg);
       }
@@ -173,12 +187,18 @@ Component({
             if (dayItem.year == currentYear && dayItem.month == currentMonth) {
               // 只给当前日期及之前的日期赋值
               const currentDate = new Date();
-              const itemDate = new Date(dayItem.year, dayItem.month - 1, dayItem.day);
-              
+              const itemDate = new Date(
+                dayItem.year,
+                dayItem.month - 1,
+                dayItem.day
+              );
+
               // 如果日期是今天或之前,才进行赋值
               if (itemDate <= currentDate) {
-                const match = monthData.find((d: any) => d.arrangeDay == dayItem.day);
-              
+                const match = monthData.find(
+                  (d: any) => d.arrangeDay == dayItem.day
+                );
+
                 if (match) {
                   dayItem.clockIn = [...match.clockIn];
                   dayItem.noClockIn = [...match.noClockIn];
@@ -192,8 +212,10 @@ Component({
               }
             }
           });
-          const matchData = monthData.filter((d: any) => d.arrangeDay ==this.data.dayData );
-       
+          const matchData = monthData.filter(
+            (d: any) => d.arrangeDay == this.data.dayData
+          );
+
           if (matchData.length > 0) {
             this.setData({
               noClockIn: matchData[0].noClockIn,
@@ -211,9 +233,13 @@ Component({
             if (currentDay) {
               // 检查当前日期是否为未来日期
               const currentDate = new Date();
-              const itemDate = new Date(currentDay.year, currentDay.month - 1, currentDay.day);
+              const itemDate = new Date(
+                currentDay.year,
+                currentDay.month - 1,
+                currentDay.day
+              );
               const isCurrentDayFuture = itemDate > currentDate;
-              
+
               if (!isCurrentDayFuture) {
                 this.setData({
                   noClockIn: currentDay.noClockIn,
@@ -331,12 +357,12 @@ Component({
         selectedDate,
       });
       const { day, disable, clockIn, noClockIn, type } = date;
-      
+
       // 检查是否为未来日期
       const currentDate = new Date();
       const itemDate = new Date(date.year, date.month - 1, date.day);
       const isFutureDate = itemDate > currentDate;
-      
+
       // 如果是未来日期,设置空的打卡数据,但仍然可以点击
       if (isFutureDate) {
         this.setData({
@@ -353,7 +379,7 @@ Component({
           isFutureDate: false,
         });
       }
-      
+
       if (disable || !day) return;
       const config = this.data.calendarConfig || this.config || {};
       const { multi, chooseAreaMode } = config;

BIN
miniprogram/components/calendar/theme/cursorpool-1.0.24.vsix


+ 1 - 1
miniprogram/module/article/pages/confirm-receiving/confirm-receiving.wxml

@@ -4,7 +4,7 @@
 <view class="confirm-receive-container">
   <!-- 商品物流卡片列表 -->
   <view class="order-goods-list">
-    <view class="goods-card" wx:for="{{goodsList}}" wx:key="id">
+    <view class="goods-card" wx:for="{{goodsList}}" wx:key="id" wx:if="{{item.conditioningProgramDetail.isDelivery==='Y'}}">
       <image class="goods-img" src="{{item.conditioningProgramDetail.photo}}" mode="aspectFill" />
       <view class="goods-info">
         <view class="goods-title">{{item.conditioningProgramDetail.name}}</view>

+ 12 - 11
miniprogram/module/article/pages/order-detail/order-detail.scss

@@ -2,7 +2,7 @@
 @import "../../searc-list.scss";
 /* module/diet/pages/diet-info/diet-info.wxss */
 
-.page-scroll__container{
+.page-scroll__container {
   background-color: white;
 }
 .order-box {
@@ -31,12 +31,15 @@
   // border-radius: 20rpx;
   // margin: 24rpx 0;
   padding: 24rpx;
-  background-image: url('https://wx.hzliuzhi.com:4433/manager/file/statics/2025/07/11/WechatIMG637_20250711120303A498.jpg');
+  background-image: url("https://wx.hzliuzhi.com:4433/manager/file/statics/2025/07/11/WechatIMG637_20250711120303A498.jpg");
   background-size: cover;
   background-position: initial;
   background-repeat: no-repeat;
   height: 150px;
 }
+.delivery-address {
+  font-weight: bold;
+}
 
 .order-no {
   font-size: 28rpx;
@@ -45,7 +48,7 @@
 }
 
 .address-card {
-  background: rgba(255,255,255,0.8);
+  background: rgba(255, 255, 255, 0.8);
   border-radius: 20rpx;
   margin: 24rpx 0;
   padding: 24rpx;
@@ -134,7 +137,6 @@
   font-weight: 500;
 }
 
-
 .table-header,
 .table-row {
   display: flex;
@@ -144,7 +146,7 @@
 .table-header {
   font-weight: 600;
   color: #333;
-  background: #EEEEEE;
+  background: #eeeeee;
   border-bottom: 1px solid #eee;
 }
 
@@ -171,7 +173,6 @@
   }
 }
 
-
 .order-amount {
   display: flex;
   justify-content: flex-end;
@@ -181,7 +182,7 @@
 }
 
 .order-amount-value {
-  color: #D54941;
+  color: #d54941;
   font-weight: 500;
   margin-left: 12rpx;
   font-size: 32rpx;
@@ -207,7 +208,7 @@
   width: 100vw;
   background: #fff;
   padding: 24rpx 0 32rpx 0;
-  box-shadow: 0 -2rpx 8rpx rgba(0,0,0,0.04);
+  box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.04);
   z-index: 100;
   .footer-btn {
     flex: 1;
@@ -219,10 +220,10 @@
 }
 
 .table-row-alt {
-  background: #F9F9F9 !important;
+  background: #f9f9f9 !important;
 }
-.total-title{
+.total-title {
   font-weight: 500;
   font-size: 28rpx;
   color: black;
-}
+}

+ 13 - 3
miniprogram/module/article/pages/order-detail/order-detail.ts

@@ -18,6 +18,7 @@ Page({
   },
   properties: {},
   data: {
+    showDetail: false,
     id: "",
     showConfirm: false,
     url: "https://pic.nximg.cn/file/20190718/28170468_214109363000_2.jpg",
@@ -83,11 +84,20 @@ Page({
       console.log(res.data, "订单详情");
       if (res && res.data) {
         this.setData({ orderDetail: res.data });
+        if(!res.data.liaison || !res.data.phone || !res.data.provinceName || !res.data.cityName || !res.data.areaName || !res.data.detailAddress){
+          this.setData({
+           showDetail: true,
+          });
+        }else{
+          this.setData({
+            showDetail: false,
+          });
         this.setData({
-          name: res.data.liaison,
-          phone: res.data.phone,
-          address: `${res.data.provinceName}${res.data.cityName}${res.data.areaName}${res.data.detailAddress}`,
+          name: res.data.liaison?`${res.data.liaison}`:"",
+          phone: res.data.phone?`${res.data.phone}`:"",
+          address: `${res.data.provinceName}${res.data.cityName?`${res.data.cityName}`:""}${res.data.areaName?`${res.data.areaName}`:""}${res.data.detailAddress?`${res.data.detailAddress}`:""}`,
         });
+      }
         // 0:待付款
         // 2 交易关闭
         // 6 待收货

+ 54 - 58
miniprogram/module/article/pages/order-detail/order-detail.wxml

@@ -1,70 +1,66 @@
 <!--module/diet/pages/order-detail/order-detail.wxml-->
 <t-navbar title="订单详情" left-arrow />
 
-<scroll-view class="page-scroll__container"  scroll-y>
+<scroll-view class="page-scroll__container" scroll-y>
   <!-- 订单号 -->
   <view class="info-box">
-  <view class="order-no" wx:if="{{false}}">订单编号:0038532223</view>
+    <view class="order-no" wx:if="{{false}}">订单编号:0038532223</view>
 
-  <!-- 收货人信息卡片 -->
-  <view class="address-card" bindtap="changeAddress" wx:if="{{orderDetail.isDelivery==='Y'}}">
-    <view class="address-header">
-      <text class="address-name" wx:if="{{name}}">{{name}}</text>
-      <text class="address-phone" wx:if="{{phone}}">{{phone}}</text>
-    </view>
-    <view class="address-detail" wx:if="{{address}}">
-   {{address}}
-    </view>
-  </view>
-</view>
-<view class="order-box">
-<view class="order-detail-scroll">
-  <!-- 服务包信息 -->
-  <view class="service-card">
-    <t-image src="{{orderDetail.photo}}" class="service-img" wx:if="{{orderDetail.photo}}" />
-    <view class="service-info">
-      <view class="service-title">{{orderDetail.conditioningWrapName}}</view>
-      <view class="service-doctor" wx:if="{{orderDetail.operateBy}}"><text style=" color: #888;">开具医生:</text>{{orderDetail.operateBy}}</view>
-      <view class="service-time" wx:if="{{orderDetail.operateTime}}"><text style=" color: #888;">开具时间:</text>{{orderDetail.operateTime}}</view>
-  
-    </view>
-  </view>
-  <t-divider />
-    <view class="service-date" wx:if="{{orderDetail.estimatedStartDate}}">开始日期:{{orderDetail.estimatedStartDate}}</view>
-  <!-- 项目明细表格 -->
-  <view class="item-table">
-    <view class="table-header">
-      <text class="table-cell">项目</text>
-      <text class="table-cell">数量</text>
-      <text class="table-cell">价格(元)</text>
-    </view>
-    <view class="table-row {{idx % 2 === 1 ? 'table-row-alt' : ''}}" wx:for="{{orderDetail.items}}" wx:for-index="idx" wx:key="name">
-      <text class="table-cell">{{item.conditioningProgramDetail.name}}</text>
-      <text class="table-cell">{{item.frequencyType==='不限'?'不限':item.totalMeasure}}{{item.conditioningProgramDetail.cpFixedPricingRule.pricingUnit}}</text>
-      <text class="table-cell">{{item.totalPrice}}</text>
-    </view>
-    <view class="table-row table-total">
-      <text class="table-cell total-title">合计</text>
-      <text class="table-cell"></text>
-      <text class="table-cell total-title">{{totalPrice}}</text>
+    <!-- 收货人信息卡片 -->
+    <view class="address-card" bindtap="changeAddress" wx:if="{{orderDetail.isDelivery==='Y'}}">
+      <view class="delivery-address" wx:if="{{showDetail}}">
+        请选择配送地址
+      </view>
+      <view class="address-header" wx:else>
+        <text class="address-name" wx:if="{{name}}">{{name}}</text>
+        <text class="address-phone" wx:if="{{phone}}">{{phone}}</text>
+      </view>
+      <view class="address-detail" wx:if="{{address}}">
+        {{address}}
+      </view>
     </view>
   </view>
+  <view class="order-box">
+    <view class="order-detail-scroll">
+      <!-- 服务包信息 -->
+      <view class="service-card">
+        <t-image src="{{orderDetail.photo}}" class="service-img" wx:if="{{orderDetail.photo}}" />
+        <view class="service-info">
+          <view class="service-title">{{orderDetail.conditioningWrapName}}</view>
+          <view class="service-doctor" wx:if="{{orderDetail.operateBy}}"><text style=" color: #888;">开具医生:</text>{{orderDetail.operateBy}}</view>
+          <view class="service-time" wx:if="{{orderDetail.operateTime}}"><text style=" color: #888;">开具时间:</text>{{orderDetail.operateTime}}</view>
 
-  <!-- 订单金额 -->
-  <view class="order-amount">
-    <text>订单金额:</text>
-    <text class="order-amount-value">¥{{totalPrice}}</text>
-  </view>
-  </view>
+        </view>
+      </view>
+      <t-divider />
+      <view class="service-date" wx:if="{{orderDetail.estimatedStartDate}}">开始日期:{{orderDetail.estimatedStartDate}}</view>
+      <!-- 项目明细表格 -->
+      <view class="item-table">
+        <view class="table-header">
+          <text class="table-cell">项目</text>
+          <text class="table-cell">数量</text>
+          <text class="table-cell">价格(元)</text>
+        </view>
+        <view class="table-row {{idx % 2 === 1 ? 'table-row-alt' : ''}}" wx:for="{{orderDetail.items}}" wx:for-index="idx" wx:key="name">
+          <text class="table-cell">{{item.conditioningProgramDetail.name}}</text>
+          <text class="table-cell">{{item.frequencyType==='不限'?'不限':item.totalMeasure}}{{item.conditioningProgramDetail.cpFixedPricingRule.pricingUnit}}</text>
+          <text class="table-cell">{{item.totalPrice}}</text>
+        </view>
+        <view class="table-row table-total">
+          <text class="table-cell total-title">合计</text>
+          <text class="table-cell"></text>
+          <text class="table-cell total-title">{{totalPrice}}</text>
+        </view>
+      </view>
+
+      <!-- 订单金额 -->
+      <view class="order-amount">
+        <text>订单金额:</text>
+        <text class="order-amount-value">¥{{totalPrice}}</text>
+      </view>
+    </view>
   </view>
-   <t-dialog
-  visible="{{showConfirm}}"
-  content="确定要取消订单吗?"
-  confirm-btn="{{ { content: '取消订单', variant: 'base', theme: 'primary' } }}"
-  cancel-btn="再想想"
-  bind:confirm="confirmDialog"
-  bind:cancel="closeDialog"
-/>
+  <t-dialog visible="{{showConfirm}}" content="确定要取消订单吗?" confirm-btn="{{ { content: '取消订单', variant: 'base', theme: 'primary' } }}" cancel-btn="再想想" bind:confirm="confirmDialog" bind:cancel="closeDialog" />
 </scroll-view>
 
 
@@ -84,4 +80,4 @@
   <block wx:elif="{{orderStatus === 'completed'}}">
     <t-button theme="default" block class="footer-btn" bindtap="viewLogistics">查看物流</t-button>
   </block>
-</view>
+</view>

+ 46 - 14
miniprogram/module/article/pages/order-list/order-list.scss

@@ -2,12 +2,18 @@
 @import "../../searc-list.scss";
 /* module/diet/pages/diet-info/diet-info.wxss */
 
-.diet-box{
+.diet-box {
   background: #fff;
   border-radius: 12px;
   margin-top: -30px;
 }
 
+.delivery-address {
+  font-weight: bold;
+  color: black;
+  font-size: 28rpx;
+}
+
 /* order-list.wxss */
 .tab-container {
   display: flex;
@@ -29,11 +35,19 @@
 
 .tab.active {
   font-weight: bold;
-  border-bottom: 2px solid #007aff; /* 选中状态的下划线 */
+  border-bottom: 2px solid #007aff;
+  /* 选中状态的下划线 */
 }
 
-.order-address { color: #333; }
-.change-address { color: #1aad19; margin-left: 8rpx; font-size: 24rpx; }
+.order-address {
+  color: #333;
+}
+
+.change-address {
+  color: #1aad19;
+  margin-left: 8rpx;
+  font-size: 24rpx;
+}
 
 /* miniprogram/module/article/pages/order-list/order-list.wxss */
 .page-scroll__container {
@@ -44,7 +58,7 @@
 .order-card {
   background: #fff;
   border-radius: 20rpx;
-  box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
   margin-bottom: 24rpx;
   padding: 24rpx;
 }
@@ -60,10 +74,22 @@
 .order-status {
   font-weight: bold;
 }
-.order-status.status-pending { color: #D54941; }
-.order-status.status-received { color: #1D6FF6; }
-.order-status.status-completed { color: #2BA471; }
-.order-status.status-closed { color: #909399; }
+
+.order-status.status-pending {
+  color: #D54941;
+}
+
+.order-status.status-received {
+  color: #1D6FF6;
+}
+
+.order-status.status-completed {
+  color: #2BA471;
+}
+
+.order-status.status-closed {
+  color: #909399;
+}
 
 .order-user {
   color: #888;
@@ -74,7 +100,7 @@
   gap: 4rpx;
   background-color: #F6F6F6;
   padding: 10px;
-  border-radius:8px;
+  border-radius: 8px;
 }
 
 .order-body {
@@ -115,10 +141,12 @@
   justify-content: space-between;
   align-items: flex-end;
 }
+
 .order-price {
   display: flex;
   margin-bottom: 16px;
 }
+
 .order-amount {
   color: #D54941;
   font-weight: bold;
@@ -131,6 +159,7 @@
   gap: 20rpx;
   transition: none !important;
 }
+
 .order-actions .t-button {
   margin: 0 !important;
 }
@@ -139,7 +168,7 @@
 .outline-btn {
   background: #fff !important;
   border: 1px solid #1890ff !important; // 主色边框
-  color: #1890ff !important;            // 主色文字
+  color: #1890ff !important; // 主色文字
   box-shadow: none !important;
   border-radius: 30rpx !important;
   transition: none !important;
@@ -152,6 +181,7 @@
   margin-right: 20rpx;
   transition: none !important;
 }
+
 .contact {
   font-size: 28rpx;
   color: black;
@@ -159,12 +189,14 @@
   font-weight: bold;
   display: flex
 }
-.line{
+
+.line {
   width: 100%;
   height: 1px;
   background-color: #eee;
   margin: 24rpx 0;
 }
-.name{
-margin-right: 20rpx;
+
+.name {
+  margin-right: 20rpx;
 }

+ 13 - 0
miniprogram/module/article/pages/order-list/order-list.ts

@@ -32,6 +32,7 @@ Page({
     },
     selectedAddress: null,
     paying: false,
+    showAddress: false,
   },
   computed: {},
   onLoad(options: any) {
@@ -76,6 +77,18 @@ Page({
             : "";
         item.phone =
           item.phone !== null && item.phone !== undefined ? item.phone : "";
+        if (
+          !item.provinceName ||
+          !item.cityName ||
+          !item.areaName ||
+          !item.detailAddress ||
+          !item.liaison ||
+          !item.phone
+        ) {
+          item.showAddress = false;
+        } else {
+          item.showAddress = true;
+        }
       });
       this.setData({ orders: res.data });
     }

+ 5 - 0
miniprogram/module/article/pages/order-list/order-list.wxml

@@ -18,11 +18,16 @@
       </view>
       <view class="order-user" data-status="{{item.orderStatus}}" catchtap="changeAddress"
        data-id="{{item.id}}" wx:if="{{item.isDelivery==='Y'}}">
+       <view wx:if="{{item.showAddress}}">
         <view class="contact">
         <view class="name" wx:if="item.liaison">{{item.liaison}}</view> 
          <view wx:if="{{item.phone}}">{{item.phone}}</view>
           </view>
         <view wx:if="{{item.address}}">{{item.address || ''}}</view>
+        </view>
+        <view wx:else class="delivery-address">
+          请选择配送地址
+        </view>
       </view>
       <view class="order-body">
         <image src="{{item.photo}}" class="order-img" wx:if="{{item.photo}}" />

+ 1 - 1
miniprogram/module/article/request.ts

@@ -149,7 +149,7 @@ export function orderCancelMethod(id: string) {
 }
 // 订单列表
 export function orderListMethod(patientId: number, orderStatus: string) {
-  return Post(`/patientCrManage/pagePcrs`, { patientId, status:'0', orderStatus }, {
+  return Post(`/patientCrManage/pagePcrOrders`, { patientId, status:'0', orderStatus }, {
     transform({ data }: AnyObject) {
       return data;
     },

+ 39 - 19
miniprogram/module/care/pages/careDetail/careDetail.scss

@@ -30,13 +30,13 @@
   width: 96%;
 }
 .info-card {
-  background: #fff;
-  background: linear-gradient(180deg, #d6e4f5 0%, #f3f4f6 100%);
-  border-radius: 16px;
-border-top: 1px solid white;
-  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
-  font-size: 28rpx;
-  margin: 24rpx 24rpx 0 0rpx;
+//   background: #fff;
+//   background: linear-gradient(180deg, #d6e4f5 0%, #f3f4f6 100%);
+//   border-radius: 16px;
+// border-top: 1px solid white;
+//   box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
+//   font-size: 28rpx;
+//   margin: 24rpx 24rpx 0 0rpx;
 }
 .row {
   display: flex;
@@ -51,9 +51,10 @@ border-top: 1px solid white;
 }
 .card-content{
   padding: 10px 0 0px 0px;
-  width: 96%;
+  width: 94%;
   background: white;
   margin: auto;
+  border-radius: 15px;
 }
 .status-tag {
   background-color: #1976d2;
@@ -91,14 +92,14 @@ border-top: 1px solid white;
   line-height: 1.6;
 }
 .status-card {
-  border-radius: 16px;
-  margin: 24px auto;
-  width: 95%;
+  // border-radius: 16px;
+  // margin: 24px auto;
+  // width: 95%;
 
-  background: linear-gradient( 176deg, rgba(207,191,255,0.8) -1%, rgba(209,196,254,0.7) 0%, rgba(221,229,251,0.3) 20%);
+  // background: linear-gradient( 176deg, rgba(207,191,255,0.8) -1%, rgba(209,196,254,0.7) 0%, rgba(221,229,251,0.3) 20%);
 
   // background: linear-gradient(180deg, #d6e4f5 0%, #f3f4f6 100%);
-  padding: 15px 10px 10px 10px;
+  // padding: 15px 10px 10px 10px;
 }
 .icon {
   width: 20px;
@@ -109,6 +110,8 @@ border-top: 1px solid white;
   background-color: white;
   border-radius: 10px;
   padding: 12px 15px;
+  margin: auto;
+  width: 85%;
 }
 .scheme-outer {
   background: linear-gradient(135deg, #e3f0ff 0%, #b3d8fd 100%);
@@ -137,8 +140,10 @@ border-top: 1px solid white;
 .scheme-card {
   background: #fff;
   border-radius: 16rpx;
-  margin: 0 0rpx 24rpx 0rpx;
+  // margin: 0 0rpx 24rpx 0rpx;
   padding: 24rpx 24rpx 18rpx 30rpx;
+  width: 86%;
+  margin: auto auto 10px auto;
   // box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
 }
 .scheme-title {
@@ -237,6 +242,8 @@ border-top: 1px solid white;
   // margin: 24rpx;
   margin-top: 10px;
   box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
+  width: 85%;
+  margin: 10px auto;
 }
 .tongue-list-title {
   text-align: center;
@@ -316,6 +323,8 @@ border-top: 1px solid white;
   margin-top: 10px;
   margin-bottom: 24rpx;
   box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
+ width: 86%;
+ margin: auto auto 10px auto;
 }
 .symptom-list-title {
   text-align: center;
@@ -451,8 +460,9 @@ ec-canvas {
 .index-container{
   background-color: white;
   border-radius: 10px;
-  width: 98%;
-  padding-left:10px;
+  width: 95%;
+  // padding-left:10px;
+  margin: auto;
 }
 
 // ====
@@ -549,7 +559,7 @@ ec-canvas {
   background-color: #F9F9F9;
 }
 .symptom-cells {
-  min-width: 200rpx;
+  min-width: 250rpx;
   padding: 20rpx;
   border-right: 1px solid #eee;
   display: flex;
@@ -597,13 +607,23 @@ ec-canvas {
   justify-content: space-between;
   
 }
+.row-box{
+  
+  background-image: url('https://wx.hzliuzhi.com:4433/manager/file/statics/2025/08/21/WechatIMG731_20250821155626A830.jpg');
+  background-size: cover;
+  // background-position: center;
+  padding-top: 15px;
+  padding-left: 13px;
+}
 .bottom-box{
   background-color: #D6E4F5;
   border-radius: 16px;
+  margin-top:15px;
+  padding-bottom: 20px;
 }
 .care-box{
-  background: linear-gradient(176deg, rgba(207, 191, 255, 0.8) 0%, rgba(209, 196, 254, 0.7) 0%, rgba(221, 229, 251, 0.3) 8%);
+  // background: linear-gradient(176deg, rgba(207, 191, 255, 0.8) 0%, rgba(209, 196, 254, 0.7) 0%, rgba(221, 229, 251, 0.3) 8%);
 }
 .result-box{
-  background: linear-gradient(176deg, rgba(207, 191, 255, 0.8) 0%, rgba(209, 196, 254, 0.7) 0%, rgba(221, 229, 251, 0.3) 8%);
+  // background: linear-gradient(176deg, rgba(207, 191, 255, 0.8) 0%, rgba(209, 196, 254, 0.7) 0%, rgba(221, 229, 251, 0.3) 8%);
 }

+ 85 - 2
miniprogram/module/care/pages/careDetail/careDetail.ts

@@ -6,6 +6,16 @@ Page({
       wx.setStorageSync("careId", Number(options.id));
       this.getCareDetail(Number(options.id));
     }
+    // 设置页面标题
+    if (options.name) {
+    this.setData({
+      name: options.name,
+    });
+    }else{
+      this.setData({
+        name: "服务包详情",
+      });
+    }
 
     // const patientName = wx.getStorageSync("patientName");
     // if (patientName) {
@@ -15,14 +25,81 @@ Page({
     // }
   },
   data: {
+    name: "",
     // patientName: "",
     careDetail: {},
-    healthReports: [],
+    healthReports: [] as any[],
+    symptomCellWidth: '300rpx',
     statusText: "未知状态",
     loading: true,
     isShowDelivery: false,
     carouselLoading: {} as Record<string | number, boolean>, // 用于跟踪每个轮播图的加载状态
   },
+  
+  // 处理症状数据,按症状名称分组,使相同症状在同一列显示
+  processSymptomData(healthReports: any[]) {
+    // 收集所有唯一的症状名称
+    const symptomSet = new Set<string>();
+    healthReports.forEach(report => {
+      if (report.symptoms && Array.isArray(report.symptoms)) {
+        report.symptoms.forEach((symptom: any) => {
+          symptomSet.add(symptom.name);
+        });
+      }
+    });
+    
+    const allSymptomNames = Array.from(symptomSet);
+    
+    // 重新组织每个报告的症状数据,确保症状顺序一致
+    const processedReports = healthReports.map(report => {
+      const orderedSymptoms: any[] = [];
+      
+      // 按照所有症状名称的顺序,为每个报告创建症状数组
+      allSymptomNames.forEach(symptomName => {
+        // 查找当前报告中是否有这个症状
+        const existingSymptom = report.symptoms?.find((s: any) => s.name === symptomName);
+        if (existingSymptom) {
+          // 如果存在,添加症状信息
+          orderedSymptoms.push({
+            name: existingSymptom.name,
+            label: existingSymptom.label?`(${existingSymptom.label})`:'',
+            value: existingSymptom.value
+          });
+        } else {
+          // 如果不存在,添加空占位符
+          orderedSymptoms.push({
+            name: '',
+            label: '',
+            value: 0
+          });
+        }
+      });
+      
+      return {
+        ...report,
+        symptoms: orderedSymptoms
+      };
+    });
+    // 计算每条报告相对于上一条的趋势(上升/下降)
+    for (let i = 0; i < processedReports.length; i++) {
+      const previousReport = i > 0 ? processedReports[i - 1] : null;
+      const currentReport = processedReports[i];
+      currentReport.symptoms = currentReport.symptoms.map((sym: any, idx: number) => {
+        const previousSymptom = previousReport ? previousReport.symptoms[idx] : null;
+        let trend: '' | 'up' | 'down' = '';
+        if (previousReport && sym && sym.name) {
+          const currentValue = Number(sym.value) || 0;
+          const previousValue = previousSymptom ? (Number(previousSymptom.value) || 0) : 0;
+          if (currentValue > previousValue) trend = 'up';
+          else if (currentValue < previousValue) trend = 'down';
+        }
+        return { ...sym, trend };
+      });
+    }
+
+    return processedReports;
+  },
+  
   onCardRecord(e: any) {
     const id = e.currentTarget.dataset.id;
     wx.navigateTo({
@@ -187,9 +264,15 @@ Page({
                 symptoms: fromHealthReportSymptom(report).items,
               };
             });
+            
+            // 处理症状数据,按症状名称分组,使相同症状在同一列显示
+            const processedReports = this.processSymptomData(items);
+            
             this.setData({
-              healthReports: items,
+              healthReports: processedReports,
             });
+
+            console.log(this.data.healthReports, "healthReports");
           }
         }
         this.setData({

+ 92 - 102
miniprogram/module/care/pages/careDetail/careDetail.wxml

@@ -1,44 +1,41 @@
 <view class="fullscreen-bg">
-  <t-navbar title="服务包详情" left-arrow />
-  <scroll-view 
-    class="page-scroll__container" 
-    scroll-y 
-  >
+  <t-navbar title="{{name}}" left-arrow />
+  <scroll-view class="page-scroll__container" scroll-y>
     <block wx:if="{{!loading}}">
-        <!-- 调理中卡片 -->
-        <view class="info-card card-content">
-          <view class="status-tag">
-            {{statusText}}
-          </view>
-          <view class="detail-container">
-            <view class="detail-box">
-              <view class="row"><text class="label">开具时间:</text>{{careDetail.createTime}}</view>
-              <view class="row"><text class="label">开具医生:</text>{{careDetail.createBy}}</view>
-              <view class="delivery" wx:if="{{isShowDelivery}}">
-              <view style="margin-bottom:10px"> 
+      <!-- 调理中卡片 -->
+      <view class="info-card card-content">
+        <view class="status-tag">
+          {{statusText}}
+        </view>
+        <view class="detail-container">
+          <view class="detail-box">
+            <view class="row"><text class="label">开具时间:</text>{{careDetail.createTime}}</view>
+            <view class="row"><text class="label">开具医生:</text>{{careDetail.createBy}}</view>
+            <view class="delivery" wx:if="{{isShowDelivery}}">
+              <view style="margin-bottom:10px">
                 <text class="label">配送:</text>
                 <text>是</text>
               </view>
-                <view class="address-block">
-                 <view>
-                 {{careDetail.provinceName}}{{careDetail.cityName}}{{careDetail.areaName}}{{careDetail.detailAddress}}
-                  </view>
-                  <view>
+              <view class="address-block">
+                <view>
+                  {{careDetail.provinceName}}{{careDetail.cityName}}{{careDetail.areaName}}{{careDetail.detailAddress}}
+                </view>
+                <view>
                   <text style="margin-right:10px" wx:if="{{careDetail.patientName || careDetail.liaison}}">
-                   {{careDetail.patientName || careDetail.liaison}}</text>
+                    {{careDetail.patientName || careDetail.liaison}}</text>
                   <text wx:if="{{careDetail.phone}}">{{careDetail.phone}}</text>
-                  </view>
                 </view>
               </view>
-              <view class="row"><text class="label" wx:if="{{careDetail.cost}}">价格:</text>{{careDetail.cost}}元</view>
             </view>
+            <view class="row"><text class="label" wx:if="{{careDetail.cost}}">价格:</text>{{careDetail.cost}}元</view>
           </view>
         </view>
+      </view>
 
-        <view class="bottom-box">
+      <view class="bottom-box">
         <!-- 健康状况卡片 -->
         <view class="info-card status-card">
-          <view class="row">
+          <view class="row row-box">
             <image class="icon" src="../../assets/icon/icon_health@2x.png" mode="heightFix" />
             <text class="card-title">健康状况</text>
           </view>
@@ -50,11 +47,11 @@
             <view class="row"><text class="label">证型:</text>{{careDetail.healthAnalysisReport.diagnoseSyndromeSummary}}</view>
           </view>
         </view>
-           </view>
-        <!-- 调养方案 -->
-           <view class="bottom-box">
+      </view>
+      <!-- 调养方案 -->
+      <view class="bottom-box">
         <view class="info-card status-card care-box">
-          <view class="row">
+          <view class="row row-box">
             <image class="icon" src="../../assets/icon/icon_scheme@2x.png" mode="heightFix" />
             <text class="card-title">调养方案</text>
           </view>
@@ -63,33 +60,22 @@
             <view class="scheme-card" wx:if="{{item.conditioningProgramDetail.isOffline && item.conditioningProgramDetail.isOffline==='Y'}}">
               <view class="scheme-title" wx:if="{{item.conditioningProgramDetail && item.conditioningProgramDetail.name && item.conditioningProgramDetail.name!=='null'}}">{{item.conditioningProgramDetail.name}}</view>
               <view class="divider"></view>
-            <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
-               <view class="carousel-container" >
+              <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
+                <view class="carousel-container">
                   <!-- 加载状态 -->
                   <view wx:if="{{carouselLoading[item.id]}}" class="carousel-loading">
                     <t-loading size="40rpx" text="加载中..." />
                   </view>
                   <!-- 轮播图 -->
-                  <media-carousel 
-                    wx:else 
-                    mediaList="{{item.carouselMediaList}}"
-                    showIndicator="{{true}}" 
-                    autoplay="{{true}}"
-                    interval="{{4000}}" 
-                    circular="{{true}}" 
-                    bind:imageload="onCarouselLoaded" 
-                    bind:imageerror="onImageError" 
-                    bind:videoerror="onVideoError" 
-                    itemId="{{item.id}}" 
-                  />
-                </view>
+                  <media-carousel wx:else mediaList="{{item.carouselMediaList}}" showIndicator="{{true}}" autoplay="{{true}}" interval="{{4000}}" circular="{{true}}" bind:imageload="onCarouselLoaded" bind:imageerror="onImageError" bind:videoerror="onVideoError" itemId="{{item.id}}" />
                 </view>
+              </view>
               <view class="scheme-row light"><text class="text-gray" wx:if="{{item.arrangeDate || item.arrangeDate!==null}}">下次时间:</text>{{item.arrangeDate}}</view>
               <view class="scheme-row between">
                 <text>
                   <text class="text-gray">已完成:</text>
                   <text class="success">
-                    <text> {{item.finishCount}}次</text>
+                    <text>{{item.finishCount}}次</text>
                     <text style="margin:0 5px;color:black">/</text>
                     <text style="color:black">{{item.totalMeasure}}次</text>
                   </text>
@@ -98,13 +84,13 @@
               </view>
               <view class="scheme-row">
                 <text class="text-gray">频次:</text>
-                每{{item.frequencyType}}  {{item.frequencyMeasure}} {{item.conditioningProgramDetail.cpFixedPricingRule.convertUnit || '次'}}
+                每{{item.frequencyType}}天{{item.frequencyMeasure}}{{item.conditioningProgramDetail.cpFixedPricingRule.convertUnit || '次'}}
               </view>
               <view class="scheme-row">
                 <text class="text-gray">机构:</text>
                 {{item.conditioningProgramDetail.conditioningProgramSupplierName}}
               </view>
-              <view class="scheme-bottom" wx:if="{{item.actualStartDate}}">
+              <view class="scheme-bottom" wx:if="{{item.actualStartDate!=''}}">
                 <text class="next-time" wx:if="{{item.arrangeDate}}">下一次时间:{{item.arrangeDate}}</text>
                 <view class="link opt-box" bindtap="onOffline" data-id="{{item.id}}">
                   <t-icon name="app" size="24rpx" color="#1976d2" />
@@ -116,76 +102,48 @@
             <view class="scheme-card" wx:if="{{item.conditioningProgramDetail.isOffline && item.conditioningProgramDetail.isOffline==='N'}}">
               <view class="scheme-title">{{item.conditioningProgramDetail.name}}</view>
               <view class="divider"></view>
-                 <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
-               <view class="carousel-container">
+              <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
+                <view class="carousel-container">
                   <!-- 加载状态 -->
                   <view wx:if="{{carouselLoading[item.id]}}" class="carousel-loading">
                     <t-loading size="40rpx" text="加载中..." />
                   </view>
                   <!-- 轮播图 -->
-                  <media-carousel 
-                    wx:else 
-                    mediaList="{{item.carouselMediaList}}" 
-                    showIndicator="{{true}}" 
-                    autoplay="{{true}}" 
-                    interval="{{4000}}" 
-                    circular="{{true}}" 
-                    bind:imageload="onCarouselLoaded"   
-                    bind:imageerror="onImageError" 
-                    bind:videoerror="onVideoError" 
-                    itemId="{{item.id}}" 
-                  />
-                </view>
+                  <media-carousel wx:else mediaList="{{item.carouselMediaList}}" showIndicator="{{true}}" autoplay="{{true}}" interval="{{4000}}" circular="{{true}}" bind:imageload="onCarouselLoaded" bind:imageerror="onImageError" bind:videoerror="onVideoError" itemId="{{item.id}}" />
                 </view>
+              </view>
               <view class="scheme-row light">
                 <text class="text-gray">数量:</text>
                 <text>{{item.totalMeasure}}{{item.conditioningProgramDetail.cpFixedPricingRule.convertUnit}}</text>
-             
+
               </view>
               <view class="scheme-row between">
                 <text>
                   <text class="label between">频次:</text>
                   <text>每{{item.frequencyType}}天{{item.frequencyMeasure}}{{item.conditioningProgramDetail.cpFixedPricingRule.convertUnit}}</text>
                 </text>
-              <view class="link" bindtap="onCardRecord" data-id="{{item.id}}" wx:if="{{item.conditioningProgramDetail.isOffline && item.conditioningProgramDetail.isOffline==='N'}}">打卡记录</view>
+                <view class="link" bindtap="onCardRecord" data-id="{{item.id}}" wx:if="{{item.conditioningProgramDetail.isOffline && item.conditioningProgramDetail.isOffline==='N'}}">打卡记录</view>
 
               </view>
               <view class="desc-row" wx:if="{{item.remark}}">
-              <text class="label between">说明:</text>
+                <text class="label between">说明:</text>
                 <text class="desc-label">{{item.remark || ''}}</text>
               </view>
             </view>
-  </view>
             <!-- 健康评估-->
-               <view class="bottom-box">
             <view class="scheme-card" wx:if="{{item.conditioningProgramDetail.conditioningProgramType && item.conditioningProgramDetail.conditioningProgramType==='健康评估'}}">
               <view class="scheme-title">{{item.conditioningProgramDetail.name}}</view>
               <view class="divider"></view>
-             <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
-               <view class="carousel-container">
+              <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
+                <view class="carousel-container">
                   <!-- 加载状态 -->
                   <view wx:if="{{carouselLoading[item.id]}}" class="carousel-loading">
                     <t-loading size="40rpx" text="加载中..." />
                   </view>
                   <!-- 轮播图 -->
-                  <media-carousel 
-                    wx:else 
-                    mediaList="{{item.carouselMediaList}}" 
-                    showIndicator="{{true}}" 
-                    autoplay="{{true}}" 
-                    interval="{{4000}}" 
-                    circular="{{true}}" 
-                    bind:change="onCarouselChange" 
-                    bind:imageload="onCarouselLoaded" 
-                    bind:imageerror="onImageError" 
-                    bind:videoplay="onVideoPlay" 
-                    bind:videopause="onVideoPause" 
-                    bind:videoended="onVideoEnded" 
-                    bind:videoerror="onVideoError" 
-                    itemId="{{item.id}}" 
-                  />
-                </view>
+                  <media-carousel wx:else mediaList="{{item.carouselMediaList}}" showIndicator="{{true}}" autoplay="{{true}}" interval="{{4000}}" circular="{{true}}" bind:change="onCarouselChange" bind:imageload="onCarouselLoaded" bind:imageerror="onImageError" bind:videoplay="onVideoPlay" bind:videopause="onVideoPause" bind:videoended="onVideoEnded" bind:videoerror="onVideoError" itemId="{{item.id}}" />
                 </view>
+              </view>
               <view class="scheme-row between" style="margin-top:15px">
                 <view>
                   <text class="text-gray">已完成:</text>
@@ -195,10 +153,8 @@
                     <text style="color:black">{{item.totalMeasure}}次</text>
                   </text>
                 </view>
-                <view class="link" bindtap="onReport" 
-                data-id="{{item.id}}" 
-                wx:if="{{item.conditioningProgramDetail.conditioningProgramType && item.conditioningProgramDetail.conditioningProgramType==='健康评估'}}">
-                健康分析报告</view>
+                <view class="link" bindtap="onReport" data-id="{{item.id}}" wx:if="{{item.conditioningProgramDetail.conditioningProgramType && item.conditioningProgramDetail.conditioningProgramType==='健康评估'}}">
+                  健康分析报告</view>
               </view>
               <view class="scheme-row">
                 <text class="text-gray">频次:</text>
@@ -212,13 +168,44 @@
                 <text class="desc-label">{{item.remark}}</text>
               </view>
             </view>
+                  <!-- 健康咨询-->
+            <view class="scheme-card" wx:if="{{item.conditioningProgramDetail.conditioningProgramType && item.conditioningProgramDetail.conditioningProgramType==='健康咨询'}}">
+              <view class="scheme-title">{{item.conditioningProgramDetail.name}}</view>
+              <view class="divider"></view>
+              <view class="scheme-row between" style="margin-top:15px">
+                <view>
+                  <text class="text-gray">数量:</text>
+                  <text class="success">
+                   <text style="color:black" wx:if="{{item.frequencyType==='不限'}}">不限次</text>
+                    <text style="color:black" wx:else>{{item.totalMeasure}}次</text>
+                  </text>
+                </view>
+                <view class="link" bindtap="onReport" data-id="{{item.id}}" wx:if="{{false}}">
+                  咨询记录</view>
+              </view>
+              <view class="scheme-row">
+                <text class="text-gray">频次:</text>
+                <view wx:if="{{item.frequencyType==='不限'}}">{{item.frequencyType}}{{item.conditioningProgramDetail.cpFixedPricingRule.convertUnit}}</view>
+                <view wx:else>
+                  每{{item.frequencyType}}天{{item.frequencyMeasure}}{{item.conditioningProgramDetail.cpFixedPricingRule.convertUnit}}
+                </view>
+              </view>
+              <view class="desc-row" wx:if="{{item.remark}}">
+                <text class="text-gray">操作指南:</text>
+                <text class="desc-label">{{item.remark}}</text>
+              </view>
+            </view>
+
+
           </view>
+
+
         </view>
-          </view>
-        <!--调养效果  -->
-        <view class="bottom-box">
+      </view>
+      <!--调养效果  -->
+      <view class="bottom-box">
         <view class="info-card status-card result-box">
-          <view class="row">
+          <view class="row row-box" style="margin-bottom:27rpx">
             <image class="icon" src="../../assets/icon/icon_effect@3x.png" mode="heightFix" />
             <text class="header-title">调养效果</text>
           </view>
@@ -302,8 +289,13 @@
                 <scroll-view class="symptoms-column" scroll-x>
                   <view class="symptoms-grid">
                     <view wx:for="{{healthReports}}" wx:key="healthAnalysisReportId" class="symptoms-row">
-                      <view wx:for="{{item.symptoms}}" wx:key="index" class="symptom-cells" wx:for-item="symptom">
-                        {{symptom.name || ' '}}
+                      <view wx:for="{{item.symptoms}}" wx:key="index" class="symptom-cells" wx:for-item="symptom" style="min-width: {{symptomCellWidth}}; max-width: {{symptomCellWidth}};">
+                        <block wx:if="{{symptom.name}}">
+                          <text>{{symptom.name}}{{symptom.label}}</text>
+                          <text wx:if="{{symptom.trend==='up'}}" style="margin-left:8rpx;color:#f44336">↑</text>
+                          <text wx:if="{{symptom.trend==='down'}}" style="margin-left:8rpx;color:#4caf50">↓</text>
+                        </block>
+                        <block wx:else></block>
                       </view>
                     </view>
                   </view>
@@ -314,13 +306,11 @@
           <!--指标  -->
           <view class="index-container">
             <view class="index-title">指标</view>
-             <record-index></record-index>
+            <record-index></record-index>
           </view>
         </view>
 
-
-
-        </view>
-      </block>
+      </view>
+    </block>
   </scroll-view>
 </view>

+ 3 - 1
miniprogram/module/charts/record-care/record-care.scss

@@ -1,8 +1,10 @@
 .chart-care {
-  width: 100%;
+  width: 92%;
   height: 500rpx;
   background: #fff;
   border-radius: 12rpx;
+  margin: auto;
+  padding-top: 20px;
 }
 
 .canvas-box {

+ 23 - 1
miniprogram/module/chats/components/guide/guide.ts

@@ -1,6 +1,7 @@
 // module/chats/components/guide/guide.ts
 import { getPatients } from "../../../../pages/home/request";
 import { toCertificationPage } from "../../../../pages/home/router";
+import { Post } from "../../../../lib/request/method";
 Component({
   lifetimes: {
    attached() {
@@ -10,6 +11,8 @@ Component({
       this.handleA();
       wx.removeStorageSync("showGuideActive");
     }
+    // 获取评估剩余次数
+    this.setAnalysisCount();
    },
    
   },
@@ -21,14 +24,33 @@ Component({
   properties: {
     id: { type: String, value: "" },
     active: { type: Boolean, value: false },
-    analysisCount: { type: Number, value: 0 },
   },
   data: {
+    analysisCount: 0,
     result: [] as string[],
     result2: false,
     patient: {} as any,
   },
   methods: {
+    // 获取评估剩余次数
+    async setAnalysisCount(count: number) {
+      try {
+        // 获取剩余次数
+        const count = await Post(
+          `/patientInfoManage/rechargeUseDetail`,
+          {},
+          {
+            transform({ data }: any) {
+              return data?.residuedCou;
+            },
+          }
+        );
+        this.setData({ analysisCount: count });
+        console.log(this.data.analysisCount, "this.data.analysisCount");
+      } catch (error) {
+        console.error("获取剩余次数失败:", error);
+      }
+    },
     async handleA() {
       const { patient } = await getPatients(/*this.data.patientId*/);
       if (!patient) await toCertificationPage();

+ 1 - 1
miniprogram/module/chats/components/guide/guide.wxml

@@ -18,7 +18,7 @@
       t-class="cell-border-gradient {{_.getClassName(active)}}" 
       t-class-hover="custom-cell-hover"
       t-class-title="health-analysis-title"
-      title="1、健康分析" 
+      title="1、健康分析(剩余{{analysisCount}}次)" 
       hover="{{active}}" 
       bind:tap="handleA"
       style="--td-cell-hover-color: #F5F5F5;"

+ 1 - 1
miniprogram/module/chats/components/message-select/message-select.ts

@@ -15,7 +15,7 @@ interface HandleEvent {
 
 Component({
   properties: {
-    payload: { type: Object, value: { title: '', multiple: false, options: [] }, result: '' },
+    payload: { type: Object, value: { title: '', multiple: false, options: [] }, result: '', belongNew: null },
     active: { type: Boolean, value: false },
   },
   data: {

+ 21 - 13
miniprogram/module/chats/components/questionnaire/questionnaire.ts

@@ -85,7 +85,7 @@ Component({
     boxBottom(event: boxBottom) {
       this.setData({ inputBoxBottom: event.detail.inputBoxBottom });
       this.triggerEvent("boxBottom", {
-        inputBoxBottom: this.data.inputBoxBottom+100,
+        inputBoxBottom: this.data.inputBoxBottom + 100,
       });
     },
     handle(event: HandleEvent) {
@@ -119,7 +119,6 @@ Component({
         );
         this.triggerEvent("count", { count });
         if (count > 0) {
-          // if (count < 0) {
           this.setData({
             [`_next.classify`]: "",
             [`_next.dialogId`]: "",
@@ -186,20 +185,26 @@ Component({
           // 如果是健康评估 调用其他接口  但后端返回的数据是一样的
 
           let data: any = {};
-          if (isAnalysis === 3) {
-            const res = await Post(`/dialogueManage/dialog`, this.data._next);
-            data = res.data;
-          } else {
-            const res = await Post(
-              `/dialogueManage/dialogTreat`,
-              this.data._next
-            );
-            data = res.data;
-          }
+          const res = await Post(
+            `/dialogueManage/dialogTreat`,
+            this.data._next
+          );
+          data = res.data;
+          // if (isAnalysis === 3) {
+          //   const res = await Post(`/dialogueManage/dialog`, this.data._next);
+          //   data = res.data;
+          // } else {
+          //   const res = await Post(
+          //     `/dialogueManage/dialogTreat`,
+          //     this.data._next
+          //   );
+          //   data = res.data;
+          // }
           // const { data } = await Post(
           //   `/dialogueManage/dialog`,
           //   this.data._next
           // );
+
           data.nextQuestions?.forEach((question: any, index: number) => {
             // isAnalysis 2是随访  3健康管家 4健康评估
             if (isAnalysis === 2) {
@@ -265,7 +270,10 @@ Component({
             }
           });
           // 对话管家
-          if (isAnalysis === 3) {
+          if (
+            (isAnalysis === 3 && data.classify === "report") ||
+            (isAnalysis === 4 && data.classify === "report")
+          ) {
             if (data.classify === "report") {
               const diff = dayjs().diff(this.data._timestamp, "m");
               this._createMessage({

+ 15 - 10
miniprogram/module/health/components/care-record/care-record.ts

@@ -3,16 +3,16 @@ import { getCareRecordListMethod } from "../../request";
 Component({
   behaviors: ["wx://form-field-group"],
   lifetimes: {
-    attached() {
+    attached(this: any) {
       this.getCareRecordList();
     },
   },
   methods: {
-    async getCareRecordList() {
+    async getCareRecordList(this: any) {
       // 0 进行中 1 已完成
       const res = await getCareRecordListMethod("0");
       // console.log(res,"所有的调养记录列表");
-      if(res && res.data && res.data.length > 0) {
+      if (res && res.data && res.data.length > 0) {
         this.setData({
           careRecordList: res.data,
         });
@@ -22,14 +22,21 @@ Component({
         });
       }
     },
-    goDetail(e: any) {
+    goDetail(this: any, e: any) {
       const id = e.currentTarget.dataset.id;
-      if(id) {
+      const name = e.currentTarget.dataset.name;
+      console.log(id, name, "数据");
+      if (id) {
         wx.navigateTo({
-          url: `/module/care/pages/careDetail/careDetail?id=${id}`,
+          url: `/module/care/pages/careDetail/careDetail?id=${id}&name=${name}`,
+        });
+      } else {
+        wx.showToast({
+          title: "数据异常",
+          icon: "none",
         });
       }
-  },
+    },
   },
   properties: {},
 
@@ -38,9 +45,7 @@ Component({
    */
   data: {
     loading: false,
-    careRecordList: [
-    ],
+    careRecordList: [],
   },
   observers: {},
- 
 });

+ 2 - 1
miniprogram/module/health/components/care-record/care-record.wxml

@@ -18,7 +18,8 @@
         <view class="table-cell">开具时间</view>
         <view class="table-cell">服务包名称</view>
       </view>
-      <view class="table-row" wx:for="{{careRecordList}}" wx:key="id" bindtap="goDetail" data-id="{{item.id}}">
+      <view class="table-row" wx:for="{{careRecordList}}" wx:key="id"
+       bindtap="goDetail" data-id="{{item.id}}" data-name="{{item.conditioningWrapName}}">
         <view class="table-cell">{{item.operateTime}}</view>
         <view class="table-cell">{{item.conditioningWrapName}}</view>
       </view>

+ 1 - 1
miniprogram/module/health/pages/report/report.scss

@@ -11,7 +11,7 @@
   background: white;
     border-radius: 10px;
     // padding: 30px 20px 10px 20px;
-    padding: 15px 5px 15px 16px;
+    padding: 15px 10px 15px 16px;
 }
 .body-image{
   width: 800px;

+ 1 - 1
miniprogram/module/user/components/field-radio/field-radio.scss

@@ -1 +1 @@
-/* module/user/components/field-radio/field-radio.wxss */
+/* module/user/components/field-radio/field-radio.wxss */

+ 21 - 14
miniprogram/module/user/pages/user-edit/user-edit.ts

@@ -23,12 +23,15 @@ Component({
     dirty: false,
   },
   methods: {
-    onSubmit(event: WechatMiniprogram.FormSubmit) {
+    async onSubmit(event: WechatMiniprogram.FormSubmit) {
       const submitBtn = this.selectComponent("#submitBtn");
       this.setData({ dirty: true });
       const data = { ...this.data.model, ...event.detail.value };
       if (!data.patientId) data.patientId = wx.getStorageSync("patientId");
       // 表单验证
+      if (!data.sex) {
+        if (submitBtn) submitBtn.resetState();
+      }
       if (data.sex.toString() === "1" && !data.womenSpecialPeriod) {
         if (submitBtn) submitBtn.resetState();
         return getTickleContext
@@ -43,19 +46,23 @@ Component({
         if (submitBtn) submitBtn.resetState();
         return getTickleContext.call(this).showWarnMessage("请填写体重");
       }
-
-      updateUserInfoMethod(<any>data)
-        .then(() => wx.navigateBack())
-        .then(() => {
-          this.getOpenerEventChannel().emit("update2", event.detail.value);
-        })
-        .catch((error) => {
-          // 请求失败时恢复按钮状态
-          if (submitBtn) {
-            submitBtn.resetState();
-          }
-          getTickleContext.call(this).showWarnMessage(error.errMsg);
-        });
+      try {
+        await updateUserInfoMethod(<any>data)
+          .then(() => wx.navigateBack())
+          .then(() => {
+            this.getOpenerEventChannel().emit("update2", event.detail.value);
+          })
+          .catch((error) => {
+            // 请求失败时恢复按钮状态
+            if (submitBtn) {
+              submitBtn.resetState();
+            }
+            getTickleContext.call(this).showWarnMessage(error.errMsg);
+          });
+      } catch (error) {
+        if (submitBtn) submitBtn.resetState();
+        getTickleContext.call(this).showWarnMessage(error.errMsg);
+      }
     },
   },
 });

+ 42 - 53
miniprogram/pages/home/home.scss

@@ -4,13 +4,29 @@
 @import "../../themes/card.scss";
 
 .body-img {
-  background-image: url("/assets/bg/pic_body@2x.png");
-  background-repeat: no-repeat;
-  background-size: contain;
-  /* or contain, depending on your needs */
-  background-position: right;
-}
+  position: relative;
 
+  .body-bg-image {
+    position: absolute;
+    top: 0;
+    right: -140rpx;
+    height: 100%;
+    width: fit-content;
+    z-index: 0;
+    image-rendering: -webkit-optimize-contrast;
+    image-rendering: crisp-edges;
+    -webkit-image-rendering: crisp-edges;
+    -moz-image-rendering: crisp-edges;
+    -ms-image-rendering: crisp-edges;
+  }
+
+  > view,
+  > text,
+  > image {
+    position: relative;
+    z-index: 1;
+  }
+}
 
 .fullscreen-bg {
   background-image: url("/assets/bg/bg_home.png");
@@ -21,13 +37,12 @@
   background-position: center;
   position: relative;
   padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
-  /* tabbar 高度 + 安全区域 */
 }
 
 .steps-container {
   display: flex;
   align-items: baseline;
-  // justify-content: space-around;
+  justify-content: space-between;
   padding: 0px 15px 0 25px;
 
   .warn-box {
@@ -73,7 +88,7 @@
 }
 
 .pieces {
-  color: #2BA471;
+  color: #2ba471;
   font-size: 30rpx;
   margin: 0px 20rpx 0px 20rpx;
 }
@@ -135,9 +150,8 @@
     line-height: 45px;
     justify-content: center;
     border: 2px solid white;
-    // background: #D6E5FB;
     background: linear-gradient(to bottom, #d9e7fb, #c1d5f5);
-    /* 渐变蓝色 */
+    // 渐变蓝色
     width: 95%;
     border-radius: 6px;
     margin: auto;
@@ -165,8 +179,6 @@
   }
 }
 
-/* pages/home/home.wxss */
-
 $scale: 0.5;
 
 .header-container {
@@ -180,9 +192,6 @@ $scale: 0.5;
 
 .user-info-wrapper {
   position: relative;
-  // display: flex;
-  // flex-direction: row;
-  // justify-content: center;
   align-items: center;
   padding: 0 8px;
   width: 254px * $scale;
@@ -208,7 +217,6 @@ $scale: 0.5;
       flex: none;
       margin-left: 4px;
       font-size: 36rpx;
-      // color: global.$primary-color;
       color: #191919;
       margin-right: 10rpx;
       font-weight: 500;
@@ -246,7 +254,7 @@ $scale: 0.5;
     }
   }
 
-  .tool+.tool {
+  .tool + .tool {
     margin-left: 8px;
   }
 }
@@ -272,7 +280,7 @@ $scale: 0.5;
     padding: 6px 0 24px;
   }
 
-  .row+.row {
+  .row + .row {
     margin-top: 8px;
   }
 
@@ -298,7 +306,6 @@ $scale: 0.5;
     width: 72px;
     height: 72px;
     transform: translateY(6px);
-    // z-index: 2;
   }
 
   .fab {
@@ -362,8 +369,6 @@ $scale: 0.5;
 
 .popup-block {
   background: white;
-  // padding: 20rpx 40rpx 40rpx 40rpx;
-  // border-radius: 16rpx;
   overflow: hidden;
   height: 45vh !important;
 }
@@ -411,16 +416,14 @@ $scale: 0.5;
   z-index: 100;
   background-color: #fff;
   padding-bottom: env(safe-area-inset-bottom);
-  /* 适配底部安全区域 */
+  // 适配底部安全区域
   box-shadow: 0 -2rpx 6rpx rgba(0, 0, 0, 0.1);
 }
 
 .page-scroll__container {
   position: relative;
   height: calc(100vh - 180rpx) !important;
-  /* 减去 navbar 和 tabbar 的高度 */
   padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
-  /* tabbar 高度 + 安全区域 */
   box-sizing: border-box;
 }
 
@@ -438,7 +441,7 @@ $scale: 0.5;
 }
 
 .care-header {
-  background: linear-gradient(90deg, #4165F4, #78ACFF);
+  background: linear-gradient(90deg, #4165f4, #78acff);
   color: #fff;
   font-weight: bold;
   font-size: 32rpx;
@@ -458,7 +461,7 @@ $scale: 0.5;
   border-bottom: 1px solid #f0f0f0;
   padding: 24rpx 20rpx;
 }
-.detail-box{
+.detail-box {
   display: flex;
   flex-direction: column;
   align-items: center;
@@ -472,7 +475,7 @@ $scale: 0.5;
 .dot {
   width: 12rpx;
   height: 12rpx;
-  background: #1D6FF6;
+  background: #1d6ff6;
   border-radius: 50%;
   margin-right: 16rpx;
 }
@@ -493,8 +496,6 @@ $scale: 0.5;
   margin-left: 12rpx;
 }
 
-
-
 .expand-all {
   display: flex;
   justify-content: center;
@@ -507,8 +508,6 @@ $scale: 0.5;
 .expand-arrow {
   width: 32rpx;
   height: 32rpx;
-  // background: white;
-  // border-radius: 0px 0px 10px 10px;
 }
 
 // 详细内容
@@ -522,7 +521,6 @@ $scale: 0.5;
   display: flex;
   align-items: center;
   margin-bottom: 8rpx;
-  // justify-content: center;
 }
 .item-detail {
   font-size: 28rpx;
@@ -533,35 +531,24 @@ $scale: 0.5;
   display: flex;
   justify-content: space-between;
   align-items: center;
-  // flex-direction: column;
-}
-.item-detail text[style*="color:#2ec4b6"] {
-  font-weight: bold;
-}
-.item-detail text[style*="color:#1976d2"] {
-  margin-left: 8rpx;
-  text-decoration: underline;
 }
 .item-box {
   display: flex;
   flex-direction: column;
-  // align-items: center;
   justify-content: center;
   padding-top: 10px;
 }
-.verify-record{
+.verify-record {
   cursor: pointer;
-  color:#1976d2;
-  // margin-left:20px;
+  color: #1976d2;
   border: 1px solid #1976d2;
   padding: 7rpx 20px;
   border-radius: 10rpx;
-  width: 15%;
+  width: 17%;
   text-align: center;
   margin-right: 10px;
 }
 
-// 轮播组件样式
 .carousel-container {
   margin-top: 20rpx;
   border-radius: 16rpx;
@@ -569,12 +556,11 @@ $scale: 0.5;
   height: 200rpx;
   width: 100%;
   position: relative;
-  
+
   .media-carousel {
     height: 100%;
   }
 
-  // 加载状态覆盖层
   .loading-overlay {
     position: absolute;
     top: 0;
@@ -606,12 +592,15 @@ $scale: 0.5;
   }
 }
 
-// 加载动画
 @keyframes spin {
-  0% { transform: rotate(0deg); }
-  100% { transform: rotate(360deg); }
+  0% {
+    transform: rotate(0deg);
+  }
+  100% {
+    transform: rotate(360deg);
+  }
 }
-.healthyAnalyze{
+.healthyAnalyze {
   font-size: 40rpx;
   text-align: center;
   color: #1976d2;

+ 140 - 7
miniprogram/pages/home/home.ts

@@ -6,6 +6,7 @@ import {
 import { login } from "../../lib/logic";
 import { useRouteQuery } from "../../utils/route-query";
 import { appUpdate } from "../../lib/wx/update";
+import { addPatientOnlineRecordClockIn } from "./request";
 
 const { shared, Easing, timing } = wx.worklet;
 const offset = shared(0);
@@ -100,11 +101,21 @@ Page({
 
   // 获取调养计划
   async getCareLists() {
+    // 保存当前的展开状态和媒体加载状态
+    const currentExpandedStates = this.data.displayList.map((item: any) => ({
+      id: item.id,
+      expanded: item.expanded,
+      _mediaLoaded: item._mediaLoaded
+    }));
+    
     const res = await getCareList();
     if (res && res.length > 0) {
       res.forEach((item: any, index: number) => {
         item.carouselMediaList = [];
-        item._mediaLoaded = false; // 添加媒体加载状态
+        
+        // 检查是否已经加载过媒体内容
+        const existingItem = currentExpandedStates.find(state => state.id === item.id);
+        item._mediaLoaded = existingItem ? existingItem._mediaLoaded : false;
 
         // 确保 item.id 存在且为数字类型
         if (!item.id && item.id !== 0) {
@@ -169,7 +180,7 @@ Page({
         careList: res,
       });
 
-      await this.updateDisplayList();
+      await this.updateDisplayList(currentExpandedStates);
 
       setTimeout(() => {
         res.forEach((item: any, index: number) => {
@@ -246,11 +257,27 @@ Page({
     };
   },
 
-  async updateDisplayList() {
+  async updateDisplayList(preserveExpandedStates?: Array<{id: number, expanded: boolean, _mediaLoaded?: boolean}>) {
     const { careList, allExpanded } = this.data;
+    let newDisplayList: any[] = allExpanded || careList.length <= 4 ? careList : careList.slice(0, 4);
+    
+    // 如果有保存的展开状态和媒体加载状态,则恢复它们
+    if (preserveExpandedStates && preserveExpandedStates.length > 0) {
+      newDisplayList = newDisplayList.map((item: any) => {
+        const savedState = preserveExpandedStates.find(state => state.id === item.id);
+        if (savedState) {
+          return { 
+            ...item, 
+            expanded: savedState.expanded,
+            _mediaLoaded: savedState._mediaLoaded !== undefined ? savedState._mediaLoaded : item._mediaLoaded
+          };
+        }
+        return item;
+      });
+    }
+    
     this.setData({
-      displayList:
-        allExpanded || careList.length <= 4 ? careList : careList.slice(0, 4),
+      displayList: newDisplayList,
     });
   },
   toggleAll() {
@@ -476,6 +503,7 @@ Page({
           .filter(Boolean),
         "healthIndex.loading": false,
       });
+      console.log(this.data.healthIndex.data, "获取健康指数");
     } catch (error) {
       this.setData({
         "healthIndex.data": [],
@@ -806,10 +834,10 @@ Page({
     wx.setStorageSync("showGuideActive", 1);
     wx.setStorageSync("isAnalysis", 3);
   },
-  isGoPunchcard(e: any) {
+  async isGoPunchcard(e: any) {
     const { id, signintime } = e.currentTarget.dataset;
     // 已经打卡了
-    console.log("signinTime=>>>",signintime);
+    console.log("signinTime=>>>", signintime);
     if (signintime) {
       // 已打卡 跳转到打卡页面
       wx.navigateTo({
@@ -817,6 +845,111 @@ Page({
       });
     } else {
       //  todo 打卡
+      const cardId = e.currentTarget.dataset.id;
+      console.log(cardId, "cardId");
+      await addPatientOnlineRecordClockIn(cardId);
+      wx.showToast({
+        title: "打卡成功",
+        icon: "success",
+        duration: 1500,
+      });
+      // 无感刷新调养计划,保持展开状态
+      await this.refreshCareListsWithState();
+    }
+  },
+
+  // 无感刷新调养计划,保持展开状态和媒体加载状态
+  async refreshCareListsWithState() {
+    // 保存当前的展开状态和媒体加载状态
+    const currentExpandedStates = this.data.displayList.map((item: any) => ({
+      id: item.id,
+      expanded: item.expanded,
+      _mediaLoaded: item._mediaLoaded,
+      carouselMediaList: item.carouselMediaList // 保存媒体列表,避免重新加载
+    }));
+    
+    // 获取新数据
+    const res = await getCareList();
+    if (res && res.length > 0) {
+      // 处理新数据,但保持媒体加载状态
+      res.forEach((item: any) => {
+        // 查找对应的旧数据
+        const oldItem = currentExpandedStates.find(state => state.id === item.id);
+        
+        // 如果找到旧数据且媒体已加载,保持媒体状态
+        if (oldItem && oldItem._mediaLoaded && oldItem.carouselMediaList) {
+          // 保持原有的媒体列表,避免重新加载
+          item.carouselMediaList = oldItem.carouselMediaList;
+          item._mediaLoaded = true;
+        } else {
+          // 否则重新构建媒体列表
+          item.carouselMediaList = [];
+          item._mediaLoaded = false;
+          
+          // 添加photo
+          if (item.photo) {
+            item.carouselMediaList.push({
+              type: "image",
+              src: item.photo,
+              cacheKey: `photo_${item.id}_${item.photo}` // 添加缓存键
+            });
+          }
+          
+          // 添加itemImgFirst
+          if (item?.itemImgFirst) {
+            item.carouselMediaList.push({
+              type: "image",
+              src: item.itemImgFirst,
+              cacheKey: `img_${item.id}_${item.itemImgFirst}` // 添加缓存键
+            });
+          }
+          
+          // 添加itemVideoFirst
+          if (item?.itemVideoFirst) {
+            item.carouselMediaList.push({
+              type: "video",
+              src: item.itemVideoFirst,
+              poster: item.photo || item.itemImgFirst,
+              cacheKey: `video_${item.id}_${item.itemVideoFirst}` // 添加缓存键
+            });
+          }
+          
+          // 如果没有媒体内容,直接标记为已加载
+          if (item.carouselMediaList.length === 0) {
+            item._mediaLoaded = true;
+          }
+        }
+        
+        // 确保 id 是数字类型
+        item.id = Number(item.id);
+      });
+      
+      // 更新 careList
+      this.setData({
+        careList: res,
+      });
+      
+      // 更新 displayList 并恢复展开状态
+      const { allExpanded } = this.data;
+      let newDisplayList: any[] = allExpanded || res.length <= 4 ? res : res.slice(0, 4);
+      
+      // 恢复展开状态
+      newDisplayList = newDisplayList.map((item: any) => {
+        const savedState = currentExpandedStates.find(state => state.id === item.id);
+        if (savedState) {
+          return { 
+            ...item, 
+            expanded: savedState.expanded,
+            _mediaLoaded: savedState._mediaLoaded,
+            carouselMediaList: savedState.carouselMediaList || item.carouselMediaList
+          };
+        }
+        return item;
+      });
+      
+      this.setData({
+        displayList: newDisplayList,
+      });
     }
   },
 });

+ 31 - 43
miniprogram/pages/home/home.wxml

@@ -8,7 +8,7 @@
       <view class="follow-box" bind:tap="showFollowPopup">
         <image src="../../assets/bg/icon_notice@3x.png" mode="heightFix" class="notice-icon" />
         <view class="pieces">{{popupList.length}}</view>
-        <view class="follow-text">诊疗随访提醒</view>
+        <view class="follow-text" wx:if="{{popupList.length>0}}">{{popupList[0].title}}</view>
       </view>
       <view class="tool-bar-wrapper">
         <view class="tool" wx:if="{{location.description}}">
@@ -21,6 +21,8 @@
     </view>
 
     <view class="body-img">
+      <!-- 使用 image 标签确保图片清晰度 -->
+      <image class="body-bg-image" src="../../assets/bg/pic_body@2x.png" mode="aspectFit" />
       <view class="header-container">
         <view class="user-info-wrapper" wx:if="{{patient}}">
           <view class="user-box">
@@ -35,21 +37,18 @@
       </view>
 
 
-
-
-
       <view class="steps-container" wx:if="{{statusList.length>0}}">
         <vertical-steps statusList="{{statusList}}" dataset="{{healthReport.data}}" bind:position="onBodyModel" />
         <view class="warn-box" wx:if="{{healthIndex.data.length>0}}">
           <image src="../../assets/bg/icon_warning@3x.png" class="warn-img" />
           <view class="right-box" bind:tap="tabValue">
-            <view style="margin-bottom:10rpx" wx:for="{{healthIndex.data}}" wx:key="{{item.quotaId}}">{{item.name}}</view>
+            <view style="margin-bottom:10rpx" wx:for="{{healthIndex.data}}" wx:key="{{item.quotaId}}">{{item}}</view>
           </view>
         </view>
       </view>
-       <view class="healthyAnalyze" bindtap="goHealthAnalyze" wx:if="{{isShowComplete}}">
-   请完成健康评估
-     </view>
+      <view class="healthyAnalyze" bindtap="goHealthAnalyze" wx:if="{{isShowComplete}}">
+        请完成健康评估
+      </view>
       <view class="report-container" bind:tap="toReportPage" wx:if="{{healthReport.data.reportTime}}">
         <view class="report-box">
           <view>
@@ -81,46 +80,35 @@
               </view>
               <!-- 这里放详细内容 -->
               <view class="item-detail" wx:if="{{item.expanded}}">
-        
+
                 <view style="width: 60%;">
-                <!-- 轮播媒体容器 -->
-                <view class="carousel-container" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
-                  <!-- 轮播组件 -->
-                  <media-carousel 
-                    wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}"
-                    mediaList="{{item.carouselMediaList}}" 
-                    showIndicator="{{true}}" 
-                    autoplay="{{true}}" 
-                    interval="{{4000}}" 
-                    circular="{{true}}" 
-                    bind:imageload="onImageLoad" 
-                    bind:imageerror="onImageError" 
-                    bind:videoerror="onVideoError" 
-                    itemId="{{item.id}}"
-                  />
-                  <!-- 加载状态覆盖层 -->
-                  <view class="loading-overlay" wx:if="{{!item._mediaLoaded}}">
-                    <view class="loading-spinner"></view>
-                    <text class="loading-text">加载中...</text>
+                  <!-- 轮播媒体容器 -->
+                  <view class="carousel-container" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
+                    <!-- 轮播组件 -->
+                    <media-carousel wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}" mediaList="{{item.carouselMediaList}}" showIndicator="{{true}}" autoplay="{{true}}" interval="{{4000}}" circular="{{true}}" bind:imageload="onImageLoad" bind:imageerror="onImageError" bind:videoerror="onVideoError" itemId="{{item.id}}" />
+                    <!-- 加载状态覆盖层 -->
+                    <view class="loading-overlay" wx:if="{{!item._mediaLoaded}}">
+                      <view class="loading-spinner"></view>
+                      <text class="loading-text">加载中...</text>
+                    </view>
                   </view>
-                </view>
-                <view class="item-box">
-                  <view class="flex" wx:if="{{item.arrangeDate}}"><text>下一次时间:</text><text>{{item.arrangeDate}}</text></view>
-                  <view class="flex">
-                  <text wx:if="{{item.isOffline==='Y'}}">已完成:<text style="color:#2ec4b6">{{item.finishCount}}次</text><text style="margin:0 5px">/</text>
-                  {{item.totalMeasure}}次</text>
-                    <view catchtap="onRecord" data-id="{{item.id}}" wx:if="{{item.isOffline==='Y'}}" class="verify-record">核销记录</view>
+                  <view class="item-box">
+                    <view class="flex" wx:if="{{item.arrangeDate}}"><text>下一次时间:</text><text>{{item.arrangeDate}}</text></view>
+                    <view class="flex">
+                      <text wx:if="{{item.isOffline==='Y'}}">已完成:<text style="color:#2ec4b6">{{item.finishCount}}次</text><text style="margin:0 5px">/</text>
+                        <text>{{item.totalMeasure}}次</text></text>
+
+                    </view>
+                    <view>频次:每{{item.frequencyType}}天{{item.frequencyMeasure}}{{item.convertUnit}}</view>
+                    <view>开具医生:{{item.operateBy}}</view>
+                    <view wx:if="{{item.conditioningProgramSupplierName}}">机构:{{item.conditioningProgramSupplierName}}</view>
                   </view>
-                  <view>频次:每{{item.frequencyType}}天{{item.frequencyMeasure}}{{item.convertUnit}}</view>
-                  <view>开具医生:{{item.operateBy}}</view>
-                  <view wx:if="{{item.conditioningProgramSupplierName}}">机构:{{item.conditioningProgramSupplierName}}</view>
                 </view>
-</view>
-<view  data-id="{{item.id}}" wx:if="{{item.isOffline==='N'}}" class="verify-record" bindtap="isGoPunchcard" 
-                    data-signinTime="{{item.signinTime}}">{{
+                <view data-id="{{item.id}}" wx:if="{{item.isOffline==='N'}}" class="verify-record" bindtap="isGoPunchcard" data-signinTime="{{item.signinTime}}">{{
                       item.signinTime?'已打卡':'打卡'
                     }}</view>
-  </view>
+                <view catchtap="onRecord" data-id="{{item.id}}" wx:if="{{item.isOffline==='Y'}}" class="verify-record">核销记录</view>
+              </view>
             </view>
           </block>
         </view>
@@ -225,7 +213,7 @@
         <view class="CT row" wx:for="{{position.CT}}" wx:key="*this">{{item}}</view>
       </block>
       <view class="bottom-wrapper">
-        <form-button index="2" bind:tap="hideDraggableSheet"></form-button>
+        <form-button index="2" bind:tap="hideDraggableSheet" text="2"></form-button>
       </view>
     </sticky-section>
   </scroll-view>

+ 9 - 1
miniprogram/pages/home/request.ts

@@ -156,7 +156,7 @@ export function getPatientPhone() {
 // 获取订单列表
 export function getOrderList(patientId: string | number, progress: string | number) {
   return Post(
-    `/patientCrManage/pagePcrs`,
+    `/patientCrManage/pagePcrOrders`,
     { patientId, status: 0, progress },
     {
       transform({ data }: AnyObject) {
@@ -190,3 +190,11 @@ export function addPatientOnlineRecord(id: string | number) {
     },
   });
 }
+// 线上调理方案打卡
+export function addPatientOnlineRecordClockIn(id: string | number) {
+  return Post(`/patientCrManage/clockIn/${id}`, {}, {
+    transform({ data }: AnyObject) {
+      return data;
+    },
+  });
+}

+ 2 - 1
miniprogram/themes/t.cell.scss

@@ -18,7 +18,8 @@
   --td-radio-icon-colol: var(--td-text-color-secondary);
   --td-radio-icon-checked-color: #1D6FF6;
   --td-radio-label-color: var(--td-text-color-secondary);
-  --td-radio-label-checked-color: #fff;
+  // --td-radio-label-checked-color: #fff;
+  --td-radio-label-checked-color: #000;
 
   &__wrapper {
     position: absolute;

+ 8 - 2
project.config.json

@@ -31,7 +31,13 @@
     "es6": true,
     "compileWorklet": true,
     "uglifyFileName": true,
-    "swc": false
+    "swc": false,
+    "uploadWithSourceMap": true,
+    "minifyWXSS": true,
+    "minifyWXML": true,
+    "localPlugins": false,
+    "disableUseStrict": false,
+    "disableSWC": true
   },
   "simulatorType": "wechat",
   "simulatorPluginLibVersion": {},
@@ -46,5 +52,5 @@
     "ignore": [],
     "include": []
   },
-  "libVersion": "3.7.11"
+  "libVersion": "3.8.9"
 }