使用微信助手搭建微信返利机器人流程

作者:指间人生 时间:2022-10-10 08:34:03 

之前做了一个淘宝客返利微信公众号,后来很多人提到过微信返利机器人,现在微信助手开发好了,可以通过微信助手接口功能实现微信返利机器人。

流程如下:


使用微信助手搭建微信返利机器人流程

下面是c#实现返利接口的部分代码:


[HttpPost]
public async Task<ActionResult> FanliAsync(string appkey)
{
 WeixinTBKConfigEntity configEntity = GetConfigEntity(appkey);
 if (configEntity == null)
 {
  LogHelper.WriteLog(typeof(OtherWechatController), "appkey接口验证时,appkey不存在");
  return Content("验证失败。appkey接口验证时,appkey不存在");
 }
 Request.InputStream.Position = 0;
 Stream stream = Request.InputStream;
 string json = string.Empty;
 if (stream.Length != 0)
 {
  StreamReader streamreader = new StreamReader(stream);
  json = streamreader.ReadToEnd();
 }
 WeChatToolMessage responseMsg = new WeChatToolMessage();
 if (string.IsNullOrEmpty(json))
 {
  return Json(responseMsg);
 }
 WeChatToolMessage msg = JsonConvert.DeserializeObject<WeChatToolMessage>(json);
 if (string.IsNullOrEmpty(msg.wxid) || string.IsNullOrEmpty(msg.content))
 {
  return Json(responseMsg);
 }
 string content = msg.content;
 string responseStr = string.Empty;
 if (content.Contains("yangkeduo.com"))
 {
  //访问拼多多接口
  responseStr = await GetPddCouponAsync(configEntity, msg);
 }
 else if (content.Contains("jd.com"))
 {
  if (!string.IsNullOrEmpty(configEntity.JdPID))
  {
   //访问京东联盟接口
   responseStr = GetJdCoupon(configEntity, msg);
  }  
 }
 else
 {
  //访问淘宝联盟接口
  responseStr = GetTBKCouponByPassword(configEntity, msg.content);
 }
 responseMsg.wxid = msg.wxid;
 responseMsg.content = responseStr;
 return Json(responseMsg);
}

发布接口之后将接口地址填入微信助手“自动回复”菜单url输入框中,如下图所示:


使用微信助手搭建微信返利机器人流程

下面就可以开始查券了,是不是很简单。

使用微信助手搭建微信返利机器人流程
使用微信助手搭建微信返利机器人流程

微信助手可以到这里下载:http://blog.yshizi.cn/104.html

需要返利接口请加微信znana2019

总结

以上所述是小编给大家介绍的使用微信助手搭建微信返利机器人流程,网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

来源:https://www.cnblogs.com/gracexu/archive/2019/09/18/11540136.html

标签:微信,机器人,返利
0
投稿

猜你喜欢

  • 详解Python编程中对Monkey Patch猴子补丁开发方式的运用

    2021-04-15 00:17:15
  • Vue冷门技巧递归组件实践示例详解

    2024-05-09 15:13:04
  • Python数据类型转换详解

    2021-03-04 04:11:13
  • python 基于opencv实现图像增强

    2023-03-20 21:04:32
  • 解决flask接口返回的内容中文乱码的问题

    2022-12-17 03:00:37
  • 几个简单的基本的sql语句

    2024-01-20 18:55:58
  • YOLOV5代码详解之损失函数的计算

    2022-06-09 02:01:58
  • ASP 禁用清除页面缓存

    2008-07-21 12:43:00
  • python黑魔法之编码转换

    2022-08-11 10:03:41
  • Python Process多进程实现过程

    2021-04-30 02:21:45
  • pytorch 彩色图像转灰度图像实例

    2023-08-02 17:28:37
  • python输入、数据类型转换及运算符方式

    2021-08-09 19:20:17
  • python登录pop3邮件服务器接收邮件的方法

    2021-09-21 18:05:15
  • 使用PyQt4 设置TextEdit背景的方法

    2021-09-01 14:41:43
  • Python解析多帧dicom数据详解

    2022-08-13 21:16:13
  • 使用Python抓取模板之家的CSS模板

    2022-04-09 18:35:52
  • 教你在pycharm中使用tensorflow的方法

    2021-07-07 19:09:27
  • Python中Pyenv virtualenv插件的使用

    2021-10-25 08:07:19
  • Vue.js实现无限加载与分页功能开发

    2024-05-02 16:41:40
  • 使用Python制作一盏 3D 花灯喜迎元宵佳节

    2021-08-15 06:35:43
  • asp之家 网络编程 m.aspxhome.com