Browse Source

Merge branch 'feature/lunbo-2.0.1' of ssh://121.43.162.141:10022/six.fe/health.applet into release/2.0.1

张田田 9 months ago
parent
commit
8d4a2a03ee

+ 134 - 0
miniprogram/components/media-carousel/media-carousel.js

@@ -0,0 +1,134 @@
+// components/media-carousel/media-carousel.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    // 媒体列表
+    mediaList: {
+      type: Array,
+      value: [],
+      observer: function(newVal) {
+        this.setData({
+          totalCount: newVal.length
+        });
+      }
+    },
+    // 是否显示指示器
+    showIndicator: {
+      type: Boolean,
+      value: true
+    },
+    // 指示器颜色
+    indicatorColor: {
+      type: String,
+      value: 'rgba(255, 255, 255, 0.6)'
+    },
+    // 指示器激活颜色
+    indicatorActiveColor: {
+      type: String,
+      value: '#fff'
+    },
+    // 是否自动播放
+    autoplay: {
+      type: Boolean,
+      value: true
+    },
+    // 自动播放间隔时间
+    interval: {
+      type: Number,
+      value: 3000
+    },
+    // 滑动动画时长
+    duration: {
+      type: Number,
+      value: 500
+    },
+    // 是否循环播放
+    circular: {
+      type: Boolean,
+      value: true
+    },
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    currentIndex: 0,
+    totalCount: 0
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    // 轮播切换事件
+    onChange(e) {
+      const { current } = e.detail;
+      this.setData({
+        currentIndex: current
+      });
+      
+      // 触发自定义事件
+      this.triggerEvent('change', {
+        current: current,
+        total: this.data.totalCount
+      });
+    },
+
+    // 图片加载成功
+    onImageLoad(e) {
+      const { index } = e.currentTarget.dataset;
+      this.triggerEvent('imageload', {
+        index: index,
+        item: this.data.mediaList[index]
+      });
+    },
+
+    // 图片加载失败
+    onImageError(e) {
+      const { index } = e.currentTarget.dataset;
+      this.triggerEvent('imageerror', {
+        index: index,
+        item: this.data.mediaList[index]
+      });
+    },
+
+    // 视频开始播放
+    onVideoPlay(e) {
+      const { index } = e.currentTarget.dataset;
+      this.triggerEvent('videoplay', {
+        index: index,
+        item: this.data.mediaList[index]
+      });
+    },
+
+    // 视频暂停
+    onVideoPause(e) {
+      const { index } = e.currentTarget.dataset;
+      this.triggerEvent('videopause', {
+        index: index,
+        item: this.data.mediaList[index]
+      });
+    },
+
+    // 视频播放结束
+    onVideoEnded(e) {
+      const { index } = e.currentTarget.dataset;
+      this.triggerEvent('videoended', {
+        index: index,
+        item: this.data.mediaList[index]
+      });
+    },
+
+    // 视频播放错误
+    onVideoError(e) {
+      const { index } = e.currentTarget.dataset;
+      this.triggerEvent('videoerror', {
+        index: index,
+        item: this.data.mediaList[index]
+      });
+    }
+  }
+}); 

+ 6 - 0
miniprogram/components/media-carousel/media-carousel.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "t-icon": "tdesign-miniprogram/icon/icon"
+  }
+} 

+ 51 - 0
miniprogram/components/media-carousel/media-carousel.wxml

@@ -0,0 +1,51 @@
+<!--components/media-carousel/media-carousel.wxml-->
+<view class="media-carousel {{adaptiveHeight ? 'adaptive-height' : ''}}">
+  <swiper 
+    class="carousel-swiper" 
+    indicator-dots="{{showIndicator}}" 
+    indicator-color="{{indicatorColor}}" 
+    indicator-active-color="{{indicatorActiveColor}}"
+    autoplay="{{autoplay}}" 
+    interval="{{interval}}" 
+    duration="{{duration}}"
+    circular="{{circular}}"
+    bind:change="onChange"
+  >
+    <swiper-item wx:for="{{mediaList}}" wx:key="index" class="carousel-item">
+      <!-- 图片轮播 -->
+      <view wx:if="{{item.type === 'image'}}" class="image-container">
+        <image
+          src="{{item.src}}" 
+          mode="aspectFit"
+          class="carousel-image"
+          bind:load="onImageLoad"
+          bind:error="onImageError"
+          data-index="{{index}}"
+        />
+        <view wx:if="{{item.title}}" class="image-title">{{item.title}}</view>
+      </view>
+      
+      <!-- 视频轮播 -->
+      <view wx:if="{{item.type === 'video'}}" class="video-container">
+        <video 
+          src="{{item.src}}" 
+          class="carousel-video"
+          poster="{{item.poster}}"
+          show-center-play-btn="{{true}}"
+          show-play-btn="{{true}}"
+          controls="{{true}}"
+          object-fit="cover"
+          autoplay="{{true}}"
+          loop="{{true}}"
+          muted="{{true}}"
+          bind:play="onVideoPlay"
+          bind:pause="onVideoPause"
+          bind:ended="onVideoEnded"
+          bind:error="onVideoError"
+          data-index="{{index}}"
+        />
+        <view wx:if="{{item.title}}" class="video-title">{{item.title}}</view>
+      </view>
+    </swiper-item>
+  </swiper>
+</view> 

+ 103 - 0
miniprogram/components/media-carousel/media-carousel.wxss

@@ -0,0 +1,103 @@
+/* components/media-carousel/media-carousel.wxss */
+.media-carousel {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  border-radius: 16rpx;
+  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
+}
+
+/* 自适应高度模式 */
+.media-carousel.adaptive-height {
+  /* height: auto; */
+  min-height: 400rpx;
+}
+
+.carousel-swiper {
+  width: 100%;
+  height: 100%;
+}
+
+
+
+.carousel-item {
+  width: 100%;
+  height: 100%;
+  position: relative;
+}
+
+.adaptive-height .carousel-item {
+  height: auto;
+}
+
+/* 图片容器样式 */
+.image-container {
+  width: 100%;
+  height: 100%;
+  position: relative;
+  overflow: hidden;
+  background-color: #f5f5f5; /* 添加背景色,避免空白区域突兀 */
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.adaptive-height .image-container {
+  height: auto;
+  background-color: transparent;
+}
+
+.carousel-image {
+  width: 100%;
+  height: 100%;
+  display: block;
+  /* 确保图片在aspectFit模式下居中显示 */
+  object-position: center;
+}
+
+.adaptive-height .carousel-image {
+  height: auto;
+  max-height: none;
+}
+
+.image-title {
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
+  color: #fff;
+  padding: 20rpx;
+  font-size: 28rpx;
+  line-height: 1.4;
+  z-index: 2;
+}
+
+/* 视频容器样式 */
+.video-container {
+  width: 100%;
+  height: 100%;
+  position: relative;
+  overflow: hidden;
+}
+
+.carousel-video {
+  width: 100%;
+  height: 100%;
+  display: block;
+}
+
+.video-title {
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
+  color: #fff;
+  padding: 20rpx;
+  font-size: 28rpx;
+  line-height: 1.4;
+  z-index: 2;
+}
+

+ 4 - 2
miniprogram/module/care/pages/careDetail/careDetail.json

@@ -16,10 +16,12 @@
     "t-button": "tdesign-miniprogram/button/button",
     "t-drawer": "tdesign-miniprogram/drawer/drawer",
     "t-skeleton": "tdesign-miniprogram/skeleton/skeleton",
-    "t-empty": "tdesign-miniprogram/empty/empty"
+    "t-empty": "tdesign-miniprogram/empty/empty",
+    "media-carousel": "../../../../components/media-carousel/media-carousel"
   },
   "componentPlaceholder": {
     "record-care": "view",
-    "record-index": "view"
+    "record-index": "view",
+    "media-carousel": "view"
   }
 }

+ 27 - 5
miniprogram/module/care/pages/careDetail/careDetail.scss

@@ -59,10 +59,10 @@ border-top: 1px solid white;
   background-color: #1976d2;
   margin: 0 0px 10px 16px;
   color: #fff;
-  width: 100rpx;
-  height: 26px;
-  line-height: 26px;
-  padding: 4rpx 16rpx;
+  width: 150rpx;
+  height: 32px;
+  line-height: 32px;
+  // padding: 4rpx 16rpx;
   border-radius: 8rpx;
   font-size: 28rpx;
   text-align: center;
@@ -138,7 +138,7 @@ border-top: 1px solid white;
   border-radius: 16rpx;
   margin: 0 0rpx 24rpx 0rpx;
   padding: 24rpx 24rpx 18rpx 30rpx;
-  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
+  // box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
 }
 .scheme-title {
   font-size: 28rpx;
@@ -554,4 +554,26 @@ ec-canvas {
   align-items: center;
   justify-content: center;
   white-space: nowrap;
+}
+// 轮播组件样式
+.carousel-container {
+  margin: 20rpx;
+  border-radius: 16rpx;
+  overflow: hidden;
+  height: 200rpx;
+  width: 50%;
+  
+  .media-carousel {
+    height: 100%;
+  }
+}
+.carousel-box{
+  width: 100%;
+  height: 200rpx;
+  border-radius: 16rpx;
+  overflow: hidden;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin: 20rpx;
 }

+ 38 - 5
miniprogram/module/care/pages/careDetail/careDetail.ts

@@ -58,18 +58,51 @@ Page({
           "5": "已完结",
         };
         const statusText = statusMap[res.progress] || "未知状态";
+        if (res.items.length > 0) {
+          isShowDelivery = res.items.some((item: any) => {
+            return item.conditioningProgramDetail?.isDelivery === "Y";
+          });
+          res.items.forEach((item: any) => {
+            item.carouselMediaList = [];
+           
+           // 添加photo
+           if (item.conditioningProgramDetail?.photo) {
+             item.carouselMediaList.push({
+               type: 'image',
+               src: item.conditioningProgramDetail?.photo,
+               title: '商品图片'
+             });
+           }
+           
+           // 添加itemImgFirst
+           if (item?.conditioningProgramDetail?.itemImgFirst) {
+             item.carouselMediaList.push({
+               type: 'image',
+               src: item.conditioningProgramDetail?.itemImgFirst,
+               title: '操作图片'
+             });
+           }
+           
+           // 添加itemVideoFirst
+           if (item?.conditioningProgramDetail?.itemVideoFirst) {
+             item.carouselMediaList.push({
+               type: 'video',
+               src: item.conditioningProgramDetail?.itemVideoFirst,
+               title: '操作视频'
+             });
+           }
+        
+           });
+        }
         this.setData({
           loading: false,
           careDetail: res,
           statusText,
         });
+        console.log(res, "服务包详情数据");
         let isShowDelivery = false;
         console.log(res.items, "服务包详情数据");
-        if (res.items.length > 0) {
-          isShowDelivery = res.items.some((item: any) => {
-            return item.conditioningProgramDetail?.isDelivery === "Y";
-          });
-        }
+      
         this.setData({
           isShowDelivery,
         });

+ 16 - 4
miniprogram/module/care/pages/careDetail/careDetail.wxml

@@ -60,7 +60,11 @@
             <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>
-              <image class="scheme-img" src="{{item.conditioningProgramDetail.photo}}" mode="aspectFill" wx:if="{{item.conditioningProgramDetail.photo}}" />
+                  <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
+               <view class="carousel-container" >
+                  <media-carousel mediaList="{{item.carouselMediaList}}" showIndicator="{{true}}" autoplay="{{true}}" interval="{{4000}}" circular="{{true}}" bind:change="onCarouselChange" bind:imageload="onImageLoad" bind:imageerror="onImageError" bind:videoplay="onVideoPlay" bind:videopause="onVideoPause" bind:videoended="onVideoEnded" bind:videoerror="onVideoError" />
+                </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>
@@ -93,7 +97,11 @@
             <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>
-              <image class="scheme-img" src="{{item.conditioningProgramDetail.photo}}" mode="aspectFill" wx:if="{{item.conditioningProgramDetail.photo}}" />
+                 <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
+               <view class="carousel-container">
+                  <media-carousel mediaList="{{item.carouselMediaList}}" showIndicator="{{true}}" autoplay="{{true}}" interval="{{4000}}" circular="{{true}}" bind:change="onCarouselChange" bind:imageload="onImageLoad" bind:imageerror="onImageError" bind:videoplay="onVideoPlay" bind:videopause="onVideoPause" bind:videoended="onVideoEnded" bind:videoerror="onVideoError" />
+                </view>
+                </view>
               <view class="scheme-row light">
                 <text class="text-gray">数量:</text>
                 {{item.totalMeasure}}
@@ -114,7 +122,11 @@
             <view class="scheme-card" wx:if="{{item.conditioningProgramDetail.conditioningProgramType && item.conditioningProgramDetail.conditioningProgramType==='健康评估'}}">
               <view class="scheme-title">{{item.conditioningProgramDetail.name}}</view>
               <view class="divider"></view>
-              <image class="scheme-img" src="{{item.conditioningProgramDetail.photo}}" mode="aspectFill" wx:if="{{item.conditioningProgramDetail.photo}}" />
+             <view class="carousel-box" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
+               <view class="carousel-container">
+                  <media-carousel mediaList="{{item.carouselMediaList}}" showIndicator="{{true}}" autoplay="{{true}}" interval="{{4000}}" circular="{{true}}" bind:change="onCarouselChange" bind:imageload="onImageLoad" bind:imageerror="onImageError" bind:videoplay="onVideoPlay" bind:videopause="onVideoPause" bind:videoended="onVideoEnded" bind:videoerror="onVideoError" />
+                </view>
+                </view>
               <view class="scheme-row between" style="margin-top:15px">
                 <text>
                   <text class="text-gray">已完成:</text>
@@ -134,7 +146,7 @@
                 </view>
               
               </view>
-              <view class="desc-row">
+              <view class="desc-row" wx-if="{{item.remark}}">
                 <text class="text-gray">操作指南:</text>
                 <text class="desc-label">{{item.remark}}</text>
               </view>

+ 4 - 2
miniprogram/pages/home/home.json

@@ -12,11 +12,13 @@
     "report-health-scheme": "../../module/health/components/report-health-scheme/report-health-scheme",
     "science-card": "../../module/article/components/science-card/science-card",
     "t-popup": "tdesign-miniprogram/popup/popup",
-    "tabbar": "../../components/tabbar/tabbar"
+    "tabbar": "../../components/tabbar/tabbar",
+    "media-carousel": "../../components/media-carousel/media-carousel"
   },
   "componentPlaceholder": {
     "report-health-scheme": "view",
     "science-card": "view",
-    "tabbar": "view"
+    "tabbar": "view",
+    "media-carousel": "view"
   }
 }

+ 20 - 6
miniprogram/pages/home/home.scss

@@ -488,11 +488,7 @@ $scale: 0.5;
   margin-left: 12rpx;
 }
 
-.item-detail {
-  color: #666;
-  font-size: 26rpx;
-  margin-top: 12rpx;
-}
+
 
 .expand-all {
   display: flex;
@@ -529,6 +525,10 @@ $scale: 0.5;
   margin-top: 12rpx;
   line-height: 1.7;
   border-top: 1px solid #f0f0f0;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
 }
 .item-detail text[style*="color:#2ec4b6"] {
   font-weight: bold;
@@ -548,4 +548,18 @@ $scale: 0.5;
   cursor: pointer;
   color:#1976d2;
   margin-left:20px
-}
+}
+
+// 轮播组件样式
+.carousel-container {
+  margin-top: 20rpx;
+  border-radius: 16rpx;
+  overflow: hidden;
+  height: 200rpx;
+  width: 50%;
+  
+  .media-carousel {
+    height: 100%;
+  }
+}
+

+ 112 - 0
miniprogram/pages/home/home.ts

@@ -67,6 +67,30 @@ Page({
     _loaded: false,
 
     statusList: [] as AnyArray,
+
+    // 轮播媒体列表
+    carouselMediaList: [
+      {
+        type: 'image',
+        src: "https://wx.hzliuzhi.com:4433/manager/file/statics/2025/08/07/222_20250807164536A813.jpg",
+        title: '操作图片'
+      },  
+      {
+        type: 'image',
+        src: "https://wx.hzliuzhi.com:4433/manager/file/statics/2025/08/07/111_20250807164533A812.jpg",
+        title: '商品图片'
+      },
+      {
+        type: 'video',
+        src: 'https://wx.hzliuzhi.com:4433/manager/file/statics/2025/08/07/song_20250807164546A814.mp4',
+        title: '操作视频'
+      },
+    ] as Array<{
+      type: 'image' | 'video';
+      src: string;
+      poster?: string;
+      title?: string;
+    }>,
   },
   behaviors: [
     PageContainerBehavior,
@@ -78,9 +102,50 @@ Page({
     const res = await getCareList();
     console.log(res, "res==careList");
     if (res && res.length > 0) {
+      res.forEach((item: any) => {
+       item.carouselMediaList = [];
+      
+      // 添加photo
+      if (item.photo) {
+        item.carouselMediaList.push({
+          type: 'image',
+          src: item.photo,
+          title: '商品图片'
+        });
+      }
+      
+      // 添加itemImgFirst
+      if (item?.itemImgFirst) {
+        item.carouselMediaList.push({
+          type: 'image',
+          src: item.itemImgFirst,
+          title: '操作图片'
+        });
+      }
+      
+      // 添加itemVideoFirst
+      if (item?.itemVideoFirst) {
+        item.carouselMediaList.push({
+          type: 'video',
+          src: item.itemVideoFirst,
+          poster: item.photo || item.itemImgFirst, // 使用photo或itemImgFirst作为视频封面
+          title: '操作视频'
+        });
+      }
+      
+      // 添加调试信息
+      console.log(`调养计划 ${item.conditioningProgramName} 的轮播数据:`, {
+        photo: item.photo,
+        itemImgFirst: item.itemImgFirst,
+        itemVideoFirst: item.itemVideoFirst,
+        carouselMediaList: item.carouselMediaList
+      });
+      });
+      
       this.setData({
         careList: res,
       });
+
       await this.updateDisplayList();
     }
   },
@@ -566,4 +631,51 @@ Page({
     // 获取调养计划
     this.getCareLists();
   },
+
+
+
+
+  // 轮播相关事件处理方法
+  onCarouselChange(e: any) {
+    const { current, total } = e.detail;
+    console.log('轮播切换:', current, total);
+  },
+
+  onImageLoad(e: any) {
+    const { index, item } = e.detail;
+    console.log('图片加载成功:', index, item);
+  },
+
+  onImageError(e: any) {
+    const { index, item } = e.detail;
+    console.log('图片加载失败:', index, item);
+    wx.showToast({
+      title: '图片加载失败',
+      icon: 'none'
+    });
+  },
+
+  onVideoPlay(e: any) {
+    const { index, item } = e.detail;
+    console.log('视频开始播放:', index, item);
+  },
+
+  onVideoPause(e: any) {
+    const { index, item } = e.detail;
+    console.log('视频暂停:', index, item);
+  },
+
+  onVideoEnded(e: any) {
+    const { index, item } = e.detail;
+    console.log('视频播放结束:', index, item);
+  },
+
+  onVideoError(e: any) {
+    const { index, item } = e.detail;
+    console.log('视频播放错误:', index, item);
+    wx.showToast({
+      title: '视频播放失败',
+      icon: 'none'
+    });
+  },
 });

+ 113 - 109
miniprogram/pages/home/home.wxml

@@ -1,108 +1,121 @@
-v<!--pages/home/home.wxml-->
+v
+<!--pages/home/home.wxml-->
 <view class="fullscreen-bg">
 
-<t-navbar title="中医健康管家" t-class-title="nav-title" />
+  <t-navbar title="中医健康管家" t-class-title="nav-title" />
 
-<scroll-view class="page-scroll__container" type="list" scroll-y style="height: {{pageHeight}};"> 
-<view class="follow-container">
-<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>
-  <view class="tool-bar-wrapper">
-      <view class="tool" wx:if="{{location.description}}">
-        <text>{{location.description}}</text>
+  <scroll-view class="page-scroll__container" type="list" scroll-y style="height: {{pageHeight}};">
+    <view class="follow-container">
+      <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>
-      <view class="tool" wx:if="{{solarTerms.description}}">
-        <text>{{solarTerms.description}}</text>
+      <view class="tool-bar-wrapper">
+        <view class="tool" wx:if="{{location.description}}">
+          <text>{{location.description}}</text>
+        </view>
+        <view class="tool" wx:if="{{solarTerms.description}}">
+          <text>{{solarTerms.description}}</text>
+        </view>
       </view>
     </view>
-    </view>
 
-<view class="body-img">
-  <view class="header-container">
-    <view class="user-info-wrapper" wx:if="{{patient}}">
-       <view class="user-box">
-        <text class="user-name">{{patient.name}}</text>
-         <t-icon color="{{patientIconColor}}" name="{{patientIcon}}" size="20px"></t-icon>
-         </view>
-         <view>
-        <text class="user-age" wx:if="{{patient.age}}">{{patient.age}}岁</text>
-        <text class="user-description" overflow="fade" max-lines="1">{{patientDescription}}</text>
+    <view class="body-img">
+      <view class="header-container">
+        <view class="user-info-wrapper" wx:if="{{patient}}">
+          <view class="user-box">
+            <text class="user-name">{{patient.name}}</text>
+            <t-icon color="{{patientIconColor}}" name="{{patientIcon}}" size="20px"></t-icon>
+          </view>
+          <view>
+            <text class="user-age" wx:if="{{patient.age}}">{{patient.age}}岁</text>
+            <text class="user-description" overflow="fade" max-lines="1">{{patientDescription}}</text>
+          </view>
         </view>
-    </view>
-  </view>
-
+      </view>
 
+      <view class="steps-container">
+        <vertical-steps statusList="{{statusList}}" dataset="{{healthReport.data}}" bind:position="onBodyModel" />
 
-<view class="steps-container">
-  <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>
-</view>
-</view>
+        <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>
+        </view>
+      </view>
 
-<view class="report-container" bind:tap="toReportPage" wx:if="{{healthReport.data.reportTime}}">
-<view class="report-box">
-<view><image src="../../assets/bg/icon_file@3x.png" class="report-img" /> </view>
-<view class="text-box" wx:if="{{healthReport.data.reportTime}}"><view class="text-one">健康分析报告</view><view class="text-two">日期:{{healthReport.data.reportTime}}</view></view>
-</view>
-</view>
-</view>
+      <view class="report-container" bind:tap="toReportPage" wx:if="{{healthReport.data.reportTime}}">
+        <view class="report-box">
+          <view>
+            <image src="../../assets/bg/icon_file@3x.png" class="report-img" />
+          </view>
+          <view class="text-box" wx:if="{{healthReport.data.reportTime}}">
+            <view class="text-one">健康分析报告</view>
+            <view class="text-two">日期:{{healthReport.data.reportTime}}</view>
+          </view>
+        </view>
+      </view>
+    </view>
 
 
-<view class="care-container" wx:if="{{displayList.length>0}}">
-<view class="care-box">
-  <view class="care-header">
-    <image src="../../assets/icon/icon_plan@3x.png" class="care-icon"/>
-    <text>调养计划</text>
-  </view>
-  <view class="care-list">
-    <block wx:for="{{displayList}}" wx:key="id">
-      <view class="care-item">
-        <view class="item-main" bindtap="toggleItem"data-index="{{index}}">
-          <text class="dot"></text>
-          <text class="item-title">{{item.conditioningProgramName}}</text>
-          <text class="item-next-time" wx:if="{{item.arrangeDate}}">下一次时间:{{item.arrangeDate}}</text>
-          <t-icon name="{{item.expanded ? 'chevron-up' : 'chevron-down'}}" size="24rpx" class="item-arrow" color="#C0C4CC" />
-        </view>
-          <!-- 这里放详细内容 -->
-      <view class="item-detail" wx:if="{{item.expanded}}">
-        <image src="{{item.photo}}" class="detail-image" wx:if="{{item.photo}}" />
-        <view class="item-box">
-        <view class="flex" wx:if="{{item.arrangeDate}}"><text>下一次时间:</text><text>{{item.arrangeDate}}</text></view>
-        <view class="flex">已完成:<text style="color:#2ec4b6">{{item.finishCount}}次</text><text style="margin:0 5px">/</text>{{item.totalMeasure}}次 
-        <view catchtap="onRecord" data-id="{{item.id}}"  wx:if="{{item.isOffline==='Y'}}" class="verify-record">核销记录</view>
-        <view catchtap="pushCard" data-id="{{item.id}}" wx:else class="verify-record">打卡记录</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 class="care-container" wx:if="{{displayList.length>0}}">
+      <view class="care-box">
+        <view class="care-header">
+          <image src="../../assets/icon/icon_plan@3x.png" class="care-icon" />
+          <text>调养计划</text>
+        </view>
+        <view class="care-list">
+          <block wx:for="{{displayList}}" wx:key="id">
+            <view class="care-item">
+              <view class="item-main" bindtap="toggleItem" data-index="{{index}}">
+                <text class="dot"></text>
+                <text class="item-title">{{item.conditioningProgramName}}</text>
+                <text class="item-next-time" wx:if="{{item.arrangeDate}}">下一次时间:{{item.arrangeDate}}</text>
+                <t-icon name="{{item.expanded ? 'chevron-up' : 'chevron-down'}}" size="24rpx" class="item-arrow" color="#C0C4CC" />
+              </view>
+              <!-- 这里放详细内容 -->
+              <view class="item-detail" wx:if="{{item.expanded}}">
+                <view class="carousel-container" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
+                  <media-carousel mediaList="{{item.carouselMediaList}}" showIndicator="{{true}}" autoplay="{{true}}" interval="{{4000}}" circular="{{true}}" bind:change="onCarouselChange" bind:imageload="onImageLoad" bind:imageerror="onImageError" bind:videoplay="onVideoPlay" bind:videopause="onVideoPause" bind:videoended="onVideoEnded" bind:videoerror="onVideoError" />
+                </view>
+                 <!--   <image src="{{item.photo}}" class="detail-image" wx:if="{{item.photo}}" /> -->
+                <view class="item-box">
+                  <view class="flex" wx:if="{{item.arrangeDate}}"><text>下一次时间:</text><text>{{item.arrangeDate}}</text></view>
+                  <view class="flex">已完成:<text style="color:#2ec4b6">{{item.finishCount}}次</text><text style="margin:0 5px">/</text>{{item.totalMeasure}}次
+                    <view catchtap="onRecord" data-id="{{item.id}}" wx:if="{{item.isOffline==='Y'}}" class="verify-record">核销记录</view>
+                    <view catchtap="pushCard" data-id="{{item.id}}" wx:else class="verify-record">打卡记录</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>
+          </block>
+        </view>
+        <view class="expand-all" wx:if="{{careList.length > 4}}" bindtap="toggleAll">
+          <t-icon name="{{allExpanded ? 'chevron-up' : 'chevron-down'}}" size="32rpx" class="expand-arrow" color="#C0C4CC" />
+        </view>
       </view>
-    </block>
-  </view>
-    <view class="expand-all" wx:if="{{careList.length > 4}}" bindtap="toggleAll">
-      <t-icon name="{{allExpanded ? 'chevron-up' : 'chevron-down'}}" size="32rpx" class="expand-arrow" color="#C0C4CC" />
     </view>
-</view>
-</view>
 
-  <view class="science-list-wrapper" wx:if="{{scienceList.length}}">
-    <view class="list-title" bind:tap="toSciencePage">
-      <view class="missionary">健康宣教</view>
-      <view class="title-box serch">
-         <text>查询</text>
-      <t-icon name="chevron-right-double"></t-icon>
+    <view class="science-list-wrapper" wx:if="{{scienceList.length}}">
+      <view class="list-title" bind:tap="toSciencePage">
+        <view class="missionary">健康宣教</view>
+        <view class="title-box serch">
+          <text>查询</text>
+          <t-icon name="chevron-right-double"></t-icon>
+        </view>
       </view>
+      <science-card wx:for="{{scienceList}}" wx:key="id" item="{{item}}" index="{{index}}"></science-card>
     </view>
-    <science-card wx:for="{{scienceList}}" wx:key="id" item="{{item}}" index="{{index}}"></science-card>
-  </view>
-  <science-card style="display: none;"><!--?--></science-card>
-  <view style="height: {{container.safeBottomOffset}}px;flex: none;"></view>
-</scroll-view>
+    <science-card style="display: none;">
+      <!--?-->
+    </science-card>
+    <view style="height: {{container.safeBottomOffset}}px;flex: none;"></view>
+  </scroll-view>
 
 </view>
 
@@ -188,28 +201,19 @@ v<!--pages/home/home.wxml-->
     </sticky-section>
   </scroll-view>
 
-<tabbar tabbarValue="{{tabbarValue}}" patientId="{{patient.patientId}}"></tabbar>
-  
-  <t-popup
-    visible="{{isShowPopup}}"
-    usingCustomNavbar
-    bind:visible-change="onVisibleChange"
-    placement="center"
-  >
-  <view class="popup-container">
-    <view class="popup-block">
-      <scroll-view class="scroll_live" scroll-y="{{true}}" show-scrollbar="{{false}}" enhanced="{{true}}" animation="{{animationData}}" >
-      <view class="popup-item" wx:for="{{popupList}}" wx:key="{{id}}">
-        <text class="popup-text">{{index+1}}.{{item.title}}</text>
-        <text class="popup-action" bind:tap="goComplete" data-page="{{item.page}}" 
-        data-id="{{item.pendingWorkId}}"
-        data-title="{{item.title}}"
-        >{{item.button}}</text>
+  <tabbar tabbarValue="{{tabbarValue}}" patientId="{{patient.patientId}}"></tabbar>
+
+  <t-popup visible="{{isShowPopup}}" usingCustomNavbar bind:visible-change="onVisibleChange" placement="center">
+    <view class="popup-container">
+      <view class="popup-block">
+        <scroll-view class="scroll_live" scroll-y="{{true}}" show-scrollbar="{{false}}" enhanced="{{true}}" animation="{{animationData}}">
+          <view class="popup-item" wx:for="{{popupList}}" wx:key="{{id}}">
+            <text class="popup-text">{{index+1}}.{{item.title}}</text>
+            <text class="popup-action" bind:tap="goComplete" data-page="{{item.page}}" data-id="{{item.pendingWorkId}}" data-title="{{item.title}}">{{item.button}}</text>
+          </view>
+        </scroll-view>
       </view>
-      </scroll-view>
-    </view>
-    <t-icon t-class="close-btn" name="close-circle" size="64rpx" color="#fff" bind:tap="onClose" />
+      <t-icon t-class="close-btn" name="close-circle" size="64rpx" color="#fff" bind:tap="onClose" />
     </view>
   </t-popup>
-</draggable-sheet>
-
+</draggable-sheet>