Authored by lijing

接口调试

... ... @@ -7,6 +7,7 @@
'use strict';
const headerModel = require('../../../doraemon/models/header'); // 头部model
const chatQaModel = require('../models/chatQa');
exports.qaList = (req, res, next) => {
... ... @@ -23,7 +24,13 @@ exports.qaList = (req, res, next) => {
pageFooter: true
};
res.render('chat/chat-qa', responseData);
chatQaModel.index({
}).then((result) => {
res.render('chat/chat-qa', Object.assign(result, responseData));
}).catch(next);
};
exports.qaSearch = (req, res, next) => {
... ...
/**
* 服务与反馈
* <jing.li@yoho.cn>
* 2016/12/13
*/
'use strict';
const api = global.yoho.API;
const _getCenter = (params) => {
return api.get('', {
method: 'app.help.homeCategoryFaq',
showPlatform: 'yohobuy_pc'
}, {code: 200});
};
const index = () => {
return api.all([
_getCenter()
]).then(result => {
console.log(result[0]);
return result;
});
};
module.exports = {
index
};
... ...