import App from './App'
import messages from './locale/index'
// main.js
import uView from '@/uni_modules/uview-ui';
Vue.use(uView);


let i18nConfig = {
  locale: uni.getLocale(),
  messages
}
// 引入请求封装，将app参数传递到配置中
require('@/config/request.js')(app); //uview js 
//自己封装的部分
import api from '@/config/api.js';
Vue.prototype.$api = api;
import user from '@/config/user.js';
Vue.prototype.$user = user;
import com from '@/config/com.js';
Vue.prototype.$com = com;


// #ifdef H5  
import wechat from '@/config/wechat.js'  
Vue.prototype.$wechat =wechat;  
// #endif



// #ifndef VUE3
import Vue from 'vue'
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	 i18n,
    ...App
})
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import { createI18n } from 'vue-i18n'
const i18n = createI18n(i18nConfig)
export function createApp() {
  const app = createSSRApp(App)
  app.use(i18n)
  return {
    app
  }
}
// #endif