123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <wxs src="/utils/util.wxs" module="tools"></wxs>
- <view>
- <scroll-view bindtap="closeText" scroll-y scroll-into-view='{{toView}}' refresher-threshold="{{80}}" refresher-enabled refresher-triggered="{{refer}}" bindrefresherrefresh="bindscrolltoupper" style='height: calc({{scrollHeight}});'>
- <!-- <view class='scrollMsg'> -->
- <block wx:key="index" wx:for='{{msgList}}'>
- <!-- 单个消息1 客服发出(左) -->
- <view class="sendTime" wx:if="{{item.showTime}}">
- {{tools.getDateDiff(now,item.sendTime)}}
- </view>
- <view wx:if='{{item.sendID==userID}}' id='msg-{{index}}' style='display: flex; padding: 2vw 11vw 2vw 2vw;'>
- <view style='width: 11vw; height: 11vw;'>
- <image style='width: 11vw; height: 11vw; border-radius: 10rpx;' src='{{faceurl}}'></image>
- </view>
- <block wx:if="{{item.contentType==102}}">
- <view style='width: 4vw; height: 11vw; margin-left: 0.5vw; display: flex; align-items: center; z-index: 9;'>
- <image style='width: 4vw;' src='http://ro7r875ut.hn-bkt.clouddn.com/left.png' mode='widthFix'></image>
- </view>
- <image class='leftMsgPic' src="{{item.content.sourcePicture.url}}" mode="scaleToFill" data-src='{{item.content.sourcePicture.url}}' bindtap='previewImage' />
- </block>
- <block wx:else="">
- <view style='width: 4vw; height: 11vw; margin-left: 0.5vw; display: flex; align-items: center; z-index: 9;'>
- <image style='width: 4vw;' src='http://ro7r875ut.hn-bkt.clouddn.com/left.png' mode='widthFix'></image>
- </view>
- <view class='leftMsg'>{{item.content}}</view>
- </block>
- </view>
- <!-- 单个消息2 用户发出(右) -->
- <view wx:else id='msg-{{index}}' style='display: flex; justify-content: flex-end; padding: 2vw 2vw 2vw 11vw;'>
- <block wx:if="{{item.contentType==102}}">
- <image class='rightMsgPic' src="{{item.content.sourcePicture.url}}" mode="scaleToFill" data-src='{{item.content.sourcePicture.url}}' bindtap='previewImage' />
- <view style='width: 4vw; height: 11vw; margin-right: 0.5vw; display: flex; align-items: center; z-index: 9;'>
- <image style='width: 4vw;' src='http://ro7r875ut.hn-bkt.clouddn.com/right.png' mode='widthFix'></image>
- </view>
- </block>
- <block wx:elif="{{item.contentType==108}}">
- <view class="house_link rightMsgPic" data-data="{{item.content}}" bindtap="goHouse">
- <image class="house_link_pic" src="{{item.content.data[0].house_pic[0]}}" />
- <view class="house_link_box">
- <text class="garden_name">{{item.content.data[0].garden_name}}</text>
- <text class="areatext" space="nbsp">{{item.content.data[0].room_count}}室 {{item.content.data[0].hall_count}}厅 /{{item.content.data[0].room_area}}m² /{{direction[item.content.data[0].direction]}}</text>
- <text class="house_price">{{item.content.data[0].rent_price/100}}元</text>
- </view>
- </view>
- <view style='width: 4vw; height: 11vw; margin-right: 0.5vw; display: flex; align-items: center; z-index: 9;'>
- <image style='width: 4vw;' src='http://ro7r875ut.hn-bkt.clouddn.com/right.png' mode='widthFix'></image>
- </view>
- </block>
- <block wx:else="">
- <view class='rightMsg'>{{item.content}}</view>
- <view style='width: 4vw; height: 11vw; margin-right: 0.5vw; display: flex; align-items: center; z-index: 9;'>
- <image style='width: 4vw;' src='http://ro7r875ut.hn-bkt.clouddn.com/right.png' mode='widthFix'></image>
- </view>
- </block>
- <view style='width: 11vw; height: 11vw;'>
- <image style='width: 11vw; height: 11vw; border-radius: 10rpx;' src='{{avatar}}'></image>
- </view>
- </view>
- </block>
- <!-- </view> -->
- <!-- 占位 -->
- <!-- <view style='width: 100%; height: 18vw;'></view> -->
- </scroll-view>
- <view class='inputRoom' style='bottom: {{inputBottom}}rpx;height: calc(16vw + {{(lineCount-1)*9}}vw);'>
- <textarea show-confirm-bar="{{false}}" focus="{{focus}}" style="height: {{textareaHeight}}vw;" bindlinechange="bindlinechange" bindconfirm='sendClick' adjust-position='{{false}}' value='{{inputVal}}' confirm-type='send' bindfocus='focus' bindblur='blur' bindinput="bindinput" fixed></textarea>
- <block wx:if="{{isEmoji}}">
- <image style='width: 7vw; margin-left: 3.2vw;' src='/static/icon/icon_face.png' mode='widthFix' bindtap="openEmoji"></image>
- </block>
- <block wx:else="">
- <image style='width: 7vw; margin-left: 3.2vw;' src='/static/icon/icon_key.png' mode='widthFix' bindtap="closeEmoji"></image>
- </block>
- <block wx:if="{{inputVal}}">
- <text bindtap="sendClick" style='text-align: center;width: 12vw; margin-left: 2vw;padding: 1vw;background-color: #33b966;color: #fff;border-radius: 5px;'>发送</text>
- </block>
- <block wx:else="">
- <image style='width: 7vw; margin-left: 3.2vw;' src='/static/icon/icon_add.png' mode='widthFix' bindtap="{{isMore?'openMore':'closeMore'}}"></image>
- </block>
- </view>
- <view hidden="{{isEmoji}}">
- <scroll-view class='emoji_list' scroll-y="true" style="height: 200px;bottom: {{safeHeight}}rpx;">
- <text wx:for="{{emojiList}}" wx:key="index" class='emoji' bindtap="emojiInput" data-emoji="{{item}}">{{item}}</text>
- </scroll-view>
- </view>
- <view hidden="{{isMore}}">
- <view class="more_containt" style="height: 100px;bottom: {{safeHeight}}rpx;">
- <view class="more" bindtap="choicePhote">
- <view class="back">
- <image class="photoPic" src="/static/icon/icon_photo.png" />
- </view>
- <text class="back-font">照片</text>
- </view>
- <view class="more" bindtap="choiceCarema">
- <view class="back">
- <image class="photoPic" src="/static/icon/icon_camera.png" />
- </view>
- <text class="back-font">拍摄</text>
- </view>
- </view>
- </view>
- </view>
|