|
@@ -245,20 +245,22 @@ export default {
|
|
|
// 登录按钮点击
|
|
|
submitForm() {
|
|
|
this.btnLoading = true;
|
|
|
- this.$api.adminLogin(this.ruleForm).then(response => {
|
|
|
+ this.$api.adminLogin(this.ruleForm).then(async response => {
|
|
|
Storage.setStr('username', this.ruleForm.username)
|
|
|
Storage.setStr('password', this.ruleForm.password)
|
|
|
this.$cookie.set('token',response.data.token)
|
|
|
- this.btnLoading = false
|
|
|
- this.$message.success('登录成功')
|
|
|
- this.$router.push({
|
|
|
- path: '/home'
|
|
|
- })
|
|
|
- this.DictMessage()
|
|
|
+ sessionStorage.clear()
|
|
|
+ await this.DictMessage()
|
|
|
this.getUserInfo()
|
|
|
this.getScenario()
|
|
|
this.getMatter()
|
|
|
this.getPermissionList()
|
|
|
+ this.btnLoading = false
|
|
|
+ this.$message.success('登录成功')
|
|
|
+ this.$router.push({
|
|
|
+ path: '/home'
|
|
|
+ })
|
|
|
+
|
|
|
}).catch(error => {
|
|
|
this.getCode()
|
|
|
this.btnLoading = false
|