为了账号安全,请及时绑定邮箱和手机立即绑定

body请求报错

2020-08-27 19:07:22,648 DEBUG 9108  --- [ZB-PF0WF9EJ] - [POST] -> [/v1/content] from: ::1 costs: 0ms data:{

    "param": {},

    "body": {

        "type": "100",

        "image": "https://baidu.com",

        "title": "《七月与安生》",

        "content": "七月与安生的故事",

        "pubdate": "2020-05-20",

        "status": "1"

    }

}

2020-08-27 19:07:22,654 ERROR 9108  --- [ZB-PF0WF9EJ] - nodejs.TypeError: validator_1.default[this.validateFunction] is not a function

    at Rule.validate (F:\Vue\test\imooc\lin-cms-koa\node_modules\lin-mizar\lin\validator\lin-validator.js:338:70)

    at AddContentValidator.checkRules (F:\Vue\test\imooc\lin-cms-koa\node_modules\lin-mizar\lin\validator\lin-validator.js:165:46)

    at AddContentValidator.validate (F:\Vue\test\imooc\lin-cms-koa\node_modules\lin-mizar\lin\validator\lin-validator.js:43:26)

    at F:\Vue\test\imooc\lin-cms-koa\app\api\v1\/content.js:11:47

    at dispatch (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:44:32)

    at next (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:45:18)

    at F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\lib\router.js:346:16

    at dispatch (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:44:32)

    at next (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:45:18)

    at allowedMethods (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\lib\router.js:407:12)

    at dispatch (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:44:32)

    at next (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:45:18)

    at F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\lib\router.js:346:16

    at dispatch (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:44:32)

    at next (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:45:18)

    at allowedMethods (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\lib\router.js:407:12)

    at dispatch (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:44:32)

    at next (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:45:18)

    at F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\lib\router.js:346:16

    at dispatch (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:44:32)

    at next (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\node_modules\koa-compose\index.js:45:18)

    at allowedMethods (F:\Vue\test\imooc\lin-cms-koa\node_modules\koa-router\lib\router.js:407:12)


正在回答

1 回答

代码写错了或者写漏了,核对下视频内容

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

body请求报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信