Commit dec4c9a0da329f4a3d2464c8190aef927bef9abd
1 parent
6bee8968
Exists in
yxb_dev
and in
2 other branches
no message
Showing
7 changed files
with
146 additions
and
9 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/AppConfig.java
@@ -33,6 +33,7 @@ public class AppConfig { | @@ -33,6 +33,7 @@ public class AppConfig { | ||
33 | //http://campus.myjxt.com/ | 33 | //http://campus.myjxt.com/ |
34 | public static String BASE_URL="http://60.190.202.57:1000/"; | 34 | public static String BASE_URL="http://60.190.202.57:1000/"; |
35 | public static String BASE_URL_IMG="http://60.190.202.57:1000"; | 35 | public static String BASE_URL_IMG="http://60.190.202.57:1000"; |
36 | + public static String WAP_URL="http://60.190.202.57:8101/"; | ||
36 | 37 | ||
37 | 38 | ||
38 | 39 |
app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java
@@ -55,7 +55,7 @@ public class CePingPresenter extends CepingContract.CePingPresenter { | @@ -55,7 +55,7 @@ public class CePingPresenter extends CepingContract.CePingPresenter { | ||
55 | @Override | 55 | @Override |
56 | public void onClick(View view) { | 56 | public void onClick(View view) { |
57 | ToolBean toolBean1= (ToolBean) view.getTag(); | 57 | ToolBean toolBean1= (ToolBean) view.getTag(); |
58 | - WebViewActivity.getInstance(mIView.getBindActivity(),toolBean1.toolUrl); | 58 | + WebViewActivity.getInstance(mIView.getBindActivity(),toolBean1.toolUrl,0); |
59 | } | 59 | } |
60 | }); | 60 | }); |
61 | layout_control.addView(textAndImgShowView); | 61 | layout_control.addView(textAndImgShowView); |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CheckInfoActivity.java
@@ -151,7 +151,7 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | @@ -151,7 +151,7 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | ||
151 | @Override | 151 | @Override |
152 | public void addChildSuccess() { | 152 | public void addChildSuccess() { |
153 | // WebViewActivity.start_show(CheckInfoActivity.this,AppConfig.BINDING_SUCCESS_HEZUO); | 153 | // WebViewActivity.start_show(CheckInfoActivity.this,AppConfig.BINDING_SUCCESS_HEZUO); |
154 | - WebViewActivity.getInstance(CheckInfoActivity.this,"http://60.190.202.57:8101/ParentOrderCenter.aspx?userid="+AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID)); | 154 | + WebViewActivity.getInstance(CheckInfoActivity.this,"http://60.190.202.57:8101/ParentOrderCenter.aspx?userid="+AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID),AppConfig.BINDING_SUCCESS_HEZUO); |
155 | finish(); | 155 | finish(); |
156 | } | 156 | } |
157 | 157 |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
@@ -10,30 +10,62 @@ import android.webkit.WebChromeClient; | @@ -10,30 +10,62 @@ import android.webkit.WebChromeClient; | ||
10 | import android.webkit.WebSettings; | 10 | import android.webkit.WebSettings; |
11 | import android.webkit.WebView; | 11 | import android.webkit.WebView; |
12 | import android.webkit.WebViewClient; | 12 | import android.webkit.WebViewClient; |
13 | +import android.widget.LinearLayout; | ||
13 | import android.widget.ProgressBar; | 14 | import android.widget.ProgressBar; |
15 | +import android.widget.TextView; | ||
14 | 16 | ||
15 | import com.share.mvpsdk.base.activity.BaseCompatActivity; | 17 | import com.share.mvpsdk.base.activity.BaseCompatActivity; |
16 | import com.share.mvpsdk.utils.AppUtils; | 18 | import com.share.mvpsdk.utils.AppUtils; |
17 | import com.share.mvpsdk.utils.NetworkConnectionUtils; | 19 | import com.share.mvpsdk.utils.NetworkConnectionUtils; |
18 | import com.share.mvpsdk.widgets.NestedScrollWebView; | 20 | import com.share.mvpsdk.widgets.NestedScrollWebView; |
21 | +import com.shunzhi.parent.AppConfig; | ||
19 | import com.shunzhi.parent.R; | 22 | import com.shunzhi.parent.R; |
20 | 23 | ||
21 | public class WebViewActivity extends BaseCompatActivity { | 24 | public class WebViewActivity extends BaseCompatActivity { |
22 | 25 | ||
23 | NestedScrollWebView nesteScrollWebView; | 26 | NestedScrollWebView nesteScrollWebView; |
27 | + LinearLayout binding_success, binding_success2; | ||
28 | + TextView close,tv_info,zuoye,title_web; | ||
29 | + int type; | ||
24 | 30 | ||
25 | private ProgressBar pvWeb; | 31 | private ProgressBar pvWeb; |
26 | 32 | ||
27 | - public static void getInstance(Context context,String url) { | 33 | + public static void getInstance(Context context, String url, int type) { |
28 | Intent intent = new Intent(context, WebViewActivity.class); | 34 | Intent intent = new Intent(context, WebViewActivity.class); |
29 | intent.putExtra("url", url); | 35 | intent.putExtra("url", url); |
36 | + intent.putExtra("type", type); | ||
30 | context.startActivity(intent); | 37 | context.startActivity(intent); |
31 | } | 38 | } |
32 | 39 | ||
33 | @Override | 40 | @Override |
34 | protected void initView(Bundle savedInstanceState) { | 41 | protected void initView(Bundle savedInstanceState) { |
35 | - nesteScrollWebView=findViewById(R.id.nesteScrollWebView); | ||
36 | - pvWeb=findViewById(R.id.pb_web); | 42 | + binding_success=findViewById(R.id.binding_success); |
43 | + binding_success2=findViewById(R.id.binding_success2); | ||
44 | + close = findViewById(R.id.close_btn); | ||
45 | + tv_info = findViewById(R.id.tv_info); | ||
46 | + zuoye = findViewById(R.id.zuoye); | ||
47 | + title_web = findViewById(R.id.title_web); | ||
48 | + | ||
49 | + nesteScrollWebView = findViewById(R.id.nesteScrollWebView); | ||
50 | + pvWeb = findViewById(R.id.pb_web); | ||
51 | + type = getIntent().getIntExtra("type", 0); | ||
52 | + if (type == AppConfig.BINDING_SUCCESS_HEZUO) { | ||
53 | + binding_success.setVisibility(View.VISIBLE); | ||
54 | + binding_success2.setVisibility(View.GONE); | ||
55 | + title_web.setVisibility(View.GONE); | ||
56 | + | ||
57 | + } else if (type == AppConfig.BINDING_SUCCESS_NOT) { | ||
58 | + binding_success.setVisibility(View.GONE); | ||
59 | + binding_success2.setVisibility(View.VISIBLE); | ||
60 | + title_web.setVisibility(View.GONE); | ||
61 | + | ||
62 | + } else if (type == AppConfig.ORDER_CENTER) { | ||
63 | + binding_success.setVisibility(View.GONE); | ||
64 | + binding_success2.setVisibility(View.GONE); | ||
65 | + title_web.setVisibility(View.VISIBLE); | ||
66 | + | ||
67 | + } | ||
68 | + | ||
37 | initWebView(); | 69 | initWebView(); |
38 | initWebSetting(nesteScrollWebView.getSettings()); | 70 | initWebSetting(nesteScrollWebView.getSettings()); |
39 | nesteScrollWebView.loadUrl(getIntent().getStringExtra("url")); | 71 | nesteScrollWebView.loadUrl(getIntent().getStringExtra("url")); |
@@ -46,9 +78,9 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -46,9 +78,9 @@ public class WebViewActivity extends BaseCompatActivity { | ||
46 | 78 | ||
47 | @Override | 79 | @Override |
48 | public void onBackPressedSupport() { | 80 | public void onBackPressedSupport() { |
49 | - if (nesteScrollWebView.canGoBack()){ | 81 | + if (nesteScrollWebView.canGoBack()) { |
50 | nesteScrollWebView.goBack(); | 82 | nesteScrollWebView.goBack(); |
51 | - }else { | 83 | + } else { |
52 | super.onBackPressedSupport(); | 84 | super.onBackPressedSupport(); |
53 | } | 85 | } |
54 | } | 86 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
@@ -89,8 +89,9 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -89,8 +89,9 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
89 | break; | 89 | break; |
90 | case R.id.layout_order: | 90 | case R.id.layout_order: |
91 | Bundle bundle=new Bundle(); | 91 | Bundle bundle=new Bundle(); |
92 | - bundle.putString("url",AppConfig.BASE_URL+"ParentOrderCenter.aspx?userid="+ | 92 | + bundle.putString("url",AppConfig.WAP_URL+"ParentOrderCenter.aspx?userid="+ |
93 | AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID)); | 93 | AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID)); |
94 | + bundle.putInt("type",AppConfig.ORDER_CENTER); | ||
94 | startNewActivity(WebViewActivity.class,bundle); | 95 | startNewActivity(WebViewActivity.class,bundle); |
95 | break; | 96 | break; |
96 | default: | 97 | default: |
app/src/main/res/layout/activity_web_view.xml
@@ -7,6 +7,109 @@ | @@ -7,6 +7,109 @@ | ||
7 | android:orientation="vertical" | 7 | android:orientation="vertical" |
8 | android:background="@color/bgColor" | 8 | android:background="@color/bgColor" |
9 | tools:context="com.shunzhi.parent.ui.activity.mywebview.WebViewActivity"> | 9 | tools:context="com.shunzhi.parent.ui.activity.mywebview.WebViewActivity"> |
10 | + | ||
11 | + <RelativeLayout | ||
12 | + android:layout_width="match_parent" | ||
13 | + android:background="@color/back_top" | ||
14 | + android:layout_height="?android:actionBarSize" | ||
15 | + android:orientation="horizontal" | ||
16 | + > | ||
17 | + <TextView | ||
18 | + android:id="@+id/close_btn" | ||
19 | + android:layout_width="30dp" | ||
20 | + android:layout_height="30dp" | ||
21 | + android:layout_marginLeft="10dp" | ||
22 | + android:layout_centerVertical="true" | ||
23 | + android:background="@drawable/close" | ||
24 | + /> | ||
25 | + <TextView | ||
26 | + android:id="@+id/title_web" | ||
27 | + android:layout_width="wrap_content" | ||
28 | + android:layout_height="wrap_content" | ||
29 | + android:text="订购中心" | ||
30 | + android:textSize="@dimen/txtsize_title" | ||
31 | + android:layout_centerInParent="true" | ||
32 | + android:visibility="gone" | ||
33 | + android:textColor="@color/textColor" | ||
34 | + | ||
35 | + /> | ||
36 | + | ||
37 | + </RelativeLayout> | ||
38 | + | ||
39 | + <LinearLayout | ||
40 | + android:id="@+id/binding_success" | ||
41 | + android:layout_width="match_parent" | ||
42 | + android:layout_height="wrap_content" | ||
43 | + android:gravity="center" | ||
44 | + android:background="@color/white" | ||
45 | + android:layout_marginLeft="20dp" | ||
46 | + android:padding="30dp" | ||
47 | + android:layout_marginRight="20dp" | ||
48 | + | ||
49 | + > | ||
50 | + | ||
51 | + <ImageView | ||
52 | + android:layout_width="40dp" | ||
53 | + android:layout_height="40dp" | ||
54 | + android:background="@drawable/success_big" /> | ||
55 | + | ||
56 | + <TextView | ||
57 | + android:layout_width="wrap_content" | ||
58 | + android:layout_height="match_parent" | ||
59 | + android:layout_marginLeft="20dp" | ||
60 | + android:text="绑定成功" | ||
61 | + android:gravity="center" | ||
62 | + android:textColor="@color/textColor" | ||
63 | + android:textSize="@dimen/txtsize_headline" /> | ||
64 | + | ||
65 | + </LinearLayout> | ||
66 | + <LinearLayout | ||
67 | + android:id="@+id/binding_success2" | ||
68 | + android:visibility="gone" | ||
69 | + android:layout_width="match_parent" | ||
70 | + android:layout_height="wrap_content" | ||
71 | + android:gravity="center" | ||
72 | + android:background="@color/white" | ||
73 | + android:layout_marginLeft="20dp" | ||
74 | + android:padding="30dp" | ||
75 | + android:orientation="vertical" | ||
76 | + android:layout_marginRight="20dp" | ||
77 | + | ||
78 | + > | ||
79 | + <TextView | ||
80 | + android:id="@+id/tv_info" | ||
81 | + android:layout_width="wrap_content" | ||
82 | + android:layout_height="match_parent" | ||
83 | + android:layout_marginLeft="20dp" | ||
84 | + android:text="生成孩子“汇作业”账号为:sz1803081515,初始密码为:sz1803081515(与账号相同)。孩子可以下载“汇作业”app进行使用" | ||
85 | + android:gravity="center" | ||
86 | + android:textColor="@color/textColor" | ||
87 | + android:textSize="@dimen/txtsize_headline" /> | ||
88 | + <LinearLayout | ||
89 | + android:layout_width="match_parent" | ||
90 | + android:layout_height="wrap_content" | ||
91 | + android:layout_marginTop="10dp" | ||
92 | + android:gravity="center" | ||
93 | + > | ||
94 | + <TextView | ||
95 | + android:layout_width="wrap_content" | ||
96 | + android:layout_height="match_parent" | ||
97 | + android:layout_marginLeft="20dp" | ||
98 | + android:text="下载地址:" | ||
99 | + android:textColor="@color/textColor" | ||
100 | + android:textSize="@dimen/txtsize_headline" /> | ||
101 | + <TextView | ||
102 | + android:id="@+id/zuoye" | ||
103 | + android:layout_width="wrap_content" | ||
104 | + android:layout_height="match_parent" | ||
105 | + android:layout_marginLeft="20dp" | ||
106 | + android:text="汇作业" | ||
107 | + android:gravity="center" | ||
108 | + android:textColor="@color/textBlue" | ||
109 | + android:textSize="@dimen/txtsize_headline" /> | ||
110 | + </LinearLayout> | ||
111 | + | ||
112 | + </LinearLayout> | ||
10 | <ProgressBar | 113 | <ProgressBar |
11 | android:id="@+id/pb_web" | 114 | android:id="@+id/pb_web" |
12 | style="?android:attr/progressBarStyleHorizontal" | 115 | style="?android:attr/progressBarStyleHorizontal" |
gradle.properties
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | 9 | ||
10 | # Specifies the JVM arguments used for the daemon process. | 10 | # Specifies the JVM arguments used for the daemon process. |
11 | # The setting is particularly useful for tweaking memory settings. | 11 | # The setting is particularly useful for tweaking memory settings. |
12 | -org.gradle.jvmargs=-Xmx1536m | 12 | +org.gradle.jvmargs=-Xmx512m |
13 | 13 | ||
14 | # When configured, Gradle will run in incubating parallel mode. | 14 | # When configured, Gradle will run in incubating parallel mode. |
15 | # This option should only be used with decoupled projects. More details, visit | 15 | # This option should only be used with decoupled projects. More details, visit |