终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

66 lines
1.6 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Configuration;
  7. using System.IO;
  8. using Microsoft.Extensions.Configuration;
  9. using System.Threading;
  10. using BPASmartClient.Helper;
  11. using BPASmartClient.Message;
  12. using BPA.ApolloClient;
  13. using BPA.ApolloClient.Options;
  14. using Com.Ctrip.Framework.Apollo;
  15. namespace BPASmartClient.Business
  16. {
  17. /// <summary>
  18. /// 网络信息数据
  19. /// </summary>
  20. public class InternetInfo
  21. {
  22. /// <summary>
  23. /// 配置初始化
  24. /// </summary>
  25. public static void InitConfig()
  26. {
  27. NetworkConnectState = UniversalHelper.GetInstance().GetNetworkState();
  28. while (!NetworkConnectState)
  29. {
  30. NetworkConnectState = UniversalHelper.GetInstance().GetNetworkState();
  31. Thread.Sleep(2000);
  32. }
  33. }
  34. /// <summary>
  35. /// 网络连接状态
  36. /// </summary>
  37. public static bool NetworkConnectState { get; set; }
  38. #region API地址
  39. /// <summary>
  40. /// Api 网关地址
  41. /// </summary>
  42. public static string ApiAddress { get; set; }
  43. /// <summary>
  44. /// 订单服务
  45. /// </summary>
  46. public static string OrderServer { get; set; }
  47. /// <summary>
  48. /// 库存服务
  49. /// </summary>
  50. public static string StockServer { get; set; }
  51. /// <summary>
  52. /// 是否启用测试模式
  53. /// </summary>
  54. public static bool IsEnableTest { get; set; }
  55. #endregion
  56. }
  57. }