上传文件token过期踢出去

main
吕天方 2 weeks ago
parent c84184bb62
commit e49c0fb356

@ -151,6 +151,14 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.uploadList.push({ name: res.fileName, url: res.fileName }); this.uploadList.push({ name: res.fileName, url: res.fileName });
this.uploadedSuccessfully(); this.uploadedSuccessfully();
} else if(res.code == 401) {
this.$store.dispatch('LogOut').then(() => {
// location.href = '/login';
this.$modal.msgError(res.msg);
this.$modal.closeLoading();
this.uploadedSuccessfully();
this.$router.replace("/login");
})
} else { } else {
this.number--; this.number--;
this.$modal.closeLoading(); this.$modal.closeLoading();

Loading…
Cancel
Save