From 4ce90a88b53152899fedd4bb6e33d7bec8c62e42 Mon Sep 17 00:00:00 2001 From: XieYongHong <18010623010@163.com> Date: Mon, 23 Oct 2023 15:20:22 +0800 Subject: [PATCH] fix: bug#19121 --- src/utils/utils.ts | 10 +++++----- src/views/account/Center/index.vue | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index c151afec..e313716c 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -71,8 +71,8 @@ export const isNoCommunity = !(localStorage.getItem(SystemConst.VERSION_CODE) == /** * 生成随机数 - * @param length - * @returns + * @param length + * @returns */ export const randomString = (length?: number) => { const tempLength = length || 32; @@ -87,8 +87,8 @@ export const randomString = (length?: number) => { /** * 时间戳转时分秒文本 - * @param time - * @returns + * @param time + * @returns */ export const timestampFormat = (time: number) => { let hour = 0; @@ -182,4 +182,4 @@ export const EventEmitter = { }) return this } -} \ No newline at end of file +} diff --git a/src/views/account/Center/index.vue b/src/views/account/Center/index.vue index 37bf2a66..2e9bf1cc 100644 --- a/src/views/account/Center/index.vue +++ b/src/views/account/Center/index.vue @@ -90,6 +90,7 @@ import { } from '@/utils/consts'; import { usePermissionStore } from '@/store/permission'; import RoleShow from './components/RoleShow/index.vue'; +import {isNoCommunity} from "@/utils/utils"; const imageTypes = reactive([ 'image/jpeg', @@ -103,7 +104,8 @@ const imageTypes = reactive([ const user = useUserInfo(); type KeyType = 'HomeView' | 'BindThirdAccount' | 'Subscribe' | 'StationMessage'; -const list: { key: KeyType; title: string }[] = [ +console.log(isNoCommunity) +const list: { key: KeyType; title: string }[] = isNoCommunity ? [ { key: 'HomeView', title: '首页视图', @@ -120,6 +122,19 @@ const list: { key: KeyType; title: string }[] = [ key: 'StationMessage', title: '站内信', }, +] : [ + { + key: 'HomeView', + title: '首页视图', + }, + { + key: 'Subscribe', + title: '我的订阅', + }, + { + key: 'StationMessage', + title: '站内信', + }, ]; const tabs = {