master
chc 2022-12-28 18:23:49 +08:00
parent 9cc6f519a9
commit c378ce7d71
2 changed files with 22 additions and 29 deletions

View File

@ -109,7 +109,7 @@
</view>
</view>
<view class="cancel" @click="cancenModel">X</view>
<view class="sendGood" @click="gotoCards">
<view class="sendGood" @click="sendGoodsMessage">
<view>发送商品</view>
</view>
</view>
@ -136,9 +136,9 @@
<view class="flex-column-center" style="position: fixed;bottom: -180px;" :animation="animationData">
<view class="bottom-dh-char flex-row-around" style="font-size: 55rpx;">
<!-- vue无法使用软键盘"发送" -->
<input v-model="msg" class="dh-input" type="text" style="background-color: #f0f0f0;" @confirm="sendMsg"
<input v-model="msg" class="dh-input" type="text" style="background-color: #f0f0f0;" @confirm="sendMessage"
confirm-type="search" placeholder-class="my-neirong-sm" placeholder="用一句简短的话描述您的问题" />
<view @click="sendMsg" class="cu-tag bg-cyan round">
<view @click="sendMessage" class="cu-tag bg-cyan round">
发送
</view>
<!-- <text @click="ckAdd" class="cuIcon-roundaddfill text-brown"></text> -->
@ -194,13 +194,13 @@ export default {
var up = res.height * 2 - data.height - l * 110
if (up > 0) {
//
this.msgMove(up, 300)
this.messageBoxMove(up, 300)
// ,
mgUpHeight = up
}
//
if (res.height == 0) {
this.msgMove(0, 0)
this.messageBoxMove(0, 0)
}
}).exec();
})
@ -282,7 +282,7 @@ export default {
});
},
//
gotoCards () {
sendGoodsMessage () {
let msg = {
operation_type: "MESSAGE",
to: this.toUser.userId,
@ -309,16 +309,16 @@ export default {
beautifyTime,
// (-->bug)
goPag (kh) {
this.upTowmn(0, 250)
this.retractBox(0, 250)
if (this.keyHeight != 0) {
if (kh - this.keyHeight > 0) {
this.upTowmn(this.keyHeight - kh, 250)
this.retractBox(this.keyHeight - kh, 250)
}
}
},
//
msgMove (x, t) {
messageBoxMove (x, t) {
var animation = uni.createAnimation({
duration: t,
timingFunction: 'linear',
@ -356,10 +356,10 @@ export default {
if (moveY - mgUpHeight < 0) {
// 00
if (moveY < 0) {
this.msgMove(0, 200)
this.messageBoxMove(0, 200)
} else {
//
this.msgMove(moveY, 200)
this.messageBoxMove(moveY, 200)
}
}
uni.pageScrollTo({
@ -375,7 +375,7 @@ export default {
// id,index
},
sendMsg () {
sendMessage () {
//
if (this.msg == "") {
return 0;
@ -414,9 +414,9 @@ export default {
//
ckAdd () {
if (!this.showTow) {
this.upTowmn(-180, 350)
this.retractBox(-180, 350)
} else {
this.upTowmn(0, 200)
this.retractBox(0, 200)
}
this.showTow = !this.showTow
},
@ -424,7 +424,7 @@ export default {
uni.hideKeyboard()
},
// /
upTowmn (x, t) {
retractBox (x, t) {
var animation = uni.createAnimation({
duration: t,
@ -457,7 +457,7 @@ export default {
})
this.msgGo(type)
},
touchmovemsg (e) {
touchMoreMessage (e) {
if (e.target.scrollTop == 0) {
this.params.pageNumber = this.params.pageNumber + 1
this.getTalkMessage()

View File

@ -5,7 +5,6 @@
<!-- 空白页 -->
<u-empty text="暂无信息" mode="list" v-if="talkList.length === 0"></u-empty>
<!-- 消息列表 -->
<!-- 我的订单代付款 -->
<div class="iconBox">
<view class="icon-list">
<view class="icon-item" @click="cleanUnread()">
@ -22,7 +21,7 @@
</view>
</view>
</div>
<u-search class="nav-search" v-model="userName" clearabled @change="getList()" placeholder="搜索用户"
<u-search class="nav-search" v-model="userName" clearabled @change="userTalkList()" placeholder="搜索用户"
:show-action="false"></u-search>
<view class="talk-view" :key="index" v-for="(item, index) in talkList">
<view>
@ -75,10 +74,10 @@ export default {
beautifyTime
},
onShow () {
this.getList();
this.userTalkList();
},
onPullDownRefresh () {
this.getList()
this.userTalkList()
console.log('下拉事件');
setTimeout(function () {
uni.stopPullDownRefresh();
@ -88,7 +87,7 @@ export default {
* 触底加载
*/
onReachBottom () {
this.getList();
this.userTalkList();
},
methods: {
beautifyTime,
@ -102,7 +101,7 @@ export default {
/**
* 获取聊天列表
*/
getList () {
userTalkList () {
let params = {
userName: this.userName,
}
@ -122,14 +121,8 @@ export default {
});
},
cleanUnread () {
alert(1)
},
search () {
},
// clear() {
// },
},
};
</script>