123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import Vue from 'vue'; // 引入 Vue 2
- import App from './App.vue'; // 引入根组件
- import router from './router'; // 引入路由
- import store from './store'; // 引入 Vuex store
- import ElementUI from 'element-ui'; // 引入 Element UI
- import 'element-ui/lib/theme-chalk/index.css'; // 引入 Element UI 样式
- import axios from './common/axios.config'; // 引入 axios 配置实例
- import '@/permission' // permission control
- Vue.config.productionTip = false; // 关闭生产模式提示
- // 使用 Element UI 插件
- Vue.use(ElementUI);
- // 将 axios 挂载到 Vue 实例上
- Vue.prototype.$ajax = axios;
- let region = 'cn'
- // BaseUrl='http://gpt4.cocorobo.cn:8011/';
- if (parent?.location?.href.includes('beta')) {
- console.log(parent.location.href);
-
- region = 'beta'
- } else if (parent?.location?.href.includes('cn')) {
- console.log(parent.location.href);
- region = 'cn'
- } else if (parent?.location?.href.includes('hk')) {
- console.log(parent.location.href);
- region = 'hk'
- } else if (parent?.location?.href.includes('com')) {
- console.log(parent.location.href);
- region = 'com'
- }
- Vue.prototype.$region = region;
- new Vue({
- router,
- store,
- render: h => h(App),
- }).$mount('#app');
|