|
|
@@ -3,18 +3,18 @@ package com.fujica.abk.slice;
|
|
|
import com.fujica.abk.ResourceTable;
|
|
|
import com.fujica.abk.api.auth;
|
|
|
import com.fujica.abk.api.cache;
|
|
|
+import com.fujica.abk.api.pay;
|
|
|
import com.fujica.abk.common.EventBus;
|
|
|
-import com.fujica.abk.component.LoadingComponent;
|
|
|
-import com.fujica.abk.component.OrderDetailComponent;
|
|
|
-import com.fujica.abk.component.ParkDetailComponent;
|
|
|
+import com.fujica.abk.component.*;
|
|
|
import com.fujica.abk.component.nav.ChargeComponent;
|
|
|
import com.fujica.abk.component.nav.OrderComponent;
|
|
|
import com.fujica.abk.component.nav.ParkComponent;
|
|
|
import com.fujica.abk.model.out.OrderRes;
|
|
|
import com.fujica.abk.model.out.ParkNearRes;
|
|
|
-import com.fujica.abk.utils.DialogUtil;
|
|
|
-import com.fujica.abk.utils.Log;
|
|
|
-import com.fujica.abk.utils.Toast;
|
|
|
+import com.fujica.abk.model.out.ParkingFeeInfo;
|
|
|
+import com.fujica.abk.model.out.PayChannelResponse;
|
|
|
+import com.fujica.abk.model.out.PayChannelInfo;
|
|
|
+import com.fujica.abk.utils.*;
|
|
|
import com.huawei.hms.accountsdk.constant.CommonConstant;
|
|
|
import com.huawei.hms.accountsdk.exception.ApiException;
|
|
|
import com.huawei.hms.accountsdk.support.account.AccountAuthManager;
|
|
|
@@ -29,14 +29,8 @@ import ohos.aafwk.ability.AbilitySlice;
|
|
|
import ohos.aafwk.content.Intent;
|
|
|
import ohos.agp.components.*;
|
|
|
import ohos.agp.utils.Color;
|
|
|
-import ohos.agp.window.dialog.ToastDialog;
|
|
|
import ohos.agp.window.service.Window;
|
|
|
import ohos.agp.window.service.WindowManager;
|
|
|
-import ohos.location.Location;
|
|
|
-import ohos.location.Locator;
|
|
|
-import ohos.location.LocatorCallback;
|
|
|
-import ohos.location.RequestParam;
|
|
|
-import ohos.rpc.RemoteException;
|
|
|
|
|
|
public class MainAbilitySlice extends AbilitySlice {
|
|
|
// 页面容器
|
|
|
@@ -59,19 +53,11 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
private Image iconOrder;
|
|
|
private Image iconOrder1;
|
|
|
|
|
|
- // 当前选中的 tab
|
|
|
- private int currentTab = 0; // 0: 找车位, 1: 计费, 2: 缴费记录
|
|
|
-
|
|
|
- // 定位相关
|
|
|
- private Locator locator;
|
|
|
- private LocatorCallback locatorCallback;
|
|
|
- private Location currentLocation; // 当前定位坐标
|
|
|
-
|
|
|
// 页面组件
|
|
|
private ChargeComponent chargeComponent;
|
|
|
private ParkComponent parkComponent; // 找车位页面组件
|
|
|
private OrderComponent orderComponent; // 缴费记录页面组件
|
|
|
-
|
|
|
+
|
|
|
// 页面初始化标志
|
|
|
private boolean isChargeComponentInitialized = false;
|
|
|
private boolean isParkComponentInitialized = false;
|
|
|
@@ -92,16 +78,19 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
|
|
|
private Image quit;
|
|
|
|
|
|
+ // 当前选中的 tab
|
|
|
+ private int currentTab = 0; // 0: 找车位, 1: 计费, 2: 缴费记录
|
|
|
+
|
|
|
@Override
|
|
|
public void onStart(Intent intent) {
|
|
|
super.onStart(intent);
|
|
|
|
|
|
- try {
|
|
|
- //com.fujica.abk_BD8VI9k5bO0HeGAPnhTGeYX++mgKw87G8y+3RZ6nrb9evCePddojupXJN03auUKxTKn1qbFrYQAjFyGumpjsHzw=
|
|
|
- String appId = getApplicationContext().getBundleManager().getBundleInfo(getBundleName(), 0).getAppId();
|
|
|
- Log.info(appId);
|
|
|
- } catch (RemoteException e) {
|
|
|
- }
|
|
|
+// try {
|
|
|
+// //com.fujica.abk_BD8VI9k5bO0HeGAPnhTGeYX++mgKw87G8y+3RZ6nrb9evCePddojupXJN03auUKxTKn1qbFrYQAjFyGumpjsHzw=
|
|
|
+// String appId = getApplicationContext().getBundleManager().getBundleInfo(getBundleName(), 0).getAppId();
|
|
|
+// Log.info(appId);
|
|
|
+// } catch (RemoteException e) {
|
|
|
+// }
|
|
|
|
|
|
// 设置全屏显示
|
|
|
setFullScreen();
|
|
|
@@ -135,9 +124,6 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
// 设置事件监听
|
|
|
setupListeners();
|
|
|
|
|
|
- // 初始化定位
|
|
|
- initLocation();
|
|
|
-
|
|
|
Button mBtnHuaweiIdSignIn = findComponentById(ResourceTable.Id_btn_hwid_sign_in);
|
|
|
mBtnHuaweiIdSignIn.setClickedListener((Component c) -> {
|
|
|
huaweiIdSignIn();
|
|
|
@@ -255,7 +241,7 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
|
|
|
// 初始化底部导航栏
|
|
|
initBottomNavigation();
|
|
|
-
|
|
|
+
|
|
|
// 默认初始化找车位页面(因为默认显示该页面)
|
|
|
// initParkComponent();
|
|
|
|
|
|
@@ -270,11 +256,18 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
if (isChargeComponentInitialized || pageContainer == null) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
try {
|
|
|
Log.info("首次初始化缴费页面");
|
|
|
chargeComponent = new ChargeComponent(MainAbilitySlice.this);
|
|
|
chargeComponent.setLoadingComponent(loadingComponent);
|
|
|
+ // 设置支付详情展示监听器
|
|
|
+ chargeComponent.setOnPayDetailShowListener(new ChargeComponent.OnPayDetailShowListener() {
|
|
|
+ @Override
|
|
|
+ public void onShowPayDetail(ParkingFeeInfo feeInfo) {
|
|
|
+ showPayDetail(feeInfo);
|
|
|
+ }
|
|
|
+ });
|
|
|
chargeComponent.setVisibility(Component.HIDE);
|
|
|
pageContainer.addComponent(chargeComponent);
|
|
|
isChargeComponentInitialized = true;
|
|
|
@@ -284,7 +277,7 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 初始化找车位页面组件
|
|
|
*/
|
|
|
@@ -292,15 +285,13 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
if (isParkComponentInitialized || pageContainer == null) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
try {
|
|
|
+
|
|
|
Log.info("首次初始化找车位页面");
|
|
|
parkComponent = new ParkComponent(MainAbilitySlice.this);
|
|
|
parkComponent.setLoadingComponent(loadingComponent);
|
|
|
- // 如果已有定位信息,设置到组件中
|
|
|
- if (currentLocation != null) {
|
|
|
- parkComponent.setCurrentLocation(currentLocation);
|
|
|
- }
|
|
|
+
|
|
|
// 设置停车场选中监听器
|
|
|
parkComponent.setOnParkSelectedListener(new ParkComponent.OnParkSelectedListener() {
|
|
|
@Override
|
|
|
@@ -316,13 +307,17 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
parkComponent.setVisibility(Component.HIDE);
|
|
|
pageContainer.addComponent(parkComponent);
|
|
|
isParkComponentInitialized = true;
|
|
|
+ //是否要申请权限
|
|
|
+ if(!PermissionManager.requestLocation(getContext())){
|
|
|
+ parkComponent.loadParkingDataByLocation();
|
|
|
+ }
|
|
|
Log.info("找车位页面初始化完成");
|
|
|
} catch (Exception e) {
|
|
|
Log.error("创建找车位页面组件失败: " + e.getMessage());
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 初始化缴费记录页面组件
|
|
|
*/
|
|
|
@@ -330,7 +325,7 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
if (isOrderComponentInitialized || pageContainer == null) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
try {
|
|
|
Log.info("首次初始化缴费记录页面");
|
|
|
orderComponent = new OrderComponent(MainAbilitySlice.this);
|
|
|
@@ -388,13 +383,14 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
}
|
|
|
if (navCurrentLocation != null) {
|
|
|
navCurrentLocation.setClickedListener(component -> {
|
|
|
- Log.info("点击了当前位置按钮");
|
|
|
- locateCurrentPosition();
|
|
|
+ if(currentTab == 0 && parkComponent!=null && isParkComponentInitialized){
|
|
|
+ parkComponent.loadParkingDataByLocation();
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void switchToPageAfterLogin(int index){
|
|
|
+ private void switchToPageAfterLogin(int index) {
|
|
|
// 先检查是否已登录
|
|
|
if (!cache.isAuth(this)) {
|
|
|
// 未登录,调用登录方法
|
|
|
@@ -419,6 +415,7 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 切换到指定页面
|
|
|
*/
|
|
|
@@ -438,16 +435,18 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
orderComponent.setVisibility(Component.HIDE);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// 显示目标页面
|
|
|
switch (index) {
|
|
|
case 0: // 找车位
|
|
|
// 首次打开时初始化
|
|
|
if (!isParkComponentInitialized) {
|
|
|
- initParkComponent();
|
|
|
// 首次初始化时,组件内部已经加载了数据,无需再调用refresh()
|
|
|
+ initParkComponent();
|
|
|
} else if (parkComponent != null) {
|
|
|
// 非首次打开时才刷新数据
|
|
|
- parkComponent.refresh();
|
|
|
+ parkComponent.switchTab(2);
|
|
|
+ parkComponent.loadParkingData(true);
|
|
|
}
|
|
|
if (parkComponent != null) {
|
|
|
parkComponent.setVisibility(Component.VISIBLE);
|
|
|
@@ -483,6 +482,7 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
|
|
|
// 更新当前tab状态
|
|
|
currentTab = index;
|
|
|
+
|
|
|
updateBottomNavState(index);
|
|
|
|
|
|
// 切换页面时隐藏详情
|
|
|
@@ -549,65 +549,6 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
// 事件监听已在initBottomNavigation中设置
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 初始化定位服务
|
|
|
- */
|
|
|
- private void initLocation() {
|
|
|
- try {
|
|
|
- locator = new Locator(this);
|
|
|
- locatorCallback = new LocatorCallback() {
|
|
|
- @Override
|
|
|
- public void onLocationReport(Location location) {
|
|
|
- // 保存当前位置坐标
|
|
|
- currentLocation = location;
|
|
|
- double latitude = location.getLatitude();
|
|
|
- double longitude = location.getLongitude();
|
|
|
-
|
|
|
- Log.info("定位成功: " + latitude + ", " + longitude);
|
|
|
- // 定位成功后,如果当前在找车位页面,更新定位信息
|
|
|
- if (currentTab == 0 && parkComponent != null) {
|
|
|
- parkComponent.setCurrentLocation(location);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onStatusChanged(int type) {
|
|
|
- Log.info("定位状态变化: " + type);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onErrorReport(int errorCode) {
|
|
|
- Log.error("定位错误: " + errorCode);
|
|
|
- new ToastDialog(getContext())
|
|
|
- .setText("定位失败,错误码: " + errorCode)
|
|
|
- .show();
|
|
|
- }
|
|
|
- };
|
|
|
- } catch (Exception e) {
|
|
|
- Log.error("初始化定位服务失败: " + e.getMessage());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 定位到当前位置
|
|
|
- */
|
|
|
- private void locateCurrentPosition() {
|
|
|
- if (locator == null || locatorCallback == null) {
|
|
|
- Log.error("定位服务未初始化");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- try {
|
|
|
- // 请求定位
|
|
|
- RequestParam requestParam = new RequestParam(RequestParam.PRIORITY_ACCURACY, 0, 0);
|
|
|
- locator.startLocating(requestParam, locatorCallback);
|
|
|
- Log.info("开始定位...");
|
|
|
- } catch (Exception e) {
|
|
|
- Log.error("定位失败: " + e.getMessage());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 订阅登录成功事件
|
|
|
*/
|
|
|
@@ -644,23 +585,24 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
}
|
|
|
// 可以在这里添加其他需要更新的UI逻辑
|
|
|
});
|
|
|
- // 认证过期后重新登录
|
|
|
- auth.login(MainAbilitySlice.this).thenAccept(success -> {
|
|
|
- if (success) {
|
|
|
- Log.info("重新登录成功");
|
|
|
- } else {
|
|
|
- Log.error("重新登录失败");
|
|
|
- }
|
|
|
- }).exceptionally(e -> {
|
|
|
- Log.error("重新登录异常: " + e.getMessage());
|
|
|
- return null;
|
|
|
- });
|
|
|
+ // 认证过期后重新登录
|
|
|
+ auth.login(MainAbilitySlice.this).thenAccept(success -> {
|
|
|
+ if (success) {
|
|
|
+ Log.info("重新登录成功");
|
|
|
+ } else {
|
|
|
+ Log.error("重新登录失败");
|
|
|
+ }
|
|
|
+ }).exceptionally(e -> {
|
|
|
+ Log.error("重新登录异常: " + e.getMessage());
|
|
|
+ return null;
|
|
|
+ });
|
|
|
};
|
|
|
EventBus.getInstance().on("onLoginExpired", authChangedListener);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void onStop() {
|
|
|
+// AggrPayClient
|
|
|
super.onStop();
|
|
|
// 取消订阅登录成功事件
|
|
|
if (loginSuccessListener != null) {
|
|
|
@@ -670,14 +612,11 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
if (authChangedListener != null) {
|
|
|
EventBus.getInstance().off("onLoginExpired", authChangedListener);
|
|
|
}
|
|
|
-
|
|
|
- // 停止定位
|
|
|
- if (locator != null && locatorCallback != null) {
|
|
|
- try {
|
|
|
- locator.stopLocating(locatorCallback);
|
|
|
- } catch (Exception e) {
|
|
|
- Log.error("停止定位失败: " + e.getMessage());
|
|
|
- }
|
|
|
+
|
|
|
+ // 取消parkComponent的事件订阅
|
|
|
+ if (parkComponent != null) {
|
|
|
+ parkComponent.unsubscribeEvents();
|
|
|
+ parkComponent.stopLocation();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -685,13 +624,19 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
* 显示订单详情
|
|
|
*/
|
|
|
private void showOrderDetail(OrderRes order) {
|
|
|
+// Uri content_url = Uri.parse("petalmaps://navigation?saddr=25.102916,55.165363&daddr=25.164610000000,55.228869000000&type=drive&utm_source=fb");
|
|
|
+// Intent intent = new Intent(Intent.ACTION_VIEW, content_url);
|
|
|
+// if (intent.resolveActivity(getPackageManager()) != null) {
|
|
|
+// startActivity(intent);
|
|
|
+// }
|
|
|
+// sta
|
|
|
if (mainRight == null || orderDetailComponent == null) {
|
|
|
return;
|
|
|
}
|
|
|
// 移除所有子组件
|
|
|
mainRight.removeAllComponents();
|
|
|
// 设置订单数据
|
|
|
- orderDetailComponent.setOrderData(order,getContext());
|
|
|
+ orderDetailComponent.setOrderData(order, getContext());
|
|
|
// 添加详情组件
|
|
|
mainRight.addComponent(orderDetailComponent);
|
|
|
// 显示详情区域
|
|
|
@@ -715,6 +660,159 @@ public class MainAbilitySlice extends AbilitySlice {
|
|
|
mainRight.setVisibility(Component.VISIBLE);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 显示支付订单详情
|
|
|
+ */
|
|
|
+ private void showPayDetail(ParkingFeeInfo feeInfo) {
|
|
|
+ PayDetailDialog payDetailDialog = new PayDetailDialog(this);
|
|
|
+
|
|
|
+ // 设置支付详情组件的支付按钮点击监听器
|
|
|
+ payDetailDialog.setOnPayClickListener(fee -> {
|
|
|
+ // 获取车场ID
|
|
|
+ String parkId = fee.getParkId();
|
|
|
+ if (parkId == null || parkId.isEmpty()) {
|
|
|
+ Log.error("车场ID为空,无法获取支付渠道");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 先获取支付渠道
|
|
|
+ pay.getPayChannel(getContext(), parkId).thenAccept(result -> {
|
|
|
+ getContext().getUITaskDispatcher().asyncDispatch(() -> {
|
|
|
+ String paySceneCode = null;
|
|
|
+
|
|
|
+ if (result != null && result.isSuccess() && result.getData() != null) {
|
|
|
+ PayChannelResponse channelData = result.getData();
|
|
|
+
|
|
|
+ // 判断支付渠道
|
|
|
+ if (channelData.getPayChannelInfoList() != null && !channelData.getPayChannelInfoList().isEmpty()) {
|
|
|
+ boolean hasWx = false;
|
|
|
+ boolean hasAli = false;
|
|
|
+
|
|
|
+ for (PayChannelInfo channelInfo : channelData.getPayChannelInfoList()) {
|
|
|
+ String channelCode = channelInfo.getPayChannelCode();
|
|
|
+ if (channelCode != null) {
|
|
|
+ if (channelCode.contains("WX")) {
|
|
|
+ hasWx = true;
|
|
|
+ }
|
|
|
+ if (channelCode.contains("ALI")) {
|
|
|
+ hasAli = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 优先使用微信支付
|
|
|
+ if (hasWx) {
|
|
|
+ paySceneCode = "WX_NA";
|
|
|
+ Log.info("支持微信支付,使用微信扫码");
|
|
|
+ } else if (hasAli) {
|
|
|
+ paySceneCode = "ALI_PCRE";
|
|
|
+ Log.info("支持支付宝支付,使用支付宝扫码");
|
|
|
+ } else {
|
|
|
+ Log.warn("未配置支持的支付渠道");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Log.warn("未获取到支付渠道列表");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Log.warn("获取支付渠道失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 检查是否获取到支付渠道
|
|
|
+ if (paySceneCode == null) {
|
|
|
+ // 先关闭支付详情弹框,避免倒计时继续运行导致空指针
|
|
|
+ payDetailDialog.hide();
|
|
|
+ Toast.error(getContext(), "未配置支付渠道");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 关闭支付详情弹框
|
|
|
+ payDetailDialog.hide();
|
|
|
+
|
|
|
+ // 创建并显示二维码弹框
|
|
|
+ QRCodeScanDialog qrCodeScanDialog = new QRCodeScanDialog(this);
|
|
|
+
|
|
|
+ // 设置费用信息
|
|
|
+ qrCodeScanDialog.setFeeInfo(fee);
|
|
|
+
|
|
|
+ // 设置支付场景代码
|
|
|
+ qrCodeScanDialog.setPaySceneCode(paySceneCode);
|
|
|
+
|
|
|
+ // 设置弹框关闭监听器 - 关闭时刷新ChargeComponent
|
|
|
+ qrCodeScanDialog.setOnCloseListener(() -> {
|
|
|
+ Log.info("二维码弹框关闭,刷新ChargeComponent");
|
|
|
+ if (chargeComponent != null) {
|
|
|
+ chargeComponent.refresh();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 设置支付结果监听器
|
|
|
+ qrCodeScanDialog.setOnPayResultListener(new QRCodeScanDialog.OnPayResultListener() {
|
|
|
+ @Override
|
|
|
+ public void onPaySuccess(String payNo) {
|
|
|
+ Log.info("支付成功: payNo=" + payNo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onPayFailed(String errorMsg) {
|
|
|
+ Log.error("支付失败: " + errorMsg);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onPayTimeout() {
|
|
|
+ Log.info("支付超时");
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 显示二维码扫描对话框
|
|
|
+ qrCodeScanDialog.show();
|
|
|
+ });
|
|
|
+ }).exceptionally(ex -> {
|
|
|
+ getContext().getUITaskDispatcher().asyncDispatch(() -> {
|
|
|
+ Log.error("获取支付渠道异常: " + ex.getMessage());
|
|
|
+ // 异常时使用默认支付方式
|
|
|
+ payDetailDialog.hide();
|
|
|
+
|
|
|
+ QRCodeScanDialog qrCodeScanDialog = new QRCodeScanDialog(this);
|
|
|
+ qrCodeScanDialog.setFeeInfo(fee);
|
|
|
+ qrCodeScanDialog.setPaySceneCode("ALI_PCRE"); // 默认支付宝
|
|
|
+ qrCodeScanDialog.setOnCloseListener(() -> {
|
|
|
+ Log.info("二维码弹框关闭,刷新ChargeComponent");
|
|
|
+ if (chargeComponent != null) {
|
|
|
+ chargeComponent.refresh();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ qrCodeScanDialog.setOnPayResultListener(new QRCodeScanDialog.OnPayResultListener() {
|
|
|
+ @Override
|
|
|
+ public void onPaySuccess(String payNo) {
|
|
|
+ Log.info("支付成功: payNo=" + payNo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onPayFailed(String errorMsg) {
|
|
|
+ Log.error("支付失败: " + errorMsg);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onPayTimeout() {
|
|
|
+ Log.info("支付超时");
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ qrCodeScanDialog.show();
|
|
|
+ });
|
|
|
+ return null;
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ // 设置支付订单数据
|
|
|
+ payDetailDialog.setFeeInfo(feeInfo);
|
|
|
+
|
|
|
+ // 显示弹框(弹框内部会自动获取倒计时时间并重新计费)
|
|
|
+ payDetailDialog.show();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 隐藏详情
|
|
|
*/
|