发货方式优化及消息功能优化
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
<!--pages/message/detail/index.wxml-->
|
||||
<wxs src="./index.wxs" module="_index" />
|
||||
<view class="message-detail">
|
||||
<!-- 聊天记录区域 -->
|
||||
<scroll-view class="message-list" scroll-y scroll-into-view="{{scrollToMessage}}" enable-flex scroll-anchoring="{{true}}">
|
||||
<view wx:for="{{messageList}}" wx:key="id" class="message-item {{item.isSelf ? 'self' : 'other'}}" id="msg-{{item.id}}">
|
||||
<image class="avatar" src="{{item.avatar}}" />
|
||||
<view class="content">
|
||||
<view class="bubble">
|
||||
<text wx:if="{{item.type === 'text'}}">{{item.content}}</text>
|
||||
<image wx:if="{{item.type === 'image'}}" class="msg-image" src="{{item.content}}" mode="widthFix" bindtap="previewImage" data-src="{{item.content}}" />
|
||||
</view>
|
||||
<text class="time">{{item.time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 底部输入区域 -->
|
||||
<view class="input-area">
|
||||
<view class="input-box">
|
||||
<view class="tool-item" bindtap="chooseImage">
|
||||
<t-icon name="image" size="48rpx" />
|
||||
</view>
|
||||
<textarea class="input" value="{{inputContent}}" placeholder="请输入消息" auto-height cursor-spacing="20" maxlength="500" bindinput="onInput" adjust-position="{{false}}" />
|
||||
<view class="send-btn {{inputContent ? 'active' : ''}}" bindtap="sendMessage">
|
||||
发送
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{loading}}" class="detail-loading">
|
||||
<t-loading theme="circular" size="40rpx" text="加载中..." />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<block wx:elif="{{detail}}">
|
||||
<view class="detail-card">
|
||||
<view class="detail-header">
|
||||
<text class="detail-title">{{detail.title}}</text>
|
||||
<t-tag size="small" variant="light" theme="{{_index.tagTheme(detail.message_type)}}">{{detail.message_type_text}}</t-tag>
|
||||
</view>
|
||||
<view class="detail-time">{{detail.createtime_text}}</view>
|
||||
<view class="detail-content">{{detail.content}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 有跳转页面时才展示入口:不想前往可直接返回,不会被强制跳转 -->
|
||||
<view class="detail-actions" wx:if="{{jumpPage}}">
|
||||
<t-button theme="primary" size="large" block bind:tap="onJumpTap">前往查看</t-button>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view wx:else class="detail-empty">
|
||||
<t-empty icon="chat-bubble-error" description="消息不存在或已被删除" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user