/// <summary> /// 增加分组 /// </summary> /// <param name="group_detail"></param> /// <param name="appId"></param> /// <param name="appSecret"></param> /// <returns></returns> public static AddGroupResult AddGroup(Group group_detail, string appId, string appSecret) { var url = "https://api.weixin.qq.com/merchant/group/add?access_token="; var access_token = WeiXin.GetAccessToken(appId, appSecret); url = url + access_token; var json = Util.HttpPost2(url, Util.ToJson(new { group_detail = group_detail })); return Util.JsonTo<AddGroupResult>(json); }
/// <summary> /// 修改分组属性 /// </summary> /// <param name="group"></param> /// <returns></returns> public static ReturnCode UpdateGroupProperty(Group group) { WeiXin.CheckGlobalCredential(); return UpdateGroupProperty(group, WeiXin.AppID, WeiXin.AppSecret); }
/// <summary> /// 修改分组属性 /// </summary> /// <param name="group"></param> /// <param name="appId"></param> /// <param name="appSecret"></param> /// <returns></returns> public static ReturnCode UpdateGroupProperty(Group group, string appId, string appSecret) { var url = "https://api.weixin.qq.com/merchant/group/propertymod?access_token="; var access_token = WeiXin.GetAccessToken(appId, appSecret); url = url + access_token; var json = Util.HttpPost2(url, Util.ToJson(group)); return Util.JsonTo<ReturnCode>(json); }
/// <summary> /// 增加分组 /// </summary> /// <param name="group_detail"></param> /// <returns></returns> public static AddGroupResult AddGroup(Group group_detail) { WeiXin.CheckGlobalCredential(); return AddGroup(group_detail, WeiXin.AppID, WeiXin.AppSecret); }