From 8e4b4d4d6f5d7f55eadcd78db457805349dfea1f Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Wed, 12 Nov 2025 17:08:24 +0800 Subject: [PATCH] =?UTF-8?q?test(KYC=E9=A1=B5):=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/uploadFiles.js | 24 ++++++++++++------------ src/views/Wallet/CashOut/KYC.vue | 7 +++---- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/utils/uploadFiles.js b/src/utils/uploadFiles.js index 40cbd8a..4a7cb8a 100644 --- a/src/utils/uploadFiles.js +++ b/src/utils/uploadFiles.js @@ -17,17 +17,17 @@ export function uploadImgFile(renderFun) { try { if (android()) { - console.debug('Flutter Android WebView 检测') - console.debug('window.app 对象:', window.app) + console.log('Flutter Android WebView 检测') + console.log('window.app 对象:', window.app) // 检查Flutter注入的接口 if (window.app) { - console.debug('window.app 的所有方法:') - console.debug(Object.keys(window.app)) + console.log('window.app 的所有方法:') + console.log(Object.keys(window.app)) // 检查具体的方法 - console.debug('uploadImgFile 方法存在?', typeof window.app.uploadImgFile) - console.debug('uploadImgFile 是函数?', typeof window.app.uploadImgFile === 'function') + console.log('uploadImgFile 方法存在?', typeof window.app.uploadImgFile) + console.log('uploadImgFile 是函数?', typeof window.app.uploadImgFile === 'function') } // 等待Flutter注入完成 @@ -38,17 +38,17 @@ export function uploadImgFile(renderFun) { // 循环检测Flutter接口 const checkInterface = () => { attempts++ - console.debug(`尝试第 ${attempts} 次检查Flutter接口...`) + console.log(`尝试第 ${attempts} 次检查Flutter接口...`) if ( window.app && window.app.uploadImgFile && typeof window.app.uploadImgFile === 'function' ) { - console.debug('Flutter接口检测成功,调用 uploadImgFile') + console.log('Flutter接口检测成功,调用 uploadImgFile') try { const result = window.app.uploadImgFile() - console.debug('uploadImgFile 返回结果:', result) + console.log('uploadImgFile 返回结果:', result) renderFun(result) } catch (error) { console.error('调用 uploadImgFile 出错:', error) @@ -71,13 +71,13 @@ export function uploadImgFile(renderFun) { if (window.app) { waitForFlutterInterface() } else { - console.debug('等待Flutter注入window.app...') + console.log('等待Flutter注入window.app...') // 监听window.app的创建 let checkCount = 0 const checkApp = () => { checkCount++ if (window.app) { - console.debug('检测到window.app,开始连接') + console.log('检测到window.app,开始连接') waitForFlutterInterface() } else if (checkCount < 50) { setTimeout(checkApp, 100) @@ -92,7 +92,7 @@ export function uploadImgFile(renderFun) { checkApp() } } else { - console.debug('非移动设备环境') + console.log('非移动设备环境') // 非APP环境,可能是浏览器调试 console.warn('Not in APP environment, using mock data for development') // 开发环境可以提供模拟数据 diff --git a/src/views/Wallet/CashOut/KYC.vue b/src/views/Wallet/CashOut/KYC.vue index 45f86b2..34ddd5d 100644 --- a/src/views/Wallet/CashOut/KYC.vue +++ b/src/views/Wallet/CashOut/KYC.vue @@ -248,7 +248,6 @@ const callNativeImagePicker = () => { // 处理空数据情况 if (!access || access === '""' || access === '') { console.warn('接收到空的图片数据') - showWarning(t('no_image_selected')) reject(new Error('No image selected')) return } @@ -275,18 +274,18 @@ const callNativeImagePicker = () => { } else { const errorMsg = result.error || t('file_selection_failed') console.error('图片选择失败:', errorMsg) - showError(errorMsg) + // showError(errorMsg) reject(new Error(errorMsg)) } } catch (error) { console.error('处理原生图片选择结果失败:', error) - showError(t('file_processing_failed')) + // showError(t('file_processing_failed')) reject(error) } }) } catch (error) { console.error('调用原生图片选择器失败:', error) - showError(t('native_image_picker_failed')) + // showError(t('native_image_picker_failed')) reject(error) } })