Преглед изворни кода

Merge branch 'develop' of ssh://121.43.162.141:10022/six.fe/health.applet into project/ZJ.330681

张田田 пре 6 часа
родитељ
комит
0c5150ad9d
26 измењених фајлова са 178 додато и 59 уклоњено
  1. 6 0
      miniprogram/module/article/pages/foot-print/foot-print.ts
  2. 2 0
      miniprogram/module/article/pages/order-detail/order-detail.ts
  3. 5 2
      miniprogram/module/article/pages/order-list/order-list.ts
  4. 2 0
      miniprogram/module/article/pages/science-info/science-info.ts
  5. 7 0
      miniprogram/module/article/pages/science-list/science-list.ts
  6. 4 0
      miniprogram/module/care/pages/care/verifyRecord.ts
  7. 7 4
      miniprogram/module/care/pages/careDetail/careDetail.ts
  8. 7 2
      miniprogram/module/chats/components/message-consult/message-consult.ts
  9. 9 0
      miniprogram/module/chats/pages/consultation-record/consultation-record.ts
  10. 8 1
      miniprogram/module/follow/pages/evaluation/report.ts
  11. 20 1
      miniprogram/module/health/components/report-health-patient/report-health-patient.scss
  12. 4 4
      miniprogram/module/health/components/report-health-patient/report-health-patient.wxml
  13. 28 8
      miniprogram/module/health/components/report-health-status/report-health-status.scss
  14. 8 6
      miniprogram/module/health/components/report-health-status/report-health-status.wxml
  15. 2 2
      miniprogram/module/health/pages/report/report.ts
  16. 3 3
      miniprogram/module/health/pages/report/report.wxml
  17. 10 9
      miniprogram/module/health/request.ts
  18. 2 2
      miniprogram/module/order/pages/order-detail/order-detail.ts
  19. 3 2
      miniprogram/module/order/pages/other-detail/other-detail.ts
  20. 2 1
      miniprogram/module/order/pages/refund-processing/refund-processing.ts
  21. 2 1
      miniprogram/module/order/pages/select-goods/select-goods.ts
  22. 11 3
      miniprogram/pages/home/home.scss
  23. 10 6
      miniprogram/pages/home/home.ts
  24. 1 1
      miniprogram/pages/home/home.wxml
  25. 14 0
      miniprogram/utils/util.ts
  26. 1 1
      project.config.json

+ 6 - 0
miniprogram/module/article/pages/foot-print/foot-print.ts

@@ -4,6 +4,7 @@ import tickleBehavior, {
 } from "../../../../core/behavior/tickle.behavior";
 import { getFootPrintListMethod } from "../../request";
 import { Get } from "../../../../lib/request/method";
+import { getFullImageUrl } from "../../../../utils/util";
 Page({
   behaviors: [PageContainerBehavior, tickleBehavior],
   lifetimes: {
@@ -48,6 +49,11 @@ Page({
     try {
       const res = await getFootPrintListMethod();
       const list = res?.data?.data ?? [];
+      if (Array.isArray(list)) {
+        list.forEach((item: any) => {
+          item.briefImg = getFullImageUrl(item.briefImg);
+        });
+      }
       this.setData({ articleList: Array.isArray(list) ? list : [] });
     } catch (error: any) {
       getTickleContext.call(this).showWarnMessage(error.errMsg);

+ 2 - 0
miniprogram/module/article/pages/order-detail/order-detail.ts

@@ -8,6 +8,7 @@ import {
   orderCancelMethod,
   orderConfirmMethod,
 } from "../../request";
+import { getFullImageUrl } from "../../../../utils/util";
 // module/article/pages/order-detail/order-detail.ts
 Page({
   behaviors: [PageContainerBehavior, tickleBehavior],
@@ -94,6 +95,7 @@ Page({
     try {
       const res = await getOrderDetailMethod(id);
       if (res && res.data) {
+        res.data.photo = getFullImageUrl(res.data.photo);
         this.setData({ orderDetail: res.data });
         if (
           !res.data.liaison ||

+ 5 - 2
miniprogram/module/article/pages/order-list/order-list.ts

@@ -2,7 +2,7 @@ import PageContainerBehavior from "../../../../core/behavior/page-container.beha
 import tickleBehavior, {
   getTickleContext,
 } from "../../../../core/behavior/tickle.behavior";
-import { handleWeChatPayment } from "../../../../utils/util";
+import { handleWeChatPayment, getFullImageUrl } from "../../../../utils/util";
 import {
   orderListMethod,
   orderCancelMethod,
@@ -131,7 +131,7 @@ Page({
                 const unit = subItem?.convertUnit ?? '次';
                 return `${dose} ${unit}`;
               })(),
-              photo: subItem.conditioningProgramPhoto || '',
+              photo: getFullImageUrl(subItem.conditioningProgramPhoto) || '',
               price: subItem.unitPrice || 0,
               quantity: subItem?.totalMeasure || 0,
             }
@@ -148,6 +148,9 @@ Page({
       if (Object.keys(expandedItems).length > 0) {
         this.setData({ expandedItems: { ...this.data.expandedItems, ...expandedItems } });
       }
+      res.data.forEach((item: any) => {
+        item.photo = getFullImageUrl(item.photo);
+      });
       this.setData({ orders: res.data });
     }
   },

+ 2 - 0
miniprogram/module/article/pages/science-info/science-info.ts

@@ -3,6 +3,7 @@ import tickleBehavior, {
   getTickleContext,
 } from "../../../../core/behavior/tickle.behavior";
 import { getScienceMethod } from "../../request";
+import { getFullImageUrl } from "../../../../utils/util";
 // module/diet/pages/science-info/science-info.ts
 Component({
   behaviors: [PageContainerBehavior, tickleBehavior],
@@ -41,6 +42,7 @@ Component({
       wx.showLoading({ title: "加载中" });
       try {
         const dataset = await getScienceMethod(this.data.id);
+        dataset.briefImg = getFullImageUrl(dataset.briefImg);
         this.setData({ dataset, title: dataset.name });
       } catch (error) {
         getTickleContext.call(this).showWarnMessage(error.errMsg);

+ 7 - 0
miniprogram/module/article/pages/science-list/science-list.ts

@@ -2,6 +2,7 @@ import PageContainerBehavior from "../../../../core/behavior/page-container.beha
 import I18nBehavior from "../../../../i18n/behavior";
 import tickleBehavior, { getTickleContext } from "../../../../core/behavior/tickle.behavior";
 import { getScienceListMethod } from "../../request";
+import { getFullImageUrl } from "../../../../utils/util";
 // module/diet/pages/science-list/science-list.ts
 Component({
   behaviors: [
@@ -51,6 +52,9 @@ Component({
         const { data, total } = await getScienceListMethod(1, this.data.size, {
           keyword: this.data.keyword,
         });
+        data.forEach((item: any) => {
+          item.briefImg = getFullImageUrl(item.briefImg);
+        });
         this.setData({ dataset: data, total });
       } catch (error) {
         getTickleContext.call(this).showWarnMessage(error.errMsg);
@@ -65,6 +69,9 @@ Component({
         const { data, total } = await getScienceListMethod(_page, this.data.size, {
           keyword: this.data.keyword,
         });
+        data.forEach((item: any) => {
+          item.briefImg = getFullImageUrl(item.briefImg);
+        });
         this.setData({ dataset: [...this.data.dataset, ...data], total, page: _page });
       } catch (error) {
         getTickleContext.call(this).showWarnMessage(error.errMsg);

+ 4 - 0
miniprogram/module/care/pages/care/verifyRecord.ts

@@ -1,5 +1,6 @@
 import { Post } from "../../../../lib/request/method";
 import { cancelAppointmentMethod } from "../../request";
+import { getFullImageUrl } from "../../../../utils/util";
 Page({
   data: {
     id: 0,
@@ -66,6 +67,9 @@ Page({
         });
       }
       if (res && res.patientConditioningSwagItemOfflines && res.patientConditioningSwagItemOfflines.length > 0) {
+        res.patientConditioningSwagItemOfflines.forEach((item: any) => {
+          item.photo = getFullImageUrl(item.photo);
+        });
         this.setData({
           recordList: res.patientConditioningSwagItemOfflines,
         });

+ 7 - 4
miniprogram/module/care/pages/careDetail/careDetail.ts

@@ -1,5 +1,5 @@
 import { Post } from "../../../../lib/request/method";
-import { fromHealthReportSymptom } from "../../../../utils/util";
+import { fromHealthReportSymptom, getFullImageUrl } from "../../../../utils/util";
 Page({
   onLoad(options) {
     if (options.id) {
@@ -230,14 +230,14 @@ onChatRecord(e: any) {
             if (item.conditioningProgramDetail?.photo) {
               item.carouselMediaList.push({
                 type: "image",
-                src: item.conditioningProgramDetail?.photo,
+                src: getFullImageUrl(item.conditioningProgramDetail?.photo),
               });
             }
             // 添加itemImgFirst
             if (item?.conditioningProgramDetail?.itemImgFirst) {
               item.carouselMediaList.push({
                 type: "image",
-                src: item.conditioningProgramDetail?.itemImgFirst,
+                src: getFullImageUrl(item.conditioningProgramDetail?.itemImgFirst),
               });
             }
 
@@ -245,7 +245,7 @@ onChatRecord(e: any) {
             if (item?.conditioningProgramDetail?.itemVideoFirst) {
               item.carouselMediaList.push({
                 type: "video",
-                src: item.conditioningProgramDetail?.itemVideoFirst,
+                src: getFullImageUrl(item.conditioningProgramDetail?.itemVideoFirst),
               });
             }
 
@@ -288,6 +288,9 @@ onChatRecord(e: any) {
             const items = data.healthAnalysisReports.map((report: any) => {
               return {
                 ...report,
+                upImg: getFullImageUrl(report.upImg),
+                downImg: getFullImageUrl(report.downImg),
+                faceImg: getFullImageUrl(report.faceImg),
                 symptoms: fromHealthReportSymptom(report).items,
               };
             });

+ 7 - 2
miniprogram/module/chats/components/message-consult/message-consult.ts

@@ -10,6 +10,7 @@ interface ConsultMessage {
 import I18nBehavior from "../../../../i18n/behavior";
 import { Post } from "../../../../lib/request/method";
 import { upload } from "../../../../lib/request/upload";
+import { getFullImageUrl } from "../../../../utils/util";
 import dayjs from "dayjs";
 
 const sendTypeMap: Record<string, "user" | "agent" | "human" | "system"> = {
@@ -46,14 +47,18 @@ function isConsultEndMessage(msg: ConsultMessage): boolean {
 // 获取的聊天消息为ConsultMessage格式                                           
 function transformMessage(item: AnyObject): ConsultMessage {
   const sender = sendTypeMap[item.sendType];
+  const messageType = item.messageType as "1" | "2";
+  const messageContent = messageType === "2"
+    ? getFullImageUrl(item.messageContent)
+    : (item.messageContent || "");
   return {
     id: `msg-${item.id}`,
     consultRecordId: item.consultRecordId,
     sender,
     sendTime: item.sendTime || "",
     sendType: item.sendType,
-    messageType: item.messageType as "1" | "2",
-    messageContent: item.messageContent || "",
+    messageType,
+    messageContent,
   };
 }
 

+ 9 - 0
miniprogram/module/chats/pages/consultation-record/consultation-record.ts

@@ -1,6 +1,7 @@
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
 import I18nBehavior from "../../../../i18n/behavior";
 import { Post } from "../../../../lib/request/method";
+import { getFullImageUrl } from "../../../../utils/util";
 // module/chats/pages/consultation-record/consultation-record.ts
 
 Page({
@@ -59,6 +60,14 @@ Page({
       );
 
       if (res.data && res.data.data && res.data.data.length > 0) {
+        // 处理图片消息的URL
+        res.data.data.forEach((consultation: any) => {
+          consultation.items?.forEach((item: any) => {
+            if (item.messageType === "2") {
+              item.messageContent = getFullImageUrl(item.messageContent);
+            }
+          });
+        });
         // 追加新数据到现有列表
         const newList =
           this.data.page === 1

+ 8 - 1
miniprogram/module/follow/pages/evaluation/report.ts

@@ -1,4 +1,5 @@
 import { Get } from "../../../../lib/request/method";
+import { getFullImageUrl } from "../../../../utils/util";
 
 Page({
   onLoad(options: { id: number }) {
@@ -56,7 +57,13 @@ Page({
         return data;
       },
     });
-    // console.log("list", list);
+    if (Array.isArray(list.tasks)) {
+      list.tasks.forEach((task: any) => {
+        task.upImg = getFullImageUrl(task.upImg);
+        task.downImg = getFullImageUrl(task.downImg);
+        task.faceImg = getFullImageUrl(task.faceImg);
+      });
+    }
     this.setData({
       tasks: list.tasks,
       followDetail: list,

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

@@ -89,7 +89,26 @@
       display: flex;
       align-items: center;
       white-space: nowrap; /* 防止真机 50% 宽度下换行 */
-      min-width: 0; /* 修复部分机型 flex 子项计算导致的换行 */
+      min-width: 0; 
+    }
+  }
+
+  .tag-row {
+    display: block;
+    line-height: 1.6;
+    margin-bottom: 5px;
+    .tag-row__label {
+      display: inline-block;
+      vertical-align: middle;
+      white-space: nowrap;
+      color: #8c8c8c;
+      margin-right: 8px;
+    }
+
+    t-tag {
+      display: inline-block;
+      vertical-align: middle;
+      margin: 0 8px 12px 0;
     }
   }
 }

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

@@ -64,15 +64,15 @@
           <text>{{dictionary.label($dictionaries, 'sys_yes_no', dataset.smokeState)}}</text>
         </view>
       </view>
-      <view class="row" style="display:flex">
-        <text style="color:#8C8C8C">喜好口味:</text>
+      <view class="row tag-row">
+        <text class="tag-row__label">喜好口味:</text>
         <t-tag t-class="tag" variant="outline" wx:for="{{hobbyFlavor}}" wx:key="*this">
           {{dictionary.label($dictionaries, 'hobby_flavor', item)}}
         </t-tag>
         <t-tag variant="outline" wx:if="{{!hobbyFlavor.length}}">无</t-tag>
       </view>
-      <view class="row" style="display:flex">
-        <text style="color:#8C8C8C">食物过敏:</text>
+      <view class="row tag-row">
+        <text class="tag-row__label">食物过敏:</text>
         <t-tag t-class="tag" variant="outline" wx:for="{{foodAllergy}}" wx:key="*this">
           {{dictionary.label($dictionaries, 'food_allergy', item)}}
         </t-tag>

+ 28 - 8
miniprogram/module/health/components/report-health-status/report-health-status.scss

@@ -5,15 +5,21 @@
 
 /* module/health/components/report-health-status/report-health-status.wxss */
 .status-box{
-  font-size: 16px;
+  font-size: 28rpx;
   font-weight: bold;
-  color: black;
+  color: #000000;
   width: 95%;
 }
+.status-title{
+  font-size: 32rpx;
+  font-weight: 500;
+}
 .status-content{
   width: 100%;
   white-space: pre-wrap;
-  text-align: center;
+  // text-align: center;
+  text-align: left;
+  font-size: 28rpx;
 }
 .title-box{
   font-size: 16px;
@@ -25,7 +31,17 @@
   align-items: center;
 }
 .tongue-box{
-  border-radius: 0px 0px 10px 10px !important;
+  background-color: #FFFFFF !important;
+  margin: 10px !important;
+  border-radius: 10px !important;
+  flex-direction: column !important;
+  align-items: stretch !important;
+}
+.report-status-row{
+  display: flex;
+  flex-direction: row;
+  align-items: flex-start;
+  width: 100%;
 }
 .status-data-wrapper {
   font-size: 12px;
@@ -60,12 +76,15 @@
 
     .content-wrapper {
       flex: auto;
+      .row {
+        white-space: nowrap;
+      }
     }
 
     .image-wrapper {
       flex: none;
-      width: 128px;
-      height: 128px;
+      width: 200rpx;
+      height: 200rpx;
       margin-left: 10px;
       border-radius: 10px;
     }
@@ -73,6 +92,7 @@
 
   .title {
     text-align: center;
+    font-size: 32rpx;
   }
 
   .primary {
@@ -106,9 +126,9 @@
 .report-content{
   display: flex;
   flex-direction: column;
-  align-items: center;
+  align-items: flex-start;
   justify-content: space-between;
-  padding: 10px 16px;
+  // padding: 10px 16px;
 }
 .nodata-box{
   width: 94%;

+ 8 - 6
miniprogram/module/health/components/report-health-status/report-health-status.wxml

@@ -98,13 +98,15 @@
     </view>
   </view>
   <view class="card-body report-wrapper tongue-box" mark:id="{{dataset.reportId}}">
-    <view class="content-wrapper report-content">
-      <view class="status-box">{{dataset.report[0].value}}</view>
-      <view wx:if="{{dataset.report.length>0}}" class="status-content">{{dataset.report[1].value}}表现为{{dataset.report[2].value}}</view>
-      <view class="status-box">体质:{{dataset.report[3].value}}</view>
+    <view class="status-box title">{{dataset.report[0].value}}</view>
+    
+    <view class="report-status-row">
+      <view class="content-wrapper report-content">
+        <view wx:if="{{dataset.report.length>0}}" class="status-content">{{dataset.report[1].value}}{{dataset.report[2].value ? '表现为' : ''}}{{dataset.report[2].value}}</view>
+        <view class="status-box">体质:{{dataset.report[4].value}}</view>
+      </view>
+      <image class="image-wrapper" src="../../assets/image/health-report.png" mode="aspectFill" />
     </view>
-
-    <image class="image-wrapper" src="../../assets/image/health-report.png" mode="aspectFill" />
   </view>
   <view slot="description" wx:if="{{!loading && !dataset.report.length}}">暂无数据</view>
   <t-empty wx:if="{{message}}" t-class="empty-wrapper error" icon="info-circle" description="{{message}}" />

+ 2 - 2
miniprogram/module/health/pages/report/report.ts

@@ -52,8 +52,8 @@ Page({
         schemeId,
         dataset: {
           ...dataset,
-          factorItems: __origin__?.factorItems,
-          diagnoseSyndromes: __origin__?.diagnoseSyndromes,
+          factorItems: (__origin__?.factorItems || []).filter((item: any) => item && (item.factorItemName || item.factorItemDescription)),
+          diagnoseSyndromes: (__origin__?.diagnoseSyndromes || []).filter((item: any) => item && (item.diagnoseSyndromeName || item.diagnoseSyndromeAnalysis)),
         },
       });
     } catch (error) {

+ 3 - 3
miniprogram/module/health/pages/report/report.wxml

@@ -69,10 +69,10 @@ module.exports = {
     <card-analysis-content tongue="{{dataset.tongue}}" face="{{dataset.face}}" simple="{{ {tongue: false, face: true} }}"  :type="file">
     </card-analysis-content>
 
-    <view class="card-wrapper">
+    <view class="card-wrapper" wx:if="{{dataset.factorItems.length}}">
       <view class="card-body constitution-container">
         <view class="card-title">
-          <view> 
+          <view>
             <image src="../../assets/icon/icon_zhengsu@2x.png" class="icon-title" />
           </view>
           <view class="text-title">{{i18n.common.zy}}{{tool.replace(i18n.health.statusTable[5])}}</view>
@@ -83,7 +83,7 @@ module.exports = {
         </view>
       </view>
     </view>
-    <view class="card-wrapper">
+    <view class="card-wrapper" wx:if="{{dataset.diagnoseSyndromes.length}}">
       <view class="card-body constitution-container">
         <view class="card-title">
           <view>

+ 10 - 9
miniprogram/module/health/request.ts

@@ -1,6 +1,7 @@
 import { Get, Post } from "../../lib/request/method";
 import { createHealthIndex } from "./tools/health-index";
 import dayjs from "dayjs";
+import { getFullImageUrl } from "../../utils/util";
 
 import { healthAnalysisModel, healthReportModel } from "./model/health.model";
 
@@ -87,7 +88,7 @@ export function healthSchemeMethod(id: string) {
             return {
               buyUrl: item?.buyUrl || '',
               buyType: item?.buyType || '',
-              shortImageUrl: item?.miniprogram || '',
+              shortImageUrl: getFullImageUrl(item?.miniprogram),
               title: item?.name || '',
               descriptions: item?.attrs?.map((attr: AnyArray, k: number) => {
                 return { ...attr, id: `description-${i}-${j}-${k}`, }
@@ -98,8 +99,8 @@ export function healthSchemeMethod(id: string) {
                     return {
                       id: `${item?.type}-${i}-${j}-${k}`,
                       type: item.imgUrl ? 'image' : null,
-                      poster: item.imgUrl,
-                      url: item.mediaUrl ?? item.imgUrl,
+                      poster: getFullImageUrl(item.imgUrl),
+                      url: getFullImageUrl(item.mediaUrl ?? item.imgUrl),
                       title: item.name,
                       description: item.description,
                     }
@@ -107,8 +108,8 @@ export function healthSchemeMethod(id: string) {
                     return {
                       id: `${item?.type}-${i}-${j}-${k}`,
                       type: item.mediaUrl ? 'video' : null,
-                      poster: item.imgUrl,
-                      url: item.mediaUrl,
+                      poster: getFullImageUrl(item.imgUrl),
+                      url: getFullImageUrl(item.mediaUrl),
                       title: item.name,
                       description: item.description,
                     }
@@ -116,8 +117,8 @@ export function healthSchemeMethod(id: string) {
                     return {
                       id: `${item?.type}-${i}-${j}-${k}`,
                       type: item.imgUrl ? 'image' : item.name ? 'text' : null,
-                      poster: item.imgUrl,
-                      url: item.mediaUrl ?? item.imgUrl,
+                      poster: getFullImageUrl(item.imgUrl),
+                      url: getFullImageUrl(item.mediaUrl ?? item.imgUrl),
                       title: [item.name, `${item.doase || ''}${item.unit || ''}`].filter(Boolean).join(' '),
                       description: item.description,
                     }
@@ -125,8 +126,8 @@ export function healthSchemeMethod(id: string) {
                     return {
                       id: `${item?.type}-${i}-${j}-${k}`,
                       type: item.imgUrl ? 'image' : item.name ? 'text' : null,
-                      poster: item.imgUrl,
-                      url: item.mediaUrl ?? item.imgUrl,
+                      poster: getFullImageUrl(item.imgUrl),
+                      url: getFullImageUrl(item.mediaUrl ?? item.imgUrl),
                       title: [item.name, `${item.doase || ''}${item.unit || ''}`].filter(Boolean).join(' '),
                       description: item.description,
                     }

+ 2 - 2
miniprogram/module/order/pages/order-detail/order-detail.ts

@@ -1,6 +1,6 @@
 import DictionariesBehavior from "../../../../core/behavior/dictionaries.behavior";
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
-import { handleWeChatPayment } from "../../../../utils/util";
+import { handleWeChatPayment, getFullImageUrl } from "../../../../utils/util";
 import tickleBehavior, {
   getTickleContext,
 } from "../../../../core/behavior/tickle.behavior";
@@ -141,7 +141,7 @@ Page({
                   return pricingType === '0' ? `${dose} ${unit}` : `1次`;
                 })(),
 
-                image: item.conditioningProgramPhoto || '',
+                image: getFullImageUrl(item.conditioningProgramPhoto) || '',
                 // price: item.totalPrice || 0,
                 price: item?.unitPrice || 0,
                 quantity: item?.totalMeasure || 0,

+ 3 - 2
miniprogram/module/order/pages/other-detail/other-detail.ts

@@ -1,6 +1,6 @@
 import DictionariesBehavior from "../../../../core/behavior/dictionaries.behavior";
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
-import { handleWeChatPayment } from "../../../../utils/util";
+import { handleWeChatPayment, getFullImageUrl } from "../../../../utils/util";
 import {
   getTickleContext,
 } from "../../../../core/behavior/tickle.behavior";
@@ -185,7 +185,7 @@ Page({
               // expressTypeIcon: this.getExpressTypeIcon(item?.expressType), //快递公司图标
               //end实体商品所用到的字段
               progress: item?.progress || '', //进度 0-进行中 1-已完成 2-未开始 3-已取消 这个字段用于线下服务商品以及线上权益商品的进度状态
-              image: item.conditioningProgramPhoto || '',
+              image: getFullImageUrl(item.conditioningProgramPhoto) || '',
               price: item?.unitPrice || 0,
               totalPrice: item?.totalPrice || 0,
               quantity: item?.totalMeasure || 0,
@@ -555,6 +555,7 @@ Page({
         });
         return;
       }
+      console.log(shippedGoods, "shippedGoods")
       //  去确认收货页面
       wx.navigateTo({
         url: `/module/article/pages/confirm-receiving/confirm-receiving?patientConditioningRecordId=${patientconditioningrecordid as string}&goodsList=${encodeURIComponent(JSON.stringify(shippedGoods))}`,

+ 2 - 1
miniprogram/module/order/pages/refund-processing/refund-processing.ts

@@ -1,4 +1,5 @@
 import { getAfterSaleDetailMethod, cancelAfterSaleMethod, applyAfterSaleMethod, updateAfterSaleMethod } from "../../request";
+import { getFullImageUrl } from "../../../../utils/util";
 
 // progress 数字转页面状态
 const progressToState: Record<string, string> = {
@@ -89,7 +90,7 @@ Page({
           name: detail.conditioningProgramName || '',
           meta1: detail.convertDose ? `${detail.convertDose}${detail.convertUnit || '次'}` : '',
           price: String(detail.unitPrice || 0),
-          image: detail.conditioningProgramPhoto || '',
+          image: getFullImageUrl(detail.conditioningProgramPhoto) || '',
         },
         refundDetail: {
           reason: detail.reason || '',

+ 2 - 1
miniprogram/module/order/pages/select-goods/select-goods.ts

@@ -5,6 +5,7 @@ import tickleBehavior, {
 } from "../../../../core/behavior/tickle.behavior";
 import I18nBehavior from "../../../../i18n/behavior";
 import { getOfflineTreatmentListMethod } from "../../request";
+import { getFullImageUrl } from "../../../../utils/util";
 // module/order/pages/select-goods/select-goods.ts
 Component({
   behaviors: [PageContainerBehavior, DictionariesBehavior, tickleBehavior,I18nBehavior],
@@ -61,7 +62,7 @@ Component({
                 const unit = item?.cpFixedPricingRule?.convertUnit ?? '';
                 return `${dose} ${unit}`;
               })(),
-              image: item.itemImgSecond || '', //商品图片
+              image: getFullImageUrl(item.itemImgSecond) || '', //商品图片
               price: item.cpFixedPricingRule?.unitPrice || 0, //商品单价
               quantity: 1, //商品数量
               checked: true, //是否选中

+ 11 - 3
miniprogram/pages/home/home.scss

@@ -56,24 +56,32 @@
     font-size: 13px;
     background-color: #ffefef;
     border-radius: 6px;
-    padding: 10rpx 30rpx 10rpx 10rpx;
+    padding: 10rpx 10rpx 10rpx 10rpx;
     // height: 60px;
     font-weight: bold;
     border: 2px solid white;
     box-shadow: inset 0 0 3px rgb(255, 90, 30, 0.2);
+    box-sizing: border-box;
+    // 内容过多时限制自身宽度并允许收缩,不再向左挤压报告展示
+    flex: 0 1 auto;
+    max-width: 70%;
+    min-width: 26%;
 
     .right-box {
       height: 100%;
       display: flex;
       flex-direction: column;
-      align-items: center;
+      align-items: stretch; // 子项占满宽度,过长文字才会换行
       justify-content: center;
+      flex: 1 1 auto;
+      min-width: 0;
     }
 
     .warn-img {
       width: 20rpx;
       height: 20rpx;
-      margin: 10rpx 15rpx 0 10rpx;
+      margin: 10rpx 10rpx 10rpx 0rpx;
+      flex-shrink: 0;
     }
   }
 }

+ 10 - 6
miniprogram/pages/home/home.ts

@@ -27,6 +27,7 @@ import {
 } from "./request";
 import { toCertificationPage, toChats } from "./router";
 import { Post } from "../../lib/request/method";
+import { getFullImageUrl } from "../../utils/util";
 // import { useLocation } from "../../lib/use/use-location";
 
 Page({
@@ -122,7 +123,7 @@ Page({
         if (item.photo) {
           item.carouselMediaList.push({
             type: "image",
-            src: item.photo,
+            src: getFullImageUrl(item.photo),
           });
         }
 
@@ -130,7 +131,7 @@ Page({
         if (item?.itemImgFirst) {
           item.carouselMediaList.push({
             type: "image",
-            src: item.itemImgFirst,
+            src: getFullImageUrl(item.itemImgFirst),
           });
         }
 
@@ -138,7 +139,7 @@ Page({
         if (item?.itemVideoFirst) {
           item.carouselMediaList.push({
             type: "video",
-            src: item.itemVideoFirst,
+            src: getFullImageUrl(item.itemVideoFirst),
           });
         }
       });
@@ -756,6 +757,9 @@ Page({
         total,
         page: currentPage,
       } = await getShortScienceList(page, this.data.scienceListSize);
+      data.forEach((item: any) => {
+        item.briefImg = getFullImageUrl(item.briefImg);
+      });
       const newList = reset ? data : [...this.data.scienceList, ...data];
       const hasMore = newList.length < total;
       this.setData({
@@ -989,21 +993,21 @@ Page({
           if (item.photo) {
             item.carouselMediaList.push({
               type: "image",
-              src: item.photo,
+              src: getFullImageUrl(item.photo),
             });
           }
           // 添加itemImgFirst
           if (item?.itemImgFirst) {
             item.carouselMediaList.push({
               type: "image",
-              src: item.itemImgFirst,
+              src: getFullImageUrl(item.itemImgFirst),
             });
           }
           // 添加itemVideoFirst
           if (item?.itemVideoFirst) {
             item.carouselMediaList.push({
               type: "video",
-              src: item.itemVideoFirst,
+              src: getFullImageUrl(item.itemVideoFirst),
             });
           }
         }

+ 1 - 1
miniprogram/pages/home/home.wxml

@@ -61,7 +61,7 @@
         <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}}</view>
+            <view wx:for="{{healthIndex.data}}" wx:key="{{item.quotaId}}">{{item}}</view>
           </view>
         </view>
       </view>

+ 14 - 0
miniprogram/utils/util.ts

@@ -1,3 +1,17 @@
+import { Base_URL } from "../app.config";
+
+/**
+ * 拼接图片完整地址
+ * - 相对路径:拼接当前环境域名
+ * - 完整地址(http/https):直接返回
+ * @param url 图片地址(完整URL或相对路径)
+ */
+export const getFullImageUrl = (url?: string): string => {
+  if (!url) return '';
+  if (url.startsWith('http')) return url;
+  return `${Base_URL.replace(/\/manager\/.*$/, '')}${url}`;
+}
+
 export const formatTime = (date: Date) => {
   const year = date.getFullYear()
   const month = date.getMonth() + 1

+ 1 - 1
project.config.json

@@ -52,5 +52,5 @@
     "ignore": [],
     "include": []
   },
-  "libVersion": "3.10.3"
+  "libVersion": "3.8.12"
 }