|
|
|
@ -9,24 +9,22 @@
|
|
|
|
|
<scroll-view class="detail-content" :scroll-y="true" :scroll-top="scrollTop" |
|
|
|
|
style="padding-bottom: 90px;box-sizing: border-box;" :style="{height:windowHeihgt-40+'px'}"> |
|
|
|
|
<view id="scroll-view-content"> |
|
|
|
|
<view :class="item.send_user_id === user_id ? 'chat-item my-chat row' : 'chat-item other-chat row'" |
|
|
|
|
<view :class="item.send_user_id === user_id && type === item.type ? 'chat-item my-chat row' : 'chat-item other-chat row'" |
|
|
|
|
v-for="(item, index) in messageList"> |
|
|
|
|
<view class="chat-item-content row"> |
|
|
|
|
<view class="chat-avator " v-if="item.send_user_id !== user_id"> |
|
|
|
|
<view class="chat-avator " v-if="item.send_user_id !== user_id || type !== item.type"> |
|
|
|
|
<image mode="aspectFill" class="img" :src="item.avatar ? item.avatar : user.avatar"/> |
|
|
|
|
</view> |
|
|
|
|
<view class="chat-content-container " style="max-width: calc(100% - 50px);"> |
|
|
|
|
<view class="chat-time">{{ item.create_time }}</view> |
|
|
|
|
<view class="chat-time">{{item.user_name}} {{ item.create_time }}</view> |
|
|
|
|
<view class="chat-content" style="word-break: break-all;">{{ item.info }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="chat-avator " v-if="item.send_user_id === user_id"> |
|
|
|
|
<view class="chat-avator " v-if="item.send_user_id === user_id && type === item.type"> |
|
|
|
|
<image mode="aspectFill" class="img" :src="item.avatar ? item.avatar : user.avatar"/> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view id="chat-end"></view> |
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
|
<view class="detail-input-group-container"> |
|
|
|
|
<view class="detail-input-group row"> |
|
|
|
@ -92,7 +90,7 @@ export default {
|
|
|
|
|
type: 0, |
|
|
|
|
user_id: 0, |
|
|
|
|
messageList: [], |
|
|
|
|
title: "在线咨询" |
|
|
|
|
title:"在线咨询" |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
this.getToken(options.id, options.type ?? 1); |
|
|
|
|