@@ -76,7 +76,12 @@ public abstract class Converter<T extends Result> implements Callback<T>, ToastA | |||
.setCancelable(false) | |||
.setMessage(msg) | |||
.create(); | |||
mDialog.show(); | |||
post(new Runnable() { | |||
@Override | |||
public void run() { | |||
mDialog.show(); | |||
} | |||
}); | |||
} | |||
} | |||
@@ -103,12 +108,16 @@ public abstract class Converter<T extends Result> implements Callback<T>, ToastA | |||
onSuccess(resultBean, bizContent); | |||
} | |||
} else { | |||
String err = t.errorMsg; | |||
if ("Read timed out".equals(err)) { | |||
err = "请求服务超时,请稍候重试!"; | |||
} | |||
if (context != null) { | |||
new Utils().showMessDialog(context, t.errorMsg); | |||
new Utils().showMessDialog(context, err); | |||
} else { | |||
toast(t.errorMsg); | |||
toast(err); | |||
} | |||
onError(t.errorMsg, response); | |||
onError(err, response); | |||
} | |||
} else { | |||
if (context != null) { |
@@ -0,0 +1,88 @@ | |||
package com.huntersun.vkyes.etcopencard.project.bluetooth; | |||
import android.annotation.SuppressLint; | |||
import android.text.TextUtils; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import io.reactivex.Observable; | |||
import io.reactivex.ObservableOnSubscribe; | |||
import io.reactivex.android.schedulers.AndroidSchedulers; | |||
import io.reactivex.schedulers.Schedulers; | |||
/** | |||
* 蓝牙写卡写签 | |||
* 注意调用该内容方法时,要在链接玩蓝牙设备后调用 | |||
* @author admin | |||
*/ | |||
public class BluetoothWriteCardWriteTab { | |||
/** | |||
* 写卡 | |||
* | |||
* @param commands 指令内容 | |||
* @return 执行指令返回结果 9000 为成功 | |||
*/ | |||
public static String writeCard(String commands) { | |||
String[] commands_arry = commands.split(","); //命令排列 | |||
String[] results = new String[commands_arry.length]; //结果 | |||
int len = results.length; | |||
int split = 0; | |||
for (int i = 0; i < len; i++) { | |||
//透传写卡指令 | |||
ServiceStatus resp_string = MethodManager.sendApduICC(commands_arry[i]); | |||
results[i] = resp_string.getServiceInfo(); | |||
} | |||
//分隔字符流文件 | |||
StringBuilder buffer = new StringBuilder(); | |||
for (int i = 0; i < len; i++) { | |||
buffer.append(results[i]); | |||
if (i != len - 1) { | |||
buffer.append(","); | |||
} | |||
} | |||
return buffer.toString(); | |||
} | |||
/** | |||
* 透传指令 | |||
* | |||
* @param apdu 指令内容 | |||
* @param | |||
*/ | |||
@SuppressLint("CheckResult") | |||
private void sendApduEsam(String apdu, Callback callback) { | |||
Observable.create((ObservableOnSubscribe<ServiceStatus>) emitter -> { | |||
if (!TextUtils.isEmpty(apdu)) { | |||
emitter.onNext(MethodManager.sendApduEsam(apdu)); | |||
emitter.onComplete(); | |||
} else { | |||
//APDU为空 | |||
callback.fail("APDU返回为空"); | |||
} | |||
}).observeOn(AndroidSchedulers.mainThread()).subscribeOn(Schedulers.io()).subscribe(ss -> { | |||
if (0 == ss.getServiceCode() && checkApdu(ss)) { | |||
callback.success(); | |||
} else { | |||
callback.fail("指令执行错误:" + ss); | |||
} | |||
}); | |||
} | |||
//判断指令执行结果 | |||
public boolean checkApdu(ServiceStatus resp_string) { | |||
if (null != resp_string) { | |||
if (resp_string.getServiceInfo().length() >= 4) { | |||
return "9000".equals(resp_string.getServiceInfo().substring(resp_string.getServiceInfo().length() - 4)); | |||
} | |||
} | |||
return false; | |||
} | |||
interface Callback { | |||
void success(); | |||
void fail(String str); | |||
} | |||
} |
@@ -425,10 +425,9 @@ public class IdentityInformationUploadActivity extends AppActivity { | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1).enqueue(new Converter<Result>() { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) { | |||
if(finalStr.equals("1")){ | |||
if("1".equals(finalStr)){ | |||
identifyIdCard = bizContent1.getIdno(); | |||
} | |||
hideDialog(); | |||
GlideApp.with(getActivity()) | |||
.load(mAvatarUrl) |
@@ -2,15 +2,30 @@ package com.huntersun.vkyes.etcopencard.project.ui.activity.obu; | |||
import android.view.View; | |||
import com.google.gson.Gson; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityObuActivationUploadBinding; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.RequestParameters; | |||
import com.huntersun.vkyes.etcopencard.project.api.Result; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | |||
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.QRCode; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
/** | |||
* | |||
* @ClassName: ObuActivationUploadActivity | |||
* @Description: 图片上传 | |||
* @Author: lujin | |||
* @CreateDate: 2023/3/15 10:53 | |||
*/ | |||
import com.huntersun.vkyes.etcopencard.src.ui.activity.ImageSelectActivity; | |||
import java.util.List; | |||
import retrofit2.Response; | |||
/** | |||
* @ClassName: ObuActivationUploadActivity | |||
* @Description: 图片上传 | |||
* @Author: lujin | |||
* @CreateDate: 2023/3/15 10:53 | |||
*/ | |||
public class ObuActivationUploadActivity extends AppActivity { | |||
private ActivityObuActivationUploadBinding binding; | |||
@@ -26,6 +41,9 @@ public class ObuActivationUploadActivity extends AppActivity { | |||
protected void initView() { | |||
setTitle("激活设备"); | |||
binding.btnNext.setOnClickListener(this); | |||
binding.rcly.setOnClickListener(this); | |||
binding.rcly2.setOnClickListener(this); | |||
binding.rcly3.setOnClickListener(this); | |||
} | |||
@Override | |||
@@ -33,10 +51,28 @@ public class ObuActivationUploadActivity extends AppActivity { | |||
} | |||
@Override | |||
public void onClick(View view) { | |||
if (view==binding.btnNext){ | |||
startActivity(ObuActivationBLESearchActivity.class); | |||
} | |||
} | |||
} | |||
@Override | |||
public void onClick(View view) { | |||
if (view == binding.btnNext) { | |||
startActivity(ObuActivationBLESearchActivity.class); | |||
} else if (view == binding.rcly || view == binding.rcly2 || view == binding.rcly3) { | |||
ImageSelectActivity.start(this, new ImageSelectActivity.OnPhotoSelectListener() { | |||
@Override | |||
public void onSelected(List<String> data) { | |||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | |||
bean.setFileBase64(QRCode.imageToBase64(data.get(0))); | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE17, new Gson().toJson(bean)); | |||
new MyRetrofit().getRetrofit().create(Api.class) | |||
.message2(parameters) | |||
.enqueue(new Converter<Result>(getActivity(), true, "加载中...") { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
ResultBean.ProductInfo decVehInfo = | |||
Gson().fromJson(String.valueOf(resultBean.getBizContent()), ResultBean.ProductInfo.class); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
} | |||
} |
@@ -13,6 +13,8 @@ import android.widget.LinearLayout; | |||
import com.alibaba.fastjson.JSON; | |||
import com.huntersun.vky.obublelib.box.BoxManagers; | |||
import com.huntersun.vky.obublelib.util.ToastUtil; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.bluetooth.BluetoothDialog; | |||
@@ -28,6 +30,10 @@ import com.huntersun.vkyes.etcopencard.project.ui.activity.VehicleInformationAct | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.mail.FormDeliveryActivity; | |||
import com.huntersun.vkyes.etcopencard.project.utils.Constants; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
/** | |||
* Date :2023-03-15 | |||
@@ -57,11 +63,11 @@ public class OrderUtils { | |||
private ResultBean.BizContent orderData; //订单数据 | |||
private boolean isFromList; //是否来自订单列表 | |||
public OrderUtils(Activity context,ResultBean.BizContent orderData,boolean isFromList,LinearLayout LLBtns,Button btnFinish, | |||
Button btnLogistics,Button btnReturnGoods,Button btnExGoods, | |||
Button btnCancelOrder,Button btnEditAddr,Button btnAudit,Button btnDeliver, | |||
Button btnActive,Button btnAgainActive,Button btnReceiveGoods, | |||
Button btnUserInfoUpload, Button btnCarInfoUpload,Button btnConfirmInfo,Button btnPay) { | |||
public OrderUtils(Activity context, ResultBean.BizContent orderData, boolean isFromList, LinearLayout LLBtns, Button btnFinish, | |||
Button btnLogistics, Button btnReturnGoods, Button btnExGoods, | |||
Button btnCancelOrder, Button btnEditAddr, Button btnAudit, Button btnDeliver, | |||
Button btnActive, Button btnAgainActive, Button btnReceiveGoods, | |||
Button btnUserInfoUpload, Button btnCarInfoUpload, Button btnConfirmInfo, Button btnPay) { | |||
this.context = context; | |||
this.orderData = orderData; | |||
this.isFromList = isFromList; | |||
@@ -89,7 +95,7 @@ public class OrderUtils { | |||
/** | |||
* 设置按钮的显示和隐藏 | |||
*/ | |||
private void setBtnViewVisibleOrHide(){ | |||
private void setBtnViewVisibleOrHide() { | |||
LLBtns.setVisibility(View.GONE); | |||
btnFinish.setVisibility(View.GONE); | |||
btnLogistics.setVisibility(View.GONE); | |||
@@ -107,12 +113,12 @@ public class OrderUtils { | |||
btnConfirmInfo.setVisibility(View.GONE); | |||
btnPay.setVisibility(View.GONE); | |||
if(FunHelper.isEmpty(orderData.getOrderStep())){ | |||
if (FunHelper.isEmpty(orderData.getOrderStep())) { | |||
orderData.setOrderStep("0"); | |||
} | |||
if (!orderData.getOrderStatus().equals(String.valueOf(Constants.ORDER_STATUS_CANCEL))){ | |||
switch (Integer.parseInt(orderData.getOrderStep())){ | |||
if (!orderData.getOrderStatus().equals(String.valueOf(Constants.ORDER_STATUS_CANCEL))) { | |||
switch (Integer.parseInt(orderData.getOrderStep())) { | |||
case Constants.ORDER_STATUS_BASE://完成填写基本信息 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
@@ -175,10 +181,11 @@ public class OrderUtils { | |||
/** | |||
* 设置点击事件 | |||
*/ | |||
private void initBtnClick(){ | |||
private void initBtnClick() { | |||
//身份证信息上传 | |||
btnUserInfoUpload.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(IdentityInformationUploadActivity.class); | |||
} | |||
@@ -187,6 +194,7 @@ public class OrderUtils { | |||
//车辆信息上传 | |||
btnCarInfoUpload.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(VehicleInformationActivity.class); | |||
} | |||
@@ -195,6 +203,7 @@ public class OrderUtils { | |||
//信息确认 | |||
btnConfirmInfo.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(InformationConfirmedActivity.class); | |||
} | |||
@@ -203,6 +212,7 @@ public class OrderUtils { | |||
//支付 | |||
btnPay.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
ResultBean.BizContent productBean = new ResultBean.BizContent(); | |||
productBean.setId(orderData.productId); | |||
@@ -225,27 +235,30 @@ public class OrderUtils { | |||
//结束订单 | |||
btnFinish.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
new ConfirmDialog.Builder(context) .setMsg("确定是否结束订单?", R.mipmap.icon_finish_order).onClick(new ConfirmDialog.Result() { | |||
@Override | |||
public void confirm() { | |||
ToastUtil.showS(context,"结束订单"); | |||
} | |||
}).show(); | |||
new ConfirmDialog.Builder(context).setMsg("确定是否结束订单?", R.mipmap.icon_finish_order).onClick(new ConfirmDialog.Result() { | |||
@Override | |||
public void confirm() { | |||
ToastUtil.showS(context, "结束订单"); | |||
} | |||
}).show(); | |||
} | |||
}); | |||
//查看物流 | |||
btnLogistics.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(OrderLogisticsActivity.class); | |||
} | |||
}); | |||
//退货 | |||
btnReturnGoods.setOnClickListener( new View.OnClickListener() { | |||
btnReturnGoods.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(ApplyReturnGoodsStep1Activity.class); | |||
} | |||
@@ -254,6 +267,7 @@ public class OrderUtils { | |||
//换货 | |||
btnExGoods.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(ApplyExGoodsStep1Activity.class); | |||
} | |||
@@ -262,6 +276,7 @@ public class OrderUtils { | |||
//取消订单 | |||
btnCancelOrder.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(CancelOrderStep1Activity.class); | |||
} | |||
@@ -270,6 +285,7 @@ public class OrderUtils { | |||
//修改地址 | |||
btnEditAddr.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(EditOrderAddrActivity.class); | |||
} | |||
@@ -278,6 +294,7 @@ public class OrderUtils { | |||
//审核 | |||
btnAudit.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(AuditingStep1Activity.class); | |||
} | |||
@@ -286,8 +303,9 @@ public class OrderUtils { | |||
//发货 | |||
btnDeliver.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
ToastUtil.showS(context,"发货"); | |||
ToastUtil.showS(context, "发货"); | |||
startActivity(FormDeliveryActivity.class); | |||
} | |||
}); | |||
@@ -295,20 +313,29 @@ public class OrderUtils { | |||
//激活 | |||
btnActive.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
//TODO 需要调用一遍详情接口 | |||
releaseActivation(orderData); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("id", orderData.getId() + ""); | |||
MyRetrofit.newInstance(IFCode.IFCODE9, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
releaseActivation(bizContent); | |||
} | |||
}); | |||
} | |||
}); | |||
//再次唤起 | |||
btnAgainActive.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
new ConfirmDialog.Builder(context) .setMsg("确定是否再次唤醒订单?",R.mipmap.icon_active_order).onClick(new ConfirmDialog.Result() { | |||
new ConfirmDialog.Builder(context).setMsg("确定是否再次唤醒订单?", R.mipmap.icon_active_order).onClick(new ConfirmDialog.Result() { | |||
@Override | |||
public void confirm() { | |||
ToastUtil.showS(context,"再次唤起"); | |||
ToastUtil.showS(context, "再次唤起"); | |||
} | |||
}).show(); | |||
} | |||
@@ -317,6 +344,7 @@ public class OrderUtils { | |||
//确认完成 | |||
btnReceiveGoods.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
startActivity(ConfirmReceiveGoodsStep1Activity.class); | |||
} | |||
@@ -325,7 +353,7 @@ public class OrderUtils { | |||
//激活 | |||
public void releaseActivation(ResultBean.BizContent bizContent1) { | |||
new BluetoothDialog.Builder(context) .setResult(new BluetoothDialog.Builder.OnResult() { | |||
new BluetoothDialog.Builder(context).setResult(new BluetoothDialog.Builder.OnResult() { | |||
/** | |||
* 未打开的蓝牙 | |||
*/ | |||
@@ -402,7 +430,7 @@ public class OrderUtils { | |||
*/ | |||
public void openingApplication(ResultBean.BizContent bizContent1) { | |||
//开签完以后走激活 | |||
new OBURequest(BoxManagers.mDecryptVehicleApduBean, bizContent1,context) | |||
new OBURequest(BoxManagers.mDecryptVehicleApduBean, bizContent1, context) | |||
.obuPublishRequest(new OBURequest.CallBack() { | |||
@Override | |||
public void onSuccess() { | |||
@@ -416,7 +444,7 @@ public class OrderUtils { | |||
*/ | |||
public void deviceActivation(ResultBean.BizContent content) { | |||
//设备激活 | |||
new ObuActivation(BoxManagers.mDecryptVehicleApduBean,context).start(bizContent -> { | |||
new ObuActivation(BoxManagers.mDecryptVehicleApduBean, context).start(bizContent -> { | |||
bizContent.setOrderId(content.getOrderId()); | |||
//激活步骤 | |||
new ObuActivateRequester().start(bizContent, context); | |||
@@ -426,20 +454,21 @@ public class OrderUtils { | |||
/** | |||
* 跳转 | |||
* | |||
* @param activityClass | |||
*/ | |||
private void startActivity(Class<?> activityClass){ | |||
private void startActivity(Class<?> activityClass) { | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("id",FunHelper.isEmpty(orderData.getId()) ? "" : orderData.getId()); | |||
bundle.putString("orderId",FunHelper.isEmpty(orderData.getOrderId()) ? "" : orderData.getOrderId()); | |||
bundle.putString("vehiclePlate",FunHelper.isEmpty(orderData.getVehiclePlate()) ? "" : orderData.getVehiclePlate()); | |||
bundle.putString("vehiclePlateColor",FunHelper.isEmpty(orderData.getVehiclePlateColor()) ? "" : orderData.getVehiclePlateColor()); | |||
bundle.putString("amount",FunHelper.isEmpty(orderData.getAmount()) ? "0" : orderData.getAmount()); | |||
bundle.putString("orderStep",FunHelper.isEmpty(orderData.getOrderStep()) ? "" : orderData.getOrderStep()); | |||
bundle.putString("cardId",FunHelper.isEmpty(orderData.getCardId()) ? "" : orderData.getCardId()); | |||
bundle.putString("obuId",FunHelper.isEmpty(orderData.getObuId()) ? "" : orderData.getObuId()); | |||
bundle.putString("type",FunHelper.isEmpty(orderData.getTowing()) ? "" : orderData.getTowing()); | |||
bundle.putString("isValueCard",FunHelper.isEmpty(orderData.getIsValueCard()) ? "" : orderData.getIsValueCard()); | |||
bundle.putString("id", FunHelper.isEmpty(orderData.getId()) ? "" : orderData.getId()); | |||
bundle.putString("orderId", FunHelper.isEmpty(orderData.getOrderId()) ? "" : orderData.getOrderId()); | |||
bundle.putString("vehiclePlate", FunHelper.isEmpty(orderData.getVehiclePlate()) ? "" : orderData.getVehiclePlate()); | |||
bundle.putString("vehiclePlateColor", FunHelper.isEmpty(orderData.getVehiclePlateColor()) ? "" : orderData.getVehiclePlateColor()); | |||
bundle.putString("amount", FunHelper.isEmpty(orderData.getAmount()) ? "0" : orderData.getAmount()); | |||
bundle.putString("orderStep", FunHelper.isEmpty(orderData.getOrderStep()) ? "" : orderData.getOrderStep()); | |||
bundle.putString("cardId", FunHelper.isEmpty(orderData.getCardId()) ? "" : orderData.getCardId()); | |||
bundle.putString("obuId", FunHelper.isEmpty(orderData.getObuId()) ? "" : orderData.getObuId()); | |||
bundle.putString("type", FunHelper.isEmpty(orderData.getTowing()) ? "" : orderData.getTowing()); | |||
bundle.putString("isValueCard", FunHelper.isEmpty(orderData.getIsValueCard()) ? "" : orderData.getIsValueCard()); | |||
Intent intent = new Intent(); | |||
intent.setClass(context, activityClass); |
@@ -13,6 +13,7 @@ import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.FragmentHomeFiveBinding; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.TestBean; | |||
import com.huntersun.vkyes.etcopencard.project.tool.Utils; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.CardSignQueryActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.MainActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.BalanceReplacementActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.DevicePendingActivity; | |||
@@ -29,6 +30,9 @@ import com.huntersun.vkyes.etcopencard.project.ui.activity.obu.ObuActivationHint | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | |||
import com.huntersun.vkyes.etcopencard.src.app.TitleBarFragment; | |||
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram; | |||
import com.tencent.mm.opensdk.openapi.IWXAPI; | |||
import com.tencent.mm.opensdk.openapi.WXAPIFactory; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
@@ -39,18 +43,35 @@ import java.util.List; | |||
public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
private FragmentHomeFiveBinding binding; | |||
private final Object[][] menu = { | |||
{R.mipmap.card1, "卡签查询"}, | |||
{R.mipmap.card1, "卡签信息查询"}, | |||
{R.mipmap.card2, "发货管理"}, | |||
{R.mipmap.card3, "充值圈存"}, | |||
{R.mipmap.card8, "设备激活"}, | |||
{R.mipmap.card4, "卡签注销"}, | |||
{R.mipmap.card5, "卡签挂失"}, | |||
{R.mipmap.card6, "卡签挂起"}, | |||
{R.mipmap.card7, "满意度评价"}, | |||
{R.mipmap.card8, "设备激活"}, | |||
{R.mipmap.card9, "储值卡转记账卡"}, | |||
{R.mipmap.card4, "设备注销"}, | |||
{R.mipmap.card5, "设备挂失"}, | |||
{R.mipmap.card6, "设备挂起"}, | |||
{R.mipmap.card9, "储值卡测"}, | |||
{R.mipmap.card10, "更换卡签"}, | |||
{R.mipmap.card10, "欠费补缴"}, | |||
{R.mipmap.card10, "余额补领"}, | |||
{R.mipmap.card11, "卡Pin码解锁"}, | |||
{R.mipmap.card12, "卡签停用启用"}, | |||
{R.mipmap.card13, "卡签续期"}, | |||
{R.mipmap.card14, "设备升级"}, | |||
{R.mipmap.card15, "审核管理"}, | |||
{R.mipmap.card16, "ETC过户"}, | |||
{R.mipmap.card17, "签约账户变更"}, | |||
{R.mipmap.card18, "发票管理"}, | |||
{R.mipmap.card19, "解除车牌占用"}, | |||
{R.mipmap.card20, "圈存退费"}, | |||
{R.mipmap.card2, "补卡额申请"}, | |||
{R.mipmap.card3, "卡签版本查询"}, | |||
{R.mipmap.card5, "通行流水查询"}, | |||
{R.mipmap.card6, "公务车发行"}, | |||
}; | |||
public static AppFragment<MainActivity> newInstance() { | |||
@@ -126,8 +147,7 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
public void onClick(View v) { | |||
switch (item.message) { | |||
case "卡签查询": | |||
// startActivity(CardSignQueryActivity.class); | |||
startActivity(InfoTabActivity.class); | |||
startActivity(CardSignQueryActivity.class); | |||
break; | |||
case "发货管理": | |||
startActivity(ListDeliveryActivity.class); | |||
@@ -151,7 +171,7 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
case "设备激活": | |||
startActivity(ObuActivationHintActivity.class); | |||
break; | |||
case "储值卡测": | |||
case "储值卡转记账卡": | |||
startActivity(ValueToBookkeepingCardActivity.class); | |||
break; | |||
case "更换卡签": |
@@ -13,6 +13,9 @@ import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.annotation.StringRes; | |||
import com.google.gson.Gson; | |||
import com.google.gson.GsonBuilder; | |||
import com.google.gson.reflect.TypeToken; | |||
import com.gyf.immersionbar.ImmersionBar; | |||
import com.hjq.bar.TitleBar; | |||
import com.hjq.base.BaseActivity; | |||
@@ -20,12 +23,15 @@ import com.hjq.base.BaseDialog; | |||
import com.huntersun.vky.obublelib.box.BoxManagers; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.project.bluetooth.BluetoothDialog; | |||
import com.huntersun.vkyes.etcopencard.project.ui.adapter.DataTypeAdaptor; | |||
import com.huntersun.vkyes.etcopencard.src.action.TitleBarAction; | |||
import com.huntersun.vkyes.etcopencard.src.action.ToastAction; | |||
import com.huntersun.vkyes.etcopencard.src.http.model.HttpData; | |||
import com.huntersun.vkyes.etcopencard.src.ui.dialog.WaitDialog; | |||
import com.hjq.http.listener.OnHttpListener; | |||
import java.util.Map; | |||
import okhttp3.Call; | |||
/** | |||
@@ -321,6 +327,13 @@ public abstract class AppActivity extends BaseActivity | |||
.show(); | |||
} | |||
public Gson Gson() { | |||
GsonBuilder gsonBuilder = new GsonBuilder(); | |||
gsonBuilder.registerTypeAdapter(new TypeToken<Map<String, Object>>() { | |||
}.getType(), new DataTypeAdaptor()); | |||
return gsonBuilder.create(); | |||
} | |||
/** | |||
* 页面跳转 | |||
* |
@@ -89,6 +89,7 @@ | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginRight="@dimen/dp_25" | |||
android:id="@+id/rcly2" | |||
app:corner_radius="@dimen/dp_5" | |||
app:background_normal="@color/photochoosebg"> | |||
<com.ruffian.library.widget.RImageView | |||
@@ -137,6 +138,7 @@ | |||
android:layout_alignLeft="@+id/rcly" | |||
android:layout_below="@+id/rcly" | |||
app:corner_radius="@dimen/dp_5" | |||
android:id="@+id/rcly3" | |||
app:background_normal="@color/photochoosebg"> | |||
<com.ruffian.library.widget.RImageView | |||
android:layout_width="match_parent" |
@@ -114,5 +114,4 @@ | |||
</com.huntersun.vkyes.etcopencard.src.widget.StatusLayout> | |||
</LinearLayout> |