2024-01-22 08:52:37 +00:00
|
|
|
import { createApp } from 'vue'
|
|
|
|
import App from './App.vue'
|
|
|
|
import { setupI18n } from './locales'
|
|
|
|
import { setupAssets, setupScrollbarStyle } from './plugins'
|
|
|
|
import { setupStore } from './store'
|
|
|
|
import { setupRouter } from './router'
|
2024-01-23 12:01:13 +00:00
|
|
|
import Antd from "ant-design-vue";
|
2024-01-24 12:00:45 +00:00
|
|
|
import "ant-design-vue/dist/reset.css";
|
|
|
|
import ElementPlus from 'element-plus'
|
|
|
|
import 'element-plus/dist/index.css'
|
2024-01-22 08:52:37 +00:00
|
|
|
async function bootstrap() {
|
|
|
|
const app = createApp(App)
|
|
|
|
setupAssets()
|
2024-01-23 12:01:13 +00:00
|
|
|
app.use(Antd);
|
2024-01-24 12:00:45 +00:00
|
|
|
app.use(ElementPlus);
|
2024-01-22 08:52:37 +00:00
|
|
|
setupScrollbarStyle()
|
|
|
|
setupStore(app)
|
|
|
|
setupI18n(app)
|
|
|
|
await setupRouter(app)
|
2024-01-29 02:53:19 +00:00
|
|
|
// 子页面中
|
2024-01-29 03:23:34 +00:00
|
|
|
const origins=['https://erp.fontree.cn','http://172.16.100.93:9010']
|
2024-01-29 02:53:19 +00:00
|
|
|
window.addEventListener('message', function(event) {
|
2024-01-29 03:23:34 +00:00
|
|
|
if (origins.includes(event.origin)){
|
2024-01-29 02:53:19 +00:00
|
|
|
localStorage.setItem('token',event.data)
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2024-01-23 12:01:13 +00:00
|
|
|
app.mount('#app')
|
2024-01-22 08:52:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bootstrap()
|