lizhanwei
2020-04-16 d3fcef0d3d3b7c6c7380c4343f8d061a2766eee2
app/src/main/java/safeluck/drive/evaluation/fragment/NetWorkTrainFragment.java
@@ -21,6 +21,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import androidx.work.OneTimeWorkRequest;
@@ -58,11 +59,15 @@
import safeluck.drive.evaluation.cEventCenter.ICEventListener;
import safeluck.drive.evaluation.customview.ArrowView;
import safeluck.drive.evaluation.customview.HouseView;
import safeluck.drive.evaluation.customview.LoadProgressDialog;
import safeluck.drive.evaluation.customview.MyDialogFragment;
import safeluck.drive.evaluation.customview.QRCodeDialog;
import safeluck.drive.evaluation.httpmodule.RetrofitCreator;
import safeluck.drive.evaluation.im.MessageProcessor;
import safeluck.drive.evaluation.platformMessage.JKMessage0201;
import safeluck.drive.evaluation.platformMessage.JKMessage0202;
import safeluck.drive.evaluation.platformMessage.JKMessage0204;
import safeluck.drive.evaluation.platformMessage.PlatFormConstant;
import safeluck.drive.evaluation.util.Utils;
import safeluck.drive.evaluation.viewmodels.TimeViewModel;
@@ -108,6 +113,8 @@
    public static SupportFragment newInstance() {
        return new NetWorkTrainFragment();
    }
    private Handler mHandler = new Handler(new Handler.Callback() {
@@ -586,9 +593,8 @@
    }
private LoadProgressDialog loadProgressDialog;
MyDialogFragment myDialogFragment;
    SimulateNightBean simulateNightBean = null;
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
@@ -642,13 +648,20 @@
                break;
            case R.id.btn_return:
                _mActivity.onBackPressed();
//                _mActivity.onBackPressed();
                QRCodeDialog qrCodeDialog = QRCodeDialog.newInstance("f");
                qrCodeDialog.setStyle(DialogFragment.STYLE_NORMAL,R.style.Dialog_FullScreen);
                qrCodeDialog.show(getFragmentManager(),"qrcode");
                break;
            case R.id.iv_head:
                MyLog.i(TAG,"签到,获取身份证物理卡号");
                AYSdk.getInstance().sendCmd(Constant.READ_PHYSICAL_ID,"");
                MyLog.i(PlatFormConstant.HTTPTAG,"签到");
//                AYSdk.getInstance().sendCmd(Constant.READ_PHYSICAL_ID,"");
                //TODO 获得物理卡号 发送JKMessage0201给平台,获取姓名、身份证、head_url
                loadProgressDialog = LoadProgressDialog.newInstance("请稍后...");
                loadProgressDialog.setStyle(DialogFragment.STYLE_NORMAL,R.style.Dialog_FullScreen);
                loadProgressDialog.showNow(getFragmentManager(),"loadingdiaolog");
                //从服务器获取用于生成签到二维码的url
                break;
        }
    }
@@ -756,4 +769,6 @@
        super.onDetach();
        CEventCenter.onBindEvent(false,icEventListener,Constant.BIND_SPEED_TOPIC);
    }
}