master
2022-12-28 18:33:57 +08:00
commit cfb4310d6f
2 changed files with 22 additions and 29 deletions

View File

@ -108,7 +108,7 @@
</view> </view>
</view> </view>
<view class="cancel" @click="cancenModel">X</view> <view class="cancel" @click="cancenModel">X</view>
<view class="sendGood" @click="gotoCards"> <view class="sendGood" @click="sendGoodsMessage">
<view>发送商品</view> <view>发送商品</view>
</view> </view>
</view> </view>
@ -135,9 +135,9 @@
<view class="flex-column-center" style="position: fixed;bottom: -180px;" :animation="animationData"> <view class="flex-column-center" style="position: fixed;bottom: -180px;" :animation="animationData">
<view class="bottom-dh-char flex-row-around" style="font-size: 55rpx;"> <view class="bottom-dh-char flex-row-around" style="font-size: 55rpx;">
<!-- vue无法使用软键盘"发送" --> <!-- 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="用一句简短的话描述您的问题" /> 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> </view>
<!-- <text @click="ckAdd" class="cuIcon-roundaddfill text-brown"></text> --> <!-- <text @click="ckAdd" class="cuIcon-roundaddfill text-brown"></text> -->
@ -193,13 +193,13 @@ export default {
var up = res.height * 2 - data.height - l * 110 var up = res.height * 2 - data.height - l * 110
if (up > 0) { if (up > 0) {
// //
this.msgMove(up, 300) this.messageBoxMove(up, 300)
// , // ,
mgUpHeight = up mgUpHeight = up
} }
// //
if (res.height == 0) { if (res.height == 0) {
this.msgMove(0, 0) this.messageBoxMove(0, 0)
} }
}).exec(); }).exec();
}) })
@ -281,7 +281,7 @@ export default {
}); });
}, },
// //
gotoCards () { sendGoodsMessage () {
let msg = { let msg = {
operation_type: "MESSAGE", operation_type: "MESSAGE",
to: this.toUser.userId, to: this.toUser.userId,
@ -308,16 +308,16 @@ export default {
beautifyTime, beautifyTime,
// (-->bug) // (-->bug)
goPag (kh) { goPag (kh) {
this.upTowmn(0, 250) this.retractBox(0, 250)
if (this.keyHeight != 0) { if (this.keyHeight != 0) {
if (kh - 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({ var animation = uni.createAnimation({
duration: t, duration: t,
timingFunction: 'linear', timingFunction: 'linear',
@ -355,10 +355,10 @@ export default {
if (moveY - mgUpHeight < 0) { if (moveY - mgUpHeight < 0) {
// 00 // 00
if (moveY < 0) { if (moveY < 0) {
this.msgMove(0, 200) this.messageBoxMove(0, 200)
} else { } else {
// //
this.msgMove(moveY, 200) this.messageBoxMove(moveY, 200)
} }
} }
uni.pageScrollTo({ uni.pageScrollTo({
@ -374,7 +374,7 @@ export default {
// id,index // id,index
}, },
sendMsg () { sendMessage () {
// //
if (this.msg == "") { if (this.msg == "") {
return 0; return 0;
@ -413,9 +413,9 @@ export default {
// //
ckAdd () { ckAdd () {
if (!this.showTow) { if (!this.showTow) {
this.upTowmn(-180, 350) this.retractBox(-180, 350)
} else { } else {
this.upTowmn(0, 200) this.retractBox(0, 200)
} }
this.showTow = !this.showTow this.showTow = !this.showTow
}, },
@ -423,7 +423,7 @@ export default {
uni.hideKeyboard() uni.hideKeyboard()
}, },
// / // /
upTowmn (x, t) { retractBox (x, t) {
var animation = uni.createAnimation({ var animation = uni.createAnimation({
duration: t, duration: t,
@ -456,7 +456,7 @@ export default {
}) })
this.msgGo(type) this.msgGo(type)
}, },
touchmovemsg (e) { touchMoreMessage (e) {
if (e.target.scrollTop == 0) { if (e.target.scrollTop == 0) {
this.params.pageNumber = this.params.pageNumber + 1 this.params.pageNumber = this.params.pageNumber + 1
this.getTalkMessage() this.getTalkMessage()

View File

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