diff --git a/sgzb-ui/src/api/login.js b/sgzb-ui/src/api/login.js index eab46307..5b0e7ddd 100644 --- a/sgzb-ui/src/api/login.js +++ b/sgzb-ui/src/api/login.js @@ -1,7 +1,7 @@ import request from '@/utils/request' // 登录方法 -export function login(username, password, code, uuid) { +export function login(username, password, code, uuid, textCode) { return request({ url: '/auth/login', headers: { @@ -10,7 +10,7 @@ export function login(username, password, code, uuid) { }, method: 'post', timeout: 20000, - data: { username, password, code, uuid } + data: { username, password, code, uuid, textCode } }) } @@ -73,6 +73,17 @@ export function sendCode(data) { data: data }) } +// 短信验证码 +export function sendCodeNew(data) { + return request({ + url: '/auth/loginByCode', + headers: { + isToken: false + }, + method: 'post', + data: data + }) +} // 短信验证码--登录 export function checkCode(data) { return request({ diff --git a/sgzb-ui/src/store/modules/user.js b/sgzb-ui/src/store/modules/user.js index c94ac9ed..6171b8ca 100644 --- a/sgzb-ui/src/store/modules/user.js +++ b/sgzb-ui/src/store/modules/user.js @@ -44,10 +44,13 @@ const user = { const password = encrypt(userInfo.password) const code = userInfo.code const uuid = userInfo.uuid - const textCode = undefined - if (userInfo.textCode) { - textCode = userInfo.textCode - } + const textCode = userInfo.textCode + + console.log(userInfo.textCode, userInfo, '******************') + // const textCode = undefined + // if (userInfo.textCode) { + // textCode = userInfo.textCode + // } return new Promise((resolve, reject) => { login(username, password, code, uuid, textCode).then(res => { let data = res.data diff --git a/sgzb-ui/src/views/newLogin.vue b/sgzb-ui/src/views/newLogin.vue index 1aa0e8cd..18e37ba5 100644 --- a/sgzb-ui/src/views/newLogin.vue +++ b/sgzb-ui/src/views/newLogin.vue @@ -26,37 +26,32 @@ - + 确 定 + + + + + + + + + + + + + 确 定 + +