Authored by 张丽霞

帮助中心

... ... @@ -5,11 +5,8 @@
*/
'use strict';
const homeModel = require('../models/index');
const _ = require('lodash');
const helpers = global.yoho.helpers;
const model = require('../models/index');
/**
* 个人中心主页
... ... @@ -25,7 +22,7 @@ const component = {
});
}
model.getUserHomeData(uid).then(data => {
homeModel.getUserHomeData(uid).then(data => {
var result = {
module: 'home',
page: 'index',
... ...
... ... @@ -72,15 +72,12 @@ const helpListDataProc = (helpData) => {
/**
* 帮助中心
* 帮助中心列表页
*
* @param data
*
* @param req
* @param res
* @param next
*/
let home = {
getHelpInfo(data) {
exports.getHelpInfo = (data) => {
var defaultParam = {
method: 'app.help.li'
},
... ... @@ -90,9 +87,14 @@ let home = {
return helpListDataProc(result.data);
});
},
}
getHelpDetail(data) {
/**
* 帮助中心详情页
*
* @param data
*/
exports.getHelpDetail = (data) => {
var defaultParam = {
method: 'app.help.detail',
return_type: 'html'
... ... @@ -100,10 +102,7 @@ let home = {
detailData = Object.assign(defaultParam, data);
return api.get('', detailData).then(result => {
console.log(result);
return result;
});
}
};
}
module.exports = home;
... ...