public class WxOpenComponentServiceImpl extends Object implements WxOpenComponentService
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.slf4j.Logger |
log |
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, 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_TEMPLATE_DRAFT_LIST_URL, GET_TEMPLATE_LIST_URL, MINIAPP_JSCODE_2_SESSION, OAUTH2_ACCESS_TOKEN_URL, OAUTH2_REFRESH_TOKEN_URL| 构造器和说明 |
|---|
WxOpenComponentServiceImpl(WxOpenService wxOpenService) |
public WxOpenComponentServiceImpl(WxOpenService wxOpenService)
public WxMpService getWxMpServiceByAppid(String appId)
getWxMpServiceByAppid 在接口中 WxOpenComponentServicepublic WxOpenMaService getWxMaServiceByAppid(String appId)
WxOpenComponentServicegetWxMaServiceByAppid 在接口中 WxOpenComponentServiceappId - .public WxOpenFastMaService getWxFastMaServiceByAppid(String appId)
WxOpenComponentServicegetWxFastMaServiceByAppid 在接口中 WxOpenComponentServiceappId - .public WxOpenService getWxOpenService()
public WxOpenConfigStorage getWxOpenConfigStorage()
getWxOpenConfigStorage 在接口中 WxOpenComponentServicepublic boolean checkSignature(String timestamp, String nonce, String signature)
checkSignature 在接口中 WxOpenComponentServicepublic String getComponentAccessToken(boolean forceRefresh) throws WxErrorException
getComponentAccessToken 在接口中 WxOpenComponentServiceWxErrorExceptionpublic String post(String uri, String postData) throws WxErrorException
post 在接口中 WxOpenComponentServiceWxErrorExceptionpublic String post(String uri, String postData, String accessTokenKey) throws WxErrorException
post 在接口中 WxOpenComponentServiceWxErrorExceptionpublic String get(String uri) throws WxErrorException
get 在接口中 WxOpenComponentServiceWxErrorExceptionpublic String get(String uri, String accessTokenKey) throws WxErrorException
get 在接口中 WxOpenComponentServiceWxErrorExceptionpublic String getPreAuthUrl(String redirectUri) throws WxErrorException
WxOpenComponentServicegetPreAuthUrl 在接口中 WxOpenComponentServiceWxErrorExceptionpublic String getPreAuthUrl(String redirectURI, String authType, String bizAppid) throws WxErrorException
WxOpenComponentServicegetPreAuthUrl 在接口中 WxOpenComponentServiceauthType - 要授权的帐号类型:1则商户点击链接后,手机端仅展示公众号、2表示仅展示小程序,3表示公众号和小程序都展示。如果为未指定,则默认小程序和公众号都展示。第三方平台开发者可以使用本字段来控制授权的帐号类型。bizAppid - 指定授权唯一的小程序或公众号
注:authType、bizAppid 互斥。WxErrorExceptionpublic 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
route 在接口中 WxOpenComponentServiceWxErrorExceptionpublic WxOpenQueryAuthResult getQueryAuth(String authorizationCode) throws WxErrorException
WxOpenComponentServicegetQueryAuth 在接口中 WxOpenComponentServiceWxErrorExceptionpublic WxOpenAuthorizerInfoResult getAuthorizerInfo(String authorizerAppid) throws WxErrorException
WxOpenComponentServicegetAuthorizerInfo 在接口中 WxOpenComponentServiceWxErrorExceptionpublic WxOpenAuthorizerListResult getAuthorizerList(int begin, int len) throws WxErrorException
WxOpenComponentServicegetAuthorizerList 在接口中 WxOpenComponentServiceWxErrorExceptionpublic WxOpenAuthorizerOptionResult getAuthorizerOption(String authorizerAppid, String optionName) throws WxErrorException
WxOpenComponentServicegetAuthorizerOption 在接口中 WxOpenComponentServiceWxErrorExceptionpublic void setAuthorizerOption(String authorizerAppid, String optionName, String optionValue) throws WxErrorException
WxOpenComponentServicesetAuthorizerOption 在接口中 WxOpenComponentServiceWxErrorExceptionpublic String getAuthorizerAccessToken(String appId, boolean forceRefresh) throws WxErrorException
getAuthorizerAccessToken 在接口中 WxOpenComponentServiceWxErrorExceptionpublic WxMpOAuth2AccessToken oauth2getAccessToken(String appId, String code) throws WxErrorException
oauth2getAccessToken 在接口中 WxOpenComponentServiceWxErrorExceptionpublic boolean checkSignature(String appid, String timestamp, String nonce, String signature)
checkSignature 在接口中 WxOpenComponentServicepublic WxMpOAuth2AccessToken oauth2refreshAccessToken(String appId, String refreshToken) throws WxErrorException
oauth2refreshAccessToken 在接口中 WxOpenComponentServiceWxErrorExceptionpublic String oauth2buildAuthorizationUrl(String appId, String redirectURI, String scope, String state)
public WxMaJscode2SessionResult miniappJscode2Session(String appId, String jsCode) throws WxErrorException
miniappJscode2Session 在接口中 WxOpenComponentServiceWxErrorExceptionpublic 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 - 操作失败时抛出,具体错误码请看此接口的注释文档WxOpenComponentService.getTemplateDraftList()public void deleteTemplate(long templateId)
throws WxErrorException
WxOpenComponentServicedeleteTemplate 在接口中 WxOpenComponentServicetemplateId - 要删除的模版IDWxErrorException - 操作失败时抛出,具体错误码请看此接口的注释文档WxOpenComponentService.getTemplateList()public WxOpenCreateResult createOpenAccount(String appId) throws WxErrorException
WxOpenComponentServicecreateOpenAccount 在接口中 WxOpenComponentServiceappId - 公众号/小程序的appIdWxErrorExceptionpublic 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 © 2019. All rights reserved.