ls-pro-common 1.0.61 → 1.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/http/index.js +2 -2
- package/lib/http/index.js +1 -1
- package/package.json +2 -2
package/es/http/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import { extend } from 'umi-request';
|
|
5
|
-
import {
|
|
5
|
+
import { getUrlQuery, setUrlQuery, getCookie, getResourceProps, showError, toGatewayUrl, reLogin } from '../utils'; //默认超时时间为1分钟
|
|
6
6
|
|
|
7
7
|
var request = extend({
|
|
8
8
|
timeout: 60000
|
|
@@ -10,7 +10,7 @@ var request = extend({
|
|
|
10
10
|
/** 请求拦截器,统一添加token */
|
|
11
11
|
|
|
12
12
|
request.interceptors.request.use(function (url, options) {
|
|
13
|
-
var token =
|
|
13
|
+
var token = getCookie("token");
|
|
14
14
|
|
|
15
15
|
var opts = _objectSpread({}, options);
|
|
16
16
|
|
package/lib/http/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var request = (0, _umiRequest.extend)({
|
|
|
30
30
|
/** 请求拦截器,统一添加token */
|
|
31
31
|
|
|
32
32
|
request.interceptors.request.use(function (url, options) {
|
|
33
|
-
var token = (0, _utils.
|
|
33
|
+
var token = (0, _utils.getCookie)("token");
|
|
34
34
|
var opts = (0, _objectSpread2.default)({}, options);
|
|
35
35
|
|
|
36
36
|
if (token && url.indexOf('noToken=1') === -1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ant-design/icons": "^4.3.0",
|
|
31
|
-
"ls-pro-table": "2.62.
|
|
31
|
+
"ls-pro-table": "2.62.45",
|
|
32
32
|
"ls-pro-form": "1.52.29",
|
|
33
33
|
"@babel/runtime": "^7.16.3",
|
|
34
34
|
"classnames": "^2.2.6",
|