
7 changed files with 79 additions and 6 deletions
@ -1,10 +1,12 @@ |
|||||
package com.yxt.supervise.report.wx; |
package com.yxt.supervise.report.wx; |
||||
|
|
||||
|
import com.yxt.supervise.report.wx.obj.RespCode2Session; |
||||
|
|
||||
public class WxAuth { |
public class WxAuth { |
||||
|
|
||||
|
|
||||
public static String getIdsByCode(String wxCode) { |
public static RespCode2Session code2Session(String wxCode) { |
||||
|
|
||||
return ""; |
return null; |
||||
} |
} |
||||
} |
} |
||||
|
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.supervise.report.wx.obj; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class RespCode2Session { |
||||
|
private String session_key;// string 会话密钥
|
||||
|
private String unionid;// string 用户在开放平台的唯一标识符,若当前小程序已绑定到微信开放平台账号下会返回,详见 UnionID 机制说明。
|
||||
|
private String errmsg;// string 错误信息
|
||||
|
private String openid;// string 用户唯一标识
|
||||
|
private int errcode;// int32 错误码
|
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
package com.yxt.supervise.report.wx.obj; |
||||
|
|
||||
|
public class WxSendBody { |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
package com.yxt.supervise.report; |
||||
|
|
||||
|
import cn.hutool.http.HttpRequest; |
||||
|
import cn.hutool.http.HttpResponse; |
||||
|
import org.junit.Test; |
||||
|
|
||||
|
public class TestSh { |
||||
|
|
||||
|
@Test |
||||
|
public void testreq() { |
||||
|
String url = "https://hf-service.shanhainengyuan.com/api/system/index/login"; |
||||
|
|
||||
|
String json = "{\"username\": \"汇融银行\", \"password\": \"888888\", \"login_type\": \"user\", \"identity\": \"system\"}"; |
||||
|
// String result2 = HttpRequest.post(url)
|
||||
|
// .body(json)
|
||||
|
// .execute().body();
|
||||
|
// System.out.println(result2);
|
||||
|
|
||||
|
|
||||
|
// String r = HttpRequest.get("https://service.shanhainengyuan.com/#/daping").execute().body();
|
||||
|
// System.out.println(r);
|
||||
|
|
||||
|
String u2 = "https://api.cloud.padbot.com/auth/login"; |
||||
|
String j2 = "{\n" + |
||||
|
" \"id\": 1234569,\n" + |
||||
|
" \"data\": {\n" + |
||||
|
" \"phoneNumber\": \"13111515028\",\n" + |
||||
|
" \"password\": \"eXh0MTIzNDU2\",\n" + |
||||
|
" \"verificationCode\": \"\",\n" + |
||||
|
" \"countryAreaCode\": 86\n" + |
||||
|
" },\n" + |
||||
|
" \"extra\": {\n" + |
||||
|
" \"appKey\": \"694492239e6f42b69721d9a492efc2a8\",\n" + |
||||
|
" \"appVersion\": \"1.0.0\",\n" + |
||||
|
" \"device\": \"\",\n" + |
||||
|
" \"lang\": \"zh-cn\",\n" + |
||||
|
" \"system\": \"windows\",\n" + |
||||
|
" \"systemVersion\": \"\",\n" + |
||||
|
" \"time\": 1692694989802,\n" + |
||||
|
" \"sign\": \"e42f05f8d2969f0501fe28a402139420\"\n" + |
||||
|
" }\n" + |
||||
|
"}"; |
||||
|
HttpResponse resp = HttpRequest.options(u2).execute(); |
||||
|
String rs2 = HttpRequest.post(u2) |
||||
|
.body(j2) |
||||
|
.execute().body(); |
||||
|
System.out.println(rs2); |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
Loading…
Reference in new issue