From 9ee90782bf14b91442cd524bc033bbf6d1778bb2 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期四, 29 六月 2017 10:32:05 +0800
Subject: [PATCH] aaaaa
---
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java | 121 ++++++++++++++++++++++++++++++++--------
1 files changed, 97 insertions(+), 24 deletions(-)
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java
index b86315a..cba98be 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java
@@ -26,32 +26,65 @@
if (!BaseApplication.deviceAvailable) {
return;
}
+// params = new RequestParams();
try {
- File path = BaseApplication.getInstance().getFilesDir();
- File f1 = new File(path, "1.txt");
- if (!f1.exists()) {
- f1.createNewFile();
- }
- File f2 = new File(path, "2.txt");
- if (!f2.exists()) {
- f2.createNewFile();
- }
- FileWriter fw1 = new FileWriter(f1);
- fw1.write("test1");
- fw1.close();
- FileWriter fw2 = new FileWriter(f2);
- fw2.write("test2");
- fw2.close();
- params.setUri(AppApi.BASE_URL +AppApi.REGISTER_ADD);
- params.addBodyParameter("file1", f1);
- params.addBodyParameter("file2", f2);
- x.http().post(params, new BaseCommonCallBack() {
- @Override
- public void success() {
- Toast.makeText(BaseApplication.getInstance(),"娣诲姞鎴愬姛", Toast.LENGTH_SHORT).show();
- RegisterFragment.getInstance().resetForm();
+// params.setUri(AppApi.BASE_URL +AppApi.REGISTER_ADD);
+// x.http().post(params, new BaseCommonCallBack() {
+// @Override
+// public void success() {
+// Toast.makeText(BaseApplication.getInstance(),"娣诲姞鎴愬姛", Toast.LENGTH_SHORT).show();
+// //RegisterFragment.getInstance().resetForm();
+// }
+// });
+
+
+ try {
+ File path = BaseApplication.getInstance().getFilesDir();
+ File f1 = new File(path, "rawSurveillancePhoto");
+ if (!f1.exists()) {
+ f1.createNewFile();
}
- });
+ File f0 = new File(path, "f0");
+ if (!f0.exists()) {
+ f0.createNewFile();
+ }
+ File f2 = new File(path, "surveillancePhoto");
+ if (!f2.exists()) {
+ f2.createNewFile();
+ }
+ File f3 = new File(path, "uploadCustomPhoto");
+ if (!f3.exists()) {
+ f3.createNewFile();
+ }
+ File f4 = new File(path, "idCardPhoto");
+ if (!f4.exists()) {
+ f4.createNewFile();
+ }
+ FileWriter fw0 = new FileWriter(f0);
+ fw0.write("test1");
+ fw0.close();
+// FileWriter fw1 = new FileWriter(f1);
+// fw1.write("test1");
+// fw1.close();
+// FileWriter fw2 = new FileWriter(f2);
+// fw2.write("test2");
+// fw2.close();
+ params.setUri(AppApi.BASE_URL +AppApi.REGISTER_ADD);
+ params.addBodyParameter("f0", f0);
+ params.addBodyParameter("rawSurveillancePhoto", f1);
+ params.addBodyParameter("surveillancePhoto", f2);
+ params.addBodyParameter("uploadCustomPhoto", f3);
+ params.addBodyParameter("idCardPhoto", f4);
+ x.http().post(params, new BaseCommonCallBack() {
+ @Override
+ public void success() {
+ Toast.makeText(BaseApplication.getInstance(),"娣诲姞鎴愬姛", Toast.LENGTH_SHORT).show();
+ RegisterFragment.getInstance().resetForm();
+ }
+ });
+ }catch(Exception e) {
+ e.printStackTrace();
+ }
}catch(Exception e) {
e.printStackTrace();
@@ -60,4 +93,44 @@
}
+ public void compareSurveillancePhotoAndIdCardPhoto(RequestParams params) {
+ if (!BaseApplication.deviceAvailable) {
+ return;
+ }
+ try {
+ File path = BaseApplication.getInstance().getFilesDir();
+ File f0 = new File(path, "f0");
+ if (!f0.exists()) {
+ f0.createNewFile();
+ }
+ File f2 = new File(path, "surveillancePhoto");
+ if (!f2.exists()) {
+ f2.createNewFile();
+ }
+ File f4 = new File(path, "idCardPhoto");
+ if (!f4.exists()) {
+ f4.createNewFile();
+ }
+ FileWriter fw0 = new FileWriter(f0);
+ fw0.write("test1");
+ fw0.close();
+
+ params.setUri(AppApi.BASE_URL +AppApi.REGISTER_ID_CARD_AUTH);
+ params.addBodyParameter("f0", f0);
+ params.addBodyParameter("surveillancePhoto", f2);
+ params.addBodyParameter("idCardPhoto", f4);
+ x.http().post(params, new BaseCommonCallBack() {
+ @Override
+ public void success() {
+ Toast.makeText(BaseApplication.getInstance(),"娴嬭瘯鐩镐技搴�", Toast.LENGTH_SHORT).show();
+ }
+ });
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+
}
--
Gitblit v1.8.0