diff --git a/pages/mine/im/index.vue b/pages/mine/im/index.vue index ed33d14..5659748 100644 --- a/pages/mine/im/index.vue +++ b/pages/mine/im/index.vue @@ -108,7 +108,7 @@ X - + 发送商品 @@ -135,9 +135,9 @@ - - + 发送 @@ -193,13 +193,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(); }) @@ -281,7 +281,7 @@ export default { }); }, //发送商品 - gotoCards () { + sendGoodsMessage () { let msg = { operation_type: "MESSAGE", to: this.toUser.userId, @@ -308,16 +308,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', @@ -355,10 +355,10 @@ export default { if (moveY - mgUpHeight < 0) { // 小于0则视为0 if (moveY < 0) { - this.msgMove(0, 200) + this.messageBoxMove(0, 200) } else { // 否则缩回盒子对应的高度 - this.msgMove(moveY, 200) + this.messageBoxMove(moveY, 200) } } uni.pageScrollTo({ @@ -374,7 +374,7 @@ export default { // 这里应该传入问题的id,模拟就用index代替了 }, - sendMsg () { + sendMessage () { // 消息为空不做任何操作 if (this.msg == "") { return 0; @@ -413,9 +413,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 }, @@ -423,7 +423,7 @@ export default { uni.hideKeyboard() }, // 拉起/收回附加栏 - upTowmn (x, t) { + retractBox (x, t) { var animation = uni.createAnimation({ duration: t, @@ -456,7 +456,7 @@ export default { }) this.msgGo(type) }, - touchmovemsg (e) { + touchMoreMessage (e) { if (e.target.scrollTop == 0) { this.params.pageNumber = this.params.pageNumber + 1 this.getTalkMessage() diff --git a/pages/mine/im/list.vue b/pages/mine/im/list.vue index 6faa4de..85def11 100644 --- a/pages/mine/im/list.vue +++ b/pages/mine/im/list.vue @@ -5,7 +5,6 @@ -
@@ -22,7 +21,7 @@
- @@ -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() { - - // }, }, };