修改
This commit is contained in:
parent
54af0a0bd0
commit
d0d18e1920
@ -57,7 +57,8 @@
|
|||||||
{{item.sendTime}}
|
{{item.sendTime}}
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<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>
|
||||||
<view class="nostatus" v-if="item.unreadCount>0">
|
<view class="nostatus" v-if="item.unreadCount>0">
|
||||||
{{item.unreadCount}}
|
{{item.unreadCount}}
|
||||||
@ -163,8 +164,8 @@
|
|||||||
border-bottom: 2rpx solid #E6E6E6;
|
border-bottom: 2rpx solid #E6E6E6;
|
||||||
|
|
||||||
.nostatus {
|
.nostatus {
|
||||||
width: 30rpx;
|
width: 20rpx;
|
||||||
height: 30rpx;
|
height: 20rpx;
|
||||||
background: #F10100;
|
background: #F10100;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@ -23,7 +23,8 @@
|
|||||||
{{item.problemDescription?item.problemDescription:''}} )
|
{{item.problemDescription?item.problemDescription:''}} )
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<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>
|
||||||
<view class="messageCount" v-if="item.messageCount>0">
|
<view class="messageCount" v-if="item.messageCount>0">
|
||||||
{{item.messageCount}}
|
{{item.messageCount}}
|
||||||
|
|||||||
@ -46,7 +46,8 @@
|
|||||||
<view class="input-box-flex-grow"> <input type="text" class="contenxxt" id="input"
|
<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"
|
v-model="formData.content" :hold-keyboard="true" :confirm-type="'send'" :confirm-hold="true"
|
||||||
placeholder-style="color:#DDDDDD;" :cursor-spacing="10" @confirm='sendconfirm'
|
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> -->
|
<!-- <image class=" icon_btn_add" :src="require('@/static/ico/emoji.png')" @tap="exprec"></image> -->
|
||||||
<!-- 发送消息按钮 -->
|
<!-- 发送消息按钮 -->
|
||||||
@ -192,6 +193,36 @@
|
|||||||
complete: function(res) {},
|
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) {
|
keyboardheightchange(event) {
|
||||||
const {
|
const {
|
||||||
height,
|
height,
|
||||||
@ -205,9 +236,9 @@
|
|||||||
this.inputboxtop = data.height //赋值,待会要用
|
this.inputboxtop = data.height //赋值,待会要用
|
||||||
setTimeout(e => {
|
setTimeout(e => {
|
||||||
this.scrollTop = this.scrollTop + 1;
|
this.scrollTop = this.scrollTop + 1;
|
||||||
}, 300)
|
}, 500)
|
||||||
}).exec();
|
}).exec();
|
||||||
}, 200)
|
}, 500)
|
||||||
},
|
},
|
||||||
getPageHistory() {
|
getPageHistory() {
|
||||||
let obj = {
|
let obj = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user