zoukankan      html  css  js  c++  java
  • 微信自定义菜单

    微信自定义菜单

    String accessToken = (String) obj1;
            String url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token="+accessToken;
            Map<String, Object> request = new HashMap<String, Object>();
            
            List<Map<String, Object>> buttonList= new ArrayList<Map<String,Object>>();
            Map<String, Object> jichangyouhui = new HashMap<String, Object>();
            jichangyouhui.put("name", "优惠");
            List<Map<String, String>> subButtonList01 = new ArrayList<Map<String,String>>();
            Map<String, String> youhuixinxi = new HashMap<String, String>();
            youhuixinxi.put("type", "view");
            youhuixinxi.put("name", "优惠 ");
            youhuixinxi.put("url", "http://weix ");
            subButtonList01.add(youhuixinxi);
            Map<String, String> danpintuijian = new HashMap<String, String>();
            danpintuijian.put("type", "view");
            danpintuijian.put("name", " 推荐");
            danpintuijian.put("url", "http://weixin ");
            subButtonList01.add(danpintuijian);
            jichangyouhui.put("sub_button", subButtonList01);
            buttonList.add(jichangyouhui); 

    request.put("button", buttonList); @SuppressWarnings("unchecked") Map<String,String> postMap = template.postForObject(url, request, Map.class);
  • 相关阅读:
    uva 10370
    uva 10107
    uva 10038
    uva 488
    伪代码格式
    公众号的秘密,知道一个biz就够了
    ToolTip 概述
    swt
    Java GUI图形界面开发工具
    Java多线程-两个小球
  • 原文地址:https://www.cnblogs.com/stono/p/6597518.html
Copyright © 2011-2022 走看看