// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import axios from 'axios'
import MintUI from 'mint-ui'
import store from './store/index.js'
import router from './router'
import ElementUI from 'element-ui'
import Config from './utils/configMes.js'
import system from './utils/system'
import 'element-ui/lib/theme-chalk/index.css'
import 'mint-ui/lib/style.css'
import { InfiniteScroll } from 'mint-ui';
import { Swipe, SwipeItem } from 'mint-ui';

Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);

Vue.use(InfiniteScroll)
Vue.use(ElementUI)
const _ = require('lodash')
const Zepto = require('zepto-browserify')
window.axios = axios
Vue.prototype.axios = axios;
Vue.config.productionTip = false
require('./utils/request.js')
require('./utils/elab.js')

Vue.use(MintUI)
Vue.use(InfiniteScroll)

axios.get(Config.getFactoryServiceUrl('/skyforest-factory/wechat/getShareKey?url=' + encodeURIComponent(location.origin + location.pathname + location.search)))
    .then(res => {
        wx.config({
            debug: Config.weiXinDebug(),
            //debug: true,
            appId: 'wx6ee14efc5d39aa61',
            timestamp: res.data.timestamp,
            nonceStr: res.data.nonceStr,
            signature: res.data.signature,
            jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage','chooseImage','uploadImage','getLocation']
        });
    });

setTimeout(function(){
	wx.ready(function () {
		Config.isWxReady = true;
		// autoPlay();
	});
},500);


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
