Пример #1
0
        public static wxUserGroups get_groups()
        {
            string       url   = "https://api.weixin.qq.com/cgi-bin/groups/get?access_token=" + weixinService.Access_token;
            wxUserGroups group = JSONHelper.JSONToObject <wxUserGroups>(HttpService.Get(url));

            return(group);
        }
        public ActionResult get_groups()
        {
            wxUserGroups mgroup = wxUsersService.get_groups();

            Response.Write("您的公众号共有" + mgroup.groups.Count + "个用户组。具体如下:<br/>");
            for (int i = 0; i < mgroup.groups.Count; i++)
            {
                Response.Write("<br/>id:" + mgroup.groups[i].id);
                Response.Write("<br/>用户组名:" + mgroup.groups[i].name);
                Response.Write("<br/>包含用户数:" + mgroup.groups[i].count);
            }
            return(View());
        }
        // GET: area6/Home
        public ActionResult Index()
        {
            wxUserGroups mgroup = wxUsersService.get_groups();

            return(View(mgroup));
        }