mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-06-28 13:16:19 +08:00
#1021 微信小程序发送统一消息接口时增加特殊方法用于解决变态字段名问题
This commit is contained in:
parent
3f386d0a56
commit
4247eb41cb
@ -104,5 +104,11 @@ public class WxMaUniformMessage implements Serializable {
|
||||
* 加入此字段是基于微信官方接口变化多端的考虑
|
||||
*/
|
||||
private boolean usePath = false;
|
||||
|
||||
/**
|
||||
* 是否使用pagePath,否则使用pagepath.
|
||||
* 加入此字段是基于微信官方接口变化多端的考虑
|
||||
*/
|
||||
private boolean usePagePath = false;
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,8 @@ public class WxMaUniformMessageGsonAdapter implements JsonSerializer<WxMaUniform
|
||||
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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user