Просмотр исходного кода

协商历史图片可以放大轮播查看

张田田 1 месяц назад
Родитель
Сommit
48f3ada7a7

+ 5 - 17
.idea/workspace.xml

@@ -6,21 +6,9 @@
   <component name="ChangeListManager">
     <list default="true" id="ade0a8c5-0639-4f05-956a-aae1181b5d18" name="更改" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/care/pages/offlineTreatment/offlineTreatment.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/care/pages/offlineTreatment/offlineTreatment.ts" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/model/evaluate.model.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/model/evaluate.model.ts" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/logistics-detail/logistics-detail.scss" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/logistics-detail/logistics-detail.scss" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/logistics-detail/logistics-detail.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/logistics-detail/logistics-detail.ts" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/logistics-detail/logistics-detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/logistics-detail/logistics-detail.wxml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluate/offline-evaluate.scss" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluate/offline-evaluate.scss" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluate/offline-evaluate.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluate/offline-evaluate.ts" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluate/offline-evaluate.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluate/offline-evaluate.wxml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluateDetail/offline-evaluateDetail.scss" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluateDetail/offline-evaluateDetail.scss" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluateDetail/offline-evaluateDetail.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluateDetail/offline-evaluateDetail.ts" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluateDetail/offline-evaluateDetail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/offline-evaluateDetail/offline-evaluateDetail.wxml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/order-detail/order-detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/order-detail/order-detail.wxml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/other-detail/other-detail.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/other-detail/other-detail.ts" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/other-detail/other-detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/other-detail/other-detail.wxml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/request.ts" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/request.ts" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/module/chats/pages/consultation-record/consultation-record.scss" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/chats/pages/consultation-record/consultation-record.scss" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/module/chats/pages/consultation-record/consultation-record.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/chats/pages/consultation-record/consultation-record.wxml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/miniprogram/module/order/pages/other-detail/other-detail.json" beforeDir="false" afterPath="$PROJECT_DIR$/miniprogram/module/order/pages/other-detail/other-detail.json" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -43,7 +31,7 @@
     "ModuleVcsDetector.initialDetectionPerformed": "true",
     "RunOnceActivity.ShowReadmeOnStart": "true",
     "RunOnceActivity.git.unshallow": "true",
-    "git-widget-placeholder": "正在合并 story-afterSale",
+    "git-widget-placeholder": "story-afterSale",
     "junie.onboarding.icon.badge.shown": "true",
     "last_opened_file_path": "/Users/zhangtiantian/Desktop/six-health.applet",
     "node.js.detected.package.eslint": "true",
@@ -76,7 +64,7 @@
       <workItem from="1773898120801" duration="598000" />
       <workItem from="1774601263134" duration="598000" />
       <workItem from="1774842425747" duration="598000" />
-      <workItem from="1776043564270" duration="371000" />
+      <workItem from="1776043564270" duration="2172000" />
     </task>
     <servers />
   </component>

+ 69 - 19
miniprogram/module/chats/pages/consultation-record/consultation-record.scss

@@ -6,16 +6,20 @@
   box-sizing: border-box;
   overflow-y: auto;
   padding-top: 10px;
+  padding-bottom: env(safe-area-inset-bottom);
   background-color: #f5f5f5;
 }
 
 .consultation-container {
-  padding: 40rpx 30rpx;
-  background-color: #ffffff;
+  padding: 0rpx 0rpx calc(30rpx + env(safe-area-inset-bottom));
+  background-color: #f5f5f5;
 }
 
 .consultation-session {
-  margin-bottom: 60rpx;
+  margin-bottom: 20rpx;
+  background-color: #ffffff;
+  border-radius: 16rpx;
+  padding: 30rpx 24rpx;
 
   &:last-child {
     margin-bottom: 0;
@@ -26,29 +30,66 @@
   text-align: center;
   font-size: 24rpx;
   color: #999999;
-  margin: 0rpx 0 10rpx;
+  margin: 10rpx 0 20rpx;
 }
 
 .status-message {
   text-align: center;
   font-size: 24rpx;
   color: #999999;
-  margin: 15rpx 0 15rpx 0;
+  margin: 10rpx 0 20rpx;
+}
+
+.session-end {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  // margin-top: 48rpx;
+  padding-top: 36rpx;
+  border-top: 1rpx solid #f0f0f0;
+  justify-content: center;
+
+  &__line {
+    flex: 1;
+    height: 1rpx;
+    background-color: #e0e0e0;
+    align-self: center;
+  }
+
+  &__content {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 0 24rpx;
+  }
+
+  &__time {
+    font-size: 22rpx;
+    color: #bbbbbb;
+    line-height: 1.5;
+  }
+
+  &__text {
+    font-size: 24rpx;
+    color: #999999;
+    line-height: 1.5;
+  }
 }
 
 .messages-list {
   display: flex;
   flex-direction: column;
-  gap: 30rpx;
+  // gap: 30rpx;
+  // padding-bottom: 50rpx;
 }
 
 .message-item {
   display: flex;
-  align-items: flex-start;
-  margin: 20rpx 0 20rpx 0;
+  // align-items: flex-start;
+  margin-bottom: 30rpx;
 
   &--agent {
-    justify-content: flex-start;
+    // justify-content: flex-start;
   }
 
   &--user {
@@ -61,23 +102,23 @@
 }
 
 .message-bubble {
-  max-width: 500rpx;
+  max-width: 480rpx;
   padding: 20rpx 24rpx;
-  border-radius: 12rpx;
+  border-radius: 16rpx;
   position: relative;
   word-wrap: break-word;
-  margin-left: 20rpx;
 
   &--agent {
     background-color: #ffffff;
     border: 1rpx solid #e5e5e5;
+    margin-left: 16rpx;
 
     // 三角形尾巴(指向左侧头像)
     &::before {
       content: "";
       position: absolute;
       left: -10rpx;
-      top: 16rpx;
+      top: 20rpx;
       width: 0;
       height: 0;
       border-top: 10rpx solid transparent;
@@ -90,8 +131,8 @@
     &::after {
       content: "";
       position: absolute;
-      left: -11rpx;
-      top: 16rpx;
+      left: -12rpx;
+      top: 20rpx;
       width: 0;
       height: 0;
       border-top: 10rpx solid transparent;
@@ -103,13 +144,14 @@
 
   &--user {
     background-color: #409eff;
-    margin-right: 20rpx;
+    margin-right: 16rpx;
+
     // 三角形尾巴(指向右侧头像)
     &::before {
       content: "";
       position: absolute;
       right: -10rpx;
-      top: 16rpx;
+      top: 20rpx;
       width: 0;
       height: 0;
       border-top: 10rpx solid transparent;
@@ -121,27 +163,31 @@
 
 .message-text {
   font-size: 28rpx;
-  color: #000000;
-  line-height: 1.5;
+  color: #333333;
+  line-height: 1.6;
   word-wrap: break-word;
 
   &--user {
     color: #ffffff;
   }
 }
+
 .message-item--system {
   width: 100%;
   align-items: center;
   justify-content: center;
+
   .message-bubble--system {
     width: 100%;
     text-align: center;
+
     .message-text--system {
       color: #999999 !important;
       font-size: 24rpx;
     }
   }
 }
+
 .message-image {
   width: 200rpx;
   height: 200rpx;
@@ -149,3 +195,7 @@
   display: block;
   border-radius: 8rpx;
 }
+
+.bottom-safe-space {
+  height: calc(24rpx + env(safe-area-inset-bottom));
+}

+ 8 - 4
miniprogram/module/chats/pages/consultation-record/consultation-record.wxml

@@ -31,7 +31,7 @@
             
             <!-- 患者消息 (sendType === '1') - 右侧显示 -->
             <view wx:elif="{{message.sendType === '1'}}" class="message-item message-item--user">
-              <view class="message-bubble {{message.messageType==='1'?'message-bubble--user':''}}">
+              <view class="message-bubble message-bubble--user">
                 <!-- 文本消息 -->
                 <block wx:if="{{message.messageType === '1'}}">
                   <text class="message-text message-text--user">{{message.messageContent}}</text>
@@ -47,7 +47,7 @@
             <!-- 医生/AI消息 (sendType === '2' 或 '4') - 左侧显示 -->
             <view wx:else class="message-item message-item--agent">
               <t-avatar class="message-avatar message-avatar--agent" icon="{{message.sendType === '2' ? 'user' : 'service'}}" size="40px" />
-              <view class="message-bubble {{message.messageType==='1'?'message-bubble--agent':''}}">
+              <view class="message-bubble message-bubble--agent">
                 <!-- 文本消息 -->
                 <block wx:if="{{message.messageType === '1'}}">
                   <text class="message-text">{{message.messageContent}}</text>
@@ -62,8 +62,12 @@
         </view>
         
         <!-- 咨询结束 -->
-        <view class="timestamp">{{item.endTime}}</view>
-        <view class="status-message">{{i18n.consultChat._}}结束</view>
+        <view class="session-end">
+          <view class="session-end__content">
+            <view class="session-end__time">{{item.endTime}}</view>
+            <view class="session-end__text">{{i18n.consultChat._}}结束</view>
+          </view>
+        </view>
       </view>
     </block>
     

+ 19 - 5
miniprogram/module/order/pages/negotiation-history/negotiation-history.ts

@@ -34,11 +34,13 @@ Page({
           { label: '退款说明', value: 'uudksjj' }
         ],
         images: [
-          'placeholder',
-          'placeholder',
-          'placeholder',
-          'placeholder',
-          'placeholder'
+          'https://ts1.tc.mm.bing.net/th/id/OIP-C.Dt8zun07_LEEoSPMONuoogHaLH?w=193&h=290&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2',
+          'https://ts1.tc.mm.bing.net/th/id/OIP-C.Dt8zun07_LEEoSPMONuoogHaLH?w=193&h=290&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2',
+          'https://ts1.tc.mm.bing.net/th/id/OIP-C.cnR8hVXoKhGmqMTDVwe1FgHaLH?w=193&h=290&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2',
+          'https://ts1.tc.mm.bing.net/th/id/OIP-C.Dt8zun07_LEEoSPMONuoogHaLH?w=193&h=290&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2',
+          'https://ts1.tc.mm.bing.net/th/id/OIP-C.Dt8zun07_LEEoSPMONuoogHaLH?w=193&h=290&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2',
+          'https://ts1.tc.mm.bing.net/th/id/OIP-C.Dt8zun07_LEEoSPMONuoogHaLH?w=193&h=290&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2',
+
         ]
       },
       {
@@ -55,5 +57,17 @@ Page({
 
   onLoad() {
     // 实际项目中会在这里请求接口拿到由于协商历史列表
+  },
+
+  previewImage(e: any) {
+    const currentUrl = e.currentTarget.dataset.url;
+    const images = e.currentTarget.dataset.images;
+    wx.previewImage({
+      current: currentUrl,
+      urls: images,
+      fail: (err) => {
+        console.error('预览图片失败', err);
+      },
+    });
   }
 });

+ 2 - 5
miniprogram/module/order/pages/negotiation-history/negotiation-history.wxml

@@ -31,11 +31,8 @@
           
           <!-- 图片矩阵 -->
           <view class="image-grid" wx:if="{{item.images && item.images.length > 0}}">
-            <view class="grid-img-wrap" wx:for="{{item.images}}" wx:for-item="img" wx:key="index">
-              <image class="grid-img" src="{{img !== 'placeholder' ? img : ''}}" mode="aspectFill" wx:if="{{img !== 'placeholder'}}"></image>
-              <view class="grid-placeholder" wx:else>
-                <t-icon name="image" size="40rpx" color="#ccc" />
-              </view>
+            <view class="grid-img-wrap" wx:for="{{item.images}}" wx:for-item="img" wx:key="index" bind:tap="previewImage" data-url="{{img}}" data-outer-index="{{index}}" data-images="{{item.images}}">
+              <image class="grid-img" src="{{img}}" mode="aspectFill"></image>
             </view>
           </view>
         </block>

+ 0 - 1
miniprogram/module/order/pages/other-detail/other-detail.json

@@ -1,6 +1,5 @@
 {
   "renderer": "skyline",
-  "component": true,
   "usingComponents": {
     "t-navbar": "tdesign-miniprogram/navbar/navbar",
     "t-icon": "tdesign-miniprogram/icon/icon",