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)
watch(darkMode, (newValue) => {
console.log(`darkMode: ${newValue}`)
window.localStorage.setItem("darkMode", newValue);
// 发射主题变化事件

View File

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

View File

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

View File

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

View File

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

View File

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