...
|
...
|
@@ -13,14 +13,14 @@ const helpModel = require('../models/help'); |
|
|
* @returns {*}
|
|
|
*/
|
|
|
/* const getData = (id)=> {
|
|
|
let contentData = helpModel.contentData().content;
|
|
|
let contentData = helpModel.contentData().content;
|
|
|
|
|
|
for (var i = 0; i < contentData.length; i++) {
|
|
|
if (contentData[i].id === id) {
|
|
|
return contentData[i]
|
|
|
}
|
|
|
}
|
|
|
};*/
|
|
|
for (var i = 0; i < contentData.length; i++) {
|
|
|
if (contentData[i].id === id) {
|
|
|
return contentData[i]
|
|
|
}
|
|
|
}
|
|
|
};*/
|
|
|
|
|
|
/**
|
|
|
* 根据id获取当前所在位置,拼接面包屑
|
...
|
...
|
@@ -57,7 +57,7 @@ const getNav = (id)=> { |
|
|
/**
|
|
|
* 主界面
|
|
|
*/
|
|
|
const index = (req, res) => {
|
|
|
const index = (req, res,next) => {
|
|
|
let id = req.query.id || '11';
|
|
|
|
|
|
helpModel.getHelpDetail('81', 1, 15, '').then(result=> {
|
...
|
...
|
@@ -73,13 +73,15 @@ const index = (req, res) => { |
|
|
}
|
|
|
];
|
|
|
|
|
|
nav = nav.concat(getNav(id));
|
|
|
if (!(typeof (getNav(id)) === "undefined")) {
|
|
|
nav = nav.concat(getNav(id));
|
|
|
}
|
|
|
res.display('detail', {
|
|
|
module: 'help',
|
|
|
page: 'help',
|
|
|
content: Object.assign({nav}, data)
|
|
|
});
|
|
|
});
|
|
|
}).catch(next);
|
|
|
|
|
|
/* let data = Object.assign(getData(id), helpModel.menuData());
|
|
|
let nav = [
|
...
|
...
|
@@ -100,7 +102,6 @@ const index = (req, res) => { |
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
index
|
|
|
}; |
...
|
...
|
|