From 6d65bfb7a93ecc6624d647995586557381d02160 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Wed, 12 Nov 2025 19:57:43 +0800 Subject: [PATCH] =?UTF-8?q?test16(KYC=E9=A1=B5):=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=8E=B7=E5=8F=96=E5=92=8C=E5=8F=91=E9=80=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/uploadFiles.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/utils/uploadFiles.js b/src/utils/uploadFiles.js index 13a7338..1518bae 100644 --- a/src/utils/uploadFiles.js +++ b/src/utils/uploadFiles.js @@ -33,11 +33,8 @@ export function uploadImgFile(renderFun) { console.debug(Object.keys(window.app)) // 检查具体的方法 - console.debug('getAccessOrigin 方法存在?', typeof window.app.getAccessOrigin) - console.debug( - 'getAccessOrigin 是函数?', - typeof window.app.getAccessOrigin === 'function' - ) + console.debug('getImagePath 方法存在?', typeof window.app.getImagePath) + console.debug('getImagePath 是函数?', typeof window.app.getImagePath === 'function') } // 等待Flutter注入完成 @@ -51,16 +48,16 @@ export function uploadImgFile(renderFun) { if ( window.app && - window.app.getAccessOrigin && - typeof window.app.getAccessOrigin === 'function' + window.app.getImagePath && + typeof window.app.getImagePath === 'function' ) { - console.debug('Flutter接口检测成功,调用 getAccessOrigin') + console.debug('Flutter接口检测成功,调用 getImagePath') try { - const result = window.app.getAccessOrigin() - console.debug('getAccessOrigin 返回结果:', result) + const result = window.app.getImagePath() + console.debug('getImagePath 返回结果:', result) renderFun(result) } catch (error) { - console.error('调用 getAccessOrigin 出错:', error) + console.error('调用 getImagePath 出错:', error) } } else if (attempts < maxAttempts) { // 继续等待