feat: 优化应用初始化逻辑,移除不必要的 mocks 导入,简化代码结构;更新市场视图样式,增强标签导航的布局;修复通知视图中的 API 导入
This commit is contained in:
43
src/main.ts
43
src/main.ts
@@ -7,7 +7,6 @@ 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 */
|
||||
@@ -94,34 +93,28 @@ function initTradingView() {
|
||||
return Promise.all([promise1, promise2]);
|
||||
}
|
||||
|
||||
function initApp() {
|
||||
initTradingView().then(() => {
|
||||
authClient.getSession().then((session) => {
|
||||
const pinia = createPinia();
|
||||
const userStore = useUserStore(pinia);
|
||||
userStore.setToken(session.data?.session.token || "");
|
||||
initTradingView().then(() => {
|
||||
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