提交 2e57f8f1 authored 作者: 钟是志's avatar 钟是志

增加配置项 rbin false

解决阿坝移动端加密返回数据量过大导致页面卡顿的问题
上级 6ab8bde0
...@@ -39,7 +39,7 @@ function getApi(apiUrl) { ...@@ -39,7 +39,7 @@ function getApi(apiUrl) {
let datasTrue = { let datasTrue = {
fileParams: window.CONFIG.SAFE_TYPE === 2 ? datasCode : file, fileParams: window.CONFIG.SAFE_TYPE === 2 ? datasCode : file,
bin: true, bin: true,
rbin: true, rbin: !!window.CONFIG.rbin,
// token: getToken(), // token: getToken(),
}; };
const formData = new FormData(); const formData = new FormData();
......
...@@ -43,13 +43,19 @@ function formatDatas(datas, url = '') { ...@@ -43,13 +43,19 @@ function formatDatas(datas, url = '') {
if (openIsBinary) { if (openIsBinary) {
datasTrue.bin = true; datasTrue.bin = true;
if (window.CONFIG?.ALL_R_BIN) { if (window.CONFIG?.ALL_R_BIN) {
datasTrue.rbin = true; datasTrue.rbin = !!window.CONFIG.rbin;
if(!window.CONFIG.rbin){
delete datasTrue.rbin;
}
} else { } else {
let findIndexA = resBinaryApiList.findIndex(g => { let findIndexA = resBinaryApiList.findIndex(g => {
return url.includes(g.api); return url.includes(g.api);
}); });
if (findIndexA >= 0) { if (findIndexA >= 0) {
datasTrue.rbin = true; datasTrue.rbin = !!window.CONFIG.rbin;
if(!window.CONFIG.rbin){
delete datasTrue.rbin;
}
} }
} }
} }
......
...@@ -136,6 +136,7 @@ const loginUmiRequest = extend({ ...@@ -136,6 +136,7 @@ const loginUmiRequest = extend({
// const test = getUrlInfo().test; // const test = getUrlInfo().test;
const requestA = (url, data, options = {}) => { const requestA = (url, data, options = {}) => {
// window.CONFIG.IS_SAFE = false;
return giveBase16EnCode(data, url) return giveBase16EnCode(data, url)
.then((newData) => { .then((newData) => {
if (typeof newData === 'object' && newData.url && newData.datas) { if (typeof newData === 'object' && newData.url && newData.datas) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论