Class WeChatService
java.lang.Object
cn.net.pap.example.wechat.service.WeChatService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncgibin_user_info(String code) 用户基本信息 https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html#UinonIdcgibin_user_info_UnionID(String openid) https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html#UinonIdcgibin_user_info_updateremark(String openid, String remark) https://developers.weixin.qq.com/doc/offiaccount/User_Management/Configuring_user_notes.html获取稳定版接口调用凭据 https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/getStableAccessToken.htmlstatic String向指定 URL 发送GET方法的请求static StringsendPostByHttpClient(String url, String param) sleep()Thread sleephttps://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html#3
-
Constructor Details
-
WeChatService
public WeChatService()
-
-
Method Details
-
getStableAccessToken
获取稳定版接口调用凭据 https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/getStableAccessToken.html- Returns:
-
cgibin_user_info
用户基本信息 https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html#UinonId- Returns:
-
cgibin_user_info_UnionID
https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html#UinonId- Parameters:
openid-- Returns:
-
sns_oauth2_access_token
https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html#3- Parameters:
code-- Returns:
-
cgibin_user_info_updateremark
https://developers.weixin.qq.com/doc/offiaccount/User_Management/Configuring_user_notes.html- Parameters:
openid-remark-- Returns:
-
sleep
Thread sleep- Returns:
-
sendGet
向指定 URL 发送GET方法的请求- Parameters:
url- 发送请求的 URLparam- 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。contentType- 编码类型- Returns:
- 所代表远程资源的响应结果
-
sendPostByHttpClient
-