| | |
| | | import {loginByUsername, loginBySocial, loginBySso, getUserInfo, logout, refreshToken, getButtons} from '@/api/user' |
| | | import {getTopMenu, getRoutes} from '@/api/system/menu' |
| | | import md5 from 'js-md5' |
| | | import func from "@/util/func"; |
| | | |
| | | |
| | | function addPath(ele, first) { |
| | |
| | | //根据用户名登录 |
| | | LoginByUsername({commit}, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username,userInfo.password, userInfo.type, userInfo.key,).then(res => { |
| | | let passwordDes = func.encryptData(userInfo.password,'daliantan0v0vcip') |
| | | loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username,passwordDes, userInfo.type, userInfo.key,).then(res => { |
| | | const data = res.data; |
| | | if (data.code === 200) { |
| | | // commit('SET_TOKEN', data.obj.sessionInfo.token); |