类 WechatProgramUtil
java.lang.Object
org.anyline.wechat.util.WechatUtil
org.anyline.wechat.program.WechatProgramUtil
-
字段概要
从类继承的字段 org.anyline.wechat.util.WechatUtil
log -
构造器概要
构造器构造器说明WechatProgramUtil(String key, org.anyline.entity.DataRow config) WechatProgramUtil(WechatProgramConfig config) -
方法概要
修饰符和类型方法说明createQRCode(String path) createQRCode(String path, int width) 生成二维码booleancreateQRCode(String path, int width, File file) booleancreateQRCode(String path, int width, OutputStream os) booleancreateQRCode(String path, File file) booleancreateQRCode(String path, OutputStream os) createWXCode(String path, int width, boolean autoColor, String color, boolean hyaline) 创建二维码booleancreateWXCode(String path, int width, boolean autoColor, String color, boolean hyaline, File file) 创建二维码booleancreateWXCode(String path, int width, boolean autoColor, String color, boolean hyaline, OutputStream os) booleancreateWXCode(String path, File file) booleancreateWXCode(String path, OutputStream os) createWXCodeUnlimit(String path, String scene, int width, boolean autoColor, String color, boolean hyaline) 创建二维码booleancreateWXCodeUnlimit(String path, String scene, int width, boolean autoColor, String color, boolean hyaline, File file) 创建二维码booleancreateWXCodeUnlimit(String path, String scene, int width, boolean autoColor, String color, boolean hyaline, OutputStream os) booleancreateWXCodeUnlimit(String path, String scene, File file) booleancreateWXCodeUnlimit(String path, String scene, OutputStream os) static String解密数据static WechatProgramUtilstatic WechatProgramUtilgetInstance(String key) org.anyline.entity.DataRowjscode2session(String code) static WechatProgramUtilsessionKey(String code) 从类继承的方法 org.anyline.wechat.util.WechatUtil
getAccessToken, getAuthInfo, getPublicKey, getUserInfo, profit, sign, validateSign, validateSign
-
构造器详细资料
-
WechatProgramUtil
-
WechatProgramUtil
-
-
方法详细资料
-
getInstance
-
reg
-
getInstance
-
getConfig
-
sessionKey
-
openid
-
unionid
-
jscode2session
-
getAccessToken
-
createQRCode
生成二维码- 参数:
path- pathwidth- width- 返回:
- InputStream
- 抛出:
Exception- 异常 Exception
-
createQRCode
-
createQRCode
-
createQRCode
-
createQRCode
-
createQRCode
- 抛出:
Exception
-
createWXCode
public InputStream createWXCode(String path, int width, boolean autoColor, String color, boolean hyaline) 创建二维码- 参数:
path- pathwidth- 宽度自动写0autoColor- 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 falsecolor- auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示hyaline- 是否需要透明底色,为 true 时,生成透明底色的小程序- 返回:
- InputStream
-
createWXCode
public boolean createWXCode(String path, int width, boolean autoColor, String color, boolean hyaline, File file) 创建二维码- 参数:
path- pathwidth- 宽度自动写0autoColor- 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 falsecolor- auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示hyaline- 是否需要透明底色,为 true 时,生成透明底色的小程序file- 写入文件- 返回:
- boolean
-
createWXCode
public boolean createWXCode(String path, int width, boolean autoColor, String color, boolean hyaline, OutputStream os) -
createWXCode
-
createWXCode
-
createWXCodeUnlimit
public InputStream createWXCodeUnlimit(String path, String scene, int width, boolean autoColor, String color, boolean hyaline) 创建二维码- 参数:
path- pathscene- scene 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符,其它字符请自行编码为合法字符(因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式)width- 宽度自动写0autoColor- 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 falsecolor- auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示hyaline- 是否需要透明底色,为 true 时,生成透明底色的小程序- 返回:
- InputStream
-
createWXCodeUnlimit
public boolean createWXCodeUnlimit(String path, String scene, int width, boolean autoColor, String color, boolean hyaline, File file) 创建二维码- 参数:
path- pathscene- scene 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符,其它字符请自行编码为合法字符(因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式)width- 宽度自动写0autoColor- 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 falsecolor- auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示hyaline- 是否需要透明底色,为 true 时,生成透明底色的小程序file- 写入文件- 返回:
- boolean
-
createWXCodeUnlimit
public boolean createWXCodeUnlimit(String path, String scene, int width, boolean autoColor, String color, boolean hyaline, OutputStream os) -
createWXCodeUnlimit
-
createWXCodeUnlimit
-
decrypt
解密数据- 参数:
session- 会话keyvector- 加密初始向理data- 加密数据- 返回:
- String
-