Browse Source

提交分类: 测试版本;
提交内容: 1、工作台UI调整备份
2、修改密码UI初步搭建
当前版本: 正式版本6.2.9
是否冲突: 否

raomeng 7 years ago
parent
commit
8225521030
100 changed files with 1303 additions and 473 deletions
  1. 7 6
      WeiChat/src/main/AndroidManifest.xml
  2. 11 3
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/MainActivity.java
  3. 115 7
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorkPlatFragment.java
  4. 68 12
      WeiChat/src/main/res/layout/fragment_work.xml
  5. 37 25
      WeiChat/src/main/res/layout/item_work_parent_layout.xml
  6. 3 3
      WeiChat/version.properties
  7. 10 0
      app_core/common/src/main/assets/work_menu.json
  8. 17 0
      app_core/common/src/main/java/com/core/base/model/ISimpleModel.java
  9. 50 0
      app_core/common/src/main/java/com/core/base/model/SimpleModel.java
  10. 17 0
      app_core/common/src/main/java/com/core/base/presenter/ISimplePresenter.java
  11. 56 0
      app_core/common/src/main/java/com/core/base/presenter/SimplePresenter.java
  12. 12 0
      app_core/common/src/main/java/com/core/base/view/SimpleView.java
  13. 4 0
      app_core/common/src/main/java/com/core/widget/crouton/Crouton.java
  14. 443 394
      app_core/common/src/main/java/com/core/widget/crouton/Manager.java
  15. 9 0
      app_core/common/src/main/res/drawable/shape_gray_slight_corner_white_bg.xml
  16. 1 0
      app_core/common/src/main/res/values-en/strings.xml
  17. 1 0
      app_core/common/src/main/res/values-zh-rCN/strings.xml
  18. 1 0
      app_core/common/src/main/res/values-zh-rTW/strings.xml
  19. 1 0
      app_core/common/src/main/res/values/strings.xml
  20. 7 0
      app_modular/applogin/src/main/AndroidManifest.xml
  21. 7 21
      app_modular/applogin/src/main/java/com/modular/login/activity/LoginActivity.java
  22. 59 0
      app_modular/applogin/src/main/java/com/modular/login/activity/ModifyPasswordEmailActivity.java
  23. 66 0
      app_modular/applogin/src/main/java/com/modular/login/activity/ModifyPasswordModeActivity.java
  24. 71 0
      app_modular/applogin/src/main/java/com/modular/login/activity/ModifyPasswordPhoneActivity.java
  25. BIN
      app_modular/applogin/src/main/res/drawable-hdpi/ic_modify_email.png
  26. BIN
      app_modular/applogin/src/main/res/drawable-hdpi/ic_modify_phone.png
  27. BIN
      app_modular/applogin/src/main/res/drawable-hdpi/ic_verification_code.png
  28. BIN
      app_modular/applogin/src/main/res/drawable-xhdpi/ic_modify_email.png
  29. BIN
      app_modular/applogin/src/main/res/drawable-xhdpi/ic_modify_phone.png
  30. BIN
      app_modular/applogin/src/main/res/drawable-xxhdpi/ic_modify_email.png
  31. BIN
      app_modular/applogin/src/main/res/drawable-xxhdpi/ic_modify_phone.png
  32. 7 0
      app_modular/applogin/src/main/res/layout/activity_modify_password_email.xml
  33. 68 0
      app_modular/applogin/src/main/res/layout/activity_modify_password_mode.xml
  34. 134 0
      app_modular/applogin/src/main/res/layout/activity_modify_password_phone.xml
  35. 6 0
      app_modular/applogin/src/main/res/values-en/strings.xml
  36. 6 0
      app_modular/applogin/src/main/res/values-zh-rCN/strings.xml
  37. 6 0
      app_modular/applogin/src/main/res/values-zh-rTW/strings.xml
  38. 3 0
      app_modular/applogin/src/main/res/values/strings.xml
  39. 0 2
      app_modular/apputils/src/main/res/values/attrs.xml
  40. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/company_salary.png
  41. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_business_services.png
  42. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_device_manage.png
  43. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_attendance_statistics.png
  44. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_b2b_commerce.png
  45. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_backlog.png
  46. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_business_manage.png
  47. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_charitable_donations.png
  48. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_customer_manage.png
  49. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_customer_visit.png
  50. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_data_inquiry.png
  51. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_expense_account.png
  52. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_header_bg.png
  53. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_honor_rank.png
  54. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_invite_register.png
  55. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_leave_request.png
  56. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_meeting_manage.png
  57. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_outwork_sign.png
  58. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_overtime_request.png
  59. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_punch_clock.png
  60. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_real_time_subs.png
  61. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_report_statistics.png
  62. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_sales_data.png
  63. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_special_attendance.png
  64. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_subs_manage.png
  65. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_subscribe_secretary.png
  66. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_travel_request.png
  67. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_usoft_mall.png
  68. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_uu_sports.png
  69. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_work_approval.png
  70. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_work_calendar.png
  71. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_work_work_report.png
  72. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/company_salary.png
  73. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_business_services.png
  74. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_device_manage.png
  75. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_attendance_statistics.png
  76. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_b2b_commerce.png
  77. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_backlog.png
  78. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_business_manage.png
  79. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_charitable_donations.png
  80. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_customer_manage.png
  81. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_customer_visit.png
  82. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_data_inquiry.png
  83. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_expense_account.png
  84. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_honor_rank.png
  85. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_invite_register.png
  86. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_leave_request.png
  87. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_meeting_manage.png
  88. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_outwork_sign.png
  89. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_overtime_request.png
  90. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_punch_clock.png
  91. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_real_time_subs.png
  92. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_report_statistics.png
  93. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_sales_data.png
  94. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_special_attendance.png
  95. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_subs_manage.png
  96. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_subscribe_secretary.png
  97. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_travel_request.png
  98. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_usoft_mall.png
  99. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_uu_sports.png
  100. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_work_approval.png

+ 7 - 6
WeiChat/src/main/AndroidManifest.xml

@@ -129,12 +129,13 @@
 
         <!-- 启动页面 -->
         <activity
-            android:icon="@drawable/uuu"
-            android:name=".ui.SplashActivity">
+            android:name=".ui.SplashActivity"
+            android:icon="@drawable/uuu">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <action android:name="com.modular.main.SplashActivity" />
                 <action android:name="cat.ereza.customactivityoncrash.RESTART" />
+
                 <category android:name="android.intent.category.LAUNCHER" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
@@ -284,7 +285,7 @@
         <activity
             android:name=".ui.MainActivity"
             android:configChanges="keyboardHidden|orientation"
-            android:hardwareAccelerated="false"
+            android:hardwareAccelerated="true"
             android:label="@string/app_name"
             android:launchMode="singleTask"
             android:screenOrientation="portrait"
@@ -559,8 +560,8 @@
             android:name=".video.VideoActivity"
             android:theme="@style/Theme.AppCompat.NoActionBar" />
         <activity
-            android:hardwareAccelerated="true"
-            android:name=".ui.erp.activity.CompanyActivity" />
+            android:name=".ui.erp.activity.CompanyActivity"
+            android:hardwareAccelerated="true" />
 
         <activity android:name=".ui.circle.PhoneSelectActivity" />
         <activity android:name=".ui.erp.activity.crm.ClientActivity">
@@ -1073,7 +1074,7 @@
             </intent-filter>
         </activity>
 
-        <service android:name="com.core.service.InitializeService"/>
+        <service android:name="com.core.service.InitializeService" />
     </application>
 
 </manifest>

+ 11 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/MainActivity.java

@@ -265,6 +265,7 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
     private DivideRadioGroup.OnCheckedChangeListener mTabRadioGroupChangeListener = new DivideRadioGroup.OnCheckedChangeListener() {
         @Override
         public void onCheckedChanged(DivideRadioGroup group, int checkedId) {
+            getSupportActionBar().show();
             if (checkedId == R.id.main_tab_one) {
                 if (mMessageFragment == null) {
                     mMessageFragment = new MessageFragment();
@@ -293,6 +294,7 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
                 if (mWorksFragment == null) {
                     mWorksFragment = new WorkPlatFragment();
                 }
+                getSupportActionBar().hide();
                 changeFragment(mWorksFragment, TAG_NEARBY);
                 String role = com.core.utils.CommonUtil.getUserRole();
                 if (role.equals("2")) {
@@ -348,7 +350,9 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
                     //获取到数据
                     try {
                         List<CircleMessage> datas = result.getData();
-                        if (ListUtils.isEmpty(datas)) return;
+                        if (ListUtils.isEmpty(datas)) {
+                            return;
+                        }
                         long time = datas.get(0).getTime();
                         String userId = datas.get(0).getUserId();
                         Long oldTime = PreferenceUtils.getLong("TIMEMAIN", -1);
@@ -580,7 +584,7 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
         autoPresenter = AutoPresenter.onCreate();
 //		startService(new Intent(MainActivity.this, AutoErpService.class));
         LogUtil.d("OnCreate end:" + DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS));
-       
+
     }
 
     private AutoPresenter autoPresenter;
@@ -949,13 +953,17 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
             return;
         }
         if (!addFragment.isAdded())// 如果还没有添加,就加上
+        {
             fragmentTransaction.add(R.id.main_content, addFragment, tag);
-        if (addFragment.isDetached())
+        }
+        if (addFragment.isDetached()) {
             fragmentTransaction.attach(addFragment);
+        }
         mLastFragment = addFragment;
         fragmentTransaction.commitAllowingStateLoss();
     }
 
+    @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         if (keyCode == KeyEvent.KEYCODE_BACK) {
             Intent intent = new Intent(Intent.ACTION_MAIN);

+ 115 - 7
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorkPlatFragment.java

@@ -2,12 +2,16 @@ package com.xzjmyk.pm.activity.ui.erp.fragment;
 
 import android.content.Intent;
 import android.content.res.Resources;
+import android.support.v7.widget.Toolbar;
+import android.text.TextUtils;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.TextView;
 
@@ -25,6 +29,11 @@ import com.core.app.MyApplication;
 import com.core.base.fragment.BaseMVPFragment;
 import com.me.network.app.base.HttpParams;
 import com.me.network.app.http.Method;
+import com.scwang.smartrefresh.layout.api.RefreshFooter;
+import com.scwang.smartrefresh.layout.api.RefreshHeader;
+import com.scwang.smartrefresh.layout.api.RefreshLayout;
+import com.scwang.smartrefresh.layout.constant.RefreshState;
+import com.scwang.smartrefresh.layout.listener.OnMultiPurposeListener;
 import com.uas.appworks.model.bean.WorkMenuBean;
 import com.uas.appworks.presenter.WorkPlatPresenter;
 import com.uas.appworks.view.WorkPlatView;
@@ -52,10 +61,14 @@ public class WorkPlatFragment extends BaseMVPFragment<WorkPlatPresenter> impleme
     private List<WorkMenuBean> mWorkMenuBeans;
     private WorkMenuParentAdapter mWorkMenuParentAdapter;
     private boolean isB2b;
-    private TextView mSetTextView;
+    private TextView mSetTextView, mMasterTextView;
     private List<WorkMenuBean> mCacheMenuTypeBeans;
     private String mUserId, mCompanyName, mMaster;
     private Resources mResources;
+    private RefreshLayout mRefreshLayout;
+    private ImageView mHeaderImageView, mFuncImageView;
+    private Toolbar mToolbar;
+    private int mHeaderHeight;
 
     @Override
     protected WorkPlatPresenter initPresenter() {
@@ -73,6 +86,14 @@ public class WorkPlatFragment extends BaseMVPFragment<WorkPlatPresenter> impleme
             setHasOptionsMenu(true);
             isB2b = ApiUtils.getApiModel() instanceof ApiPlatform;
             mWorkMenuListView = $(R.id.work_menu_lv);
+            mRefreshLayout = $(R.id.fragment_work_refreshLayout);
+            mHeaderImageView = $(R.id.work_plat_main_header_iv);
+            mMasterTextView = $(R.id.work_plat_master_name_tv);
+            mFuncImageView = $(R.id.work_plat_func_set_iv);
+            mToolbar = $(R.id.work_plat_main_toolbar);
+
+            ViewGroup.LayoutParams layoutParams = mHeaderImageView.getLayoutParams();
+            mHeaderHeight = layoutParams.height;
 
             View setItem = LayoutInflater.from(mContext).inflate(R.layout.layout_work_plat_set, null);
             mSetTextView = (TextView) setItem.findViewById(R.id.work_plat_set_tv);
@@ -107,6 +128,83 @@ public class WorkPlatFragment extends BaseMVPFragment<WorkPlatPresenter> impleme
                 }
             });
         }
+
+        if (mFuncImageView != null) {
+            mFuncImageView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    startActivityForResult("com.modular.work.WorkFuncSetActivity", Constants.WORK_FUNC_SET);
+                }
+            });
+        }
+
+        if (mRefreshLayout != null) {
+            mRefreshLayout.setOnMultiPurposeListener(new OnMultiPurposeListener() {
+                @Override
+                public void onStateChanged(RefreshLayout refreshLayout, RefreshState oldState, RefreshState newState) {
+
+                }
+
+                @Override
+                public void onRefresh(RefreshLayout refreshlayout) {
+
+                }
+
+                @Override
+                public void onLoadmore(RefreshLayout refreshlayout) {
+
+                }
+
+                @Override
+                public void onHeaderPulling(RefreshHeader header, float percent, int offset, int headerHeight, int extendHeight) {
+                    Log.d("工作台下拉", "offset->" + offset + "||percent->" + percent + "||headerHeight->" + headerHeight + "||extendHeight->" + extendHeight);
+
+                    ViewGroup.LayoutParams layoutParams = mHeaderImageView.getLayoutParams();
+                    layoutParams.height = (int) (mHeaderHeight * (1 + percent));
+                    mHeaderImageView.setLayoutParams(layoutParams);
+                }
+
+                @Override
+                public void onHeaderReleasing(RefreshHeader header, float percent, int offset, int headerHeight, int extendHeight) {
+                    Log.d("工作台释放", "offset->" + offset + "||percent->" + percent + "||headerHeight->" + headerHeight + "||extendHeight->" + extendHeight);
+
+                    ViewGroup.LayoutParams layoutParams = mHeaderImageView.getLayoutParams();
+                    layoutParams.height = (int) (mHeaderHeight * (1 + percent));
+                    mHeaderImageView.setLayoutParams(layoutParams);
+                }
+
+                @Override
+                public void onHeaderStartAnimator(RefreshHeader header, int headerHeight, int extendHeight) {
+
+                }
+
+                @Override
+                public void onHeaderFinish(RefreshHeader header, boolean success) {
+                    mHeaderImageView.requestLayout();
+                }
+
+                @Override
+                public void onFooterPulling(RefreshFooter footer, float percent, int offset, int footerHeight, int extendHeight) {
+
+                }
+
+                @Override
+                public void onFooterReleasing(RefreshFooter footer, float percent, int offset, int footerHeight, int extendHeight) {
+
+                }
+
+                @Override
+                public void onFooterStartAnimator(RefreshFooter footer, int footerHeight, int extendHeight) {
+
+                }
+
+                @Override
+                public void onFooterFinish(RefreshFooter footer, boolean success) {
+
+                }
+            });
+        }
+
     }
 
     @Override
@@ -125,47 +223,51 @@ public class WorkPlatFragment extends BaseMVPFragment<WorkPlatPresenter> impleme
             //个人用户
             if (userId != null) {
                 if (!userId.equals(mUserId)) {
-                    LogUtil.d("工作台","loadMenu1");
+                    LogUtil.d("工作台", "loadMenu1");
                     mPresenter.uasRequest(mContext, new HttpParams.Builder().flag(Constants.LOAD_WORK_MENU_CACHE).build());
                 }
             } else {
-                LogUtil.d("工作台","loadMenu2");
+                LogUtil.d("工作台", "loadMenu2");
                 mPresenter.uasRequest(mContext, new HttpParams.Builder().flag(Constants.LOAD_WORK_MENU_CACHE).build());
             }
             mUserId = userId;
             mCompanyName = "";
             mMaster = "";
+            mMasterTextView.setText(getString(R.string.work_title));
         } else if (role.equals("3")) {
             //b2b用户
             String companyName = com.core.utils.CommonUtil.getSharedPreferences(mContext, "companyName");
             if (companyName != null && userId != null) {
                 if ((!userId.equals(mUserId) || !companyName.equals(mCompanyName))) {
-                    LogUtil.d("工作台","loadMenu1");
+                    LogUtil.d("工作台", "loadMenu1");
                     mPresenter.uasRequest(mContext, new HttpParams.Builder().flag(Constants.LOAD_WORK_MENU_CACHE).build());
                 }
             } else {
-                LogUtil.d("工作台","loadMenu2");
+                LogUtil.d("工作台", "loadMenu2");
                 mPresenter.uasRequest(mContext, new HttpParams.Builder().flag(Constants.LOAD_WORK_MENU_CACHE).build());
             }
             mUserId = userId;
             mCompanyName = companyName;
             mMaster = "";
+            mMasterTextView.setText(getString(R.string.work_title));
         } else if (role.equals("2")) {
             //ERP用户
             String erp_company = com.core.utils.CommonUtil.getSharedPreferences(mContext, "erp_commpany");
             String erp_master = com.core.utils.CommonUtil.getSharedPreferences(mContext, "erp_master");
             if (erp_company != null && erp_master != null && userId != null) {
                 if ((!userId.equals(mUserId) || !erp_company.equals(mCompanyName) || !erp_master.equals(mMaster))) {
-                    LogUtil.d("工作台","loadMenu1");
+                    LogUtil.d("工作台", "loadMenu1");
                     mPresenter.uasRequest(mContext, new HttpParams.Builder().flag(Constants.LOAD_WORK_MENU_CACHE).build());
                 }
             } else {
-                LogUtil.d("工作台","loadMenu2");
+                LogUtil.d("工作台", "loadMenu2");
                 mPresenter.uasRequest(mContext, new HttpParams.Builder().flag(Constants.LOAD_WORK_MENU_CACHE).build());
             }
             mUserId = userId;
             mCompanyName = erp_company;
             mMaster = erp_master;
+            String master_ch = CommonUtil.getSharedPreferences(mContext, "Master_ch");
+            mMasterTextView.setText(TextUtils.isEmpty(master_ch) ? getString(R.string.work_title) : master_ch);
         }
     }
 
@@ -188,6 +290,12 @@ public class WorkPlatFragment extends BaseMVPFragment<WorkPlatPresenter> impleme
         mPresenter.uasRequest(mContext, request);
     }
 
+    public void setTitle(String title) {
+        if (mMasterTextView != null) {
+            mMasterTextView.setText(title);
+        }
+    }
+
     @Override
     public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
         super.onCreateOptionsMenu(menu, inflater);

+ 68 - 12
WeiChat/src/main/res/layout/fragment_work.xml

@@ -1,18 +1,74 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="#e9f0f5"
+    android:orientation="vertical">
 
-    <ListView
-        android:id="@+id/work_menu_lv"
+    <ImageView
+        android:id="@+id/work_plat_main_header_iv"
+        android:layout_width="match_parent"
+        android:layout_height="100dp"
+        android:scaleType="fitXY"
+        android:src="@drawable/ic_work_header_bg" />
+
+    <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:background="@color/white"
-        android:divider="#cecaca"
-        android:dividerHeight="0.5dp"
-        android:overScrollMode="never"
-        android:scrollbars="none"
-        android:scrollingCache="false"
-        />
-</LinearLayout>
+        android:orientation="vertical">
+
+        <android.support.v7.widget.Toolbar
+            android:id="@+id/work_plat_main_toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="56dp">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/work_plat_master_name_tv"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:textColor="@color/white"
+                    android:textSize="16sp"
+                    tools:text="英唐集团" />
+
+                <ImageView
+                    android:id="@+id/work_plat_func_set_iv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginRight="16dp"
+                    android:src="@drawable/ic_work_func_manage" />
+            </LinearLayout>
+
+        </android.support.v7.widget.Toolbar>
+
+        <com.scwang.smartrefresh.layout.SmartRefreshLayout
+            android:id="@+id/fragment_work_refreshLayout"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/transparent"
+            app:srlDragRate="0.5"
+            app:srlEnablePureScrollMode="true">
+
+            <ListView
+                android:id="@+id/work_menu_lv"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="8dp"
+                android:layout_marginRight="8dp"
+                android:divider="@null"
+                android:overScrollMode="never"
+                android:scrollbars="none"
+                android:scrollingCache="false" />
+        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+    </LinearLayout>
+
+</FrameLayout>

+ 37 - 25
WeiChat/src/main/res/layout/item_work_parent_layout.xml

@@ -1,37 +1,49 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<android.support.v7.widget.CardView
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:card_view="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
+    android:layout_height="wrap_content"
+    app:cardBackgroundColor="@color/white"
+    app:cardCornerRadius="6dp"
+    app:cardElevation="5dp"
+    app:cardPreventCornerOverlap="true"
+    app:cardUseCompatPadding="true">
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center_vertical"
-        android:orientation="horizontal">
+        android:layout_height="match_parent"
+        android:orientation="vertical">
 
-        <View
-            android:layout_width="6dp"
-            android:layout_height="12dp"
-            android:layout_marginLeft="10dp"
-            android:background="@color/titleBlue" />
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="horizontal">
+
+            <View
+                android:layout_width="6dp"
+                android:layout_height="14dp"
+                android:background="@color/black" />
 
-        <TextView
-            android:id="@+id/work_parent_title_tv"
+            <TextView
+                android:id="@+id/work_parent_title_tv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="6dp"
+                android:textColor="@color/black"
+                android:textSize="14sp" />
+        </LinearLayout>
+
+        <com.core.widget.view.MyGridView
+            android:id="@+id/work_parent_gv"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:padding="6dp"
-            android:textColor="@color/black"
-            android:textSize="14sp" />
+            android:layout_marginBottom="10dp"
+            android:layout_marginTop="8dp"
+            android:numColumns="4"
+            android:scrollbars="none" />
     </LinearLayout>
-
-    <com.core.widget.view.MyGridView
-        android:id="@+id/work_parent_gv"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="10dp"
-        android:numColumns="4"
-        android:scrollbars="none" />
-</LinearLayout>
+</android.support.v7.widget.CardView>

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Fri Apr 27 16:51:25 CST 2018
+#Thu May 03 18:27:25 CST 2018
 debugName=164
-versionName=614
+versionName=631
 debugCode=164
-versionCode=153
+versionCode=171

+ 10 - 0
app_core/common/src/main/assets/work_menu.json

@@ -45,6 +45,16 @@
         "menuUrl": "",
         "caller": "",
         "isHide": false
+      },
+      {
+        "isLocalMenu": true,
+        "menuName": "产城服务",
+        "menuIcon": "ic_work_city_industry_service",
+        "menuActivity": "com.modular.cityIndustry.CityIndustryServiceMainActivity",
+        "menuTag": "local_city_industry",
+        "menuUrl": "",
+        "caller": "",
+        "isHide": false
       }
     ]
   },

+ 17 - 0
app_core/common/src/main/java/com/core/base/model/ISimpleModel.java

@@ -0,0 +1,17 @@
+package com.core.base.model;
+
+import android.content.Context;
+
+import com.me.network.app.base.HttpCallback;
+import com.me.network.app.base.HttpParams;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/5/4 9:53
+ */
+public interface ISimpleModel extends BaseModel {
+
+    void httpRequest(Context context, String host, HttpParams httpParams, HttpCallback httpCallback);
+
+}

+ 50 - 0
app_core/common/src/main/java/com/core/base/model/SimpleModel.java

@@ -0,0 +1,50 @@
+package com.core.base.model;
+
+import android.content.Context;
+import android.text.TextUtils;
+
+import com.core.app.R;
+import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
+import com.me.network.app.base.HttpCallback;
+import com.me.network.app.base.HttpParams;
+import com.me.network.app.http.HttpRequest;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/5/4 9:52
+ */
+public class SimpleModel implements ISimpleModel {
+
+    @Override
+    public void httpRequest(Context context, String host, HttpParams httpParams, HttpCallback httpCallback) {
+        final int what = httpParams.getFlag();
+        if (!CommonUtil.isNetWorkConnected(context)) {
+            if (httpCallback != null) {
+                try {
+                    httpCallback.onFail(what, context.getString(R.string.networks_out));
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            } else {
+                ToastUtil.showToast(context, R.string.networks_out);
+            }
+            return;
+        }
+        if (TextUtils.isEmpty(host)) {
+            if (httpCallback != null) {
+                try {
+                    httpCallback.onFail(what, context.getString(R.string.host_null_please_login_retry));
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            } else {
+                ToastUtil.showToast(context, R.string.host_null_please_login_retry);
+            }
+            return;
+        }
+        HttpRequest.getInstance().sendRequest(host, httpParams, httpCallback);
+    }
+
+}

+ 17 - 0
app_core/common/src/main/java/com/core/base/presenter/ISimplePresenter.java

@@ -0,0 +1,17 @@
+package com.core.base.presenter;
+
+import android.content.Context;
+
+import com.core.base.view.SimpleView;
+import com.me.network.app.base.HttpParams;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/5/4 9:48
+ */
+public interface ISimplePresenter extends BasePresenter<SimpleView> {
+
+    void httpRequest(Context context, String host, HttpParams httpParams);
+
+}

+ 56 - 0
app_core/common/src/main/java/com/core/base/presenter/SimplePresenter.java

@@ -0,0 +1,56 @@
+package com.core.base.presenter;
+
+import android.content.Context;
+
+import com.core.base.model.SimpleModel;
+import com.core.base.view.SimpleView;
+import com.me.network.app.base.HttpCallback;
+import com.me.network.app.base.HttpParams;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/5/4 9:47
+ */
+public class SimplePresenter implements ISimplePresenter, HttpCallback<String> {
+    private SimpleModel mSimpleModel;
+    private SimpleView mSimpleView;
+
+    @Override
+    public void attachView(SimpleView view) {
+        mSimpleView = view;
+        mSimpleModel = new SimpleModel();
+    }
+
+    @Override
+    public void detachView() {
+        mSimpleView = null;
+    }
+
+    @Override
+    public void httpRequest(Context context, String host, HttpParams httpParams) {
+        if (mSimpleView != null) {
+            mSimpleView.showLoading(null);
+        }
+
+        if (mSimpleModel != null) {
+            mSimpleModel.httpRequest(context, host, httpParams, this);
+        }
+    }
+
+    @Override
+    public void onSuccess(int what, String result) {
+        if (mSimpleView != null) {
+            mSimpleView.hideLoading();
+            mSimpleView.requestSuccess(what, result);
+        }
+    }
+
+    @Override
+    public void onFail(int what, String failStr) {
+        if (mSimpleView != null) {
+            mSimpleView.hideLoading();
+            mSimpleView.requestError(what, failStr);
+        }
+    }
+}

+ 12 - 0
app_core/common/src/main/java/com/core/base/view/SimpleView.java

@@ -0,0 +1,12 @@
+package com.core.base.view;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/5/4 9:48
+ */
+public interface SimpleView extends BaseView {
+    void requestSuccess(int what, Object object);
+
+    void requestError(int what, String errorMsg);
+}

+ 4 - 0
app_core/common/src/main/java/com/core/widget/crouton/Crouton.java

@@ -626,6 +626,10 @@ public final class Crouton {
         Manager.getInstance().add(this);
     }
 
+    public void show(boolean isBottom) {
+        Manager.getInstance().add(this, isBottom);
+    }
+
     public Animation getInAnimation() {
         if ((null == this.inAnimation) && (null != this.activity)) {
             if (getConfiguration().inAnimationResId > 0) {

+ 443 - 394
app_core/common/src/main/java/com/core/widget/crouton/Manager.java

@@ -44,438 +44,487 @@ import java.util.concurrent.LinkedBlockingQueue;
  * Manages the lifecycle of {@link Crouton}s.
  */
 final class Manager extends Handler {
-  private static final class Messages {
-    private Messages() { /* no-op */ }
+    private static final class Messages {
+        private Messages() { /* no-op */ }
+
+        public static final int DISPLAY_CROUTON = 0xc2007;
+        public static final int DISPLAY_CROUTON_BOTTOM = 0xc2017;
+        public static final int ADD_CROUTON_TO_VIEW = 0xc20074dd;
+        public static final int ADD_CROUTON_TO_VIEW_BOTTOM = 0xc20075dd;
+        public static final int REMOVE_CROUTON = 0xc2007de1;
+    }
+
+    private static Manager INSTANCE;
 
-    public static final int DISPLAY_CROUTON = 0xc2007;
-    public static final int ADD_CROUTON_TO_VIEW = 0xc20074dd;
-    public static final int REMOVE_CROUTON = 0xc2007de1;
-  }
+    private final Queue<Crouton> croutonQueue;
 
-  private static Manager INSTANCE;
+    private Manager() {
+        croutonQueue = new LinkedBlockingQueue<Crouton>();
+    }
 
-  private final Queue<Crouton> croutonQueue;
+    /**
+     * @return The currently used instance of the {@link Manager}.
+     */
+    static synchronized Manager getInstance() {
+        if (null == INSTANCE) {
+            INSTANCE = new Manager();
+        }
 
-  private Manager() {
-    croutonQueue = new LinkedBlockingQueue<Crouton>();
-  }
+        return INSTANCE;
+    }
 
-  /**
-   * @return The currently used instance of the {@link Manager}.
-   */
-  static synchronized Manager getInstance() {
-    if (null == INSTANCE) {
-      INSTANCE = new Manager();
+    /**
+     * Inserts a {@link Crouton} to be displayed.
+     *
+     * @param crouton The {@link Crouton} to be displayed.
+     */
+    void add(Crouton crouton) {
+        croutonQueue.add(crouton);
+        displayCrouton(false);
     }
 
-    return INSTANCE;
-  }
-
-  /**
-   * Inserts a {@link Crouton} to be displayed.
-   *
-   * @param crouton
-   *     The {@link Crouton} to be displayed.
-   */
-  void add(Crouton crouton) {
-    croutonQueue.add(crouton);
-    displayCrouton();
-  }
-
-  /**
-   * Displays the next {@link Crouton} within the queue.
-   */
-  private void displayCrouton() {
-    if (croutonQueue.isEmpty()) {
-      return;
+    void add(Crouton crouton, boolean isBottom) {
+        croutonQueue.add(crouton);
+        displayCrouton(isBottom);
     }
 
-    // First peek whether the Crouton has an activity.
-    final Crouton currentCrouton = croutonQueue.peek();
+    /**
+     * Displays the next {@link Crouton} within the queue.
+     */
+    private void displayCrouton(boolean isBottom) {
+        if (croutonQueue.isEmpty()) {
+            return;
+        }
 
-    // If the activity is null we poll the Crouton off the queue.
-    if (null == currentCrouton.getActivity()) {
-      croutonQueue.poll();
+        // First peek whether the Crouton has an activity.
+        final Crouton currentCrouton = croutonQueue.peek();
+
+        // If the activity is null we poll the Crouton off the queue.
+        if (null == currentCrouton.getActivity()) {
+            croutonQueue.poll();
+        }
+
+        if (!currentCrouton.isShowing()) {
+            // Display the Crouton
+            if (isBottom) {
+                sendMessage(currentCrouton, Messages.ADD_CROUTON_TO_VIEW_BOTTOM);
+            } else {
+                sendMessage(currentCrouton, Messages.ADD_CROUTON_TO_VIEW);
+            }
+            if (null != currentCrouton.getLifecycleCallback()) {
+                currentCrouton.getLifecycleCallback().onDisplayed();
+            }
+        } else {
+            if (isBottom) {
+                sendMessageDelayed(currentCrouton, Messages.DISPLAY_CROUTON_BOTTOM, calculateCroutonDuration(currentCrouton));
+            } else {
+                sendMessageDelayed(currentCrouton, Messages.DISPLAY_CROUTON, calculateCroutonDuration(currentCrouton));
+            }
+        }
     }
 
-    if (!currentCrouton.isShowing()) {
-      // Display the Crouton
-      sendMessage(currentCrouton, Messages.ADD_CROUTON_TO_VIEW);
-      if (null != currentCrouton.getLifecycleCallback()) {
-        currentCrouton.getLifecycleCallback().onDisplayed();
-      }
-    } else {
-      sendMessageDelayed(currentCrouton, Messages.DISPLAY_CROUTON, calculateCroutonDuration(currentCrouton));
+    private long calculateCroutonDuration(Crouton crouton) {
+        long croutonDuration = crouton.getConfiguration().durationInMilliseconds;
+        croutonDuration += crouton.getInAnimation().getDuration();
+        croutonDuration += crouton.getOutAnimation().getDuration();
+        return croutonDuration;
     }
-  }
-
-  private long calculateCroutonDuration(Crouton crouton) {
-    long croutonDuration = crouton.getConfiguration().durationInMilliseconds;
-    croutonDuration += crouton.getInAnimation().getDuration();
-    croutonDuration += crouton.getOutAnimation().getDuration();
-    return croutonDuration;
-  }
-
-  /**
-   * Sends a {@link Crouton} within a {@link Message}.
-   *
-   * @param crouton
-   *     The {@link Crouton} that should be sent.
-   * @param messageId
-   *     The {@link Message} id.
-   */
-  private void sendMessage(Crouton crouton, final int messageId) {
-    final Message message = obtainMessage(messageId);
-    message.obj = crouton;
-    sendMessage(message);
-  }
-
-  /**
-   * Sends a {@link Crouton} within a delayed {@link Message}.
-   *
-   * @param crouton
-   *     The {@link Crouton} that should be sent.
-   * @param messageId
-   *     The {@link Message} id.
-   * @param delay
-   *     The delay in milliseconds.
-   */
-  private void sendMessageDelayed(Crouton crouton, final int messageId, final long delay) {
-    Message message = obtainMessage(messageId);
-    message.obj = crouton;
-    sendMessageDelayed(message, delay);
-  }
-
-  /*
-   * (non-Javadoc)
-   *
-   * @see android.os.Handler#handleMessage(android.os.Message)
-   */
-  @Override
-  public void handleMessage(Message message) {
-    final Crouton crouton = (Crouton) message.obj;
-    if (null == crouton) {
-      return;
+
+    /**
+     * Sends a {@link Crouton} within a {@link Message}.
+     *
+     * @param crouton   The {@link Crouton} that should be sent.
+     * @param messageId The {@link Message} id.
+     */
+    private void sendMessage(Crouton crouton, final int messageId) {
+        final Message message = obtainMessage(messageId);
+        message.obj = crouton;
+        sendMessage(message);
     }
-    switch (message.what) {
-      case Messages.DISPLAY_CROUTON: {
-        displayCrouton();
-        break;
-      }
-
-      case Messages.ADD_CROUTON_TO_VIEW: {
-        addCroutonToView(crouton);
-        break;
-      }
-
-      case Messages.REMOVE_CROUTON: {
-        removeCrouton(crouton);
-        if (null != crouton.getLifecycleCallback()) {
-          crouton.getLifecycleCallback().onRemoved();
-        }
-        break;
-      }
 
-      default: {
-        super.handleMessage(message);
-        break;
-      }
+    /**
+     * Sends a {@link Crouton} within a delayed {@link Message}.
+     *
+     * @param crouton   The {@link Crouton} that should be sent.
+     * @param messageId The {@link Message} id.
+     * @param delay     The delay in milliseconds.
+     */
+    private void sendMessageDelayed(Crouton crouton, final int messageId, final long delay) {
+        Message message = obtainMessage(messageId);
+        message.obj = crouton;
+        sendMessageDelayed(message, delay);
     }
-  }
-
-  /**
-   * Adds a {@link Crouton} to the {@link ViewParent} of it's {@link Activity}.
-   *
-   * @param crouton
-   *     The {@link Crouton} that should be added.
-   */
-  private void addCroutonToView(final Crouton crouton) {
-    // don't add if it is already showing
-    if (crouton.isShowing()) {
-      return;
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see android.os.Handler#handleMessage(android.os.Message)
+     */
+    @Override
+    public void handleMessage(Message message) {
+        final Crouton crouton = (Crouton) message.obj;
+        if (null == crouton) {
+            return;
+        }
+        switch (message.what) {
+            case Messages.DISPLAY_CROUTON: {
+                displayCrouton(false);
+                break;
+            }
+
+            case Messages.DISPLAY_CROUTON_BOTTOM: {
+                displayCrouton(true);
+                break;
+            }
+
+            case Messages.ADD_CROUTON_TO_VIEW: {
+                addCroutonToView(crouton, false);
+                break;
+            }
+
+            case Messages.ADD_CROUTON_TO_VIEW_BOTTOM: {
+                addCroutonToView(crouton, true);
+                break;
+            }
+
+            case Messages.REMOVE_CROUTON: {
+                removeCrouton(crouton);
+                if (null != crouton.getLifecycleCallback()) {
+                    crouton.getLifecycleCallback().onRemoved();
+                }
+                break;
+            }
+
+            default: {
+                super.handleMessage(message);
+                break;
+            }
+        }
     }
 
-    final View croutonView = crouton.getView();
-    if (null == croutonView.getParent()) {
-      ViewGroup.LayoutParams params = croutonView.getLayoutParams();
-      if (null == params) {
-        params =
-            new ViewGroup.MarginLayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-      }
-      // display Crouton in ViewGroup if it has been supplied
-      if (null != crouton.getViewGroup()) {
-        final ViewGroup croutonViewGroup = crouton.getViewGroup();
-        if (shouldAddViewWithoutPosition(croutonViewGroup)) {
-          croutonViewGroup.addView(croutonView, params);
-        } else {
-          croutonViewGroup.addView(croutonView, 0, params);
+    /**
+     * Adds a {@link Crouton} to the {@link ViewParent} of it's {@link Activity}.
+     *
+     * @param crouton The {@link Crouton} that should be added.
+     */
+    private void addCroutonToView(final Crouton crouton, boolean isBottom) {
+        // don't add if it is already showing
+        if (crouton.isShowing()) {
+            return;
         }
-      } else {
-        Activity activity = crouton.getActivity();
-        if (null == activity || activity.isFinishing()) {
-          return;
+
+        final View croutonView = crouton.getView();
+        if (null == croutonView.getParent()) {
+            ViewGroup.LayoutParams params = croutonView.getLayoutParams();
+            if (null == params) {
+                params =
+                        new ViewGroup.MarginLayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+            }
+            // display Crouton in ViewGroup if it has been supplied
+
+            if (null != crouton.getViewGroup()) {
+                final ViewGroup croutonViewGroup = crouton.getViewGroup();
+                if (isBottom) {
+                    Activity activity = crouton.getActivity();
+                    if (null == activity || activity.isFinishing()) {
+                        return;
+                    }
+                    handleTranslucentActionBar((ViewGroup.MarginLayoutParams) params, activity, croutonViewGroup);
+                    handleActionBarOverlay((ViewGroup.MarginLayoutParams) params, activity, croutonViewGroup);
+
+                    activity.addContentView(croutonView, params);
+                } else {
+                    if (shouldAddViewWithoutPosition(croutonViewGroup)) {
+                        croutonViewGroup.addView(croutonView, params);
+                    } else {
+                        croutonViewGroup.addView(croutonView, 0, params);
+                    }
+                }
+            } else {
+                Activity activity = crouton.getActivity();
+                if (null == activity || activity.isFinishing()) {
+                    return;
+                }
+                handleTranslucentActionBar((ViewGroup.MarginLayoutParams) params, activity);
+                handleActionBarOverlay((ViewGroup.MarginLayoutParams) params, activity);
+
+                activity.addContentView(croutonView, params);
+            }
+
+        }
+
+        croutonView.requestLayout(); // This is needed so the animation can use the measured with/height
+        ViewTreeObserver observer = croutonView.getViewTreeObserver();
+        if (null != observer) {
+            observer.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+                @Override
+                @TargetApi(16)
+                public void onGlobalLayout() {
+                    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
+                        croutonView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
+                    } else {
+                        croutonView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
+                    }
+
+                    if (crouton.getInAnimation() != null) {
+                        croutonView.startAnimation(crouton.getInAnimation());
+                        announceForAccessibilityCompat(crouton.getActivity(), crouton.getText());
+                        if (Configuration.DURATION_INFINITE != crouton.getConfiguration().durationInMilliseconds) {
+                            sendMessageDelayed(crouton, Messages.REMOVE_CROUTON,
+                                    crouton.getConfiguration().durationInMilliseconds + crouton.getInAnimation().getDuration());
+                        }
+                    }
+                }
+            });
         }
-        handleTranslucentActionBar((ViewGroup.MarginLayoutParams) params, activity);
-        handleActionBarOverlay((ViewGroup.MarginLayoutParams) params, activity);
+    }
 
-        activity.addContentView(croutonView, params);
-      }
+    private boolean shouldAddViewWithoutPosition(ViewGroup croutonViewGroup) {
+        return croutonViewGroup instanceof FrameLayout || croutonViewGroup instanceof AdapterView ||
+                croutonViewGroup instanceof RelativeLayout;
     }
 
-    croutonView.requestLayout(); // This is needed so the animation can use the measured with/height
-    ViewTreeObserver observer = croutonView.getViewTreeObserver();
-    if (null != observer) {
-      observer.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
-        @Override
-        @TargetApi(16)
-        public void onGlobalLayout() {
-          if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
-            croutonView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
-          } else {
-            croutonView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
-          }
-
-          if(crouton.getInAnimation() != null) {
-            croutonView.startAnimation(crouton.getInAnimation());
-            announceForAccessibilityCompat(crouton.getActivity(), crouton.getText());
-            if (Configuration.DURATION_INFINITE != crouton.getConfiguration().durationInMilliseconds) {
-              sendMessageDelayed(crouton, Messages.REMOVE_CROUTON,
-                  crouton.getConfiguration().durationInMilliseconds + crouton.getInAnimation().getDuration());
+    @TargetApi(19)
+    private void handleTranslucentActionBar(ViewGroup.MarginLayoutParams params, Activity activity) {
+        // Translucent status is only available as of Android 4.4 Kit Kat.
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+            final int flags = activity.getWindow().getAttributes().flags;
+            final int translucentStatusFlag = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
+            if ((flags & translucentStatusFlag) == translucentStatusFlag) {
+                setActionBarMargin(params, activity);
             }
-          }
         }
-      });
     }
-  }
-
-  private boolean shouldAddViewWithoutPosition(ViewGroup croutonViewGroup) {
-    return croutonViewGroup instanceof FrameLayout || croutonViewGroup instanceof AdapterView ||
-        croutonViewGroup instanceof RelativeLayout;
-  }
-
-  @TargetApi(19)
-  private void handleTranslucentActionBar(ViewGroup.MarginLayoutParams params, Activity activity) {
-    // Translucent status is only available as of Android 4.4 Kit Kat.
-    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
-      final int flags = activity.getWindow().getAttributes().flags;
-      final int translucentStatusFlag = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
-      if ((flags & translucentStatusFlag) == translucentStatusFlag) {
-        setActionBarMargin(params, activity);
-      }
+
+    @TargetApi(11)
+    private void handleActionBarOverlay(ViewGroup.MarginLayoutParams params, Activity activity) {
+        // ActionBar overlay is only available as of Android 3.0 Honeycomb.
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+            final boolean flags = activity.getWindow().hasFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
+            if (flags) {
+                setActionBarMargin(params, activity);
+            }
+        }
     }
-  }
-
-  @TargetApi(11)
-  private void handleActionBarOverlay(ViewGroup.MarginLayoutParams params, Activity activity) {
-    // ActionBar overlay is only available as of Android 3.0 Honeycomb.
-    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
-      final boolean flags = activity.getWindow().hasFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
-      if (flags) {
-        setActionBarMargin(params, activity);
-      }
+
+    @TargetApi(19)
+    private void handleTranslucentActionBar(ViewGroup.MarginLayoutParams params, Activity activity, View view) {
+        // Translucent status is only available as of Android 4.4 Kit Kat.
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+            setActionBarMargin(params, activity, view);
+        }
     }
-  }
-
-  private void setActionBarMargin(ViewGroup.MarginLayoutParams params, Activity activity) {
-    final int actionBarContainerId = Resources.getSystem().getIdentifier("action_bar_container", "id", "android");
-    final View actionBarContainer = activity.findViewById(actionBarContainerId);
-    // The action bar is present: the app is using a Holo theme.
-    if (null != actionBarContainer) {
-      params.topMargin = actionBarContainer.getBottom();
+
+    @TargetApi(11)
+    private void handleActionBarOverlay(ViewGroup.MarginLayoutParams params, Activity activity, View view) {
+        // ActionBar overlay is only available as of Android 3.0 Honeycomb.
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+            setActionBarMargin(params, activity, view);
+        }
     }
-  }
-
-  /**
-   * Removes the {@link Crouton}'s view after it's display
-   * durationInMilliseconds.
-   *
-   * @param crouton
-   *     The {@link Crouton} added to a {@link ViewGroup} and should be
-   *     removed.
-   */
-  protected void removeCrouton(Crouton crouton) {
-    // If the crouton hasn't been displayed yet a `Crouton.hide()` will fail to hide
-    // it since the DISPLAY message might still be in the queue. Remove all messages
-    // for this crouton.
-    removeAllMessagesForCrouton(crouton);
-
-    View croutonView = crouton.getView();
-    ViewGroup croutonParentView = (ViewGroup) croutonView.getParent();
-
-    if (null != croutonParentView) {
-      croutonView.startAnimation(crouton.getOutAnimation());
-
-      // Remove the Crouton from the queue.
-      Crouton removed = croutonQueue.poll();
-
-      // Remove the crouton from the view's parent.
-      croutonParentView.removeView(croutonView);
-      if (null != removed) {
-        removed.detachActivity();
-        removed.detachViewGroup();
-        if (null != removed.getLifecycleCallback()) {
-          removed.getLifecycleCallback().onRemoved();
+
+    private void setActionBarMargin(ViewGroup.MarginLayoutParams params, Activity activity) {
+        final int actionBarContainerId = Resources.getSystem().getIdentifier("action_bar_container", "id", "android");
+        final View actionBarContainer = activity.findViewById(actionBarContainerId);
+        // The action bar is present: the app is using a Holo theme.
+        if (null != actionBarContainer) {
+            params.topMargin = actionBarContainer.getBottom();
         }
-        removed.detachLifecycleCallback();
-      }
+    }
 
-      // Send a message to display the next crouton but delay it by the out
-      // animation duration to make sure it finishes
-      sendMessageDelayed(crouton, Messages.DISPLAY_CROUTON, crouton.getOutAnimation().getDuration());
+    private void setActionBarMargin(ViewGroup.MarginLayoutParams params, Activity activity, View container) {
+        if (null != container) {
+            params.topMargin = container.getBottom();
+        }
     }
-  }
-
-  /**
-   * Removes a {@link Crouton} immediately, even when it's currently being
-   * displayed.
-   *
-   * @param crouton
-   *     The {@link Crouton} that should be removed.
-   */
-  void removeCroutonImmediately(Crouton crouton) {
-    // if Crouton has already been displayed then it may not be in the queue (because it was popped).
-    // This ensures the displayed Crouton is removed from its parent immediately, whether another instance
-    // of it exists in the queue or not.
-    // Note: crouton.isShowing() is false here even if it really is showing, as croutonView object in
-    // Crouton seems to be out of sync with reality!
-    if (null != crouton.getActivity() && null != crouton.getView() && null != crouton.getView().getParent()) {
-      ((ViewGroup) crouton.getView().getParent()).removeView(crouton.getView());
-
-      // remove any messages pending for the crouton
-      removeAllMessagesForCrouton(crouton);
+
+    /**
+     * Removes the {@link Crouton}'s view after it's display
+     * durationInMilliseconds.
+     *
+     * @param crouton The {@link Crouton} added to a {@link ViewGroup} and should be
+     *                removed.
+     */
+    protected void removeCrouton(Crouton crouton) {
+        // If the crouton hasn't been displayed yet a `Crouton.hide()` will fail to hide
+        // it since the DISPLAY message might still be in the queue. Remove all messages
+        // for this crouton.
+        removeAllMessagesForCrouton(crouton);
+
+        View croutonView = crouton.getView();
+        ViewGroup croutonParentView = (ViewGroup) croutonView.getParent();
+
+        if (null != croutonParentView) {
+            croutonView.startAnimation(crouton.getOutAnimation());
+
+            // Remove the Crouton from the queue.
+            Crouton removed = croutonQueue.poll();
+
+            // Remove the crouton from the view's parent.
+            croutonParentView.removeView(croutonView);
+            if (null != removed) {
+                removed.detachActivity();
+                removed.detachViewGroup();
+                if (null != removed.getLifecycleCallback()) {
+                    removed.getLifecycleCallback().onRemoved();
+                }
+                removed.detachLifecycleCallback();
+            }
+
+            // Send a message to display the next crouton but delay it by the out
+            // animation duration to make sure it finishes
+            sendMessageDelayed(crouton, Messages.DISPLAY_CROUTON, crouton.getOutAnimation().getDuration());
+        }
     }
-    // remove any matching croutons from queue
-    final Iterator<Crouton> croutonIterator = croutonQueue.iterator();
-    while (croutonIterator.hasNext()) {
-      final Crouton c = croutonIterator.next();
-      if (c.equals(crouton) && (null != c.getActivity())) {
-        // remove the crouton from the content view
-        removeCroutonFromViewParent(crouton);
-
-        // remove any messages pending for the crouton
-        removeAllMessagesForCrouton(c);
-
-        // remove the crouton from the queue
-        croutonIterator.remove();
-
-        // we have found our crouton so just break
-        break;
-      }
+
+    /**
+     * Removes a {@link Crouton} immediately, even when it's currently being
+     * displayed.
+     *
+     * @param crouton The {@link Crouton} that should be removed.
+     */
+    void removeCroutonImmediately(Crouton crouton) {
+        // if Crouton has already been displayed then it may not be in the queue (because it was popped).
+        // This ensures the displayed Crouton is removed from its parent immediately, whether another instance
+        // of it exists in the queue or not.
+        // Note: crouton.isShowing() is false here even if it really is showing, as croutonView object in
+        // Crouton seems to be out of sync with reality!
+        if (null != crouton.getActivity() && null != crouton.getView() && null != crouton.getView().getParent()) {
+            ((ViewGroup) crouton.getView().getParent()).removeView(crouton.getView());
+
+            // remove any messages pending for the crouton
+            removeAllMessagesForCrouton(crouton);
+        }
+        // remove any matching croutons from queue
+        final Iterator<Crouton> croutonIterator = croutonQueue.iterator();
+        while (croutonIterator.hasNext()) {
+            final Crouton c = croutonIterator.next();
+            if (c.equals(crouton) && (null != c.getActivity())) {
+                // remove the crouton from the content view
+                removeCroutonFromViewParent(crouton);
+
+                // remove any messages pending for the crouton
+                removeAllMessagesForCrouton(c);
+
+                // remove the crouton from the queue
+                croutonIterator.remove();
+
+                // we have found our crouton so just break
+                break;
+            }
+        }
     }
-  }
-
-  /**
-   * Removes all {@link Crouton}s from the queue.
-   */
-  void clearCroutonQueue() {
-    removeAllMessages();
-
-    // remove any views that may already have been added to the activity's
-    // content view
-    for (Crouton crouton : croutonQueue) {
-      removeCroutonFromViewParent(crouton);
+
+    /**
+     * Removes all {@link Crouton}s from the queue.
+     */
+    void clearCroutonQueue() {
+        removeAllMessages();
+
+        // remove any views that may already have been added to the activity's
+        // content view
+        for (Crouton crouton : croutonQueue) {
+            removeCroutonFromViewParent(crouton);
+        }
+        croutonQueue.clear();
     }
-    croutonQueue.clear();
-  }
-
-  /**
-   * Removes all {@link Crouton}s for the provided activity. This will remove
-   * crouton from {@link Activity}s content view immediately.
-   */
-  void clearCroutonsForActivity(Activity activity) {
-    Iterator<Crouton> croutonIterator = croutonQueue.iterator();
-    while (croutonIterator.hasNext()) {
-      Crouton crouton = croutonIterator.next();
-      if ((null != crouton.getActivity()) && crouton.getActivity().equals(activity)) {
-        // remove the crouton from the content view
-        removeCroutonFromViewParent(crouton);
 
-        removeAllMessagesForCrouton(crouton);
+    /**
+     * Removes all {@link Crouton}s for the provided activity. This will remove
+     * crouton from {@link Activity}s content view immediately.
+     */
+    void clearCroutonsForActivity(Activity activity) {
+        Iterator<Crouton> croutonIterator = croutonQueue.iterator();
+        while (croutonIterator.hasNext()) {
+            Crouton crouton = croutonIterator.next();
+            if ((null != crouton.getActivity()) && crouton.getActivity().equals(activity)) {
+                // remove the crouton from the content view
+                removeCroutonFromViewParent(crouton);
+
+                removeAllMessagesForCrouton(crouton);
+
+                // remove the crouton from the queue
+                croutonIterator.remove();
+            }
+        }
+    }
+
+    private void removeCroutonFromViewParent(Crouton crouton) {
+        if (crouton.isShowing()) {
+            ViewGroup parent = (ViewGroup) crouton.getView().getParent();
+            if (null != parent) {
+                parent.removeView(crouton.getView());
+            }
+        }
+    }
+
+    private void removeAllMessages() {
+        removeMessages(Messages.ADD_CROUTON_TO_VIEW);
+        removeMessages(Messages.DISPLAY_CROUTON);
+        removeMessages(Messages.REMOVE_CROUTON);
+    }
+
+    private void removeAllMessagesForCrouton(Crouton crouton) {
+        removeMessages(Messages.ADD_CROUTON_TO_VIEW, crouton);
+        removeMessages(Messages.DISPLAY_CROUTON, crouton);
+        removeMessages(Messages.REMOVE_CROUTON, crouton);
 
-        // remove the crouton from the queue
-        croutonIterator.remove();
-      }
     }
-  }
-
-  private void removeCroutonFromViewParent(Crouton crouton) {
-    if (crouton.isShowing()) {
-      ViewGroup parent = (ViewGroup) crouton.getView().getParent();
-      if (null != parent) {
-        parent.removeView(crouton.getView());
-      }
+
+    /**
+     * Generates and dispatches an SDK-specific spoken announcement.
+     * <p>
+     * For backwards compatibility, we're constructing an event from scratch
+     * using the appropriate event type. If your application only targets SDK
+     * 16+, you can just call View.announceForAccessibility(CharSequence).
+     * </p>
+     * <p/>
+     * note: AccessibilityManager is only available from API lvl 4.
+     * <p/>
+     * Adapted from https://http://eyes-free.googlecode.com/files/accessibility_codelab_demos_v2_src.zip
+     * via https://github.com/coreform/android-formidable-validation
+     *
+     * @param context Used to get {@link AccessibilityManager}
+     * @param text    The text to announce.
+     */
+    public static void announceForAccessibilityCompat(Context context, CharSequence text) {
+        if (Build.VERSION.SDK_INT >= 4) {
+            AccessibilityManager accessibilityManager = null;
+            if (null != context) {
+                accessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
+            }
+            if (null == accessibilityManager || !accessibilityManager.isEnabled()) {
+                return;
+            }
+
+            // Prior to SDK 16, announcements could only be made through FOCUSED
+            // events. Jelly Bean (SDK 16) added support for speaking text verbatim
+            // using the ANNOUNCEMENT event type.
+            final int eventType;
+            if (Build.VERSION.SDK_INT < 16) {
+                eventType = AccessibilityEvent.TYPE_VIEW_FOCUSED;
+            } else {
+                eventType = AccessibilityEvent.TYPE_ANNOUNCEMENT;
+            }
+
+            // Construct an accessibility event with the minimum recommended
+            // attributes. An event without a class name or package may be dropped.
+            final AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
+            event.getText().add(text);
+            event.setClassName(Manager.class.getName());
+            event.setPackageName(context.getPackageName());
+
+            // Sends the event directly through the accessibility manager. If your
+            // application only targets SDK 14+, you should just call
+            // getParent().requestSendAccessibilityEvent(this, event);
+            accessibilityManager.sendAccessibilityEvent(event);
+        }
     }
-  }
-
-  private void removeAllMessages() {
-    removeMessages(Messages.ADD_CROUTON_TO_VIEW);
-    removeMessages(Messages.DISPLAY_CROUTON);
-    removeMessages(Messages.REMOVE_CROUTON);
-  }
-
-  private void removeAllMessagesForCrouton(Crouton crouton) {
-    removeMessages(Messages.ADD_CROUTON_TO_VIEW, crouton);
-    removeMessages(Messages.DISPLAY_CROUTON, crouton);
-    removeMessages(Messages.REMOVE_CROUTON, crouton);
-
-  }
-
-  /**
-   * Generates and dispatches an SDK-specific spoken announcement.
-   * <p>
-   * For backwards compatibility, we're constructing an event from scratch
-   * using the appropriate event type. If your application only targets SDK
-   * 16+, you can just call View.announceForAccessibility(CharSequence).
-   * </p>
-   * <p/>
-   * note: AccessibilityManager is only available from API lvl 4.
-   * <p/>
-   * Adapted from https://http://eyes-free.googlecode.com/files/accessibility_codelab_demos_v2_src.zip
-   * via https://github.com/coreform/android-formidable-validation
-   *
-   * @param context
-   *     Used to get {@link AccessibilityManager}
-   * @param text
-   *     The text to announce.
-   */
-  public static void announceForAccessibilityCompat(Context context, CharSequence text) {
-    if (Build.VERSION.SDK_INT >= 4) {
-      AccessibilityManager accessibilityManager = null;
-      if (null != context) {
-        accessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
-      }
-      if (null == accessibilityManager || !accessibilityManager.isEnabled()) {
-        return;
-      }
-
-      // Prior to SDK 16, announcements could only be made through FOCUSED
-      // events. Jelly Bean (SDK 16) added support for speaking text verbatim
-      // using the ANNOUNCEMENT event type.
-      final int eventType;
-      if (Build.VERSION.SDK_INT < 16) {
-        eventType = AccessibilityEvent.TYPE_VIEW_FOCUSED;
-      } else {
-        eventType = AccessibilityEvent.TYPE_ANNOUNCEMENT;
-      }
-
-      // Construct an accessibility event with the minimum recommended
-      // attributes. An event without a class name or package may be dropped.
-      final AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
-      event.getText().add(text);
-      event.setClassName(Manager.class.getName());
-      event.setPackageName(context.getPackageName());
-
-      // Sends the event directly through the accessibility manager. If your
-      // application only targets SDK 14+, you should just call
-      // getParent().requestSendAccessibilityEvent(this, event);
-      accessibilityManager.sendAccessibilityEvent(event);
+
+    @Override
+    public String toString() {
+        return "Manager{" +
+                "croutonQueue=" + croutonQueue +
+                '}';
     }
-  }
-
-  @Override
-  public String toString() {
-    return "Manager{" +
-        "croutonQueue=" + croutonQueue +
-        '}';
-  }
 }

+ 9 - 0
app_core/common/src/main/res/drawable/shape_gray_slight_corner_white_bg.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+    <corners android:radius="6dp"/>
+    <stroke
+        android:width="1dp"
+        android:color="@color/gray"/>
+    <solid android:color="@color/white"/>
+</shape>

+ 1 - 0
app_core/common/src/main/res/values-en/strings.xml

@@ -1633,4 +1633,5 @@
          <string name = "relax_time"> rest time </string>
          <string name = "booking_time_set"> Reservation time period setting </string>
         <string name = "enter_details_money"> Please enter the details amount </string>
+    <string name="host_null_please_login_retry">站点地址获取失败,请重新登录后重试</string>
 </resources>

+ 1 - 0
app_core/common/src/main/res/values-zh-rCN/strings.xml

@@ -1683,4 +1683,5 @@
     <string name="s_table">小桌</string>
     <string name="table_repeat">桌位不可重复设置</string>
     <string name="booking_time_set">预约时间段设置</string>
+    <string name="host_null_please_login_retry">站点地址获取失败,请重新登录后重试</string>
 </resources>

+ 1 - 0
app_core/common/src/main/res/values-zh-rTW/strings.xml

@@ -1683,6 +1683,7 @@
         <string name="relax_time">休息時間</string>
     <string name="booking_time_set">預約時間段設置</string>
     <string name="enter_details_money">請輸入明細金額</string>
+    <string name="host_null_please_login_retry">站点地址获取失败,请重新登录后重试</string>
     <!--end s商家设置-->
 
 </resources>

+ 1 - 0
app_core/common/src/main/res/values/strings.xml

@@ -2029,5 +2029,6 @@
     <string name="c_relaxday">企业休息日</string>
     <string name="room_location">服务/场地/房间</string>
     <string name="relax_time">休息时间</string>
+    <string name="host_null_please_login_retry">站点地址获取失败,请重新登录后重试</string>
     <!--end s商家设置-->
 </resources>

+ 7 - 0
app_modular/applogin/src/main/AndroidManifest.xml

@@ -24,5 +24,12 @@
             android:windowSoftInputMode="adjustResize|stateHidden" />
         <activity android:name=".activity.EnterpriseCompleteActivity" />
         <activity android:name=".activity.IndustryChooseActivity" />
+        <activity android:name=".activity.ModifyPasswordModeActivity" />
+        <activity
+            android:name=".activity.ModifyPasswordPhoneActivity"
+            android:windowSoftInputMode="adjustResize|stateHidden" />
+        <activity
+            android:name=".activity.ModifyPasswordEmailActivity"
+            android:windowSoftInputMode="adjustResize|stateHidden" />
     </application>
 </manifest>

+ 7 - 21
app_modular/applogin/src/main/java/com/modular/login/activity/LoginActivity.java

@@ -19,7 +19,6 @@ import com.common.hmac.Md5Util;
 import com.common.preferences.PreferenceUtils;
 import com.common.system.SystemUtil;
 import com.common.ui.ProgressDialogUtil;
-import com.core.app.Constants;
 import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
 import com.core.model.LoginRegisterResult;
@@ -28,7 +27,6 @@ import com.core.net.volley.ObjectResult;
 import com.core.net.volley.Result;
 import com.core.net.volley.StringJsonObjectRequest;
 import com.core.utils.CommonUtil;
-import com.core.utils.IntentUtils;
 import com.core.utils.ToastUtil;
 import com.core.utils.helper.AvatarHelper;
 import com.core.utils.helper.LoginHelper;
@@ -69,7 +67,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
     protected void onResume() {
         super.onResume();
 
-        requestPermission(Manifest.permission.READ_PHONE_STATE,null,null);
+        requestPermission(Manifest.permission.READ_PHONE_STATE, null, null);
         if (!MyApplication.getInstance().getBdLocationHelper().isLocationUpdate()) {
             MyApplication.getInstance().getBdLocationHelper().requestLocation();
         }
@@ -117,23 +115,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
         } else if (v.getId() == R.id.tv_register) {
             startActivity(new Intent(mContext, RegisterSelectActivity.class));
         } else if (v.getId() == R.id.tv_findPwd) {
-            IntentUtils.webLinks(mContext,
-                    Constants.ACCOUNT_CENTER_HOST + "reset/forgetPasswordValidationAccount?appId=home&returnURL=http%3A%2F%2Fwww.ubtob.com%2F&source=UU",
-                    getString(R.string.login_getpwd));
+//            IntentUtils.webLinks(mContext,
+//                    Constants.ACCOUNT_CENTER_HOST + "reset/forgetPasswordValidationAccount?appId=home&returnURL=http%3A%2F%2Fwww.ubtob.com%2F&source=UU",
+//                    getString(R.string.login_getpwd));
+            startActivity(new Intent(mContext, ModifyPasswordModeActivity.class));
         }
-       /* switch (v.getId()) {
-            case R.id.login_btn:
-                login();
-                break;
-            case R.id.tv_register:
-              startActivity(new Intent(mContext,RegisterSelectActivity.class));
-                break;
-            case R.id.tv_findPwd:
-                IntentUtils.webLinks(mContext,
-                        "https://account.ubtob.com/user/pwd?appId=home&returnURL=http%3A%2F%2Fwww.ubtob.com%2F",
-                        getString(R.string.login_getpwd));
-                break;
-        }*/
     }
 
     private void login() {
@@ -187,7 +173,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
 
             @Override
             public void onResponse(ObjectResult<LoginRegisterResult> result) {
-                LogUtil.d("HttpLogs", "IM login:"+ JSON.toJSONString(result));
+                LogUtil.d("HttpLogs", "IM login:" + JSON.toJSONString(result));
                 if (result == null) {
                     ProgressDialogUtil.dismiss(dialog);
                     ToastUtil.showErrorData(mContext);
@@ -218,7 +204,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
         if (TextUtils.isEmpty(password)) {
             return;
         }
-        mContext=null;
+        mContext = null;
         if (mContext == null) {
             mContext = this;
         }

+ 59 - 0
app_modular/applogin/src/main/java/com/modular/login/activity/ModifyPasswordEmailActivity.java

@@ -0,0 +1,59 @@
+package com.modular.login.activity;
+
+import com.core.base.activity.BaseMVPActivity;
+import com.core.base.presenter.SimplePresenter;
+import com.core.base.view.SimpleView;
+import com.modular.login.R;
+
+/**
+ * @author RaoMeng
+ * @describe 修改密码(通过手机号)
+ * @date 2018/5/4 10:45
+ */
+public class ModifyPasswordEmailActivity extends BaseMVPActivity<SimplePresenter> implements SimpleView {
+
+    @Override
+    protected int getLayout() {
+        return R.layout.activity_modify_password_email;
+    }
+
+    @Override
+    protected void initView() {
+
+    }
+
+    @Override
+    protected SimplePresenter initPresenter() {
+        return new SimplePresenter();
+    }
+
+    @Override
+    protected void initEvent() {
+
+    }
+
+    @Override
+    protected void initData() {
+
+    }
+
+    @Override
+    public void requestSuccess(int what, Object object) {
+
+    }
+
+    @Override
+    public void requestError(int what, String errorMsg) {
+
+    }
+
+    @Override
+    public void showLoading(String loadStr) {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+}

+ 66 - 0
app_modular/applogin/src/main/java/com/modular/login/activity/ModifyPasswordModeActivity.java

@@ -0,0 +1,66 @@
+package com.modular.login.activity;
+
+import android.view.View;
+import android.widget.LinearLayout;
+
+import com.core.base.activity.BaseMVPActivity;
+import com.core.base.presenter.BasePresenter;
+import com.modular.login.R;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/5/4 11:19
+ */
+public class ModifyPasswordModeActivity extends BaseMVPActivity {
+    private LinearLayout mPhoneView, mEmailView;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.activity_modify_password_mode;
+    }
+
+    @Override
+    protected void initView() {
+        getSupportActionBar().setTitle(R.string.forget_password);
+        mPhoneView = $(R.id.modify_password_mode_phone_ll);
+        mEmailView = $(R.id.modify_password_mode_email_ll);
+    }
+
+    @Override
+    protected BasePresenter initPresenter() {
+        return null;
+    }
+
+    @Override
+    protected void initEvent() {
+        mPhoneView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                startActivity(ModifyPasswordPhoneActivity.class);
+            }
+        });
+
+        mEmailView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                startActivity(ModifyPasswordEmailActivity.class);
+            }
+        });
+    }
+
+    @Override
+    protected void initData() {
+
+    }
+
+    @Override
+    public void showLoading(String loadStr) {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+}

+ 71 - 0
app_modular/applogin/src/main/java/com/modular/login/activity/ModifyPasswordPhoneActivity.java

@@ -0,0 +1,71 @@
+package com.modular.login.activity;
+
+import android.widget.TextView;
+
+import com.core.base.activity.BaseMVPActivity;
+import com.core.base.presenter.SimplePresenter;
+import com.core.base.view.SimpleView;
+import com.core.widget.ClearEditText;
+import com.modular.login.R;
+
+/**
+ * @author RaoMeng
+ * @describe 修改密码(通过手机号)
+ * @date 2018/5/4 10:45
+ */
+public class ModifyPasswordPhoneActivity extends BaseMVPActivity<SimplePresenter> implements SimpleView {
+    private ClearEditText mPhoneEditText, mCodeEditText, mPasswordEditText, mPasswordConfirmEditText;
+    private TextView mObtainCodeTextView, mConfirmButton;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.activity_modify_password_phone;
+    }
+
+    @Override
+    protected void initView() {
+        getSupportActionBar().setTitle(R.string.title_password_reset);
+
+        mPhoneEditText = $(R.id.modify_password_phone_mobile_et);
+        mCodeEditText = $(R.id.modify_password_phone_code_et);
+        mPasswordEditText = $(R.id.modify_password_phone_password_et);
+        mPasswordConfirmEditText = $(R.id.modify_password_phone_password_confirm_et);
+        mObtainCodeTextView = $(R.id.modify_password_phone_code_btn);
+        mConfirmButton = $(R.id.modify_password_phone_confirm_tv);
+    }
+
+    @Override
+    protected SimplePresenter initPresenter() {
+        return new SimplePresenter();
+    }
+
+    @Override
+    protected void initEvent() {
+
+    }
+
+    @Override
+    protected void initData() {
+
+    }
+
+    @Override
+    public void requestSuccess(int what, Object object) {
+
+    }
+
+    @Override
+    public void requestError(int what, String errorMsg) {
+
+    }
+
+    @Override
+    public void showLoading(String loadStr) {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+}

BIN
app_modular/applogin/src/main/res/drawable-hdpi/ic_modify_email.png


BIN
app_modular/applogin/src/main/res/drawable-hdpi/ic_modify_phone.png


BIN
app_modular/applogin/src/main/res/drawable-hdpi/ic_verification_code.png


BIN
app_modular/applogin/src/main/res/drawable-xhdpi/ic_modify_email.png


BIN
app_modular/applogin/src/main/res/drawable-xhdpi/ic_modify_phone.png


BIN
app_modular/applogin/src/main/res/drawable-xxhdpi/ic_modify_email.png


BIN
app_modular/applogin/src/main/res/drawable-xxhdpi/ic_modify_phone.png


+ 7 - 0
app_modular/applogin/src/main/res/layout/activity_modify_password_email.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:layout_width="match_parent"
+              android:layout_height="match_parent"
+              android:orientation="vertical">
+
+</LinearLayout>

+ 68 - 0
app_modular/applogin/src/main/res/layout/activity_modify_password_mode.xml

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:id="@+id/modify_password_mode_phone_ll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="6dp"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:src="@drawable/ic_modify_phone" />
+
+        <TextView
+            style="@style/register_edittext_style"
+            android:layout_height="48dp"
+            android:drawableRight="@drawable/go"
+            android:gravity="center_vertical"
+            android:paddingLeft="10dp"
+            android:paddingRight="10dp"
+            android:text="@string/modify_by_phone"
+            android:textColor="@color/black" />
+
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="2px"
+        android:background="@color/item_line" />
+
+    <LinearLayout
+        android:id="@+id/modify_password_mode_email_ll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:src="@drawable/ic_modify_email" />
+
+        <TextView
+            style="@style/register_edittext_style"
+            android:layout_height="48dp"
+            android:drawableRight="@drawable/go"
+            android:gravity="center_vertical"
+            android:paddingLeft="10dp"
+            android:paddingRight="10dp"
+            android:text="@string/modify_by_email"
+            android:textColor="@color/black" />
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="2px"
+        android:background="@color/item_line" />
+
+</LinearLayout>

+ 134 - 0
app_modular/applogin/src/main/res/layout/activity_modify_password_phone.xml

@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:padding="20dp">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/shape_gray_slight_corner_white_bg"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:src="@drawable/ic_modify_phone" />
+
+        <com.core.widget.ClearEditText
+            android:id="@+id/modify_password_phone_mobile_et"
+            style="@style/register_edittext_style"
+            android:hint="手机号"
+            android:paddingLeft="10dp"
+            android:paddingRight="10dp"
+            android:textColor="@color/black" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        android:background="@drawable/shape_gray_slight_corner_white_bg"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:src="@drawable/ic_verification_code" />
+
+        <com.core.widget.ClearEditText
+            android:id="@+id/modify_password_phone_code_et"
+            style="@style/register_edittext_style"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:hint="短信验证码"
+            android:paddingLeft="10dp"
+            android:paddingRight="10dp"
+            android:textColor="@color/black" />
+
+        <View
+            android:layout_width="1dp"
+            android:layout_height="match_parent"
+            android:layout_margin="10dp"
+            android:background="@color/gray" />
+
+        <TextView
+            android:id="@+id/modify_password_phone_code_btn"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:paddingRight="10dp"
+            android:text="获取验证码"
+            android:textColor="@color/titleBlue" />
+    </LinearLayout>
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="16dp"
+        android:text="*密码须为8-20字符的英文、数字混合"
+        android:textColor="@color/red"
+        android:textSize="12sp" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:background="@drawable/shape_gray_slight_corner_white_bg"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:src="@drawable/ic_admin_password" />
+
+        <com.core.widget.ClearEditText
+            android:id="@+id/modify_password_phone_password_et"
+            style="@style/register_edittext_style"
+            android:hint="新密码"
+            android:paddingLeft="10dp"
+            android:paddingRight="10dp"
+            android:textColor="@color/black" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        android:background="@drawable/shape_gray_slight_corner_white_bg"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:src="@drawable/ic_admin_password" />
+
+        <com.core.widget.ClearEditText
+            android:id="@+id/modify_password_phone_password_confirm_et"
+            style="@style/register_edittext_style"
+            android:hint="确认密码"
+            android:paddingLeft="10dp"
+            android:paddingRight="10dp"
+            android:textColor="@color/black" />
+    </LinearLayout>
+
+    <TextView
+        android:id="@+id/modify_password_phone_confirm_tv"
+        android:layout_width="match_parent"
+        android:layout_height="42dp"
+        android:layout_marginTop="20dp"
+        android:background="@drawable/selector_confirm_bg"
+        android:gravity="center"
+        android:text="@string/app_dialog_ok"
+        android:textColor="@color/white"
+        android:textSize="14sp" />
+</LinearLayout>

+ 6 - 0
app_modular/applogin/src/main/res/values-en/strings.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="modify_by_phone">通过手机验证</string>
+    <string name="modify_by_email">通过邮箱验证</string>
+    <string name="title_password_reset">密码重置</string>
+</resources>

+ 6 - 0
app_modular/applogin/src/main/res/values-zh-rCN/strings.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="modify_by_phone">通过手机验证</string>
+    <string name="modify_by_email">通过邮箱验证</string>
+    <string name="title_password_reset">密码重置</string>
+</resources>

+ 6 - 0
app_modular/applogin/src/main/res/values-zh-rTW/strings.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="modify_by_phone">通过手机验证</string>
+    <string name="modify_by_email">通过邮箱验证</string>
+    <string name="title_password_reset">密码重置</string>
+</resources>

+ 3 - 0
app_modular/applogin/src/main/res/values/strings.xml

@@ -1,3 +1,6 @@
 <resources>
     <string name="app_name">AppLogin</string>
+    <string name="modify_by_phone">通过手机验证</string>
+    <string name="modify_by_email">通过邮箱验证</string>
+    <string name="title_password_reset">密码重置</string>
 </resources>

+ 0 - 2
app_modular/apputils/src/main/res/values/attrs.xml

@@ -9,6 +9,4 @@
         <attr name="indicator_selected_color" format="color" />
         <attr name="indicator_bottommargin" format="dimension" />
     </declare-styleable>
-
-
 </resources>

BIN
app_modular/appworks/src/main/res/drawable-hdpi/company_salary.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_business_services.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_device_manage.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_attendance_statistics.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_b2b_commerce.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_backlog.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_business_manage.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_charitable_donations.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_customer_manage.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_customer_visit.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_data_inquiry.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_expense_account.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_header_bg.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_honor_rank.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_invite_register.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_leave_request.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_meeting_manage.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_outwork_sign.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_overtime_request.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_punch_clock.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_real_time_subs.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_report_statistics.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_sales_data.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_special_attendance.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_subs_manage.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_subscribe_secretary.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_travel_request.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_usoft_mall.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_uu_sports.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_work_approval.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_work_calendar.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_work_work_report.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/company_salary.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_business_services.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_device_manage.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_attendance_statistics.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_b2b_commerce.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_backlog.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_business_manage.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_charitable_donations.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_customer_manage.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_customer_visit.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_data_inquiry.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_expense_account.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_honor_rank.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_invite_register.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_leave_request.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_meeting_manage.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_outwork_sign.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_overtime_request.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_punch_clock.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_real_time_subs.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_report_statistics.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_sales_data.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_special_attendance.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_subs_manage.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_subscribe_secretary.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_travel_request.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_usoft_mall.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_uu_sports.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_work_work_approval.png


Some files were not shown because too many files changed in this diff