import Vue from 'vue'
import VueI18n from 'vue-i18n'
import App from './App'
import apis from './configs/http';
import store from './store';
import env from '@/configs/env';
import zh from '@/common/lang/zh';
import en from '@/common/lang/en';
import mainStatistics from '@/pages/Charts/mainStatistics';

//谷歌地图
// import * as VueGoogleMaps from 'vue2-google-maps'

// Vue.use(VueGoogleMaps, {

//   load: {

//     key: 'AIzaSyAqxnF8_35P_vlxVGxKhfL2lxFup-qZF6g',

//     libraries: 'places', 
// 	// This is required if you use the Autocomplete plugin

//     // OR: libraries: 'places,drawing'

//     // OR: libraries: 'places,drawing,visualization'

//     // (as you require)

//     //// If you want to set the version, you can do so:

//     // v: '3.26',

//   },
// })
Vue.use(VueI18n)
Vue.config.productionTip = !!env.isProduction;
const i18n = new VueI18n({  
  // locale: 'en-US',  // 默认选择的语言
  locale: 'zh-CN',
   messages: {
         'zh-CN': zh,   // 中文语言包
         'en-US': en    // 英文语言包
       }
});

App.mpType = 'app'
// Vue.prototype.serverurl="http://127.0.0.1:8686";
Vue.prototype.serverurl="http://127.0.0.1:8090";
// Vue.prototype.serverurl="https://app.sunzee.com.cn/ShenzeeServer";
Vue.prototype.$store = store;
Vue.prototype._i18n = i18n;
const app = new Vue({
	i18n,
	store,
	...App,
});
app.$mount();

Object.keys(apis).forEach(key => {
	Vue.prototype[`$${key}`] = apis[key];
});

Vue.component('mainStatistics', mainStatistics);
