修复登录后无法进入主界面,需要刷新的BUG
This commit is contained in:
parent
37baa6d678
commit
18a3884e15
|
@ -255,6 +255,7 @@ import { useRouter } from "vue-router";
|
|||
import EventBus, { EventNamesDefine } from "src/common/EventBus";
|
||||
import { useStore } from "src/store";
|
||||
import { Md5 } from "ts-md5/dist/md5";
|
||||
import Initializer from "src/common/Initializer";
|
||||
|
||||
class _Data {
|
||||
user_name: string | null = null;
|
||||
|
@ -475,6 +476,18 @@ export default defineComponent({
|
|||
|
||||
$store.commit("setDeviceIpAddress", data.ip_address);
|
||||
|
||||
setTimeout(() => {
|
||||
new Initializer({
|
||||
$t,
|
||||
$store,
|
||||
$q,
|
||||
})
|
||||
.initialize()
|
||||
.then(() => {
|
||||
$store.commit("setInitialized");
|
||||
});
|
||||
}, 0);
|
||||
|
||||
$route.push("/");
|
||||
} else {
|
||||
$q.notify({
|
||||
|
|
|
@ -202,6 +202,7 @@ import { useRouter } from "vue-router";
|
|||
import EventBus, { EventNamesDefine } from "src/common/EventBus";
|
||||
import { useStore } from "src/store";
|
||||
import { Md5 } from "ts-md5/dist/md5";
|
||||
import Initializer from "src/common/Initializer";
|
||||
|
||||
class _Data {
|
||||
user_name: string | null = null;
|
||||
|
@ -400,6 +401,18 @@ export default defineComponent({
|
|||
|
||||
$store.commit("setDeviceIpAddress", data.ip_address);
|
||||
|
||||
setTimeout(() => {
|
||||
new Initializer({
|
||||
$t,
|
||||
$store,
|
||||
$q,
|
||||
})
|
||||
.initialize()
|
||||
.then(() => {
|
||||
$store.commit("setInitialized");
|
||||
});
|
||||
}, 0);
|
||||
|
||||
$route.push("/");
|
||||
} else {
|
||||
$q.notify({
|
||||
|
|
Loading…
Reference in New Issue