From 0dc8bb825b1fb47e0f477a6e4dc93638b2dedf95 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 06 八月 2024 17:57:26 +0800
Subject: [PATCH] 对接接口

---
 miniprogram/pages/question/question.wxml |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/miniprogram/pages/question/question.wxml b/miniprogram/pages/question/question.wxml
index 201c7ec..d3678b5 100644
--- a/miniprogram/pages/question/question.wxml
+++ b/miniprogram/pages/question/question.wxml
@@ -6,10 +6,15 @@
     </view>
     <view class="flex-auto flex flex-col overflow-y-auto">
       <view class="flex {{item.role===RoleEnum.user ? 'user':'assistant'}} {{index===0 ? 'mt-0':'mt-30'}}" wx:for="{{chatHistory}}" wx:key="index">
-        <text class="chat-bubble">
-          1321233333333333312211223
-        </text>
-        <image src="{{roleImageMap[item.role]}}" class="size-55"></image>
+        <view class="chat-bubble">
+          <knowledge></knowledge>
+          <block wx:if="{{item.content.errCode === ErrorCode.Message}}">
+            <normal-text data="{{item.content.errMsg}}" color="#ef4444"></normal-text>
+          </block>
+          <normal-text wx:if="{{item.content.type===AnswerType.Text}}" data="{{item.content.values}}"></normal-text>
+
+        </view>
+        <image src="{{roleImageMap[item.role]}}" class="size-55 flex-0"></image>
       </view>
 
       <!-- <van-button type="default">榛樿鎸夐挳</van-button>
@@ -42,14 +47,13 @@
           <text class="text-blue-400 ">涓�閿竻绌烘墍鏈�</text>
         </view>
         <view class="flex-auto font25 overflow-y-auto my-20">
-          <view class="flex-items-center justify-between {{index===0 ? 'mt-0':'mt-24'}}" wx:for="{{displayChatRoom}}" wx:key="group_id"
-          data-item="{{item}}" bindtap="chatRoomClick">
+          <view class="flex-items-center justify-between {{index===0 ? 'mt-0':'mt-24'}}" wx:for="{{displayChatRoom}}" wx:key="group_id" data-item="{{item}}" bindtap="chatRoomClick">
             <view class="flex-auto flex-items-center" style="color:{{activeChatRoom.group_id===item.group_id ?'#35cfab':''}}">
               <text class="ywicon icon-xiaoxi1 mr-6"></text>
               <text style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;">"{{item.group_title}}</text>
               <text>"</text>
             </view>
-            <text class="ywicon icon-shanchu ml-30" bind:tap="delChatRoomClick"></text>
+            <text class="ywicon icon-shanchu ml-30" catchtap="delChatRoomClick"></text>
           </view>
         </view>
       </view>

--
Gitblit v1.9.3