完成扫码获取 ck,closes #18

This commit is contained in:
BTMuli
2023-09-04 09:19:35 +08:00
parent bda4966ae5
commit e2a1f8c862
11 changed files with 75 additions and 588 deletions

View File

@@ -7,7 +7,7 @@
<script lang="ts" setup>
// vue
import { markRaw, onBeforeMount, onMounted, onUnmounted, onUpdated, ref } from "vue";
import { markRaw, onMounted, onUnmounted, onUpdated, ref } from "vue";
import ToLoading from "../../components/overlay/to-loading.vue";
import TPool from "../../components/home/t-pool.vue";
import TPosition from "../../components/home/t-position.vue";
@@ -15,10 +15,8 @@ import TCalendar from "../../components/home/t-calendar.vue";
// store
import { useHomeStore } from "../../store/modules/home";
import { useAppStore } from "../../store/modules/app";
import { useUserStore } from "../../store/modules/user";
// utils
import { getBuildTime } from "../../utils/TGBuild";
import TGSqlite from "../../plugins/Sqlite";
// store
const appStore = useAppStore();
@@ -47,15 +45,6 @@ function readLoading(): void {
}
}
onBeforeMount(async () => {
// 获取当前用户
const user = await TGSqlite.getCurAccount();
// 存储当前用户
if (user) {
useUserStore().setCurAccount(user);
}
});
onMounted(async () => {
loadingTitle.value = "正在加载首页";
loading.value = true;