Skip to content

Commit

Permalink
Wechat-Group#1021 微信小程序发送统一消息接口时增加特殊方法用于解决变态字段名问题
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywang committed May 12, 2019
1 parent 3f386d0 commit 4247eb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,11 @@ public static class MiniProgram implements Serializable {
* 加入此字段是基于微信官方接口变化多端的考虑
*/
private boolean usePath = false;

/**
* 是否使用pagePath,否则使用pagepath.
* 加入此字段是基于微信官方接口变化多端的考虑
*/
private boolean usePagePath = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public JsonElement serialize(WxMaUniformMessage message, Type typeOfSrc, JsonSer
miniProgramJson.addProperty("appid", miniProgram.getAppid());
if (miniProgram.isUsePath()) {
miniProgramJson.addProperty("path", miniProgram.getPagePath());
} else if (miniProgram.isUsePagePath()) {
miniProgramJson.addProperty("pagePath", miniProgram.getPagePath());
} else {
miniProgramJson.addProperty("pagepath", miniProgram.getPagePath());
}
Expand Down

0 comments on commit 4247eb4

Please sign in to comment.