import service from "./service";
function get(url,params){
const config={
method:'get',
url
}
if(params) config.params=params
return service(config)
}
function post(url,params){
const config={
method:'post',
url
}
if(params){config.data=params}
return service(config)
}
function put(url,params){
const config = {
method: 'put',
url:url
}
if(params) config.params = params
return request(config)
}
export {get,post,put}
我用#CSDN#这个app发现了有技术含量的博客,小伙伴们求同去《vue项目接口封装公共方法使用》, 一起来围观吧 https://blog.csdn.net/SmartJunTao/article/details/125109682?utm_source=app&app_version=5.5.0
错误提示是pagenum 参数错误,粘贴下你传的参数
padenum报错,你就去打印下呀,去看get请求传过来的参数是不是没有。
你看下network请求传的参是不是有问题
async getUserList() {
const { data: res } = await this.$axios.get("users", this.queryInfo);
console.log(res);
}