Commit d8f68cd8aeb6e41bfa51fe71ce759e84110e48cc
Exists in
yxb_dev
and in
2 other branches
Merge branch 'developer' of http://git.shunzhi.net/taohd/parentwork into developer
Showing
5 changed files
with
14 additions
and
9 deletions
Show diff stats
.idea/modules.xml
@@ -4,8 +4,8 @@ | @@ -4,8 +4,8 @@ | ||
4 | <modules> | 4 | <modules> |
5 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | 5 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> |
6 | <module fileurl="file://$PROJECT_DIR$/mvpsdk/mvpsdk.iml" filepath="$PROJECT_DIR$/mvpsdk/mvpsdk.iml" /> | 6 | <module fileurl="file://$PROJECT_DIR$/mvpsdk/mvpsdk.iml" filepath="$PROJECT_DIR$/mvpsdk/mvpsdk.iml" /> |
7 | + <module fileurl="file://$PROJECT_DIR$/parentWorkHolper.iml" filepath="$PROJECT_DIR$/parentWorkHolper.iml" /> | ||
7 | <module fileurl="file://E:\parentwork\parentWorkHolper.iml" filepath="E:\parentwork\parentWorkHolper.iml" /> | 8 | <module fileurl="file://E:\parentwork\parentWorkHolper.iml" filepath="E:\parentwork\parentWorkHolper.iml" /> |
8 | - <module fileurl="file://$PROJECT_DIR$/parentwork.iml" filepath="$PROJECT_DIR$/parentwork.iml" /> | ||
9 | <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" /> | 9 | <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" /> |
10 | <module fileurl="file://$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" filepath="$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" /> | 10 | <module fileurl="file://$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" filepath="$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" /> |
11 | </modules> | 11 | </modules> |
.idea/vcs.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <project version="4"> | 2 | <project version="4"> |
3 | <component name="VcsDirectoryMappings"> | 3 | <component name="VcsDirectoryMappings"> |
4 | - <mapping directory="$PROJECT_DIR$" vcs="Git" /> | 4 | + <mapping directory="" vcs="Git" /> |
5 | </component> | 5 | </component> |
6 | </project> | 6 | </project> |
7 | \ No newline at end of file | 7 | \ No newline at end of file |
app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
@@ -60,12 +60,14 @@ public class MessageManager { | @@ -60,12 +60,14 @@ public class MessageManager { | ||
60 | NIMClient.getService(AuthServiceObserver.class).observeOnlineStatus(new Observer<StatusCode>() { | 60 | NIMClient.getService(AuthServiceObserver.class).observeOnlineStatus(new Observer<StatusCode>() { |
61 | @Override | 61 | @Override |
62 | public void onEvent(StatusCode statusCode) { | 62 | public void onEvent(StatusCode statusCode) { |
63 | - if (statusCode==StatusCode.KICKOUT){ | ||
64 | - Intent i = new Intent(AppContext.getInstance(), LoginAndRegistActivity.class); | ||
65 | - i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK|Intent.FLAG_ACTIVITY_NEW_TASK); | 63 | + if (statusCode == StatusCode.KICKOUT) { |
64 | + Context context = AppContext.getInstance(); | ||
65 | + Intent i = new Intent(context, LoginAndRegistActivity.class); | ||
66 | + i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); | ||
67 | + context.startActivity(i); | ||
66 | } | 68 | } |
67 | } | 69 | } |
68 | - },true); | 70 | + }, true); |
69 | 71 | ||
70 | } | 72 | } |
71 | 73 | ||
@@ -89,11 +91,12 @@ public class MessageManager { | @@ -89,11 +91,12 @@ public class MessageManager { | ||
89 | public void onSuccess(Object o) { | 91 | public void onSuccess(Object o) { |
90 | NIMLoginResultBean bean = new NIMLoginResultBean(true, 200, null); | 92 | NIMLoginResultBean bean = new NIMLoginResultBean(true, 200, null); |
91 | subject.onNext(bean); | 93 | subject.onNext(bean); |
94 | + Timber.i("----===onSuccess : %s",o); | ||
92 | } | 95 | } |
93 | 96 | ||
94 | @Override | 97 | @Override |
95 | public void onFailed(int i) { | 98 | public void onFailed(int i) { |
96 | - Timber.i("------nim login failed : %s", i); | 99 | + Timber.i("----===nim login failed : %s", i); |
97 | ToastUtils.showToast("云信服务器登录失败:" + i); | 100 | ToastUtils.showToast("云信服务器登录失败:" + i); |
98 | NIMLoginResultBean bean = new NIMLoginResultBean(false, i, null); | 101 | NIMLoginResultBean bean = new NIMLoginResultBean(false, i, null); |
99 | subject.onNext(bean); | 102 | subject.onNext(bean); |
@@ -101,6 +104,7 @@ public class MessageManager { | @@ -101,6 +104,7 @@ public class MessageManager { | ||
101 | 104 | ||
102 | @Override | 105 | @Override |
103 | public void onException(Throwable throwable) { | 106 | public void onException(Throwable throwable) { |
107 | + Timber.i("----===onException"); | ||
104 | if (throwable != null) throwable.printStackTrace(); | 108 | if (throwable != null) throwable.printStackTrace(); |
105 | NIMLoginResultBean bean = new NIMLoginResultBean(false, 0, throwable); | 109 | NIMLoginResultBean bean = new NIMLoginResultBean(false, 0, throwable); |
106 | subject.onNext(bean); | 110 | subject.onNext(bean); |
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
@@ -23,6 +23,7 @@ import java.util.regex.Pattern; | @@ -23,6 +23,7 @@ import java.util.regex.Pattern; | ||
23 | 23 | ||
24 | import io.reactivex.functions.Consumer; | 24 | import io.reactivex.functions.Consumer; |
25 | import retrofit2.HttpException; | 25 | import retrofit2.HttpException; |
26 | +import timber.log.Timber; | ||
26 | 27 | ||
27 | /** | 28 | /** |
28 | * Created by Administrator on 2018/3/6 0006. | 29 | * Created by Administrator on 2018/3/6 0006. |
@@ -45,6 +46,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -45,6 +46,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
45 | mRxManager.register(mIModel.getLoginResult(loginName, loginPwd).subscribe(new Consumer<JsonObject>() { | 46 | mRxManager.register(mIModel.getLoginResult(loginName, loginPwd).subscribe(new Consumer<JsonObject>() { |
46 | @Override | 47 | @Override |
47 | public void accept(JsonObject jsonObject) throws Exception { | 48 | public void accept(JsonObject jsonObject) throws Exception { |
49 | + Timber.i("---=== loginResult :%s",jsonObject); | ||
48 | try { | 50 | try { |
49 | if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { | 51 | if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { |
50 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); | 52 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); |
app/src/main/res/layout/activity_web_view.xml
@@ -17,7 +17,6 @@ | @@ -17,7 +17,6 @@ | ||
17 | <com.share.mvpsdk.widgets.NestedScrollWebView | 17 | <com.share.mvpsdk.widgets.NestedScrollWebView |
18 | android:layout_width="match_parent" | 18 | android:layout_width="match_parent" |
19 | android:layout_height="match_parent" | 19 | android:layout_height="match_parent" |
20 | - android:id="@+id/nesteScrollWebView" | ||
21 | - ></com.share.mvpsdk.widgets.NestedScrollWebView> | 20 | + android:id="@+id/nesteScrollWebView"/> |
22 | 21 | ||
23 | </LinearLayout> | 22 | </LinearLayout> |