Merge branch 'master' into newlj
This commit is contained in:
commit
781e58ab44
@ -80,6 +80,12 @@ public class UserRequset {
|
|||||||
RequestUtil.start(1, "userdata", re, con, hd);
|
RequestUtil.start(1, "userdata", re, con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//账户信息
|
||||||
|
public void User2() {
|
||||||
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUserUrl(), ""), getToken(con), con);
|
||||||
|
RequestUtil.start(1, "userdata2", re, con, hd);
|
||||||
|
}
|
||||||
|
|
||||||
//司机认证信息
|
//司机认证信息
|
||||||
public void driverAuthData() {
|
public void driverAuthData() {
|
||||||
String mt = "{}";
|
String mt = "{}";
|
||||||
|
@ -8,11 +8,14 @@ import android.widget.Button;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName FaceSuccActivity
|
* @ClassName FaceSuccActivity
|
||||||
* @Author john
|
* @Author john
|
||||||
@ -31,15 +34,17 @@ public class FaceSuccActivity extends BaseAppCompatActivity {
|
|||||||
Button btnHome = findViewById(R.id.btnHome);
|
Button btnHome = findViewById(R.id.btnHome);
|
||||||
Button btnAddCar = findViewById(R.id.btnAddCar);
|
Button btnAddCar = findViewById(R.id.btnAddCar);
|
||||||
boolean isGoCar = getIntent().getBooleanExtra("isGoCar", false);
|
boolean isGoCar = getIntent().getBooleanExtra("isGoCar", false);
|
||||||
if (isGoCar){
|
if (isGoCar) {
|
||||||
btnHome.setText("返回首页");
|
btnHome.setText("返回首页");
|
||||||
btnAddCar.setVisibility(View.VISIBLE);
|
btnAddCar.setVisibility(View.VISIBLE);
|
||||||
}else{
|
} else {
|
||||||
btnHome.setText("返回");
|
btnHome.setText("返回");
|
||||||
btnAddCar.setVisibility(View.GONE);
|
btnAddCar.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
btnHome.setOnClickListener(v -> finish());
|
btnHome.setOnClickListener(v -> {
|
||||||
|
finish();
|
||||||
|
});
|
||||||
btnAddCar.setOnClickListener(v -> {
|
btnAddCar.setOnClickListener(v -> {
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
in.putExtra("index", 2);
|
in.putExtra("index", 2);
|
||||||
@ -48,4 +53,10 @@ public class FaceSuccActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
EventBus.getDefault().post(new PersonEvent("刷脸成功"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,15 +75,15 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
switch (m.what) {
|
switch (m.what) {
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get("userdata") != null) {
|
if (CacheGroup.cacheList.get("userdata2") != null) {
|
||||||
ub = gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
ub = gson.fromJson(CacheGroup.cacheList.get("userdata2"), UserBean.class);
|
||||||
if (ub.getCode() == 200) {
|
if (ub.getCode() == 200) {
|
||||||
initView(ub);
|
initView(ub);
|
||||||
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("userdata");
|
CacheGroup.cacheList.remove("userdata2");
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("upload") != null) {
|
if (CacheGroup.cacheList.get("upload") != null) {
|
||||||
upb = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
upb = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||||
@ -222,10 +222,15 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
hyr = new HuoYuanRequset(con, hd);
|
hyr = new HuoYuanRequset(con, hd);
|
||||||
ur = new UserRequset(con, hd);
|
ur = new UserRequset(con, hd);
|
||||||
ur.User();
|
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
ur.User2();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
@ -249,7 +254,7 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
public void personResult(PersonEvent home) {
|
public void personResult(PersonEvent home) {
|
||||||
Log.e("-res-", home.getMessage());
|
Log.e("-res-", home.getMessage());
|
||||||
if (ur != null) {
|
if (ur != null) {
|
||||||
ur.User();
|
ur.User2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ import com.arpa.hndahesudintocctmsdriver.util.NewLJUtils;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.dahe.mylibrary.utils.ImageLoader;
|
import com.dahe.mylibrary.utils.ImageLoader;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
|
|
||||||
@ -53,6 +54,7 @@ import com.permissionx.guolindev.PermissionX;
|
|||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -346,11 +348,19 @@ public class MyFragment extends BaseFragment {
|
|||||||
ur.vehicleList("1");
|
ur.vehicleList("1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void personResult(PersonEvent home) {
|
public void personResult(PersonEvent home) {
|
||||||
Log.e("-res-", home.getMessage());
|
Log.e("-res-", home.getMessage());
|
||||||
if (ur != null) {
|
if (ur != null) {
|
||||||
ur.User();
|
ur.User();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
if (ur != null) {
|
||||||
|
ur.User();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user