Przeglądaj źródła

Merge remote-tracking branch 'origin/sheep2.0' into sheep2.0

zengjiebin 8 lat temu
rodzic
commit
916c47548b
26 zmienionych plików z 1502 dodań i 68 usunięć
  1. 5 0
      app/src/main/java/com/kfzs/duanduan/fragment/FgtCreditCard.java
  2. 30 2
      app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java
  3. 2 1
      app/src/main/java/com/sheep/gamegroup/util/ImageGlarryDrawable.java
  4. 1 1
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  5. 8 8
      app/src/main/java/com/sheep/gamegroup/view/adapter/TryMakeMoneyAdp.java
  6. 2 1
      app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardActivity.java
  7. 75 8
      app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardBasicInfoFragment.java
  8. 149 1
      app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardCommitFragment.java
  9. 377 14
      app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardDetailsFragment.java
  10. 41 5
      app/src/main/java/com/sheep/groups/creditcard/BasicInfoPresenter.java
  11. 167 0
      app/src/main/java/com/sheep/groups/creditcard/CountDownUtil.java
  12. 67 0
      app/src/main/java/com/sheep/groups/creditcard/CreditCardInfosManager.java
  13. 15 0
      app/src/main/java/com/sheep/groups/creditcard/DetailsComponent.java
  14. 25 0
      app/src/main/java/com/sheep/groups/creditcard/DetailsContact.java
  15. 112 0
      app/src/main/java/com/sheep/groups/creditcard/DetailsPresenter.java
  16. 113 0
      app/src/main/java/com/sheep/groups/creditcard/RegexConstants.java
  17. 220 0
      app/src/main/java/com/sheep/groups/creditcard/RegexUtils.java
  18. 55 18
      app/src/main/res/layout/fragment_apply_for_credit_card_commit.xml
  19. 12 5
      app/src/main/res/layout/fragment_apply_for_credit_card_details.xml
  20. 8 2
      app/src/main/res/layout/homepage_act_layout.xml
  21. 1 1
      app/src/main/res/layout/try_makemoney_item.xml
  22. 1 1
      app/src/main/res/layout/try_makemoney_item_recommend.xml
  23. 1 0
      app/src/main/res/values/dimen_app_dimens.xml
  24. 2 0
      app/src/main/res/values/gx_strings.xml
  25. 8 0
      app/src/main/res/values/styles.xml
  26. 5 0
      kfzslibrary/src/main/java/com/kfzs/libs/di/http/HttpService.java

+ 5 - 0
app/src/main/java/com/kfzs/duanduan/fragment/FgtCreditCard.java

@@ -1,9 +1,11 @@
 package com.kfzs.duanduan.fragment;
 
+import android.content.Intent;
 import android.os.Bundle;
 import android.webkit.WebView;
 
 import com.kfzs.duanduan.BaseCompatFragment;
+import com.sheep.groups.creditcard.ApplyForCreditCardActivity;
 import com.sheep.jiuyan.samllsheep.R;
 
 /**
@@ -13,9 +15,12 @@ import com.sheep.jiuyan.samllsheep.R;
  */
 public class FgtCreditCard extends BaseCompatFragment{
 
+    private WebView fgt_bp_webview;
+
     @Override
     protected void initView(Bundle savedInstanceState) {
         setContentView(R.layout.fgt_bp);
+        startActivity(new Intent(getActivity(), ApplyForCreditCardActivity.class));
     }
 
 }

+ 30 - 2
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -10,6 +10,7 @@ import android.support.v4.view.ViewPager;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.LayoutInflater;
+import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.AdapterView;
@@ -17,6 +18,7 @@ import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.RadioGroup;
 import android.widget.RelativeLayout;
+import android.widget.ScrollView;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
@@ -103,6 +105,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
     ViewPager viewpager_banner;
     @BindView(R.id.group_banner)
     RadioGroup group_banner;
+    @BindView(R.id.scrollView)
+    ScrollView scrollView;
 
     @Inject
     SmallSheepPresenter pagePresenter;
@@ -149,7 +153,32 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
 
 
     public void initListener() {
-
+        scrollView.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View v, MotionEvent event) {
+                switch (event.getAction()){
+                    case MotionEvent.ACTION_DOWN:
+                        if (upview1 != null) {
+                            //开始滚动
+                            upview1.stopScroll();
+                        }
+                        break;
+                    case MotionEvent.ACTION_UP:
+                        if (upview1 != null) {
+                            //开始滚动
+                            upview1.startScroll();
+                        }
+                        break;
+                    default:
+                        if (upview1 != null) {
+                            //开始滚动
+                            upview1.startScroll();
+                        }
+                        break;
+                }
+                return false;
+            }
+        });
     }
 
     public void initData() {
@@ -274,7 +303,6 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
 
 
 
-
     }
 
 

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/util/ImageGlarryDrawable.java

@@ -69,7 +69,8 @@ public class ImageGlarryDrawable {
             ImageView imageView = new ImageView(mActivity);
             imageView.setOnClickListener(new ImageGlarryDrawable.cls_main(pos));
             imageView.setScaleType(scaleType);
-            Glide.with(mActivity).load(pic).apply(new RequestOptions().dontAnimate()).into(imageView);
+            imageView.setImageDrawable(pic);
+//            Glide.with(mActivity).load(pic).apply(new RequestOptions().dontAnimate()).into(imageView);
             mListImages.add(imageView);
 
 

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -357,7 +357,7 @@ public class Jump2View {
         context.startActivity(i);
     }
     /**
-     * 跳转到绑定手机页面
+     * 跳转到非wifi网络提示
      * @param context
      * @param o
      */

+ 8 - 8
app/src/main/java/com/sheep/gamegroup/view/adapter/TryMakeMoneyAdp.java

@@ -135,16 +135,16 @@ public class TryMakeMoneyAdp extends AdpCommonRecy<RecyleObj> {
                 ((TextView)viewHolder.itemView.findViewById(R.id.detail_task_tv)).setOnClickListener(new View.OnClickListener() {
                     @Override
                     public void onClick(View v) {
-                        G.showToast("任务详情");
-                        if(isHave){
-                            G.showToast("请先取消已接受的任务");
-                            return;
-                        }
+//                        G.showToast("任务详情");
+//                        if(isHave){
+//                            G.showToast("请先取消已接受的任务");
+//                            return;
+//                        }
                         TaskEty taskEty = etyList.get(i).getTask();
                         taskEty.setRunTask(0);
                         taskEty.setRelease_task_id(etyList.get(i).getId());
                         taskEty.setName(etyList.get(i).getName());
-                        Jump2View.getInstance().goDialogActivityView(context, taskEty);
+                        Jump2View.getInstance().goTaskDetailView(context, taskEty);
                     }
                 });
                 Glide.with(context)
@@ -201,12 +201,12 @@ public class TryMakeMoneyAdp extends AdpCommonRecy<RecyleObj> {
         detail_task_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                G.showToast("任务详情");
+//                G.showToast("任务详情");
                 TaskEty taskEty = acceptedEty.getRelease_task().getTask();
                 taskEty.setRunTask(1);
                 taskEty.setRelease_task_id(acceptedEty.getRelease_task().getId());
                 taskEty.setName(acceptedEty.getRelease_task().getName());
-                Jump2View.getInstance().goDialogActivityView(context, taskEty);
+                Jump2View.getInstance().goTaskDetailView(context, taskEty);
             }
         });
         holder.itemView.setOnClickListener(new View.OnClickListener() {

+ 2 - 1
app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardActivity.java

@@ -78,7 +78,7 @@ public class ApplyForCreditCardActivity extends AppCompatActivity implements OnN
 
     @Override
     public void onNextStep(int stepType) {
-
+        Log.e("BasicInfoPresenter", "act-onNextStep: " );
         switch (stepType){
             case STEP_BASICS:
                 openDetails();
@@ -106,6 +106,7 @@ public class ApplyForCreditCardActivity extends AppCompatActivity implements OnN
                 .beginTransaction()
                 .add(R.id.fl_credit_card_container,detailsFragment,ApplyForCreditCardDetailsFragment.class.getSimpleName())
                 .commit();
+        Log.e("BasicInfoPresenter", "openDetails: " );
     }
 
     private void openCommit(){

+ 75 - 8
app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardBasicInfoFragment.java

@@ -159,19 +159,53 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
         tvDynamic.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                Map<String,String> map = new HashMap<>();
-                map.put("name",etName.getText().toString());
-                map.put("mobile",etMobile.getText().toString());
-                map.put("id_card",etIdNo.getText().toString());
-                map.put("card_id",getCardId());
-                presenter.getDynamic(map);
+                sendDynamic();
             }
         });
 
+
+    }
+
+    private void sendDynamic(){
+
+        if(TextUtils.isEmpty(etName.getText().toString())){
+            Toast.makeText(activity,"请填写姓名",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etMobile.getText().toString())){
+            Toast.makeText(activity,"请填写手机号",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
+        if(etMobile.getText().toString().length() != 11){
+            Toast.makeText(activity,"手机号位数不正确",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etIdNo.getText().toString())){
+            Toast.makeText(activity,"请填写身份证号",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
+        if(etIdNo.getText().toString().length() != 18){
+            Toast.makeText(activity,"身份证号位数不正确",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
+        Map<String,String> map = new HashMap<>();
+        map.put("name",etName.getText().toString());
+        map.put("mobile",etMobile.getText().toString());
+        map.put("id_card",etIdNo.getText().toString());
+        map.put("card_id",getCardId());
+        Log.e(TAG, "sendDynamic: "+map.toString());
+        presenter.getDynamic(map);
+        new CountDownUtil(tvDynamic)
+                .setCountDownMillis(60_000L)//倒计时60000ms
+                .setCountDownColor(R.color.credit_blue_color,R.color.credit_blue_color)//不同状态字体颜色
+                .start();
     }
 
     private String getCardId(){
-        String cardId = "";
+        String cardId = String.valueOf(CreditCardDisplayFragment.CARD_NORMAL_PAINT);
         if(CreditCardDisplayFragment.CARD_TYPE_NORMAL == curType){
             cardId =  String.valueOf(normalCardDisplayFragment.getCardDetailType());
         }
@@ -192,6 +226,13 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
     @Override
     public void onConfirm() {
 
+
+        if(TextUtils.isEmpty(presenter.getTicket())){
+            Toast.makeText(activity,"请先获取验证码",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
+
         Map<String,String> map = new HashMap<>();
 
         map.put("name",etName.getText().toString());
@@ -199,12 +240,25 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
         map.put("id_card",etIdNo.getText().toString());
         map.put("token", SpUtils.getOpenId(SheepApp.mContext));
         map.put("card_id",getCardId());
+        map.put("code",etDynamic.getText().toString());
+        map.put("ticket",presenter.getTicket());
+
 
         presenter.commitBasic(map);
 
     }
     @Override
     public void goNext(){
+        Log.e(TAG, "goNext:fragment " );
+        //记录信息
+        CreditCardInfosManager manager = CreditCardInfosManager.getInstance();
+        manager.card_id = getCardId();
+        manager.b_name = etName.getText().toString();
+        manager.b_mobile = etMobile.getText().toString();
+        manager.b_card = etIdNo.getText().toString();
+        manager.b_sms = etDynamic.getText().toString();
+        manager.ticket = presenter.getTicket();
+
         onNextStepCallback.onNextStep(ApplyForCreditCardActivity.STEP_BASICS);
     }
 
@@ -215,7 +269,7 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
 
     @Override
     public void showProgress(String msg) {
-
+        Toast.makeText(activity,msg,Toast.LENGTH_SHORT).show();
     }
 
 
@@ -235,6 +289,7 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
         switch (view.getId()){
             case R.id.btn_next:
                 clickBtnNext();
+//                goNext();
                 break;
             case R.id.btn_card_normal:
                 selectNormalCard();
@@ -255,10 +310,22 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
             Toast.makeText(activity,"请填写手机号",Toast.LENGTH_SHORT).show();
             return;
         }
+
+        if(!RegexUtils.isMobileSimple(etMobile.getText().toString())){
+            Toast.makeText(activity,"手机号不正确",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
         if(TextUtils.isEmpty(etIdNo.getText().toString())){
             Toast.makeText(activity,"请填写身份证号",Toast.LENGTH_SHORT).show();
             return;
         }
+
+        if(!RegexUtils.isIDCard18(etIdNo.getText().toString())){
+            Toast.makeText(activity,"身份证号不正确",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
         if(TextUtils.isEmpty(etDynamic.getText().toString())){
             Toast.makeText(activity,"请填验证码",Toast.LENGTH_SHORT).show();
             return;

+ 149 - 1
app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardCommitFragment.java

@@ -1,18 +1,84 @@
 package com.sheep.groups.creditcard;
 
+import android.content.Context;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CheckBox;
 
 import com.kfzs.libs.DaggerFragment;
 import com.kfzs.libs.IPresenter;
 import com.kfzs.libs.IView;
+import com.kfzs.libs.widget.CompleteCommitEditText;
+import com.kfzs.libs.widget.alpha.AlphaButton;
 import com.sheep.jiuyan.samllsheep.R;
 
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+
 /**
  * Created by guoxin on 2018/4/2.
  */
 
-public class ApplyForCreditCardCommitFragment extends DaggerFragment{
+public class ApplyForCreditCardCommitFragment extends DaggerFragment implements DetailsContact.View{
+
+
+    @BindView(R.id.edit_card_time)
+    CompleteCommitEditText editCardTime;
+    @BindView(R.id.edit_address_origin)
+    CompleteCommitEditText editAddressOrigin;
+    @BindView(R.id.edit_address_now)
+    CompleteCommitEditText editAddressNow;
+    @BindView(R.id.edit_email)
+    CompleteCommitEditText editEmail;
+    @BindView(R.id.edit_edu_info)
+    CompleteCommitEditText editEduInfo;
+    @BindView(R.id.edit_company_name)
+    CompleteCommitEditText editCompanyName;
+    @BindView(R.id.edit_company_city)
+    CompleteCommitEditText editCompanyCity;
+    @BindView(R.id.edit_company_address)
+    CompleteCommitEditText editCompanyAddress;
+    @BindView(R.id.edit_company_tel)
+    CompleteCommitEditText editCompanyTel;
+    @BindView(R.id.edit_work_life)
+    CompleteCommitEditText editWorkLife;
+    @BindView(R.id.edit_family_name)
+    CompleteCommitEditText editFamilyName;
+    @BindView(R.id.edit_relationship)
+    CompleteCommitEditText editRelationship;
+    @BindView(R.id.edit_family_tel)
+    CompleteCommitEditText editFamilyTel;
+    @BindView(R.id.edit_relationship_other)
+    CompleteCommitEditText editRelationshipOther;
+    @BindView(R.id.btn_commit_info)
+    AlphaButton btnCommitInfo;
+    @BindView(R.id.btn_modify_infos)
+    AlphaButton btnModifyInfos;
+    @BindView(R.id.cbx_marry_yes)
+    CheckBox cbxMarryYes;
+    @BindView(R.id.cbx_marry_no)
+    CheckBox cbxMarryNo;
+
+
+    private Unbinder unbinder;
+
+    private OnNextStepCallback onNextStepCallback;
+
+    @Override
+    public void onAttach(Context context) {
+        super.onAttach(context);
+        try {
+            onNextStepCallback = (OnNextStepCallback) context;
+        }
+        catch (ClassCastException e){
+        }
+    }
+
     @Override
     public void setupDaggerComponent() {
 
@@ -36,5 +102,87 @@ public class ApplyForCreditCardCommitFragment extends DaggerFragment{
     @Override
     public void setupViews(@Nullable Bundle savedInstanceState) {
 
+        //身份证日期
+        editCardTime.setText(CreditCardInfosManager.getInstance().c_id_expire);
+
+        editAddressOrigin.setText(CreditCardInfosManager.getInstance().p_city);
+        editAddressNow.setText(CreditCardInfosManager.getInstance().p_address);
+        editEmail.setText(CreditCardInfosManager.getInstance().p_email);
+        //婚姻
+        cbxMarryYes.setChecked(false);
+        cbxMarryNo.setChecked(false);
+        String marray = CreditCardInfosManager.getInstance().p_marray;
+        /// ? 需确认此处
+        if(marray.equalsIgnoreCase("Y")){
+            cbxMarryYes.setChecked(true);
+        }else if(marray.equalsIgnoreCase("N")){
+            cbxMarryNo.setChecked(true);
+        }
+
+        //教育
+        editEduInfo.setText(CreditCardInfosManager.getInstance().p_edu);
+        //公司信息
+        editCompanyName.setText(CreditCardInfosManager.getInstance().w_name);
+        editCompanyCity.setText(CreditCardInfosManager.getInstance().w_city);
+        editCompanyAddress.setText(CreditCardInfosManager.getInstance().w_address);
+        editCompanyTel.setText(CreditCardInfosManager.getInstance().w_tel);
+        editWorkLife.setText(CreditCardInfosManager.getInstance().w_age);
+
+        //亲属
+        editFamilyName.setText(CreditCardInfosManager.getInstance().c_d_name);
+        editRelationship.setText(CreditCardInfosManager.getInstance().c_d_relation);
+        editFamilyTel.setText(CreditCardInfosManager.getInstance().c_d_mobile);
+
+        StringBuilder sb = new StringBuilder(CreditCardInfosManager.getInstance().c_o_name);
+        sb.append(" ");
+        sb.append(CreditCardInfosManager.getInstance().c_o_relation);
+        sb.append(" ");
+        sb.append(CreditCardInfosManager.getInstance().c_o_mobile);
+        editRelationshipOther.setText(sb.toString());
+
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        // TODO: inflate a fragment view
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        unbinder = ButterKnife.bind(this, rootView);
+        return rootView;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        unbinder.unbind();
+    }
+
+    @OnClick({R.id.btn_modify_infos,R.id.btn_commit_info})
+    public void onClick(View view){
+        switch (view.getId()){
+            case R.id.btn_commit_info:
+
+                //todo 将数据提交到服务器接口
+
+
+                break;
+            case R.id.btn_modify_infos:
+                goNext();
+                break;
+        }
+    }
+
+    @Override
+    public boolean isViewActive() {
+        return isAdded();
+    }
+
+    @Override
+    public void showProgress(String msg) {
+
+    }
+
+    @Override
+    public void goNext() {
+        onNextStepCallback.onNextStep(ApplyForCreditCardActivity.STEP_DETAILS);
     }
 }

+ 377 - 14
app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardDetailsFragment.java

@@ -1,17 +1,36 @@
 package com.sheep.groups.creditcard;
 
+import android.app.DatePickerDialog;
 import android.content.Context;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.v7.widget.AppCompatSpinner;
+import android.text.TextUtils;
 import android.view.View;
+import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.DatePicker;
+import android.widget.RadioGroup;
+import android.widget.Spinner;
+import android.widget.TextView;
+import android.widget.Toast;
 
 import com.kfzs.libs.DaggerFragment;
 import com.kfzs.libs.IPresenter;
 import com.kfzs.libs.IView;
 import com.kfzs.libs.widget.CompleteCommitEditText;
+import com.kfzs.libs.widget.alpha.AlphaButton;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.inject.Inject;
 
 import butterknife.BindView;
 import butterknife.OnClick;
@@ -20,12 +39,8 @@ import butterknife.OnClick;
  * Created by guoxin on 2018/4/2.
  */
 
-public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
+public class ApplyForCreditCardDetailsFragment extends DaggerFragment implements DetailsContact.View{
 
-    @BindView(R.id.sp_relationship_immediate_relatives)
-    AppCompatSpinner spRelationshipImmediateRelatives;
-    @BindView(R.id.sp_relationship_other)
-    AppCompatSpinner spRelationshipOther;
 
     @BindView(R.id.et_city)
     CompleteCommitEditText etCity;
@@ -55,8 +70,8 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
     CompleteCommitEditText etOtherName;
     @BindView(R.id.et_other_r_mobile)
     CompleteCommitEditText etOtherMobile;
-    @BindView(R.id.et_id_no_expire)
-    CompleteCommitEditText etIdCardExpire;
+    @BindView(R.id.tv_id_no_expire)
+    TextView tvIdCardExpire;
     @BindView(R.id.et_car_no)
     CompleteCommitEditText etCarNo;
     @BindView(R.id.et_home_q)
@@ -66,7 +81,26 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
     @BindView(R.id.et_qq)
     CompleteCommitEditText etQQ;
 
+    @BindView(R.id.rg_marray)
+    RadioGroup rgMarray;
+    @BindView(R.id.cb_agreement)
+    CheckBox cbAgreement;
+    @BindView(R.id.sp_relationship_immediate_relatives)
+    AppCompatSpinner spImmediateRelationship;
+    @BindView(R.id.sp_relationship_other)
+    AppCompatSpinner spOtherRelationship;
+    @BindView(R.id.cb_expire)
+    CheckBox cbExpire;
+
+    @BindView(R.id.btn_next)
+    AlphaButton btnNext;
+
+    @Inject
+    DetailsPresenter presenter;
     OnNextStepCallback onNextStepCallback;
+    private ArrayAdapter<CharSequence> adapterImmediateRelatives;
+    private ArrayAdapter<CharSequence> adapterOther;
+
     @Override
     public void onAttach(Context context) {
         super.onAttach(context);
@@ -79,17 +113,17 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
 
     @Override
     public void setupDaggerComponent() {
-
+        DaggerDetailsComponent.builder().httpComponent(SheepApp.getInstance().getHttpComponent()).build().inject(this);
     }
 
     @Override
     public IPresenter currentPresenter() {
-        return null;
+        return presenter;
     }
 
     @Override
     public IView currentIView() {
-        return null;
+        return this;
     }
 
     @Override
@@ -100,16 +134,345 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
     @Override
     public void setupViews(@Nullable Bundle savedInstanceState) {
 
-        ArrayAdapter<CharSequence> adapterImmediateRelatives = ArrayAdapter.createFromResource(activity, R.array.credit_card_relationship_immediate_relatives_type, R.layout.spinner_text_item);
-        spRelationshipImmediateRelatives.setAdapter(adapterImmediateRelatives);
+        adapterImmediateRelatives = ArrayAdapter.createFromResource(activity, R.array.credit_card_relationship_immediate_relatives_type, R.layout.spinner_text_item);
+        spImmediateRelationship.setAdapter(adapterImmediateRelatives);
+
+        adapterOther = ArrayAdapter.createFromResource(activity, R.array.credit_card_relationship_other_type, R.layout.spinner_text_item);
+        spOtherRelationship.setAdapter(adapterOther);
+
+        //
+        setOnCompleteEdit(etCity,"p_city");
+        setOnCompleteEdit(etAddress,"p_address");
+        setOnCompleteEdit(etEmail,"p_email");
+        //p_marray
+        rgMarray.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(RadioGroup group, int checkedId) {
+                String value = (String) group.findViewById(group.getCheckedRadioButtonId()).getTag();
+//                if(checkedId == R.id.rb_marray_n){
+//
+//                }
+//                else if(checkedId == R.id.rb_marray_y){
+//
+//                }
+//                else if(checkedId == R.id.rb_marray_o){
+//
+//                }
+                presenter.commitFormData("p_marray",value,CreditCardInfosManager.getInstance().card_id);
+                CreditCardInfosManager.getInstance().p_marray = value;
+            }
+        });
+
+
+        setOnCompleteEdit(etEducation,"p_edu");
+        setOnCompleteEdit(etCompanyName,"w_name");
+        setOnCompleteEdit(etCompanyCity,"w_city");
+        setOnCompleteEdit(etCompanyAddress,"w_address");
+        setOnCompleteEditDouble(etCompanyPhoneNo,etCompanyPhoneQ,"w_tel");//要取得两个值,所以单独设置
+//        setOnCompleteEdit(etCompanyPhoneQ,"p_city");
+        setOnCompleteEdit(etWorkYear,"w_age");
+        setOnCompleteEdit(etIRName,"c_d_name");
+        setOnCompleteEdit(etIRMobile,"c_d_mobile");
+        //c_d_relation
+        spImmediateRelationship.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                String value = (String) adapterImmediateRelatives.getItem(position);
+                CreditCardInfosManager.getInstance().c_d_relation = value;
+                presenter.commitFormData("c_d_relation",value,CreditCardInfosManager.getInstance().card_id);
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
+
+        //c_o_relation
+        spOtherRelationship.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                String value = (String) adapterOther.getItem(position);
+                CreditCardInfosManager.getInstance().c_d_relation = value;
+                presenter.commitFormData("c_o_relation",value,CreditCardInfosManager.getInstance().card_id);
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
+
+        setOnCompleteEdit(etOtherName,"c_o_name");
+        setOnCompleteEdit(etOtherMobile,"c_o_mobile");
+        tvIdCardExpire.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                //显示日历,key为c_id_expire
+                showDatePicker();
+            }
+        });
+        //c_id_expire
+        cbExpire.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                tvIdCardExpire.setVisibility(isChecked ? View.GONE : View.VISIBLE);
+                if(isChecked){
+                    String expire = "2099-12-31";
+                    CreditCardInfosManager.getInstance().c_id_expire = expire;
+                    presenter.commitFormData("c_id_expire",expire,CreditCardInfosManager.getInstance().card_id);
+                }
+                else CreditCardInfosManager.getInstance().c_id_expire = tvIdCardExpire.getText().toString();
+
+            }
+        });
+
+
 
-        ArrayAdapter<CharSequence> adapterOther = ArrayAdapter.createFromResource(activity, R.array.credit_card_relationship_other_type, R.layout.spinner_text_item);
-        spRelationshipOther.setAdapter(adapterOther);
+
+        setOnCompleteEdit(etCarNo,"o_p_number");
+//        setOnCompleteEdit(etHomeQ,"p_city");
+        setOnCompleteEditDouble(etHomePhone,etHomeQ,"o_tel");//要取得两个值,所以单独设置
+        setOnCompleteEdit(etQQ,"o_qq");
+        //is_agree
+        cbAgreement.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                CreditCardInfosManager.getInstance().is_agree = isChecked;
+                presenter.commitFormData("is_agree",String.valueOf(isChecked),CreditCardInfosManager.getInstance().card_id);
+            }
+        });
+
+
+    }
+
+    private void showDatePicker(){
+        // 获得日历对象
+        Calendar c = Calendar.getInstance();
+        // 获取当前年份
+        int year = c.get(Calendar.YEAR);
+        // 获取当前月份
+        int monthOfYear = c.get(Calendar.MONTH);
+        // 获取当前月份的天数
+        int dayOfMonth = c.get(Calendar.DAY_OF_MONTH);
+
+        new DatePickerDialog(activity, new DatePickerDialog.OnDateSetListener() {
+            @Override
+            public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
+                String expire = year + "-" + month + "-" + dayOfMonth;
+                tvIdCardExpire.setText(expire);
+                CreditCardInfosManager.getInstance().c_id_expire = expire;
+                presenter.commitFormData("c_id_expire",expire,CreditCardInfosManager.getInstance().card_id);
+            }
+        },year,monthOfYear,dayOfMonth).show();
 
     }
 
+    private void setOnCompleteEdit(final CompleteCommitEditText et, final String key){
+        et.setOnCompleteEditListener(new CompleteCommitEditText.OnCompleteEditListener() {
+            @Override
+            public void onCompleteEdit(String text) {
+                presenter.commitFormData(key,et.getText().toString(),CreditCardInfosManager.getInstance().card_id);
+            }
+        });
+    }
+
+    private void setOnCompleteEditDouble(final CompleteCommitEditText et,final CompleteCommitEditText etQ, final String key){
+        et.setOnCompleteEditListener(new CompleteCommitEditText.OnCompleteEditListener() {
+            @Override
+            public void onCompleteEdit(String text) {
+                presenter.commitFormData(key,etQ.getText().toString()+et.getText().toString(),CreditCardInfosManager.getInstance().card_id);
+            }
+        });
+    }
+
+
+
     @OnClick(R.id.btn_next)
     public void btnClick(View view){
+
+        if(TextUtils.isEmpty(etCity.getText().toString())){
+            Toast.makeText(activity,"请填写住宅城市",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etAddress.getText().toString())){
+            Toast.makeText(activity,"请填写住宅地址",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etEmail.getText().toString())){
+            Toast.makeText(activity,"请填写电子邮箱",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(CreditCardInfosManager.getInstance().p_marray)){
+            Toast.makeText(activity,"请选择婚姻状况",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etEducation.getText().toString())){
+            Toast.makeText(activity,"请填写教育程度",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etCompanyName.getText().toString())){
+            Toast.makeText(activity,"请填写单位名称",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etCompanyAddress.getText().toString())){
+            Toast.makeText(activity,"请填写单位地址",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etCompanyPhoneNo.getText().toString()) || TextUtils.isEmpty(etCompanyPhoneQ.getText().toString())){
+            Toast.makeText(activity,"请填写单位电话",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etWorkYear.getText().toString())){
+            Toast.makeText(activity,"请填写工作年限",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etIRName.getText().toString())){
+            Toast.makeText(activity,"请填写直属亲属姓名",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etIRMobile.getText().toString())){
+            Toast.makeText(activity,"请填写直属亲属手机号",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(CreditCardInfosManager.getInstance().c_d_relation)){
+            Toast.makeText(activity,"请选择直属亲属关系",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
+        if(TextUtils.isEmpty(etOtherName.getText().toString())){
+            Toast.makeText(activity,"请填写其他联系人姓名",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etOtherMobile.getText().toString())){
+            Toast.makeText(activity,"请填写其他联系人手机号",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(CreditCardInfosManager.getInstance().c_o_relation)){
+            Toast.makeText(activity,"请选择其他联系人关系",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
+        //有效期
+        if(TextUtils.isEmpty(tvIdCardExpire.getText().toString())){
+            Toast.makeText(activity,"请选择证件有效期",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etCarNo.getText().toString())){
+            Toast.makeText(activity,"请填写车牌号码",Toast.LENGTH_SHORT).show();
+            return;
+        }
+        if(TextUtils.isEmpty(etHomePhone.getText().toString()) || TextUtils.isEmpty(etHomeQ.getText().toString())){
+            Toast.makeText(activity,"请填写住宅电话",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
+        if(TextUtils.isEmpty(etQQ.getText().toString())){
+            Toast.makeText(activity,"请填写常用QQ号码",Toast.LENGTH_SHORT).show();
+            return;
+        }
+
+        CreditCardInfosManager manager = CreditCardInfosManager.getInstance();
+
+        Map<String,String> map = new HashMap<>();
+        String p_city = etCity.getText().toString();
+        map.put("p_city",p_city);
+        manager.p_city = p_city;
+
+        String p_address = etAddress.getText().toString();
+        map.put("p_address",p_address);
+        manager.p_address = p_address;
+
+        String p_email = etEmail.getText().toString();
+        map.put("p_email",p_email);
+        manager.p_email = p_email;
+
+        String p_marray = CreditCardInfosManager.getInstance().p_marray;
+        map.put("p_marray",p_marray);
+        manager.p_marray = p_marray;
+
+        String p_edu = etEducation.getText().toString();
+        map.put("p_edu",p_edu);
+        manager.p_edu =p_edu;
+
+        String w_name = etCompanyName.getText().toString();
+        map.put("w_name",w_name);
+        manager.w_name = w_name;
+
+        String w_city = etCompanyCity.getText().toString();
+        map.put("w_city",w_city);
+        manager.w_city = w_city;
+
+        String w_address = etCompanyAddress.getText().toString();
+        map.put("w_address",w_address);
+        manager.w_address = w_address;
+
+        String w_tel = etCompanyPhoneQ.getText().toString() + etCompanyPhoneNo.getText().toString();
+        map.put("w_tel",w_tel);
+        manager.w_tel = w_tel;
+
+        String w_age = etWorkYear.getText().toString();
+        map.put("w_age",w_age);
+        manager.w_age = w_age;
+
+        String c_d_name = etIRName.getText().toString();
+        map.put("c_d_name",c_d_name);
+        manager.c_d_name = c_d_name;
+
+        String c_d_mobile = etIRMobile.getText().toString();
+        map.put("c_d_mobile",c_d_mobile);
+        manager.c_d_mobile = c_d_mobile;
+
+        map.put("c_d_relation",CreditCardInfosManager.getInstance().c_d_relation);
+
+        String c_o_name = etOtherName.getText().toString();
+        map.put("c_o_name",c_o_name);
+        manager.c_o_name =c_o_name;
+
+        String c_o_mobile = etOtherMobile.getText().toString();
+        map.put("c_o_mobile",c_o_mobile);
+        manager.c_o_mobile = c_o_mobile;
+
+        map.put("c_o_relation",CreditCardInfosManager.getInstance().c_o_relation);
+
+        if(cbExpire.isChecked()){
+            map.put("c_id_expire",CreditCardInfosManager.getInstance().c_id_expire);
+        }
+        else {
+            String c_id_expire = tvIdCardExpire.getText().toString();
+            map.put("c_id_expire",c_id_expire);
+            manager.c_id_expire = c_id_expire;
+        }
+
+        String o_p_number = etCarNo.getText().toString();
+        map.put("o_p_number",o_p_number);
+        manager.o_p_number = o_p_number;
+
+        String o_tel = etHomeQ.getText().toString() + etHomePhone.getText().toString();
+        map.put("o_tel",o_tel);
+        manager.o_tel = o_tel;
+
+        String o_qq = etQQ.getText().toString();
+        map.put("o_qq",o_qq);
+        manager.o_qq = o_qq;
+
+        map.put("is_agree",String.valueOf(CreditCardInfosManager.getInstance().is_agree));
+        presenter.commitDetails(map);
+    }
+
+
+    @Override
+    public boolean isViewActive() {
+        return isAdded();
+    }
+
+    @Override
+    public void showProgress(String msg) {
+        Toast.makeText(activity,msg,Toast.LENGTH_SHORT).show();
+    }
+
+    @Override
+    public void goNext() {
         onNextStepCallback.onNextStep(ApplyForCreditCardActivity.STEP_DETAILS);
     }
 }

+ 41 - 5
app/src/main/java/com/sheep/groups/creditcard/BasicInfoPresenter.java

@@ -8,6 +8,9 @@ import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 
+import org.json.JSONException;
+import org.json.JSONObject;
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -28,6 +31,12 @@ public class BasicInfoPresenter implements BasicInfoContact.Presenter {
     HttpService httpService;
     BasicInfoContact.View view;
 
+    private String ticket;
+
+    public String getTicket() {
+        return ticket;
+    }
+
     @Inject
     public BasicInfoPresenter(HttpService service){
         this.httpService = service;
@@ -114,6 +123,7 @@ public class BasicInfoPresenter implements BasicInfoContact.Presenter {
 
     @Override
     public void commitBasic(Map<String, String> map) {
+        Log.e(TAG, "commitBasic: "+map.toString() );
         httpService
                 .commitCreditCardBasic(map)
                 .subscribeOn(Schedulers.io())
@@ -126,15 +136,26 @@ public class BasicInfoPresenter implements BasicInfoContact.Presenter {
 
                     @Override
                     public void onError(Throwable e) {
-                        Log.e(TAG, "onError: "+e.getMessage() );
+                        Log.e(TAG, "onError:commitBasic: "+e.getMessage() );
                     }
 
                     @Override
                     public void onNext(String s) {
-                        Log.e(TAG, "onNext: "+s );
-                        if(isContactViewActive()){
-                            view.goNext();
+                        Log.e(TAG, "onNext-commitBasic: "+s );
+
+                        try {
+                            JSONObject object = new JSONObject(s);
+                            if(object.getBoolean("success")){
+                                view.goNext();
+                            }
+                            else {
+                                view.showProgress(object.getString("errors"));
+                            }
+
+                        } catch (JSONException e) {
+                            e.printStackTrace();
                         }
+
                     }
                 });
     }
@@ -154,13 +175,28 @@ public class BasicInfoPresenter implements BasicInfoContact.Presenter {
                     @Override
                     public void onError(Throwable e) {
                         Log.e(TAG, "onError: "+e.getMessage() );
+                        view.showProgress(e.getMessage());
                     }
 
                     @Override
                     public void onNext(String s) {
                         Log.e(TAG, "onNext: "+s );
-                        if(isContactViewActive()){
+                        view.showProgress(s);
+                        //保存ticket
+                        try {
+                            JSONObject object = new JSONObject(s);
+                            if(object.getBoolean("success")){
+                                ticket = object.getJSONObject("data").getString("ticket");
+                                view.showProgress(object.getString("验证码发送成功"));
+                            }
+                            else {
+                                view.showProgress(object.getString("errors"));
+                            }
+
+                        } catch (JSONException e) {
+                            e.printStackTrace();
                         }
+
                     }
                 });
     }

+ 167 - 0
app/src/main/java/com/sheep/groups/creditcard/CountDownUtil.java

@@ -0,0 +1,167 @@
+package com.sheep.groups.creditcard;
+
+/**
+ * Created by guoxin on 2018/4/3.
+ */
+
+import android.os.Handler;
+import android.os.Message;
+import android.support.annotation.ColorRes;
+import android.support.annotation.Nullable;
+import android.view.View;
+import android.widget.TextView;
+
+import java.lang.ref.WeakReference;
+
+/**
+ * 倒计时工具
+ * Created by weijing on 2017-08-22 11:50.
+ */
+
+public class CountDownUtil {
+    /**
+     * 开始倒计时code
+     */
+    private final int MSG_WHAT_START = 10_010;
+    /**
+     * 弱引用
+     */
+    private WeakReference<TextView> mWeakReference;
+    /**
+     * 倒计时时间
+     */
+    private long mCountDownMillis = 60_000;
+    /**
+     * 提示文字
+     */
+    private String mHintText = "重新发送";
+
+    /**
+     * 剩余倒计时时间
+     */
+    private long mLastMillis;
+
+    /**
+     * 间隔时间差(两次发送handler)
+     */
+    private long mIntervalMillis = 1_000;
+
+    /**
+     * 可用状态下字体颜色Id
+     */
+    private int usableColorId = android.R.color.holo_blue_light;
+    /**
+     * 不可用状态下字体颜色Id
+     */
+    private int unusableColorId = android.R.color.darker_gray;
+
+
+    private Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            super.handleMessage(msg);
+
+            switch (msg.what) {
+                case MSG_WHAT_START:
+                    if (mLastMillis > 0) {
+                        setUsable(false);
+                        mLastMillis -= mIntervalMillis;
+                        if (mWeakReference.get() != null) {
+                            mHandler.sendEmptyMessageDelayed(MSG_WHAT_START, mIntervalMillis);
+                        }
+                    } else {
+                        setUsable(true);
+                    }
+                    break;
+            }
+        }
+    };
+
+    public CountDownUtil(TextView textView) {
+        mWeakReference = new WeakReference<>(textView);
+    }
+
+    public CountDownUtil(TextView textView, long countDownMillis) {
+        mWeakReference = new WeakReference<>(textView);
+        this.mCountDownMillis = countDownMillis;
+    }
+
+    public CountDownUtil setCountDownMillis(long countDownMillis) {
+        this.mCountDownMillis = countDownMillis;
+        return this;
+    }
+
+
+    /**
+     * 设置是否可用
+     *
+     * @param usable
+     */
+    private void setUsable(boolean usable) {
+        TextView mTextView = mWeakReference.get();
+        if (mTextView != null) {
+            if (usable) {
+                //可用
+                if (!mTextView.isClickable()) {
+                    mTextView.setClickable(usable);
+                    mTextView.setTextColor(mTextView.getResources().getColor(usableColorId));
+                    mTextView.setText(mHintText);
+                }
+            } else {
+                //不可用
+                if (mTextView.isClickable()) {
+                    mTextView.setClickable(usable);
+                    mTextView.setTextColor(mTextView.getResources().getColor(unusableColorId));
+                }
+//                String content = mLastMillis / 1000 + "秒后" + mHintText;
+                String content = mLastMillis / 1000 + "秒";
+                mTextView.setText(content);
+
+            }
+        }
+    }
+
+    /**
+     * 设置倒计时颜色
+     *
+     * @param usableColorId   可用状态下的颜色
+     * @param unusableColorId 不可用状态下的颜色
+     */
+    public CountDownUtil setCountDownColor(@ColorRes int usableColorId, @ColorRes int unusableColorId) {
+        this.usableColorId = usableColorId;
+        this.unusableColorId = unusableColorId;
+        return this;
+    }
+
+    /**
+     * 开始倒计时
+     */
+    public CountDownUtil start() {
+        mLastMillis = mCountDownMillis;
+        mHandler.sendEmptyMessage(MSG_WHAT_START);
+        return this;
+    }
+
+    public CountDownUtil setOnClickListener(@Nullable final View.OnClickListener onClickListener) {
+        TextView mTextView = mWeakReference.get();
+        if (mTextView != null)
+            mTextView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    mHandler.removeMessages(MSG_WHAT_START);
+                    start();
+                    onClickListener.onClick(v);
+                }
+            });
+        return this;
+    }
+
+    /**
+     * 重置停止倒计时
+     */
+    public CountDownUtil reset() {
+        mLastMillis = 0;
+        mHandler.sendEmptyMessage(MSG_WHAT_START);
+        return this;
+    }
+}

+ 67 - 0
app/src/main/java/com/sheep/groups/creditcard/CreditCardInfosManager.java

@@ -0,0 +1,67 @@
+package com.sheep.groups.creditcard;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by guoxin on 2018/4/3.
+ */
+
+public class CreditCardInfosManager {
+
+    private static CreditCardInfosManager instance;
+
+    private CreditCardInfosManager(){
+
+    }
+
+    public static CreditCardInfosManager getInstance(){
+        if(instance == null){
+            synchronized (CreditCardInfosManager.class){
+                if(instance == null){
+                    instance = new CreditCardInfosManager();
+                }
+            }
+        }
+        return instance;
+    }
+
+
+
+    public String card_id;//卡类型
+    public String b_name;
+    public String b_mobile;
+    public String b_card;//身份证号
+    public String b_sms;
+    public String ticket;
+    public String p_city;
+    public String p_address;
+    public String p_email;
+    public String p_marray;
+    public String p_edu;
+    public String w_name;
+    public String w_city;
+    public String w_address;
+    public String w_tel;
+    public String w_age;
+    public String c_d_name;
+    public String c_d_mobile;
+    public String c_d_relation;
+    public String c_o_name;
+    public String c_o_mobile;
+    public String c_o_relation;
+    public String c_id_expire;
+    public String o_p_number;
+    public String o_tel;
+    public String o_qq;
+    public boolean is_agree = false;
+
+
+    private Map<String,String> makeMap(){
+        Map<String,String> map = new HashMap<>();
+
+        return map;
+    }
+
+
+}

+ 15 - 0
app/src/main/java/com/sheep/groups/creditcard/DetailsComponent.java

@@ -0,0 +1,15 @@
+package com.sheep.groups.creditcard;
+
+import com.kfzs.libs.di.http.HttpComponent;
+import com.kfzs.libs.di.http.HttpScope;
+
+import dagger.Component;
+
+/**
+ * Created by guoxin on 2018/4/2.
+ */
+@HttpScope
+@Component(dependencies = HttpComponent.class)
+public interface DetailsComponent {
+    void inject(ApplyForCreditCardDetailsFragment fragment);
+}

+ 25 - 0
app/src/main/java/com/sheep/groups/creditcard/DetailsContact.java

@@ -0,0 +1,25 @@
+package com.sheep.groups.creditcard;
+
+
+import com.kfzs.libs.IPresenter;
+import com.kfzs.libs.IView;
+
+import java.util.Map;
+
+/**
+ * Created by guoxin on 2018/3/29.
+ */
+
+ interface DetailsContact {
+
+    interface View extends IView {
+        void showProgress(String msg);
+        void goNext();
+    }
+
+    interface Presenter extends IPresenter {
+        void commitFormData(String key, String value, String cardId);
+        void commitDetails(Map<String,String> map);
+    }
+
+}

+ 112 - 0
app/src/main/java/com/sheep/groups/creditcard/DetailsPresenter.java

@@ -0,0 +1,112 @@
+package com.sheep.groups.creditcard;
+
+import android.util.Log;
+
+import com.kfzs.libs.IView;
+import com.kfzs.libs.di.http.HttpService;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.inject.Inject;
+
+import rx.Observer;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by guoxin on 2018/4/2.
+ */
+
+public class DetailsPresenter implements DetailsContact.Presenter {
+
+    public static final String TAG = "DetailsPresenter";
+
+    HttpService httpService;
+    DetailsContact.View view;
+
+    @Inject
+    public DetailsPresenter(HttpService service){
+        this.httpService = service;
+    }
+
+    @Override
+    public void attachedView(IView view) {
+        this.view = (DetailsContact.View) view;
+    }
+
+    @Override
+    public void detachedView() {
+        this.view = null;
+    }
+
+    @Override
+    public boolean isContactViewActive() {
+        if (view != null) {
+            return view.isViewActive();
+        }
+        return false;
+    }
+
+
+
+    @Override
+    public void commitFormData(String key, String value, String cardId) {
+        Map<String,String> map = new HashMap<>();
+        map.put("token", SpUtils.getOpenId(SheepApp.mContext));
+        map.put("key",key);
+        map.put("value",value);
+        map.put("card_id",cardId);
+        httpService
+                .commitCreditCardFiled(map)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new Observer<String>() {
+                    @Override
+                    public void onCompleted() {
+
+                    }
+
+                    @Override
+                    public void onError(Throwable e) {
+                        Log.e(TAG, "onError: "+e.getMessage() );
+                    }
+
+                    @Override
+                    public void onNext(String s) {
+                        Log.e(TAG, "onNext: "+s );
+                    }
+                });
+    }
+
+    @Override
+    public void commitDetails(Map<String, String> map) {
+        httpService
+                .commitCreditCardDetails(map)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new Observer<String>() {
+                    @Override
+                    public void onCompleted() {
+
+                    }
+
+                    @Override
+                    public void onError(Throwable e) {
+                        Log.e(TAG, "onError: "+e.getMessage() );
+                        view.showProgress(e.getLocalizedMessage());
+                    }
+
+                    @Override
+                    public void onNext(String s) {
+                        Log.e(TAG, "onNext: "+s );
+                        view.showProgress(s);
+                        view.goNext();
+                    }
+                });
+    }
+
+
+}

+ 113 - 0
app/src/main/java/com/sheep/groups/creditcard/RegexConstants.java

@@ -0,0 +1,113 @@
+package com.sheep.groups.creditcard;
+
+/**
+ * Created by guoxin on 2018/4/3.
+ */
+public final class RegexConstants {
+
+    /**
+     * Regex of simple mobile.
+     */
+    public static final String REGEX_MOBILE_SIMPLE = "^[1]\\d{10}$";
+    /**
+     * Regex of exact mobile.
+     * <p>china mobile: 134(0-8), 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 178, 182, 183, 184, 187, 188, 198</p>
+     * <p>china unicom: 130, 131, 132, 145, 155, 156, 166, 171, 175, 176, 185, 186</p>
+     * <p>china telecom: 133, 153, 173, 177, 180, 181, 189, 199</p>
+     * <p>global star: 1349</p>
+     * <p>virtual operator: 170</p>
+     */
+    public static final String REGEX_MOBILE_EXACT  = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(16[6])|(17[0,1,3,5-8])|(18[0-9])|(19[8,9]))\\d{8}$";
+    /**
+     * Regex of telephone number.
+     */
+    public static final String REGEX_TEL           = "^0\\d{2,3}[- ]?\\d{7,8}";
+    /**
+     * Regex of id card number which length is 15.
+     */
+    public static final String REGEX_ID_CARD15     = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$";
+    /**
+     * Regex of id card number which length is 18.
+     */
+    public static final String REGEX_ID_CARD18     = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9Xx])$";
+    /**
+     * Regex of email.
+     */
+    public static final String REGEX_EMAIL         = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
+    /**
+     * Regex of url.
+     */
+    public static final String REGEX_URL           = "[a-zA-z]+://[^\\s]*";
+    /**
+     * Regex of Chinese character.
+     */
+    public static final String REGEX_ZH            = "^[\\u4e00-\\u9fa5]+$";
+    /**
+     * Regex of username.
+     * <p>scope for "a-z", "A-Z", "0-9", "_", "Chinese character"</p>
+     * <p>can't end with "_"</p>
+     * <p>length is between 6 to 20</p>
+     */
+    public static final String REGEX_USERNAME      = "^[\\w\\u4e00-\\u9fa5]{6,20}(?<!_)$";
+    /**
+     * Regex of date which pattern is "yyyy-MM-dd".
+     */
+    public static final String REGEX_DATE          = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$";
+    /**
+     * Regex of ip address.
+     */
+    public static final String REGEX_IP            = "((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)";
+
+    ///////////////////////////////////////////////////////////////////////////
+    // The following come from http://tool.oschina.net/regex
+    ///////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Regex of double-byte characters.
+     */
+    public static final String REGEX_DOUBLE_BYTE_CHAR     = "[^\\x00-\\xff]";
+    /**
+     * Regex of blank line.
+     */
+    public static final String REGEX_BLANK_LINE           = "\\n\\s*\\r";
+    /**
+     * Regex of QQ number.
+     */
+    public static final String REGEX_QQ_NUM               = "[1-9][0-9]{4,}";
+    /**
+     * Regex of postal code in China.
+     */
+    public static final String REGEX_CHINA_POSTAL_CODE    = "[1-9]\\d{5}(?!\\d)";
+    /**
+     * Regex of positive integer.
+     */
+    public static final String REGEX_POSITIVE_INTEGER     = "^[1-9]\\d*$";
+    /**
+     * Regex of negative integer.
+     */
+    public static final String REGEX_NEGATIVE_INTEGER     = "^-[1-9]\\d*$";
+    /**
+     * Regex of integer.
+     */
+    public static final String REGEX_INTEGER              = "^-?[1-9]\\d*$";
+    /**
+     * Regex of non-negative integer.
+     */
+    public static final String REGEX_NOT_NEGATIVE_INTEGER = "^[1-9]\\d*|0$";
+    /**
+     * Regex of non-positive integer.
+     */
+    public static final String REGEX_NOT_POSITIVE_INTEGER = "^-[1-9]\\d*|0$";
+    /**
+     * Regex of positive float.
+     */
+    public static final String REGEX_POSITIVE_FLOAT       = "^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$";
+    /**
+     * Regex of negative float.
+     */
+    public static final String REGEX_NEGATIVE_FLOAT       = "^-[1-9]\\d*\\.\\d*|-0\\.\\d*[1-9]\\d*$";
+
+    ///////////////////////////////////////////////////////////////////////////
+    // If u want more please visit http://toutiao.com/i6231678548520731137
+    ///////////////////////////////////////////////////////////////////////////
+}

+ 220 - 0
app/src/main/java/com/sheep/groups/creditcard/RegexUtils.java

@@ -0,0 +1,220 @@
+package com.sheep.groups.creditcard;
+
+/**
+ * Created by guoxin on 2018/4/3.
+ */
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * <pre>
+ *     author: Blankj
+ *     blog  : http://blankj.com
+ *     time  : 2016/08/02
+ *     desc  : utils about regex
+ * </pre>
+ */
+public final class RegexUtils {
+
+    private RegexUtils() {
+        throw new UnsupportedOperationException("u can't instantiate me...");
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // If u want more please visit http://toutiao.com/i6231678548520731137
+    ///////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Return whether input matches regex of simple mobile.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isMobileSimple(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_MOBILE_SIMPLE, input);
+    }
+
+    /**
+     * Return whether input matches regex of exact mobile.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isMobileExact(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_MOBILE_EXACT, input);
+    }
+
+    /**
+     * Return whether input matches regex of telephone number.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isTel(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_TEL, input);
+    }
+
+    /**
+     * Return whether input matches regex of id card number which length is 15.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isIDCard15(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_ID_CARD15, input);
+    }
+
+    /**
+     * Return whether input matches regex of id card number which length is 18.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isIDCard18(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_ID_CARD18, input);
+    }
+
+    /**
+     * Return whether input matches regex of email.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isEmail(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_EMAIL, input);
+    }
+
+    /**
+     * Return whether input matches regex of url.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isURL(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_URL, input);
+    }
+
+    /**
+     * Return whether input matches regex of Chinese character.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isZh(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_ZH, input);
+    }
+
+    /**
+     * Return whether input matches regex of username.
+     * <p>scope for "a-z", "A-Z", "0-9", "_", "Chinese character"</p>
+     * <p>can't end with "_"</p>
+     * <p>length is between 6 to 20</p>.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isUsername(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_USERNAME, input);
+    }
+
+    /**
+     * Return whether input matches regex of date which pattern is "yyyy-MM-dd".
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isDate(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_DATE, input);
+    }
+
+    /**
+     * Return whether input matches regex of ip address.
+     *
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isIP(final CharSequence input) {
+        return isMatch(RegexConstants.REGEX_IP, input);
+    }
+
+    /**
+     * Return whether input matches the regex.
+     *
+     * @param regex The regex.
+     * @param input The input.
+     * @return {@code true}: yes<br>{@code false}: no
+     */
+    public static boolean isMatch(final String regex, final CharSequence input) {
+        return input != null && input.length() > 0 && Pattern.matches(regex, input);
+    }
+
+    /**
+     * Return the list of input matches the regex.
+     *
+     * @param regex The regex.
+     * @param input The input.
+     * @return the list of input matches the regex
+     */
+    public static List<String> getMatches(final String regex, final CharSequence input) {
+        if (input == null) return null;
+        List<String> matches = new ArrayList<>();
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(input);
+        while (matcher.find()) {
+            matches.add(matcher.group());
+        }
+        return matches;
+    }
+
+    /**
+     * Splits input around matches of the regex.
+     *
+     * @param input The input.
+     * @param regex The regex.
+     * @return the array of strings computed by splitting input around matches of regex
+     */
+    public static String[] getSplits(final String input, final String regex) {
+        if (input == null) return null;
+        return input.split(regex);
+    }
+
+    /**
+     * Replace the first subsequence of the input sequence that matches the
+     * regex with the given replacement string.
+     *
+     * @param input       The input.
+     * @param regex       The regex.
+     * @param replacement The replacement string.
+     * @return the string constructed by replacing the first matching
+     * subsequence by the replacement string, substituting captured
+     * subsequences as needed
+     */
+    public static String getReplaceFirst(final String input,
+                                         final String regex,
+                                         final String replacement) {
+        if (input == null) return null;
+        return Pattern.compile(regex).matcher(input).replaceFirst(replacement);
+    }
+
+    /**
+     * Replace every subsequence of the input sequence that matches the
+     * pattern with the given replacement string.
+     *
+     * @param input       The input.
+     * @param regex       The regex.
+     * @param replacement The replacement string.
+     * @return the string constructed by replacing each matching subsequence
+     * by the replacement string, substituting captured subsequences
+     * as needed
+     */
+    public static String getReplaceAll(final String input,
+                                       final String regex,
+                                       final String replacement) {
+        if (input == null) return null;
+        return Pattern.compile(regex).matcher(input).replaceAll(replacement);
+    }
+}

+ 55 - 18
app/src/main/res/layout/fragment_apply_for_credit_card_commit.xml

@@ -31,8 +31,10 @@
                         android:text="证件有效期" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_card_time"
                         style="@style/creditCardInputItemEtStyle"
-                        android:hint="重要信息,请正确填写" />
+                        android:hint="重要信息,请正确填写"
+                        android:enabled="false"/>
 
                 </LinearLayout>
 
@@ -43,10 +45,12 @@
                         android:text="所在地" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_address_origin"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请选择"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -56,10 +60,12 @@
                         android:text="住在地址" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_address_now"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请选择"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -70,9 +76,11 @@
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
                         style="@style/creditCardInputItemEtStyle"
+                        android:id="@+id/edit_email"
                         android:hint="请填写"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -81,7 +89,16 @@
                         style="@style/creditCardInputItemTitleStyle"
                         android:text="婚姻状况" />
 
-
+                    <CheckBox
+                        android:id="@+id/cbx_marry_yes"
+                        style="@style/checkbox_creditcard_marry_style"
+                        android:text="是"/>
+                    <CheckBox
+                        android:id="@+id/cbx_marry_no"
+                        style="@style/checkbox_creditcard_marry_style"
+                        android:text="否"
+                        android:layout_marginLeft="30dp"
+                        />
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -91,10 +108,12 @@
                         android:text="教育程度" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_edu_info"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -104,10 +123,12 @@
                         android:text="单位名称" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_company_name"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -117,10 +138,12 @@
                         android:text="单位城市" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_company_city"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -130,10 +153,12 @@
                         android:text="单位地址" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_company_address"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -143,10 +168,12 @@
                         android:text="单位电话" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_company_tel"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
                 <LinearLayout style="@style/creditCardInputItemStyle">
@@ -156,10 +183,12 @@
                         android:text="工作年限" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_work_life"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
 
@@ -173,10 +202,12 @@
                             style="@style/creditCardInputItemTitleStyle"
                             android:text="直属亲属名字" />
                         <com.kfzs.libs.widget.CompleteCommitEditText
+                            android:id="@+id/edit_family_name"
                             style="@style/creditCardInputItemEtStyle"
                             android:hint="请填写"
                             android:inputType="number"
-                            android:maxLength="11" />
+                            android:maxLength="11"
+                            android:enabled="false"/>
                     </LinearLayout>
 
                     <LinearLayout
@@ -190,10 +221,12 @@
                             android:paddingRight="4dp"
                             android:text="关系" />
                         <com.kfzs.libs.widget.CompleteCommitEditText
+                            android:id="@+id/edit_relationship"
                             style="@style/creditCardInputItemEtStyle"
                             android:hint="请填写"
                             android:inputType="number"
-                            android:maxLength="11" />
+                            android:maxLength="11"
+                            android:enabled="false"/>
                     </LinearLayout>
                     <LinearLayout
                         android:layout_width="0dp"
@@ -206,10 +239,12 @@
                             android:paddingRight="4dp"
                             android:text="电话" />
                         <com.kfzs.libs.widget.CompleteCommitEditText
+                            android:id="@+id/edit_family_tel"
                             style="@style/creditCardInputItemEtStyle"
                             android:hint="186****4624"
                             android:inputType="number"
-                            android:maxLength="11" />
+                            android:maxLength="11"
+                            android:enabled="false"/>
                     </LinearLayout>
 
 
@@ -222,10 +257,12 @@
                         android:text="其他联系人" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/edit_relationship_other"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写"
                         android:inputType="number"
-                        android:maxLength="11" />
+                        android:maxLength="11"
+                        android:enabled="false"/>
 
                 </LinearLayout>
 
@@ -245,13 +282,13 @@
             android:layout_marginTop="12dp"
             />
         <com.kfzs.libs.widget.alpha.AlphaButton
-            android:id="@+id/btn_next"
+            android:id="@+id/btn_commit_info"
             style="@style/creditCardBtnGradientStyle"
             android:layout_marginTop="12dp"
-            android:text="下一步" />
+            android:text="提交信息" />
 
         <com.kfzs.libs.widget.alpha.AlphaButton
-            android:id="@+id/btn_fix_infos"
+            android:id="@+id/btn_modify_infos"
             style="@style/creditCardBtnGradientStyle"
             android:layout_marginTop="12dp"
             android:text="修改提交信息" />

+ 12 - 5
app/src/main/res/layout/fragment_apply_for_credit_card_details.xml

@@ -73,18 +73,23 @@
                         style="@style/creditCardInputItemTitleStyle"
                         android:text="婚姻状况" />
 
-                    <RadioGroup style="@style/creditCardInputItemRadiogroupStyle">
+                    <RadioGroup
+                        android:id="@+id/rg_marray"
+                        style="@style/creditCardInputItemRadiogroupStyle">
                         <RadioButton
+                            android:id="@+id/rb_marray_n"
                             android:text=" 未婚"
-                            android:tag="Y"
+                            android:tag="N"
                             style="@style/creditCardInputItemRadioBtnStyle" />
 
                         <RadioButton
+                            android:id="@+id/rb_marray_y"
                             android:text=" 已婚"
-                            android:tag="N"
+                            android:tag="Y"
                             style="@style/creditCardInputItemRadioBtnStyle" />
 
                         <RadioButton
+                            android:id="@+id/rb_marray_o"
                             android:text=" 其他"
                             android:tag="O"
                             style="@style/creditCardInputItemRadioBtnStyle" />
@@ -278,8 +283,8 @@
                         style="@style/creditCardInputItemTitleStyle"
                         android:text="证件有效期" />
 
-                    <com.kfzs.libs.widget.CompleteCommitEditText
-                        android:id="@+id/et_id_no_expire"
+                    <TextView
+                        android:id="@+id/tv_id_no_expire"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="1"
                         android:hint="身份证有效期终止日期"
@@ -287,6 +292,7 @@
                         />
 
                     <CheckBox
+                        android:id="@+id/cb_expire"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:button="@drawable/gx_credit_card_radiobtn"
@@ -358,6 +364,7 @@
                             style="@style/creditCardInputItemTitleStyle"
                             android:text="开通快捷还款" />
                         <CheckBox
+                            android:id="@+id/cb_agreement"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:button="@drawable/gx_credit_card_radiobtn"

+ 8 - 2
app/src/main/res/layout/homepage_act_layout.xml

@@ -7,6 +7,7 @@
     android:background="@color/bg_gray">
 
     <ScrollView
+        android:id="@+id/scrollView"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:scrollbars="none">
@@ -121,12 +122,13 @@
                 android:visibility="gone"/>
             <RelativeLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content">
+                android:layout_height="wrap_content"
+                android:padding="@dimen/content_padding_10">
 
                 <android.support.v4.view.ViewPager
                     android:id="@+id/viewpager_banner"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
+                    android:layout_height="@dimen/app_group_height_135"
                     android:minHeight="@dimen/app_group_height_120" />
 
                 <RadioGroup
@@ -228,6 +230,10 @@
                     ></com.layoutscroll.layoutscrollcontrols.view.EasyLayoutScroll>
 
             </LinearLayout>
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/view_size_40"
+                android:background="@color/bg_gray"/>
         </LinearLayout>
     </ScrollView>
 

+ 1 - 1
app/src/main/res/layout/try_makemoney_item.xml

@@ -82,7 +82,7 @@
             android:text="任务详情"
             android:minWidth="@dimen/view_size_73"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_size_12"
+            android:textSize="@dimen/text_size_15"
             android:gravity="center"
             android:padding="@dimen/content_padding_3"
             android:layout_alignParentRight="true"

+ 1 - 1
app/src/main/res/layout/try_makemoney_item_recommend.xml

@@ -68,7 +68,7 @@
             android:text="任务详情"
             android:minWidth="@dimen/view_size_73"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_size_12"
+            android:textSize="@dimen/text_size_15"
             android:gravity="center"
             android:padding="@dimen/content_padding_3"
             android:layout_alignParentRight="true"

+ 1 - 0
app/src/main/res/values/dimen_app_dimens.xml

@@ -51,6 +51,7 @@
     <dimen name="content_padding_default">12dp</dimen>
 
     <dimen name="app_group_height_120">120dp</dimen>
+    <dimen name="app_group_height_135">135dp</dimen>
     <dimen name="app_group_height_160">160dp</dimen>
     <dimen name="app_group_height_170">170dp</dimen>
     <dimen name="app_group_height_180">180dp</dimen>

+ 2 - 0
app/src/main/res/values/gx_strings.xml

@@ -22,4 +22,6 @@
         <item>同事</item>
         <item>其他</item>
     </string-array>
+
+    <color name="credit_blue_color">#0089ee</color>
 </resources>

+ 8 - 0
app/src/main/res/values/styles.xml

@@ -171,6 +171,14 @@
         <item name="android:singleLine">true</item>
     </style>
 
+    <style name="checkbox_creditcard_marry_style">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:textSize">11sp</item>
+        <item name="android:textColor">#b5b5b5</item>
+        <item name="android:enabled">false</item>
+    </style>
+
     <style name="creditCardInputItemSpinnerStyle">
         <item name="android:layout_width">0dp</item>
         <item name="android:layout_height">wrap_content</item>

+ 5 - 0
kfzslibrary/src/main/java/com/kfzs/libs/di/http/HttpService.java

@@ -34,4 +34,9 @@ public interface HttpService {
     @FormUrlEncoded
     @POST("credits/cmbc/code")
     Observable<String> getCreditCardDynamic(@FieldMap Map<String, String> map);
+
+    //表格形式发送
+    @FormUrlEncoded
+    @POST("credits/cmbc/extend")
+    Observable<String> commitCreditCardDetails(@FieldMap Map<String, String> map);
 }