feat: 添加通知功能,集成模拟数据并更新通知视图
This commit is contained in:
42
src/main.ts
42
src/main.ts
@@ -5,7 +5,7 @@ import uiComponents from "@/ui";
|
||||
import App from "./App.vue";
|
||||
import { authClient } from "./auth";
|
||||
import { i18n } from "./locales";
|
||||
|
||||
import { setupMocks } from "./mocks";
|
||||
import { router } from "./router";
|
||||
|
||||
/* Core CSS required for Ionic components to work properly */
|
||||
@@ -41,26 +41,32 @@ import "./theme/ionic.css";
|
||||
|
||||
useTheme();
|
||||
|
||||
authClient.getSession().then((session) => {
|
||||
const pinia = createPinia();
|
||||
const userStore = useUserStore(pinia);
|
||||
userStore.setToken(session.data?.session.token || "");
|
||||
function initApp() {
|
||||
authClient.getSession().then((session) => {
|
||||
const pinia = createPinia();
|
||||
const userStore = useUserStore(pinia);
|
||||
userStore.setToken(session.data?.session.token || "");
|
||||
|
||||
const app = createApp(App)
|
||||
.use(IonicVue, {
|
||||
backButtonText: "返回",
|
||||
mode: "ios",
|
||||
statusTap: true,
|
||||
swipeBackEnabled: true,
|
||||
const app = createApp(App)
|
||||
.use(IonicVue, {
|
||||
backButtonText: "返回",
|
||||
mode: "ios",
|
||||
statusTap: true,
|
||||
swipeBackEnabled: true,
|
||||
// rippleEffect: true,
|
||||
// animated: false,
|
||||
})
|
||||
.use(uiComponents)
|
||||
.use(pinia)
|
||||
.use(router)
|
||||
.use(i18n);
|
||||
})
|
||||
.use(uiComponents)
|
||||
.use(pinia)
|
||||
.use(router)
|
||||
.use(i18n);
|
||||
|
||||
router.isReady().then(() => {
|
||||
app.mount("#app");
|
||||
router.isReady().then(() => {
|
||||
app.mount("#app");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
setupMocks().then(() => {
|
||||
initApp();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user