Commit d8f68cd8aeb6e41bfa51fe71ce759e84110e48cc

Authored by 陶汉栋
2 parents 69c0bf10 2e560dbc

Merge branch 'developer' of http://git.shunzhi.net/taohd/parentwork into developer

.idea/modules.xml
... ... @@ -4,8 +4,8 @@
4 4 <modules>
5 5 <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
6 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 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 9 <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" />
10 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 11 </modules>
... ...
.idea/vcs.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project version="4">
3 3 <component name="VcsDirectoryMappings">
4   - <mapping directory="$PROJECT_DIR$" vcs="Git" />
  4 + <mapping directory="" vcs="Git" />
5 5 </component>
6 6 </project>
7 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 60 NIMClient.getService(AuthServiceObserver.class).observeOnlineStatus(new Observer<StatusCode>() {
61 61 @Override
62 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 91 public void onSuccess(Object o) {
90 92 NIMLoginResultBean bean = new NIMLoginResultBean(true, 200, null);
91 93 subject.onNext(bean);
  94 + Timber.i("----===onSuccess : %s",o);
92 95 }
93 96  
94 97 @Override
95 98 public void onFailed(int i) {
96   - Timber.i("------nim login failed : %s", i);
  99 + Timber.i("----===nim login failed : %s", i);
97 100 ToastUtils.showToast("云信服务器登录失败:" + i);
98 101 NIMLoginResultBean bean = new NIMLoginResultBean(false, i, null);
99 102 subject.onNext(bean);
... ... @@ -101,6 +104,7 @@ public class MessageManager {
101 104  
102 105 @Override
103 106 public void onException(Throwable throwable) {
  107 + Timber.i("----===onException");
104 108 if (throwable != null) throwable.printStackTrace();
105 109 NIMLoginResultBean bean = new NIMLoginResultBean(false, 0, throwable);
106 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 23  
24 24 import io.reactivex.functions.Consumer;
25 25 import retrofit2.HttpException;
  26 +import timber.log.Timber;
26 27  
27 28 /**
28 29 * Created by Administrator on 2018/3/6 0006.
... ... @@ -45,6 +46,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre
45 46 mRxManager.register(mIModel.getLoginResult(loginName, loginPwd).subscribe(new Consumer<JsonObject>() {
46 47 @Override
47 48 public void accept(JsonObject jsonObject) throws Exception {
  49 + Timber.i("---=== loginResult :%s",jsonObject);
48 50 try {
49 51 if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) {
50 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 17 <com.share.mvpsdk.widgets.NestedScrollWebView
18 18 android:layout_width="match_parent"
19 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 22 </LinearLayout>
... ...