test15(KYC页): 测试图片获取和发送接口
This commit is contained in:
parent
ff27fd080c
commit
e923216db4
@ -43,7 +43,7 @@ export function uploadImgFile(renderFun) {
|
||||
// 等待Flutter注入完成
|
||||
const waitForFlutterInterface = () => {
|
||||
let attempts = 0
|
||||
const maxAttempts = 100 // 最多等待5秒
|
||||
const maxAttempts = 6000 // 最多等待60秒
|
||||
|
||||
const checkInterface = () => {
|
||||
attempts++
|
||||
|
||||
@ -246,7 +246,6 @@ const callNativeImagePicker = async () => {
|
||||
|
||||
// 最多3张图片
|
||||
if (previewUrls.value.length >= 3) {
|
||||
showWarning(t('max_images_warning'))
|
||||
throw new Error('Maximum number of images reached')
|
||||
}
|
||||
|
||||
@ -267,16 +266,9 @@ const callNativeImagePicker = async () => {
|
||||
const file = result.data
|
||||
console.log('接收到原生图片数据:', file)
|
||||
|
||||
// // 生成预览图(需要根据实际数据格式调整)
|
||||
// if (typeof file === 'string' && (file.startsWith('http') || file.startsWith('data:'))) {
|
||||
// // 如果是URL或base64数据
|
||||
// previewUrls.value.push(file)
|
||||
// tempFiles.value.push(file) // 保存原始数据用于上传
|
||||
// } else {
|
||||
// // 如果是文件对象或其他格式,需要相应处理
|
||||
// previewUrls.value.push(file)
|
||||
// tempFiles.value.push(file)
|
||||
// }
|
||||
// 生成预览图
|
||||
previewUrls.value.push(file.path)
|
||||
tempFiles.value.push(file.path)
|
||||
|
||||
showSuccess(t('image_selected_success'))
|
||||
resolve()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user