beelink/src/config/axiosConfig.ts
2020-11-10 09:33:40 +08:00

8 lines
422 B
TypeScript

import { getValue } from '@/utils/common';
import axios from 'axios'
axios.defaults.baseURL = 'https://case.sy-my.net/beelink/public/home/';
axios.defaults.headers.common['Authorization'] = "Bearer " + getValue("token");
axios.defaults.headers.common['Language'] = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
export default axios