1 Star 0 Fork 101

soasoft/weixinHttpApi

forked from codeman35/weixinHttpApi 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
MainForm_Robot.cs 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
codeman35 提交于 2016-01-05 19:16 . no commit message
using FluorineFx.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using System.Xml;
namespace WeiXinZhuaFaWang
{
public partial class MainForm : Form
{
/// <summary>
/// 远程调用小I 获取交谈内容
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
private string GetMSG(string msg, string yonghu)
{
try
{
var content = "";
using (WebClient wb = new WebClient())
{
wb.Encoding = Encoding.UTF8;
content = wb.DownloadString("http://www.tuling123.com/openapi/api?userid=" + yonghu + "&key=335d358c3d4e94fd0f8fd3e13dcd81e1&info=" +
msg
);
}
JavaScriptObject obj = JavaScriptConvert.DeserializeObject(content) as JavaScriptObject;
return obj["text"] + "";
}
catch
{
return "回答不了!";
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/soasoft/weixinHttpApi.git
git@gitee.com:soasoft/weixinHttpApi.git
soasoft
weixinHttpApi
weixinHttpApi
master

搜索帮助