环境Node 8.0.0koa 2.2.0koa-router 7.1.1const router = require('koa-router')()router.prefix('/logs/mobile')router.get('/:platform', function(cxt, next) { console.log('params', this.params); cxt.body = { error: 'test'}})module.exports = router代码如上所示,然后访问 http://127.0.0.1:9901/logs/mobile/ios 成功获取了body的返回值,但是this.params为undefined
添加回答
举报
0/150
提交
取消