优化清除缓存
This commit is contained in:
parent
5c2a82b7ee
commit
5181010d22
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "DooTask",
|
"name": "DooTask",
|
||||||
"version": "0.3.81",
|
"version": "0.3.89",
|
||||||
"description": "DooTask is task management system.",
|
"description": "DooTask is task management system.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "DooTask",
|
"name": "DooTask",
|
||||||
"version": "0.3.88",
|
"version": "0.3.89",
|
||||||
"description": "DooTask is task management system.",
|
"description": "DooTask is task management system.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "./cmd dev",
|
"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() {
|
mounted() {
|
||||||
if ($A.getObject(this.$route.query, '_cc')) {
|
if (this.$store.state.method.getStorageString("clearCache")) {
|
||||||
this.$store.state.method.clearLocal();
|
this.$store.state.method.setStorage("clearCache", "")
|
||||||
this.$store.dispatch("saveUserInfo", this.userInfo);
|
|
||||||
$A.messageSuccess("清除成功");
|
$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}) {
|
logout({state, dispatch}) {
|
||||||
state.method.clearLocal();
|
state.method.clearLocal();
|
||||||
dispatch("saveUserInfo", {});
|
dispatch("saveUserInfo", {}).then(() => {
|
||||||
const from = ["/", "/login"].includes(window.location.pathname) ? "" : encodeURIComponent(window.location.href);
|
const from = ["/", "/login"].includes(window.location.pathname) ? "" : encodeURIComponent(window.location.href);
|
||||||
window.location.href = $A.urlAddParams(window.systemInformation.origin + "login", from ? {from: from} : {})
|
$A.goForward({name: 'login', query: from ? {from: from} : {}}, true);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -310,8 +311,9 @@ export default {
|
|||||||
*/
|
*/
|
||||||
clearCache({state, dispatch}) {
|
clearCache({state, dispatch}) {
|
||||||
state.method.clearLocal();
|
state.method.clearLocal();
|
||||||
|
state.method.setStorage("clearCache", $A.randomString(6))
|
||||||
dispatch("saveUserInfo", state.userInfo);
|
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