From de6c266051bd74388e17d56e0aced8e59fd6730b Mon Sep 17 00:00:00 2001 From: ConanYao Date: Wed, 12 Apr 2023 14:02:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=8F=9C=E5=8D=95MenuFull=5FButtonG?= =?UTF-8?q?roup=E6=A8=A1=E5=9E=8B=E7=9A=84=E5=B0=81=E8=A3=85=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E8=B0=83=E6=95=B4=E9=87=8D=E6=9E=84=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E7=9B=B8=E5=85=B3=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommonAPIs/Menu/CommonApi.Menu.Common.cs | 4 ++-- .../CommonAPIs/Menu/CommonApi.Menu.Custom.cs | 2 +- .../Entities/JsonResult/Menu/GetMenuResultFull.cs | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs index 71e71596fe..570dc9e4fb 100644 --- a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs +++ b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs @@ -426,7 +426,7 @@ public static GetMenuResult GetMenuFromJsonResult(GetMenuResultFull resultFull, { //重新整理按钮信息 ButtonGroupBase buttonGroup = buttonGroupBase; // ?? new ButtonGroup(); - var rootButtonList = resultFull.menu.button; + var rootButtonList = resultFull.menu.list.subbutton; GetButtonGroup(rootButtonList, buttonGroup);//设置默认菜单 result = new GetMenuResult(buttonGroupBase) @@ -448,7 +448,7 @@ public static GetMenuResult GetMenuFromJsonResult(GetMenuResultFull resultFull, conditionalButtonGroup.menuid = conditionalMenu.menuid; //fix bug 16030701 end - GetButtonGroup(conditionalMenu.button, conditionalButtonGroup);//设置默认菜单 + GetButtonGroup(conditionalMenu.list.subbutton, conditionalButtonGroup);//设置默认菜单 conditionalMenuList.Add(conditionalButtonGroup); } result.conditionalmenu = conditionalMenuList; diff --git a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs index a05de7ce20..9e31ff9336 100644 --- a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs +++ b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs @@ -241,7 +241,7 @@ public static GetMenuResult GetMenu(string accessTokenOrAppId) var jsonResult = Newtonsoft.Json.JsonConvert.DeserializeObject(jsonString); #endif - if (jsonResult.menu == null || jsonResult.menu.button.Count == 0) + if (jsonResult.menu == null || jsonResult.menu.list == null || jsonResult.menu.list.subbutton.Count == 0) { throw new WeixinMenuException(jsonResult.errmsg); } diff --git a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs index dd0ed9b910..af9d163d45 100644 --- a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs +++ b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs @@ -55,7 +55,13 @@ public class GetMenuResultFull : WxJsonResult public class MenuFull_ButtonGroup { - public List button { get; set; } + public MenuFull_ButtonList list { get; set; } + } + + public class MenuFull_ButtonList + { + public List subbutton { get; set; } + } public class MenuFull_RootButton From 2304f3720eff9e8e033f4c3661df68111129ce6f Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Mon, 17 Apr 2023 01:56:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?MP=20v16.18.10.7=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=8F=9C=E5=8D=95=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20#2814=20#2804=20=E6=84=9F=E8=B0=A2=20@Jane?= =?UTF-8?q?Conan=20@funvh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommonAPIs/Menu/CommonApi.Menu.Common.cs | 3 ++ .../CommonAPIs/Menu/CommonApi.Menu.Custom.cs | 4 ++ .../JsonResult/Menu/GetMenuResultFull.cs | 4 ++ .../Senparc.Weixin.MP.net7.csproj | 45 ++++++++++--------- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs index 570dc9e4fb..aa2f201d07 100644 --- a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs +++ b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs @@ -56,6 +56,9 @@ and limitations under the License. 修改标识:Senparc - 20220511 修改描述:v16.18.2.1 修复二级菜单按钮判断逻辑 + + 修改标识:JaneConan - 20230417 + 修改描述:v16.18.10.7 修复自定义菜单实体问题 ----------------------------------------------------------------*/ diff --git a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs index 9e31ff9336..7bbae86229 100644 --- a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs +++ b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs @@ -44,6 +44,10 @@ and limitations under the License. 修改标识:Senparc - 20180928 修改描述:添加GetCurrentSelfMenuInfo方法 + + 修改标识:JaneConan - 20230417 + 修改描述:v16.18.10.7 修复自定义菜单实体问题 + ----------------------------------------------------------------*/ /* diff --git a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs index af9d163d45..ad90171b01 100644 --- a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs +++ b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs @@ -29,6 +29,10 @@ and limitations under the License. 修改标识:Senparc - 20150303 修改描述:整理接口 + + 修改标识:JaneConan - 20230417 + 修改描述:v16.18.10.7 修复自定义菜单实体问题 + ----------------------------------------------------------------*/ using System.Collections.Generic; diff --git a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.net7.csproj b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.net7.csproj index 63105dfe0c..849979747e 100644 --- a/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.net7.csproj +++ b/src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.net7.csproj @@ -1,7 +1,7 @@ net462;netstandard2.0;netstandard2.1 - 16.18.10.6 + 16.18.10.7 Senparc.Weixin.MP Senparc.Weixin.MP true @@ -501,27 +501,28 @@ v16.10.601 MASSSENDJOBFINISH事件增加 ArticleUrlResult 节点 v16.11.102 修正“将电子发票卡券插入用户卡包”接口 InvoiceApi.InsertCardToBag() 问题 v16.11.201 服务号订阅通知相关接口 & 补充小程序[获取小程序账号的类目]接口 - v16.12.101 修改“addTemplate选用模板”接口 - v16.14.2 - 1、Register 提供对 ApiHandlerWapper 委托的设置方法 - 2、添加用户提交抬头后,商户会收到用户提交的事件(submit_invoice_title) - - v16.15.0 - 1、接入微信支付 V3 - 2、SEnparcWeixinSetting 添加 record 能力 - - v16.15.500 用户信息调整:不再返回用户性别及地区信息 - v16.17.1 完善永久素材上传接口 - v16.17.2 优化永久素材上传接口,提供素材类型枚举:UploadForeverMediaType - v16.17.3 UserApi.Info() 接口返回值,将 headimgurl、nickname 设为过期 - v16.17.8 新增草稿箱和发布能力接口 - v16.18.1 公众号菜单添加 article_id、article_view_limited 类型 - v16.18.2 完善客服接口 - v16.18.4 完善 GetDraftResultJson 字段 - v16.18.5 新增 OpenApi 接口,包括:“查询 openAPI 调用quota”“查询 rid 信息”接口 - v16.18.6 OAuth 的 AccessToken 获取接口添加 is_snapshotuser 返回值 - v16.18.7 OAuthApi.GetAuthorizeUrl() 方法添加 forcePopup 参数 - + v16.12.101 修改“addTemplate选用模板”接口 + v16.14.2 + 1、Register 提供对 ApiHandlerWapper 委托的设置方法 + 2、添加用户提交抬头后,商户会收到用户提交的事件(submit_invoice_title) + + v16.15.0 + 1、接入微信支付 V3 + 2、SEnparcWeixinSetting 添加 record 能力 + + v16.15.500 用户信息调整:不再返回用户性别及地区信息 + v16.17.1 完善永久素材上传接口 + v16.17.2 优化永久素材上传接口,提供素材类型枚举:UploadForeverMediaType + v16.17.3 UserApi.Info() 接口返回值,将 headimgurl、nickname 设为过期 + v16.17.8 新增草稿箱和发布能力接口 + v16.18.1 公众号菜单添加 article_id、article_view_limited 类型 + v16.18.2 完善客服接口 + v16.18.4 完善 GetDraftResultJson 字段 + v16.18.5 新增 OpenApi 接口,包括:“查询 openAPI 调用quota”“查询 rid 信息”接口 + v16.18.6 OAuth 的 AccessToken 获取接口添加 is_snapshotuser 返回值 + v16.18.7 OAuthApi.GetAuthorizeUrl() 方法添加 forcePopup 参数 + v16.18.10.7 修复自定义菜单实体问题 + https://github.com/JeffreySu/WeiXinMPSDK