Skip to content

Commit

Permalink
perf(projects): perf code
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Apr 15, 2024
1 parent cb8ea25 commit b7f0749
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/store/modules/auth/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { computed, reactive, ref } from 'vue';
import { useRoute } from 'vue-router';
import { defineStore } from 'pinia';
import { useLoading } from '@sa/hooks';
import { useRoute } from 'vue-router';
import { SetupStoreId } from '@/enum';
import { useRouterPush } from '@/hooks/common/router';
import { fetchGetUserInfo, fetchLogin } from '@/service/api';
Expand All @@ -11,12 +11,11 @@ import { useRouteStore } from '../route';
import { clearAuthStorage, getToken, getUserInfo } from './shared';

export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
const route = useRoute();
const routeStore = useRouteStore();
const { toLogin, redirectFromLogin } = useRouterPush(false);
const { loading: loginLoading, startLoading, endLoading } = useLoading();

const route = useRoute();

const token = ref(getToken());

const userInfo: Api.Auth.UserInfo = reactive(getUserInfo());
Expand Down

0 comments on commit b7f0749

Please sign in to comment.