From ca72073cb1e56c61a4377d291eb5c2b80e5202fe Mon Sep 17 00:00:00 2001 From: admin <592225189@qq.com> Date: Thu, 31 Oct 2024 19:29:51 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E7=99=BB=E5=BD=95=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BD=AFkey=E7=99=BB=E5=BD=95=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/ukeyAuth.js | 8 ++++++++ src/store/modules/skey.js | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/services/ukeyAuth.js b/src/services/ukeyAuth.js index 32592e8..3c72ce0 100644 --- a/src/services/ukeyAuth.js +++ b/src/services/ukeyAuth.js @@ -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) { return webssoService({ diff --git a/src/store/modules/skey.js b/src/store/modules/skey.js index ed766a5..fa6f42c 100644 --- a/src/store/modules/skey.js +++ b/src/store/modules/skey.js @@ -1,4 +1,4 @@ -import { getClientHello } from 'services/ukeyAuth.js' +import { getClientSoftHello } from 'services/ukeyAuth.js' import { getSoftLoginRandom, trxSoftLogin } from 'services/trxLogin.js' import Cookies from 'js-cookie' import { ElMessage } from 'element-plus' @@ -10,7 +10,7 @@ const actions = { return new Promise((resolve, reject) => { // 调用 skey 获取 clientHello 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) if (checkRes.result !== 0) { console.log('调用 skey getClientHello 方法失败,接口返回结果为:', checkRes)