修改
This commit is contained in:
parent
54af0a0bd0
commit
d0d18e1920
@ -57,7 +57,8 @@
|
||||
{{item.sendTime}}
|
||||
</view>
|
||||
<view class="text">
|
||||
{{Number(item.messageType==1)?item.content?item.content:'':'[图片]'}}
|
||||
{{Number(item.messageType)==1?item.content?item.content:'':''}}
|
||||
{{Number(item.messageType)==2?'[图片]':''}}
|
||||
</view>
|
||||
<view class="nostatus" v-if="item.unreadCount>0">
|
||||
{{item.unreadCount}}
|
||||
@ -163,8 +164,8 @@
|
||||
border-bottom: 2rpx solid #E6E6E6;
|
||||
|
||||
.nostatus {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background: #F10100;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
|
||||
@ -23,7 +23,8 @@
|
||||
{{item.problemDescription?item.problemDescription:''}} )
|
||||
</view>
|
||||
<view class="text">
|
||||
{{Number(item.messageType==1)?item.content?item.content:'':'[图片]'}}
|
||||
{{Number(item.messageType)==1?item.content?item.content:'':''}}
|
||||
{{Number(item.messageType)==2?'[图片]':''}}
|
||||
</view>
|
||||
<view class="messageCount" v-if="item.messageCount>0">
|
||||
{{item.messageCount}}
|
||||
|
||||
@ -46,7 +46,8 @@
|
||||
<view class="input-box-flex-grow"> <input type="text" class="contenxxt" id="input"
|
||||
v-model="formData.content" :hold-keyboard="true" :confirm-type="'send'" :confirm-hold="true"
|
||||
placeholder-style="color:#DDDDDD;" :cursor-spacing="10" @confirm='sendconfirm'
|
||||
:adjust-position="false" @keyboardheightchange="keyboardheightchange" /> </view>
|
||||
:adjust-position="false" @keyboardheightchange="keyboardheightchange" @focus='focus'
|
||||
@blur='blur' /> </view>
|
||||
<!-- 选择表情包 -->
|
||||
<!-- <image class=" icon_btn_add" :src="require('@/static/ico/emoji.png')" @tap="exprec"></image> -->
|
||||
<!-- 发送消息按钮 -->
|
||||
@ -192,6 +193,36 @@
|
||||
complete: function(res) {},
|
||||
})
|
||||
},
|
||||
blur() {
|
||||
uni.onKeyboardHeightChange(res => {
|
||||
this.bottomVal = res.height
|
||||
setTimeout(() => {
|
||||
let query = uni.createSelectorQuery().in(this);
|
||||
//需要给黄色区域设置一个id标识,在这里是demo
|
||||
query.select('.input-box').boundingClientRect(data => {
|
||||
this.inputboxtop = data.height //赋值,待会要用
|
||||
setTimeout(e => {
|
||||
this.scrollTop = this.scrollTop + 1;
|
||||
}, 500)
|
||||
}).exec();
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
focus() {
|
||||
uni.onKeyboardHeightChange(res => {
|
||||
this.bottomVal = res.height
|
||||
setTimeout(() => {
|
||||
let query = uni.createSelectorQuery().in(this);
|
||||
//需要给黄色区域设置一个id标识,在这里是demo
|
||||
query.select('.input-box').boundingClientRect(data => {
|
||||
this.inputboxtop = data.height //赋值,待会要用
|
||||
setTimeout(e => {
|
||||
this.scrollTop = this.scrollTop + 1;
|
||||
}, 500)
|
||||
}).exec();
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
keyboardheightchange(event) {
|
||||
const {
|
||||
height,
|
||||
@ -205,9 +236,9 @@
|
||||
this.inputboxtop = data.height //赋值,待会要用
|
||||
setTimeout(e => {
|
||||
this.scrollTop = this.scrollTop + 1;
|
||||
}, 300)
|
||||
}, 500)
|
||||
}).exec();
|
||||
}, 200)
|
||||
}, 500)
|
||||
},
|
||||
getPageHistory() {
|
||||
let obj = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user