我的活动未在全日历显示。我正在使用nodejs从后端服务器获取事件列表。事件是动态生成的。我可以将事件安排在数组中,但事件未显示在日历上。任何帮助将不胜感激
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
console.log(req.session.userId);
var user = req.session.user,
userId = req.session.userId;
console.log(userId);
//console.log('ddd='+userId);
if (userId == null) {
res.redirect("/login");
return;
}
req.app.get('db').query("SELECT address FROM customer", function(err, rows, fields) {
if (err) throw err
var customer_list= rows;
var address_list = [];
for (var i = 0; i < customer_list.length; i++){
var split = customer_list[i].split(',');
address_list.push(split[0]);
console.log(address_list)
}
res.render('fix_address', {
address_list: address_list,
});
});
});
module.exports = router;
Ps:仅将这段文字显示为cos stackoverflow就是说您的问题仅包含代码。这不相关:P