up login MD5 encrypt
This commit is contained in:
parent
34335676d4
commit
5e58639a0d
|
@ -23,15 +23,15 @@ const api = {
|
|||
login: {
|
||||
url: `${config.API_URL}/login`,
|
||||
name: "登录获取用户菜单和权限,全部权限",
|
||||
get: async function(){
|
||||
return await http.get(this.url);
|
||||
get: async function(params={}){
|
||||
return await http.get(this.url, params);
|
||||
}
|
||||
},
|
||||
login_demo: {
|
||||
url: `${config.API_URL}/login_user`,
|
||||
name: "登录获取用户菜单和权限,部分权限",
|
||||
get: async function(){
|
||||
return await http.get(this.url);
|
||||
get: async function(params={}){
|
||||
return await http.get(this.url, params);
|
||||
}
|
||||
},
|
||||
list: {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* @Descripttion: 工具集
|
||||
* @version: 1.0
|
||||
* @version: 1.1
|
||||
* @LastEditors: sakuya
|
||||
* @LastEditTime: 2021年6月28日19:13:13
|
||||
* @LastEditTime: 2021年7月20日10:58:41
|
||||
*/
|
||||
|
||||
import CryptoJS from 'crypto-js';
|
||||
|
|
|
@ -170,7 +170,11 @@
|
|||
},
|
||||
login: async function() {
|
||||
this.islogin = true;
|
||||
var userInfo = await this.$API.user.login.get();
|
||||
var data = {
|
||||
user: this.$TOOL.crypto.MD5(this.ruleForm.user),
|
||||
password: this.$TOOL.crypto.MD5(this.ruleForm.password)
|
||||
}
|
||||
var userInfo = await this.$API.user.login.get(data);
|
||||
this.$TOOL.data.set("user", userInfo.data);
|
||||
this.$router.replace({
|
||||
path: '/'
|
||||
|
@ -180,7 +184,11 @@
|
|||
},
|
||||
login_demo: async function() {
|
||||
this.islogin = true;
|
||||
var userInfo = await this.$API.user.login_demo.get();
|
||||
var data = {
|
||||
user: this.$TOOL.crypto.MD5(this.ruleForm.user),
|
||||
password: this.$TOOL.crypto.MD5(this.ruleForm.password)
|
||||
}
|
||||
var userInfo = await this.$API.user.login_demo.get(data);
|
||||
this.$TOOL.data.set("user", userInfo.data);
|
||||
this.$router.replace({
|
||||
path: '/'
|
||||
|
|
Loading…
Reference in New Issue