antd pro中mock处理带有参数的请求
const getTest = (req, res) =>{
const {groupCategory} = req.query;
// 此处打印的日志在浏览器看不到,并且也并不能在浏览器debuger,为什么呢?善于思考的留言讨论交流
console.log(groupCategory);
if(groupCategory === '1'){
res.json(
{"code":0,"msg":"success","data":[]}
)
}else if(groupCategory === '2'){
res.json(
{"code":0,"msg":"success","data":[]}
)
}else if(groupCategory === '3'){
res.json(
{"code":0,"msg":"success","data":[]}
)
}
};
export default {
'GET /api/getTest': getTest,