From a735921189d2516d2734f99e5c69c82d1fab44d3 Mon Sep 17 00:00:00 2001 From: Caisking Date: Tue, 17 Jun 2025 19:17:02 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E6=A3=80=E6=B5=8B=E5=A4=B1?= =?utf8?q?=E8=B4=A5=E9=80=80=E5=87=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../include/detection/BPDetectionView.h | 1 + .../bloodpressure/src/detection/BPDetectFailView.cpp | 4 ++-- .../src/detection/BPDetectionPresenter.cpp | 12 ++++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/detection/BPDetectionView.h b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/detection/BPDetectionView.h index d0e19fd7c..640d75461 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/detection/BPDetectionView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/detection/BPDetectionView.h @@ -41,6 +41,7 @@ #define RE_CLICK_BLOOD_PRESSURE "re_click_bloodpressure" #define BP_SOS_CLICK "sos_click" #define EXIE_CLICK "exit_click" +#define RE_CLICK_FAIL "re_click_fail" namespace OHOS { diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectFailView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectFailView.cpp index d7c612aab..449064229 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectFailView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectFailView.cpp @@ -69,9 +69,9 @@ namespace OHOS InitImageView(icon_fail, 131, 131, 100, 100, "image_bp", image_bp); - InitLabel(titlefail, 133, 57, 230, 80, "titlefail","测量失败", DEFAULT_VECTOR_FONT_FILENAME, 30); + InitLabel(titlefail, 133, 57, 200, 50, "titlefail","测量失败", DEFAULT_VECTOR_FONT_FILENAME, 30); - InitButtonExt(ReCheckButton, 118, 360, 230, 80, RE_CLICK_BLOOD_PRESSURE,STR_RECHECK, 30); + InitButtonExt(ReCheckButton, 118, 360, 230, 80, RE_CLICK_FAIL,STR_RECHECK, 30); ReCheckButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xffFF8A36); // 设置按键颜色 UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::BPDetectionPresenter::GetInstance(); ReCheckButton->SetOnClickListener(clickListener);//设置按键监听 diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionPresenter.cpp index 43f080e8c..b518561b6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionPresenter.cpp @@ -103,8 +103,16 @@ namespace OHOS //预警界面->退出 else if (strcmp(view.GetViewId(), EXIE_CLICK) == 0) { - // NavigateBack(); - BPDetectionView::GetInstance()->ChangeView(ERROR_BPVIEW,FAIL_BPVIEW);//test + NavigateBack(); + // BPDetectionView::GetInstance()->ChangeView(ERROR_BPVIEW,FAIL_BPVIEW);//test + } + //检测失败界面->重新检测 + else if (strcmp(view.GetViewId(), RE_CLICK_FAIL) == 0) + { + //设置状态为检测状态 + BPModel::GetInstance()->BP_Control(BPState::BP_DETECTING); + BPDetectionView::GetInstance()->ChangeView(FAIL_BPVIEW,CALIBRATION_BPVIEW); + BPModel::GetInstance()->BP_StartTimer();//开始计时器,计时结束后自动切换到主界面 } return true; } -- 2.17.1