mirror of
https://github.com/alwxkxk/soft-and-hard.git
synced 2025-01-28 06:32:54 +08:00
fix: 修复demo2 仍调用pug 的问题。
This commit is contained in:
parent
175e015a0b
commit
673b1b76d0
@ -29,7 +29,9 @@ router.get('/equipment-list', function(req, res, next) {
|
|||||||
// 显示某设备数据
|
// 显示某设备数据
|
||||||
// GET /equipmentId/123456
|
// GET /equipmentId/123456
|
||||||
router.get('/equipmentId/:id', function(req, res, next) {
|
router.get('/equipmentId/:id', function(req, res, next) {
|
||||||
res.render('index', { title: '智慧宿舍-'+req.params.id });
|
// 默认是使用pug模板的,为了减少不必要的学习与降低入门门槛,改使用html。
|
||||||
|
res.sendFile('index.html',{root:path.join(__dirname , '../views')});
|
||||||
|
// res.render('index', { title: '智慧宿舍-'+req.params.id });
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取某设备的历史数据
|
// 获取某设备的历史数据
|
||||||
|
Loading…
x
Reference in New Issue
Block a user