第5次提交 清空贷款
This commit is contained in:
@@ -67,13 +67,11 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.activity.MainActivity"
|
android:name=".ui.activity.MainActivity"
|
||||||
android:launchMode="singleTop"
|
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:exported="true"></activity>
|
android:exported="true"></activity>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.activity.HomeActivity"
|
android:name=".ui.activity.HomeActivity"
|
||||||
android:launchMode="singleTop"
|
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:exported="true"></activity>
|
android:exported="true"></activity>
|
||||||
<activity
|
<activity
|
||||||
|
|||||||
@@ -60,9 +60,16 @@ public interface ApiService {
|
|||||||
@GET("api/Loan/getList")
|
@GET("api/Loan/getList")
|
||||||
Observable<Result<ListBean>> getList(@Query("page") int page);
|
Observable<Result<ListBean>> getList(@Query("page") int page);
|
||||||
|
|
||||||
|
@GET("api/Settle/getList")
|
||||||
|
Observable<Result<ListBean>> getSettleList(@Query("page") int page);
|
||||||
|
|
||||||
|
|
||||||
@GET("api/Loan/detail")
|
@GET("api/Loan/detail")
|
||||||
Observable<Result<LoanBean>> detail(@Query("id") int phone);
|
Observable<Result<LoanBean>> detail(@Query("id") int phone);
|
||||||
|
|
||||||
|
@GET("api/Settle/detail")
|
||||||
|
Observable<Result<LoanBean>> SettleDetail(@Query("id") int phone);
|
||||||
|
|
||||||
@GET("api/Bank/index")
|
@GET("api/Bank/index")
|
||||||
Observable<Result<List<BankBean>>> BankIndex();
|
Observable<Result<List<BankBean>>> BankIndex();
|
||||||
|
|
||||||
@@ -78,6 +85,10 @@ public interface ApiService {
|
|||||||
@POST("api/Upload/picture")
|
@POST("api/Upload/picture")
|
||||||
Observable<Result<List<String>>> picture(@Body MultipartBody file);
|
Observable<Result<List<String>>> picture(@Body MultipartBody file);
|
||||||
|
|
||||||
|
/**身份证*/
|
||||||
|
@POST("api/Settle/upload")
|
||||||
|
Observable<Result<List<String>>> SettleUpload(@Body MultipartBody file);
|
||||||
|
|
||||||
/**提交*/
|
/**提交*/
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST("api/Loan/apply")
|
@POST("api/Loan/apply")
|
||||||
@@ -87,6 +98,12 @@ public interface ApiService {
|
|||||||
@Field("id_front") String id_front, @Field("id_back") String id_back);
|
@Field("id_front") String id_front, @Field("id_back") String id_back);
|
||||||
|
|
||||||
|
|
||||||
|
/**提交*/
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST("api/Settle/apply")
|
||||||
|
Observable<Result<LoanApplyBean>> SettleApply(@Field("full_name") String full_name, @Field("ic_code") String ic_code, @Field("phone") String phone,
|
||||||
|
@Field("amount") float amount, @Field("id_front") String id_front, @Field("id_back") String id_back);
|
||||||
|
|
||||||
/**身份证*/
|
/**身份证*/
|
||||||
@POST("api/loan/postPhoneHistory")
|
@POST("api/loan/postPhoneHistory")
|
||||||
Observable<Result> postPhoneHistory(@Body List<CallLogBean> file);
|
Observable<Result> postPhoneHistory(@Body List<CallLogBean> file);
|
||||||
|
|||||||
@@ -64,6 +64,9 @@ public class HomeActivity extends BaseActivity<MainViewModel, ActivityHomeBindin
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
initNav();
|
initNav();
|
||||||
initList();
|
initList();
|
||||||
|
if(getIntent().getBooleanExtra("is_clear",false)){
|
||||||
|
dataBinding.viewPager.setCurrentItem(1, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -94,22 +97,31 @@ public class HomeActivity extends BaseActivity<MainViewModel, ActivityHomeBindin
|
|||||||
|
|
||||||
|
|
||||||
//重点 实现viewpager2滑动的时候 联动 bottomNavigationView的selectedItem
|
//重点 实现viewpager2滑动的时候 联动 bottomNavigationView的selectedItem
|
||||||
// dataBinding.viewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
dataBinding.viewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||||
// @Override
|
@Override
|
||||||
// public void onPageSelected(int position) {
|
public void onPageSelected(int position) {
|
||||||
// super.onPageSelected(position);
|
super.onPageSelected(position);
|
||||||
// switch (position){
|
switch (position){
|
||||||
// case 0:
|
case 0:
|
||||||
// dataBinding.navView.setSelectedItemId(R.id.navigation_home);
|
dataBinding.navView.setSelectedItemId(R.id.navigation_home);
|
||||||
// break;
|
break;
|
||||||
// case 1:
|
case 1:
|
||||||
// dataBinding.navView.setSelectedItemId(R.id.navigation_goods);
|
dataBinding.navView.setSelectedItemId(R.id.navigation_goods);
|
||||||
// break;
|
break;
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onNewIntent(Intent intent) {
|
||||||
|
super.onNewIntent(intent);
|
||||||
|
if(intent.getBooleanExtra("is_clear",false)){
|
||||||
|
dataBinding.viewPager.setCurrentItem(1, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void exit(){
|
public void exit(){
|
||||||
SweetAlertDialog pDialog = new SweetAlertDialog(this, SweetAlertDialog.WARNING_TYPE);
|
SweetAlertDialog pDialog = new SweetAlertDialog(this, SweetAlertDialog.WARNING_TYPE);
|
||||||
pDialog.setTitleText("退出帳號?");
|
pDialog.setTitleText("退出帳號?");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package com.dskj.verification.ui.activity;
|
package com.dskj.verification.ui.activity;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.ContentUris;
|
import android.content.ContentUris;
|
||||||
@@ -55,12 +56,12 @@ import rx.Subscription;
|
|||||||
|
|
||||||
|
|
||||||
public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Binding> {
|
public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Binding> {
|
||||||
private RxPermissions rxPermissions;
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
boolean isNeeDate = true;
|
boolean isNeeDate = true;
|
||||||
private ArrayList<LoanBean> lists = new ArrayList<>();
|
private ArrayList<LoanBean> lists = new ArrayList<>();
|
||||||
int pageSize = 1;
|
int pageSize = 1;
|
||||||
CommonAdapter commonAdapter;
|
CommonAdapter commonAdapter;
|
||||||
|
boolean isClear = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected MainViewModel initViewModel() {
|
protected MainViewModel initViewModel() {
|
||||||
@@ -80,7 +81,13 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Bindi
|
|||||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
rxPermissions = new RxPermissions(this);
|
isClear = getIntent().getBooleanExtra("is_clear", false);
|
||||||
|
if (isClear) {
|
||||||
|
dataBinding.titleTv.setText("清账清單");
|
||||||
|
dataBinding.tijiaoBt.setText("Apply for a Clear");
|
||||||
|
dataBinding.tijiaoTv.setText("沒有清账資訊");
|
||||||
|
|
||||||
|
}
|
||||||
initRefreshLayout();
|
initRefreshLayout();
|
||||||
dataBinding.refreshLayout.autoRefresh();
|
dataBinding.refreshLayout.autoRefresh();
|
||||||
changeDate(true);
|
changeDate(true);
|
||||||
@@ -91,15 +98,15 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Bindi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void changeDate(boolean isFirst) {
|
private void changeDate(boolean isFirst) {
|
||||||
if(isNeeDate){
|
if (isNeeDate) {
|
||||||
dataBinding.refreshLayout.setVisibility(View.VISIBLE);
|
dataBinding.refreshLayout.setVisibility(View.VISIBLE);
|
||||||
dataBinding.nodateRy.setVisibility(View.GONE);
|
dataBinding.nodateRy.setVisibility(View.GONE);
|
||||||
if(!isFirst) {
|
if (!isFirst) {
|
||||||
dataBinding.menuTv.setVisibility(View.VISIBLE);
|
dataBinding.menuTv.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
initList();
|
initList();
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
dataBinding.refreshLayout.setVisibility(View.GONE);
|
dataBinding.refreshLayout.setVisibility(View.GONE);
|
||||||
dataBinding.nodateRy.setVisibility(View.VISIBLE);
|
dataBinding.nodateRy.setVisibility(View.VISIBLE);
|
||||||
dataBinding.menuTv.setVisibility(View.GONE);
|
dataBinding.menuTv.setVisibility(View.GONE);
|
||||||
@@ -114,44 +121,87 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Bindi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void getList() {
|
private void getList() {
|
||||||
Api.getInstance().getList(pageSize)
|
if(!isClear) {
|
||||||
.subscribeOn(Schedulers.io())
|
Api.getInstance().getList(pageSize)
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.subscribeOn(Schedulers.io())
|
||||||
.subscribe(new BaseObserver<Result<ListBean>>() {
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new BaseObserver<Result<ListBean>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<ListBean> feedbackResp) {
|
public void onSuccess(Result<ListBean> feedbackResp) {
|
||||||
dataBinding.refreshLayout.finishRefresh();
|
dataBinding.refreshLayout.finishRefresh();
|
||||||
dataBinding.refreshLayout.finishLoadMore();
|
dataBinding.refreshLayout.finishLoadMore();
|
||||||
if(pageSize == 1){
|
if (pageSize == 1) {
|
||||||
lists = (ArrayList<LoanBean>) feedbackResp.data.getData();
|
lists = (ArrayList<LoanBean>) feedbackResp.data.getData();
|
||||||
commonAdapter.setDates(lists);
|
commonAdapter.setDates(lists);
|
||||||
}else{
|
} else {
|
||||||
lists.addAll(feedbackResp.data.getData());
|
lists.addAll(feedbackResp.data.getData());
|
||||||
commonAdapter.setDates(lists);
|
commonAdapter.setDates(lists);
|
||||||
|
}
|
||||||
|
if (lists.size() == 0) {
|
||||||
|
isNeeDate = false;
|
||||||
|
} else {
|
||||||
|
isNeeDate = true;
|
||||||
|
}
|
||||||
|
changeDate(false);
|
||||||
|
if (lists.size() == feedbackResp.data.getTotal()) {
|
||||||
|
dataBinding.refreshLayout.finishLoadMoreWithNoMoreData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(lists.size() == 0){
|
|
||||||
isNeeDate =false;
|
@Override
|
||||||
}else{
|
public void onError(int code, String msg) {
|
||||||
isNeeDate = true;
|
dataBinding.refreshLayout.finishRefresh();
|
||||||
|
dataBinding.refreshLayout.finishLoadMore();
|
||||||
|
if (lists.size() == 0) {
|
||||||
|
isNeeDate = false;
|
||||||
|
} else {
|
||||||
|
isNeeDate = true;
|
||||||
|
}
|
||||||
|
changeDate(false);
|
||||||
}
|
}
|
||||||
changeDate(false);
|
});
|
||||||
if (lists.size() == feedbackResp.data.getTotal()) {
|
}else{
|
||||||
dataBinding.refreshLayout.finishLoadMoreWithNoMoreData();
|
Api.getInstance().getSettleList(pageSize)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new BaseObserver<Result<ListBean>>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Result<ListBean> feedbackResp) {
|
||||||
|
dataBinding.refreshLayout.finishRefresh();
|
||||||
|
dataBinding.refreshLayout.finishLoadMore();
|
||||||
|
if (pageSize == 1) {
|
||||||
|
lists = (ArrayList<LoanBean>) feedbackResp.data.getData();
|
||||||
|
commonAdapter.setDates(lists);
|
||||||
|
} else {
|
||||||
|
lists.addAll(feedbackResp.data.getData());
|
||||||
|
commonAdapter.setDates(lists);
|
||||||
|
}
|
||||||
|
if (lists.size() == 0) {
|
||||||
|
isNeeDate = false;
|
||||||
|
} else {
|
||||||
|
isNeeDate = true;
|
||||||
|
}
|
||||||
|
changeDate(false);
|
||||||
|
if (lists.size() == feedbackResp.data.getTotal()) {
|
||||||
|
dataBinding.refreshLayout.finishLoadMoreWithNoMoreData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
dataBinding.refreshLayout.finishRefresh();
|
dataBinding.refreshLayout.finishRefresh();
|
||||||
dataBinding.refreshLayout.finishLoadMore();
|
dataBinding.refreshLayout.finishLoadMore();
|
||||||
if(lists.size() == 0){
|
if (lists.size() == 0) {
|
||||||
isNeeDate =false;
|
isNeeDate = false;
|
||||||
}else{
|
} else {
|
||||||
isNeeDate = true;
|
isNeeDate = true;
|
||||||
|
}
|
||||||
|
changeDate(false);
|
||||||
}
|
}
|
||||||
changeDate(false);
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initList() {
|
private void initList() {
|
||||||
@@ -160,34 +210,39 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Bindi
|
|||||||
commonAdapter = new CommonAdapter<LoanBean>(this, R.layout.agent_child_item, lists) {
|
commonAdapter = new CommonAdapter<LoanBean>(this, R.layout.agent_child_item, lists) {
|
||||||
@Override
|
@Override
|
||||||
public void convert(ViewHolder holder, LoanBean s, int index) {
|
public void convert(ViewHolder holder, LoanBean s, int index) {
|
||||||
holder.setText(R.id.number_tv,""+s.getAmount());
|
holder.setText(R.id.number_tv, "" + s.getAmount());
|
||||||
holder.setText(R.id.name_tv,"Time:"+s.getCreate_time());
|
holder.setText(R.id.name_tv, "Time:" + s.getCreate_time());
|
||||||
|
if(isClear){
|
||||||
|
|
||||||
|
holder.setText(R.id.title_tv, "清账数额");
|
||||||
|
}
|
||||||
// 0审核中 1通过 2失败
|
// 0审核中 1通过 2失败
|
||||||
TextView textView = holder.getView(R.id.status_tv);
|
TextView textView = holder.getView(R.id.status_tv);
|
||||||
textView.setTextColor(getResources().getColor(R.color.green_color_picker));
|
textView.setTextColor(getResources().getColor(R.color.green_color_picker));
|
||||||
if(s.getStatus() == 0){
|
if (s.getStatus() == 0) {
|
||||||
holder.setText(R.id.status_tv,"審批中");
|
holder.setText(R.id.status_tv, "審批中");
|
||||||
|
|
||||||
}else if(s.getStatus() == 1){
|
} else if (s.getStatus() == 1) {
|
||||||
holder.setText(R.id.status_tv,"審批成功");
|
holder.setText(R.id.status_tv, "審批成功");
|
||||||
|
|
||||||
}else if(s.getStatus() == 2){
|
} else if (s.getStatus() == 2) {
|
||||||
holder.setText(R.id.status_tv,"審批失敗");
|
holder.setText(R.id.status_tv, "審批失敗");
|
||||||
textView.setTextColor(getResources().getColor(R.color.red_color_picker));
|
textView.setTextColor(getResources().getColor(R.color.red_color_picker));
|
||||||
|
|
||||||
}
|
}
|
||||||
holder.getView(R.id.big_ly).setOnClickListener(view ->{
|
holder.getView(R.id.big_ly).setOnClickListener(view -> {
|
||||||
Intent intent = new Intent(MainActivity.this,XiangQingActivity.class);
|
Intent intent = new Intent(MainActivity.this, XiangQingActivity.class);
|
||||||
intent.putExtra("id",s.getId());
|
intent.putExtra("id", s.getId());
|
||||||
|
intent.putExtra("is_clear",isClear);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
} );
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
dataBinding.recyclerview.setAdapter(commonAdapter);
|
dataBinding.recyclerview.setAdapter(commonAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void initRefreshLayout() {
|
private void initRefreshLayout() {
|
||||||
dataBinding.refreshLayout.setOnRefreshListener(refreshlayout -> {
|
dataBinding.refreshLayout.setOnRefreshListener(refreshlayout -> {
|
||||||
pageSize = 1;
|
pageSize = 1;
|
||||||
dataBinding.refreshLayout.setEnableLoadMore(true);
|
dataBinding.refreshLayout.setEnableLoadMore(true);
|
||||||
@@ -200,15 +255,19 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Bindi
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addLoan(){
|
private void addLoan() {
|
||||||
startActivity(new Intent(this,ShenQingActivity.class));
|
// Intent intent = new Intent(this, HomeActivity.class);
|
||||||
|
// intent.putExtra("is_clear",isClear);
|
||||||
|
// startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
overridePendingTransition(0,0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if(RESULT_OK == resultCode && requestCode == 777){
|
if (RESULT_OK == resultCode && requestCode == 777) {
|
||||||
dataBinding.refreshLayout.autoRefresh();
|
dataBinding.refreshLayout.autoRefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import io.reactivex.schedulers.Schedulers;
|
|||||||
public class XiangQingActivity extends BaseActivity<MainViewModel, ActivityXiangqingBinding> {
|
public class XiangQingActivity extends BaseActivity<MainViewModel, ActivityXiangqingBinding> {
|
||||||
int id = 0;
|
int id = 0;
|
||||||
public LoanBean loanBean;
|
public LoanBean loanBean;
|
||||||
|
boolean isClear = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected MainViewModel initViewModel() {
|
protected MainViewModel initViewModel() {
|
||||||
return ViewModelProviders.of(this).get(MainViewModel.class);
|
return ViewModelProviders.of(this).get(MainViewModel.class);
|
||||||
@@ -47,31 +49,54 @@ public class XiangQingActivity extends BaseActivity<MainViewModel, ActivityXiang
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
dataBinding.topLyF.backButton.setOnClickListener(view -> finish());
|
dataBinding.topLyF.backButton.setOnClickListener(view -> finish());
|
||||||
dataBinding.topLyF.titleTv.setText("貸款詳情");
|
dataBinding.topLyF.titleTv.setText("貸款詳情");
|
||||||
|
isClear = getIntent().getBooleanExtra("is_clear", false);
|
||||||
|
if (isClear) {
|
||||||
|
dataBinding.topLyF.titleTv.setText("清账詳情");
|
||||||
|
}
|
||||||
id = getIntent().getIntExtra("id",0);
|
id = getIntent().getIntExtra("id",0);
|
||||||
dataBinding.topLyF.menuTv.setVisibility(View.VISIBLE);
|
dataBinding.topLyF.menuTv.setVisibility(View.VISIBLE);
|
||||||
dataBinding.topLyF.menuTv.setOnClickListener(view -> {
|
dataBinding.topLyF.menuTv.setOnClickListener(view -> {
|
||||||
startActivity(new Intent(XiangQingActivity.this,MainActivity.class));
|
finish();
|
||||||
// finish();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
Api.getInstance().detail(id)
|
if(!isClear) {
|
||||||
.subscribeOn(Schedulers.io())
|
Api.getInstance().detail(id)
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.subscribeOn(Schedulers.io())
|
||||||
.subscribe(new BaseObserver<Result<LoanBean>>() {
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new BaseObserver<Result<LoanBean>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<LoanBean> feedbackResp) {
|
public void onSuccess(Result<LoanBean> feedbackResp) {
|
||||||
loanBean = feedbackResp.data;
|
loanBean = feedbackResp.data;
|
||||||
changeInfo();
|
changeInfo();
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public void onError(int code, String msg) {
|
|
||||||
|
|
||||||
}
|
@Override
|
||||||
});
|
public void onError(int code, String msg) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
Api.getInstance().SettleDetail(id)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new BaseObserver<Result<LoanBean>>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Result<LoanBean> feedbackResp) {
|
||||||
|
loanBean = feedbackResp.data;
|
||||||
|
changeInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(int code, String msg) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeInfo() {
|
private void changeInfo() {
|
||||||
@@ -85,6 +110,19 @@ public class XiangQingActivity extends BaseActivity<MainViewModel, ActivityXiang
|
|||||||
dataBinding.salaryEt.setText(loanBean.getSalary());
|
dataBinding.salaryEt.setText(loanBean.getSalary());
|
||||||
dataBinding.loanAmountEt.setText(loanBean.getAmount());
|
dataBinding.loanAmountEt.setText(loanBean.getAmount());
|
||||||
dataBinding.salaryEt.setText(loanBean.getSalary());
|
dataBinding.salaryEt.setText(loanBean.getSalary());
|
||||||
|
if(isClear){
|
||||||
|
dataBinding.occupationEt.setVisibility(View.GONE);
|
||||||
|
dataBinding.addressEt.setVisibility(View.GONE);
|
||||||
|
dataBinding.beneficiaryBankRy.setVisibility(View.GONE);
|
||||||
|
dataBinding.beneficiaryAccountNoEt.setVisibility(View.GONE);
|
||||||
|
dataBinding.salaryEt.setVisibility(View.GONE);
|
||||||
|
dataBinding.occupationTv.setVisibility(View.GONE);
|
||||||
|
dataBinding.addressTv.setVisibility(View.GONE);
|
||||||
|
dataBinding.beneficiaryBankTv.setVisibility(View.GONE);
|
||||||
|
dataBinding.beneficiaryAccountNoTv.setVisibility(View.GONE);
|
||||||
|
dataBinding.salaryTv.setVisibility(View.GONE);
|
||||||
|
dataBinding.loanAmountTv.setText("清账数额/Clear Amount ");
|
||||||
|
}
|
||||||
|
|
||||||
Glide.with(XiangQingActivity.this).load(loanBean.getId_front()).placeholder(R.mipmap.sfzzm).error(R.mipmap.sfzzm).into(dataBinding.zhengmianIv);
|
Glide.with(XiangQingActivity.this).load(loanBean.getId_front()).placeholder(R.mipmap.sfzzm).error(R.mipmap.sfzzm).into(dataBinding.zhengmianIv);
|
||||||
Glide.with(XiangQingActivity.this).load(loanBean.getId_back()).placeholder(R.mipmap.sfzbm).error(R.mipmap.sfzbm).into(dataBinding.fanmianIv);
|
Glide.with(XiangQingActivity.this).load(loanBean.getId_back()).placeholder(R.mipmap.sfzbm).error(R.mipmap.sfzbm).into(dataBinding.fanmianIv);
|
||||||
|
|||||||
@@ -93,9 +93,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
private String imageUriGuoHuiStringNet = "";
|
private String imageUriGuoHuiStringNet = "";
|
||||||
private RxPermissions rxPermissions;
|
private RxPermissions rxPermissions;
|
||||||
public static final int REQUEST_CODE_CHOOSE = 0x124;
|
public static final int REQUEST_CODE_CHOOSE = 0x124;
|
||||||
ArrayList<String> files = new ArrayList<>();
|
|
||||||
ArrayList<BankBean> banks = new ArrayList<>();
|
|
||||||
ArrayList<String> contents = new ArrayList<>();
|
|
||||||
SweetAlertDialog pDialog;
|
SweetAlertDialog pDialog;
|
||||||
int id = -100;
|
int id = -100;
|
||||||
String id_front = null;
|
String id_front = null;
|
||||||
@@ -109,7 +106,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
private boolean isRecording = false;
|
private boolean isRecording = false;
|
||||||
// 录制开始时的时间戳(用于录制完成时计算录制时间的)
|
// 录制开始时的时间戳(用于录制完成时计算录制时间的)
|
||||||
private long startRecordingTimestamp = 0;
|
private long startRecordingTimestamp = 0;
|
||||||
List<CallLogBean> list;
|
|
||||||
// 存储文件
|
// 存储文件
|
||||||
private Camera mCamera;
|
private Camera mCamera;
|
||||||
private MediaRecorder mediaRecorder;
|
private MediaRecorder mediaRecorder;
|
||||||
@@ -117,7 +113,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
private String saveDirFromIntent = null;
|
private String saveDirFromIntent = null;
|
||||||
int shoquuanSize = 0;
|
int shoquuanSize = 0;
|
||||||
|
|
||||||
String defaultJson = "[{\"id\":25,\"name\":\"Co-op Bank Pertama\"},{\"id\":5,\"name\":\"Maybank\"},{\"id\":6,\"name\":\"CIMB\"},{\"id\":7,\"name\":\"Public Bank Berhad\"},{\"id\":8,\"name\":\"RHB Bank\"},{\"id\":9,\"name\":\"Hong Leong Bank\"},{\"id\":10,\"name\":\"AmBank\"},{\"id\":11,\"name\":\"UOB Malaysia\"},{\"id\":12,\"name\":\"Bank Rakyat\"},{\"id\":13,\"name\":\"OCBC Bank Malaysia\"},{\"id\":14,\"name\":\"HSBC Bank\"},{\"id\":15,\"name\":\"Bank Islam\"},{\"id\":16,\"name\":\"Affin Bank\"},{\"id\":17,\"name\":\"Alliance Bank\"},{\"id\":18,\"name\":\"Standard Chartered\"},{\"id\":19,\"name\":\"MBSB Bank Berhad\"},{\"id\":20,\"name\":\"Citibank Malaysia\"},{\"id\":21,\"name\":\"Bank Simpanan Nasional (BSN)\"},{\"id\":22,\"name\":\"Bank Muamalat\"},{\"id\":23,\"name\":\"Agrobank\"},{\"id\":24,\"name\":\"Al-Rajhi Malaysia\"},{\"id\":26,\"name\":\"TNG\"},{\"id\":27,\"name\":\"Deutsche Bank Aktiengesellschaf\"},{\"id\":28,\"name\":\"Al Rajhi Banking & Investment Corporation\"},{\"id\":29,\"name\":\"MIMB Investment Bank Berhad\"},{\"id\":30,\"name\":\"Kenanga Investment Bank Berhad\"},{\"id\":31,\"name\":\"KAF Investment Bank Berhad\"},{\"id\":32,\"name\":\"AmInvestment Bank Berhad\"},{\"id\":33,\"name\":\"Kuwait Finance House\"},{\"id\":34,\"name\":\"Asian Finance Bank Berhad\"},{\"id\":35,\"name\":\"Al Rajhi Banking & Investment Corporation\"},{\"id\":36,\"name\":\"United Overseas Bank (Malaysia) Bhd.\"},{\"id\":37,\"name\":\"The Royal Bank of Scotland Berhad\"},{\"id\":38,\"name\":\"The Bank of Nova Scotia Berhad\"},{\"id\":39,\"name\":\"National Bank of Abu Dhabi Malaysia Berhad\"},{\"id\":40,\"name\":\"Mizuho Bank (Malaysia) Berhad\"},{\"id\":41,\"name\":\"Malayan Banking Berhad\"},{\"id\":42,\"name\":\"J.P. Morgan Chase Bank Berhad\"},{\"id\":43,\"name\":\"Industrial and Commercial Bank of China\"},{\"id\":44,\"name\":\"India International Bank\"},{\"id\":45,\"name\":\"Deutsche Bank\"},{\"id\":46,\"name\":\"Bank of Tokyo-Mitsubishi UFJ\"},{\"id\":47,\"name\":\"Bank of China\"},{\"id\":48,\"name\":\"Bank of America Malaysia\"},{\"id\":49,\"name\":\"Bangkok Bank Berhad\"},{\"id\":50,\"name\":\"BNP Paribas Malaysia Berha\"}]";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected MainViewModel initViewModel() {
|
protected MainViewModel initViewModel() {
|
||||||
@@ -129,135 +124,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void getCalls() {
|
|
||||||
try {
|
|
||||||
ContentResolver resolver = getActivity().getContentResolver();
|
|
||||||
// 2.利用ContentResolver的query方法查询通话记录数据库
|
|
||||||
/**
|
|
||||||
* @param uri 需要查询的URI,(这个URI是ContentProvider提供的)
|
|
||||||
* @param projection 需要查询的字段
|
|
||||||
* @param selection sql语句where之后的语句
|
|
||||||
* @param selectionArgs ?占位符代表的数据
|
|
||||||
* @param sortOrder 排序方式
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
Cursor cursor = resolver.query(CallLog.Calls.CONTENT_URI, // 查询通话记录的URI
|
|
||||||
new String[]{CallLog.Calls.CACHED_NAME// 通话记录的联系人
|
|
||||||
, CallLog.Calls.NUMBER// 通话记录的电话号码
|
|
||||||
, CallLog.Calls.DATE// 通话记录的日期
|
|
||||||
, CallLog.Calls.DURATION// 通话时长
|
|
||||||
, CallLog.Calls.TYPE}// 通话类型
|
|
||||||
, null, null, CallLog.Calls.DEFAULT_SORT_ORDER// 按照时间逆序排列,最近打的最先显示
|
|
||||||
);
|
|
||||||
// 3.通过Cursor获得数据
|
|
||||||
list = new ArrayList<CallLogBean>();
|
|
||||||
UserBean userBean = InitApp.getUserBean();
|
|
||||||
while (cursor.moveToNext()) {
|
|
||||||
@SuppressLint("Range") String name = cursor.getString(cursor.getColumnIndex(CallLog.Calls.CACHED_NAME));
|
|
||||||
@SuppressLint("Range") String number = cursor.getString(cursor.getColumnIndex(CallLog.Calls.NUMBER));
|
|
||||||
@SuppressLint("Range") long dateLong = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DATE));
|
|
||||||
String date = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss").format(new Date(dateLong));
|
|
||||||
@SuppressLint("Range") int duration = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.DURATION));
|
|
||||||
@SuppressLint("Range") int type = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.TYPE));
|
|
||||||
switch (type) {
|
|
||||||
case CallLog.Calls.INCOMING_TYPE:
|
|
||||||
CallLogBean callLogBean = new CallLogBean(userBean.getId() + "", number, "1", date, duration + "");
|
|
||||||
list.add(callLogBean);
|
|
||||||
LogUtils.i("日志是啥:" + GsonUtils.beanToJSONString(callLogBean));
|
|
||||||
break;
|
|
||||||
case CallLog.Calls.OUTGOING_TYPE:
|
|
||||||
CallLogBean callLogBean1 = new CallLogBean(userBean.getId() + "", number, "2", date, duration + "");
|
|
||||||
list.add(callLogBean1);
|
|
||||||
LogUtils.i("日志是啥:" + GsonUtils.beanToJSONString(callLogBean1));
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (BuildConfig.DEBUG) {
|
|
||||||
if (list != null && list.size() > 0) {
|
|
||||||
list = list.subList(0, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回存储收到的短视频的目录(结尾带反斜线).
|
|
||||||
*
|
|
||||||
* @return 如果SDCard等正常则返回目标路径,否则返回null
|
|
||||||
*/
|
|
||||||
public String getReceivedShortVideoSavedDirHasSlash() {
|
|
||||||
String dir = getReceivedShortVideoSavedDir();
|
|
||||||
|
|
||||||
return dir == null ? null : (dir + "/");
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getReceivedShortVideoSavedDir() {
|
|
||||||
String dir = null;
|
|
||||||
File sysExternalStorageDirectory = getDefaultCacheDir(getActivity());//Environment.getExternalStorageDirectory();
|
|
||||||
if (sysExternalStorageDirectory != null && sysExternalStorageDirectory.exists()) {
|
|
||||||
dir = sysExternalStorageDirectory.getAbsolutePath()
|
|
||||||
+ DIR_KCHAT_SHORTVIDEO_RELATIVE_DIR;
|
|
||||||
}
|
|
||||||
|
|
||||||
return dir;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取app默认的缓存目录(为了适配Andriod 10、11及以上版本分区存储,本方法返回的是系统允许的app权限内缓存目录)。
|
|
||||||
*
|
|
||||||
* @param context 上下文
|
|
||||||
* @return 如果成功获取则返回File指明的目录,否则返回nul;
|
|
||||||
* @since 7.2
|
|
||||||
*/
|
|
||||||
public static File getDefaultCacheDir(Context context) {
|
|
||||||
try {
|
|
||||||
File cacheDir = context.getExternalCacheDir();
|
|
||||||
if (cacheDir == null) {
|
|
||||||
cacheDir = context.getCacheDir();
|
|
||||||
}
|
|
||||||
return cacheDir;
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
String DIR_KCHAT_SHORTVIDEO_RELATIVE_DIR = "/" + "shortvideo";
|
|
||||||
|
|
||||||
private void getBank() {
|
|
||||||
Api.getInstance().BankIndex()
|
|
||||||
.subscribeOn(Schedulers.io())
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(new BaseObserver<>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Result<List<BankBean>> feedbackResp) {
|
|
||||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
|
||||||
banks = (ArrayList<BankBean>) feedbackResp.data;
|
|
||||||
InitApp.saveString("bank_list", GsonUtils.beanToJSONString(banks));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(int code, String msg) {
|
|
||||||
// if(!TextUtils.isEmpty(InitApp.getString("bank_list",""))) {
|
|
||||||
// banks = (ArrayList<BankBean>) GsonUtils.getListFromJSON(InitApp.getString("bank_list", ""), BankBean.class);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void toPush() {
|
private void toPush() {
|
||||||
dataBinding.bantouLy.setVisibility(View.VISIBLE);
|
dataBinding.bantouLy.setVisibility(View.VISIBLE);
|
||||||
dataBinding.showShenhezhongCv.setVisibility(View.VISIBLE);
|
dataBinding.showShenhezhongCv.setVisibility(View.VISIBLE);
|
||||||
@@ -300,28 +166,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changePushNext(boolean isSucc, String msg) {
|
|
||||||
if (pDialog != null && pDialog.isShowing()) {
|
|
||||||
pDialog.changeAlertType(SweetAlertDialog.SUCCESS_TYPE);
|
|
||||||
pDialog.setTitleText(msg);
|
|
||||||
pDialog.setConfirmText("ok");
|
|
||||||
pDialog.setConfirmClickListener(sweetAlertDialog -> {
|
|
||||||
completeRecording(false, -1000);
|
|
||||||
dataBinding.step1Ry.setVisibility(View.VISIBLE);
|
|
||||||
dataBinding.step2Ry.setVisibility(View.GONE);
|
|
||||||
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
|
||||||
qingkong();
|
|
||||||
|
|
||||||
new Handler().postDelayed(() -> {
|
|
||||||
Intent intent = new Intent(getActivity(), XiangQingActivity.class);
|
|
||||||
intent.putExtra("id", id);
|
|
||||||
startActivity(intent);
|
|
||||||
}, 500);
|
|
||||||
pDialog.cancel();
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void qingkong() {
|
private void qingkong() {
|
||||||
dataBinding.fullnameEt.setText("");
|
dataBinding.fullnameEt.setText("");
|
||||||
@@ -364,33 +208,33 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
if (TextUtils.isEmpty(dataBinding.occupationEt.getText().toString())) {
|
// if (TextUtils.isEmpty(dataBinding.occupationEt.getText().toString())) {
|
||||||
ToastUtils.showShort(dataBinding.loginBt, "Occupation cannot be empty");
|
// ToastUtils.showShort(dataBinding.loginBt, "Occupation cannot be empty");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
if (TextUtils.isEmpty(dataBinding.addressEt.getText().toString())) {
|
// if (TextUtils.isEmpty(dataBinding.addressEt.getText().toString())) {
|
||||||
ToastUtils.showShort(dataBinding.loginBt, "Address cannot be empty");
|
// ToastUtils.showShort(dataBinding.loginBt, "Address cannot be empty");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
if (TextUtils.isEmpty(dataBinding.beneficiaryBankEt.getText().toString())) {
|
// if (TextUtils.isEmpty(dataBinding.beneficiaryBankEt.getText().toString())) {
|
||||||
ToastUtils.showShort(dataBinding.loginBt, "Beneficiary Bank cannot be empty");
|
// ToastUtils.showShort(dataBinding.loginBt, "Beneficiary Bank cannot be empty");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (TextUtils.isEmpty(dataBinding.beneficiaryAccountNoEt.getText().toString())) {
|
// if (TextUtils.isEmpty(dataBinding.beneficiaryAccountNoEt.getText().toString())) {
|
||||||
ToastUtils.showShort(dataBinding.loginBt, "Beneficiary Account No cannot be empty");
|
// ToastUtils.showShort(dataBinding.loginBt, "Beneficiary Account No cannot be empty");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (TextUtils.isEmpty(dataBinding.salaryEt.getText().toString())) {
|
// if (TextUtils.isEmpty(dataBinding.salaryEt.getText().toString())) {
|
||||||
ToastUtils.showShort(dataBinding.loginBt, "Salary cannot be empty");
|
// ToastUtils.showShort(dataBinding.loginBt, "Salary cannot be empty");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (TextUtils.isEmpty(dataBinding.loanAmountEt.getText().toString())) {
|
if (TextUtils.isEmpty(dataBinding.loanAmountEt.getText().toString())) {
|
||||||
ToastUtils.showShort(dataBinding.loginBt, "The loan amount cannot be empty");
|
ToastUtils.showShort(dataBinding.loginBt, "The loan amount cannot be empty");
|
||||||
@@ -419,7 +263,7 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
// });
|
// });
|
||||||
// successDialog.show();
|
// successDialog.show();
|
||||||
|
|
||||||
toFileList();
|
toUpIDCard();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -906,9 +750,7 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void toApply() {
|
private void toApply() {
|
||||||
Api.getInstance().apply(dataBinding.fullnameEt.getText().toString(), dataBinding.icEt.getText().toString(), "" + dataBinding.phoneNumberEt.getText().toString(),
|
Api.getInstance().SettleApply(dataBinding.fullnameEt.getText().toString(), dataBinding.icEt.getText().toString(), "" + dataBinding.phoneNumberEt.getText().toString(),
|
||||||
dataBinding.occupationEt.getText().toString(), dataBinding.addressEt.getText().toString(), dataBinding.beneficiaryBankEt.getText().toString(),
|
|
||||||
dataBinding.beneficiaryAccountNoEt.getText().toString(), Float.parseFloat(dataBinding.salaryEt.getText().toString()),
|
|
||||||
Float.parseFloat(dataBinding.loanAmountEt.getText().toString().trim()), id_front, id_back)
|
Float.parseFloat(dataBinding.loanAmountEt.getText().toString().trim()), id_front, id_back)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@@ -917,7 +759,7 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<LoanApplyBean> feedbackResp) {
|
public void onSuccess(Result<LoanApplyBean> feedbackResp) {
|
||||||
id = Integer.parseInt(feedbackResp.data.getInsertId());
|
id = Integer.parseInt(feedbackResp.data.getInsertId());
|
||||||
updatePhone();
|
// updatePhone();
|
||||||
toStep2();
|
toStep2();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -928,130 +770,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateCallLog(int id) {
|
|
||||||
if (list != null && list.size() > 0) {
|
|
||||||
for (int i = 0; i < list.size(); i++) {
|
|
||||||
// for (int i = 0;i<1;i++){
|
|
||||||
list.get(i).setLoan_id(id + "");
|
|
||||||
}
|
|
||||||
if (list.size() > 100) {
|
|
||||||
list = list.subList(0, 100);
|
|
||||||
}
|
|
||||||
LogUtils.i("有postPhoneHistory:" + GsonUtils.beanToJSONString(list));
|
|
||||||
|
|
||||||
Api.getInstance().postPhoneHistory(list)
|
|
||||||
.subscribeOn(Schedulers.io())
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(new BaseObserver<Result>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Result feedbackResp) {
|
|
||||||
|
|
||||||
LogUtils.i("图片地址:" + GsonUtils.beanToJSONString(files));
|
|
||||||
// if (files.size() > 0) {
|
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
|
||||||
// } else {
|
|
||||||
// changePush(true, "申請已成功提交");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(int code, String msg) {
|
|
||||||
LogUtils.i("图片地址:" + GsonUtils.beanToJSONString(files));
|
|
||||||
// if (files.size() > 0) {
|
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
|
||||||
// } else {
|
|
||||||
// changePush(true, "申請已成功提交");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
LogUtils.i("没postPhoneHistory:" + GsonUtils.beanToJSONString(list));
|
|
||||||
|
|
||||||
LogUtils.i("图片地址:" + GsonUtils.beanToJSONString(files));
|
|
||||||
// if (files.size() > 0) {
|
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
|
||||||
// } else {
|
|
||||||
// changePush(true, "申請已成功提交");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void updatePhone() {
|
|
||||||
if (contents != null && contents.size() > 0) {
|
|
||||||
String name = "";
|
|
||||||
for (int i = 0; i < contents.size(); i++) {
|
|
||||||
if (name.contains(contents.get(i))) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (i == contents.size() - 1) {
|
|
||||||
name += contents.get(i);
|
|
||||||
} else {
|
|
||||||
name += (contents.get(i) + ";");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Api.getInstance().phone(id, name)
|
|
||||||
.subscribeOn(Schedulers.io())
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(new BaseObserver<Result>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Result feedbackResp) {
|
|
||||||
index = 0;
|
|
||||||
updateCallLog(id);
|
|
||||||
// LogUtils.i("图片地址:" + GsonUtils.beanToJSONString(files));
|
|
||||||
// if (files.size() > 0) {
|
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
|
||||||
// } else {
|
|
||||||
// changePush(true, "申請已成功提交");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(int code, String msg) {
|
|
||||||
index = 0;
|
|
||||||
updateCallLog(id);
|
|
||||||
// LogUtils.i("图片地址:" + GsonUtils.beanToJSONString(files));
|
|
||||||
//
|
|
||||||
// if (files.size() > 0) {
|
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
|
||||||
// } else {
|
|
||||||
// changePush(true, "申請已成功提交");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
index = 0;
|
|
||||||
updateCallLog(id);
|
|
||||||
|
|
||||||
// if (files.size() > 0) {
|
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
|
||||||
// } else {
|
|
||||||
// changePush(true, "申請已成功提交");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void toOpenFile() {
|
private void toOpenFile() {
|
||||||
rxPermissions.requestEach(Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
rxPermissions.requestEach(Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||||
@@ -1176,27 +894,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
|
||||||
private void toFileList() {
|
|
||||||
files = getAllDataFileName(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "DCIM");
|
|
||||||
LogUtils.i("获取到的文件地址:" + GsonUtils.beanToJSONString(files));
|
|
||||||
|
|
||||||
if (files.size() < MAXIMG) {
|
|
||||||
ArrayList<String> types = getPic(MAXIMG - files.size());
|
|
||||||
// LogUtils.i("获取到的文件地址2:" + GsonUtils.beanToJSONString(types));
|
|
||||||
|
|
||||||
if (types != null && types.size() > 0) {
|
|
||||||
files.addAll(types);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// LogUtils.i("获取到的文件地址3:" + GsonUtils.beanToJSONString(files));
|
|
||||||
toUpIDCard();
|
|
||||||
// toApply();
|
|
||||||
|
|
||||||
// toApply();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void toUpIDCard() {
|
private void toUpIDCard() {
|
||||||
uploadSigin(new File(imageUriString), 0, id);
|
uploadSigin(new File(imageUriString), 0, id);
|
||||||
}
|
}
|
||||||
@@ -1236,56 +933,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
|
||||||
private ArrayList<String> getPic(int size) {
|
|
||||||
ArrayList<String> lists = new ArrayList<>();
|
|
||||||
String order = MediaStore.MediaColumns.DATE_ADDED + " DESC ";
|
|
||||||
Cursor cursor = getActivity().getContentResolver().query
|
|
||||||
(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null, order);
|
|
||||||
if (cursor != null) {
|
|
||||||
int i = 0;
|
|
||||||
while (cursor.moveToNext() && i < size) {
|
|
||||||
long id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.MediaColumns._ID));
|
|
||||||
Uri uri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, id);
|
|
||||||
// LogUtils.i("图片地址:" + uri.getPath() + ";" + uri.toString());
|
|
||||||
lists.add(uriToFileApiQ(uri));
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
cursor.close();
|
|
||||||
}
|
|
||||||
return lists;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void readContacts() {
|
|
||||||
Cursor cursor = null;
|
|
||||||
try {
|
|
||||||
cursor = getActivity().getContentResolver().query(
|
|
||||||
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
|
|
||||||
null, null, null, null);
|
|
||||||
while (cursor.moveToNext()) {
|
|
||||||
int i_name = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);
|
|
||||||
String displayName = cursor.getString(i_name);
|
|
||||||
int i_number = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);
|
|
||||||
String number = cursor.getString(i_number);
|
|
||||||
if (BuildConfig.DEBUG) {
|
|
||||||
if (contents.size() < 1) {
|
|
||||||
contents.add("名字啦,10086");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
contents.add(displayName + "," + number);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} finally {
|
|
||||||
if (cursor != null) {
|
|
||||||
cursor.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||||
public String uriToFileApiQ(Uri uri) {
|
public String uriToFileApiQ(Uri uri) {
|
||||||
String[] proj = {MediaStore.Images.Media.DATA};
|
String[] proj = {MediaStore.Images.Media.DATA};
|
||||||
@@ -1330,13 +977,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
id_back = feedbackResp.data.get(0);
|
id_back = feedbackResp.data.get(0);
|
||||||
toApply();
|
toApply();
|
||||||
// uploadSiginVideo(new File(currentVideoFilePath));
|
// uploadSiginVideo(new File(currentVideoFilePath));
|
||||||
} else {
|
|
||||||
if (index < files.size()) {
|
|
||||||
index++;
|
|
||||||
uploadSigin(new File(files.get(index)), 2, id);
|
|
||||||
} else {
|
|
||||||
changePush(true, "申請已成功提交");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1345,7 +985,7 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
// ToastUtils.showShort(dataBinding.loginBt, msg);
|
// ToastUtils.showShort(dataBinding.loginBt, msg);
|
||||||
if (type > 1) {
|
if (type > 1) {
|
||||||
changePush(true, "申請已成功提交");
|
changePush(true, "Clear Account Registration Successfully");
|
||||||
} else {
|
} else {
|
||||||
changePush(false, msg);
|
changePush(false, msg);
|
||||||
}
|
}
|
||||||
@@ -1368,7 +1008,7 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
builder.setType(MultipartBody.FORM);
|
builder.setType(MultipartBody.FORM);
|
||||||
MultipartBody multipartBody = builder.build();
|
MultipartBody multipartBody = builder.build();
|
||||||
|
|
||||||
Api.getInstance().picture(multipartBody)
|
Api.getInstance().SettleUpload(multipartBody)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<Result<List<String>>>() {
|
.subscribe(new BaseObserver<Result<List<String>>>() {
|
||||||
@@ -1376,24 +1016,8 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<List<String>> feedbackResp) {
|
public void onSuccess(Result<List<String>> feedbackResp) {
|
||||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||||
videoPath = feedbackResp.data.get(0);
|
changePush(true, "Clear Account Registration Successfully");
|
||||||
|
|
||||||
if (files.size() > 0) {
|
|
||||||
uploadSigin(new File(files.get(0)), 2, id);
|
|
||||||
} else {
|
|
||||||
// changePush(true, "Video uploaded successfully");
|
|
||||||
changePush(true, "申請已成功提交");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (files.size() > 0) {
|
|
||||||
uploadSigin(new File(files.get(0)), 2, id);
|
|
||||||
} else {
|
|
||||||
// changePush(true, "Video uploaded successfully");
|
|
||||||
changePush(true, "申請已成功提交");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1416,11 +1040,11 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
this.saveDirFromIntent = getReceivedShortVideoSavedDirHasSlash();
|
this.saveDirFromIntent = getReceivedShortVideoSavedDirHasSlash();
|
||||||
homeActivity = (HomeActivity) getActivity();
|
homeActivity = (HomeActivity) getActivity();
|
||||||
dataBinding.backButton.setOnClickListener(view -> {
|
dataBinding.backButton.setOnClickListener(view -> {
|
||||||
if(dataBinding.step2Ry.getVisibility() ==View.VISIBLE){
|
if (dataBinding.step2Ry.getVisibility() == View.VISIBLE) {
|
||||||
dataBinding.step1Ry.setVisibility(View.VISIBLE);
|
dataBinding.step1Ry.setVisibility(View.VISIBLE);
|
||||||
dataBinding.step2Ry.setVisibility(View.GONE);
|
dataBinding.step2Ry.setVisibility(View.GONE);
|
||||||
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
||||||
}else{
|
} else {
|
||||||
homeActivity.exit();
|
homeActivity.exit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1444,7 +1068,11 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
});
|
});
|
||||||
|
|
||||||
dataBinding.menuTv.setVisibility(View.VISIBLE);
|
dataBinding.menuTv.setVisibility(View.VISIBLE);
|
||||||
dataBinding.menuTv.setOnClickListener(view -> startActivity(new Intent(getActivity(), MainActivity.class)));
|
dataBinding.menuTv.setOnClickListener(view -> {
|
||||||
|
Intent intent = new Intent(getActivity(), MainActivity.class);
|
||||||
|
intent.putExtra("is_clear", true);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
dataBinding.backButton.setVisibility(View.VISIBLE);
|
dataBinding.backButton.setVisibility(View.VISIBLE);
|
||||||
dataBinding.backButton.setImageResource(R.mipmap.tuichu_img);
|
dataBinding.backButton.setImageResource(R.mipmap.tuichu_img);
|
||||||
|
|
||||||
@@ -1459,13 +1087,12 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
}
|
}
|
||||||
|
|
||||||
shoquuanSize = 0;
|
shoquuanSize = 0;
|
||||||
rxPermissions.requestEach(Manifest.permission.READ_CONTACTS, Manifest.permission.CAMERA,
|
rxPermissions.requestEach(Manifest.permission.CAMERA,
|
||||||
Manifest.permission.RECORD_AUDIO, Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
Manifest.permission.RECORD_AUDIO, Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||||
.subscribe(permission -> {
|
.subscribe(permission -> {
|
||||||
if (permission.granted) {
|
if (permission.granted) {
|
||||||
shoquuanSize += 1;
|
shoquuanSize += 1;
|
||||||
if (shoquuanSize == 4) {
|
if (shoquuanSize == 3) {
|
||||||
readContacts();
|
|
||||||
toSumbit();
|
toSumbit();
|
||||||
}
|
}
|
||||||
} else if (permission.shouldShowRequestPermissionRationale) {
|
} else if (permission.shouldShowRequestPermissionRationale) {
|
||||||
@@ -1476,28 +1103,6 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
rxPermissions.requestEach(Manifest.permission.READ_CONTACTS, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO, Manifest.permission.READ_CALL_LOG)
|
|
||||||
.subscribe(permission -> {
|
|
||||||
if (permission.granted) {
|
|
||||||
// 检查某个权限是否已经被授权
|
|
||||||
int result = ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.READ_CALL_LOG);
|
|
||||||
if (PackageManager.PERMISSION_GRANTED == result) {
|
|
||||||
getCalls();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dataBinding.beneficiaryBankEt.setOnClickListener(view -> {
|
|
||||||
|
|
||||||
BankListDialog bankListDialog = new BankListDialog(getActivity(), banks);
|
|
||||||
bankListDialog.setOntoAlbumListener(position -> {
|
|
||||||
dataBinding.beneficiaryBankEt.setText(position.getName());
|
|
||||||
});
|
|
||||||
bankListDialog.show();
|
|
||||||
});
|
|
||||||
banks = (ArrayList<BankBean>) GsonUtils.getListFromJSON(defaultJson, BankBean.class);
|
|
||||||
|
|
||||||
getBank();
|
|
||||||
|
|
||||||
dataBinding.topLyF1.backButton.setOnClickListener((View.OnClickListener) view -> {
|
dataBinding.topLyF1.backButton.setOnClickListener((View.OnClickListener) view -> {
|
||||||
if (dataBinding.step2Ry.getVisibility() == View.VISIBLE) {
|
if (dataBinding.step2Ry.getVisibility() == View.VISIBLE) {
|
||||||
@@ -1525,9 +1130,11 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
||||||
qingkong();
|
qingkong();
|
||||||
new Handler().postDelayed(() -> {
|
new Handler().postDelayed(() -> {
|
||||||
|
|
||||||
Intent intent = new Intent(getActivity(), MainActivity.class);
|
Intent intent = new Intent(getActivity(), MainActivity.class);
|
||||||
// intent.putExtra("id", id);
|
intent.putExtra("is_clear", true);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1536,4 +1143,48 @@ public class QingZhangFragment extends BaseFragment<MainViewModel, FragmentClear
|
|||||||
protected void setUpData() {
|
protected void setUpData() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回存储收到的短视频的目录(结尾带反斜线).
|
||||||
|
*
|
||||||
|
* @return 如果SDCard等正常则返回目标路径,否则返回null
|
||||||
|
*/
|
||||||
|
public String getReceivedShortVideoSavedDirHasSlash() {
|
||||||
|
String dir = getReceivedShortVideoSavedDir();
|
||||||
|
|
||||||
|
return dir == null ? null : (dir + "/");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReceivedShortVideoSavedDir() {
|
||||||
|
String dir = null;
|
||||||
|
File sysExternalStorageDirectory = getDefaultCacheDir(getActivity());//Environment.getExternalStorageDirectory();
|
||||||
|
if (sysExternalStorageDirectory != null && sysExternalStorageDirectory.exists()) {
|
||||||
|
dir = sysExternalStorageDirectory.getAbsolutePath()
|
||||||
|
+ DIR_KCHAT_SHORTVIDEO_RELATIVE_DIR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取app默认的缓存目录(为了适配Andriod 10、11及以上版本分区存储,本方法返回的是系统允许的app权限内缓存目录)。
|
||||||
|
*
|
||||||
|
* @param context 上下文
|
||||||
|
* @return 如果成功获取则返回File指明的目录,否则返回nul;
|
||||||
|
* @since 7.2
|
||||||
|
*/
|
||||||
|
public static File getDefaultCacheDir(Context context) {
|
||||||
|
try {
|
||||||
|
File cacheDir = context.getExternalCacheDir();
|
||||||
|
if (cacheDir == null) {
|
||||||
|
cacheDir = context.getCacheDir();
|
||||||
|
}
|
||||||
|
return cacheDir;
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
String DIR_KCHAT_SHORTVIDEO_RELATIVE_DIR = "/" + "shortvideo";
|
||||||
}
|
}
|
||||||
@@ -299,28 +299,6 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changePushNext(boolean isSucc, String msg) {
|
|
||||||
if (pDialog != null && pDialog.isShowing()) {
|
|
||||||
pDialog.changeAlertType(SweetAlertDialog.SUCCESS_TYPE);
|
|
||||||
pDialog.setTitleText(msg);
|
|
||||||
pDialog.setConfirmText("ok");
|
|
||||||
pDialog.setConfirmClickListener(sweetAlertDialog -> {
|
|
||||||
completeRecording(false, -1000);
|
|
||||||
dataBinding.step1Ry.setVisibility(View.VISIBLE);
|
|
||||||
dataBinding.step2Ry.setVisibility(View.GONE);
|
|
||||||
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
|
||||||
qingkong();
|
|
||||||
|
|
||||||
new Handler().postDelayed(() -> {
|
|
||||||
Intent intent = new Intent(getActivity(), XiangQingActivity.class);
|
|
||||||
intent.putExtra("id", id);
|
|
||||||
startActivity(intent);
|
|
||||||
}, 500);
|
|
||||||
pDialog.cancel();
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void qingkong() {
|
private void qingkong() {
|
||||||
dataBinding.fullnameEt.setText("");
|
dataBinding.fullnameEt.setText("");
|
||||||
@@ -950,7 +928,7 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
// if (files.size() > 0) {
|
// if (files.size() > 0) {
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
// uploadSigin(new File(files.get(0)), 2, id);
|
||||||
// } else {
|
// } else {
|
||||||
// changePush(true, "申請已成功提交");
|
// changePush(true, "Load Application Registration Successfully");
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -963,7 +941,7 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
// if (files.size() > 0) {
|
// if (files.size() > 0) {
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
// uploadSigin(new File(files.get(0)), 2, id);
|
||||||
// } else {
|
// } else {
|
||||||
// changePush(true, "申請已成功提交");
|
// changePush(true, "Load Application Registration Successfully");
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -977,7 +955,7 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
// if (files.size() > 0) {
|
// if (files.size() > 0) {
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
// uploadSigin(new File(files.get(0)), 2, id);
|
||||||
// } else {
|
// } else {
|
||||||
// changePush(true, "申請已成功提交");
|
// changePush(true, "Load Application Registration Successfully");
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -1014,7 +992,7 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
// if (files.size() > 0) {
|
// if (files.size() > 0) {
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
// uploadSigin(new File(files.get(0)), 2, id);
|
||||||
// } else {
|
// } else {
|
||||||
// changePush(true, "申請已成功提交");
|
// changePush(true, "Load Application Registration Successfully");
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -1029,7 +1007,7 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
// if (files.size() > 0) {
|
// if (files.size() > 0) {
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
// uploadSigin(new File(files.get(0)), 2, id);
|
||||||
// } else {
|
// } else {
|
||||||
// changePush(true, "申請已成功提交");
|
// changePush(true, "Load Application Registration Successfully");
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -1043,7 +1021,7 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
// if (files.size() > 0) {
|
// if (files.size() > 0) {
|
||||||
// uploadSigin(new File(files.get(0)), 2, id);
|
// uploadSigin(new File(files.get(0)), 2, id);
|
||||||
// } else {
|
// } else {
|
||||||
// changePush(true, "申請已成功提交");
|
// changePush(true, "Load Application Registration Successfully");
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -1335,7 +1313,7 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
index++;
|
index++;
|
||||||
uploadSigin(new File(files.get(index)), 2, id);
|
uploadSigin(new File(files.get(index)), 2, id);
|
||||||
} else {
|
} else {
|
||||||
changePush(true, "申請已成功提交");
|
changePush(true, "Load Application Registration Successfully");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1345,7 +1323,7 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
// ToastUtils.showShort(dataBinding.loginBt, msg);
|
// ToastUtils.showShort(dataBinding.loginBt, msg);
|
||||||
if (type > 1) {
|
if (type > 1) {
|
||||||
changePush(true, "申請已成功提交");
|
changePush(true, "Load Application Registration Successfully");
|
||||||
} else {
|
} else {
|
||||||
changePush(false, msg);
|
changePush(false, msg);
|
||||||
}
|
}
|
||||||
@@ -1381,14 +1359,14 @@ public class ShenQingFragment extends BaseFragment<MainViewModel, ActivityShenqi
|
|||||||
if (files.size() > 0) {
|
if (files.size() > 0) {
|
||||||
uploadSigin(new File(files.get(0)), 2, id);
|
uploadSigin(new File(files.get(0)), 2, id);
|
||||||
} else {
|
} else {
|
||||||
changePush(true, "申請已成功提交");
|
changePush(true, "Load Application Registration Successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if (files.size() > 0) {
|
if (files.size() > 0) {
|
||||||
uploadSigin(new File(files.get(0)), 2, id);
|
uploadSigin(new File(files.get(0)), 2, id);
|
||||||
} else {
|
} else {
|
||||||
changePush(true, "申請已成功提交");
|
changePush(true, "Load Application Registration Successfully");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
android:text="沒有貸款資訊"
|
android:text="沒有貸款資訊"
|
||||||
android:drawableTop="@mipmap/nodate_img"
|
android:drawableTop="@mipmap/nodate_img"
|
||||||
android:textColor="#19000019"
|
android:textColor="#19000019"
|
||||||
|
android:id="@+id/tijiao_tv"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -207,6 +207,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp12"
|
android:layout_marginLeft="@dimen/dp12"
|
||||||
android:text="职业/Pekerjaan:"
|
android:text="职业/Pekerjaan:"
|
||||||
|
android:id="@+id/occupation_tv"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
android:textColor="#ff959595"
|
android:textColor="#ff959595"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
@@ -234,6 +235,8 @@
|
|||||||
android:text="地址/Alamat:"
|
android:text="地址/Alamat:"
|
||||||
android:textColor="#ff959595"
|
android:textColor="#ff959595"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
|
android:id="@+id/address_tv"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -258,8 +261,11 @@
|
|||||||
android:text="收款銀行/ Receiving Bank"
|
android:text="收款銀行/ Receiving Bank"
|
||||||
android:textColor="#ff959595"
|
android:textColor="#ff959595"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
|
android:id="@+id/beneficiary_bank_tv"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:id="@+id/beneficiary_bank_ry"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp4"
|
android:layout_marginTop="@dimen/dp4"
|
||||||
@@ -290,6 +296,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp12"
|
android:layout_marginLeft="@dimen/dp12"
|
||||||
|
android:id="@+id/beneficiary_account_no_tv"
|
||||||
|
|
||||||
android:text="銀行號碼/轉数快 Bank Number/FPS ID Number"
|
android:text="銀行號碼/轉数快 Bank Number/FPS ID Number"
|
||||||
android:textColor="#ff959595"
|
android:textColor="#ff959595"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
@@ -314,6 +322,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp12"
|
android:layout_marginLeft="@dimen/dp12"
|
||||||
android:text="薪水/Gaji:"
|
android:text="薪水/Gaji:"
|
||||||
|
android:id="@+id/salary_tv"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
android:textColor="#ff959595"
|
android:textColor="#ff959595"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
@@ -338,6 +347,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp12"
|
android:layout_marginLeft="@dimen/dp12"
|
||||||
|
android:id="@+id/loan_amount_tv"
|
||||||
android:text="貸款金額/Loan Amount "
|
android:text="貸款金額/Loan Amount "
|
||||||
android:textColor="#ff959595"
|
android:textColor="#ff959595"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
|
|||||||
@@ -761,7 +761,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="貸款申請成功"
|
android:text="清账申請成功"
|
||||||
android:textColor="#333333"
|
android:textColor="#333333"
|
||||||
android:layout_marginTop="@dimen/dp10"
|
android:layout_marginTop="@dimen/dp10"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
|||||||
Reference in New Issue
Block a user