This commit is contained in:
2023-11-15 11:55:27 +08:00
parent 54af0a0bd0
commit d0d18e1920
3 changed files with 40 additions and 7 deletions

View File

@ -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;

View File

@ -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}}

View File

@ -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);
//iddemo
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);
//iddemo
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 = {