cloudRouter.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /**
  2. * Created by MyPC on 2019/11/5.
  3. */
  4. var express = require('express');
  5. var router = express.Router();
  6. var cloudController=require('./controller/cloudEditionController');
  7. /**
  8. * 养护云版
  9. */
  10. router.get('/cloud/curing/edition', function(req, res, next) {
  11. //测试服务器
  12. //global.CLOUDURL= ="https://yhuat.smartcost.com.cn/cld";
  13. //正式服务器
  14. //global.CLOUDURL= ='https://yhyun.smartcost.com.cn/cld';
  15. //本地跑
  16. setCloudUrl("http://qa.smartcost.com.cn:2060/cld");
  17. cloudController.curingEdition(req, res);
  18. });
  19. /**
  20. * 大司空云计价
  21. */
  22. router.get('/cloud/building/edition', function(req, res, next) {
  23. //测试服务器
  24. //global.CLOUDURL= ="https://yhuat.smartcost.com.cn/cld";
  25. //正式服务器
  26. //global.CLOUDURL= ='https://yhyun.smartcost.com.cn/cld';
  27. //本地跑
  28. setCloudUrl("http://qa.smartcost.com.cn:6060/cld");
  29. cloudController.curingEdition(req, res);
  30. });
  31. module.exports = router;
  32. /**
  33. * 设置云版接口地址
  34. */
  35. function setCloudUrl(url){
  36. global.CLOUDURL =url;
  37. }