增加消费码支付功能、支付逻辑优化、金额问题优化、订单绑定优化
This commit is contained in:
@@ -121,18 +121,18 @@ class MainScreenPresentation(
|
||||
.d("updateWeight lastWeight = $weight, currentStep = $currentStep, isGoStep1 = $isGoStep1")
|
||||
mealPickupMode = SPUtil.getInstance().get(GlobalKey.KEY_PICKUP_MODE, 0) ?: 0
|
||||
val chargeMode = SPUtil.getInstance().get(GlobalKey.KEY_CHARGE_MODE, 0)
|
||||
if (mealPickupMode == 1 && chargeMode == 0) {
|
||||
//余量计量+计费模式
|
||||
if (isFirstGetWeight && lastWeight > 5) {
|
||||
recognitionWeight = lastWeight
|
||||
isFirstGetWeight = false
|
||||
}
|
||||
if (lastWeight > 5) {
|
||||
//余量计量,有重量的情况下不回到重新识别状态
|
||||
return
|
||||
}
|
||||
isFirstGetWeight = true
|
||||
}
|
||||
// if (mealPickupMode == 1 && chargeMode == 0) {
|
||||
// //余量计量+计费模式
|
||||
// if (isFirstGetWeight && lastWeight > 5) {
|
||||
// recognitionWeight = lastWeight
|
||||
// isFirstGetWeight = false
|
||||
// }
|
||||
// if (lastWeight > 5) {
|
||||
// //余量计量,有重量的情况下不回到重新识别状态
|
||||
// return
|
||||
// }
|
||||
// isFirstGetWeight = true
|
||||
// }
|
||||
if (currentStep == 2 && lastWeight <= 5 && isGoStep1) {
|
||||
//人脸识别过程中,秤上物品拿走
|
||||
isGoStep1 = false
|
||||
@@ -1109,7 +1109,8 @@ class MainScreenPresentation(
|
||||
activity.createOrder(
|
||||
foodInfo = currentFood!!,
|
||||
foodWeight = lastWeight.roundToInt(),
|
||||
eatWeight = eatWeight.roundToInt()
|
||||
eatWeight = eatWeight.roundToInt(),
|
||||
eatNum = activity.getEatNum(eatWeight, currentFood!!.specWeight)
|
||||
) {
|
||||
if (MyApp.DEBUG) {
|
||||
ToastUtils.showToast("订单已生成")
|
||||
|
||||
Reference in New Issue
Block a user