diff --git a/pages/im/components/sentText.nvue b/pages/im/components/sentText.nvue index 916ffc2..4bea6a9 100644 --- a/pages/im/components/sentText.nvue +++ b/pages/im/components/sentText.nvue @@ -1,6 +1,6 @@ @@ -51,7 +51,13 @@ this.inputTxt = '' }) } - } + }, + focus() { + this.$emit('focus') + }, + blur() { + this.$emit('blur') + } } } diff --git a/pages/im/index.vue b/pages/im/index.vue index a25ab95..6b45f7a 100644 --- a/pages/im/index.vue +++ b/pages/im/index.vue @@ -8,13 +8,13 @@ 私聊 群聊 - + + + + - - - @@ -29,16 +29,16 @@ - + - + @click="toDetail(item)" @longpress="onLongPress" :data-item="item"> + + shape="square" size="44" /> - + {{ friend(item.targetId).name || '未知用户' }} {{ item.sentTime|timeCustomCN }} @@ -47,9 +47,9 @@ - + - + {{item}} @@ -209,8 +209,11 @@ url: '/pages/im/private/chat?targetId=' + item.targetId + '&conversationType=' + item .conversationType }) - - // url: '/pages/im/private/index?targetId=' + item.targetId + '&conversationType=' + item.conversationType + }, + toFriend(targetId) { + uni.navigateTo({ + url: '/pages/im/friends/info?targetId=' + targetId + }) }, // 点击按钮 onNav(name, params) { @@ -318,7 +321,7 @@ .message { background: white; - padding: 30rpx 0 0 30rpx; + padding: 20rpx 0 0 20rpx; position: relative; display: flex; @@ -326,7 +329,6 @@ &.is-top { background: $window-color; border-bottom: #e8e8e8; - // background-color: rgba($color: $main-color, $alpha: 0.02); } .avatar { @@ -341,7 +343,6 @@ margin-left: 30rpx; width: calc(100% - 46px); box-sizing: border-box; - border-bottom: solid 1rpx #f3f3f3; position: relative; .header { @@ -368,29 +369,20 @@ padding-top: $padding - 20; padding-bottom: $padding; font-size: $title-size-m; - height: 40rpx; - line-height: 40rpx; + height: 32rpx; + line-height: 32rpx; width: 500rpx; @extend .nowrap; } } } - - // .message:not(:last-child) { - // &::after { - // position: absolute; - // left: calc(44px + #{$padding} + 30rpx); - // right: 0; - // bottom: 0; - // content: " "; - // height: 1rpx; - // background: $border-color; - // } - // } } /* 遮罩 */ - .shade { + .shade { + position: fixed; + width: 100%; + height: 100%; .pop { position: fixed; diff --git a/pages/im/private/chat.nvue b/pages/im/private/chat.nvue index 59a20cd..f91fb03 100644 --- a/pages/im/private/chat.nvue +++ b/pages/im/private/chat.nvue @@ -36,7 +36,7 @@ @success="getMessageList" /> - + @@ -73,7 +73,8 @@ portraitUrl: '' }, chatType: 1, // 0 语音,1 文本 - showPopups: false + showPopups: false, + inputFocus: false // 输入框是否获得了焦点 } }, components: { @@ -197,11 +198,11 @@ } &.right { - flex-direction: row-reverse; - - .state { - flex-direction: row; - justify-content: flex-end; + flex-direction: row-reverse; + + .state { + flex-direction: row; + justify-content: flex-end; } }