2024-10-10 16:04:11 +08:00
|
|
|
import Vue from 'vue';
|
|
|
|
|
import App from './App.vue';
|
|
|
|
|
import ui from 'element-ui';
|
|
|
|
|
import router from './utils/router';
|
|
|
|
|
import utils from './utils';
|
2024-10-12 16:17:37 +08:00
|
|
|
import vcUI from 'dui/packages';
|
2024-10-10 17:35:04 +08:00
|
|
|
import appComp from 'dui/dv';
|
2024-10-10 16:04:11 +08:00
|
|
|
import store from './utils/store';
|
|
|
|
|
import autoRoutes from "./utils/autoRoutes";
|
|
|
|
|
import extra from "./config.json"
|
|
|
|
|
import axios from "./utils/axios";
|
|
|
|
|
//备注底座信息,勿删
|
|
|
|
|
console.log("欢迎使用%s", extra.sysInfo?.name || "构建版本")
|
|
|
|
|
window.Vue = Vue
|
|
|
|
|
Vue.use(ui);
|
|
|
|
|
Vue.use(vcUI);
|
|
|
|
|
Vue.use(appComp);
|
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
Vue.prototype.$cdn = "https://cdn.cunwuyun.cn"
|
|
|
|
|
Vue.prototype.$request = axios
|
|
|
|
|
Object.keys(utils).map((e) => (Vue.prototype[e] = utils[e]));
|
|
|
|
|
const loadPage = () => autoRoutes.init().finally(() => new Vue({router, store, render: h => h(App)}).$mount("#app"))
|
|
|
|
|
let theme = null
|
|
|
|
|
store.dispatch('getSystem', extra.sysInfo).then(res => {
|
|
|
|
|
theme = JSON.parse(res?.colorScheme || null)
|
|
|
|
|
return import(`dui/lib/styles/theme.${theme?.web}.scss`).catch(() => 0)
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
Vue.prototype.$theme = theme?.web || "blue"
|
|
|
|
|
!!theme?.web && theme?.web != "blue" ? loadPage() : import(`dui/lib/styles/common.scss`).finally(loadPage)
|
|
|
|
|
})
|
|
|
|
|
|