Commit 242a5793 by 罗翻

处理工单前增加活体检测

parent 31d44116
Showing with 101 additions and 93 deletions
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":11},"path":"app-release.apk","properties":{"packageId":"com.dayu.bigfish","split":"","minSdkVersion":"16"}}] [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":12},"path":"app-release.apk","properties":{"packageId":"com.dayu.bigfish","split":"","minSdkVersion":"16"}}]
\ No newline at end of file \ No newline at end of file
...@@ -3,6 +3,7 @@ package com.dayu.utils; ...@@ -3,6 +3,7 @@ package com.dayu.utils;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Environment; import android.os.Environment;
import android.support.annotation.DrawableRes; import android.support.annotation.DrawableRes;
import android.widget.ImageView; import android.widget.ImageView;
...@@ -10,6 +11,8 @@ import android.widget.ImageView; ...@@ -10,6 +11,8 @@ import android.widget.ImageView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.transition.Transition;
import com.dayu.baselibrary.R; import com.dayu.baselibrary.R;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
...@@ -44,18 +47,22 @@ public class GlideImageLoader { ...@@ -44,18 +47,22 @@ public class GlideImageLoader {
.apply(options) .apply(options)
.into(view); .into(view);
} }
public static void loadNoCache(Context context, String imageRes, ImageView view) { public static void loadDrawable(Context context, String imageRes, ImageView view) {
RequestOptions options = new RequestOptions() RequestOptions options = new RequestOptions()
.centerCrop() .centerCrop()
.placeholder(R.drawable.camera) .placeholder(R.drawable.camera)
.diskCacheStrategy(DiskCacheStrategy.NONE) .diskCacheStrategy(DiskCacheStrategy.NONE)
.skipMemoryCache(true) .skipMemoryCache(true);
;
Glide.with(context) Glide.with(context)
.load(imageRes) .load(imageRes)
.transition(withCrossFade()) .transition(withCrossFade())
.apply(options) .apply(options)
.into(view); .into(new SimpleTarget<Drawable>() {
@Override
public void onResourceReady(Drawable drawable, Transition<? super Drawable> transition) {
view.setImageDrawable(drawable);
}
});
} }
/** /**
......
...@@ -8,5 +8,7 @@ ...@@ -8,5 +8,7 @@
<ImageView <ImageView
android:id="@+id/large_image" android:id="@+id/large_image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="167dp" /> android:layout_height="167dp"
android:background="@color/white"
android:scaleType="centerInside" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<dimen name="sp_12">12sp</dimen> <dimen name="sp_12">12sp</dimen>
<dimen name="size_order_item_data_text">24sp</dimen> <dimen name="size_order_item_data_text">24sp</dimen>
<dimen name="size_login_button_text">15sp</dimen> <dimen name="size_login_button_text">15sp</dimen>
<dimen name="size_main_title">60dp</dimen> <dimen name="size_main_title">55dp</dimen>
<dimen name="size_title_ml">13.3dp</dimen> <dimen name="size_title_ml">13.3dp</dimen>
<dimen name="size_login_mlcircleimageview_width">80dp</dimen> <dimen name="size_login_mlcircleimageview_width">80dp</dimen>
<dimen name="size_login_mlcircleimageview_height">80dp</dimen> <dimen name="size_login_mlcircleimageview_height">80dp</dimen>
......
...@@ -200,6 +200,7 @@ ...@@ -200,6 +200,7 @@
<string name="finish_order">已完成</string> <string name="finish_order">已完成</string>
<string name="order_close">订单关闭</string> <string name="order_close">订单关闭</string>
<string name="personal_customer">个人客户</string> <string name="personal_customer">个人客户</string>
<string name="big_personal_customer">大客户</string>
<string name="enterprise_customer">企业客户</string> <string name="enterprise_customer">企业客户</string>
<string name="no_branch">暂无品牌</string> <string name="no_branch">暂无品牌</string>
<string name="no_model">暂无型号</string> <string name="no_model">暂无型号</string>
...@@ -348,6 +349,7 @@ ...@@ -348,6 +349,7 @@
<string name="can_not_repet_get_money">您上次已经收取过客户费用,请勿重新收取!</string> <string name="can_not_repet_get_money">您上次已经收取过客户费用,请勿重新收取!</string>
<string name="process_order_success">提交验收成功</string> <string name="process_order_success">提交验收成功</string>
<string name="signature_name">请先签名!</string> <string name="signature_name">请先签名!</string>
<string name="click_and_signature">点击此处让客户去签名</string>
......
...@@ -76,11 +76,16 @@ public class MultipleProcessPresenter extends MultipleProcessContract.Presenter ...@@ -76,11 +76,16 @@ public class MultipleProcessPresenter extends MultipleProcessContract.Presenter
if (mView.getSelectPayer()) { if (mView.getSelectPayer()) {
mView.showNoPayerDialog(); mView.showNoPayerDialog();
} else { } else {
if (mOrderType == 1) {
mView.showSelectPayerDialog((dialog, confirm) -> { mView.showSelectPayerDialog((dialog, confirm) -> {
if (confirm) { if (confirm) {
commitePhoto(); commitePhoto();
} }
}); });
} else {
commitePhoto();
}
} }
} }
...@@ -191,7 +196,7 @@ public class MultipleProcessPresenter extends MultipleProcessContract.Presenter ...@@ -191,7 +196,7 @@ public class MultipleProcessPresenter extends MultipleProcessContract.Presenter
} }
Integer isPay = detail.getIsPay(); Integer isPay = detail.getIsPay();
Integer payState = detail.getPayStatus(); Integer payState = detail.getPayStatus();
if (isPay == 2 && (payState == 3 || payState == 2)) { if ((isPay != null && isPay == 2) && (payState == 3 || payState == 2)) {
mView.setPayStatus(); mView.setPayStatus();
} }
})); }));
......
package com.dayu.order.ui.activity; package com.dayu.order.ui.activity;
import android.content.Intent; import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Environment; import android.os.Environment;
import android.text.Editable; import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
...@@ -385,10 +387,13 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent ...@@ -385,10 +387,13 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
break; break;
} }
} else if (resultCode == 100) { } else if (resultCode == 100) {
GlideImageLoader.loadNoCache(mActivity, SignatureActivity.path, mIvSignature);
mIvSignature.setVisibility(View.VISIBLE);
mIcon.setVisibility(View.GONE); mIcon.setVisibility(View.GONE);
mIvSignature.setVisibility(View.VISIBLE);
mSignature.setClickable(false); mSignature.setClickable(false);
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 2;
Bitmap bm = BitmapFactory.decodeFile(SignatureActivity.path, options);
mIvSignature.setImageBitmap(bm);
} }
} }
......
...@@ -66,7 +66,7 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act ...@@ -66,7 +66,7 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act
mFragments.add(orderDatailsServeFragment); mFragments.add(orderDatailsServeFragment);
mFragments.add(mOrderPartFragment); mFragments.add(mOrderPartFragment);
mBind.titleBack.setOnClickListener(v -> dumpBack()); mBind.titleBack.setOnClickListener(v -> dumpBack());
if (detail.getCreatedSource() != 2 && detail.getCreatedSource() != 3 && detail.getCreatedSource() != 4) { if (detail.getCreatedSource() ==1) {
mBind.btnPart.setVisibility(View.GONE); mBind.btnPart.setVisibility(View.GONE);
mBind.btnServer.setBackgroundResource(R.drawable.detail_end_selector); mBind.btnServer.setBackgroundResource(R.drawable.detail_end_selector);
} }
......
...@@ -52,8 +52,8 @@ import java.util.ArrayList; ...@@ -52,8 +52,8 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter,LivenessLayoutBinding> public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter, LivenessLayoutBinding>
implements PreviewCallback, DetectionListener, TextureView.SurfaceTextureListener ,OrderLivenessContract.View{ implements PreviewCallback, DetectionListener, TextureView.SurfaceTextureListener, OrderLivenessContract.View {
private TextureView camerapreview; private TextureView camerapreview;
private FaceMask mFaceMask;// 画脸位置的类(调试时会用到) private FaceMask mFaceMask;// 画脸位置的类(调试时会用到)
...@@ -415,7 +415,7 @@ public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter,L ...@@ -415,7 +415,7 @@ public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter,L
boolean isSuccess = resultString.equals( boolean isSuccess = resultString.equals(
getResources().getString(R.string.verify_success)); getResources().getString(R.string.verify_success));
if (isSuccess){ if (isSuccess) {
ArrayList<File> list = new ArrayList<>(); ArrayList<File> list = new ArrayList<>();
byte[] image_best = images.get("image_best"); byte[] image_best = images.get("image_best");
byte[] image_env = images.get("image_env"); byte[] image_env = images.get("image_env");
...@@ -423,8 +423,21 @@ public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter,L ...@@ -423,8 +423,21 @@ public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter,L
list.add(ConUtil.saveJPG(mActivity, image_best, "image_best")); list.add(ConUtil.saveJPG(mActivity, image_best, "image_best"));
list.add(ConUtil.saveJPG(mActivity, image_env, "image_env")); list.add(ConUtil.saveJPG(mActivity, image_env, "image_env"));
list.add(ConUtil.saveJPG(mActivity, image_action1, "image_action1")); list.add(ConUtil.saveJPG(mActivity, image_action1, "image_action1"));
mPresenter.commitePhoto(list,delta); mPresenter.commitePhoto(list, delta);
} else {
checkID(resID);
}
}
private void checkID(int resID) {
if (resID == R.string.liveness_detection_failed_not_video) {
ToastUtils.showShortToast(resID);
} else if (resID == R.string.liveness_detection_failed_timeout) {
ToastUtils.showShortToast(resID);
} else {
ToastUtils.showShortToast(R.string.liveness_detection_failed);
} }
finish();
} }
private int mCurStep = 0;// 检测动作的次数 private int mCurStep = 0;// 检测动作的次数
......
...@@ -31,19 +31,26 @@ public class QrCodeActivity extends DataBindingActivity<QrCodeLayoutBinding> { ...@@ -31,19 +31,26 @@ public class QrCodeActivity extends DataBindingActivity<QrCodeLayoutBinding> {
@Override @Override
public void initView() { public void initView() {
Bundle bundle = getIntent().getBundleExtra(Constants.BUNDLE); Bundle bundle = getIntent().getBundleExtra(Constants.BUNDLE);
if (bundle!=null){ if (bundle != null) {
mType = bundle.getInt(Constants.TYPE, 0); mType = bundle.getInt(Constants.TYPE, 0);
} }
mBind.titleBack.setOnClickListener(v -> { mBind.titleBack.setOnClickListener(v -> goBack());
SpannableString spannableString = new SpannableString(getString(R.string.scan_code_for_appointment_two));
spannableString.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.bg_button)), 3, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
mBind.notice.setText(spannableString);
}
@Override
public void onBackPressed() {
goBack();
}
public void goBack() {
if (mType == 0) { if (mType == 0) {
finish(); finish();
} else { } else {
ARouter.getInstance().build(RouterPath.PATH_MAIN).navigation(); ARouter.getInstance().build(RouterPath.PATH_MAIN).navigation();
EventBus.getDefault().post(new RefreshServe(1)); EventBus.getDefault().post(new RefreshServe(1));
} }
});
SpannableString spannableString = new SpannableString(getString(R.string.scan_code_for_appointment_two));
spannableString.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.bg_button)),3,7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
mBind.notice.setText(spannableString);
} }
} }
...@@ -247,8 +247,13 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi ...@@ -247,8 +247,13 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
} }
if (item.getCreatedSource() == 2 || item.getCreatedSource() == 3 || item.getCreatedSource() == 4) { if (item.getCreatedSource() == 2 || item.getCreatedSource() == 3 || item.getCreatedSource() == 4) {
if (TextUtils.isEmpty(item.getSpus().get(0).getKaSpuName())) {
holder.tvOrderDetail.setText(mContext.getString(R.string.no_server));
} else {
holder.tvOrderDetail.setText(item.getSpus().get(0).getKaSpuName());
}
holder.itemTextWeixiu.setText(item.getSpus().get(0).getProviderTypeName()); holder.itemTextWeixiu.setText(item.getSpus().get(0).getProviderTypeName());
holder.itemTextWeixiuLeixing.setText(item.getSpus().get(0).getKaSpuName()); holder.itemTextWeixiuLeixing.setText(item.getSpus().get(0).getCategoryThreeName());
Spu spu = item.getSpus().get(0); Spu spu = item.getSpus().get(0);
holder.tvServerType.setVisibility(View.VISIBLE); holder.tvServerType.setVisibility(View.VISIBLE);
if (item.getSpus().size() > 1) { if (item.getSpus().size() > 1) {
......
...@@ -70,7 +70,7 @@ public class OrderFourTabAdapter extends CoreAdapter<Order, FragmentOrderCancleI ...@@ -70,7 +70,7 @@ public class OrderFourTabAdapter extends CoreAdapter<Order, FragmentOrderCancleI
helper.serverStyle.setText(result); helper.serverStyle.setText(result);
} else { } else {
String str = UIUtils.getString(R.string.single_server_num); String str = UIUtils.getString(R.string.single_server_num);
String result = String.format(str, spu.getFinNum(), spu.getFinNum()); String result = String.format(str, spu.getFinNum(), spu.getGoodNum());
helper.serverStyle.setText(result); helper.serverStyle.setText(result);
} }
helper.serverStyle.setVisibility(View.VISIBLE); helper.serverStyle.setVisibility(View.VISIBLE);
......
...@@ -70,7 +70,7 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE ...@@ -70,7 +70,7 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
if (item.getCreatedSource() == 4) { if (item.getCreatedSource() == 2 || item.getCreatedSource() == 3 || item.getCreatedSource() == 4) {
if (item.getSpus().size() < 1) { if (item.getSpus().size() < 1) {
return; return;
} }
...@@ -83,7 +83,7 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE ...@@ -83,7 +83,7 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
helper.serverStyle.setText(result); helper.serverStyle.setText(result);
} else { } else {
String str = UIUtils.getString(R.string.single_server_num); String str = UIUtils.getString(R.string.single_server_num);
String result = String.format(str, spu.getFinNum(), spu.getFinNum()); String result = String.format(str, spu.getFinNum(), spu.getGoodNum());
helper.serverStyle.setText(result); helper.serverStyle.setText(result);
} }
helper.serverStyle.setVisibility(View.VISIBLE); helper.serverStyle.setVisibility(View.VISIBLE);
......
...@@ -145,7 +145,7 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD ...@@ -145,7 +145,7 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD
View imgEntryView = inflater.inflate(R.layout.dialog_image, null); View imgEntryView = inflater.inflate(R.layout.dialog_image, null);
final AlertDialog dialog = new AlertDialog.Builder(mActivity).create(); final AlertDialog dialog = new AlertDialog.Builder(mActivity).create();
ImageView img = imgEntryView.findViewById(R.id.large_image); ImageView img = imgEntryView.findViewById(R.id.large_image);
GlideImageLoader.load(mActivity, url, img); GlideImageLoader.loadDrawable(mActivity, url, img);
dialog.setView(imgEntryView); dialog.setView(imgEntryView);
dialog.show(); dialog.show();
imgEntryView.setOnClickListener(paramView -> dialog.cancel()); imgEntryView.setOnClickListener(paramView -> dialog.cancel());
......
...@@ -41,7 +41,7 @@ public class HandWriteView extends View { ...@@ -41,7 +41,7 @@ public class HandWriteView extends View {
private Paint mPaint; private Paint mPaint;
private boolean isSign = false; private boolean isSign = false;
private int mBackColor = Color.WHITE; private int mBackColor = Color.TRANSPARENT;
public HandWriteView(Context context) { public HandWriteView(Context context) {
this(context, null); this(context, null);
......

15.5 KB | W: | H:

25.4 KB | W: | H:

orderCenter/src/main/res/drawable-hdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-hdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-hdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-hdpi/icon_appointment_code.png
  • 2-up
  • Swipe
  • Onion skin

21.5 KB | W: | H:

35.9 KB | W: | H:

orderCenter/src/main/res/drawable-xhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xhdpi/icon_appointment_code.png
  • 2-up
  • Swipe
  • Onion skin

35.6 KB | W: | H:

69.6 KB | W: | H:

orderCenter/src/main/res/drawable-xxhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xxhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xxhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xxhdpi/icon_appointment_code.png
  • 2-up
  • Swipe
  • Onion skin

53.6 KB | W: | H:

104 KB | W: | H:

orderCenter/src/main/res/drawable-xxxhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xxxhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xxxhdpi/icon_appointment_code.png
orderCenter/src/main/res/drawable-xxxhdpi/icon_appointment_code.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
android:layout_height="43dp" android:layout_height="43dp"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:paddingTop="@dimen/dp_17" android:paddingTop="@dimen/dp_17"
android:text="工单概况" android:text="@string/tv_order_eg"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
android:background="@color/bg_button" android:background="@color/bg_button"
android:gravity="center" android:gravity="center"
android:onClick="@{()->presenter.process()}" android:onClick="@{()->presenter.process()}"
android:text="提交验收" android:text="@string/submit_order"
android:textColor="@color/white" /> android:textColor="@color/white" />
</RelativeLayout> </RelativeLayout>
......
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
<TextView <TextView
android:id="@+id/tv_save" android:id="@+id/tv_save"
android:layout_width="345dp" android:layout_width="300dp"
android:layout_height="47dp" android:layout_height="40dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="8dp"
android:layout_marginTop="10dp" android:layout_marginTop="8dp"
android:background="@color/bg_button" android:background="@color/bg_button"
android:text="@string/finish_signature" android:text="@string/finish_signature"
android:gravity="center" android:gravity="center"
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
android:layout_height="43dp" android:layout_height="43dp"
android:paddingLeft="15dp" android:paddingLeft="15dp"
android:paddingTop="@dimen/dp_15" android:paddingTop="@dimen/dp_15"
android:text="工单概况" android:text="@string/tv_order_eg"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:text="接单超时"
android:textColor="@color/cl_order_item_line_bg" android:textColor="@color/cl_order_item_line_bg"
android:textSize="@dimen/size_login_hint_text" android:textSize="@dimen/size_login_hint_text"
android:visibility="visible" /> android:visibility="visible" />
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:text="接单超时"
android:textColor="@color/cl_tab_read" android:textColor="@color/cl_tab_read"
android:textSize="@dimen/size_login_hint_text" android:textSize="@dimen/size_login_hint_text"
android:visibility="visible" /> android:visibility="visible" />
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="18dp" android:layout_marginBottom="18dp"
android:text="服务说明" android:text="@string/order_instruction"
android:textColor="@color/bg_button" android:textColor="@color/bg_button"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
......
...@@ -241,19 +241,6 @@ ...@@ -241,19 +241,6 @@
android:text="@string/tv_order_yuan" android:text="@string/tv_order_yuan"
android:textColor="@color/cl_tab_line" android:textColor="@color/cl_tab_line"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
<TextView
android:layout_width="match_parent"
android:layout_height="43dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="104dp"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_17"
android:text="收取费用"
android:textColor="@color/tv_cl"
android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<ImageView <ImageView
...@@ -364,7 +351,7 @@ ...@@ -364,7 +351,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:text="总金额" android:text="@string/total_price"
android:textColor="@color/cl_tab_line" android:textColor="@color/cl_tab_line"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -427,7 +414,7 @@ ...@@ -427,7 +414,7 @@
android:layout_height="43dp" android:layout_height="43dp"
android:paddingLeft="@dimen/dp_15" android:paddingLeft="@dimen/dp_15"
android:paddingTop="18dp" android:paddingTop="18dp"
android:text="电子签名" android:text="@string/electronic_signature"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -455,7 +442,7 @@ ...@@ -455,7 +442,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableLeft="@drawable/icon_edit" android:drawableLeft="@drawable/icon_edit"
android:text="点击此处让客户去签名" android:text="@string/click_and_signature"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -463,6 +450,8 @@ ...@@ -463,6 +450,8 @@
android:id="@+id/iv_signature" android:id="@+id/iv_signature"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#FFFFFF"
android:scaleType="centerInside"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="15sp" android:layout_marginRight="15sp"
android:text='@{item.status==1?"处理":"已完成"}' android:text='@{item.status==1?@string/process:@string/order_finish}'
android:textColor="@color/bg_button" android:textColor="@color/bg_button"
android:textSize="@dimen/sp_14" /> android:textSize="@dimen/sp_14" />
</RelativeLayout> </RelativeLayout>
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="110dp" android:layout_width="wrap_content"
android:layout_height="110dp" android:layout_height="wrap_content"
android:layout_marginTop="100dp" android:layout_marginTop="100dp"
android:src="@drawable/icon_appointment_code" /> android:src="@drawable/icon_appointment_code" />
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginTop="18dp" android:layout_marginTop="18dp"
android:text='@{item.customerType==1?"个人客户":"大客户"}' android:text='@{item.customerType==1?@string/personal_customer:@string/big_personal_customer}'
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12" android:layout_marginLeft="@dimen/dp_12"
android:layout_weight="1" android:layout_weight="1"
android:text="【系统验收】"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_14" /> android:textSize="@dimen/sp_14" />
...@@ -49,7 +48,6 @@ ...@@ -49,7 +48,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_10" android:layout_marginRight="@dimen/dp_10"
android:text="2017-08-04 14:47"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_12" /> android:textSize="@dimen/sp_12" />
...@@ -62,7 +60,6 @@ ...@@ -62,7 +60,6 @@
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:layout_marginLeft="@dimen/dp_20" android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
android:text="系统进行了验收费"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="12sp" /> android:textSize="12sp" />
...@@ -72,7 +69,6 @@ ...@@ -72,7 +69,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10" android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_20" android:layout_marginLeft="@dimen/dp_20"
android:text="预约时间:2017-12-11 18:30:00"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="12sp" /> android:textSize="12sp" />
...@@ -83,7 +79,6 @@ ...@@ -83,7 +79,6 @@
android:layout_height="22dp" android:layout_height="22dp"
android:gravity="center" android:gravity="center"
android:layout_marginLeft="@dimen/dp_20" android:layout_marginLeft="@dimen/dp_20"
android:text="查看请"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_12" /> android:textSize="@dimen/sp_12" />
</LinearLayout> </LinearLayout>
......
...@@ -20,8 +20,4 @@ public class RouterPath { ...@@ -20,8 +20,4 @@ public class RouterPath {
public final static String PATH_ORDER_HISTORY = "/order/history"; public final static String PATH_ORDER_HISTORY = "/order/history";
/**
* 用户模块.
*/
public final static String PATH_USER_FACE = "/user/face";
} }
...@@ -2,7 +2,6 @@ package com.dayu.usercenter.presenter.login; ...@@ -2,7 +2,6 @@ package com.dayu.usercenter.presenter.login;
import com.dayu.base.ui.presenter.BasePresenter; import com.dayu.base.ui.presenter.BasePresenter;
import com.dayu.event.UserInfo;
import com.dayu.common.BaseView; import com.dayu.common.BaseView;
import com.dayu.widgets.listener.OnCloseListener; import com.dayu.widgets.listener.OnCloseListener;
...@@ -54,11 +53,10 @@ public interface LoginContract { ...@@ -54,11 +53,10 @@ public interface LoginContract {
public abstract void loginHx(String hxAccount, String hxPwd); public abstract void loginHx(String hxAccount, String hxPwd);
/** /**
* 跳转到主界面并保存用户信息. * 跳转到主界面.
* *
* @param info
*/ */
public abstract void dumpAndSave(UserInfo info); public abstract void dump();
public abstract void getUserInfo(int accountId); public abstract void getUserInfo(int accountId);
......
...@@ -5,11 +5,9 @@ import android.text.TextUtils; ...@@ -5,11 +5,9 @@ import android.text.TextUtils;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
import com.dayu.common.BaseApplication; import com.dayu.common.BaseApplication;
import com.dayu.event.UserInfo;
import com.dayu.provider.router.RouterPath; import com.dayu.provider.router.RouterPath;
import com.dayu.usercenter.R; import com.dayu.usercenter.R;
import com.dayu.usercenter.api.UserApiFactory; import com.dayu.usercenter.api.UserApiFactory;
import com.dayu.usercenter.data.protocol.EngineerInfo;
import com.dayu.usercenter.ui.activity.AgreementActivity; import com.dayu.usercenter.ui.activity.AgreementActivity;
import com.dayu.usercenter.ui.activity.IdentityCertificationActivity; import com.dayu.usercenter.ui.activity.IdentityCertificationActivity;
import com.dayu.utils.LogUtils; import com.dayu.utils.LogUtils;
...@@ -22,8 +20,6 @@ import com.hyphenate.EMCallBack; ...@@ -22,8 +20,6 @@ import com.hyphenate.EMCallBack;
import com.hyphenate.chat.EMClient; import com.hyphenate.chat.EMClient;
import com.umeng.analytics.MobclickAgent; import com.umeng.analytics.MobclickAgent;
import io.reactivex.functions.Consumer;
/** /**
* Created by luofan * Created by luofan
* on 2017/11/8. * on 2017/11/8.
...@@ -76,17 +72,13 @@ public class LoginPresenter extends LoginContract.Presenter { ...@@ -76,17 +72,13 @@ public class LoginPresenter extends LoginContract.Presenter {
UserApiFactory.login(userName.get(), password.get()).subscribe(baseObserver(userInfo -> { UserApiFactory.login(userName.get(), password.get()).subscribe(baseObserver(userInfo -> {
if (userInfo.getDetectStatus() == 1) { if (userInfo.getDetectStatus() == 1) {
loginHx(userInfo.getHxAccount(), userInfo.getHxPwd()); loginHx(userInfo.getHxAccount(), userInfo.getHxPwd());
dumpAndSave(userInfo); UserManager.getInstance().saveUser(userInfo);
mView.showDialog();
getUserInfo(Integer.parseInt(userInfo.getAccountId())); getUserInfo(Integer.parseInt(userInfo.getAccountId()));
} } else if (userInfo.getDetectStatus() == 2 || userInfo.getDetectStatus() == 3) {
// else if (userInfo.getDetectStatus() == 2) {
// ToastUtils.showShortToast(R.string.engineer_identity_auditing);
// UserManager.getInstance().saveUser(userInfo);
// }
else if (userInfo.getDetectStatus() == 2 || userInfo.getDetectStatus() == 3) {
showLoginDialog(); showLoginDialog();
UserManager.getInstance().saveUser(userInfo); UserManager.getInstance().saveUser(userInfo);
}else { } else {
ToastUtils.showShortToast(UIUtils.getString(R.string.login_faile)); ToastUtils.showShortToast(UIUtils.getString(R.string.login_faile));
} }
})); }));
...@@ -123,19 +115,15 @@ public class LoginPresenter extends LoginContract.Presenter { ...@@ -123,19 +115,15 @@ public class LoginPresenter extends LoginContract.Presenter {
} }
@Override @Override
public void dumpAndSave(UserInfo info) { public void dump() {
UserManager.getInstance().saveUser(info);
ARouter.getInstance().build(RouterPath.PATH_MAIN).navigation(); ARouter.getInstance().build(RouterPath.PATH_MAIN).navigation();
// mView.startActivity(TestActivity.class);
} }
@Override @Override
public void getUserInfo(int accountId) { public void getUserInfo(int accountId) {
UserApiFactory.getEngineerInfo(accountId).subscribe(baseObserver(new Consumer<EngineerInfo>() { UserApiFactory.getEngineerInfo(accountId).subscribe(baseObserver(engineerInfo -> {
@Override
public void accept(EngineerInfo engineerInfo) throws Exception {
SPUtils.put("USER_IDENTITY", engineerInfo.getIdentity()); SPUtils.put("USER_IDENTITY", engineerInfo.getIdentity());
} dump();
})); }));
} }
......
...@@ -7,10 +7,8 @@ import android.os.Bundle; ...@@ -7,10 +7,8 @@ import android.os.Bundle;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.dayu.base.ui.activity.BaseActivity; import com.dayu.base.ui.activity.BaseActivity;
import com.dayu.common.Constants; import com.dayu.common.Constants;
import com.dayu.provider.router.RouterPath;
import com.dayu.usercenter.R; import com.dayu.usercenter.R;
import com.dayu.usercenter.common.UserConstant; import com.dayu.usercenter.common.UserConstant;
import com.dayu.usercenter.databinding.ActivityFaceCertificationBinding; import com.dayu.usercenter.databinding.ActivityFaceCertificationBinding;
...@@ -35,7 +33,6 @@ import static android.os.Build.VERSION_CODES.M; ...@@ -35,7 +33,6 @@ import static android.os.Build.VERSION_CODES.M;
* Created by luofan * Created by luofan
* on 2018/5/10. * on 2018/5/10.
*/ */
@Route(path = RouterPath.PATH_USER_FACE)
public class FaceCertificationActivity extends BaseActivity<FaceCertificaitonPresenter, ActivityFaceCertificationBinding> public class FaceCertificationActivity extends BaseActivity<FaceCertificaitonPresenter, ActivityFaceCertificationBinding>
implements FaceCertificaitonContract.View { implements FaceCertificaitonContract.View {
private String uuid; private String uuid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment