import Vue from 'vue'
import App from './App.vue'
import router from './router';

// import 'animate.css'

import "./assets/css/reset.css";
import "./assets/js/rem.js";
// import "./assets/js/jquery.js";
import './assets/layer_mobile/layer.js';
import './assets/layer_mobile/need/layer.css';

import Vant from 'vant';
import 'vant/lib/index.css';

Vue.use(Vant);
// import Vant from 'vant';
// import 'vant/lib/index.css';
// import { Swipe, SwipeItem } from 'vant';
// Vue.use(Swipe).use(SwipeItem);
// Vue.use(Vant);
import {
  Lazyload
} from 'vant';

// import { Dialog } from 'vant';
// Vue.use(Dialog);


Vue.use(Lazyload, {
  lazyComponent: true,
  loading:'',
  error: 'https://image.360lj.com/nopic.gif', //    错误时的图片    string
});

import $ from 'jquery';
Vue.prototype.$ = $;
window.$ = $;
 
// 接口js
import $http from './api/api';
Vue.prototype.$http = $http;

import  vconsole from 'vconsole';
if(process.env.VUE_APP_Name =='测试环境'){
  var Vconsole = new vconsole;
}

// router.beforeEach((to, from, next) => {
//   // ...
//   // jwt：
//   console.log(to);
//   console.log(from);
//   next();
// })
// 全局过滤器
import filters from "./assets/js/filters.js";
Object.keys(filters.filters).forEach(key => {
    Vue.filter(key, filters.filters[key])
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
