Commit 5a577c2a2866b6361ead42f14874fc5e7b875150
Exists in
yxb_dev
and in
2 other branches
Merge branch 'developer' into yxb_dev
# Conflicts: # app/src/main/AndroidManifest.xml # app/src/main/res/layout/activity_personinfo.xml # app/src/main/res/layout/fragment_mine.xml
Showing
7 changed files
with
8 additions
and
13 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/AppConfig.java
@@ -45,7 +45,7 @@ public class AppConfig { | @@ -45,7 +45,7 @@ public class AppConfig { | ||
45 | //正式 | 45 | //正式 |
46 | public static String BASE_URL="http://campus.myjxt.com/"; | 46 | public static String BASE_URL="http://campus.myjxt.com/"; |
47 | public static String BASE_URL_ORDER="http://parent.myjxt.com/"; | 47 | public static String BASE_URL_ORDER="http://parent.myjxt.com/"; |
48 | - public static String BASE_URL_FILE="http://manage.myjxt.com "; | 48 | + public static String BASE_URL_FILE="http://manage.myjxt.com"; |
49 | 49 | ||
50 | 50 | ||
51 | //默认日志保存的路径 | 51 | //默认日志保存的路径 |
app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java
1 | package com.shunzhi.parent.presenter.ceping; | 1 | package com.shunzhi.parent.presenter.ceping; |
2 | 2 | ||
3 | -import android.util.Log; | ||
4 | import android.view.View; | 3 | import android.view.View; |
5 | import android.widget.LinearLayout; | 4 | import android.widget.LinearLayout; |
6 | 5 | ||
@@ -19,7 +18,6 @@ import java.util.ArrayList; | @@ -19,7 +18,6 @@ import java.util.ArrayList; | ||
19 | import java.util.List; | 18 | import java.util.List; |
20 | 19 | ||
21 | import io.reactivex.functions.Consumer; | 20 | import io.reactivex.functions.Consumer; |
22 | -import timber.log.Timber; | ||
23 | 21 | ||
24 | /** | 22 | /** |
25 | * Created by ToaHanDong on 2018/3/14. | 23 | * Created by ToaHanDong on 2018/3/14. |
@@ -43,7 +41,6 @@ public class CePingPresenter extends CepingContract.CePingPresenter { | @@ -43,7 +41,6 @@ public class CePingPresenter extends CepingContract.CePingPresenter { | ||
43 | mRxManager.register(mIModel.getTools(areaName).subscribe(new Consumer<JsonObject>() { | 41 | mRxManager.register(mIModel.getTools(areaName).subscribe(new Consumer<JsonObject>() { |
44 | @Override | 42 | @Override |
45 | public void accept(JsonObject jsonObject) throws Exception { | 43 | public void accept(JsonObject jsonObject) throws Exception { |
46 | - | ||
47 | if (jsonObject.get("status").getAsString().equals("1")){ | 44 | if (jsonObject.get("status").getAsString().equals("1")){ |
48 | JsonArray jsonArray=jsonObject.getAsJsonArray("data"); | 45 | JsonArray jsonArray=jsonObject.getAsJsonArray("data"); |
49 | layout_control.removeAllViews(); | 46 | layout_control.removeAllViews(); |
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
@@ -50,6 +50,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -50,6 +50,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
50 | @Override | 50 | @Override |
51 | public void accept(JsonObject jsonObject) throws Exception { | 51 | public void accept(JsonObject jsonObject) throws Exception { |
52 | try { | 52 | try { |
53 | +// Log.d("66666","jsonObject="+jsonObject); | ||
53 | if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { | 54 | if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { |
54 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); | 55 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); |
55 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, loginName); | 56 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, loginName); |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
@@ -118,7 +118,6 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -118,7 +118,6 @@ public class WebViewActivity extends BaseCompatActivity { | ||
118 | initWebView(); | 118 | initWebView(); |
119 | initWebSetting(nesteScrollWebView.getSettings()); | 119 | initWebSetting(nesteScrollWebView.getSettings()); |
120 | nesteScrollWebView.loadUrl(getIntent().getStringExtra("url")); | 120 | nesteScrollWebView.loadUrl(getIntent().getStringExtra("url")); |
121 | -// Log.d("66666","getIntent().getStringExtra(\"url\")="+getIntent().getStringExtra("url")); | ||
122 | } | 121 | } |
123 | 122 | ||
124 | @Override | 123 | @Override |
@@ -182,7 +181,6 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -182,7 +181,6 @@ public class WebViewActivity extends BaseCompatActivity { | ||
182 | 181 | ||
183 | @Override | 182 | @Override |
184 | public boolean shouldOverrideUrlLoading(WebView view, String url) { | 183 | public boolean shouldOverrideUrlLoading(WebView view, String url) { |
185 | -// Log.d("66666","shouldOverrideUrlLoading="+url); | ||
186 | if (url.startsWith("http")) view.loadUrl(url); | 184 | if (url.startsWith("http")) view.loadUrl(url); |
187 | // if (url.contains("platformapi/startapp")) { | 185 | // if (url.contains("platformapi/startapp")) { |
188 | // startAlipayActivity(url); | 186 | // startAlipayActivity(url); |
app/src/main/java/com/shunzhi/parent/views/TextAndImgShowView.java
@@ -5,6 +5,7 @@ import android.content.Context; | @@ -5,6 +5,7 @@ import android.content.Context; | ||
5 | import android.support.annotation.DrawableRes; | 5 | import android.support.annotation.DrawableRes; |
6 | import android.support.annotation.Nullable; | 6 | import android.support.annotation.Nullable; |
7 | import android.util.AttributeSet; | 7 | import android.util.AttributeSet; |
8 | +import android.util.Log; | ||
8 | import android.view.View; | 9 | import android.view.View; |
9 | import android.widget.FrameLayout; | 10 | import android.widget.FrameLayout; |
10 | import android.widget.ImageView; | 11 | import android.widget.ImageView; |
app/src/main/res/layout/fragment_ce_ping.xml
@@ -174,6 +174,7 @@ | @@ -174,6 +174,7 @@ | ||
174 | android:layout_width="match_parent" | 174 | android:layout_width="match_parent" |
175 | android:layout_height="match_parent" | 175 | android:layout_height="match_parent" |
176 | android:scaleType="fitXY" | 176 | android:scaleType="fitXY" |
177 | + android:src="@drawable/activite1" | ||
177 | android:id="@+id/ivCourse1" | 178 | android:id="@+id/ivCourse1" |
178 | /> | 179 | /> |
179 | <LinearLayout | 180 | <LinearLayout |
@@ -228,6 +229,7 @@ | @@ -228,6 +229,7 @@ | ||
228 | android:layout_height="match_parent" | 229 | android:layout_height="match_parent" |
229 | android:scaleType="fitXY" | 230 | android:scaleType="fitXY" |
230 | android:background="@drawable/shape_xueqing_radius8" | 231 | android:background="@drawable/shape_xueqing_radius8" |
232 | + android:src="@drawable/activite2" | ||
231 | android:id="@+id/ivCourse2" | 233 | android:id="@+id/ivCourse2" |
232 | /> | 234 | /> |
233 | <LinearLayout | 235 | <LinearLayout |
@@ -275,6 +277,7 @@ | @@ -275,6 +277,7 @@ | ||
275 | android:layout_height="match_parent" | 277 | android:layout_height="match_parent" |
276 | android:scaleType="fitXY" | 278 | android:scaleType="fitXY" |
277 | android:background="@drawable/shape_xueqing_radius8" | 279 | android:background="@drawable/shape_xueqing_radius8" |
280 | + android:src="@drawable/activite3" | ||
278 | android:id="@+id/ivCourse3" | 281 | android:id="@+id/ivCourse3" |
279 | /> | 282 | /> |
280 | <LinearLayout | 283 | <LinearLayout |
mvpsdk/src/main/java/com/share/mvpsdk/helper/okhttp/CacheInterceptor.java
@@ -24,9 +24,9 @@ public class CacheInterceptor implements Interceptor { | @@ -24,9 +24,9 @@ public class CacheInterceptor implements Interceptor { | ||
24 | 24 | ||
25 | @Override | 25 | @Override |
26 | public Response intercept(Chain chain) throws IOException { | 26 | public Response intercept(Chain chain) throws IOException { |
27 | - try { | ||
28 | 27 | ||
29 | Request request = chain.request(); | 28 | Request request = chain.request(); |
29 | + Response response = chain.proceed(request); | ||
30 | if (NetworkConnectionUtils.isNetworkConnected(AppUtils.getContext())) { | 30 | if (NetworkConnectionUtils.isNetworkConnected(AppUtils.getContext())) { |
31 | // 有网络时, 缓存1小时 | 31 | // 有网络时, 缓存1小时 |
32 | int maxAge = 60 * 60; | 32 | int maxAge = 60 * 60; |
@@ -35,7 +35,7 @@ public class CacheInterceptor implements Interceptor { | @@ -35,7 +35,7 @@ public class CacheInterceptor implements Interceptor { | ||
35 | .header("User-Agent", getUserAgent()) | 35 | .header("User-Agent", getUserAgent()) |
36 | .build(); | 36 | .build(); |
37 | 37 | ||
38 | - Response response = chain.proceed(request); | 38 | +// Response response = chain.proceed(request); |
39 | return response.newBuilder() | 39 | return response.newBuilder() |
40 | .removeHeader("Pragma") | 40 | .removeHeader("Pragma") |
41 | .removeHeader("Cache-Control") | 41 | .removeHeader("Cache-Control") |
@@ -50,17 +50,12 @@ public class CacheInterceptor implements Interceptor { | @@ -50,17 +50,12 @@ public class CacheInterceptor implements Interceptor { | ||
50 | .header("User-Agent", getUserAgent()) | 50 | .header("User-Agent", getUserAgent()) |
51 | .build(); | 51 | .build(); |
52 | 52 | ||
53 | - Response response = chain.proceed(request); | ||
54 | return response.newBuilder() | 53 | return response.newBuilder() |
55 | .removeHeader("Pragma") | 54 | .removeHeader("Pragma") |
56 | .removeHeader("Cache-Control") | 55 | .removeHeader("Cache-Control") |
57 | .header("Cache-Control", "public, only-if-cached, max-stale=" + maxStale) | 56 | .header("Cache-Control", "public, only-if-cached, max-stale=" + maxStale) |
58 | .build(); | 57 | .build(); |
59 | } | 58 | } |
60 | - }catch (Exception e){ | ||
61 | - e.printStackTrace(); | ||
62 | - return null; | ||
63 | - } | ||
64 | // Request request = chain.request(); | 59 | // Request request = chain.request(); |
65 | // if (!NetworkConnectionUtils.isConnected(AppUtils.getContext())) { | 60 | // if (!NetworkConnectionUtils.isConnected(AppUtils.getContext())) { |
66 | // request = request.newBuilder() | 61 | // request = request.newBuilder() |