Commit ad76e00d authored by 徐乐's avatar 徐乐

feat: 修改登录密码加密方式

parent 7490a065
Pipeline #81660 passed with stages
......@@ -115,9 +115,9 @@
"@wisdom-map/arcgismap": "1.4.0-217",
"@wisdom-map/basemap": "1.1.0-32",
"@wisdom-map/util": "^1.0.28-0",
"@wisdom-utils/components": "0.1.335",
"@wisdom-utils/components": "0.1.337",
"@wisdom-utils/runtime": "0.0.48",
"@wisdom-utils/utils": "0.1.375",
"@wisdom-utils/utils": "0.1.377",
"animate.css": "^4.1.1",
"antd": "4.21.2",
"compression": "1.7.4",
......@@ -168,7 +168,9 @@
"sanitize.css": "8.0.0",
"sha1": "^1.1.1",
"styled-components": "4.2.0",
"swiper": "6.8.4"
"swiper": "6.8.4",
"sm4js": "^0.0.6",
"bcryptjs": "2.4.3"
},
"devDependencies": {
"@babel/cli": "7.4.3",
......@@ -315,4 +317,4 @@
"xss": "^1.0.11",
"yorkie": "^2.0.0"
}
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import { message } from 'antd';
import { decode, encode } from 'js-base64';
import Cookies from 'js-cookie';
import sha1 from 'sha1';
import { encipher } from '@wisdom-utils/utils/lib/helpers';
import { SlideVerify } from '@wisdom-utils/components';
import { appService, noticeService } from '@/api';
import { getUserInfo, getWebSiteConfig } from '@/api/service/base';
......@@ -859,7 +860,8 @@ class Login {
expiration: this.globalConfig.expiration, // token过期时间(单位:秒)
client: 'referer',
username: usr,
password: params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase(),
// password: params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase(),
password: params.getParams('generateType') ? pwd : encipher(pwd, this.globalConfig.encrypt).toUpperCase(),
referer: this.globalConfig.client,
skipMenuTest: 1,
generateType: params.getParams('generateType') || '',
......@@ -1116,7 +1118,8 @@ class Login {
appService
.authorizationToken({
loginName: usr,
password: pwd ? (params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase()) : '',
// password: pwd ? (params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase()) : '',
password: pwd ? (params.getParams('generateType') ? pwd : encipher(pwd, this.globalConfig.encrypt).toUpperCase()) : '',
type: mode,
generateType: params.getParams('generateType') || '',
})
......@@ -1150,7 +1153,8 @@ class Login {
expiration: this.globalConfig.expiration, // token过期时间(单位:秒)
client: 'referer',
username: usr,
password: pwd ? (params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase()) : '',
// password: pwd ? (params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase()) : '',
password: pwd ? (params.getParams('generateType') ? pwd : encipher(pwd, this.globalConfig.encrypt).toUpperCase()) : '',
referer: this.globalConfig.client,
skipMenuTest: 1,
userPhone,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment