AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
### showSuccess() <br> 用于返回成功状态下的JSON格式数据,可以传入三个参数 * data 实际的数据体 * msg 状态消息 * code 消息码 * statusCode 状态码 默认: ``` (data = [],msg = 'ok',code = 200,statusCode = 200) ``` 示例: ``` const Controller = require('think-js-lib').Controller class HelloController extends Controller{ sayHello(){ let result = [ { name: '无穷369', title: '全栈工程师', blog: 'https://www.zhangyubk.com' } ] return this.showSuccess(result) } } ``` 返回: ``` { "msg": "ok", "code": 200, "data": [ { "name": "无穷369", "title": "全栈工程师", "blog": "https://www.zhangyubk.com" } ] } ```