diff --git a/src/main.js b/src/main.js index 761c6a4..dc37117 100644 --- a/src/main.js +++ b/src/main.js @@ -16,8 +16,13 @@ import { vLoading } from '@/components/x-loading/index.js' import messagePopup from '@/components/x-message/useMessagePopup' import pageAnimation from '@/components/page-animation/index.vue' import * as plugins from './plugins' -import { useDialogueStore, useTalkStore, useUserStore, useDialogueListStore } from '@/store' -import {uniStorage} from "@/utils/uniStorage.js" +import { + useDialogueStore, + useTalkStore, + useUserStore, + useDialogueListStore, +} from '@/store' +import { uniStorage } from '@/utils/uniStorage.js' import { handleFindWebview } from '@/utils/common' const { showMessage } = messagePopup() @@ -96,8 +101,8 @@ export function createApp() { // 新版本-按公司别、好友、群组的通讯录 uni.navigateTo({ url: '/pages/addressBook/index?type=true', - }); - }; + }) + } //处理OA、墨册强制刷新时,聊天同步强制刷新 window.doLocationRefresh = () => { @@ -117,13 +122,25 @@ export function createApp() { window.getBaseMulVideo = (videoList) => { const videos = JSON.parse(decodeURIComponent(videoList)) console.error('=====videos', videos) - if(videos.length > 0){ + if (videos.length > 0) { const videoUri = videos[0] console.error('=====videoUri', videoUri) - } } + //检查是否是特殊测试用户,开启控制台 + const checkTestUser = () => { + const userStore = useUserStore() + if ( + import.meta.env.VITE_SHOW_CONSOLE === 'false' && + userStore.mobile == '18100591363' + ) { + new VConsole() + } + } + + checkTestUser() + window.message = ['success', 'error', 'warning'].reduce((acc, type) => { acc[type] = (message) => { if (typeof message === 'string') {