mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
fix: Public客户端打开空白的情况
This commit is contained in:
parent
2bd077136f
commit
98729cfa7b
@ -203,6 +203,11 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
isNotServer() {
|
||||
let apiHome = $A.getDomain(window.systemInfo.apiUrl)
|
||||
return this.$Electron && (apiHome == "" || apiHome == "public")
|
||||
},
|
||||
|
||||
setTheme(mode) {
|
||||
this.$store.dispatch("setTheme", mode)
|
||||
},
|
||||
@ -216,20 +221,26 @@ export default {
|
||||
},
|
||||
|
||||
getNeedStartHome() {
|
||||
if (this.isNotServer()) {
|
||||
this.needStartHome = false;
|
||||
this.goForward({name: 'login'}, true);
|
||||
return;
|
||||
}
|
||||
this.$store.dispatch("call", {
|
||||
url: "system/get/starthome",
|
||||
}).then(({data}) => {
|
||||
this.homeFooter = data.home_footer;
|
||||
if (this.userId > 0) {
|
||||
this.goForward({path: '/manage/dashboard'}, true);
|
||||
this.goForward({name: 'manage-dashboard'}, true);
|
||||
} else {
|
||||
this.needStartHome = !!data.need_start;
|
||||
if (this.needStartHome === false) {
|
||||
this.goForward({path: '/login'}, true);
|
||||
this.goForward({name: 'login'}, true);
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch(_ => {
|
||||
this.needStartHome = false;
|
||||
this.goForward({name: 'login'}, true);
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@ -108,7 +108,7 @@ export default {
|
||||
this.getNeedStartHome();
|
||||
//
|
||||
if (this.$Electron) {
|
||||
this.chackServerUrl().catch(() => {});
|
||||
this.chackServerUrl().catch(_ => {});
|
||||
} else {
|
||||
this.clearServerUrl();
|
||||
}
|
||||
@ -198,17 +198,20 @@ export default {
|
||||
this.email = data.account;
|
||||
this.password = data.password;
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch(_ => {
|
||||
//
|
||||
});
|
||||
},
|
||||
|
||||
getNeedStartHome() {
|
||||
if (this.isNotServer()) {
|
||||
return;
|
||||
}
|
||||
this.$store.dispatch("call", {
|
||||
url: "system/get/starthome",
|
||||
}).then(({data}) => {
|
||||
this.needStartHome = !!data.need_start;
|
||||
}).catch(() => {
|
||||
}).catch(_ => {
|
||||
this.needStartHome = false;
|
||||
});
|
||||
},
|
||||
@ -218,7 +221,7 @@ export default {
|
||||
url: 'users/reg/needinvite',
|
||||
}).then(({data}) => {
|
||||
this.needInvite = !!data.need;
|
||||
}).catch(() => {
|
||||
}).catch(_ => {
|
||||
this.needInvite = false;
|
||||
});
|
||||
},
|
||||
@ -305,7 +308,7 @@ export default {
|
||||
this.loadIng--;
|
||||
this.reCode();
|
||||
this.codeNeed = true;
|
||||
}).catch(() => {
|
||||
}).catch(_ => {
|
||||
this.loadIng--;
|
||||
this.codeNeed = false;
|
||||
});
|
||||
@ -348,7 +351,7 @@ export default {
|
||||
$A.setStorage("cacheLoginEmail", this.email)
|
||||
this.$store.dispatch("handleClearCache", data).then(() => {
|
||||
this.goNext1();
|
||||
}).catch(() => {
|
||||
}).catch(_ => {
|
||||
this.goNext1();
|
||||
});
|
||||
}).catch(({data, msg}) => {
|
||||
@ -380,7 +383,7 @@ export default {
|
||||
},
|
||||
}).then(() => {
|
||||
this.goNext2();
|
||||
}).catch(() => {
|
||||
}).catch(_ => {
|
||||
this.goNext2();
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user