Explorar el Código

信用卡模块接口调试

guoxin hace 8 años
padre
commit
60cc937726

+ 138 - 5
app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardBasicInfoFragment.java

@@ -10,18 +10,30 @@ import android.text.SpannableString;
 import android.text.SpannableStringBuilder;
 import android.text.Spanned;
 import android.text.TextPaint;
+import android.text.TextUtils;
 import android.text.method.LinkMovementMethod;
 import android.text.style.ClickableSpan;
+import android.util.Log;
 import android.view.View;
 import android.widget.Button;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import com.kfzs.libs.DaggerFragment;
+import com.kfzs.libs.IDaggerMvp;
 import com.kfzs.libs.IPresenter;
 import com.kfzs.libs.IView;
+import com.kfzs.libs.widget.CompleteCommitEditText;
+import com.kfzs.libs.widget.toast.ToastView;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 
 import java.lang.ref.WeakReference;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.inject.Inject;
 
 import butterknife.BindView;
 import butterknife.OnClick;
@@ -30,8 +42,11 @@ import butterknife.OnClick;
  * Created by guoxin on 2018/4/2.
  */
 
-public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implements CreditCardConfirmDialog.OnComfirmCallback {
+public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implements CreditCardConfirmDialog.OnComfirmCallback,BasicInfoContact.View {
+
+    public static final String TAG = "BasicInfoPresenter";
 
+    @Inject BasicInfoPresenter presenter;
 
     @BindView(R.id.tv_agreement)
     TextView tvAgreement;
@@ -41,10 +56,23 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
     Button btnCardNormal;
     @BindView(R.id.btn_card_gold)
     Button btnCardGold;
+    //
+    @BindView(R.id.tv_dynamic)
+    TextView tvDynamic;
+    //et
+    @BindView(R.id.et_name)
+    CompleteCommitEditText etName;
+    @BindView(R.id.et_mobile)
+    CompleteCommitEditText etMobile;
+    @BindView(R.id.et_id_no)
+    CompleteCommitEditText etIdNo;
+    @BindView(R.id.et_dynamic)
+    CompleteCommitEditText etDynamic;
 
     OnNextStepCallback onNextStepCallback;
     private CreditCardDisplayFragment normalCardDisplayFragment;
     private CreditCardDisplayFragment goldCardDisplayFragment;
+    private int curType = CreditCardDisplayFragment.CARD_TYPE_NORMAL;
 
     @Override
     public void onAttach(Context context) {
@@ -59,16 +87,21 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
     @Override
     public void setupDaggerComponent() {
 
+        DaggerBasicInfoComponent
+                .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
@@ -95,6 +128,58 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
 
         btnCardNormal.performClick();
 
+        etName.setOnCompleteEditListener(new CompleteCommitEditText.OnCompleteEditListener() {
+            @Override
+            public void onCompleteEdit(String text) {
+                presenter.commitFormData("b_name",text,getCardId());
+            }
+        });
+
+        etMobile.setOnCompleteEditListener(new CompleteCommitEditText.OnCompleteEditListener() {
+            @Override
+            public void onCompleteEdit(String text) {
+                presenter.commitFormData("b_mobile",text,getCardId());
+            }
+        });
+
+        etIdNo.setOnCompleteEditListener(new CompleteCommitEditText.OnCompleteEditListener() {
+            @Override
+            public void onCompleteEdit(String text) {
+                presenter.commitFormData("b_card",text,getCardId());
+            }
+        });
+
+        etDynamic.setOnCompleteEditListener(new CompleteCommitEditText.OnCompleteEditListener() {
+            @Override
+            public void onCompleteEdit(String text) {
+                presenter.commitFormData("b_sms",text,getCardId());
+            }
+        });
+
+        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);
+            }
+        });
+
+    }
+
+    private String getCardId(){
+        String cardId = "";
+        if(CreditCardDisplayFragment.CARD_TYPE_NORMAL == curType){
+            cardId =  String.valueOf(normalCardDisplayFragment.getCardDetailType());
+        }
+        else if(CreditCardDisplayFragment.CARD_TYPE_GOLD == curType){
+            cardId =  String.valueOf(goldCardDisplayFragment.getCardDetailType());
+        }
+        Log.e(TAG, "getCardId: "+cardId );
+        return cardId;
     }
 
     private void createAgreement(SpannableStringBuilder strBuilder, String content, String linkedUrl, String sufixStr){
@@ -106,9 +191,33 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
 
     @Override
     public void onConfirm() {
+
+        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("token", SpUtils.getOpenId(SheepApp.mContext));
+        map.put("card_id",getCardId());
+
+        presenter.commitBasic(map);
+
+    }
+    @Override
+    public void goNext(){
         onNextStepCallback.onNextStep(ApplyForCreditCardActivity.STEP_BASICS);
     }
 
+    @Override
+    public boolean isViewActive() {
+        return isAdded();
+    }
+
+    @Override
+    public void showProgress(String msg) {
+
+    }
+
 
     public static class AgreementSpannableString extends SpannableString {
 
@@ -125,8 +234,7 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
     public void btnClick(View view){
         switch (view.getId()){
             case R.id.btn_next:
-                showConfirmDialog();
-
+                clickBtnNext();
                 break;
             case R.id.btn_card_normal:
                 selectNormalCard();
@@ -138,6 +246,27 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
 
     }
 
+    private void clickBtnNext(){
+        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(TextUtils.isEmpty(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;
+        }
+
+        showConfirmDialog();
+    }
+
     private void selectNormalCard(){
         btnCardNormal.setSelected(true);
         btnCardGold.setSelected(false);
@@ -146,6 +275,8 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
             normalCardDisplayFragment = CreditCardDisplayFragment.newInstance(CreditCardDisplayFragment.CARD_TYPE_NORMAL);
         }
 
+        curType = CreditCardDisplayFragment.CARD_TYPE_NORMAL;
+
         getChildFragmentManager()
                 .beginTransaction()
                 .replace(R.id.fl_credit_card_display_container,normalCardDisplayFragment)
@@ -158,6 +289,8 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
         if(goldCardDisplayFragment == null){
             goldCardDisplayFragment = CreditCardDisplayFragment.newInstance(CreditCardDisplayFragment.CARD_TYPE_GOLD);
         }
+
+        curType = CreditCardDisplayFragment.CARD_TYPE_GOLD;
         getChildFragmentManager()
                 .beginTransaction()
                 .replace(R.id.fl_credit_card_display_container,goldCardDisplayFragment)

+ 41 - 1
app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardDetailsFragment.java

@@ -10,6 +10,7 @@ import android.widget.ArrayAdapter;
 import com.kfzs.libs.DaggerFragment;
 import com.kfzs.libs.IPresenter;
 import com.kfzs.libs.IView;
+import com.kfzs.libs.widget.CompleteCommitEditText;
 import com.sheep.jiuyan.samllsheep.R;
 
 import butterknife.BindView;
@@ -26,6 +27,46 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
     @BindView(R.id.sp_relationship_other)
     AppCompatSpinner spRelationshipOther;
 
+    @BindView(R.id.et_city)
+    CompleteCommitEditText etCity;
+    @BindView(R.id.et_address)
+    CompleteCommitEditText etAddress;
+    @BindView(R.id.et_email)
+    CompleteCommitEditText etEmail;
+    @BindView(R.id.et_education)
+    CompleteCommitEditText etEducation;
+    @BindView(R.id.et_company_name)
+    CompleteCommitEditText etCompanyName;
+    @BindView(R.id.et_company_city)
+    CompleteCommitEditText etCompanyCity;
+    @BindView(R.id.et_company_address)
+    CompleteCommitEditText etCompanyAddress;
+    @BindView(R.id.et_company_phone_no)
+    CompleteCommitEditText etCompanyPhoneNo;
+    @BindView(R.id.et_company_phone_q)
+    CompleteCommitEditText etCompanyPhoneQ;
+    @BindView(R.id.et_work_year)
+    CompleteCommitEditText etWorkYear;
+    @BindView(R.id.et_ir_name)
+    CompleteCommitEditText etIRName;
+    @BindView(R.id.et_ir_mobile)
+    CompleteCommitEditText etIRMobile;
+    @BindView(R.id.et_other_r_name)
+    CompleteCommitEditText etOtherName;
+    @BindView(R.id.et_other_r_mobile)
+    CompleteCommitEditText etOtherMobile;
+    @BindView(R.id.et_id_no_expire)
+    CompleteCommitEditText etIdCardExpire;
+    @BindView(R.id.et_car_no)
+    CompleteCommitEditText etCarNo;
+    @BindView(R.id.et_home_q)
+    CompleteCommitEditText etHomeQ;
+    @BindView(R.id.et_home_phone)
+    CompleteCommitEditText etHomePhone;
+    @BindView(R.id.et_qq)
+    CompleteCommitEditText etQQ;
+    @BindView(R.id.et_city)
+
     OnNextStepCallback onNextStepCallback;
     @Override
     public void onAttach(Context context) {
@@ -60,7 +101,6 @@ 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);
 

+ 17 - 0
app/src/main/java/com/sheep/groups/creditcard/BasicInfoComponent.java

@@ -0,0 +1,17 @@
+package com.sheep.groups.creditcard;
+
+import com.kfzs.libs.di.http.HttpComponent;
+import com.kfzs.libs.di.http.HttpScope;
+import com.sheep.gamegroup.di.components.NetComponent;
+import com.sheep.gamegroup.di.scopes.UserScope;
+
+import dagger.Component;
+
+/**
+ * Created by guoxin on 2018/4/2.
+ */
+@HttpScope
+@Component(dependencies = HttpComponent.class)
+public interface BasicInfoComponent {
+    void inject(ApplyForCreditCardBasicInfoFragment fragment);
+}

+ 27 - 0
app/src/main/java/com/sheep/groups/creditcard/BasicInfoContact.java

@@ -0,0 +1,27 @@
+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 BasicInfoContact {
+
+    interface View extends IView {
+        void showProgress(String msg);
+        void goNext();
+    }
+
+    interface Presenter extends IPresenter {
+        void loadData();
+        void commitFormData(String key,String value,String cardId);
+        void commitBasic(Map<String,String> map);
+        void getDynamic(Map<String,String> map);
+    }
+
+}

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

@@ -0,0 +1,167 @@
+package com.sheep.groups.creditcard;
+
+import android.util.Log;
+
+import com.kfzs.libs.IView;
+import com.kfzs.libs.di.http.HttpService;
+import com.sheep.gamegroup.model.api.ApiService;
+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 BasicInfoPresenter implements BasicInfoContact.Presenter {
+
+    public static final String TAG = "BasicInfoPresenter";
+
+    HttpService httpService;
+    BasicInfoContact.View view;
+
+    @Inject
+    public BasicInfoPresenter(HttpService service){
+        this.httpService = service;
+    }
+
+    @Override
+    public void attachedView(IView view) {
+        this.view = (BasicInfoContact.View) view;
+    }
+
+    @Override
+    public void detachedView() {
+        this.view = null;
+    }
+
+    @Override
+    public boolean isContactViewActive() {
+        if (view != null) {
+            return view.isViewActive();
+        }
+        return false;
+    }
+
+
+    @Override
+    public void loadData() {
+        Map<String,String> map = new HashMap<>();
+        map.put("token", SpUtils.getOpenId(SheepApp.mContext));
+        map.put("key","b_mobile");
+        map.put("value","18608003614");
+        map.put("card_id","159");
+        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 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);
+        Log.e(TAG, "commitFormData: "+map.toString() );
+        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 commitBasic(Map<String, String> map) {
+        httpService
+                .commitCreditCardBasic(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 );
+                        if(isContactViewActive()){
+                            view.goNext();
+                        }
+                    }
+                });
+    }
+
+    @Override
+    public void getDynamic(Map<String, String> map) {
+        httpService
+                .getCreditCardDynamic(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 );
+                        if(isContactViewActive()){
+                        }
+                    }
+                });
+    }
+}

+ 4 - 4
app/src/main/java/com/sheep/groups/creditcard/CreditCardDisplayFragment.java

@@ -31,10 +31,10 @@ public class CreditCardDisplayFragment extends SupportLoadingFragment {
     public static final int CARD_TYPE_NORMAL = 0;
     public static final int CARD_TYPE_GOLD = 1;
 
-    public static final int CARD_NORMAL_PAINT = 0;
-    public static final int CARD_NORMAL_MUSICAL = 1;
-    public static final int CARD_GOLD_PAINT = 2;
-    public static final int CARD_GOLD_MUSICAL = 3;
+    public static final int CARD_NORMAL_PAINT = 91;
+    public static final int CARD_NORMAL_MUSICAL = 89;
+    public static final int CARD_GOLD_PAINT = 159;
+    public static final int CARD_GOLD_MUSICAL = 158;
 
     public static final String EXTRA_CARD_TYPE = "card_type";
 

+ 9 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -6,6 +6,9 @@ import android.os.Bundle;
 import android.support.multidex.MultiDex;
 import android.util.DisplayMetrics;
 
+import com.kfzs.libs.di.http.DaggerHttpComponent;
+import com.kfzs.libs.di.http.HttpComponent;
+import com.kfzs.libs.di.http.HttpModule;
 import com.liulishuo.filedownloader.FileDownloader;
 import com.sheep.gamegroup.di.components.DaggerNetComponent;
 import com.sheep.gamegroup.di.components.NetComponent;
@@ -35,6 +38,7 @@ public class SheepApp extends BaseApplication {
     public static Map<String, Activity> mActivitys;
 
     private NetComponent netComponent;
+    private HttpComponent httpComponent;
 
     public static SheepApp get(Context context) {
 
@@ -55,6 +59,11 @@ public class SheepApp extends BaseApplication {
         Bugly.init(getApplicationContext(), Config.BUGLY_APPID, true);
         initNet();
         createFileDownloader();//创建FileDownloader
+        httpComponent = DaggerHttpComponent.builder().httpModule(new HttpModule()).build();
+    }
+
+    public HttpComponent getHttpComponent() {
+        return httpComponent;
     }
 
     private void createFileDownloader() {

+ 5 - 0
app/src/main/res/layout/fragment_apply_for_credit_card_basic_info.xml

@@ -84,6 +84,7 @@
                         android:text="姓名" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_name"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请输入您的姓名" />
 
@@ -96,6 +97,7 @@
                         android:text="手机号" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_mobile"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请输入您的手机号"
                         android:inputType="number"
@@ -110,6 +112,7 @@
                         android:text="身份证" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_id_no"
                         style="@style/creditCardInputItemEtStyle"
                         android:digits="@string/digits_id_no"
                         android:hint="请输入您的身份证号码"
@@ -124,12 +127,14 @@
                         android:text="短信验证码" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_dynamic"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请输入您的验证码"
                         android:inputType="number"
                         android:maxLength="6" />
 
                     <TextView
+                        android:id="@+id/tv_dynamic"
                         style="@style/creditCardInputItemDynamicStyle"
                         android:text="获取验证码"
 

+ 24 - 7
app/src/main/res/layout/fragment_apply_for_credit_card_details.xml

@@ -31,6 +31,7 @@
                         android:text="住宅城市" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_city"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写所在城市" />
 
@@ -43,6 +44,7 @@
                         android:text="住宅地址" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_address"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="详细填写精确到,街道,门牌号"
                         android:inputType="number"
@@ -57,6 +59,7 @@
                         android:text="电子邮箱" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_email"
                         style="@style/creditCardInputItemEtStyle"
                         android:digits="@string/digits_email"
                         android:hint="请提供电子账单发送的邮箱地址"
@@ -73,14 +76,17 @@
                     <RadioGroup style="@style/creditCardInputItemRadiogroupStyle">
                         <RadioButton
                             android:text=" 未婚"
+                            android:tag="Y"
                             style="@style/creditCardInputItemRadioBtnStyle" />
 
                         <RadioButton
                             android:text=" 已婚"
+                            android:tag="N"
                             style="@style/creditCardInputItemRadioBtnStyle" />
 
                         <RadioButton
                             android:text=" 其他"
+                            android:tag="O"
                             style="@style/creditCardInputItemRadioBtnStyle" />
 
                     </RadioGroup>
@@ -93,6 +99,7 @@
                         android:text="教育程度" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_education"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请选择教育程度"
                          />
@@ -118,6 +125,7 @@
                         android:text="单位名称" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_company_name"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写单位名称,15字以内" />
 
@@ -130,6 +138,7 @@
                         android:text="单位城市" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_company_city"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="请填写所在城市"
                          />
@@ -143,6 +152,7 @@
                         android:text="单位地址" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_company_address"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="卡片将邮寄此地址,请详细填写信息"
                          />
@@ -156,11 +166,13 @@
                         android:text="单位电话" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_company_phone_q"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="1"
                         android:hint="区号"
                         android:inputType="number"/>
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_company_phone_no"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="3"
                         android:hint="电话号码"
@@ -174,6 +186,7 @@
                         android:text="工作年限" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_work_year"
                         style="@style/creditCardInputItemEtStyle"
                         android:inputType="number"
                         android:hint="工作年限多少年"
@@ -200,11 +213,13 @@
                         android:text="直属亲属" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_ir_name"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="1"
                         android:hint="姓名"
                         />
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_ir_mobile"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="2"
                         android:hint="手机号"
@@ -224,11 +239,13 @@
                         style="@style/creditCardInputItemTitleStyle"
                         android:text="其他联系人" />
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_other_r_name"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="1"
                         android:hint="姓名"
                         />
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_other_r_mobile"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="2"
                         android:hint="手机号"
@@ -262,17 +279,13 @@
                         android:text="证件有效期" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_id_no_expire"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="1"
-                        android:hint="身份证有效期"
-                        android:inputType="number"
-                        />
-                    <com.kfzs.libs.widget.CompleteCommitEditText
-                        style="@style/creditCardInputItemEtStyle"
-                        android:layout_weight="1"
-                        android:hint="终止日期"
+                        android:hint="身份证有效期终止日期"
                         android:inputType="number"
                         />
+
                     <CheckBox
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -290,6 +303,7 @@
                         android:text="车牌号码" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_car_no"
                         style="@style/creditCardInputItemEtStyle"
                         android:digits="@string/digits_car_no"
                         android:hint="请填写"
@@ -304,11 +318,13 @@
                         android:text="住宅电话" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_home_q"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="1"
                         android:hint="区号"
                         android:inputType="number"/>
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_home_phone"
                         style="@style/creditCardInputItemEtStyle"
                         android:layout_weight="3"
                         android:hint="电话号码"
@@ -322,6 +338,7 @@
                         android:text="常用QQ号" />
 
                     <com.kfzs.libs.widget.CompleteCommitEditText
+                        android:id="@+id/et_qq"
                         style="@style/creditCardInputItemEtStyle"
                         android:hint="常用QQ号"
                         android:inputType="number"

+ 1 - 1
kfzslibrary/src/main/java/com/kfzs/libs/di/http/HttpModule.java

@@ -20,7 +20,7 @@ import retrofit2.converter.gson.GsonConverterFactory;
 @Module
 public class HttpModule {
 
-    public static final String BASE_URL = "https://www.baidu.com";
+    public static final String BASE_URL = "http://10.8.240.165:7011/";
     public static final int CONNECT_TIMEOUT = 15;
     public static final int READ_TIMEOUT = 15;
 

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

@@ -1,7 +1,13 @@
 package com.kfzs.libs.di.http;
 
 
+import java.util.Map;
+
+import retrofit2.Call;
+import retrofit2.http.FieldMap;
+import retrofit2.http.FormUrlEncoded;
 import retrofit2.http.GET;
+import retrofit2.http.POST;
 import rx.Observable;
 
 /**
@@ -13,4 +19,19 @@ public interface HttpService {
     @GET("/")
     Observable<String> sufferBaidu();
 
+
+
+    //表格形式发送
+    @FormUrlEncoded
+    @POST("credits/cmbc/log")
+    Observable<String> commitCreditCardFiled(@FieldMap Map<String, String> map);
+
+    //表格形式发送
+    @FormUrlEncoded
+    @POST("credits/cmbc/basic")
+    Observable<String> commitCreditCardBasic(@FieldMap Map<String, String> map);
+    //表格形式发送
+    @FormUrlEncoded
+    @POST("credits/cmbc/code")
+    Observable<String> getCreditCardDynamic(@FieldMap Map<String, String> map);
 }