@@ -235,22 +235,23 @@ public class MyRetrofit implements ToastAction { | |||
public static void newInstanceGZ(Activity context, Boolean start, String code, Object bean, ReturnResult result) { | |||
LinkedTreeMap<String, Object> linkedTreeMap = JSONObject.parseObject(new Gson().toJson(bean), LinkedTreeMap.class); | |||
if (!"iaw/app/issue/generalAudit/query".equals(code)) { | |||
if (IFCode.IFCODE_BLACKLISTQUERY.equals(code)){ | |||
linkedTreeMap.put("openId", "972e9cd0690d470f9899196e72e8b9ee"); | |||
}else { | |||
linkedTreeMap.put("openId", (String) MyShared.getInstance().get(MyShared.OPENID, "")); | |||
} | |||
}else { | |||
} | |||
// if (!"iaw/app/issue/generalAudit/query".equals(code)) { | |||
// if (IFCode.IFCODE_BLACKLISTQUERY.equals(code)){ | |||
// linkedTreeMap.put("openId", "972e9cd0690d470f9899196e72e8b9ee"); | |||
// }else { | |||
// linkedTreeMap.put("openId", (String) MyShared.getInstance().get(MyShared.OPENID, "")); | |||
// } | |||
// }else { | |||
// | |||
// } | |||
linkedTreeMap.put("loginSource", Constants.LOGIN_SOURCE); | |||
linkedTreeMap.put("agentId", MyShared.getInstance().get(MyShared.AGENCYID, "")); | |||
linkedTreeMap.put("channelId", MyShared.getInstance().get(MyShared.CHANNELID, "")); | |||
linkedTreeMap.put("channelType", "1"); | |||
linkedTreeMap.put("opId", MyShared.getInstance().get(MyShared.OPENID, "")); | |||
// linkedTreeMap.put("agentId", MyShared.getInstance().get(MyShared.AGENCYID, "")); | |||
// linkedTreeMap.put("channelId", MyShared.getInstance().get(MyShared.CHANNELID, "")); | |||
// linkedTreeMap.put("channelType", "1"); | |||
// linkedTreeMap.put("opId", MyShared.getInstance().get(MyShared.OPENID, "")); | |||
linkedTreeMap.put("accessToken", MyShared.getInstance().get(MyShared.ACCESSTOKEN, "")); | |||
linkedTreeMap.put("staffId", MyShared.getInstance().get(MyShared.STAFFID, "")); | |||
linkedTreeMap.put("terminalId", "999999999999"); | |||
// linkedTreeMap.put("terminalId", "999999999999"); | |||
// RequestParameters parameters = new RequestParameters(code, new Gson().toJson(linkedTreeMap)); | |||
// if (code.equals(IFCode.IFCODE148)){ | |||
// linkedTreeMap.put("agentId", "123"); |
@@ -99,7 +99,7 @@ public class IFCode { | |||
public static final String IFCODE30 = "30"; //获取所有的快递公司信息 | |||
public static final String IFCODE31 = "iaw/issue/order/orderDeliverGoods"; //订单发货录入 | |||
public static final String IFCODE35 = "iaw/app/issue/plateCheck/check"; //车牌校验 | |||
public static final String IFCODE36 = "iaw/issue/order/queryPage"; //订单分页查询 | |||
public static final String IFCODE36 = "iaw/issue/order/aOrderPage";//"iaw/issue/order/queryPage"; //订单分页查询 | |||
public static final String IFCODE530 = "530"; //订单分页查询 | |||
public static final String IFCODE48 = "48"; //根据订单编号获取可选择产品信息 | |||
// public static final String IFCODE_PRODUCTGET = "f01002fa6ded4162afaec1139e503641";//产品查询 |
@@ -74,17 +74,17 @@ public class CodeChangeInterceptor implements Interceptor { | |||
linkedTreeMap = null; | |||
} | |||
if (linkedTreeMap != null && "401002".equals(linkedTreeMap.get("code") + "")) {//token失效处理 | |||
refreshToken(new RefreshTokenCallback() { | |||
@Override | |||
public void success(String token) { | |||
freshTokenUrl = newRequest.newBuilder().header("Access-Token", token).build(); | |||
} | |||
@Override | |||
public void fail() { | |||
freshTokenUrl = null; | |||
} | |||
}); | |||
// refreshToken(new RefreshTokenCallback() { | |||
// @Override | |||
// public void success(String token) { | |||
// freshTokenUrl = newRequest.newBuilder().header("Access-Token", token).build(); | |||
// } | |||
// | |||
// @Override | |||
// public void fail() { | |||
// freshTokenUrl = null; | |||
// } | |||
// }); | |||
if (null != freshTokenUrl) { | |||
return chain.proceed(freshTokenUrl); | |||
}else { |
@@ -100,6 +100,7 @@ public class EditPwdActivity extends AppActivity { | |||
params.put("password", oldPwd); | |||
// params.put("mobile", MyShared.getInstance().get(MyShared.STAFFID,"")+""); | |||
params.put("newPassword", newPwd); | |||
params.put("accessToken",MyShared.getInstance().get(MyShared.ACCESSTOKEN,"")+""); | |||
params.put("affirmNewPassword", newAgainPwd); | |||
MyRetrofit.newInstanceGZ(this,IFCode.IFCODE94, params, new MyRetrofit.ReturnResult() { | |||
@Override |
@@ -44,6 +44,7 @@ public class ForgetPwdStep2Activity extends AppActivity { | |||
protected void initView() { | |||
LiveEventBus.get("countDownFinish", Boolean.class) .observe(this, s -> {//倒计时结束 | |||
clearCountDown(true); | |||
binding.tvCountDownTime.setEnabled(true); | |||
}); | |||
phone = getIntent().getStringExtra("phone"); | |||
@@ -61,6 +62,32 @@ public class ForgetPwdStep2Activity extends AppActivity { | |||
sendCode(); | |||
} | |||
}); | |||
binding.verPwd.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
binding.verPwd.getEditText().requestFocus(); | |||
} | |||
}); | |||
binding.verPwd.getEditText().setOnFocusChangeListener(new View.OnFocusChangeListener() { | |||
@Override | |||
public void onFocusChange(View view, boolean b) { | |||
Log.e("状态",b+""); | |||
if (b){ | |||
FunHelper.showInputMethod(binding.verPwd.getEditText(),ForgetPwdStep2Activity.this); | |||
}else { | |||
FunHelper.closeKeyboard(binding.verPwd.getEditText()); | |||
} | |||
} | |||
}); | |||
binding.lyContent.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
binding.lyContent.requestFocus(); | |||
} | |||
}); | |||
} | |||
@Override | |||
@@ -100,6 +127,7 @@ public class ForgetPwdStep2Activity extends AppActivity { | |||
showDialog("发送中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("mobile", phone); | |||
params.put("businessType","2");//businessType 0-登录 1-注册 2-忘记密码 3-修改手机号 | |||
MyRetrofit.newInstanceGZ(this,IFCode.IFCODE2, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
@@ -123,6 +151,7 @@ public class ForgetPwdStep2Activity extends AppActivity { | |||
if (end_second <= 0) return; | |||
codeCountDownTimer = new CountDownTimerUtils(this, null,null,null,binding.tvCountDownTime, end_second, 1000, false); | |||
codeCountDownTimer.start(); | |||
binding.tvCountDownTime.setEnabled(false); | |||
} | |||
/* |
@@ -2,6 +2,8 @@ | |||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
style="@style/MatchMatch.Vertical" | |||
android:focusableInTouchMode="true" | |||
android:id="@+id/ly_content" | |||
android:background="@color/background_color"> | |||
<com.hjq.bar.TitleBar | |||
@@ -41,11 +43,11 @@ | |||
style="@style/MatchWrap" | |||
android:layout_marginTop="@dimen/dp_20" | |||
android:layout_marginHorizontal="@dimen/dp_15" | |||
android:paddingBottom="15dp" | |||
app:icv_et_bg_focus="@drawable/shape_icv_et_bg_focus" | |||
app:icv_et_bg_normal="@drawable/shape_icv_et_bg_normal" | |||
app:icv_et_divider_drawable="@drawable/shape_divider_identifying" | |||
app:icv_et_number="6" | |||
android:focusable="true" | |||
app:icv_et_pwd="false" | |||
app:icv_et_pwd_radius="3dp" | |||
app:icv_et_text_color="@color/common_accent_color" |