Commit c5158c64 by guojuxing

自定义菜单解析URL

parent de99bf69
......@@ -313,8 +313,13 @@ public class AppletWechatMenuApiServiceImpl implements AppletWechatMenuApiServic
button.setUrl("www.baidu.com");
button.setAppid(menu.getMenuUrlPara());
LOGGER.info("小程序类型的menuCode:{}", menu.getMenuCode());
//todo 从menuCode中解析
button.setPagepath("test");
if (StringUtils.isBlank(menu.getMenuCode())) {
button.setPagepath("www.baidu.com");
} else {
JSONObject json = (JSONObject) JSONObject.parse(menu.getMenuCode());
//从menuCode中解析
button.setPagepath(json.getString("url"));
}
default:
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment