From: Caisking Date: Sat, 20 Sep 2025 13:44:08 +0000 (+0800) Subject: 修复绑定的交互逻辑 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~27 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=89b73addb98c6dd6ea5400f34c38f22c573ba5cd;p=mirrors%2FFD230.git 修复绑定的交互逻辑 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h index dbf78d5fe..b7bd65f52 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h @@ -135,7 +135,7 @@ namespace OHOS // IMEI状态管理函数 bool IsIMEIValid() const; void CheckIMEIStatus(); - void SetIMEIValid(bool valid); + // 对话状态相关函数 int GetConversationStatus(); diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index ca5d7614e..1b87c871b 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -231,30 +231,7 @@ } - // ==================== 开机操作函数 ==================== - int ThunderBirdModel::StartBootOperation() - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation"); - //绑定设备提示 > 配置更新成功>OTA升级>其他(按触发时间先后提示) - /*************************用户是否绑定*************************/ - do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_USER_ID, nullptr, 0);//获取用户是否绑定 - if(uapi_ln_is_device_bound() == 0 || uapi_ln_is_device_bound() == -1)//未绑定 - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation: 未绑定"); - //ThunderBirdMainView::GetInstance()->ChangeView(MAXVIEW, THUNDERBIRD_GUIDEVIEW, ThunderBirdGuideView::THUNDERBIRD_GUIDEVIEW_1); - return 0; - } - else if(uapi_ln_is_device_bound() == 1)//已绑定 - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation: 已绑定"); - //ThunderBirdMainView::GetInstance()->ChangeView(MAXVIEW, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_SPEAKING); - return 1; - } - - /*************************更新角色配置*************************/ - //do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_CHARACTER, nullptr, 0);//获取角色配置 - return -1; - } + /*************************OTA升级*************************/ int ThunderBirdModel::ota_update_boot() @@ -304,6 +281,21 @@ } // ==================== 新手引导相关函数 ==================== + + // ==================== 开机操作函数 ==================== + int ThunderBirdModel::StartBootOperation() + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation"); + //绑定设备提示 > 配置更新成功>OTA升级>其他(按触发时间先后提示) + /*************************用户是否绑定*************************/ + do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_USER_ID, nullptr, 0);//获取用户是否绑定 + if(CheckBindingStatus() != BindingStatus::BOUND)//未绑定 + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation: 未绑定"); + return 0; + } + return 1; + } //判断是否绑定 ThunderBirdModel::BindingStatus ThunderBirdModel::CheckBindingStatus() { @@ -1181,12 +1173,6 @@ WEARABLE_LOGD("IMEI status checked: valid=%d", m_imeiValid); } - void ThunderBirdModel::SetIMEIValid(bool valid) - { - m_imeiValid = valid; - m_imeiChecked = true; - WEARABLE_LOGD("IMEI status set: valid=%d", m_imeiValid); - } } \ No newline at end of file diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp index c3c413079..1f427da93 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp @@ -604,7 +604,7 @@ namespace OHOS ThunderBirdModel::GetInstance()->CheckIMEIStatus(); // 检查IMEI是否有效 - if (!ThunderBirdModel::GetInstance()->IsIMEIValid()) { + if (ThunderBirdModel::GetInstance()->IsIMEIValid()) { return; }