com.github.sd4324530.fastweixin.api
类 JsAPI
java.lang.Object
com.github.sd4324530.fastweixin.api.BaseAPI
com.github.sd4324530.fastweixin.api.JsAPI
public class JsAPI
- extends BaseAPI
微信js-sdk相关API
- 作者:
- peiyu
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsAPI
public JsAPI(ApiConfig config)
getSignature
public GetSignatureResponse getSignature(String url)
- 获取js-sdk所需的签名,简化逻辑
不太在意随机数和时间戳的场景,使用更加方便
- 参数:
url - 当前网页的URL,不包含#及其后面部分
- 返回:
- 签名以及相关参数
getSignature
public GetSignatureResponse getSignature(String nonceStr,
long timestame,
String url)
- 获取js-sdk所需的签名,给调用者最大的自由度,控制生成签名的参数
- 参数:
nonceStr - 随机字符串timestame - 时间戳url - 当前网页的URL,不包含#及其后面部分
- 返回:
- 签名以及相关参数
Copyright © 2017. All rights reserved.