UU跑腿标准版

ApiConfig.cs 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Xml;
  7. namespace BaseCallCenter.UUAPI
  8. {
  9. public class ApiConfig
  10. {
  11. static XmlDocument doc = GetConfigInfo();
  12. static XmlNode Root = doc.SelectSingleNode("appSettings");
  13. private static string appid = Root.SelectSingleNode("appid").InnerText; //功能:appid
  14. private static string appsecret = Root.SelectSingleNode("appsecret").InnerText; //功能:appsecret
  15. private static string openid = Root.SelectSingleNode("openid").InnerText; //功能:appsecret
  16. private static string callcenterUrl = Root.SelectSingleNode("callcenterUrl").InnerText; //功能:呼叫中心来电弹屏
  17. /// <summary>
  18. /// appid
  19. /// </summary>
  20. public static string AppID
  21. {
  22. get { return ApiConfig.appid; }
  23. set { ApiConfig.appid = value; }
  24. }
  25. /// <summary>
  26. /// appsecret
  27. /// </summary>
  28. public static string AppSecret
  29. {
  30. get { return ApiConfig.appsecret; }
  31. set { ApiConfig.appsecret = value; }
  32. }
  33. /// <summary>
  34. /// openid
  35. /// </summary>
  36. public static string OpenID
  37. {
  38. get { return ApiConfig.openid; }
  39. set { ApiConfig.openid = value; }
  40. }
  41. /// <summary>
  42. /// 获取呼叫中心来电弹屏路径
  43. /// </summary>
  44. public static string CallcenterUrl
  45. {
  46. get { return ApiConfig.callcenterUrl; }
  47. set { ApiConfig.callcenterUrl = value; }
  48. }
  49. private static XmlDocument GetConfigInfo()
  50. {
  51. XmlDocument doc = new XmlDocument();
  52. doc.Load(AppDomain.CurrentDomain.BaseDirectory + "/config/uupaotui.xml");
  53. return doc;
  54. }
  55. }
  56. }