提交 11b6ccaa authored 作者: 钟是志's avatar 钟是志

按欢哥在qq群里面说的要求

在元数据,数据查询 增加hasIgnore 不鉴权配置项 在应用上增加perms 配置项让应用可以掉其他系统的接口
上级 c3888070
......@@ -241,9 +241,9 @@ export default class ImportUtil extends React.PureComponent {
fetch(transformApi, {
method: 'POST',
body: FormdataWrapper(newParams.datas),
headers: {
apis: headersApi,
},
// headers: {
// apis: headersApi,
// },
})
.then((res) => {
console.log(res.status);
......
......@@ -116,7 +116,7 @@ export async function requestFileInfo(url, datas) {
headers: {
Accept: 'application/json',
...getHeaders(transformApi).headers,
apis: headersApi,
// apis: headersApi,
// axxx: `select * from user123 where id = 1`,
},
method: 'POST',
......
......@@ -758,9 +758,9 @@ export async function downloadFile(url, params, fileName = '导出文件', ext =
let headers = {
Authorization: `bearer ${localStorage.getItem('antd-pro-token-onestop')}`,
};
if(headersApi){
headers.apis = headersApi;
}
// if(headersApi){
// headers.apis = headersApi;
// }
fetch(transformApi, {
method: 'POST',
body: FormdataWrapper(params),
......@@ -802,9 +802,9 @@ export async function downloadFileAndShowModal(url, params, fileName = '导出
let headers = {
Authorization: `bearer ${localStorage.getItem('antd-pro-token-onestop')}`,
};
if(headersApi){
headers.apis = headersApi;
}
// if(headersApi){
// headers.apis = headersApi;
// }
fetch(transformApi, {
method: 'POST',
body: FormdataWrapper(params),
......
......@@ -248,18 +248,7 @@ class TreeList extends React.Component {
});
},
});
// } else {
// router.push({
// pathname: '/admin/ddl/dataObj/formEdit',
// state: {
// id: this.state.objId,
// recordId: record[this.state.primaryKey],
// recordKey: this.state.primaryKey,
// isAdd: false,
// isView:false
// },
// });
// }
};
view = (record) => {
......@@ -271,18 +260,7 @@ class TreeList extends React.Component {
isAdd: false,
isView: true,
});
// } else {
// router.push({
// pathname: '/admin/ddl/dataObj/formEdit',
// state: {
// id: this.state.objId,
// recordId: record[this.state.primaryKey],
// recordKey: this.state.primaryKey,
// isAdd: false,
// isView:true
// },
// });
// }
};
isJSON = (str) => {
......
......@@ -270,11 +270,11 @@ export async function requestOrigin(url, data, options = {}){
if(options.headers){
options.headers = {
...options.headers,
apis: headersApi,
// apis: headersApi,
};
}else{
options.headers = {
apis: headersApi,
// apis: headersApi,
};
}
}
......
......@@ -39,9 +39,9 @@ export function getHeaders(url = '', headersApi = undefined) {
res.headers.Authorization = `bearer ${token}`;
res.headers.auth = gg5xxxxx(secretString);
res.headers.timestamp = timestamp;
if (headersApi) {
res.headers.apis = headersApi;
}
// if (headersApi) {
// res.headers.apis = headersApi;
// }
}
return res;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论