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

字段摘要
 
从类 com.github.sd4324530.fastweixin.api.BaseAPI 继承的字段
BASE_API_URL, config
 
构造方法摘要
JsAPI(ApiConfig config)
           
 
方法摘要
 GetSignatureResponse getSignature(String url)
          获取js-sdk所需的签名,简化逻辑 不太在意随机数和时间戳的场景,使用更加方便
 GetSignatureResponse getSignature(String nonceStr, long timestame, String url)
          获取js-sdk所需的签名,给调用者最大的自由度,控制生成签名的参数
 
从类 com.github.sd4324530.fastweixin.api.BaseAPI 继承的方法
executeGet, executePost, executePost, isSuccess
 
从类 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.