You've already forked FrameTour-BE
景区二维码下载
This commit is contained in:
@ -34,12 +34,12 @@ public class WxMpUtil {
|
||||
return ACCESS_TOKEN;
|
||||
}
|
||||
|
||||
public static void generateWXAQRCode(String appId, String appSecret, String path, String filePath) throws Exception {
|
||||
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));
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("env_version", "trial");
|
||||
json.put("env_version", envVersion);
|
||||
json.put("path", path);
|
||||
json.put("width", 1000);
|
||||
StringEntity entity = new StringEntity(json.toJSONString(), "utf-8");
|
||||
@ -58,6 +58,6 @@ public class WxMpUtil {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
generateWXAQRCode("wxe7ff26af70bfc37c", "5252fbbc68513bc77b7cc0052b9f9695", "pages/home/index?scenicId=3946669713328836608", "cxzh_t.jpg");
|
||||
// generateWXAQRCode("wxe7ff26af70bfc37c", "5252fbbc68513bc77b7cc0052b9f9695", "pages/home/index?scenicId=3946669713328836608", "cxzh_t.jpg");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user