Skip to content

Commit 4740f1f

Browse files
committed
issue #91
1 parent 5b49c63 commit 4740f1f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package me.chanjar.weixin.cp.api;
22

3+
import me.chanjar.weixin.common.bean.WxJsapiSignature;
34
import me.chanjar.weixin.common.bean.WxMenu;
45
import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
56
import me.chanjar.weixin.common.exception.WxErrorException;
@@ -67,6 +68,38 @@ public interface WxCpService {
6768
*/
6869
String getAccessToken(boolean forceRefresh) throws WxErrorException;
6970

71+
/**
72+
* 获得jsapi_ticket,不强制刷新jsapi_ticket
73+
* @see #getJsapiTicket(boolean)
74+
* @return
75+
* @throws WxErrorException
76+
*/
77+
public String getJsapiTicket() throws WxErrorException;
78+
79+
/**
80+
* <pre>
81+
* 获得jsapi_ticket
82+
* 获得时会检查jsapiToken是否过期,如果过期了,那么就刷新一下,否则就什么都不干
83+
*
84+
* 详情请见:http://qydev.weixin.qq.com/wiki/index.php?title=微信JS接口#.E9.99.84.E5.BD.951-JS-SDK.E4.BD.BF.E7.94.A8.E6.9D.83.E9.99.90.E7.AD.BE.E5.90.8D.E7.AE.97.E6.B3.95
85+
* </pre>
86+
* @param forceRefresh 强制刷新
87+
* @return
88+
* @throws WxErrorException
89+
*/
90+
public String getJsapiTicket(boolean forceRefresh) throws WxErrorException;
91+
92+
/**
93+
* <pre>
94+
* 创建调用jsapi时所需要的签名
95+
*
96+
* 详情请见:http://qydev.weixin.qq.com/wiki/index.php?title=微信JS接口#.E9.99.84.E5.BD.951-JS-SDK.E4.BD.BF.E7.94.A8.E6.9D.83.E9.99.90.E7.AD.BE.E5.90.8D.E7.AE.97.E6.B3.95
97+
* </pre>
98+
* @param url url
99+
* @return
100+
*/
101+
public WxJsapiSignature createJsapiSignature(String url) throws WxErrorException;
102+
70103
/**
71104
* <pre>
72105
* 上传多媒体文件

0 commit comments

Comments
 (0)