|
@@ -0,0 +1,38 @@
|
|
|
+
|
|
|
+import Vue from 'vue'
|
|
|
+import App from './App.vue'
|
|
|
+import ElementUI from 'element-ui'
|
|
|
+import 'element-ui/lib/theme-chalk/index.css'
|
|
|
+import router from './router'
|
|
|
+import {parseTime} from './parseTime'
|
|
|
+import axios from 'axios'
|
|
|
+import Cookies from 'js-cookie'
|
|
|
+import '@/icons'
|
|
|
+
|
|
|
+import Tinymce from '@/components/tinymce/index.vue'
|
|
|
+
|
|
|
+Vue.component('tinymce', Tinymce)
|
|
|
+
|
|
|
+
|
|
|
+Vue.config.productionTip = false
|
|
|
+
|
|
|
+const service = axios.create({
|
|
|
+})
|
|
|
+
|
|
|
+service.interceptors.request.use(config => {
|
|
|
+ config.headers['Authorization'] = localStorage.getItem("Authorization") // 让每个请求携带自定义token 请根据实际情况自行修改
|
|
|
+ return config
|
|
|
+}, error => {
|
|
|
+ console.log(error)
|
|
|
+ Promise.reject(error)
|
|
|
+})
|
|
|
+
|
|
|
+Vue.prototype.Axios = service
|
|
|
+Vue.prototype.parseTime = parseTime
|
|
|
+
|
|
|
+Vue.use(ElementUI)
|
|
|
+
|
|
|
+new Vue({
|
|
|
+ render: h => h(App),
|
|
|
+ router
|
|
|
+}).$mount('#app')
|