|
|
@ -64,6 +64,7 @@ public class WxXcxUtil { |
|
|
public static class WechatCode{ |
|
|
public static class WechatCode{ |
|
|
public String scene; |
|
|
public String scene; |
|
|
public String page; |
|
|
public String page; |
|
|
|
|
|
// public String path;
|
|
|
public Integer width; |
|
|
public Integer width; |
|
|
public Boolean auto_color; |
|
|
public Boolean auto_color; |
|
|
public LineColor line_color; |
|
|
public LineColor line_color; |
|
|
@ -74,6 +75,14 @@ public class WxXcxUtil { |
|
|
public String g; |
|
|
public String g; |
|
|
public String b; |
|
|
public String b; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static class WechatCodeA{ |
|
|
|
|
|
public String path; |
|
|
|
|
|
public Integer width; |
|
|
|
|
|
public Boolean auto_color; |
|
|
|
|
|
public LineColor line_color; |
|
|
|
|
|
public Boolean is_hyaline; |
|
|
|
|
|
} |
|
|
/** |
|
|
/** |
|
|
* Prepare pay |
|
|
* Prepare pay |
|
|
*/ |
|
|
*/ |
|
|
@ -231,6 +240,7 @@ public class WxXcxUtil { |
|
|
WechatCode wechatCode = new WechatCode(); |
|
|
WechatCode wechatCode = new WechatCode(); |
|
|
wechatCode.page = page; |
|
|
wechatCode.page = page; |
|
|
wechatCode.scene = scene; |
|
|
wechatCode.scene = scene; |
|
|
|
|
|
// wechatCode.path = page+"?"+scene;
|
|
|
|
|
|
|
|
|
wechatCode.line_color = color; |
|
|
wechatCode.line_color = color; |
|
|
|
|
|
|
|
|
@ -239,6 +249,25 @@ public class WxXcxUtil { |
|
|
HttpsUtil.httpsRequest(url,"POST",postStr,path); |
|
|
HttpsUtil.httpsRequest(url,"POST",postStr,path); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 获取小程序二维码/小程序码
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// * @throws Exception
|
|
|
|
|
|
// */
|
|
|
|
|
|
// public static void getWxCodeTest(String page,String scene,LineColor color,String path) throws Exception {
|
|
|
|
|
|
// String url = String.format(URL_GET_WX_CODE_C, WxGzhUtil.getAccessToken());
|
|
|
|
|
|
//
|
|
|
|
|
|
// WechatCodeA wechatCodeA = new WechatCodeA();
|
|
|
|
|
|
// wechatCodeA.path = page;
|
|
|
|
|
|
//// wechatCode.path = page+"?"+scene;
|
|
|
|
|
|
//
|
|
|
|
|
|
//// WechatCodeA.line_color = color;
|
|
|
|
|
|
//
|
|
|
|
|
|
// String postStr = JacksonUtil.beanToJson(wechatCodeA);
|
|
|
|
|
|
// System.out.println(postStr);
|
|
|
|
|
|
// HttpsUtil.httpsRequest(url,"POST",postStr,path);
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 统一下单 |
|
|
* 统一下单 |
|
|
*/ |
|
|
*/ |
|
|
|