perf: 同步完整版代码

This commit is contained in:
xiaoxian521
2022-04-10 21:22:05 +08:00
parent 2bac78478c
commit 736f1c27cd
8 changed files with 22 additions and 56 deletions

View File

@@ -61,11 +61,8 @@ export const usePermissionStore = defineStore({
break;
}
},
// 清空缓存
// 清空缓存页面
clearAllCachePage() {
this.wholeMenus = [];
this.menusTree = [];
this.buttonAuth = [];
this.cachePageList = [];
}
}

View File

@@ -33,12 +33,12 @@ export const useUserStore = defineStore({
},
// 登入
async loginByUsername(data) {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
getLogin(data)
.then(res => {
if (res) {
setToken(res);
resolve(res);
.then(data => {
if (data) {
setToken(data);
resolve();
}
})
.catch(error => {