对能力测评的布局上优化和添加实名认证的姓名赋值绑定银行卡和用户资料
This commit is contained in:
parent
c65a11659d
commit
d3c725ac57
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
|||||||
android {
|
android {
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
buildToolsVersion '29.0.2'
|
buildToolsVersion '29.0.2'
|
||||||
// ndkVersion '23.0.7123448'
|
ndkVersion '23.0.7123448'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.navinfo.outdoor"
|
applicationId "com.navinfo.outdoor"
|
||||||
|
@ -33,7 +33,9 @@ import com.navinfo.outdoor.http.DialogCallback;
|
|||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
||||||
import com.navinfo.outdoor.util.RegexUtil;
|
import com.navinfo.outdoor.util.RegexUtil;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@ -51,10 +53,14 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
private ImageView ivUser;
|
private ImageView ivUser;
|
||||||
private TextView region;
|
private TextView region;
|
||||||
private EditText etPhone, etQq, etMailbox;
|
private EditText etPhone, etQq, etMailbox;
|
||||||
public static Pattern compile = Pattern.compile("/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,})$/");
|
// public static Pattern compile = Pattern.compile("/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,})$/");
|
||||||
private Button userSave;
|
private Button userSave;
|
||||||
private LinearLayout llRegion;
|
private LinearLayout llRegion;
|
||||||
private String userqq;
|
private String userqq;
|
||||||
|
private String userphone;
|
||||||
|
private String usermailbox;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
@ -111,29 +117,32 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
showPickerView();
|
showPickerView();
|
||||||
break;
|
break;
|
||||||
case R.id.edit_qq:
|
case R.id.edit_qq:
|
||||||
qq();
|
// qq();
|
||||||
break;
|
break;
|
||||||
case R.id.edit_mailbox:
|
case R.id.edit_mailbox:
|
||||||
if (isEmail(etMailbox.getText().toString().trim()) && etMailbox.getText().toString().trim().length() > 31) {
|
|
||||||
Toast.makeText(this, "邮箱验证成功", Toast.LENGTH_SHORT).show();
|
|
||||||
} else {
|
|
||||||
Toast.makeText(this, "邮箱格式错误", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case R.id.btn_save:
|
case R.id.btn_save:
|
||||||
final String userphone = etPhone.getText().toString().trim();
|
userphone = etPhone.getText().toString().trim();
|
||||||
userqq = etQq.getText().toString().trim();
|
userqq = etQq.getText().toString().trim();
|
||||||
final String usermailbox = etMailbox.getText().toString().trim();
|
usermailbox = etMailbox.getText().toString().trim();
|
||||||
if (!RegexUtil.isPhone(userphone)) {
|
boolean isQQNum_matcher = userqq.matches("[1-9]\\d{4,10}");
|
||||||
Toast.makeText(this, "手机号输入错误", Toast.LENGTH_SHORT).show();
|
// 邮箱匹配结果
|
||||||
return;
|
boolean isEmail_matcher = usermailbox.matches("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");
|
||||||
}
|
//
|
||||||
if (userqq.length() > 11) {
|
if (TextUtils.isEmpty(userphone) || TextUtils.isEmpty(userqq) || TextUtils.isEmpty(usermailbox)) {
|
||||||
Toast.makeText(this, "QQ号输入错误", Toast.LENGTH_SHORT).show();
|
if (!RegexUtil.isPhone(userphone)) {
|
||||||
return;
|
Toast.makeText(this, "手机号输入错误", Toast.LENGTH_SHORT).show();
|
||||||
}
|
return;
|
||||||
if (usermailbox.length() > 31) {
|
}
|
||||||
Toast.makeText(this, "邮箱输入错误", Toast.LENGTH_SHORT).show();
|
if (isQQNum_matcher && userqq.length() < 11 && userqq.length() > 5) {
|
||||||
|
Toast.makeText(this, "QQ号输入错误", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isEmail_matcher) {
|
||||||
|
Toast.makeText(this, "邮箱格式错误", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
netWork();
|
netWork();
|
||||||
break;
|
break;
|
||||||
@ -184,24 +193,12 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String qq() {
|
|
||||||
String qq = "23412312";
|
|
||||||
String regex = "[1-9][0-9]{4,11}";
|
|
||||||
boolean flag = qq.matches(regex);
|
|
||||||
if (flag) {
|
|
||||||
System.out.println("输入正确!!");
|
|
||||||
} else {
|
|
||||||
System.out.println("输入正确!!");
|
|
||||||
}
|
|
||||||
return qq();
|
|
||||||
|
|
||||||
}
|
// public static boolean isEmail(String email) {
|
||||||
|
// if (null == email || "".equals(email)) return false;
|
||||||
public static boolean isEmail(String email) {
|
// Matcher m = compile.matcher(email);
|
||||||
if (null == email || "".equals(email)) return false;
|
// return m.matches();
|
||||||
Matcher m = compile.matcher(email);
|
// }
|
||||||
return m.matches();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showPickerView() {// 弹出选择器(省市区三级联动)
|
private void showPickerView() {// 弹出选择器(省市区三级联动)
|
||||||
OptionsPickerView pvOptions = new OptionsPickerBuilder(UserActivity.this, new OnOptionsSelectListener() {
|
OptionsPickerView pvOptions = new OptionsPickerBuilder(UserActivity.this, new OnOptionsSelectListener() {
|
||||||
@ -320,4 +317,5 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,8 +54,9 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
final boolean single = measureList.get(position).isSingle();//是否多选
|
final boolean single = measureList.get(position).isSingle();//是否多选
|
||||||
holder.tvMeasure.setText((position + 1) + measureList.get(position).getQuestion());
|
// holder.tvMeasure.setText((position + 1)+"、" + measureList.get(position).getQuestion());
|
||||||
if (single) {
|
if (single) {
|
||||||
|
holder.tvMeasure.setText((position + 1)+"、" + measureList.get(position).getQuestion()+"(单选)");
|
||||||
RadioGroup radioGroup = new RadioGroup(context);
|
RadioGroup radioGroup = new RadioGroup(context);
|
||||||
radioGroup.setOrientation(LinearLayout.VERTICAL);
|
radioGroup.setOrientation(LinearLayout.VERTICAL);
|
||||||
holder.llOption.addView(radioGroup);
|
holder.llOption.addView(radioGroup);
|
||||||
@ -66,6 +67,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
holder.tvMeasure.setText((position + 1)+"、" + measureList.get(position).getQuestion()+"(多选)");
|
||||||
List<?> optionList = measureList.get(position).getOption();
|
List<?> optionList = measureList.get(position).getOption();
|
||||||
if (optionList != null && !optionList.isEmpty()) {
|
if (optionList != null && !optionList.isEmpty()) {
|
||||||
for (int i = 0; i < optionList.size(); i++) {
|
for (int i = 0; i < optionList.size(); i++) {
|
||||||
|
@ -56,6 +56,9 @@ public class Constant {
|
|||||||
public static final int MAIN_OTHER = 23;//其他的Fragment 对地图页面marker 的一个展示
|
public static final int MAIN_OTHER = 23;//其他的Fragment 对地图页面marker 的一个展示
|
||||||
public static final int OTHER_WORD = 25;//地图页面marker 的经纬都回传
|
public static final int OTHER_WORD = 25;//地图页面marker 的经纬都回传
|
||||||
public static final int CHARGING_STATION_PILE = 26;//跳转到充电桩 传给数据
|
public static final int CHARGING_STATION_PILE = 26;//跳转到充电桩 传给数据
|
||||||
|
|
||||||
|
|
||||||
|
public static String USER_ATTESTATION_NAME; //实名认证姓名 银行卡
|
||||||
/**
|
/**
|
||||||
* 用户当前位置
|
* 用户当前位置
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,7 @@ package com.navinfo.outdoor.fragment;
|
|||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -13,11 +14,13 @@ import android.widget.EditText;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||||
import com.kongzue.dialog.util.BaseDialog;
|
import com.kongzue.dialog.util.BaseDialog;
|
||||||
@ -26,6 +29,7 @@ import com.lzy.okgo.OkGo;
|
|||||||
import com.lzy.okgo.model.Response;
|
import com.lzy.okgo.model.Response;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.adapter.BankAdapter;
|
import com.navinfo.outdoor.adapter.BankAdapter;
|
||||||
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.BankPathBean;
|
import com.navinfo.outdoor.bean.BankPathBean;
|
||||||
import com.navinfo.outdoor.bean.BankPhoneBean;
|
import com.navinfo.outdoor.bean.BankPhoneBean;
|
||||||
@ -33,9 +37,14 @@ import com.navinfo.outdoor.http.DialogCallback;
|
|||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
||||||
import com.navinfo.outdoor.util.PhotoPathUtil;
|
import com.navinfo.outdoor.util.PhotoPathUtil;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import static android.app.Activity.RESULT_OK;
|
import static android.app.Activity.RESULT_OK;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,6 +60,8 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
private ImageView gatheringCamera;
|
private ImageView gatheringCamera;
|
||||||
private String gatheringPath;
|
private String gatheringPath;
|
||||||
private ArrayList<File> gatheringList;
|
private ArrayList<File> gatheringList;
|
||||||
|
private ArrayList<BankPathBean> jsonBean;
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
|
||||||
public static GatheringFragment newInstance(Bundle bundle) {
|
public static GatheringFragment newInstance(Bundle bundle) {
|
||||||
@ -77,9 +88,13 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
btnBank = findViewById(R.id.btn_bank);
|
btnBank = findViewById(R.id.btn_bank);
|
||||||
btnBank.setOnClickListener(this::onClick);
|
btnBank.setOnClickListener(this::onClick);
|
||||||
tvName = (TextView) findViewById(R.id.tv_name);
|
tvName = (TextView) findViewById(R.id.tv_name);
|
||||||
|
if (Constant.USER_ATTESTATION_NAME!=null){
|
||||||
|
tvName.setText(Constant.USER_ATTESTATION_NAME);
|
||||||
|
}
|
||||||
etBankNum = (EditText) findViewById(R.id.et_bank_num);
|
etBankNum = (EditText) findViewById(R.id.et_bank_num);
|
||||||
gatheringCamera = (ImageView) findViewById(R.id.gathering_camera);
|
gatheringCamera = (ImageView) findViewById(R.id.gathering_camera);
|
||||||
gatheringCamera.setOnClickListener(this::onClick);
|
gatheringCamera.setOnClickListener(this::onClick);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -98,7 +113,8 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
break;
|
break;
|
||||||
case R.id.iv_bank:
|
case R.id.iv_bank:
|
||||||
String bankJson = new GetJsonDataUtil().getJson(getContext(), "bank.json");//获取assets目录下的json文件数据
|
String bankJson = new GetJsonDataUtil().getJson(getContext(), "bank.json");//获取assets目录下的json文件数据
|
||||||
ArrayList<BankPathBean> jsonBean = parseData(bankJson);//用Gson 转成实体
|
//用Gson 转成实体
|
||||||
|
jsonBean = parseData(bankJson);
|
||||||
Dialog dialog = new Dialog(getContext());
|
Dialog dialog = new Dialog(getContext());
|
||||||
//弹窗点击周围空白处弹出层自动消失弹窗消失(false时为点击周围空白处弹出层不自动消失)
|
//弹窗点击周围空白处弹出层自动消失弹窗消失(false时为点击周围空白处弹出层不自动消失)
|
||||||
dialog.setCanceledOnTouchOutside(true);
|
dialog.setCanceledOnTouchOutside(true);
|
||||||
@ -114,7 +130,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
public void onClick(int pos) {
|
public void onClick(int pos) {
|
||||||
|
|
||||||
tvBank.setText(jsonBean.get(pos).getLabel());
|
tvBank.setText(jsonBean.get(pos).getLabel());
|
||||||
|
value = jsonBean.get(pos).getValue();
|
||||||
bankAdapter.notifyDataSetChanged();
|
bankAdapter.notifyDataSetChanged();
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
@ -144,6 +160,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Toast.makeText(getContext(), "身份证照片不能为空", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "身份证照片不能为空", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gatheringList.add(gatheringFile);
|
gatheringList.add(gatheringFile);
|
||||||
String etBankAccount = etBankNum.getText().toString().trim();
|
String etBankAccount = etBankNum.getText().toString().trim();
|
||||||
if (etBankAccount == null || etBankAccount.equals("")) {
|
if (etBankAccount == null || etBankAccount.equals("")) {
|
||||||
@ -151,13 +168,12 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OkGo
|
OkGo
|
||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<BankPhoneBean>post(HttpInterface.USER_BANKCARD_UP_DATA)
|
.<BankPhoneBean>post(HttpInterface.USER_BANKCARD_UP_DATA)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
.params("userid", "1")
|
.params("userid", "1")
|
||||||
.params("bankAccount", "123456")//银行id
|
.params("bankAccount", value)//银行id
|
||||||
.params("idNumber", etBankAccount)//银行卡号
|
.params("idNumber", etBankAccount)//银行卡号
|
||||||
.addFileParams("file", gatheringList)//银行卡拍照
|
.addFileParams("file", gatheringList)//银行卡拍照
|
||||||
.tag(this)
|
.tag(this)
|
||||||
@ -219,4 +235,5 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package com.navinfo.outdoor.fragment;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@ -19,11 +20,16 @@ import com.kongzue.dialog.v3.MessageDialog;
|
|||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.model.Response;
|
import com.lzy.okgo.model.Response;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.NameAuthenticationBean;
|
import com.navinfo.outdoor.bean.NameAuthenticationBean;
|
||||||
import com.navinfo.outdoor.http.DialogCallback;
|
import com.navinfo.outdoor.http.DialogCallback;
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.util.PhotoPathUtil;
|
import com.navinfo.outdoor.util.PhotoPathUtil;
|
||||||
|
import com.umeng.commonsdk.debug.I;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -47,6 +53,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
private ImageView ivAttestation3;
|
private ImageView ivAttestation3;
|
||||||
private String takePhotoPath3;
|
private String takePhotoPath3;
|
||||||
private ArrayList<File> takePhoneList;
|
private ArrayList<File> takePhoneList;
|
||||||
|
private String attestationName;
|
||||||
|
|
||||||
|
|
||||||
public static UserAttestationFragment newInstance(Bundle bundle) {
|
public static UserAttestationFragment newInstance(Bundle bundle) {
|
||||||
@ -60,6 +67,8 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
return R.layout.user_attestation_fragment;
|
return R.layout.user_attestation_fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
@ -135,26 +144,37 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
takePhoneList.add(takePhotoFile1);
|
takePhoneList.add(takePhotoFile1);
|
||||||
takePhoneList.add(takePhotoFile2);
|
takePhoneList.add(takePhotoFile2);
|
||||||
takePhoneList.add(takePhotoFile3);
|
takePhoneList.add(takePhotoFile3);
|
||||||
|
attestationName = etAttestationName.getText().toString().trim();
|
||||||
|
String namePhone = etNamePhone.getText().toString().trim();
|
||||||
|
|
||||||
|
// Message obtain = Message.obtain();
|
||||||
|
// obtain.what = Constant.USER_ATTESTATION_NAME;
|
||||||
|
// obtain.obj = attestationName;
|
||||||
|
// EventBus.getDefault().post(obtain);
|
||||||
|
|
||||||
OkGo
|
OkGo
|
||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
|
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
.params("userid", "1")
|
.params("userid", "1")
|
||||||
.params("name", etAttestationName.getFreezesText())
|
.params("name", attestationName)
|
||||||
.params("idnum", etNamePhone.getFreezesText())
|
.params("idnum", namePhone)
|
||||||
.addFileParams("file", takePhoneList)
|
.addFileParams("file", takePhoneList)
|
||||||
.tag(this)
|
.tag(this)
|
||||||
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {
|
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<NameAuthenticationBean> response) {
|
public void onSuccess(Response<NameAuthenticationBean> response) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
||||||
if (response.body().equals("0")) {
|
if (response.body().equals("0")) {
|
||||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "不通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "不通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
// Toast.makeText(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
|
||||||
|
Constant.USER_ATTESTATION_NAME=attestationName;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -162,7 +182,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
// Toast.makeText(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
|
Constant.USER_ATTESTATION_NAME=attestationName;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -199,7 +219,8 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||||
//从附加值中获取返回的图像
|
//从附加值中获取返回的图像
|
||||||
Bitmap bitmap = (Bitmap) extras.get("data");
|
Bitmap bitmap = (Bitmap) extras.get("data");
|
||||||
ivAttestation2.setImageBitmap(bitmap);//显示图像
|
ivAttestation3.setImageBitmap(bitmap);//显示图像
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@
|
|||||||
android:id="@+id/tv_qq"
|
android:id="@+id/tv_qq"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="QQ号码*"
|
android:text="QQ号码"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
style="@style/user_text_style"
|
style="@style/user_text_style"
|
||||||
@ -203,6 +203,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:hint="请输入QQ号码 "
|
android:hint="请输入QQ号码 "
|
||||||
style="@style/user_hint_style"
|
style="@style/user_hint_style"
|
||||||
|
android:digits="0123456789"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -222,7 +223,7 @@
|
|||||||
android:id="@+id/tv_mailbox"
|
android:id="@+id/tv_mailbox"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="电子邮箱*"
|
android:text="电子邮箱"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
style="@style/user_text_style"
|
style="@style/user_text_style"
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
>
|
>
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/tv_option_layer_index"
|
android:id="@+id/tv_option_layer_index"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
Loading…
x
Reference in New Issue
Block a user