打印数据屏蔽

This commit is contained in:
朱浩 2025-01-15 16:42:10 +08:00
parent f8f0646bde
commit 2ad1ae4946
2 changed files with 18 additions and 4 deletions

View File

@ -95,7 +95,7 @@ export const addFileToSC = (params) => {
params
})
}
//EOS生成表单上传的签名
export const createSignature = (data) => {
return request({
url: '/eos/createSignature',
@ -103,7 +103,7 @@ export const createSignature = (data) => {
data
})
}
//EOS生成本地上传的临时签名
export const sessionToken = () => {
return request({
url: '/eos/sessionToken',

View File

@ -27,8 +27,8 @@ import customComponent from '@/components/common' // 自定义组件
import plugins from './plugins' // plugins插件
import useUserStore from '@/store/modules/user'
import aiAudio from 'aix-plugins-aitools' // 文字转语音插件
import '../../../node_modules/aix-plugins-aitools/aitools.css'
import '../../../node_modules/aix-plugins-aitools/aitools.css'
if(process.env.NODE_ENV != 'development') { // 非开发环境,将日志打印到日志文件
Object.assign(console, log.functions) // 渲染进程日志-控制台替换
@ -55,6 +55,20 @@ VMdPreview.use(githubTheme, {
Hljs: hljs,
});
(function () {
if (!['development', 'mock'].includes(process.env.NODE_ENV)&&import.meta.env.VITE_SHOW_DEV_TOOLS==='true') {
['log', 'warn', 'error', 'info'].forEach((item) => {
console[item] = (function (func) {
const res = localStorage.getItem('debug');
if (res === 'GMV_desk') {
return func;
}
return function () {};
})(console[item]);
});
}
})()
app.use(router)
.use(store)
.use(ElementPlus, { locale: zhLocale })