|
@@ -338,7 +338,7 @@ export const uploadDataToAPI = async (productCode : string, callback ?: () => vo
|
|
|
//暂定需要上传的数据文件
|
|
|
//const infoJson = await getLatestRecord(productCode, null);
|
|
|
const apiToken = await getTokenFromApi();
|
|
|
-
|
|
|
+
|
|
|
const showProgress = (index : number) => {
|
|
|
// 在Android设备上,需要给hideLoading和showLoading之间添加延迟
|
|
|
// 先隐藏之前的加载提示
|
|
@@ -350,7 +350,7 @@ export const uploadDataToAPI = async (productCode : string, callback ?: () => vo
|
|
|
mask: true
|
|
|
});
|
|
|
}, 50);
|
|
|
- };
|
|
|
+ };
|
|
|
|
|
|
|
|
|
getJoinList('app_media_record as r', 'app_media_info as i', 'r.*,i.productno', 'r.pid=i.pdid', 'i.productno', productCode, null).then((res : UTSJSONObject) => {
|
|
@@ -379,20 +379,23 @@ export const uploadDataToAPI = async (productCode : string, callback ?: () => vo
|
|
|
upload({
|
|
|
apiUrl: globalConfig.apiUrl,
|
|
|
name: uploadNames[index],
|
|
|
+ seq: index,
|
|
|
filePath: filePath,
|
|
|
formData: {
|
|
|
//传递数据
|
|
|
+
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
}
|
|
|
})
|
|
|
- } catch (error) {
|
|
|
+ }
|
|
|
+ catch (error) {
|
|
|
console.error(error);
|
|
|
uni.showToast({ title: '上传失败,请重试', icon: 'error' });
|
|
|
uni.hideLoading();
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+ return true;
|
|
|
}
|