| | |
| | | binding.redRemainderBlance.text = "$balance 元" |
| | | |
| | | // 设置卡状态和对应颜色 |
| | | val cardStatus = when (info.status) { |
| | | val cardStatus = when (info.state) { |
| | | 1 -> "正常" |
| | | 2 -> "挂失" |
| | | 3 -> "锁定" |
| | |
| | | binding.redStatu.text = cardStatus |
| | | |
| | | // 根据卡状态设置不同颜色 |
| | | val statusColor = when (info.status) { |
| | | val statusColor = when (info.state) { |
| | | 1 -> android.graphics.Color.parseColor("#4CAF50") // 绿色-正常 |
| | | 2 -> android.graphics.Color.parseColor("#FF9800") // 橙色-挂失 |
| | | 3 -> android.graphics.Color.parseColor("#F44336") // 红色-锁定 |
| | |
| | | putExtra("bonusAmount", bonusAmount) // 传递赠送金额 |
| | | } |
| | | startActivity(intent) |
| | | |
| | | finish() |
| | | } catch (e: Exception) { |
| | | ToastUtil.show("启动写卡界面失败: ${e.message}") |
| | | } |