网格员账号登录跳转

This commit is contained in:
2025-12-16 17:40:00 +08:00
parent 4fbd32156d
commit 4ef77b2251
5 changed files with 50 additions and 12 deletions

View File

@@ -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,