ajax-wx
v1.0.8
Published
微信请求的封装
Downloads
6
Readme
使用
import ajaxWx from "ajax-wx";
const wxAjax = new ajaxWx ({
baseUrl: "http://127.0.0.1:10086/"
})
//...
export const getOpenId = params => wxAjax.post ("https://www.baidu.com/", params)
//...
// 拦截器
wxAjax.interceptors.request = (req)=>{
return req
}
wxAjax.interceptors.response = (res)=>{
return res
}