Commit ce2026d324bbb975624bbf9edd67000c4dbb3cd5
1 parent
c1b6c512
Exists in
yxb_dev
and in
1 other branch
no message
Showing
4 changed files
with
49 additions
and
47 deletions
Show diff stats
app/libs/processor.jar
No preview for this file type
app/src/main/java/com/shunzhi/parent/AppConfig.java
| @@ -39,16 +39,16 @@ public class AppConfig { | @@ -39,16 +39,16 @@ public class AppConfig { | ||
| 39 | public static String APP_IS_START = "app_is_start"; | 39 | public static String APP_IS_START = "app_is_start"; |
| 40 | 40 | ||
| 41 | //测试 | 41 | //测试 |
| 42 | - public static String BASE_URL="http://60.190.202.57:1000/"; | ||
| 43 | - public static String BASE_URL_ORDER="http://60.190.202.57:8101/"; | ||
| 44 | - public static String BASE_URL_FILE="http://60.190.202.57:8196"; | 42 | +// public static String BASE_URL="http://60.190.202.57:1000/"; |
| 43 | +// public static String BASE_URL_ORDER="http://60.190.202.57:8101/"; | ||
| 44 | +// public static String BASE_URL_FILE="http://60.190.202.57:8196"; | ||
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | //正式 | 47 | //正式 |
| 48 | -// public static String BASE_URL="http://campus.myjxt.com/"; | ||
| 49 | -// public static String BASE_URL_ORDER="http://parent.myjxt.com/"; | ||
| 50 | -// public static String BASE_URL_FILE="http://manage.myjxt.com"; | ||
| 51 | -// public static final String url_version = BASE_URL + "api/Common/AppVersion?appType=3"; | 48 | + public static String BASE_URL="http://campus.myjxt.com/"; |
| 49 | + public static String BASE_URL_ORDER="http://parent.myjxt.com/"; | ||
| 50 | + public static String BASE_URL_FILE="http://manage.myjxt.com"; | ||
| 51 | + public static final String url_version = BASE_URL + "api/Common/AppVersion?appType=3"; | ||
| 52 | 52 | ||
| 53 | 53 | ||
| 54 | //默认日志保存的路径 | 54 | //默认日志保存的路径 |
app/src/main/java/com/shunzhi/parent/ui/fragment/ReportFragment.java
| @@ -195,7 +195,9 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | @@ -195,7 +195,9 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | ||
| 195 | } | 195 | } |
| 196 | tvName.setText(childBean.getStudentName()); | 196 | tvName.setText(childBean.getStudentName()); |
| 197 | } | 197 | } |
| 198 | - chengZhangFragment1.setChildJson(jsonStr); | 198 | + if(chengZhangFragment1!=null) { |
| 199 | + chengZhangFragment1.setChildJson(jsonStr); | ||
| 200 | + } | ||
| 199 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.CURRCHILDJSONSTR, jsonStr); | 201 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.CURRCHILDJSONSTR, jsonStr); |
| 200 | createSchoolMenu(); | 202 | createSchoolMenu(); |
| 201 | } | 203 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ChengZhangFragment.java
| @@ -102,7 +102,7 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | @@ -102,7 +102,7 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | ||
| 102 | show(); | 102 | show(); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | - private void show(){ | 105 | + private void show() { |
| 106 | Gson g = new Gson(); | 106 | Gson g = new Gson(); |
| 107 | if (type.equals(TYPE_CHENGZHANG)) { | 107 | if (type.equals(TYPE_CHENGZHANG)) { |
| 108 | layout_chengzhang.setVisibility(View.VISIBLE); | 108 | layout_chengzhang.setVisibility(View.VISIBLE); |
| @@ -174,43 +174,43 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | @@ -174,43 +174,43 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | ||
| 174 | 174 | ||
| 175 | @Override | 175 | @Override |
| 176 | public void onClick(View view) { | 176 | public void onClick(View view) { |
| 177 | -// if (childBean.getCount() == 0) { | ||
| 178 | -// final PopupWindow popupWindow = new PopupWindow(); | ||
| 179 | -// popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); | ||
| 180 | -// popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); | ||
| 181 | -// backgroundAlpha(0.5f); | ||
| 182 | -// View view1 = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_view, null); | ||
| 183 | -// TextView dialog_info = view1.findViewById(R.id.dialog_info); | ||
| 184 | -// dialog_info.setText("请前往订购中心\n订购“智能校卫”\n才能够使用相关应用功能"); | ||
| 185 | -// dialog_info.setGravity(Gravity.CENTER); | ||
| 186 | -// TextView right_btn = view1.findViewById(R.id.right_btn); | ||
| 187 | -// right_btn.setText("前往订购"); | ||
| 188 | -// right_btn.setOnClickListener(new View.OnClickListener() { | ||
| 189 | -// @Override | ||
| 190 | -// public void onClick(View v) { | ||
| 191 | -// popupWindow.dismiss(); | ||
| 192 | -// backgroundAlpha(1f); | ||
| 193 | -// Bundle bundle = new Bundle(); | ||
| 194 | -// bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" + | ||
| 195 | -// AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID)); | ||
| 196 | -// bundle.putInt("type", AppConfig.ORDER_CENTER); | ||
| 197 | -// startNewActivity(WebViewActivity.class, bundle); | ||
| 198 | -// | ||
| 199 | -// } | ||
| 200 | -// }); | ||
| 201 | -// TextView cancel_btn = view1.findViewById(R.id.cancel_btn); | ||
| 202 | -// cancel_btn.setOnClickListener(new View.OnClickListener() { | ||
| 203 | -// @Override | ||
| 204 | -// public void onClick(View v) { | ||
| 205 | -// popupWindow.dismiss(); | ||
| 206 | -// backgroundAlpha(1f); | ||
| 207 | -// } | ||
| 208 | -// }); | ||
| 209 | -// | ||
| 210 | -// popupWindow.setContentView(view1); | ||
| 211 | -// popupWindow.showAtLocation(recyclerView, Gravity.CENTER, 0, 0); | ||
| 212 | -// return; | ||
| 213 | -// } | 177 | + if (childBean.getCount() == 0) { |
| 178 | + final PopupWindow popupWindow = new PopupWindow(); | ||
| 179 | + popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); | ||
| 180 | + popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); | ||
| 181 | + backgroundAlpha(0.5f); | ||
| 182 | + View view1 = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_view, null); | ||
| 183 | + TextView dialog_info = view1.findViewById(R.id.dialog_info); | ||
| 184 | + dialog_info.setText("请前往订购中心\n订购“智能校卫”\n才能够使用相关应用功能"); | ||
| 185 | + dialog_info.setGravity(Gravity.CENTER); | ||
| 186 | + TextView right_btn = view1.findViewById(R.id.right_btn); | ||
| 187 | + right_btn.setText("前往订购"); | ||
| 188 | + right_btn.setOnClickListener(new View.OnClickListener() { | ||
| 189 | + @Override | ||
| 190 | + public void onClick(View v) { | ||
| 191 | + popupWindow.dismiss(); | ||
| 192 | + backgroundAlpha(1f); | ||
| 193 | + Bundle bundle = new Bundle(); | ||
| 194 | + bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" + | ||
| 195 | + AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID)); | ||
| 196 | + bundle.putInt("type", AppConfig.ORDER_CENTER); | ||
| 197 | + startNewActivity(WebViewActivity.class, bundle); | ||
| 198 | + | ||
| 199 | + } | ||
| 200 | + }); | ||
| 201 | + TextView cancel_btn = view1.findViewById(R.id.cancel_btn); | ||
| 202 | + cancel_btn.setOnClickListener(new View.OnClickListener() { | ||
| 203 | + @Override | ||
| 204 | + public void onClick(View v) { | ||
| 205 | + popupWindow.dismiss(); | ||
| 206 | + backgroundAlpha(1f); | ||
| 207 | + } | ||
| 208 | + }); | ||
| 209 | + | ||
| 210 | + popupWindow.setContentView(view1); | ||
| 211 | + popupWindow.showAtLocation(recyclerView, Gravity.CENTER, 0, 0); | ||
| 212 | + return; | ||
| 213 | + } | ||
| 214 | 214 | ||
| 215 | if (TextUtils.isEmpty(childBean.getCardNumber())) { | 215 | if (TextUtils.isEmpty(childBean.getCardNumber())) { |
| 216 | 216 | ||
| @@ -253,7 +253,7 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | @@ -253,7 +253,7 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | ||
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | public void setChildJson(String jsonStr) { | 255 | public void setChildJson(String jsonStr) { |
| 256 | - this.jsonStr=jsonStr; | 256 | + this.jsonStr = jsonStr; |
| 257 | show(); | 257 | show(); |
| 258 | } | 258 | } |
| 259 | } | 259 | } |