1. 登录模块新增软key登录模块代码
							parent
							
								
									91a64248a5
								
							
						
					
					
						commit
						ca72073cb1
					
				| 
						 | 
					@ -64,6 +64,14 @@ export function getClientHello(password) {
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function getClientSoftHello(account,password) {
 | 
				
			||||||
 | 
					  return webssoService({
 | 
				
			||||||
 | 
					    url: 'http://127.0.0.1:8899/client_hello',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: { userName: account, userPwd: password }
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 生成客户验证码
 | 
					// 生成客户验证码
 | 
				
			||||||
export function getClientAuth(password, serverHello, clientHello) {
 | 
					export function getClientAuth(password, serverHello, clientHello) {
 | 
				
			||||||
  return webssoService({
 | 
					  return webssoService({
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
import { getClientHello } from 'services/ukeyAuth.js'
 | 
					import { getClientSoftHello } from 'services/ukeyAuth.js'
 | 
				
			||||||
import { getSoftLoginRandom, trxSoftLogin } from 'services/trxLogin.js'
 | 
					import { getSoftLoginRandom, trxSoftLogin } from 'services/trxLogin.js'
 | 
				
			||||||
import Cookies from 'js-cookie'
 | 
					import Cookies from 'js-cookie'
 | 
				
			||||||
import { ElMessage } from 'element-plus'
 | 
					import { ElMessage } from 'element-plus'
 | 
				
			||||||
| 
						 | 
					@ -10,7 +10,7 @@ const actions = {
 | 
				
			||||||
    return new Promise((resolve, reject) => {
 | 
					    return new Promise((resolve, reject) => {
 | 
				
			||||||
      // 调用 skey 获取 clientHello
 | 
					      // 调用 skey 获取 clientHello
 | 
				
			||||||
      console.log('执行 store.dispatch(skey/Login)开始,传参为password:', loginParam.password)
 | 
					      console.log('执行 store.dispatch(skey/Login)开始,传参为password:', loginParam.password)
 | 
				
			||||||
      getClientHello(loginParam.password).then(checkRes => {
 | 
					      getClientSoftHello(loginParam.account,loginParam.password).then(checkRes => {
 | 
				
			||||||
        console.log('调用 skey getClientHello 方法,接口返回结果为:', checkRes)
 | 
					        console.log('调用 skey getClientHello 方法,接口返回结果为:', checkRes)
 | 
				
			||||||
        if (checkRes.result !== 0) {
 | 
					        if (checkRes.result !== 0) {
 | 
				
			||||||
          console.log('调用 skey getClientHello 方法失败,接口返回结果为:', checkRes)
 | 
					          console.log('调用 skey getClientHello 方法失败,接口返回结果为:', checkRes)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue