提交 54dd7273 authored 作者: 钟是志's avatar 钟是志

调试代码

上级 7f3ebb76
......@@ -32,21 +32,29 @@ function getApi(apiUrl) {
}
const datasCode = strToBinary(JSON.stringify(data));
let file = new File([datasCode], 'fileParams.jpeg', {
type: 'image/jpeg',
});
let datasTrue = {
fileParams: file,
fileParams: window.CONFIG.SAFE_TYPE === 2 ? datasCode : file,
bin: true,
rbin: true,
// token: getToken(),
};
const formData = new FormData();
let u = window.CONFIG.API_ACTION_PATH + '/safe/pub/getApis';
if(window.CONFIG.SAFE_TYPE === 2){
u = window.CONFIG.API_ACTION_PATH + '/safe/pub';
data.path = '/getApis';
}
for (let key in datasTrue) {
formData.append(key, datasTrue[key]);
}
return fetch(window.CONFIG.API_ACTION_PATH + '/safe/pub/getApis', {
return fetch(u, {
headers: {
Accept: 'application/json',
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论