Commit fb7811fe by sikang

三个联系人,关系可选

parent 4eb6d9bf
...@@ -134,6 +134,21 @@ public interface UserApi { ...@@ -134,6 +134,21 @@ public interface UserApi {
@Field("friendName") String friendName, @Field("friendName") String friendName,
@Field("friendMobile") String friendMobile, @Field("friendMobile") String friendMobile,
@Header("X-AUTH-TOKEN") String token); @Header("X-AUTH-TOKEN") String token);
@FormUrlEncoded
@PUT("record/contact")
Observable<ResponseBody> submitContactInfo(@Field("parentId") String parentId,
@Field("parentName") String parentName,
@Field("parentMobile") String parentMobile,
@Field("parentType") String parentType,
@Field("friendId") String friendId,
@Field("friendName") String friendName,
@Field("friendType") String friendType,
@Field("friendMobile") String friendMobile,
@Field("friendId1") String friendId1,
@Field("friendName1") String friendName1,
@Field("friendType1") String friendType1,
@Field("friendMobile1") String friendMobile1,
@Header("X-AUTH-TOKEN") String token);
/** /**
* 提交工作认证信息 * 提交工作认证信息
......
...@@ -15,25 +15,33 @@ public class ContactInfoBean implements Serializable { ...@@ -15,25 +15,33 @@ public class ContactInfoBean implements Serializable {
* parentName : string * parentName : string
*/ */
private String friendMobile; private String parentId;
private String friendName;
private String parentMobile;
private String parentName; private String parentName;
private String parentMobile;
private String parentType;
private String friendId;
private String friendName;
private String friendMobile;
private String friendType;
private String friendId1;
private String friendName1;
private String friendMobile1;
private String friendType1;
public String getFriendMobile() { public String getParentId() {
return friendMobile; return parentId;
} }
public void setFriendMobile(String friendMobile) { public void setParentId(String parentId) {
this.friendMobile = friendMobile; this.parentId = parentId;
} }
public String getFriendName() { public String getParentName() {
return friendName; return parentName;
} }
public void setFriendName(String friendName) { public void setParentName(String parentName) {
this.friendName = friendName; this.parentName = parentName;
} }
public String getParentMobile() { public String getParentMobile() {
...@@ -44,11 +52,75 @@ public class ContactInfoBean implements Serializable { ...@@ -44,11 +52,75 @@ public class ContactInfoBean implements Serializable {
this.parentMobile = parentMobile; this.parentMobile = parentMobile;
} }
public String getParentName() { public String getParentType() {
return parentName; return parentType;
} }
public void setParentName(String parentName) { public void setParentType(String parentType) {
this.parentName = parentName; this.parentType = parentType;
}
public String getFriendId() {
return friendId;
}
public void setFriendId(String friendId) {
this.friendId = friendId;
}
public String getFriendName() {
return friendName;
}
public void setFriendName(String friendName) {
this.friendName = friendName;
}
public String getFriendMobile() {
return friendMobile;
}
public void setFriendMobile(String friendMobile) {
this.friendMobile = friendMobile;
}
public String getFriendType() {
return friendType;
}
public void setFriendType(String friendType) {
this.friendType = friendType;
}
public String getFriendId1() {
return friendId1;
}
public void setFriendId1(String friendId1) {
this.friendId1 = friendId1;
}
public String getFriendName1() {
return friendName1;
}
public void setFriendName1(String friendName1) {
this.friendName1 = friendName1;
}
public String getFriendMobile1() {
return friendMobile1;
}
public void setFriendMobile1(String friendMobile1) {
this.friendMobile1 = friendMobile1;
}
public String getFriendType1() {
return friendType1;
}
public void setFriendType1(String friendType1) {
this.friendType1 = friendType1;
} }
} }
...@@ -26,6 +26,7 @@ import tech.starwin.mvp.api.LoanApi; ...@@ -26,6 +26,7 @@ import tech.starwin.mvp.api.LoanApi;
import tech.starwin.mvp.api.UploadApi; import tech.starwin.mvp.api.UploadApi;
import tech.starwin.mvp.api.UserApi; import tech.starwin.mvp.api.UserApi;
import tech.starwin.mvp.beans.BankBean; import tech.starwin.mvp.beans.BankBean;
import tech.starwin.mvp.beans.ContactInfoBean;
import tech.starwin.mvp.beans.DisplayBean; import tech.starwin.mvp.beans.DisplayBean;
import tech.starwin.mvp.beans.EmploymentServerBean; import tech.starwin.mvp.beans.EmploymentServerBean;
import tech.starwin.mvp.beans.GatewayInfoBean; import tech.starwin.mvp.beans.GatewayInfoBean;
...@@ -393,6 +394,36 @@ public class UserPresenter extends BasePresenter<UserApi> { ...@@ -393,6 +394,36 @@ public class UserPresenter extends BasePresenter<UserApi> {
} }
public void submitContactInfo(String action, ContactInfoBean contactInfo) {
handleRequest(apiService.submitContactInfo(contactInfo.getParentId(), contactInfo.getParentName(), contactInfo.getParentMobile(), contactInfo.getParentType(),
contactInfo.getFriendId(), contactInfo.getFriendName(), contactInfo.getFriendMobile(), contactInfo.getFriendType(),
contactInfo.getFriendId1(), contactInfo.getFriendName1(), contactInfo.getFriendMobile1(), contactInfo.getFriendType1(),
LoginManager.get().getToken()),
new HttpObserver<ResponseBody>() {
@Override
public void onStart() {
view.onHttpStart(action, true);
}
@Override
public void onSuccess(ResponseBody data) {
TrackEventHelper.logEvent(TrackEvent.CONTACT_INFO_SUBMIT);
view.onHttpSuccess(action, data);
}
@Override
public void onError(int code, String msg) {
view.onHttpError(action, msg);
}
@Override
public void onFinish() {
view.onHttpFinish(action);
}
});
}
/** /**
* 获取工作信息 * 获取工作信息
*/ */
......
...@@ -186,16 +186,33 @@ public class InfoTranslator { ...@@ -186,16 +186,33 @@ public class InfoTranslator {
return adapter; return adapter;
} }
public static String getRepayMethodValue(Context context, String info) {
return getRepayMethodAdapter(context).getItemValue(info);
/**
* 还款方式
*/
public static StringAdapter getFamilyContactAdapter(Context context) {
StringAdapter adapter = new StringAdapter();
adapter.addItem(newItem(context, "PARENT", R.string.contact_father));
adapter.addItem(newItem(context, "MOTHER", R.string.contact_mother));
adapter.addItem(newItem(context, "SPOUSE", R.string.contact_spouse));
return adapter;
} }
public static String getRepayMethodInfo(Context context, String value) {
return getRepayMethodAdapter(context).getItemInfoStr(value); /**
* 还款方式
*/
public static StringAdapter getFriendContactAdapter(Context context) {
StringAdapter adapter = new StringAdapter();
adapter.addItem(newItem(context, "FRIEND", R.string.contact_father));
adapter.addItem(newItem(context, "CLASSMATE", R.string.contact_mother));
adapter.addItem(newItem(context, "COLLEAGUE", R.string.contact_spouse));
return adapter;
} }
private static StringAdapter.Item newItem(Context context, String value, int info) { private static StringAdapter.Item newItem(Context context, String value, int info) {
return new StringAdapter.Item(value, context.getString(info)); return new StringAdapter.Item(value, context.getString(info));
} }
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<string name="login_statement">Click the agree button \ "Registration and Privacy Service Agreement \"</string> <string name="login_statement">Click the agree button \ "Registration and Privacy Service Agreement \"</string>
<string name="text_loan">Loan</string> <string name="text_loan">Loan</string>
<string name="text_certification">Certification</string> <string name="text_certification">Certification</string>
<string name="text_me">My</string> <string name="text_me">My</string>
...@@ -922,11 +921,11 @@ ...@@ -922,11 +921,11 @@
</string> </string>
<!--<string name="take_work_certification_tips">--> <!--<string name="take_work_certification_tips">-->
<!--Choose one of the following options to upload:\n--> <!--Choose one of the following options to upload:\n-->
<!--Salary Slip\n--> <!--Salary Slip\n-->
<!--Work Permit\n--> <!--Work Permit\n-->
<!--Driver\'s License\n--> <!--Driver\'s License\n-->
<!--Photo of The Workplace--> <!--Photo of The Workplace-->
<!--</string>--> <!--</string>-->
...@@ -1020,4 +1019,22 @@ ...@@ -1020,4 +1019,22 @@
<string name="need_allow_permission">We need you to agree to these permissions in order to continue! Do you want to continue to authorize?</string> <string name="need_allow_permission">We need you to agree to these permissions in order to continue! Do you want to continue to authorize?</string>
<string name="disable_permission">You have disabled some of the necessary permissions, please continue after granting permissions in "Settings - Applications"</string> <string name="disable_permission">You have disabled some of the necessary permissions, please continue after granting permissions in "Settings - Applications"</string>
<string name="contact_father">Father</string>
<string name="contact_mother">Mother</string>
<string name="contact_spouse">Spouse</string>
<string name="contact_friend">Friends</string>
<string name="contact_classmates">Classmates</string>
<string name="contact_colleagues">Colleagues</string>
<string name="family_members_title">Family members</string>
<string name="full_name_select_hint">Full name Select</string>
<string name="contact_number_title">Contact number</string>
<string name="mobile_phone_number_hint">Mobile phone number</string>
<string name="relationship_with_borrower_title_hint">Relationship with the borrower</string>
<string name="emergency_contact_title">Emergency contact</string>
</resources> </resources>
\ No newline at end of file
...@@ -1002,4 +1002,23 @@ ...@@ -1002,4 +1002,23 @@
<string name="need_allow_permission">我们需要您同意这些权限才能继续! 要继续授权吗?</string> <string name="need_allow_permission">我们需要您同意这些权限才能继续! 要继续授权吗?</string>
<string name="disable_permission">您已禁用了某些必要的权限,请在“设置 - 应用程序”中授予权限后继续</string> <string name="disable_permission">您已禁用了某些必要的权限,请在“设置 - 应用程序”中授予权限后继续</string>
<string name="contact_father">父亲</string>
<string name="contact_mother">母亲</string>
<string name="contact_spouse">配偶</string>
<string name="contact_friend">朋友</string>
<string name="contact_classmates">同学</string>
<string name="contact_colleagues">同事</string>
<string name="family_members_title">亲属</string>
<string name="full_name_select_hint">请选择姓名</string>
<string name="contact_number_title">手机号码</string>
<string name="mobile_phone_number_hint">请选择手机号码</string>
<string name="relationship_with_borrower_title_hint">与贷款人的关系</string>
<string name="emergency_contact_title">紧急联系人</string>
</resources> </resources>
\ No newline at end of file
...@@ -1029,4 +1029,21 @@ ...@@ -1029,4 +1029,21 @@
<string name="need_allow_permission">Untuk tahap selanjutnya, kami membutuhkan persetujuan Anda dalam pemberian izin. Apakah Anda ingin melanjutkan pemberian izin?</string> <string name="need_allow_permission">Untuk tahap selanjutnya, kami membutuhkan persetujuan Anda dalam pemberian izin. Apakah Anda ingin melanjutkan pemberian izin?</string>
<string name="disable_permission">Anda telah menon-aktifkan beberapa izin yang diperlukan, silakan lanjutkan setelah memberikan izin di "Pengaturan - Aplikasi"</string> <string name="disable_permission">Anda telah menon-aktifkan beberapa izin yang diperlukan, silakan lanjutkan setelah memberikan izin di "Pengaturan - Aplikasi"</string>
<string name="contact_father">Anggota keluarga</string>
<string name="contact_mother">Anggota keluarga</string>
<string name="contact_spouse">Anggota keluarga</string>
<string name="contact_friend">Anggota keluarga</string>
<string name="contact_classmates">Anggota keluarga</string>
<string name="contact_colleagues">Anggota keluarga</string>
<string name="family_members_title">Anggota keluarga</string>
<string name="full_name_select_hint">Nama lengkap Pilih</string>
<string name="contact_number_title">Nomor kontak</string>
<string name="mobile_phone_number_hint">Nomor HP</string>
<string name="relationship_with_borrower_title_hint">Hubungan dengan peminjam</string>
<string name="emergency_contact_title">Kontak darurat</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment