-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
519d5a5
commit 5dcd06b
Showing
10 changed files
with
123 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package me.chanjar.weixin.open.api.impl; | ||
|
||
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; | ||
import cn.binarywang.wx.miniapp.config.WxMaConfig; | ||
import me.chanjar.weixin.common.exception.WxErrorException; | ||
import me.chanjar.weixin.mp.api.WxMpConfigStorage; | ||
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; | ||
import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken; | ||
import me.chanjar.weixin.open.api.WxOpenComponentService; | ||
|
||
/** | ||
* @author <a href="https://github.com/007gzs">007</a> | ||
*/ | ||
/* package */ class WxOpenMaServiceImpl extends WxMaServiceImpl { | ||
private WxOpenComponentService wxOpenComponentService; | ||
private WxMaConfig wxMaConfig; | ||
private String appId; | ||
|
||
public WxOpenMaServiceImpl(WxOpenComponentService wxOpenComponentService, String appId, WxMaConfig wxMaConfig) { | ||
this.wxOpenComponentService = wxOpenComponentService; | ||
this.appId = appId; | ||
this.wxMaConfig = wxMaConfig; | ||
initHttp(); | ||
} | ||
|
||
@Override | ||
public WxMaConfig getWxMaConfig() { | ||
return wxMaConfig; | ||
} | ||
|
||
@Override | ||
public String getAccessToken(boolean forceRefresh) throws WxErrorException { | ||
return wxOpenComponentService.getAuthorizerAccessToken(appId, forceRefresh); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/auth/WxOpenMiniProgramInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package me.chanjar.weixin.open.bean.auth; | ||
|
||
import lombok.Data; | ||
import org.apache.commons.lang3.tuple.Pair; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class WxOpenMiniProgramInfo { | ||
private Map<String, List<String>> network; | ||
private List<Pair<String, String>> categories; | ||
private Integer visitStatus; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters