新路交接口替换
This commit is contained in:
parent
f5e24e2273
commit
d8f80ad07d
@ -55,15 +55,15 @@ class MessagePop(context: Context) : CenterPopupView(context), View.OnClickListe
|
||||
}
|
||||
R.id.tvOk,R.id.tvPhone -> {
|
||||
dismiss()
|
||||
if (XPermission.create(context).isGranted(Manifest.permission.CALL_PHONE)){
|
||||
// if (XPermission.create(context).isGranted(Manifest.permission.CALL_PHONE)){
|
||||
val toString = tvPhone.text.toString()
|
||||
val intent = Intent(Intent.ACTION_DIAL)
|
||||
val data = Uri.parse("tel:$toString")
|
||||
intent.data = data
|
||||
context.startActivity(intent)
|
||||
}else{
|
||||
ToastUtils.showToast(context,"请开启电话权限")
|
||||
}
|
||||
// }else{
|
||||
// ToastUtils.showToast(context,"请开启电话权限")
|
||||
// }
|
||||
|
||||
// BaseUtils.callPhone(content as Activity, tvPhone.text.toString())
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public class BaseObserver<T> implements Observer<CommonResponseBean<T>> {
|
||||
|
||||
@Override
|
||||
public void onNext(CommonResponseBean<T> tCommonResponseBean) {
|
||||
if (0==tCommonResponseBean.getCode()) {
|
||||
if ("0".equals(tCommonResponseBean.getCode())) {
|
||||
mRxHttpCallBack.onSuccess(tCommonResponseBean);
|
||||
} else {
|
||||
mRxHttpCallBack.onCodeError(mContext, tCommonResponseBean);
|
||||
|
@ -86,7 +86,7 @@ public abstract class RxHttpCallBack<T> {
|
||||
dialog.dismiss();
|
||||
|
||||
}
|
||||
if (t.getCode() == 401) {
|
||||
if (t.getCode() == "401") {
|
||||
UiAuxiliary.delLogin(mContext);
|
||||
Intent intent = new Intent(mContext, MainActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
|
@ -32,6 +32,7 @@ import com.arpa.hndahesudintocctmsdriver.request.net.BaseObserver;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.net.DataManager;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.net.RxHttpCallBack;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.NewLJUtils;
|
||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
@ -100,6 +101,8 @@ public class LoginActivity extends BaseActivity {
|
||||
Log.e("--登录信息--", new Gson().toJson(loginBean));
|
||||
AppInfoBean appInfoBean = new AppInfoBean();
|
||||
if (loginBean.getCode() == 200) {
|
||||
//获取新路交token
|
||||
NewLJUtils.getInstance().getToken(con);
|
||||
SPUtil.insSP(con, USER, USER_TOKEN, loginBean.getData().getToken());
|
||||
SPUtil.insSP(con, USER, USER_UNAME, loginBean.getData().getUname());
|
||||
SPUtil.insSP(con, USER, USER_RNAME, loginBean.getData().getRname());
|
||||
|
@ -236,7 +236,6 @@ public class MyFragment extends BaseFragment {
|
||||
});
|
||||
//联系我们
|
||||
onContact.setOnClickListener(v -> {
|
||||
NewLJUtils.getInstance().getToken(con);
|
||||
String serviceMobile = "";
|
||||
if (ConfigParts.getConfigParts(con) != null) {
|
||||
serviceMobile = ConfigParts.getConfigParts(con).getData().getServiceMobile();
|
||||
|
@ -8,7 +8,7 @@ import java.io.Serializable;
|
||||
|
||||
public class CommonResponseBean<T> implements Serializable {
|
||||
private T data;
|
||||
private int code;
|
||||
private String code;
|
||||
private String info;
|
||||
private String msg;
|
||||
private String message;
|
||||
@ -59,11 +59,11 @@ public class CommonResponseBean<T> implements Serializable {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user