mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
场站+服务管理功能开发,角色权限完善,总览弹窗接口联调
This commit is contained in:
@@ -75,13 +75,17 @@ export default {
|
||||
const values = await this.$refs.ruleForm.validateFields()
|
||||
const res = await getReq('/login',this.form )
|
||||
this.loading = false
|
||||
|
||||
console.log(res);
|
||||
|
||||
// if (res.code === 200) {
|
||||
this.$message.success('登录成功')
|
||||
localStorage.setItem('token', res.token)
|
||||
this.$router.push('/')
|
||||
// } else {
|
||||
if (res.errcode === 0) {
|
||||
this.$message.success('登录成功')
|
||||
localStorage.setItem('token', res.token)
|
||||
localStorage.setItem('user',JSON.stringify( res.permission) )
|
||||
this.$router.push('/')
|
||||
|
||||
}
|
||||
// else {
|
||||
// this.$message.error(res.message || '登录失败')
|
||||
// }
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user