Commit bdc9cd0a authored by shenyanpei's avatar shenyanpei

登录页面

parent c12ac9cf
......@@ -97,7 +97,7 @@ export default {
this.dictTypeName = item.dictTypeName
this.$axios({
method: 'get',
url: 'http://117.122.212.101:8090/dictmanage/getDictByType/' + item.dictType,
url: 'http://117.122.212.101:8090/dictmanage/getDictByType/' + item.dictType
}).then(res => {
this.dictTypeData = res.data.data
this.total = res.data.data.length
......
......@@ -147,10 +147,18 @@ export default {
if (pass) {
this.loading = true
const { username, password, rememberMe } = this.loginForm
Login({ username, password }).then((res) => {
this.$axios({
method: 'put',
url: 'http://117.122.212.101:8090/sysuser/login',
params: {
userId: this.loginForm.username,
password: this.loginForm.password
}
}).then((res) => {
this.loading = false
const username = res.data.data.USER_ID
Store.set(storeKey.token, `${Math.random()}_${new Date().getTime()}`)
Store.set(storeKey.user, JSON.stringify({ userName: username, userId: res.userId, avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif' }))
Store.set(storeKey.user, JSON.stringify({ userName: username, userId: res.data.data.USER_ID, avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif' }))
if (rememberMe) {
Store.set('username', username)
Store.set('password', encrypt(password))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment