好吧,我有我的通用ajax。
export function urlDynamic(obj) {
$.ajax({
url: obj.url,
type: 'post',
data: obj.jade,
dataType: 'JSON'
}).done(function (ajaxReturn) {
console.log(ajaxReturn, obj);
if (ajaxReturn.hasOwnProperty('response')) {
if (ajaxReturn.response.status === 'success') {
console.log(ajaxReturn.response.data);
}
}
});
}
我希望通过ajax请求呈现我的新页面
module.exports = function (app) {
app.post('/montit', function (req, res) { //faz o requerimento da rota "/" através do metodo GET
//console.log('teste rota');
//res.send('GET request to the homepage');
console.log('POSTTTTTT');
app.render('indexMonitoramento', {title: 'Main',
bodyClass: 'telaLogin'
}); //responde, Renderiza o layout da pagina
});
};
我的console.log显示了" POSTTTTT"在控制台中,但他没有渲染我的布局!