优化 goForward

This commit is contained in:
kuaifan 2022-03-24 11:55:54 +08:00
parent 665184bfa2
commit 57df991dd3
7 changed files with 8 additions and 8 deletions

View File

@ -201,7 +201,7 @@
},
openDialog() {
this.goForward({path: '/manage/messenger'});
this.goForward({name: 'manage-messenger'});
this.$store.dispatch("openDialogUserid", this.userid).catch(() => {})
}
}

View File

@ -394,7 +394,7 @@ export default {
if (fromUrl) {
window.location.replace(fromUrl);
} else {
this.goForward({path: '/manage/dashboard'}, true);
this.goForward({name: 'manage-dashboard'}, true);
}
}
}

View File

@ -691,7 +691,7 @@ export default {
chackPass() {
if (this.userInfo.changepass === 1) {
this.goForward({path: '/manage/setting/password'});
this.goForward({name: 'manage-setting-password'});
}
},
@ -986,7 +986,7 @@ export default {
if (!$A.isJson(data)) {
return;
}
this.goForward({path: '/manage/messenger'});
this.goForward({name: 'manage-messenger'});
if (data.dialog_id) {
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;

View File

@ -1104,7 +1104,7 @@ export default {
};
this.msgFile = [];
this.msgText = "";
this.goForward({path: '/manage/messenger', query: {_: $A.randomString(6)}});
this.goForward({name: 'manage-messenger', query: {_: $A.randomString(6)}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);

View File

@ -67,7 +67,7 @@ export default {
if (project) {
$A.goForward({path: '/manage/project/' + project.id});
} else {
$A.goForward({path: '/manage/dashboard'});
$A.goForward({name: 'manage-dashboard'});
}
}
});

View File

@ -70,7 +70,7 @@ export default {
this.error = false;
}).catch(({data, msg}) => {
if (data.code === 2) {
this.goForward({path: '/'}, true);
this.goForward({name: 'index'}, true);
} else {
this.success = false;
this.error = true;

View File

@ -618,7 +618,7 @@ export default {
if (project) {
$A.goForward({path: '/manage/project/' + project.id});
} else {
$A.goForward({path: '/manage/dashboard'});
$A.goForward({name: 'manage-dashboard'});
}
}
setTimeout(() => {