|
|
@@ -24,6 +24,7 @@
|
|
|
wordBreak="break-all"
|
|
|
fontConfig="primaryTitle"
|
|
|
/>
|
|
|
+ <IconButton icon="cascades" :size="40" @click="shareQRDialog?.show()" />
|
|
|
</FlexRow>
|
|
|
<FlexRow center gap="gap.lg">
|
|
|
<BubbleTip
|
|
|
@@ -314,6 +315,11 @@
|
|
|
:staffTimeType="staffInfo.staffTimeType"
|
|
|
ref="staffInfoRef"
|
|
|
/>
|
|
|
+ <ShareQRDialog
|
|
|
+ v-if="villageStore.currentVillage"
|
|
|
+ :villageId="villageStore.currentVillage.id"
|
|
|
+ ref="shareQRDialog"
|
|
|
+ />
|
|
|
<Popup
|
|
|
:show="showUnLight"
|
|
|
:zIndex="100"
|
|
|
@@ -358,7 +364,7 @@ import { useFollow } from '../composeabe/Follow';
|
|
|
import { useGetNotice } from '../composeabe/GetNotice';
|
|
|
import { assertNotNull, FormatUtils, waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
|
-import { confirm } from '@/components/dialog/CommonRoot';
|
|
|
+import { alert, confirm } from '@/components/dialog/CommonRoot';
|
|
|
import HomeTitle from '@/common/components/parts/HomeTitle.vue';
|
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
|
import Text from '@/components/basic/Text.vue';
|
|
|
@@ -392,6 +398,7 @@ import Image from '@/components/basic/Image.vue';
|
|
|
import Avatar from '@/components/display/Avatar.vue';
|
|
|
import ChangeNickDialog from '../dialogs/ChangeNickDialog.vue';
|
|
|
import StaffInfoDialog from '../dialogs/StaffInfoDialog.vue';
|
|
|
+import ShareQRDialog from '../dialogs/ShareQRDialog.vue';
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
(e: 'goTree'): void;
|
|
|
@@ -457,6 +464,8 @@ const staffInfo = computed(() => extraInfoInList.value ? {
|
|
|
} : null);
|
|
|
const isStaff = computed(() => staffInfo.value?.type === 'staff');
|
|
|
|
|
|
+const shareQRDialog = ref<InstanceType<typeof ShareQRDialog>>();
|
|
|
+
|
|
|
const rankActiveTag = ref('文化积分');
|
|
|
const listActiveTag = ref('广场');
|
|
|
|
|
|
@@ -556,19 +565,25 @@ async function checkIsStaff(needTopic?: boolean) {
|
|
|
await OfficialApi.checkTopicRule(villageStore.currentVillage.id)
|
|
|
: (authStore.isAdmin || isStaff.value);
|
|
|
if (!isAdmin) {
|
|
|
- const goUpgrade = await confirm({
|
|
|
- title: '提示',
|
|
|
- content: '您还不是管理员'
|
|
|
- + (needTopic ? '/或暂无管理贴图权限' : '')
|
|
|
- + ',无法管理贴图哦。'
|
|
|
- + '您可以联系村社管理员将你添加为管理员,若当前村社暂无管理员,您可以点击“去升级”将您升级为管理员。',
|
|
|
- confirmText: '去升级',
|
|
|
- cancelText: '取消',
|
|
|
- });
|
|
|
- if (goUpgrade) {
|
|
|
- navTo('/pages/home/village/upgrade/my-upgrade-management', {
|
|
|
- villageId: villageStore.currentVillage.id,
|
|
|
+ if (needTopic && (isStaff.value || authStore.isAdmin)) {
|
|
|
+ alert({
|
|
|
+ title: '提示',
|
|
|
+ content: '您暂无管理贴图权限,无法管理贴图哦。可联系客服询问原因。',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const goUpgrade = await confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '您还不是管理员,无法管理贴图哦。您可以联系村社管理员将你添加为管理员,若当前村社暂无管理员,您可以点击“去升级”将您升级为管理员。',
|
|
|
+ confirmText: '去升级',
|
|
|
+ cancelText: '取消',
|
|
|
});
|
|
|
+ if (goUpgrade) {
|
|
|
+ navTo('/pages/home/village/upgrade/my-upgrade-management', {
|
|
|
+ villageId: villageStore.currentVillage.id,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
return false;
|
|
|
}
|