态势感知平台-账号密码登录及验证码接口对接治理平台登录接口
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
"highlight.js": "^11.11.1",
|
"highlight.js": "^11.11.1",
|
||||||
"highlightjs-line-numbers.js": "^2.9.0",
|
"highlightjs-line-numbers.js": "^2.9.0",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
|
"jsencrypt": "^3.5.4",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"lottie-web": "^5.12.2",
|
"lottie-web": "^5.12.2",
|
||||||
|
|||||||
@@ -1,8 +1,22 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
export const getCaptcha = (account: any, password: any) => {
|
// export const getCaptcha = (account: any, password: any) => {
|
||||||
return request({
|
// return request({
|
||||||
url: `/u-auth/index/getCaptcha`,
|
// url: `/u-auth/index/getCaptcha`,
|
||||||
|
// method: 'POST',
|
||||||
|
// data: {
|
||||||
|
// account,
|
||||||
|
// password,
|
||||||
|
// loginCode: 'admin'
|
||||||
|
// },
|
||||||
|
// responseType: 'blob'
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
export function getCaptcha(account: any, password: any) {
|
||||||
|
return axios.request({
|
||||||
|
url: `/gateway/u-auth/index/getCaptcha`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
account,
|
account,
|
||||||
@@ -11,7 +25,8 @@ export const getCaptcha = (account: any, password: any) => {
|
|||||||
},
|
},
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
export const login = (account: any, code: any, password: any) => {
|
export const login = (account: any, code: any, password: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/u-auth/index/login`,
|
url: `/u-auth/index/login`,
|
||||||
|
|||||||
@@ -146,6 +146,8 @@ import {
|
|||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
// 引入页面2风格的接口逻辑
|
// 引入页面2风格的接口逻辑
|
||||||
import { getCaptcha, login } from "@/api/jyh/auth";
|
import { getCaptcha, login } from "@/api/jyh/auth";
|
||||||
|
import getRsaCode from '@/utils/jsencrypt';
|
||||||
|
import { useAccountStore } from '@/stores/user';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
modelValue: boolean;
|
modelValue: boolean;
|
||||||
@@ -252,12 +254,12 @@ const handleLogin = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Message.error(res.data.msg);
|
Message.error(res.data.msg);
|
||||||
formModel.code = '';
|
loginForm.code = '';
|
||||||
getCaptchaUrl();
|
getCaptchaUrl();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
formModel.code = '';
|
loginForm.code = '';
|
||||||
getCaptchaUrl();
|
getCaptchaUrl();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3661,6 +3661,11 @@ js-cookie@^3.0.5:
|
|||||||
resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
|
resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
|
||||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||||
|
|
||||||
|
jsencrypt@^3.5.4:
|
||||||
|
version "3.5.4"
|
||||||
|
resolved "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.5.4.tgz#8db335ab164359449dd200d120f125f459476b25"
|
||||||
|
integrity sha512-kNjfYEMNASxrDGsmcSQh/rUTmcoRfSUkxnAz+MMywM8jtGu+fFEZ3nJjHM58zscVnwR0fYmG9sGkTDjqUdpiwA==
|
||||||
|
|
||||||
jsesc@^2.5.1:
|
jsesc@^2.5.1:
|
||||||
version "2.5.2"
|
version "2.5.2"
|
||||||
resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz"
|
resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz"
|
||||||
|
|||||||
Reference in New Issue
Block a user