网格员账号登录跳转
This commit is contained in:
@@ -4,6 +4,7 @@ import constant from '@/utilsRc/constant'
|
||||
import {
|
||||
login,
|
||||
// logout,
|
||||
loginByUserId,
|
||||
getInfo,
|
||||
register,
|
||||
smsLogin,
|
||||
@@ -107,6 +108,25 @@ const user = {
|
||||
})
|
||||
})
|
||||
},
|
||||
// 网格员登录
|
||||
LoginByID({
|
||||
commit,
|
||||
// state
|
||||
}, userInfo) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
// const info = JSON.parse(JSON.stringify(userInfo))
|
||||
// info.password = '04' + sm2.doEncrypt(info.password, state.publicKey, 0)
|
||||
// info.username = '04' + sm2.doEncrypt(info.username, state.publicKey, 0)
|
||||
loginByUserId(userInfo).then(res => {
|
||||
setToken(res.token)
|
||||
commit('SET_TOKEN', res.token)
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 登录
|
||||
Login({
|
||||
commit,
|
||||
|
||||
Reference in New Issue
Block a user