revet: 去除系统免登录加密参数data
This commit is contained in:
@@ -186,7 +186,7 @@ function beforeRequest(options: OptionsType): OptionsType | Promise<any> {
|
||||
if (paramStr) {
|
||||
const separator = options.url.includes('?') ? '&' : '?';
|
||||
// 请求加密
|
||||
if (options.crypto && token !== '== Not Login Auth ==') {
|
||||
if (options.crypto) {
|
||||
const data = encryptAES(JSON.stringify(paramStr), APP_DATA_API_KEY);
|
||||
options.url += `${separator}data=${encodeURIComponent(data)}`;
|
||||
} else {
|
||||
@@ -198,7 +198,7 @@ function beforeRequest(options: OptionsType): OptionsType | Promise<any> {
|
||||
if (options.method === 'get') return options;
|
||||
|
||||
// 非get参数提交
|
||||
let body = options.data
|
||||
let body = options.data;
|
||||
if (body instanceof FormData) {
|
||||
options.body = body;
|
||||
} else if (body) {
|
||||
|
||||
Reference in New Issue
Block a user