|
|
@@ -1,82 +1,75 @@ |
|
|
|
<!-- pages/wechat2/wechat2.wxml --> |
|
|
|
<view class='news'> |
|
|
|
<view class="historycon"> |
|
|
|
<scroll-view scroll-y="true" scroll-into-view="{{scrollid}}" scroll-with-animation="{{true}}" style="height:{{scrollHeight}}" class="history" refresher-enabled="true" bindrefresherrefresh="refresh" refresher-triggered="{{triggered}}"> |
|
|
|
<!-- 历史记录部分start --> |
|
|
|
<view wx:if="{{historyList.length > 0}}"> |
|
|
|
<view class="historyText">历史消息</view> |
|
|
|
<block wx:for="{{historyList}}" wx:key="index"> |
|
|
|
<!-- 此处为other --> |
|
|
|
<view wx:if="{{item.type==1}}" id="historyscrollid{{index}}"> |
|
|
|
<view> |
|
|
|
<text class='chat-time' style="display:none;">{{item.date}}</text> |
|
|
|
</view> |
|
|
|
<view class='other-record'> |
|
|
|
<image class='other-head-img' src='{{item.senderHeadPortrait}}'></image> |
|
|
|
<view class='other-record-content-triangle'></view> |
|
|
|
<view class='other-record-content'>{{item.content}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 此处为结尾 --> |
|
|
|
<!-- 此处为own --> |
|
|
|
<view id="historyscrollid{{index}}" wx:else> |
|
|
|
<view> |
|
|
|
<text class='chat-time' style="display:none;">{{item.date}}</text> |
|
|
|
</view> |
|
|
|
<view class='own-record'> |
|
|
|
<view class='own-record-content'>{{item.content}}</view> |
|
|
|
<view class='own-record-content-triangle'></view> |
|
|
|
<image class='own-head-img' src='{{item.senderHeadPortrait}}'></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- own结尾 --> |
|
|
|
</block> |
|
|
|
<view class="historyText">以上为历史消息</view> |
|
|
|
</view> |
|
|
|
<!-- 历史记录部分end --> |
|
|
|
<block wx:for="{{newsList}}" wx:key="index"> |
|
|
|
<!-- <scroll-view scroll-y="true" scroll-into-view="{{scrollid}}" scroll-with-animation="{{true}}" style="height:{{scrollHeight}}" class="history" refresher-enabled="true" bindrefresherrefresh="refresh" refresher-triggered="{{triggered}}"> --> |
|
|
|
<!-- 历史记录部分start --> |
|
|
|
<view wx:if="{{historyList.length > 0}}"> |
|
|
|
<view class="historyText">历史消息</view> |
|
|
|
<block wx:for="{{historyList}}" wx:key="index"> |
|
|
|
<!-- 此处为other --> |
|
|
|
<view wx:if="{{item.type==1}}" id="scrollid{{index}}"> |
|
|
|
<view wx:if="{{item.type==1 && item.messageType != 1}}" id="historyscrollid{{index}}"> |
|
|
|
<view> |
|
|
|
<text class='chat-time' style="display:none;">{{item.date}}</text> |
|
|
|
</view> |
|
|
|
<view class='other-record'> |
|
|
|
<image class='other-head-img' src='{{receivebaseInfo.avatar}}'></image> |
|
|
|
<image class='other-head-img' src='{{item.senderHeadPortrait}}'></image> |
|
|
|
<view class='other-record-content-triangle'></view> |
|
|
|
<view class='other-record-content'>{{item.message}}</view> |
|
|
|
<view class='other-record-content'>{{item.content}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 此处为结尾 --> |
|
|
|
<!-- 此处为own --> |
|
|
|
<view id="scrollid{{index}}" wx:else> |
|
|
|
<view id="historyscrollid{{index}}" wx:elif="{{item.type==0 && item.messageType != 1}}"> |
|
|
|
<view> |
|
|
|
<text class='chat-time' style="display:none;">{{item.date}}</text> |
|
|
|
</view> |
|
|
|
<view class='own-record'> |
|
|
|
<view class='own-record-content'>{{item.message}}</view> |
|
|
|
<view class='own-record-content'>{{item.content}}</view> |
|
|
|
<view class='own-record-content-triangle'></view> |
|
|
|
<image class='own-head-img' src='{{sendAvatar}}'></image> |
|
|
|
<image class='own-head-img' src='{{item.senderHeadPortrait}}'></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view wx:else> |
|
|
|
{{ item.object.info }} \ {{ item.date }} |
|
|
|
</view> |
|
|
|
<!-- own结尾 --> |
|
|
|
</block> |
|
|
|
</scroll-view> |
|
|
|
<view class="historyText">以上为历史消息</view> |
|
|
|
</view> |
|
|
|
<!-- 历史记录部分end --> |
|
|
|
<block wx:for="{{newsList}}" wx:key="index"> |
|
|
|
<!-- 此处为other --> |
|
|
|
<view wx:if="{{item.type==1}}" id="scrollid{{index}}"> |
|
|
|
<view> |
|
|
|
<text class='chat-time' style="display:none;">{{item.date}}</text> |
|
|
|
</view> |
|
|
|
<view class='other-record'> |
|
|
|
<image class='other-head-img' src='{{receivebaseInfo.avatar}}'></image> |
|
|
|
<view class='other-record-content-triangle'></view> |
|
|
|
<view class='other-record-content'>{{item.message}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 此处为结尾 --> |
|
|
|
<!-- 此处为own --> |
|
|
|
<view id="scrollid{{index}}" wx:else> |
|
|
|
<view> |
|
|
|
<text class='chat-time' style="display:none;">{{item.date}}</text> |
|
|
|
</view> |
|
|
|
<view class='own-record'> |
|
|
|
<view class='own-record-content'>{{item.message}}</view> |
|
|
|
<view class='own-record-content-triangle'></view> |
|
|
|
<image class='own-head-img' src='{{sendAvatar}}'></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- own结尾 --> |
|
|
|
</block> |
|
|
|
<!-- </scroll-view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="sendmessage"> |
|
|
|
<view class="send-message"> |
|
|
|
<input |
|
|
|
class="chat-input" |
|
|
|
type="text" |
|
|
|
bindinput="bindChange" |
|
|
|
confirm-type="send" |
|
|
|
value='{{input}}' |
|
|
|
cursor-spacing="16px" |
|
|
|
hold-keyboard="{{true}}" |
|
|
|
placeholder="" |
|
|
|
bindconfirm="send" |
|
|
|
/> |
|
|
|
<image class="expression-msg-img" src="/images/home/expression-msg-icon.png" bind:tap="emotionChange"/> |
|
|
|
<input class="chat-input" type="text" bindinput="bindChange" confirm-type="send" value='{{input}}' cursor-spacing="16px" hold-keyboard="{{true}}" placeholder="" bindconfirm="send" /> |
|
|
|
<image class="expression-msg-img" src="/images/home/expression-msg-icon.png" bind:tap="emotionChange" /> |
|
|
|
<image class="img-msg-img" src="/images/home/img-msg-icon.png" /> |
|
|
|
</view> |
|
|
|
<view class="emotions" wx:if="{{emotionVisible}}"> |