1.优化
This commit is contained in:
parent
d96f6c3db3
commit
64254b03fd
|
@ -51,7 +51,7 @@ namespace ProductClient
|
||||||
//创建配置文件
|
//创建配置文件
|
||||||
Config = this.ReadConfig<Config>();
|
Config = this.ReadConfig<Config>();
|
||||||
|
|
||||||
var thread = TimerTask.NewTimer<MonitorThread>(60) as MonitorThread;
|
//var thread = TimerTask.NewTimer<MonitorThread>(60) as MonitorThread;
|
||||||
|
|
||||||
EventClient.DyyNoticeEvent += EventClient_DyyNoticeEvent;
|
EventClient.DyyNoticeEvent += EventClient_DyyNoticeEvent;
|
||||||
//EventClient_DyyNoticeEvent(null, new DyyNoticeEvent()
|
//EventClient_DyyNoticeEvent(null, new DyyNoticeEvent()
|
||||||
|
@ -86,7 +86,8 @@ namespace ProductClient
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TimerTask.Close<MonitorThread>();
|
EventClient.DyyNoticeEvent -= EventClient_DyyNoticeEvent;
|
||||||
|
//TimerTask.Close<MonitorThread>();
|
||||||
if (mainForm != null)
|
if (mainForm != null)
|
||||||
{
|
{
|
||||||
mainForm.CloseForm();
|
mainForm.CloseForm();
|
||||||
|
@ -99,10 +100,13 @@ namespace ProductClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Dictionary<string, string> CacheDic = new Dictionary<string, string>();
|
||||||
|
|
||||||
private void EventClient_DyyNoticeEvent(object sender, Api.Framework.Events.DyyNoticeEvent e)
|
private void EventClient_DyyNoticeEvent(object sender, Api.Framework.Events.DyyNoticeEvent e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
EventClient.OnEvent(this, $"代运营新动态:{e.Data}");
|
||||||
var json = e.Data;
|
var json = e.Data;
|
||||||
//{"Id":"122522636742819840","TaskId":"122522636742819840","IsGoods":true}
|
//{"Id":"122522636742819840","TaskId":"122522636742819840","IsGoods":true}
|
||||||
|
|
||||||
|
@ -113,6 +117,11 @@ namespace ProductClient
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CacheDic.ContainsKey(taskId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
HttpHelper http = new HttpHelper();
|
HttpHelper http = new HttpHelper();
|
||||||
var html = http
|
var html = http
|
||||||
.GetHtml(
|
.GetHtml(
|
||||||
|
|
Loading…
Reference in New Issue