|
@@ -13,6 +13,7 @@ import request from './request';
|
|
import printJS from 'print-js';
|
|
import printJS from 'print-js';
|
|
import { getLocale } from 'umi/locale';
|
|
import { getLocale } from 'umi/locale';
|
|
import defaultSettings from '@/defaultSettings';
|
|
import defaultSettings from '@/defaultSettings';
|
|
|
|
+import isEmpty from "lodash/isEmpty"
|
|
|
|
|
|
const Search = Input.Search;
|
|
const Search = Input.Search;
|
|
|
|
|
|
@@ -1384,11 +1385,16 @@ export function sldComRequest(method, url, params, data_type = '') {
|
|
const currentSite = state.global.currentSite || localStorage.getItem('currentSite');
|
|
const currentSite = state.global.currentSite || localStorage.getItem('currentSite');
|
|
const currentPath = state.routing.location.pathname;
|
|
const currentPath = state.routing.location.pathname;
|
|
if (!currentPath.includes('/apply') && !currentPath.includes('/user/login')) {
|
|
if (!currentPath.includes('/apply') && !currentPath.includes('/user/login')) {
|
|
- params = Object.assign({}, params ?? {}, { webSite: currentSite })
|
|
|
|
|
|
+ params = Object.assign({}, { webSite: currentSite }, params ?? {})
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (params && params.isAll) {
|
|
|
|
+ delete params.isAll;
|
|
|
|
+ delete params.webSite;
|
|
}
|
|
}
|
|
if (method == 'get') {
|
|
if (method == 'get') {
|
|
let tmp_url = apiUrl + `${url}`;
|
|
let tmp_url = apiUrl + `${url}`;
|
|
- if (params != undefined) {
|
|
|
|
|
|
+ if (params != undefined && !isEmpty(params)) {
|
|
tmp_url += `?${stringify(params)}`;
|
|
tmp_url += `?${stringify(params)}`;
|
|
}
|
|
}
|
|
return request(tmp_url);
|
|
return request(tmp_url);
|