chore: remove debug console.log statements

Remove debug logging from production code while preserving
console.error and console.warn for actual error/warning cases.
This commit is contained in:
yukaidi
2026-05-29 03:28:22 +08:00
parent 29d8bf3ea4
commit 5a0dc69186
6 changed files with 1 additions and 14 deletions

View File

@@ -36,7 +36,6 @@ if (item) {
const darkMode = ref(item) const darkMode = ref(item)
watch(darkMode, (newValue) => { watch(darkMode, (newValue) => {
console.log(`darkMode: ${newValue}`)
window.localStorage.setItem("darkMode", newValue); window.localStorage.setItem("darkMode", newValue);
// 发射主题变化事件 // 发射主题变化事件

View File

@@ -491,7 +491,6 @@ export default {
}, },
// 处理文件点击 // 处理文件点击
handleFileClick(file) { handleFileClick(file) {
console.log('点击文件', file, this.viewMode)
if (file.fileType === 'folder') { if (file.fileType === 'folder') {
this.enterFolder(file) this.enterFolder(file)
} else if (this.viewMode === 'pane') { } else if (this.viewMode === 'pane') {

View File

@@ -410,7 +410,6 @@ function addThunderDownload(tasks, config) {
if (userAgent) taskParam.userAgent = userAgent if (userAgent) taskParam.userAgent = userAgent
taskParam.threadCount = '1' taskParam.threadCount = '1'
console.log('[Thunder SDK] newTask params:', JSON.stringify(taskParam))
window.thunderLink.newTask(taskParam) window.thunderLink.newTask(taskParam)
return Promise.resolve('thunder-ok') return Promise.resolve('thunder-ok')
} }

View File

@@ -313,7 +313,6 @@ export async function loadTypesFromApi(monaco) {
cachedContent, cachedContent,
'file:///types.js' 'file:///types.js'
); );
console.log('从缓存加载types.js成功');
// 异步更新缓存 // 异步更新缓存
updateTypesJsCache(); updateTypesJsCache();
return; return;
@@ -334,7 +333,6 @@ export async function loadTypesFromApi(monaco) {
typesJsContent, typesJsContent,
'file:///types.js' 'file:///types.js'
); );
console.log('加载types.js成功并已缓存');
} }
} catch (error) { } catch (error) {
console.warn('加载types.js失败使用内置类型定义:', error); console.warn('加载types.js失败使用内置类型定义:', error);
@@ -350,7 +348,6 @@ async function updateTypesJsCache() {
if (response.ok) { if (response.ok) {
const typesJsContent = await response.text(); const typesJsContent = await response.text();
localStorage.setItem('playground_types_js', typesJsContent); localStorage.setItem('playground_types_js', typesJsContent);
console.log('types.js缓存已更新');
} }
} catch (error) { } catch (error) {
console.warn('更新types.js缓存失败:', error); console.warn('更新types.js缓存失败:', error);

View File

@@ -959,18 +959,16 @@ export default {
// 优先使用个人配置 // 优先使用个人配置
if (this.allAuthConfigs[panType]) { if (this.allAuthConfigs[panType]) {
config = this.allAuthConfigs[panType] config = this.allAuthConfigs[panType]
console.log(`[认证] 使用个人配置: ${this.getPanDisplayName(panType)}`)
} else { } else {
// 从后端随机获取捐赠账号(后端已加密,直接使用 encryptedAuth // 从后端随机获取捐赠账号(后端已加密,直接使用 encryptedAuth
try { try {
const response = await axios.get(`${this.baseAPI}/v2/randomAuth`, { params: { panType } }) const response = await axios.get(`${this.baseAPI}/v2/randomAuth`, { params: { panType } })
const encryptedAuth = response.data?.data?.encryptedAuth const encryptedAuth = response.data?.data?.encryptedAuth
if (encryptedAuth) { if (encryptedAuth) {
console.log(`[认证] 使用捐赠账号: ${this.getPanDisplayName(panType)}`)
return encryptedAuth return encryptedAuth
} }
} catch (e) { } catch (e) {
console.log(`[认证] 无可用捐赠账号: ${this.getPanDisplayName(panType)}`) // no available donated account
} }
return '' return ''
} }
@@ -1319,7 +1317,6 @@ export default {
async getPaste(isManual = false) { async getPaste(isManual = false) {
try { try {
const text = await navigator.clipboard.readText() const text = await navigator.clipboard.readText()
console.log('获取到的文本内容是:', text)
const shortInfo = this.expandShortFormat(text) const shortInfo = this.expandShortFormat(text)
if (shortInfo) { if (shortInfo) {

View File

@@ -1758,7 +1758,6 @@ function parseFileList(shareLinkInfo, http, logger) {
testParams.value.method testParams.value.method
); );
console.log('测试结果:', result);
testResult.value = result; testResult.value = result;
// 将日志添加到控制台 // 将日志添加到控制台
@@ -1820,10 +1819,8 @@ function parseFileList(shareLinkInfo, http, logger) {
loadingList.value = true; loadingList.value = true;
try { try {
const result = await playgroundApi.getParserList(); const result = await playgroundApi.getParserList();
console.log('获取解析器列表响应:', result);
// 检查响应格式 // 检查响应格式
if (result.code === 200 || result.success) { if (result.code === 200 || result.success) {
console.log('列表数据:', result.data);
parserList.value = result.data || []; parserList.value = result.data || [];
} else if (result.data && Array.isArray(result.data)) { } else if (result.data && Array.isArray(result.data)) {
// 如果data直接是数组 // 如果data直接是数组
@@ -1857,7 +1854,6 @@ function parseFileList(shareLinkInfo, http, logger) {
try { try {
const codeToPublish = currentCode.value; const codeToPublish = currentCode.value;
const result = await playgroundApi.saveParser(codeToPublish); const result = await playgroundApi.saveParser(codeToPublish);
console.log('保存解析器响应:', result);
// 检查响应格式 // 检查响应格式
if (result.code === 200 || result.success) { if (result.code === 200 || result.success) {
// 从响应或代码中提取type信息 // 从响应或代码中提取type信息