This commit is contained in:
老道 2022-12-08 17:16:56 +08:00
parent 54c57a5b05
commit 7bcb42531b
2 changed files with 17 additions and 14 deletions

View File

@ -54,10 +54,10 @@ namespace ProductClient
//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()
//{ {
// Data = "{\"Id\":\"122522636742819840\",\"TaskId\":\"122522636742819840\",\"IsGoods\":true}" Data = "{\"Id\":\"122522636742819840\",\"TaskId\":\"122522636742819840\",\"IsGoods\":true}"
//}); });
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -618,20 +618,23 @@ namespace ProductClient
else else
EventClient.OnEvent(null, $"【代运营朋友圈】 => {item.WeixinHao},转发成功"); EventClient.OnEvent(null, $"【代运营朋友圈】 => {item.WeixinHao},转发成功");
if (!Class1.Config.isPl) //if (!Class1.Config.isPl)
{ //{
var reg = Regex.Match(json.Replace("<![CDATA[", "").Replace("]]>", ""), @"<id>(?<id>\d{15,})</id>");//获取返回的朋友圈id var reg = Regex.Match(json.Replace("<![CDATA[", "").Replace("]]>", ""), @"<id>(?<id>\d{15,})</id>");//获取返回的朋友圈id
if (reg.Success && comments != null && comments.Count > 0) if (reg.Success && comments != null && comments.Count > 0)
{ {
var id = reg.Groups["id"].Value; var id = reg.Groups["id"].Value;
comments.Add(Class1.Config.appendComment); comments.Add(Class1.Config.appendComment);
var commentStr = string.Join("[分段]", comments); var commentStr = string.Join("[分段]", comments);
EventClient.OnEvent(null, $"【代运营朋友圈】 => {item.WeixinHao},评论内容:{commentStr}");
if (!string.IsNullOrWhiteSpace(commentStr)) if (!string.IsNullOrWhiteSpace(commentStr))
{ {
item.SendCircleComment(item.User.Username, id, commentStr.Replace("[活动口令]", Class1.Config.actionLink)); item.SendCircleComment(item.User.Username, id, commentStr.Replace("[活动口令]", Class1.Config.actionLink));
} }
} }
} //}
} }
catch (Exception ex) catch (Exception ex)
{ {