body请求报错

来源:3-3 新增期刊内容02-模型操作

慕虎3340219

2020-08-27 19:15

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回答

  • 沁尘
    2020-08-28 08:48:22

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

0到1快速构建自己的后台管理系统

开源框架LIN-CMS+NodeJS+Vue 快速构建UI好看+功能便捷的后台管理系统

21448 学习 · 145 问题

查看课程

相似问题