From 3790ec89012c408c48e664b2200cb5dd6f43207d Mon Sep 17 00:00:00 2001 From: zhangdongxue Date: Wed, 16 Feb 2022 15:28:04 +0800 Subject: [PATCH] =?UTF-8?q?im=E8=81=8A=E5=A4=A9=E6=A8=A1=E5=9D=97=EF=BC=8C?= =?UTF-8?q?=E7=BE=A4=E7=94=B3=E8=AF=B7=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=9B=E9=95=BF=E6=8C=89=E5=88=A0=E9=99=A4=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9B=E8=81=8A=E5=A4=A9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=89=B2=E5=A4=84=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 2 +- pages/im/components/conversationList.vue | 17 +++++++- pages/im/components/messagePreview.nvue | 2 +- pages/im/group/apply.vue | 51 +++++++++++++++++++----- pages/im/index.vue | 4 +- 5 files changed, 60 insertions(+), 16 deletions(-) diff --git a/pages.json b/pages.json index 61a9c6a..d9a90cb 100644 --- a/pages.json +++ b/pages.json @@ -634,7 +634,7 @@ } ], "tabBar": { - "borderStyle": "white", + "borderStyle": "black", "selectedColor": "#34CE98", "list": [{ "iconPath": "static/tabBar/tabBar_00.png", diff --git a/pages/im/components/conversationList.vue b/pages/im/components/conversationList.vue index cf3eeca..2468e8a 100644 --- a/pages/im/components/conversationList.vue +++ b/pages/im/components/conversationList.vue @@ -46,6 +46,16 @@ } }, + created() { + uni.getSystemInfo({ + success: (e) => { + this.winSize = { + width: e.windowWidth, + height: e.windowHeight + } + } + }) + }, methods: { // 隐藏功能菜单 hidePop() { @@ -79,12 +89,15 @@ } else { style = `top:${touches.clientY}px;` } - if (touches.clientX > (this.winSize.witdh / 2)) { - style += `right:${this.winSize.witdh-touches.clientX}px` + + if (touches.clientX > (this.winSize.width / 2)) { + style += `right:${this.winSize.width-touches.clientX}px` } else { style += `left:${touches.clientX}px` } + + this.popButton[0] = item.isTop ? '取消置顶' : '置顶聊天' this.popStyle = style this.pickedItem = item diff --git a/pages/im/components/messagePreview.nvue b/pages/im/components/messagePreview.nvue index 8a0efab..91f38b1 100644 --- a/pages/im/components/messagePreview.nvue +++ b/pages/im/components/messagePreview.nvue @@ -54,7 +54,7 @@ .preview { word-break: break-all; color: $text-gray-m; - padding-top: $padding - 20; + padding-top: $padding - 22; padding-bottom: $padding; font-size: $title-size-m; height: 32rpx; diff --git a/pages/im/group/apply.vue b/pages/im/group/apply.vue index 81429c6..247545a 100644 --- a/pages/im/group/apply.vue +++ b/pages/im/group/apply.vue @@ -5,13 +5,15 @@ {{ group.name }} - + 群已满员 禁止申请 - + - + @@ -35,16 +37,23 @@ modalShow: false, message: '', disabled: false, - loaded:false + loaded: false } }, onLoad(e) { - // this.targetId = e.targetId || TG2 - this.targetId = "TG2" + console.log(e, 'e。。。。。。') + this.targetId = e.targetId + // this.targetId = "TG2" joinGroupPre(this.targetId).then(res => { - console.log(res); this.group = res this.loaded = true + }).catch(err => { + uni.showToast({ + title: err.message, + icon: 'none', + mask: true, + duration: 3000 + }) }) }, methods: { @@ -65,8 +74,13 @@ console.log('申请结果', res); uni.showToast({ icon: 'none', - title: '申请成功' + title: '申请成功', + duration:2000, + mast:true }) + setTimeout(() => { + this.$Router.back() + }, 2000) }).catch(err => { uni.showToast({ icon: 'none', @@ -85,10 +99,27 @@ display: flex; flex-direction: column; align-items: center; + width: 100%; + min-height: 100vh; + background-color: $window-color; .u-avatar { - width: 200rpx; - height: 200rpx; + margin-top: 60rpx; + width: 180rpx; + height: 180rpx; + } + + .name { + margin: 40rpx 0; + font-size: $title-size + 2; + } + + .apply-btn { + width: 80%; + font-size: $title-size; + } + .apply-btn2{ + padding: 0 100rpx; } } diff --git a/pages/im/index.vue b/pages/im/index.vue index 5cb1a75..bbd63ed 100644 --- a/pages/im/index.vue +++ b/pages/im/index.vue @@ -130,9 +130,9 @@