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,38 +72,37 @@ const helpListDataProc = (helpData) => {
/**
* 帮助中心
* 帮助中心列表页
*
* @param req
* @param res
* @param next
* @param data
*
*/
exports.getHelpInfo = (data) => {
var defaultParam = {
method: 'app.help.li'
},
infoData = Object.assign(defaultParam, data);
let home = {
getHelpInfo(data) {
var defaultParam = {
method: 'app.help.li'
},
infoData = Object.assign(defaultParam, data);
return api.get('', infoData).then(result => {
return api.get('', infoData).then(result => {
return helpListDataProc(result.data);
});
},
return helpListDataProc(result.data);
});
}
getHelpDetail(data) {
var defaultParam = {
/**
* 帮助中心详情页
*
* @param data
*/
exports.getHelpDetail = (data) => {
var defaultParam = {
method: 'app.help.detail',
return_type: 'html'
},
detailData = Object.assign(defaultParam, data);
return api.get('', detailData).then(result => {
console.log(result);
return result;
});
}
};
}
module.exports = home;
... ...