Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Commit

Permalink
1.0.10 dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Acexy committed Sep 30, 2018
1 parent cd1c8ce commit a0ba42a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
移除了历史版本登录测试方法和历史登录的相关支持代码
调整了测试代码优化了大量代码注释
1.1.2
升级部分依赖组件版本
升级部分依赖组件版本
关闭httpclient cookie检查的警告日志
```
---
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<fast-toolkit.version>1.0.9</fast-toolkit.version>
<httpasyncclient.version>4.1.3</httpasyncclient.version>
<fast-toolkit.version>1.0.10-SNAPSHOT</fast-toolkit.version>
<httpasyncclient.version>4.1.4</httpasyncclient.version>
<fastjson.version>1.2.49</fastjson.version>
<org.slf4j.version>1.7.25</org.slf4j.version>
<ch.qos.logback.version>1.2.3</ch.qos.logback.version>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/thankjava/wqq/SmartQQClientBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SmartQQClientBuilder {

private SmartQQClientBuilder() {
}

private static SmartQQClient smartQQClient;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.thankjava.toolkit3d.http.async.AsyncHttpClient;
import com.thankjava.toolkit3d.http.async.AsyncHttpClientBuilder;
import com.thankjava.toolkit3d.http.async.entity.AsyncRequest;
import com.thankjava.toolkit3d.http.async.entity.CookieCheckLevel;
import com.thankjava.wqq.consts.ConstsParams;
import com.thankjava.wqq.core.request.RequestBuilder;
import com.thankjava.wqq.entity.Session;
Expand All @@ -15,7 +16,11 @@ public abstract class BaseHttpService implements RequestBuilder {

protected static final AtomicLong msgId = new AtomicLong(ConstsParams.INIT_MSG_ID);

public final static AsyncHttpClient asyncHttpClient = AsyncHttpClientBuilder.createDefault();
public final static AsyncHttpClient asyncHttpClient = new AsyncHttpClientBuilder()
.setWithoutSSLCheck()
.setCookiePolicyLevel(CookieCheckLevel.BROWSER_COMPATIBILITY)
.setCloseWarnLogger()
.create();

/**
* 关闭AsyncHttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public AsyncResponse doRequest(CallBackListener listener) {
protected AsyncRequest buildRequestParams() {

Parameters params = new Parameters("webqq_type", "10");
params.append("ptqrtoken", WqqEncryptor.hashForCheckQrStatus(asyncHttpClient.getCookie("qrsig").getValue()));
params.append("ptqrtoken", WqqEncryptor.hashForCheckQrStatus(asyncHttpClient.getCookieFromClientContext("qrsig").getValue()));
params.append("webqq_type", "10");
params.append("remember_uin", "1");
params.append("login2qq", "1");
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/com/thankjava/wqq/test/qq/TestSmartQQ.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ public void onListener(ActionListener actionListener) {
// ListenerAction.data 返回登录结果 com.thankjava.wqq.entity.sys.LoginResult
@Override
public void onListener(ActionListener actionListener) {

LoginResult loginResult = (LoginResult) actionListener.getData();
logger.info("登录结果: " + loginResult.getLoginStatus());

if (loginResult.getLoginStatus() == LoginResultStatus.success) {

SmartQQClient smartQQClient = loginResult.getClient();
Expand All @@ -91,7 +93,6 @@ public void onListener(ActionListener actionListener) {
logger.info("获取到的好友列表信息: " + FastJson.toJSONString(smartQQClient.getFriendsList(true)));



// 业务处理
// TODO:

Expand Down

0 comments on commit a0ba42a

Please sign in to comment.