请求封装

42 阅读1分钟

上次我们封装了请求方法 这次我们封装一下接口请求

import {post,put,get } from '/axios';
//如get请求
export const get = (params) => {
    return get('请求地址',params)
}
export const post = (params) => {
    return post('请求地址',params)
}

封装axios请求地址