| | |
| | | import { Notification } from 'element-ui'; |
| | | import Fingerprint2 from 'fingerprintjs2'; |
| | | import VueClipboards from 'vue-clipboards'; |
| | | import Contextmenu from "vue-contextmenujs" |
| | | |
| | | |
| | | // 生成唯一ID |
| | |
| | | Vue.use(VueClipboards); |
| | | Vue.prototype.$axios = axios; |
| | | Vue.prototype.$notify = Notification; |
| | | Vue.use(Contextmenu); |
| | | |
| | | axios.defaults.baseURL = (process.env.NODE_ENV === 'development') ? process.env.BASE_API : ""; |
| | | |
| | |
| | | }, function (error) { |
| | | // 对响应错误做点什么 |
| | | if (error.response.status === 401) { |
| | | console.log("Received 401 Response") |
| | | router.push('/login'); |
| | | } |
| | | return Promise.reject(error); |
| | | }); |
| | | |
| | | Vue.prototype.$cookies.config(60*30); |
| | | |
| | | |
| | | new Vue({ |
| | | router: router, |