2025-01-21 13:56:53 +00:00
|
|
|
<view class="chat-container">
|
|
|
|
<block
|
|
|
|
a:for="{{typeList}}"
|
|
|
|
a:for-index="index"
|
|
|
|
a:for-item="item"
|
|
|
|
>
|
|
|
|
<ant-notice
|
|
|
|
type="{{item}}"
|
|
|
|
style="margin-bottom: 8px"
|
|
|
|
enableMarquee="{{true}}"
|
|
|
|
onTap="handleTapLink"
|
|
|
|
mode="link"
|
|
|
|
>
|
|
|
|
有问题找客服!
|
|
|
|
</ant-notice>
|
|
|
|
</block>
|
|
|
|
<scroll-view class="chat-box" scroll-y="true" scroll-into-view="{{scrollToView}}" scroll-top="{{scrollTop}}">
|
|
|
|
<view a:for="{{chatMessages}}" a:key="index" class="chat-message {{item.type}}">
|
|
|
|
<view class="message-content">
|
|
|
|
<image class="avatar" src="{{item.avatar}}" mode="aspectFit" />
|
|
|
|
<view class="bubble">
|
|
|
|
{{item.content}}
|
|
|
|
</view>
|
2024-11-10 07:01:22 +00:00
|
|
|
</view>
|
|
|
|
</view>
|
2025-01-21 13:56:53 +00:00
|
|
|
</scroll-view>
|
|
|
|
|
2024-11-10 07:01:22 +00:00
|
|
|
|
2025-01-21 13:56:53 +00:00
|
|
|
<form onSubmit="onSubmit" class="input-box">
|
|
|
|
<input
|
|
|
|
value="{{message}}"
|
|
|
|
name="message"
|
|
|
|
onInput="onMessageInput"
|
|
|
|
onConfirm="onKeyUp"
|
|
|
|
placeholder="你的美顾问"
|
|
|
|
class="box1"
|
|
|
|
required
|
|
|
|
/>
|
|
|
|
<view style="margin: 16px;">
|
|
|
|
<button onTap="onSubmit" class="send-button" onConfirm="onSubmit">发送</button>
|
|
|
|
</view>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</view>
|