diff --git a/components/task/AttachmentFileUploader.vue b/components/task/AttachmentFileUploader.vue index 6a8ed74..c476117 100644 --- a/components/task/AttachmentFileUploader.vue +++ b/components/task/AttachmentFileUploader.vue @@ -72,12 +72,12 @@ const handleChooseFiles = async () => { } try { - // #ifdef H5 || MP-WEIXIN || APP-PLUS - await chooseFilesWithUni(remainingCount); + // #ifdef APP-PLUS + await chooseFilesNative(remainingCount); // #endif - // #ifndef H5 || MP-WEIXIN || APP-PLUS - await chooseFilesNative(remainingCount); + // #ifndef APP-PLUS + await chooseFilesWithUni(remainingCount); // #endif } catch (error) { console.error('选择文件失败:', error); @@ -104,13 +104,8 @@ const chooseFilesWithUni = (remainingCount) => { reject(error); } }, - fail: async () => { - try { - await chooseFilesNative(remainingCount); - resolve(); - } catch (nativeError) { - reject(nativeError); - } + fail: () => { + reject(new Error('文件选择被取消或失败')); } }); });