饭侠三十六main.js
Posted MR崔
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了饭侠三十六main.js相关的知识,希望对你有一定的参考价值。
/**
* Created by wensonsmith on 2017/12/5.
*/
import Vue from ‘vue‘
import axios from ‘axios‘
import Qs from ‘qs‘
import router from ‘./src/router‘
import store from ‘./src/store‘
import App from ‘./app.vue‘
import Icon from ‘vue-svg-icon/Icon.vue‘
import VueAwesomeSwiper from ‘vue-awesome-swiper‘
import ‘swiper/dist/css/swiper.css‘
import { ToastPlugin,WechatPlugin,LoadingPlugin,AlertPlugin } from ‘vux‘
Vue.use(VueAwesomeSwiper)
Vue.use(WechatPlugin)
Vue.use(ToastPlugin)
Vue.use(LoadingPlugin)
Vue.use(AlertPlugin)
let http = axios.create({
timeout: 5000,
responseType: ‘json‘, // default
headers: {
‘Content-Type‘: ‘application/x-www-form-urlencoded;charset=UTF-8‘
},
params:{
openid:_global.openId
},
transformRequest: [(data) => {
return Qs.stringify(data)
}],
withCredentials: false,
});
Vue.component(‘icon‘, Icon)
Vue.prototype.$http = http
new Vue({
el: ‘#app‘,
router,
store,
render: h => h(App)
})
以上是关于饭侠三十六main.js的主要内容,如果未能解决你的问题,请参考以下文章
Vue 教程(三十六)webpack 之代码混淆插件 Uglifyjs