import Vue from 'vue';
// 设置环境变量
import uni from './utils/uniHooks';
uni.setStorageSync('env', process.env.NODE_ENV);
import App from './App.vue';
import sensors from 'sa-sdk-javascript';
import store from './store/index.js';
import VueRouter from 'vue-router';
import {
  Icon,
  Checkbox,
  CheckboxGroup,
  RadioGroup,
  Radio,
  Field,
  Popup,
  CountDown,
  Switch,
  Skeleton,
} from 'vant';
import router from './routes/index.js';
import wx from '@/utils/js_sdk/weixin';

// import authorize from 'components/authorize/authorize.vue'

import '@/utils/filters';
import './plugins/install';
import request from '@/utils/request.js';
import componentsInstall from './components/install';
// import uni from '@/utils/uniHooks';
// import './styles/quill.snow.css'

// console.log(17, process.env.NODE_ENV)
// console.log('process.env.NODE_ENV', process.env.NODE_ENV)
// Vue.component('authorize', authorize)
// 注册全局组件
// Vue.use(plugins);
Vue.use(componentsInstall);
window.wx = wx;
Vue.prototype.$wx = window.wx;
Vue.prototype.$store = store;
Vue.prototype.$request = request;
Vue.prototype.$sensors = sensors;
//
Vue.config.productionTip = false;
App.mpType = 'app';
Vue.use(VueRouter);
Vue.use(Icon)
  .use(Checkbox)
  .use(CheckboxGroup)
  .use(RadioGroup)
  .use(Radio)
  .use(Field)
  .use(Popup)
  .use(CountDown)
  .use(Skeleton)
  .use(Switch);

Vue.config.ignoredElements = ['wx-open-launch-weapp'];

const app = new Vue({
  store,
  router,
  el: '#app',
  ...App,
});
app.$mount();
