Merge branch 'master' of https://git.yuzhankeji.cn/TmOct5/ZhHealth
This commit is contained in:
@@ -267,6 +267,20 @@ const transferGroupOwner = (groupId, userId) => {
|
||||
})
|
||||
}
|
||||
|
||||
// //群成员待审核表 -- 废弃
|
||||
// const getGroupMakeSure = (groupId) => {
|
||||
// return request({
|
||||
// url:`im/groups/${groupId}/makesure`
|
||||
// })
|
||||
// }
|
||||
// // 群成员审核通过
|
||||
// const getGroupMakeSureAllow = (groupId, userId) => {
|
||||
// return request({
|
||||
// method: 'POST',
|
||||
// url: 'im/groups/' + groupId + '/owner/' + userId
|
||||
// })
|
||||
// }
|
||||
|
||||
export {
|
||||
getImToken,
|
||||
deleteFriend,
|
||||
@@ -297,5 +311,6 @@ export {
|
||||
removeGroupUser,
|
||||
setGroupAdmin,
|
||||
removeGroupAdmin,
|
||||
transferGroupOwner
|
||||
// transferGroupOwner, // -废弃待审核列表
|
||||
// getGroupMakeSure // -废弃待审核列表
|
||||
}
|
||||
|
||||
@@ -486,7 +486,14 @@
|
||||
"path": "pages/im/group/invite",
|
||||
"name": "imGroupInvite",
|
||||
"style": {
|
||||
"navigationBarTitleText": "邀请好友"
|
||||
"navigationBarTitleText": "选择联系人"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/im/group/reviewed",
|
||||
"name": "imGroupReviewed",
|
||||
"style": {
|
||||
"navigationBarTitleText": "群聊邀请确认"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11,16 +11,14 @@
|
||||
<!-- 搜索 、 -->
|
||||
<u-sticky>
|
||||
<view class="header-search">
|
||||
<u-search placeholder="输入用户账号、手机号" height="74" searchIcon="search" @custom="search"
|
||||
v-model="searchValue" @search="search" bgColor="#f9f9f9" :focus="focused" />
|
||||
<u-search placeholder="输入用户账号、手机号" height="74" searchIcon="search" @custom="search" v-model="searchValue" @search="search" bgColor="#f9f9f9" :focus="focused" />
|
||||
</view>
|
||||
</u-sticky>
|
||||
<block v-if="searchResult.length > 0">
|
||||
<applyFriend :lists="searchResult" :isApply="true" @action="action" />
|
||||
</block>
|
||||
<view class="no-lists" v-else>
|
||||
<u-image class="cover" radius="4" width="400rpx" height="400rpx"
|
||||
:src="require('@/static/imgs/no-search.png')" :lazy-load="true" />
|
||||
<u-image class="cover" radius="4" width="400rpx" height="400rpx" :src="require('@/static/imgs/no-search.png')" :lazy-load="true" />
|
||||
<span>暂无匹配内容~</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="create">
|
||||
<u--textarea v-model="content" count height="200" maxlength="200" placeholder="请输入公告内容"></u--textarea>
|
||||
|
||||
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98"></u-button>
|
||||
<view class="create-title">公告内容</view>
|
||||
<u--textarea v-model="content" count height="240" maxlength="240" placeholder="请输入公告内容" />
|
||||
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -52,7 +52,23 @@
|
||||
<style lang="scss" scoped>
|
||||
.create {
|
||||
padding: $padding;
|
||||
.create-title{
|
||||
font-size: $title-size + 4;
|
||||
padding: $padding - 10 0 $padding - 10 $padding - 10 ;
|
||||
color: $text-color;
|
||||
font-weight: 800;
|
||||
position: relative;
|
||||
|
||||
&::before{
|
||||
content:"";
|
||||
position: absolute;
|
||||
width: 10rpx;
|
||||
height: 34rpx;
|
||||
background-color: $main-color;
|
||||
left: 0;
|
||||
top: 26rpx;
|
||||
}
|
||||
}
|
||||
.u-button {
|
||||
margin-top: $padding;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="announce">
|
||||
<u-skeleton rows="2" :loading="loading" avatar :rows="5">
|
||||
<u-skeleton rows="2" :loading="loading" avatar :rows="5" v-if="announcements.length>0">
|
||||
<view v-for="(item,index) in announcements" :key="index" class="item" >
|
||||
<view class="header">
|
||||
<u-avatar :src="item.user.portraitUrl"></u-avatar>
|
||||
<u-avatar :src="item.user.portraitUrl" />
|
||||
<view class="user">
|
||||
<view class="name">{{ item.user.name }}</view>
|
||||
<view class="time">{{ item.created_at }}</view>
|
||||
@@ -13,6 +13,10 @@
|
||||
<view class="content">{{ item.content }}</view>
|
||||
</view>
|
||||
</u-skeleton>
|
||||
<view class="no-lists" v-else>
|
||||
<u-image class="cover" radius="4" width="400rpx" height="400rpx" :src="require('@/static/imgs/no-level-list.png')" :lazy-load="true" />
|
||||
<span>暂无公告内容~</span>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -85,7 +89,20 @@
|
||||
<style lang="scss" scoped>
|
||||
.announce {
|
||||
padding: 0 $padding $padding $padding;
|
||||
.no-lists {
|
||||
padding-top: $padding * 5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray-m;
|
||||
|
||||
span {
|
||||
padding-top: $padding;
|
||||
}
|
||||
}
|
||||
.item {
|
||||
border-bottom: solid 1rpx #f9f9f9 !important;
|
||||
padding-top: $padding;
|
||||
@@ -117,8 +134,10 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: $padding;
|
||||
font-size: 34rpx;
|
||||
padding: 20rpx $padding;
|
||||
font-size: $title-size;
|
||||
color: $text-gray;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
<template>
|
||||
<view class="apply" v-if="loaded">
|
||||
<u-avatar :src="group.cover || require('@/static/user/cover.png')" size="128" shape="square" />
|
||||
<view class="name">
|
||||
{{ group.name }}
|
||||
</view>
|
||||
|
||||
<u-button class="apply-btn" v-if="group.can_join" @click="applyGroup" text="申请加群" :disabled="disabled"
|
||||
color="#34CE98" />
|
||||
<view class="name"> {{ group.name }} </view>
|
||||
<u-button class="apply-btn" v-if="group.can_join" @click="modalShow = true" text="申请加群" :disabled="disabled" color="#34CE98" />
|
||||
<view class="" v-else>
|
||||
<view class="" v-if="group.is_full">群已满员</view>
|
||||
<view class="" v-if="group.deny_apply">禁止申请</view>
|
||||
<u-button class="apply-btn2" 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>
|
||||
|
||||
<u-modal negativeTop="300" :show="modalShow" title="申请原因" showCancelButton @cancel="onHideModal"
|
||||
@confirm="onJoinGroup">
|
||||
<view class="slot-content">
|
||||
<u--input placeholder="申请原因" border="surround" focus v-model="message" />
|
||||
</view>
|
||||
<u-modal negativeTop="300" :show="modalShow" title="申请原因" showCancelButton @cancel="onHideModal" @confirm="onJoinGroup">
|
||||
<view class="slot-content"> <u--input placeholder="申请原因" border="surround" focus v-model="message" /> </view>
|
||||
</u-modal>
|
||||
</view>
|
||||
</template>
|
||||
@@ -41,10 +33,9 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e, 'e。。。。。。')
|
||||
this.targetId = e.targetId
|
||||
// this.targetId = "TG2"
|
||||
joinGroupPre(this.targetId).then(res => {
|
||||
console.log(res, 'res.返回群的基本信息')
|
||||
this.group = res
|
||||
this.loaded = true
|
||||
}).catch(err => {
|
||||
@@ -62,9 +53,6 @@
|
||||
url: '/pages/im/group/chat?targetId=' + this.targetId
|
||||
})
|
||||
},
|
||||
applyGroup() {
|
||||
this.modalShow = true
|
||||
},
|
||||
onHideModal() {
|
||||
this.message = ''
|
||||
this.modalShow = false
|
||||
@@ -118,6 +106,7 @@
|
||||
width: 80%;
|
||||
font-size: $title-size;
|
||||
}
|
||||
|
||||
.apply-btn2 {
|
||||
padding: 0 100rpx;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<u-cell-group class="cells" :border="false" >
|
||||
<u-cell :border="false" class="u-border-bottom" isLink title="群公告" :label="announcement" @click="toAnnouncement" />
|
||||
<u-cell :border="false" class="u-border-bottom" isLink title="二维码" @click="showGroupQrCode" />
|
||||
<u-cell :border="false" class="u-border-bottom" v-if="group.can_makesure" isLink title="群聊邀请确认" @click="showGroupsSure" />
|
||||
<u-cell :border="false" class="u-border-bottom" title="聊天置顶">
|
||||
<u-switch slot="value" size="20" v-model="isTop" activeColor="#34CE98" @change="setTop" />
|
||||
</u-cell>
|
||||
@@ -105,6 +106,7 @@
|
||||
methods: {
|
||||
initData() {
|
||||
getGroupInfo(this.targetId).then(res => {
|
||||
console.log(res,'群信息。。。。。')
|
||||
this.group = res.group
|
||||
this.groupName = res.group.name
|
||||
this.announcement = res.announcement
|
||||
@@ -150,6 +152,12 @@
|
||||
showGroupQrCode() {
|
||||
this.qrCodeShow = true
|
||||
},
|
||||
// 群聊邀请待确认
|
||||
showGroupsSure(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/im/group/reviewed?id="+this.targetId
|
||||
})
|
||||
},
|
||||
onGroupName() {
|
||||
this.modalShow = true
|
||||
},
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <u-index-list :index-list="indexs" inactiveColor="#666" activeColor="#34CE98">
|
||||
<view class="search">
|
||||
<u--input class="search-input" placeholder="搜索" border="none" prefixIcon="search" v-model="searchTxt"
|
||||
disabledColor="#Fff" prefixIconStyle="font-size: 22px;color: #909399" />
|
||||
</view>
|
||||
<block v-if="friends.length > 0">
|
||||
<u-checkbox-group v-model="checkboxValue" placement="column" @change="checkboxChange">
|
||||
<u-index-item v-for="(item, fkey) in friends" :key="fkey">
|
||||
<u-index-anchor :text="indexs[fkey]" bgColor="#ededed" height="20" size="12" color="#666"
|
||||
style="padding:10rpx 30rpx" />
|
||||
<view v-for="(friendItem, index) in item" :key="index" class="friend-flex"
|
||||
@click="selectFriend(friendItem.targetId)">
|
||||
<u-checkbox :customStyle="{marginBottom: '8px'}" :name="friendItem.targetId" />
|
||||
<u-avatar class="avatar-img" size="40" shape="square" :src="contact(friendItem.targetId).portraitUrl" />
|
||||
<view class="info">
|
||||
<view class="name">{{ contact(friendItem.targetId).name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-index-item>
|
||||
</u-checkbox-group>
|
||||
</block>
|
||||
<view class="no-lists" v-else>
|
||||
<u-image class="cover" radius="4" width="400rpx" height="400rpx"
|
||||
:src="searchTxt=== '' ? require('@/static/imgs/no-friend.png') :require('@/static/imgs/no-search.png')"
|
||||
:lazy-load="true" />
|
||||
<span>{{searchTxt=== ''?'暂无好友列表~':'暂无搜索内容~'}}</span>
|
||||
</view> -->
|
||||
<button type="default" @click="onInvite">确定</button>
|
||||
<u-index-list :index-list="indexs" inactiveColor="#666" activeColor="#34CE98">
|
||||
<u-checkbox-group v-if="friends.length > 0" v-model="checkboxValue" placement="column">
|
||||
@@ -26,12 +53,18 @@
|
||||
import {
|
||||
getFriendsLetter,
|
||||
inviteGroupUser
|
||||
|
||||
} from '@/apis/interfaces/im';
|
||||
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// indexs: [],
|
||||
// friends: [],
|
||||
// pendingCount: 0,
|
||||
// searchTxt: '',
|
||||
// checkboxValue: [],
|
||||
targetId: '',
|
||||
indexs: [],
|
||||
friends: [],
|
||||
@@ -45,6 +78,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
// onLoad() {
|
||||
// this.getFriendList()
|
||||
// this.checkNewFriendPending()
|
||||
// uni.$on('onContactNotification', this.checkNewFriendPending)
|
||||
// },
|
||||
// methods: {
|
||||
// // group事件
|
||||
// checkboxChange(n) {
|
||||
// console.log('change', n);
|
||||
// },
|
||||
// getFriendList() {
|
||||
// getFriendsLetter().then(res => {
|
||||
// console.log(res)
|
||||
onLoad(e) {
|
||||
this.targetId = e.targetId
|
||||
this.getFriendList()
|
||||
@@ -56,6 +102,22 @@
|
||||
this.friends = res.itemArr
|
||||
})
|
||||
},
|
||||
|
||||
// selectFriend(targetId) {
|
||||
// console.log(targetId,typeof targetId)
|
||||
// let arr = this.checkboxValue
|
||||
// let index = arr.findIndex(item => item === targetId)
|
||||
// if(index>0){
|
||||
// console.log('选择了再次点击清除数据le')
|
||||
|
||||
// }else{
|
||||
// console.log('没有选择过,添加数据')
|
||||
|
||||
// }
|
||||
|
||||
// console.log(this.checkboxValue,index)
|
||||
// console.log('奥克兰打开',targetId)
|
||||
// },
|
||||
addContact(targetId) {
|
||||
if (!this.checkboxValue.find(item => item == targetId)) {
|
||||
this.checkboxValue.push(targetId)
|
||||
@@ -74,8 +136,9 @@
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -134,4 +197,31 @@
|
||||
line-height: 24px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.search {
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
|
||||
.search-input {
|
||||
padding: 10rpx $padding;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.searchTxt {}
|
||||
}
|
||||
|
||||
.no-lists {
|
||||
padding-top: $padding * 3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray-m;
|
||||
|
||||
span {
|
||||
padding-top: $padding;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
78
pages/im/group/reviewed.vue
Normal file
78
pages/im/group/reviewed.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<!-- 群聊邀请确认列表页面 -->
|
||||
<template>
|
||||
<view class="reviewed">
|
||||
<view class="reviewed-item">
|
||||
<u-avatar class="avatar" src="require('@/static/user/cover.png')" shape="square" size="36" />
|
||||
<view style="flex:1;">
|
||||
<view class="nickname"><span>{{`艾米的猫儿 `}}</span>想邀请<span>{{` 艾米的猫儿洛基艾米`}}</span>加入群聊</view>
|
||||
<view> 申请原因:{{`呵呵哒。。`}}</view>
|
||||
</view>
|
||||
<view class="sure" @click="sure(2)"> 去确认 </view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getGroupMakeSure,
|
||||
getGroupMakeSureAllow
|
||||
} from "@/apis/interfaces/im.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
sure(id) {
|
||||
console.log(id, '....')
|
||||
uni.navigateTo({
|
||||
url: "/pages/im/group/reviewedInfo?id=" + id
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.reviewed {
|
||||
.reviewed-item {
|
||||
margin: $padding - 10;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
border-bottom: solid 1rpx #f9f9f9;
|
||||
font-size: $title-size-m - 2;
|
||||
padding-bottom: 20rpx;
|
||||
color: $text-gray-m;
|
||||
|
||||
.avatar {
|
||||
background-color: $main-color;
|
||||
border-radius: 6rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
font-size: $title-size-m;
|
||||
|
||||
span {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
|
||||
.sure {
|
||||
background-color: $main-color;
|
||||
color: #Fff;
|
||||
text-align: center;
|
||||
font-size: $title-size-m;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
62
pages/im/group/reviewedInfo.vue
Normal file
62
pages/im/group/reviewedInfo.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<!-- 群聊邀请确认列表页面 -->
|
||||
<template>
|
||||
<view class="reviewed">
|
||||
确认信息页面
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
};
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
sure(id) {
|
||||
uni.navigateTo({
|
||||
url:"/pages/im/group/reviewedInfo?id="+id
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.reviewed {
|
||||
.reviewed-item {
|
||||
margin: $padding;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
border-bottom: solid 1rpx #f9f9f9;
|
||||
font-size: $title-size-m;
|
||||
padding-bottom: 20rpx;
|
||||
color: $text-gray;
|
||||
|
||||
.add-icon {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx;
|
||||
border-radius: 6rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.sure {
|
||||
// width: 140rpx;
|
||||
// background-color: $main-color;
|
||||
color: $main-color;
|
||||
text-align: center;
|
||||
font-size: $title-size-m;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
BIN
static/imgs/no-level-list.png
Normal file
BIN
static/imgs/no-level-list.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Reference in New Issue
Block a user