当前位置: 移动技术网 > IT编程>开发语言>C/C++ > 使用微信助手搭建微信返利机器人

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

2019年09月18日  | 移动技术网IT编程  | 我要评论

成都猫咪领养,十二生肖mp4下载,矮人符文石

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

下面是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输入框中,如下图所示:
捕获2.jpg

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

0190917171456.png
20190917171448.png

微信助手可以到这里下载:
需要返利接口请加微信znana2019

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网