public class WxOpenComponentServiceImpl extends Object implements WxOpenComponentService
ADD_TO_TEMPLATE_URL, API_AUTHORIZER_TOKEN_URL, API_COMPONENT_TOKEN_URL, API_CREATE_PREAUTHCODE_URL, API_GET_AUTHORIZER_INFO_URL, API_GET_AUTHORIZER_LIST, API_GET_AUTHORIZER_OPTION_URL, API_QUERY_AUTH_URL, API_SET_AUTHORIZER_OPTION_URL, BIND_OPEN_URL, COMPONENT_LOGIN_PAGE_URL, COMPONENT_MOBILE_LOGIN_PAGE_URL, CONNECT_OAUTH2_AUTHORIZE_URL, CREATE_OPEN_URL, DELETE_TEMPLATE_URL, FAST_REGISTER_WEAPP_SEARCH_URL, FAST_REGISTER_WEAPP_URL, GET_OPEN_URL, GET_TEMPLATE_DRAFT_LIST_URL, GET_TEMPLATE_LIST_URL, MINIAPP_JSCODE_2_SESSION, OAUTH2_ACCESS_TOKEN_URL, OAUTH2_REFRESH_TOKEN_URL, UNBIND_OPEN_URL| 构造器和说明 |
|---|
WxOpenComponentServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addToTemplate(long draftId)
将草稿箱的草稿选为小程序代码模版.
|
Boolean |
bindOpenAccount(String appId,
String openAppid)
https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/bind.html
将公众号/小程序绑定到开放平台帐号下
|
boolean |
checkSignature(String timestamp,
String nonce,
String signature)
Check signature boolean.
|
boolean |
checkSignature(String appid,
String timestamp,
String nonce,
String signature)
Check signature boolean.
|
WxOpenCreateResult |
createOpenAccount(String appId)
https://open.weixin.qq.com/cgi-bin/showdocument?
|
void |
deleteTemplate(long templateId)
删除指定小程序代码模版.
|
WxOpenResult |
fastRegisterWeapp(String name,
String code,
String codeType,
String legalPersonaWechat,
String legalPersonaName,
String componentPhone)
https://open.weixin.qq.com/cgi-bin/showdocument?
|
WxOpenResult |
fastRegisterWeappSearch(String name,
String legalPersonaWechat,
String legalPersonaName)
https://open.weixin.qq.com/cgi-bin/showdocument?
|
String |
get(String uri)
Get string.
|
String |
get(String uri,
String accessTokenKey)
Get string.
|
String |
getAuthorizerAccessToken(String appId,
boolean forceRefresh)
Gets authorizer access token.
|
WxOpenAuthorizerInfoResult |
getAuthorizerInfo(String authorizerAppid)
获取授权方的帐号基本信息.
|
WxOpenAuthorizerListResult |
getAuthorizerList(int begin,
int len)
获取所有授权方列表.
|
WxOpenAuthorizerOptionResult |
getAuthorizerOption(String authorizerAppid,
String optionName)
获取授权方的选项设置信息.
|
String |
getComponentAccessToken(boolean forceRefresh)
Gets component access token.
|
String |
getMobilePreAuthUrl(String redirectUri)
获取预授权链接(手机端预授权).
|
String |
getMobilePreAuthUrl(String redirectUri,
String authType,
String bizAppid)
获取预授权链接(手机端预授权).
|
WxOpenGetResult |
getOpenAccount(String appId)
https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/get.html
获取公众号/小程序所绑定的开放平台帐号
|
String |
getPreAuthUrl(String redirectUri)
获取用户授权页URL(来路URL和成功跳转URL 的域名都需要为三方平台设置的 登录授权的发起页域名).
|
String |
getPreAuthUrl(String redirectUri,
String authType,
String bizAppid)
.
|
WxOpenQueryAuthResult |
getQueryAuth(String authorizationCode)
使用授权码换取公众号或小程序的接口调用凭据和授权信息.
|
List<WxOpenMaCodeTemplate> |
getTemplateDraftList()
获取草稿箱内的所有临时代码草稿.
|
List<WxOpenMaCodeTemplate> |
getTemplateList()
获取代码模版库中的所有小程序代码模版.
|
WxOpenFastMaService |
getWxFastMaServiceByAppid(String appId)
获取指定appid的快速创建的小程序服务.
|
WxOpenMaService |
getWxMaServiceByAppid(String appId)
获取指定appid的开放平台小程序服务(继承一般小程序服务能力).
|
WxMpService |
getWxMpServiceByAppid(String appId)
Gets wx mp service by appid.
|
WxOpenConfigStorage |
getWxOpenConfigStorage()
Gets wx open config storage.
|
WxOpenService |
getWxOpenService() |
WxMaJscode2SessionResult |
miniappJscode2Session(String appId,
String jsCode)
Miniapp jscode 2 session wx ma jscode 2 session result.
|
String |
oauth2buildAuthorizationUrl(String appId,
String redirectURI,
String scope,
String state)
Oauth 2 build authorization url string.
|
WxMpOAuth2AccessToken |
oauth2getAccessToken(String appId,
String code)
Oauth 2 get access token wx mp o auth 2 access token.
|
WxMpOAuth2AccessToken |
oauth2refreshAccessToken(String appId,
String refreshToken)
Oauth 2 refresh access token wx mp o auth 2 access token.
|
String |
post(String uri,
String postData)
Post string.
|
String |
post(String uri,
String postData,
String accessTokenKey)
Post string.
|
String |
route(WxOpenXmlMessage wxMessage)
Route string.
|
void |
setAuthorizerOption(String authorizerAppid,
String optionName,
String optionValue)
设置授权方的选项信息.
|
Boolean |
unbindOpenAccount(String appId,
String openAppid)
https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/unbind.html
将公众号/小程序从开放平台帐号下解绑
|
public WxMpService getWxMpServiceByAppid(String appId)
WxOpenComponentServicegetWxMpServiceByAppid 在接口中 WxOpenComponentServiceappId - the appidpublic WxOpenMaService getWxMaServiceByAppid(String appId)
WxOpenComponentServicegetWxMaServiceByAppid 在接口中 WxOpenComponentServiceappId - .public WxOpenFastMaService getWxFastMaServiceByAppid(String appId)
WxOpenComponentServicegetWxFastMaServiceByAppid 在接口中 WxOpenComponentServiceappId - .public WxOpenService getWxOpenService()
public WxOpenConfigStorage getWxOpenConfigStorage()
WxOpenComponentServicegetWxOpenConfigStorage 在接口中 WxOpenComponentServicepublic boolean checkSignature(String timestamp, String nonce, String signature)
WxOpenComponentServicecheckSignature 在接口中 WxOpenComponentServicetimestamp - the timestampnonce - the noncesignature - the signaturepublic String getComponentAccessToken(boolean forceRefresh) throws WxErrorException
WxOpenComponentServicegetComponentAccessToken 在接口中 WxOpenComponentServiceforceRefresh - the force refreshWxErrorException - the wx error exceptionpublic String post(String uri, String postData) throws WxErrorException
WxOpenComponentServicepost 在接口中 WxOpenComponentServiceuri - the uripostData - the post dataWxErrorException - the wx error exceptionpublic String post(String uri, String postData, String accessTokenKey) throws WxErrorException
WxOpenComponentServicepost 在接口中 WxOpenComponentServiceuri - the uripostData - the post dataaccessTokenKey - the access token keyWxErrorException - the wx error exceptionpublic String get(String uri) throws WxErrorException
WxOpenComponentServiceget 在接口中 WxOpenComponentServiceuri - the uriWxErrorException - the wx error exceptionpublic String get(String uri, String accessTokenKey) throws WxErrorException
WxOpenComponentServiceget 在接口中 WxOpenComponentServiceuri - the uriaccessTokenKey - the access token keyWxErrorException - the wx error exceptionpublic String getPreAuthUrl(String redirectUri) throws WxErrorException
WxOpenComponentServicegetPreAuthUrl 在接口中 WxOpenComponentServiceredirectUri - the redirect uriWxErrorException - the wx error exceptionpublic String getPreAuthUrl(String redirectUri, String authType, String bizAppid) throws WxErrorException
WxOpenComponentServicegetPreAuthUrl 在接口中 WxOpenComponentServiceredirectUri - the redirect uriauthType - 要授权的帐号类型:1则商户点击链接后,手机端仅展示公众号、2表示仅展示小程序,3表示公众号和小程序都展示。如果为未指定,则默认小程序和公众号都展示。第三方平台开发者可以使用本字段来控制授权的帐号类型。bizAppid - 指定授权唯一的小程序或公众号 注:authType、bizAppid 互斥。WxErrorException - the wx error exceptionpublic String getMobilePreAuthUrl(String redirectUri) throws WxErrorException
WxOpenComponentServicegetMobilePreAuthUrl 在接口中 WxOpenComponentServiceredirectUri - .WxErrorException - .public String getMobilePreAuthUrl(String redirectUri, String authType, String bizAppid) throws WxErrorException
WxOpenComponentServicegetMobilePreAuthUrl 在接口中 WxOpenComponentServiceredirectUri - .authType - .bizAppid - .WxErrorException - .public String route(WxOpenXmlMessage wxMessage) throws WxErrorException
WxOpenComponentServiceroute 在接口中 WxOpenComponentServicewxMessage - the wx messageWxErrorException - the wx error exceptionpublic WxOpenQueryAuthResult getQueryAuth(String authorizationCode) throws WxErrorException
WxOpenComponentServicegetQueryAuth 在接口中 WxOpenComponentServiceauthorizationCode - the authorization codeWxErrorException - the wx error exceptionpublic WxOpenAuthorizerInfoResult getAuthorizerInfo(String authorizerAppid) throws WxErrorException
WxOpenComponentServicegetAuthorizerInfo 在接口中 WxOpenComponentServiceauthorizerAppid - the authorizer appidWxErrorException - the wx error exceptionpublic WxOpenAuthorizerListResult getAuthorizerList(int begin, int len) throws WxErrorException
WxOpenComponentServicegetAuthorizerList 在接口中 WxOpenComponentServicebegin - the beginlen - the lenWxErrorException - the wx error exceptionpublic WxOpenAuthorizerOptionResult getAuthorizerOption(String authorizerAppid, String optionName) throws WxErrorException
WxOpenComponentServicegetAuthorizerOption 在接口中 WxOpenComponentServiceauthorizerAppid - the authorizer appidoptionName - the option nameWxErrorException - the wx error exceptionpublic void setAuthorizerOption(String authorizerAppid, String optionName, String optionValue) throws WxErrorException
WxOpenComponentServicesetAuthorizerOption 在接口中 WxOpenComponentServiceauthorizerAppid - the authorizer appidoptionName - the option nameoptionValue - the option valueWxErrorException - the wx error exceptionpublic String getAuthorizerAccessToken(String appId, boolean forceRefresh) throws WxErrorException
WxOpenComponentServicegetAuthorizerAccessToken 在接口中 WxOpenComponentServiceappId - the appidforceRefresh - the force refreshWxErrorException - the wx error exceptionpublic WxMpOAuth2AccessToken oauth2getAccessToken(String appId, String code) throws WxErrorException
WxOpenComponentServiceoauth2getAccessToken 在接口中 WxOpenComponentServiceappId - the appidcode - the codeWxErrorException - the wx error exceptionpublic boolean checkSignature(String appid, String timestamp, String nonce, String signature)
WxOpenComponentServicecheckSignature 在接口中 WxOpenComponentServiceappid - the app idtimestamp - the timestampnonce - the noncesignature - the signaturepublic WxMpOAuth2AccessToken oauth2refreshAccessToken(String appId, String refreshToken) throws WxErrorException
WxOpenComponentServiceoauth2refreshAccessToken 在接口中 WxOpenComponentServiceappId - the appidrefreshToken - the refresh tokenWxErrorException - the wx error exceptionpublic String oauth2buildAuthorizationUrl(String appId, String redirectURI, String scope, String state)
WxOpenComponentServiceoauth2buildAuthorizationUrl 在接口中 WxOpenComponentServiceappId - the appidredirectURI - the redirect uriscope - the scopestate - the statepublic WxMaJscode2SessionResult miniappJscode2Session(String appId, String jsCode) throws WxErrorException
WxOpenComponentServiceminiappJscode2Session 在接口中 WxOpenComponentServiceappId - the app idjsCode - the js codeWxErrorException - the wx error exceptionpublic List<WxOpenMaCodeTemplate> getTemplateDraftList() throws WxErrorException
WxOpenComponentServicegetTemplateDraftList 在接口中 WxOpenComponentServiceWxErrorException - 获取失败时返回,具体错误码请看此接口的注释文档public List<WxOpenMaCodeTemplate> getTemplateList() throws WxErrorException
WxOpenComponentServicegetTemplateList 在接口中 WxOpenComponentServiceWxErrorException - 获取失败时返回,具体错误码请看此接口的注释文档public void addToTemplate(long draftId)
throws WxErrorException
WxOpenComponentServiceaddToTemplate 在接口中 WxOpenComponentServicedraftId - 草稿ID,本字段可通过“获取草稿箱内的所有临时代码草稿”接口获得WxErrorException - 操作失败时抛出,具体错误码请看此接口的注释文档#getTemplateDraftListpublic void deleteTemplate(long templateId)
throws WxErrorException
WxOpenComponentServicedeleteTemplate 在接口中 WxOpenComponentServicetemplateId - 要删除的模版IDWxErrorException - 操作失败时抛出,具体错误码请看此接口的注释文档#getTemplateListpublic WxOpenCreateResult createOpenAccount(String appId) throws WxErrorException
WxOpenComponentServicecreateOpenAccount 在接口中 WxOpenComponentServiceappId - 公众号/小程序的appIdWxErrorException - .public Boolean bindOpenAccount(String appId, String openAppid) throws WxErrorException
WxOpenComponentServicebindOpenAccount 在接口中 WxOpenComponentServiceappId - 公众号/小程序的appIdopenAppid - 开放平台帐号 appid,由创建开发平台帐号接口返回WxErrorException - the wx error exceptionpublic Boolean unbindOpenAccount(String appId, String openAppid) throws WxErrorException
WxOpenComponentServiceunbindOpenAccount 在接口中 WxOpenComponentServiceappId - 公众号/小程序的appIdopenAppid - 开放平台帐号 appid,由创建开发平台帐号接口返回WxErrorException - the wx error exceptionpublic WxOpenGetResult getOpenAccount(String appId) throws WxErrorException
WxOpenComponentServicegetOpenAccount 在接口中 WxOpenComponentServiceappId - 公众号/小程序的appIdWxErrorException - the wx error exceptionpublic WxOpenResult fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone) throws WxErrorException
WxOpenComponentServicefastRegisterWeapp 在接口中 WxOpenComponentServicename - 企业名(需与工商部门登记信息一致)code - 企业代码codeType - 企业代码类型 1:统一社会信用代码(18位) 2:组织机构代码(9位xxxxxxxx-x) 3:营业执照注册号(15位)legalPersonaWechat - 法人微信号legalPersonaName - 法人姓名(绑定银行卡)componentPhone - 第三方联系电话(方便法人与第三方联系)WxErrorException - .public WxOpenResult fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName) throws WxErrorException
WxOpenComponentServicefastRegisterWeappSearch 在接口中 WxOpenComponentServicename - 企业名(需与工商部门登记信息一致)legalPersonaWechat - 法人微信号legalPersonaName - 法人姓名(绑定银行卡)WxErrorException - .Copyright © 2020. All rights reserved.