diff --git a/src/store/modules/d2admin/modules/account.js b/src/store/modules/d2admin/modules/account.js index 5c153805..f2b44268 100644 --- a/src/store/modules/d2admin/modules/account.js +++ b/src/store/modules/d2admin/modules/account.js @@ -31,13 +31,9 @@ export default { // 设置 vuex 用户信息 commit('d2admin/user/set', { name: res.data.name - }, { - root: true - }) + }, { root: true }) // 用户登陆后从数据库加载一系列的设置 - commit('d2admin/account/load', null, { - root: true - }) + commit('d2admin/account/load', null, { root: true }) // 跳转路由 vm.$router.push({ name: 'index' @@ -70,24 +66,18 @@ export default { } // 判断是否需要确认 if (confirm) { - commit('d2admin/grayModeSet', true, { - root: true - }) + commit('d2admin/grayModeSet', true, { root: true }) vm.$confirm('注销当前账户吗? 打开的标签页和用户设置将会被保存。', '确认操作', { confirmButtonText: '确定注销', cancelButtonText: '放弃', type: 'warning' }) .then(() => { - commit('d2admin/grayModeSet', false, { - root: true - }) + commit('d2admin/grayModeSet', false, { root: true }) logout() }) .catch(() => { - commit('d2admin/grayModeSet', false, { - root: true - }) + commit('d2admin/grayModeSet', false, { root: true }) vm.$message('放弃注销用户') }) } else {