private string WxVoiceAnalytical(WxXmlModel wxXmlModel, string token, string wxToken) { Console.WriteLine("WxVoiceAnalytical_Recognition>>" + wxXmlModel.Recognition); // string url = string.Format(WechatGetMediaUrl, wxToken, wxXmlModel.MediaId); if (string.IsNullOrEmpty(wxXmlModel.Recognition)) { wxXmlModel.Content = "无法识别您说的话哦,请在说一遍"; } else if (wxXmlModel.Recognition.Contains("是什么垃圾")) { string rubbishName = DisposeName(wxXmlModel.Recognition, "是什么垃圾"); wxXmlModel.Content = RubbishDispose(rubbishName); } else if (IsAddRubbishType(wxXmlModel.Recognition)) { wxXmlModel.Content = AddRubbish(wxXmlModel.Recognition); } else { if (!LoveLan.IsWXLoveLan(ref wxXmlModel)) { wxXmlModel.Content = UNIT.GetResponseMessage(wxXmlModel.Recognition, wxXmlModel.FromUserName, token); } } return(WeChatXml.ResponseXML(wxXmlModel)); }
private string WxTextAnalytical(WxXmlModel wxXmlModel, string token) { Console.WriteLine("WxTextAnalytical_Content>>" + wxXmlModel.Content); if (!string.IsNullOrEmpty(wxXmlModel.Content)) { if (!LoveLan.IsWXLoveLan(ref wxXmlModel)) { if (wxXmlModel.Content.Contains("是什么垃圾")) { string rubbishName = DisposeName(wxXmlModel.Content, "是什么垃圾"); wxXmlModel.Content = RubbishDispose(rubbishName); } else if (IsAddRubbishType(wxXmlModel.Content)) { wxXmlModel.Content = AddRubbish(wxXmlModel.Content); } else { wxXmlModel.Content = UNIT.GetResponseMessage(wxXmlModel.Content, wxXmlModel.FromUserName, token); } } } return(WeChatXml.ResponseXML(wxXmlModel)); }