登录国密sm4改造

dev-sm4
wangxy 4 months ago
parent 1948af7c21
commit 869478cbcf

@ -7,8 +7,6 @@ const sm4 =require('sm-crypto').sm4
* @returns {*}
*/
export function encrypt(txt,key) {
console.log(txt)
console.log(key)
return sm4.encrypt(txt,key);
}

@ -54,8 +54,7 @@ const user = {
//调用加密方法(传密码和公钥)
const password = encrypt(userInfo.password,publicKey)
const code = userInfo.code
const uuid = userInfo.uuid
login(username, password, code, uuid)
login(username, password, code)
.then(res => {
setToken(res.token)
commit('SET_TOKEN', res.token)

Loading…
Cancel
Save