|
@@ -566,7 +566,7 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
public void onComplete() {
|
|
|
}
|
|
|
});
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
LogUtils.logWrite("没有MDB硬币器");
|
|
|
}
|
|
|
Log.d(TAG, "MDB_COIN: 4");
|
|
@@ -778,6 +778,9 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
Log.d(TAG, "onClickListener: 1");
|
|
|
handlePaymentSelection(5, R.id.iv_qr_code, () -> carsPay(str()));//国内二码合一支付
|
|
|
break;
|
|
|
+ case R.id.btn_discounts_code:
|
|
|
+ handlePaymentSelection(0, R.id.btn_discounts_code, null);
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -799,18 +802,20 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
return; // 直接返回,不继续执行
|
|
|
} else {
|
|
|
if (PreventSpeedClickUtil.isFastClick()) {
|
|
|
- Log.d(TAG, "PreventSpeedClickUtil:1 ");
|
|
|
getDiscountCodeOverseas(arrayCode[shoppingNumber], id);
|
|
|
} else {
|
|
|
- Log.d(TAG, "PreventSpeedClickUtil:2 ");
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
// manualMake();
|
|
|
- fallbackAction.run(); // 执行对应的回调方法
|
|
|
+ if (fallbackAction != null) {
|
|
|
+ fallbackAction.run(); // 执行对应的回调方法
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
- fallbackAction.run(); // 执行对应的回调方法
|
|
|
+ if (fallbackAction != null) {
|
|
|
+ fallbackAction.run(); // 执行对应的回调方法
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2569,6 +2574,9 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
Log.d(TAG, "type onNext: " + type);
|
|
|
switch (type) {
|
|
|
case "0":
|
|
|
+ if (R.id.btn_discounts_code == id) {
|
|
|
+ showToast(UiUtil.getStringRes(R.string.promotioncode5));
|
|
|
+ }
|
|
|
//成功
|
|
|
getConfirmCodeOverseas(code, id);
|
|
|
break;
|
|
@@ -2597,11 +2605,16 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
LogUtil.d("优惠码过期了哦!", type + "");
|
|
|
break;
|
|
|
case "success":
|
|
|
- if (Global.isVersions == 2) {
|
|
|
- getConfirmCodeOverseas(code, id);
|
|
|
+ if (R.id.btn_discounts_code == id) {
|
|
|
+ showToast(UiUtil.getStringRes(R.string.promotioncode5));
|
|
|
} else {
|
|
|
- getConfirmCodeSuccess(1, id);
|
|
|
+ if (Global.isVersions == 2) {
|
|
|
+ getConfirmCodeOverseas(code, id);
|
|
|
+ } else {
|
|
|
+ getConfirmCodeSuccess(1, id);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
|
|
|
}
|
|
@@ -2640,8 +2653,13 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
type = "0"; // 设置为默认值
|
|
|
}
|
|
|
Log.d(TAG, "onClick:orderHelper:0 " + priceList);
|
|
|
-
|
|
|
- double price = priceList.get(shoppingNumber);
|
|
|
+ double price;
|
|
|
+ if (!priceList.isEmpty()) {
|
|
|
+ price = priceList.get(shoppingNumber);
|
|
|
+ } else {
|
|
|
+ price = pri;
|
|
|
+ Log.d(TAG, "onNext:关闭购物车 " + price);
|
|
|
+ }
|
|
|
double total = 0;
|
|
|
double total1 = 0;
|
|
|
|
|
@@ -2694,6 +2712,9 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
} else if (id == R.id.iv_qr_code) {
|
|
|
carsPay(str());
|
|
|
}
|
|
|
+ if (pri == 0 && id == R.id.btn_discounts_code) {
|
|
|
+ manualMake();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void updateCode(String code) {
|