提交 6782a3b2 编写于 作者: chenzhehao's avatar chenzhehao

菜单修改

上级 b39c2b55
......@@ -23,8 +23,8 @@ public class MenuManagerServiceImpl {
private static Logger log = LoggerFactory.getLogger(MenuManagerServiceImpl.class);
public static void main(String[] args) throws IOException {
CloudPropertiesUtil.read("dev");
// CloudPropertiesUtil.read("pro");
// CloudPropertiesUtil.read("dev");
CloudPropertiesUtil.read("pro");
AccessToken accessToken = WeChatToolUtil.getAccessToken(CloudPropertiesUtil.getValue("AppID"), CloudPropertiesUtil.getValue("AppSecret"));
Boolean flag = WeChatToolUtil.createMenu(getMenu(), accessToken.getAccess_token());
if (flag) {
......@@ -41,36 +41,51 @@ public class MenuManagerServiceImpl {
* @return
*/
private static Menu getMenu() throws UnsupportedEncodingException {
//test1
String btn11Url = "https://test1-yunqueyilian.yunqueyi.com/message";
String btn21Url = "http://mp.weixin.qq.com/mp/homepage?__biz=MzIzNjM5NDA1OQ==&hid=2&sn=f52aa8659aa75f32aae5ea62d23e64ca&scene=18#wechat_redirect";
String btn31Url = "https://test1-yunqueyilian.yunqueyi.com/goBind";
String btn32Url = "https://test1-yunqueyilian.yunqueyi.com/applyIndex";
String btn33Url = "https://test1-yunqueyilian.yunqueyi.com/followUp";
//pro
// String btn11Url = "https://yunqueyilian.yunqueyi.com/message";
// String btn21Url = "http://mp.weixin.qq.com/mp/homepage?__biz=MzIzNjM5NDA1OQ==&hid=2&sn=f52aa8659aa75f32aae5ea62d23e64ca&scene=18#wechat_redirect";
// String btn31Url = "https://yunqueyilian.yunqueyi.com/goBind";
// String btn32Url = "https://yunqueyilian.yunqueyi.com/applyIndex";
// String btn33Url = "https://yunqueyilian.yunqueyi.com/followUp";
String utl_end = "&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect";
CommonButton btn11 = new CommonButton();
btn11.setName("消息");
btn11.setType("view");
String url11 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WeChatConstants.APP_ID + "&redirect_uri=" + URLEncoder.encode("https://test1-yunqueyilian.yunqueyi.com/index.html#/message", "UTF-8");
String url11 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WeChatConstants.APP_ID + "&redirect_uri=" + URLEncoder.encode(btn11Url, "UTF-8");
btn11.setUrl(url11 + utl_end);
CommonButton btn21 = new CommonButton();
btn21.setName("健康漫画");
btn21.setType("view");
String h_knowledge_redirect_uri = "http://mp.weixin.qq.com/mp/homepage?__biz=MzIzNjM5NDA1OQ==&hid=2&sn=f52aa8659aa75f32aae5ea62d23e64ca&scene=18#wechat_redirect";
String h_knowledge_redirect_uri = btn21Url;
btn21.setUrl(h_knowledge_redirect_uri);
CommonButton btn31 = new CommonButton();
btn31.setName("个人信息");
btn31.setType("view");
String url31 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WeChatConstants.APP_ID + "&redirect_uri=" + URLEncoder.encode("https://test1-yunqueyilian.yunqueyi.com/goBind", "UTF-8");
String url31 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WeChatConstants.APP_ID + "&redirect_uri=" + URLEncoder.encode(btn31Url, "UTF-8");
btn31.setUrl(url31 + utl_end);
CommonButton btn32 = new CommonButton();
btn32.setName("门诊预约");
btn32.setType("view");
String url32 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WeChatConstants.APP_ID + "&redirect_uri=" + URLEncoder.encode("https://test1-yunqueyilian.yunqueyi.com/applyIndex", "UTF-8");
String url32 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WeChatConstants.APP_ID + "&redirect_uri=" + URLEncoder.encode(btn32Url, "UTF-8");
btn32.setUrl(url32 + utl_end);
CommonButton btn33 = new CommonButton();
btn33.setName("随访记录");
btn33.setType("view");
String url33 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WeChatConstants.APP_ID + "&redirect_uri=" + URLEncoder.encode("https://test1-yunqueyilian.yunqueyi.com/followUp", "UTF-8");
String url33 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + WeChatConstants.APP_ID + "&redirect_uri=" + URLEncoder.encode(btn33Url, "UTF-8");
btn33.setUrl(url33 + utl_end);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册