Quellcode durchsuchen

'2023年3月28日15:57:45'

master
wq vor 2 Jahren
Ursprung
Commit
5c8215f4c2

+ 1
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/bean/IFCode.java Datei anzeigen

@@ -70,6 +70,7 @@ public class IFCode {
public static final String IFCODE2 = "2"; //统一会员平台发送验证码接口
public static final String IFCODE94 = "94"; //8.8.统一会员平台个人账号修改密码以旧换新接口
public static final String IFCODE4 = "4"; //登录
public static final String IFCODE66 = "66"; //登录
public static final String IFCODE5 = "5"; //通过code换取appid
public static final String IFCODE6 = "6"; //创建订单
public static final String IFCODE7 = "7"; //取消订单

+ 8
- 3
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/mail/ListDeliveryActivity.java Datei anzeigen

@@ -71,10 +71,15 @@ public class ListDeliveryActivity extends AppActivity implements OnRefreshLoadMo
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
int totalSize = Integer.parseInt(bizContent.getTotalCount()); // 获取总的数据条数
if (bizContent.getData() == null) {
showEmpty();
return;
}

if (Page == 1) {
adapter.replaceData(bizContent.getData());
} else {
if (!FunHelper.isEmpty(bizContent.getData())){
if (!FunHelper.isEmpty(bizContent.getData())) {
adapter.addData(bizContent.getData());
}
}
@@ -84,9 +89,9 @@ public class ListDeliveryActivity extends AppActivity implements OnRefreshLoadMo
showComplete();
}

if (adapter.getData().size() >= totalSize){
if (adapter.getData().size() >= totalSize) {
hasMore = false;
}else{
} else {
hasMore = true;
}
}

+ 22
- 11
app/src/main/java/com/huntersun/vkyes/etcopencard/project/utils/SearchCarInfoUtils.java Datei anzeigen

@@ -42,7 +42,7 @@ public class SearchCarInfoUtils {
private LinearLayout LLQuote;
private Button btnSearch;
private Button btnBlue, btnYellow, btnBlack, btnWhite, btnYellowGreen, btnGreen;
private LinearLayout LLBlue, LLYellow, LLBlack, LLWhite, LLYellowGreen, LLGreen,LLInputView,LLColorLayout;
private LinearLayout LLBlue, LLYellow, LLBlack, LLWhite, LLYellowGreen, LLGreen, LLInputView, LLColorLayout, Operation;
private ImageView ivExpand;

//传进来的数据
@@ -93,7 +93,7 @@ public class SearchCarInfoUtils {
initId();
}

public SearchCarInfoUtils(String vehiclePlate,String PlateColor,AppActivity mContext, OnSearchResultClick callback) {
public SearchCarInfoUtils(String vehiclePlate, String PlateColor, AppActivity mContext, OnSearchResultClick callback) {
this.vehiclePlate = vehiclePlate;
this.PlateColor = PlateColor;
this.mContext = mContext;
@@ -116,14 +116,15 @@ public class SearchCarInfoUtils {

/**
* 设置展开还是收缩
*
* @param isShowExpand
* @param isExpand
*/
public void setExpandParams(boolean isShowExpand,boolean isExpand) {
public void setExpandParams(boolean isShowExpand, boolean isExpand) {
this.isShowExpand = isShowExpand;
this.isExpand = isExpand;
ivExpand.setVisibility(isShowExpand ? View.VISIBLE : View.GONE);
if (isShowExpand){
if (isShowExpand) {
LLInputView.setVisibility(isExpand ? View.VISIBLE : View.GONE);
LLColorLayout.setVisibility(isExpand ? View.VISIBLE : View.GONE);
ivExpand.setImageResource(isExpand ? R.mipmap.icon_up_grey : R.mipmap.icon_down_grey);
@@ -150,6 +151,7 @@ public class SearchCarInfoUtils {
LLInputView = mContext.findViewById(R.id.LLInputView);
LLColorLayout = mContext.findViewById(R.id.LLColorLayout);
ivExpand = mContext.findViewById(R.id.ivExpand);
Operation = mContext.findViewById(R.id.operation);

btnBlue.setOnClickListener(this::initClick);
btnYellow.setOnClickListener(this::initClick);
@@ -185,13 +187,15 @@ public class SearchCarInfoUtils {
view = LLGreen;
break;
}
Operation.setVisibility(View.GONE);
initClick(view);
initClick(btnSearch);
}

initInputView();
}

private void initInputView(){
private void initInputView() {
mPopupKeyboard = new PopupKeyboard(mContext.getContext(), mContext);
mPopupKeyboard.attach(inputView, mContext);
inputView.set8thVisibility(true);
@@ -241,10 +245,10 @@ public class SearchCarInfoUtils {
LLYellowGreen.setBackground(mContext.getDrawable(R.drawable.item_home_frame4));
vehiclePlateColor = 5;

}else if (view == ivExpand){//展开还是搜索
setExpandParams(isShowExpand,!isExpand);
} else if (view == ivExpand) {//展开还是搜索
setExpandParams(isShowExpand, !isExpand);

}else if (view == btnSearch) {
} else if (view == btnSearch) {
if (FunHelper.isEmpty(inputView.getNumber())) {
ToastUtils.show("车牌号不能为空");
return;
@@ -267,7 +271,7 @@ public class SearchCarInfoUtils {

if (reqCallback != null) {
reqCallback.request(inputView.getNumber() + "_" + vehiclePlateColor);
reqCallback.request(inputView.getNumber() , vehiclePlateColor);
reqCallback.request(inputView.getNumber(), vehiclePlateColor);
return;
}

@@ -310,7 +314,14 @@ public class SearchCarInfoUtils {

//自定义请求
public interface OnCustomReqCallback {
default void request(String vehicleId){};
default void request(String vehicle,int vehicleColor){};
default void request(String vehicleId) {
}

;

default void request(String vehicle, int vehicleColor) {
}

;
}
}

+ 22
- 15
app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/activity/LoginActivity.java Datei anzeigen

@@ -35,10 +35,12 @@ import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean;
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean;
import com.huntersun.vkyes.etcopencard.project.tool.MyShared;
import com.huntersun.vkyes.etcopencard.project.ui.activity.MainActivity;
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.CheckRunningWaterStep2Activity;
import com.huntersun.vkyes.etcopencard.project.ui.activity.user.ForgetPwdStep1Activity;
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper;
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick;
import com.huntersun.vkyes.etcopencard.src.app.AppActivity;
import com.huntersun.vkyes.etcopencard.src.other.CodeCountDown;
import com.huntersun.vkyes.etcopencard.src.other.KeyboardWatcher;
import com.jeremyliao.liveeventbus.LiveEventBus;

@@ -214,19 +216,23 @@ public final class LoginActivity extends AppActivity
}
// 隐藏软键盘
hideKeyboard(getCurrentFocus());
FatherBean<SendTheVerificationCodeBean> fatherBean = new FatherBean<>();
fatherBean.setFilename("CSMSN_USER_SENDVEIFICODE_REQ_");
fatherBean.bizContent = new SendTheVerificationCodeBean();
fatherBean.bizContent.setTel(mPhoneView.getText().toString());
RequestParameters parameters1 = new RequestParameters(IFCode.IFCODE9, new Gson().toJson(fatherBean.bizContent));
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1)
.enqueue(new Converter<Result>() {
@Override
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
toast(R.string.common_code_send_hint);
mCountdownView.start(); //开始倒计时
}
});
showDialog("发送中...");
Map<String, String> params = new HashMap<>();
params.put("mobile", mPhoneView.getText().toString());
MyRetrofit.newInstance(IFCode.IFCODE2, params, new MyRetrofit.ReturnResult() {
@Override
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog();
toast("验证码发送成功!");
mCountdownView.start(); //开始倒计时
}

@Override
public void onError() {
MyRetrofit.ReturnResult.super.onError();
hideDialog();
}
});
}

if (view == mCommitView) { //提交按钮
@@ -243,7 +249,7 @@ public final class LoginActivity extends AppActivity
hideKeyboard(getCurrentFocus());

if (FunHelper.isEmpty(value)){
toast("请输入密码!");
toast( loginStart ? "请输入密码!" : "请输入验证码");
mPasswordView.startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.shake_anim));
mCommitView.showError(3000);
return;
@@ -253,7 +259,8 @@ public final class LoginActivity extends AppActivity
Map<String, String> params = new HashMap<>();
params.put("mobile", mPhoneView.getText() + "");
params.put("password", value);
params.put("appId", "52030131"); //综合业务支撑平台使用:52030131
params.put("appId", "52030131"); //综合业务支撑平台使用
//IFCODE66
MyRetrofit.newInstance(IFCode.IFCODE4, params, new MyRetrofit.ReturnResult() {
@Override
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {

+ 1
- 0
app/src/main/res/layout/layout_vehicleplate.xml Datei anzeigen

@@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/operation"
style="@style/MatchWrap.Vertical"
android:layout_marginHorizontal="@dimen/dp_15">


+ 52
- 52
app/src/main/res/layout/login_activity.xml Datei anzeigen

@@ -71,8 +71,8 @@
android:layout_height="@dimen/dp_40"
android:background="@null"
android:hint="@string/common_phone_input_hint"
android:text="15764350434"
android:inputType="phone"
android:text="15764350434"
app:regexType="mobile" />

</LinearLayout>
@@ -102,54 +102,54 @@
android:imeOptions="actionDone"
android:maxLength="20"
android:singleLine="true"
android:text="Huting123*" />

</LinearLayout>
android:text="Huting123*"
android:visibility="visible" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_login_forget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:foreground="?attr/selectableItemBackground"
android:text="@string/login_forget"
android:paddingTop="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:paddingLeft="@dimen/dp_15"
android:paddingBottom="@dimen/dp_10"
android:textColor="@color/common_accent_color" />
<LinearLayout
android:id="@+id/layout_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/edit_bg"
android:orientation="horizontal"
android:visibility="gone">

<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/et_phone_reset_code"
style="@style/EditTextStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/white"
android:hint="@string/common_code_input_hint"
android:imeOptions="actionDone"
android:inputType="number"
android:maxLength="@integer/sms_code_length"
android:singleLine="true" />

<com.hjq.widget.view.CountdownView
android:id="@+id/cv_phone_reset_countdown"
style="@style/CountdownViewStyle"
android:layout_marginEnd="0dp"
android:paddingVertical="@dimen/dp_10" />

</LinearLayout>

<LinearLayout
android:id="@+id/layout_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_40"
android:background="@color/white"
android:orientation="horizontal"
android:visibility="gone"
tools:visibility="gone">
</LinearLayout>

<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/et_phone_reset_code"
style="@style/EditTextStyle"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/white"
android:drawablePadding="@dimen/dp_15"
android:hint="@string/common_code_input_hint"
android:imeOptions="actionDone"
android:inputType="number"
android:maxLength="@integer/sms_code_length"
android:paddingHorizontal="@dimen/dp_20"
android:paddingVertical="@dimen/dp_18"
android:singleLine="true" />

<com.hjq.widget.view.CountdownView
android:id="@+id/cv_phone_reset_countdown"
style="@style/CountdownViewStyle" />
<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- android:id="@+id/tv_login_forget"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="end"-->
<!-- android:foreground="?attr/selectableItemBackground"-->
<!-- android:text="@string/login_forget"-->
<!-- android:paddingTop="@dimen/dp_15"-->
<!-- android:paddingRight="@dimen/dp_15"-->
<!-- android:paddingLeft="@dimen/dp_15"-->
<!-- android:paddingBottom="@dimen/dp_10"-->
<!-- android:textColor="@color/common_accent_color" />-->

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
@@ -158,7 +158,7 @@
android:layout_marginTop="@dimen/dp_15"
android:layout_marginEnd="@dimen/dp_40"
android:orientation="horizontal"
android:visibility="gone">
android:visibility="visible">

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_login_code"
@@ -169,13 +169,13 @@
android:text="手机号登录"
android:textColor="@color/common_accent_color" />

<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- android:id="@+id/tv_login_forget"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="end"-->
<!-- android:text="@string/login_forget"-->
<!-- android:textColor="@color/common_accent_color" />-->
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_login_forget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/login_forget"
android:textColor="@color/common_accent_color" />

</LinearLayout>


Laden…
Abbrechen
Speichern