优化清除缓存
This commit is contained in:
parent
5c2a82b7ee
commit
5181010d22
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.3.81",
|
||||
"version": "0.3.89",
|
||||
"description": "DooTask is task management system.",
|
||||
"main": "main.js",
|
||||
"license": "MIT",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.3.88",
|
||||
"version": "0.3.89",
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
|
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -217,9 +217,8 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if ($A.getObject(this.$route.query, '_cc')) {
|
||||
this.$store.state.method.clearLocal();
|
||||
this.$store.dispatch("saveUserInfo", this.userInfo);
|
||||
if (this.$store.state.method.getStorageString("clearCache")) {
|
||||
this.$store.state.method.setStorage("clearCache", "")
|
||||
$A.messageSuccess("清除成功");
|
||||
}
|
||||
//
|
||||
|
10
resources/assets/js/store/actions.js
vendored
10
resources/assets/js/store/actions.js
vendored
@ -298,9 +298,10 @@ export default {
|
||||
*/
|
||||
logout({state, dispatch}) {
|
||||
state.method.clearLocal();
|
||||
dispatch("saveUserInfo", {});
|
||||
const from = ["/", "/login"].includes(window.location.pathname) ? "" : encodeURIComponent(window.location.href);
|
||||
window.location.href = $A.urlAddParams(window.systemInformation.origin + "login", from ? {from: from} : {})
|
||||
dispatch("saveUserInfo", {}).then(() => {
|
||||
const from = ["/", "/login"].includes(window.location.pathname) ? "" : encodeURIComponent(window.location.href);
|
||||
$A.goForward({name: 'login', query: from ? {from: from} : {}}, true);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@ -310,8 +311,9 @@ export default {
|
||||
*/
|
||||
clearCache({state, dispatch}) {
|
||||
state.method.clearLocal();
|
||||
state.method.setStorage("clearCache", $A.randomString(6))
|
||||
dispatch("saveUserInfo", state.userInfo);
|
||||
window.location.href = $A.urlAddParams(window.location.href, {'_cc': $A.randomString(6)})
|
||||
window.location.reload()
|
||||
},
|
||||
|
||||
/** *****************************************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user