接口调整,使用受限制的
This commit is contained in:
parent
082d8830bd
commit
86d09134a6
@ -8,7 +8,7 @@ import java.io.InputStream;
|
||||
import java.util.Date;
|
||||
|
||||
public class WxMpUtil {
|
||||
private static final String GET_WXA_CODE_URL = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=%s";
|
||||
private static final String GET_WXA_CODE_URL = "https://api.weixin.qq.com/wxa/getwxacode?access_token=%s";
|
||||
private static final String GET_URL_LICK_URL = "https://api.weixin.qq.com/wxa/generate_urllink?access_token=%s";
|
||||
private static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";
|
||||
private static String ACCESS_TOKEN = "";
|
||||
@ -31,7 +31,6 @@ public class WxMpUtil {
|
||||
public static void generateWXAQRCode(String appId, String appSecret, String envVersion, String path, String filePath) throws Exception {
|
||||
String url = String.format(GET_WXA_CODE_URL, getAccessToken(appId, appSecret));
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("scene", "wxa_code_generate");
|
||||
json.put("env_version", envVersion);
|
||||
json.put("path", path);
|
||||
json.put("width", 1000);
|
||||
@ -69,6 +68,6 @@ public class WxMpUtil {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
generateWXAQRCode("wxe7ff26af70bfc37c", "5252fbbc68513bc77b7cc0052b9f9695", "trial", "pages/home/index?scenicId=3955650120997015552", "sxlj_t.jpg");
|
||||
generateWXAQRCode("wxe7ff26af70bfc37c", "5252fbbc68513bc77b7cc0052b9f9695", "trial", "pages/home/index?scenicId=3972138108618674176", "ljh_t.jpg");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user