提升app更新弹窗未最高等级
This commit is contained in:
parent
866a46a7cb
commit
40d344e245
@ -68,6 +68,7 @@ import com.google.gson.Gson;
|
||||
import com.gyf.cactus.Cactus;
|
||||
import com.hjq.xtoast.XToast;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BasePopupView;
|
||||
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||
@ -101,6 +102,7 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.lxj.xpopup.interfaces.SimpleCallback;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.BannerConfig;
|
||||
@ -151,6 +153,8 @@ public class HomeFragment extends BaseFragment {
|
||||
|
||||
private XToast xToast;
|
||||
|
||||
private boolean isUpAppShow = false;
|
||||
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@ -239,6 +243,19 @@ public class HomeFragment extends BaseFragment {
|
||||
new XPopup.Builder(con)
|
||||
.dismissOnBackPressed(false)
|
||||
.dismissOnTouchOutside(false)
|
||||
.setPopupCallback(new SimpleCallback() {
|
||||
@Override
|
||||
public void onShow(BasePopupView popupView) {
|
||||
super.onShow(popupView);
|
||||
isUpAppShow = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(BasePopupView popupView) {
|
||||
super.onDismiss(popupView);
|
||||
isUpAppShow = false;
|
||||
}
|
||||
})
|
||||
.asCustom(new UpAppAlert(con, uab.getData().getDownloadUrl(), uab.getData().getContent(), uab.getData().getVersion(), uab.getData().getForce()))
|
||||
.show();
|
||||
}
|
||||
@ -258,8 +275,13 @@ public class HomeFragment extends BaseFragment {
|
||||
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
||||
DriverAuthDataBean dad = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
||||
if (dad.getCode() == 200) {
|
||||
if (isUpAppShow) {
|
||||
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dad.getData() == null) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!","去添加", () -> {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!", "去添加", () -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 0);
|
||||
startActivity(in);
|
||||
@ -268,19 +290,19 @@ public class HomeFragment extends BaseFragment {
|
||||
return;
|
||||
}
|
||||
if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getIdcard())) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!", "去添加",() -> {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!", "去添加", () -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 0);
|
||||
startActivity(in);
|
||||
});
|
||||
} else if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getCardNo())) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少银行卡,未认证无法接单。是否去添加!", "去添加",() -> {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少银行卡,未认证无法接单。是否去添加!", "去添加", () -> {
|
||||
Intent in333 = new Intent(con, UpBankActivity.class);
|
||||
in333.putExtra("type", 1);
|
||||
startActivity(in333);
|
||||
});
|
||||
} else if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getDriverLicense())) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少驾驶证,未认证无法接单。是否去添加!", "去添加",() -> {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少驾驶证,未认证无法接单。是否去添加!", "去添加", () -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 0);
|
||||
startActivity(in);
|
||||
@ -1280,7 +1302,7 @@ public class HomeFragment extends BaseFragment {
|
||||
refreshWaybills();
|
||||
}
|
||||
|
||||
private void refreshWaybills(){
|
||||
private void refreshWaybills() {
|
||||
// if (UiAuxiliary.isLogin(con)) {
|
||||
// int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
||||
// hyr.startOrder(curWaybillId == -1 ? 0 : curWaybillId);
|
||||
|
Loading…
Reference in New Issue
Block a user