home.js 331 B

1234567891011121314151617
  1. // 输出一个函数,可以根据请求的参数做对应的响应
  2. module.exports = function (req) {
  3. const param = req.param;
  4. const method = req.method;
  5. return {
  6. statusCode: 200,
  7. body: {
  8. code: 0,
  9. message: "ok",
  10. data: {
  11. text: "abcd",
  12. param,
  13. method,
  14. },
  15. },
  16. };
  17. };