im聊天模块,群申请样式调整;长按删除置顶调整;聊天页面背景色处理;

This commit is contained in:
2022-02-16 15:28:04 +08:00
parent 5dc863b017
commit 3790ec8901
5 changed files with 60 additions and 16 deletions

View File

@@ -634,7 +634,7 @@
} }
], ],
"tabBar": { "tabBar": {
"borderStyle": "white", "borderStyle": "black",
"selectedColor": "#34CE98", "selectedColor": "#34CE98",
"list": [{ "list": [{
"iconPath": "static/tabBar/tabBar_00.png", "iconPath": "static/tabBar/tabBar_00.png",

View File

@@ -46,6 +46,16 @@
} }
}, },
created() {
uni.getSystemInfo({
success: (e) => {
this.winSize = {
width: e.windowWidth,
height: e.windowHeight
}
}
})
},
methods: { methods: {
// 隐藏功能菜单 // 隐藏功能菜单
hidePop() { hidePop() {
@@ -79,12 +89,15 @@
} else { } else {
style = `top:${touches.clientY}px;` 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 { } else {
style += `left:${touches.clientX}px` style += `left:${touches.clientX}px`
} }
this.popButton[0] = item.isTop ? '取消置顶' : '置顶聊天' this.popButton[0] = item.isTop ? '取消置顶' : '置顶聊天'
this.popStyle = style this.popStyle = style
this.pickedItem = item this.pickedItem = item

View File

@@ -54,7 +54,7 @@
.preview { .preview {
word-break: break-all; word-break: break-all;
color: $text-gray-m; color: $text-gray-m;
padding-top: $padding - 20; padding-top: $padding - 22;
padding-bottom: $padding; padding-bottom: $padding;
font-size: $title-size-m; font-size: $title-size-m;
height: 32rpx; height: 32rpx;

View File

@@ -5,11 +5,13 @@
{{ group.name }} {{ group.name }}
</view> </view>
<u-button v-if="group.can_join" @click="applyGroup" text="申请加群" :disabled="disabled" color="#34CE98" /> <u-button class="apply-btn" v-if="group.can_join" @click="applyGroup" text="申请加群" :disabled="disabled"
color="#34CE98" />
<view class="" v-else> <view class="" v-else>
<view class="" v-if="group.is_full">群已满员</view> <view class="" v-if="group.is_full">群已满员</view>
<view class="" v-if="group.deny_apply">禁止申请</view> <view class="" v-if="group.deny_apply">禁止申请</view>
<u-button v-if="group.state === 'accepted'" color="#34CE98" text="进入群聊" @click="toGroupChat" /> <u-button class="apply-btn2" v-if="group.state === 'accepted'" color="#34CE98" text="进入群聊"
@click="toGroupChat" />
</view> </view>
<u-modal negativeTop="300" :show="modalShow" title="申请原因" showCancelButton @cancel="onHideModal" <u-modal negativeTop="300" :show="modalShow" title="申请原因" showCancelButton @cancel="onHideModal"
@@ -39,12 +41,19 @@
} }
}, },
onLoad(e) { onLoad(e) {
// this.targetId = e.targetId || TG2 console.log(e, 'e。。。。。。')
this.targetId = "TG2" this.targetId = e.targetId
// this.targetId = "TG2"
joinGroupPre(this.targetId).then(res => { joinGroupPre(this.targetId).then(res => {
console.log(res);
this.group = res this.group = res
this.loaded = true this.loaded = true
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
mask: true,
duration: 3000
})
}) })
}, },
methods: { methods: {
@@ -65,8 +74,13 @@
console.log('申请结果', res); console.log('申请结果', res);
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '申请成功' title: '申请成功',
duration:2000,
mast:true
}) })
setTimeout(() => {
this.$Router.back()
}, 2000)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@@ -85,10 +99,27 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 100%;
min-height: 100vh;
background-color: $window-color;
.u-avatar { .u-avatar {
width: 200rpx; margin-top: 60rpx;
height: 200rpx; 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;
} }
} }
</style> </style>

View File

@@ -130,9 +130,9 @@
<style lang="scss" scoped> <style lang="scss" scoped>
// contents // contents
.contents { .contents {
background-color: $window-color; background-color: #fff;
min-height: 100vh; min-height: 100vh;
padding-top: 90rpx + 20rpx; padding-top: 90rpx + 6rpx;
box-sizing: border-box; box-sizing: border-box;
.custom-header { .custom-header {