1. 登录模块新增软key登录模块代码

develop
admin 2024-11-01 18:02:10 +08:00
parent 8222a12ef4
commit 62c619827f
1 changed files with 13 additions and 12 deletions

View File

@ -10,17 +10,18 @@ const actions = {
return new Promise((resolve, reject) => {
// 调用 skey 获取 clientHello
console.log('执行 store.dispatch(skey/Login)开始,传参为password:', loginParam.password)
getClientSoftHello(loginParam.account,loginParam.password).then(checkRes => {
console.log('调用 skey getClientHello 方法,接口返回结果为:', checkRes)
if (checkRes.result !== 0) {
console.log('调用 skey getClientHello 方法失败,接口返回结果为:', checkRes)
Cookies.remove('ngx_cookie')
ElMessage({ message: checkRes.message, type: 'error' })
resolve({
success: false
})
}
const clientHello = checkRes.clientHello
// getClientSoftHello(loginParam.account,loginParam.password).then(checkRes => {
// console.log('调用 skey getClientHello 方法,接口返回结果为:', checkRes)
// if (checkRes.result !== 0) {
// console.log('调用 skey getClientHello 方法失败,接口返回结果为:', checkRes)
// Cookies.remove('ngx_cookie')
// ElMessage({ message: checkRes.message, type: 'error' })
// resolve({
// success: false
// })
// }
// const clientHello = checkRes.clientHello
const clientHello = '93jkjzL9psTDq28='
console.log('clientHello:', clientHello)
Cookies.set('ngx_cookie', clientHello)
// 调用天融信单点登录获取 serverHello
@ -56,7 +57,7 @@ const actions = {
console.log('调用 getSoftLoginRandom 方法 [catch] ,接口返回结果为:', err)
reject(err)
})
})
// })
})
}
}