public static int shijian = 0;
public static Boolean l = true;
public static string access = "";
public static string ticket = "";
public static int shijian1 = 0;
public static string acess()
{
string Appid = “********”;
string Appsecret = "你创建应用的secret值";
// string access = "";
if (shijian > 7099 || shijian==0)
{
string str = Class1.GetMessage("https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + Appid + "&corpsecret=" + Appsecret + "");
access = str.Split(new char[] { '{', '}', ':', '"' }, StringSplitOptions.RemoveEmptyEntries)[6];
decimal i = 0m;
System.Timers.Timer timer = new System.Timers.Timer(7100);
timer.Elapsed += (sender, e) =>
{
//Console.WriteLine(string.Format("这是第{0}次调用", i));
i++;
shijian++;
};
timer.Start();
l = false;
}
return access;
}
public static Boolean l = true;
public static string access = "";
public static string ticket = "";
public static int shijian1 = 0;
public static string acess()
{
string Appid = “********”;
string Appsecret = "你创建应用的secret值";
// string access = "";
if (shijian > 7099 || shijian==0)
{
string str = Class1.GetMessage("https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + Appid + "&corpsecret=" + Appsecret + "");
access = str.Split(new char[] { '{', '}', ':', '"' }, StringSplitOptions.RemoveEmptyEntries)[6];
decimal i = 0m;
System.Timers.Timer timer = new System.Timers.Timer(7100);
timer.Elapsed += (sender, e) =>
{
//Console.WriteLine(string.Format("这是第{0}次调用", i));
i++;
shijian++;
};
timer.Start();
l = false;
}
return access;
}