优化单元修改问题

This commit is contained in:
java110 2020-03-23 22:14:27 +08:00
parent 8d253101b2
commit 1e50ad3a17
2 changed files with 7 additions and 3 deletions

7
app.js
View File

@ -24,13 +24,16 @@ let opts = {
proxyReqPathResolver: function(req, res) {
//这个代理会把匹配到的url下面的 /api去掉转发过去直接404这里手动加回来
req.url = req.baseUrl+req.url;
console.log(1,req,res)
//console.log(1,req,res)
return require('url').parse(req.url).path;
},
}
app.use('/callComponent',proxy('http://192.168.0.104:8012',opts));
//app.use('/callComponent',proxy('http://192.168.0.104:8012',opts));
//app.use('/callComponent',proxy('http://hc.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://8012syj.nps.winqi.cn',opts));
//app.listen(3000);
app.use(express.json());
app.use(express.urlencoded({ extended: false }));

View File

@ -21,8 +21,9 @@
if(vc.notNull(_paramFloorId)){
vc.component.unitInfo.conditions.floorId = _paramFloorId;
vc.component.unitInfo.conditions.floorName = _paramFloorName;
vc.component._loadUnits({'floorId':_paramFloorId});
}
vc.component._loadUnits({'floorId':_paramFloorId});
},
_initEvent:function(){
vc.on('unit','chooseFloor',function(_param){