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

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

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