dlt-for-react 1.0.19 → 1.0.20
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/README.md +5 -1
- package/lib/layouts/Login/index.js +3 -3
- package/lib/layouts/Login/login.js +15 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ npm publish
|
|
|
8
8
|
|
|
9
9
|
## 前端 dlt-for-react 依赖包版本更新记录
|
|
10
10
|
|
|
11
|
-
##### 当前最新版本:1.0.
|
|
11
|
+
##### 当前最新版本:1.0.20
|
|
12
12
|
|
|
13
13
|
##### 安装依赖
|
|
14
14
|
|
|
@@ -16,6 +16,10 @@ npm publish
|
|
|
16
16
|
|
|
17
17
|
##### 版本修改记录
|
|
18
18
|
|
|
19
|
+
#### V1.0.20—2023 年 11 月 2 日
|
|
20
|
+
|
|
21
|
+
1. 修改登录接口传参bug
|
|
22
|
+
|
|
19
23
|
#### V1.0.19—2023 年 11 月 1 日
|
|
20
24
|
|
|
21
25
|
1. 补充 KyTextArea 组件
|
|
@@ -100,8 +100,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
100
100
|
* @Description: 新版设计规范学工-登录页面
|
|
101
101
|
* @Author: lisenlin
|
|
102
102
|
* @Date: 2020-12-03 20:59:35
|
|
103
|
-
* @LastEditors:
|
|
104
|
-
* @LastEditTime:
|
|
103
|
+
* @LastEditors: jiangzhongxin
|
|
104
|
+
* @LastEditTime: 2023-11-02 14:08:53
|
|
105
105
|
*/
|
|
106
106
|
var pubKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ8DUCb0CEFATRWU8BtBL42RvsdFBcpxYNfsg0P1f7Rd1qKLtqLSBBVGrJu148CdCAkxwKOsjvj5D4eMeDQCd18CAwEAAQ==';
|
|
107
107
|
//网关密码加密
|
|
@@ -227,7 +227,7 @@ var LoginPage = function (_React$Component) {
|
|
|
227
227
|
encryptTransfer: true,
|
|
228
228
|
timestamp: timestamp,
|
|
229
229
|
digest: digest,
|
|
230
|
-
systemId: 'ly-
|
|
230
|
+
systemId: 'ly-hq'
|
|
231
231
|
};
|
|
232
232
|
if (_this.state.lytype) {
|
|
233
233
|
params.lytype = _this.state.lytype;
|
|
@@ -77,8 +77,8 @@ var userLogin = exports.userLogin = function userLogin(allMenu, params, func) {
|
|
|
77
77
|
headers: {
|
|
78
78
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
79
79
|
'X-Requested-With': 'XMLHttpRequest',
|
|
80
|
-
logAppId: 'ly-
|
|
81
|
-
gatewayAppId: 'ly-
|
|
80
|
+
logAppId: 'ly-hq',
|
|
81
|
+
gatewayAppId: 'ly-hq',
|
|
82
82
|
logServiceId: window.logServiceId
|
|
83
83
|
},
|
|
84
84
|
body: querystring.stringify(params)
|
|
@@ -276,7 +276,7 @@ var getDifferDate = exports.getDifferDate = function getDifferDate(firstDate, se
|
|
|
276
276
|
* 获取已经登录的用户信息
|
|
277
277
|
* @param func
|
|
278
278
|
*/
|
|
279
|
-
var tryLoginUserInfo = exports.tryLoginUserInfo = function tryLoginUserInfo(allMenu, fullPageUrl, func, Authorization) {
|
|
279
|
+
var tryLoginUserInfo = exports.tryLoginUserInfo = function tryLoginUserInfo(allMenu, fullPageUrl, func, Authorization, notConf) {
|
|
280
280
|
//第一步,清空缓存
|
|
281
281
|
////console.info("tryLoginUserInfo执行1");
|
|
282
282
|
if (window.gateway_version === '2') {
|
|
@@ -295,15 +295,15 @@ var tryLoginUserInfo = exports.tryLoginUserInfo = function tryLoginUserInfo(allM
|
|
|
295
295
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
296
296
|
'X-Requested-With': 'XMLHttpRequest',
|
|
297
297
|
Authorization: Authorization || '',
|
|
298
|
-
logAppId: 'ly-
|
|
299
|
-
gatewayAppId: 'ly-
|
|
298
|
+
logAppId: 'ly-hq',
|
|
299
|
+
gatewayAppId: 'ly-hq',
|
|
300
300
|
logServiceId: window.logServiceId
|
|
301
301
|
},
|
|
302
302
|
redirect: 'manual'
|
|
303
303
|
}).then(function (response) {
|
|
304
304
|
return response.json();
|
|
305
305
|
}).then(function (res) {
|
|
306
|
-
|
|
306
|
+
//console.info("tryLoginUserInfo执行5");
|
|
307
307
|
if (window.gateway_version === '2') {
|
|
308
308
|
if (res.meta && res.meta.statusCode === 200) {
|
|
309
309
|
if (res.data) {
|
|
@@ -350,7 +350,7 @@ var tryLoginUserInfo = exports.tryLoginUserInfo = function tryLoginUserInfo(allM
|
|
|
350
350
|
return res;
|
|
351
351
|
}
|
|
352
352
|
} else {
|
|
353
|
-
|
|
353
|
+
//console.info("tryLoginUserInfo执行5");
|
|
354
354
|
if (res.meta && res.meta.statusCode === 200) {
|
|
355
355
|
//console.info("tryLoginUserInfo执行3");
|
|
356
356
|
if (res.data) {
|
|
@@ -363,7 +363,7 @@ var tryLoginUserInfo = exports.tryLoginUserInfo = function tryLoginUserInfo(allM
|
|
|
363
363
|
sessionStorage.setItem('statusCode', res.meta.statusCode);
|
|
364
364
|
}
|
|
365
365
|
//console.info("tryLoginUserInfo执行4");
|
|
366
|
-
sso(func);
|
|
366
|
+
sso(func, undefined, notConf);
|
|
367
367
|
return res;
|
|
368
368
|
}
|
|
369
369
|
}).catch(function (error) {
|
|
@@ -450,18 +450,18 @@ var tryAllConfigInfo = exports.tryAllConfigInfo = function tryAllConfigInfo(func
|
|
|
450
450
|
};
|
|
451
451
|
|
|
452
452
|
//单点登录验证
|
|
453
|
-
var sso = function sso(func, allMenu) {
|
|
453
|
+
var sso = function sso(func, allMenu, notConf) {
|
|
454
454
|
//console.info("sso执行1");
|
|
455
455
|
var userLogin = sessionStorage.getItem('userLogin');
|
|
456
456
|
|
|
457
457
|
if (userLogin) {
|
|
458
458
|
//如果已经登录,此时需要获取配置信息
|
|
459
459
|
//console.info("sso执行2");
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
460
|
+
if (!notConf) {
|
|
461
|
+
tryAllConfigInfo(func);
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
func && func();
|
|
465
465
|
} else {
|
|
466
466
|
//是否启用单点登录
|
|
467
467
|
if (window.casStatus) {
|
|
@@ -558,9 +558,7 @@ var sso = function sso(func, allMenu) {
|
|
|
558
558
|
window.location = window.location.origin + window.location.pathname + 'auth?service=' + urlencode(window.location.origin + window.location.pathname);
|
|
559
559
|
}
|
|
560
560
|
} else {
|
|
561
|
-
|
|
562
|
-
func();
|
|
563
|
-
}
|
|
561
|
+
func && func();
|
|
564
562
|
}
|
|
565
563
|
}
|
|
566
564
|
};
|