Kkingnight发布于 13 年前
031570
module.exports = function(app) { try{ app.get('/:path/:id', function (req, res) { res.render(req.params.path+'/'+req.params.id, { id: req.params.id },function(err,html){ if(err) res.send("PageNotFound.html"); }); });
} catch(e){ console.error(e); }
};
各位大牛,请教一下,res.render如果失败,没有那个页面存在,如何跳到其他页面?