上次我们封装了请求方法 这次我们封装一下接口请求
import {post,put,get } from '/axios';
//如get请求
export const get = (params) => {
return get('请求地址',params)
}
export const post = (params) => {
return post('请求地址',params)
}
上次我们封装了请求方法 这次我们封装一下接口请求
import {post,put,get } from '/axios';
//如get请求
export const get = (params) => {
return get('请求地址',params)
}
export const post = (params) => {
return post('请求地址',params)
}