资源简介
微信公众号自定义菜单
代码片段和文件信息
/**
* Description: 多森56gate物流平台
* 文件名:JSONBean.java
* 版本信息:1.0
* 日期:2013-10-23
* Copyright 深圳市多森软件开发有限公司 Copyright (c) 2013
* 版权所有
*/
package com.duosen.dsocs.wechat.action;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import org.json.JSONException;
import com.duosen.dsocs.wechat.domain.EventJSONBean;
import com.duosen.dsocs.wechat.domain.JSONBean;
import com.duosen.dsocs.wechat.utils.WeixinUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONobject;
/**
* @项目名称:56gateServer
* @类名称:JSONBean
* @类描述:
* @创建人:zxt
* @创建时间:2013-10-23 下午02:14:54
* @修改人:zxt
* @修改时间:2013-10-23 下午02:14:54
* @修改备注:
* @version 1.0
*/
@SuppressWarnings(“unused“)
public class Wxmenu {
private static String access_token = ““;
private static List list = new ArrayList();
private static JSONobject menu= new JSONobject();
private static String params;
private static String msg;
//构造菜单
static{
List oneMenu = new ArrayList();
oneMenu.add(new JSONBean(“立即打车“ “view“ “https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7100db9d200ff070&redirect_uri=http://taxiocs.21letu.com/wechat/jsp/call.jsp?type=1&response_type=code&scope=snsapi_base#wechat_redirect“));
JSONobject oneJSONobject = new JSONobject();
oneJSONobject.put(“name“ “打车“);
oneJSONobject.put(“sub_button“ oneMenu);
list.add(oneJSONobject);
List twoMenu = new ArrayList();
twoMenu.add(new JSONBean(“用车记录“ “view“ “https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7100db9d200ff070&redirect_uri=http://taxiocs.21letu.com/wechatapi/getOrderList.action?orderInfo.pay=0&response_type=code&scope=snsapi_base#wechat_redirect“));
JSONobject twoJSONobject = new JSONobject();
twoJSONobject.put(“name“ “我的乐嘀“);
twoJSONobject.put(“sub_button“ twoMenu);
list.add(twoJSONobject);
List threeMenu = new ArrayList();
threeMenu.add(new JSONBean(“乐嘀APP下载“ “view“ “http://taxiocs.21letu.com/appdownload.jsp“));
JSONobject threeJSONobject = new JSONobject();
threeJSONobject.put(“name“ “乐嘀服务“);
threeJSONobject.put(“sub_button“ threeMenu);
list.add(threeJSONobject);
menu.put(“button“ list);
params = menu.toString();
System.out.println(“static“+menu);
}
private static class TrustAnyTrustManager implements X509TrustManager {
public void checkClientTrusted(X509Certificate[] chain String authType) throws Certif
评论
共有 条评论