密码md5加密

busUser
wj 2 years ago
parent f5b6ee5d2b
commit 8dd049c71d

@ -16,6 +16,7 @@
"element-ui": "^2.15.13",
"file-saver": "^2.0.5",
"js-cookie": "^2.2.0",
"js-md5": "^0.7.3",
"mockjs": "^1.0.1-beta3",
"node-sass": "^6.0.1",
"nprogress": "^0.2.0",

@ -12,7 +12,6 @@ export function userInfo(id, token) {
}
export function loginName(username, password) {
console.log(username + " " + password);
return axios({
url: "/login",
method: "post",

@ -19,6 +19,8 @@ import myReq2 from "./utils/axios2";
import {parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree} from "@/utils/ruoyi";
import {getUUID} from "@/utils/strUtil";
import md5 from 'js-md5';
Vue.prototype.$md5 = md5;
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm

@ -12,6 +12,7 @@ import {
// import { $NOT_NETWORK } from '../../utils/errorCode'
import {Message} from "element-ui";
import {RECEIVE_ADMIN_EMPLOY_NAME} from "../mutation-types";
import md5 from 'js-md5';
// initial state
const state = {
@ -48,7 +49,7 @@ const actions = {
// 用户名登录
loginName({commit}, userInfo) {
const userName = userInfo.userName ? userInfo.userName.trim() : "";
const pwd = userInfo.pwd ? userInfo.pwd : "";
const pwd = md5(userInfo.pwd);
return new Promise((resolve, reject) => {
loginName(userName, pwd)
.then(response => {

Loading…
Cancel
Save