群聊设置页面新增权限控制
This commit is contained in:
parent
5c6f254114
commit
03c30c2945
@ -9,7 +9,13 @@
|
||||
{{ props?.item?.value }}
|
||||
</span>
|
||||
<img
|
||||
v-if="props?.item?.hasPointer"
|
||||
v-if="
|
||||
props?.item?.hasPointer &&
|
||||
((props?.isManager &&
|
||||
props?.item?.label === $t('chat.settings.groupName')) ||
|
||||
(!props?.isManager &&
|
||||
props?.item?.label !== $t('chat.settings.groupName')))
|
||||
"
|
||||
src="/src/static/image/chatSettings/pointer.png"
|
||||
/>
|
||||
<tm-switch
|
||||
@ -48,6 +54,10 @@ const props = defineProps({
|
||||
return {}
|
||||
},
|
||||
},
|
||||
isManager: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
const emits = defineEmits(['toManagePage', 'changeSwitch'])
|
||||
const toManagePage = (item) => {
|
||||
|
@ -43,7 +43,11 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="base-info-edit" @click="toEditGroupInfoPage">
|
||||
<div
|
||||
class="base-info-edit"
|
||||
@click="toEditGroupInfoPage"
|
||||
v-if="groupParams?.groupInfo?.is_manager"
|
||||
>
|
||||
<img src="/src/static/image/chatSettings/edit-btn.png" />
|
||||
</div>
|
||||
</div>
|
||||
@ -72,6 +76,7 @@
|
||||
<settingFormItem
|
||||
:item="item"
|
||||
@toManagePage="toManagePage"
|
||||
:isManager="groupParams?.groupInfo?.is_manager"
|
||||
></settingFormItem>
|
||||
</div>
|
||||
</div>
|
||||
@ -103,7 +108,10 @@
|
||||
></settingFormItem>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-group-infos chat-settings-card">
|
||||
<div
|
||||
class="chat-group-infos chat-settings-card"
|
||||
v-if="groupParams?.groupInfo?.is_manager"
|
||||
>
|
||||
<div
|
||||
class="chat-group-infos-each"
|
||||
v-for="(item, index) in state.chatManagement"
|
||||
@ -121,12 +129,18 @@
|
||||
{{ $t('chat.settings.clearChatRecord') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="clear-chat-record-btn-each">
|
||||
<div
|
||||
class="clear-chat-record-btn-each"
|
||||
v-if="groupParams?.groupInfo?.is_manager"
|
||||
>
|
||||
<span class="text-[32rpx] font-regular">
|
||||
{{ $t('group.disband.btn') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="clear-chat-record-btn-each">
|
||||
<div
|
||||
class="clear-chat-record-btn-each"
|
||||
v-if="groupParams?.groupInfo?.is_manager"
|
||||
>
|
||||
<span class="text-[32rpx] font-regular">
|
||||
{{ $t('group.quit.btn') }}
|
||||
</span>
|
||||
@ -376,6 +390,9 @@ const toEditGroupInfoPage = () => {
|
||||
|
||||
//点击跳转到修改头像页面
|
||||
const toEditAvatarPage = () => {
|
||||
if (!groupParams?.groupInfo?.is_manager) {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/chatSettings/groupManage/editAvatar?groupAvatar=' +
|
||||
@ -388,6 +405,9 @@ const toManagePage = (label) => {
|
||||
console.log(label)
|
||||
if (label) {
|
||||
if (label === t('chat.settings.groupName')) {
|
||||
if (!groupParams?.groupInfo?.is_manager) {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/chatSettings/groupManage/editGroupName?groupAvatar=' +
|
||||
|
Loading…
Reference in New Issue
Block a user