service/axios.js

import Qs from 'qs'
import axios from 'axios'


let Http = axios.create({
    timeout: 5000,
    baseURL: 'http://erp.mckintey.com/',
    responseType: 'json', // default
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    transformRequest: [(data) => {
        return Qs.stringify(data)
    }],
    params: {
        openid:_global.openId
    },
    withCredentials: false,
})


export default Http

 

posted @ 2018-04-26 15:31  MR崔  阅读(319)  评论(0编辑  收藏  举报