public class WechatProgramUtil extends WechatUtil
log| 构造器和说明 |
|---|
WechatProgramUtil(String key,
org.anyline.entity.DataRow config) |
WechatProgramUtil(WechatProgramConfig config) |
| 限定符和类型 | 方法和说明 |
|---|---|
InputStream |
createQRCode(String path) |
boolean |
createQRCode(String path,
File file) |
InputStream |
createQRCode(String path,
int width)
生成二维码
|
boolean |
createQRCode(String path,
int width,
File file) |
boolean |
createQRCode(String path,
int width,
OutputStream os) |
boolean |
createQRCode(String path,
OutputStream os) |
boolean |
createWXCode(String path,
File file) |
InputStream |
createWXCode(String path,
int width,
boolean autoColor,
String color,
boolean hyaline)
创建二维码
|
boolean |
createWXCode(String path,
int width,
boolean autoColor,
String color,
boolean hyaline,
File file)
创建二维码
|
boolean |
createWXCode(String path,
int width,
boolean autoColor,
String color,
boolean hyaline,
OutputStream os) |
boolean |
createWXCode(String path,
OutputStream os) |
boolean |
createWXCodeUnlimit(String path,
String scene,
File file) |
InputStream |
createWXCodeUnlimit(String path,
String scene,
int width,
boolean autoColor,
String color,
boolean hyaline)
创建二维码
|
boolean |
createWXCodeUnlimit(String path,
String scene,
int width,
boolean autoColor,
String color,
boolean hyaline,
File file)
创建二维码
|
boolean |
createWXCodeUnlimit(String path,
String scene,
int width,
boolean autoColor,
String color,
boolean hyaline,
OutputStream os) |
boolean |
createWXCodeUnlimit(String path,
String scene,
OutputStream os) |
static String |
decrypt(String session,
String vector,
String data)
解密数据
|
String |
getAccessToken() |
WechatProgramConfig |
getConfig() |
static WechatProgramUtil |
getInstance() |
static WechatProgramUtil |
getInstance(String key) |
org.anyline.entity.DataRow |
jscode2session(String code) |
String |
openid(String code) |
static WechatProgramUtil |
reg(String key,
org.anyline.entity.DataRow config) |
String |
sessionKey(String code) |
String |
unionid(String code) |
getAccessToken, getAuthInfo, getPublicKey, getUserInfo, profit, sign, validateSign, validateSignpublic WechatProgramUtil(WechatProgramConfig config)
public WechatProgramUtil(String key, org.anyline.entity.DataRow config)
public static WechatProgramUtil getInstance()
public static WechatProgramUtil reg(String key, org.anyline.entity.DataRow config)
public static WechatProgramUtil getInstance(String key)
public WechatProgramConfig getConfig()
public org.anyline.entity.DataRow jscode2session(String code)
public String getAccessToken()
public InputStream createQRCode(String path, int width) throws Exception
path - pathwidth - widthException - 异常 Exceptionpublic boolean createQRCode(String path, int width, OutputStream os)
public boolean createQRCode(String path, OutputStream os)
public InputStream createQRCode(String path) throws Exception
Exceptionpublic 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 时,生成透明底色的小程序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 - 写入文件public boolean createWXCode(String path, int width, boolean autoColor, String color, boolean hyaline, OutputStream os)
public boolean createWXCode(String path, OutputStream os)
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 时,生成透明底色的小程序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 - 写入文件public boolean createWXCodeUnlimit(String path, String scene, int width, boolean autoColor, String color, boolean hyaline, OutputStream os)
public boolean createWXCodeUnlimit(String path, String scene, OutputStream os)
Copyright © 2024. All rights reserved.