String accessTokenUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
accessTokenUrl = accessTokenUrl.replace("APPID", Configure.appID);
accessTokenUrl = accessTokenUrl.replace("APPSECRET", Configure.appsecret);
JSONObject jsonObject = NetTools.httpsRequest(accessTokenUrl, "GET", null);
String accessToken = (String) jsonObject.get("access_token");
System.err.println("11----"+accessToken);
//获取jsapi_ticket
String jsapiTicketUrl ="https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi";
jsapiTicketUrl = jsapiTicketUrl.replace("ACCESS_TOKEN", accessToken);
JSONObject jsapiObject = NetTools.httpsRequest(jsapiTicketUrl, "GET", null);
System.out.println("=="+jsapiObject);
String ticket = (String) jsapiObject.get("ticket");
System.err.println("----"+ticket);

05-06 09:07