| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Xml;
- namespace BaseCallCenter.UUAPI
- {
- public class ApiConfig
- {
- static XmlDocument doc = GetConfigInfo();
- static XmlNode Root = doc.SelectSingleNode("appSettings");
- private static string appid = Root.SelectSingleNode("appid").InnerText; //功能:appid
- private static string appsecret = Root.SelectSingleNode("appsecret").InnerText; //功能:appsecret
- private static string openid = Root.SelectSingleNode("openid").InnerText; //功能:appsecret
- private static string callcenterUrl = Root.SelectSingleNode("callcenterUrl").InnerText; //功能:呼叫中心来电弹屏
- /// <summary>
- /// appid
- /// </summary>
- public static string AppID
- {
- get { return ApiConfig.appid; }
- set { ApiConfig.appid = value; }
- }
- /// <summary>
- /// appsecret
- /// </summary>
- public static string AppSecret
- {
- get { return ApiConfig.appsecret; }
- set { ApiConfig.appsecret = value; }
- }
- /// <summary>
- /// openid
- /// </summary>
- public static string OpenID
- {
- get { return ApiConfig.openid; }
- set { ApiConfig.openid = value; }
- }
- /// <summary>
- /// 获取呼叫中心来电弹屏路径
- /// </summary>
- public static string CallcenterUrl
- {
- get { return ApiConfig.callcenterUrl; }
- set { ApiConfig.callcenterUrl = value; }
- }
- private static XmlDocument GetConfigInfo()
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(AppDomain.CurrentDomain.BaseDirectory + "/config/uupaotui.xml");
- return doc;
- }
- }
- }
|