From 784681f78d99954d7ef2a486b716404f500ab0dc Mon Sep 17 00:00:00 2001 From: MTing Date: Wed, 10 Sep 2025 15:54:27 +0800 Subject: [PATCH] fix 1 --- .../orderOX/OrderVerificationResultActivity.java | 28 +++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/ouxuan/oxface/orderOX/OrderVerificationResultActivity.java b/app/src/main/java/com/ouxuan/oxface/orderOX/OrderVerificationResultActivity.java index f421260..fb72a9a 100644 --- a/app/src/main/java/com/ouxuan/oxface/orderOX/OrderVerificationResultActivity.java +++ b/app/src/main/java/com/ouxuan/oxface/orderOX/OrderVerificationResultActivity.java @@ -117,6 +117,31 @@ public class OrderVerificationResultActivity extends AppCompatActivity { if (project == null) project = ""; } + /** + * 根据订单类型数字获取对应的中文名称 + * @param orderType 订单类型数字 + * @return 对应的中文名称 + */ + private String getOrderTypeName(String orderType) { + try { + int type = Integer.parseInt(orderType); + switch (type) { + case 0: + return "场次"; + case 1: + return "人次"; + case 3: + return "年月卡"; + case 5: + return "课程"; + default: + return "orderType:"+type; + } + } catch (NumberFormatException e) { + return "未知订单类型"; + } + } + private void updateUI() { // 根据验证类型设置标题 switch (verificationType) { @@ -140,7 +165,8 @@ public class OrderVerificationResultActivity extends AppCompatActivity { // 更新UI内容 tvOrderNo.setText(orderNo); tvVerificationCode.setText(verificationCode); - tvOrderType.setText(orderType); + // 使用 getOrderTypeName 方法转换订单类型显示 + tvOrderType.setText(getOrderTypeName(orderType)); tvCardNo.setText(cardNo); tvStatus.setText(status);