Commit d9b29635 by 宋毅

tj

parent 46937536
......@@ -6,14 +6,14 @@ var marked = require("marked");
module.exports = function (app) {
app.get('/doc', function (req, res) {
if (!req.query.key) {
res.send("文件不存在!!!");
return;
}
if (req.query.key != "doc12345789") {
res.send("文件不存在!!!!!!");
return;
}
// if (!req.query.key) {
// res.send("文件不存在!!!");
// return;
// }
// if (req.query.key != "doc12345789") {
// res.send("文件不存在!!!!!!");
// return;
// }
var path = process.cwd() + "/app/front/entry/public/apidoc/README.md";
fs.readFile(path, function (err, data) {
if (err) {
......@@ -43,16 +43,16 @@ module.exports = function (app) {
});
app.get('/doc/api/:forder/:fileName', function (req, res) {
if (req.url != "/doc/api/platform/fgbusinesschance.md") {
if (!req.query.key) {
res.send("文件不存在!!!");
return;
}
if (req.query.key != "doc12345789") {
res.send("文件不存在!!!!!!");
return;
}
}
// if (req.url != "/doc/api/platform/fgbusinesschance.md") {
// if (!req.query.key) {
// res.send("文件不存在!!!");
// return;
// }
// if (req.query.key != "doc12345789") {
// res.send("文件不存在!!!!!!");
// return;
// }
// }
var forder = req.params["forder"];
var fileName = req.params["fileName"] || "README.md";
var path = process.cwd() + "/app/front/entry/public/apidoc";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment