272:添加监管信息页面 2869/1 2869/head 2870/target/1
authorluozheng <1732036298@qq.com>
Fri, 5 Dec 2025 07:44:40 +0000 (15:44 +0800)
committerluozheng <1732036298@qq.com>
Fri, 5 Dec 2025 07:44:40 +0000 (15:44 +0800)
code/sdk/application/wearable/fd272/nativeapp/nativeui/system/include/SystemAboutTheWatchView.h
code/sdk/application/wearable/fd272/nativeapp/nativeui/system/include/SystemSuperVisionInfoView.h [new file with mode: 0644]
code/sdk/application/wearable/fd272/nativeapp/nativeui/system/include/SystemView.h
code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemAboutTheWatchView.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemPresenter.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemSuperVisionInfoView.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemView.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/watchQRcode/src/WatchQRCodeView.cpp
code/sdk/build/config/target_config/brandy/config.py

index 1f943bd..7d49b31 100644 (file)
 #include "components/ui_label.h"\r
 #include "components/ui_label_ext.h"\r
 #include "components/ui_image_view.h"\r
+#include "components/ui_label_button_ext.h"\r
 #include <iostream>\r
 namespace OHOS\r
 {\r
     static constexpr const char *SYSTEMABOUTTHEWATCHVIEWID = "SystemAboutTheWatchView";   // 关于手表\r
+    static constexpr const char *VIEW_ID_SUPERVISIONINFO_TITLE_BUTTON = "VIEW_ID_SUPERVISIONINFO_TITLE_BUTTON";   // 监管信息标题按钮\r
     class SystemAboutTheWatchView\r
     {\r
 \r
@@ -68,6 +70,8 @@ namespace OHOS
         UILabel *CyweeVersion = nullptr;\r
         UILabel *APNprotocolTitle = nullptr;     //APN协议\r
         UILabel * APNprotocol = nullptr;\r
+        UILabel *SupervisionInfoTitle{nullptr};          //监管信息Title\r
+        UILabelButton *SupervisionInfoTitleButton{nullptr};//监管信息Title按钮\r
         bool initViewStatus{false};\r
     };\r
 }\r
diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/system/include/SystemSuperVisionInfoView.h b/code/sdk/application/wearable/fd272/nativeapp/nativeui/system/include/SystemSuperVisionInfoView.h
new file mode 100644 (file)
index 0000000..d4d16f5
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef SYSTEMSUPERVISIONINFOVIEW_H
+#define SYSTEMSUPERVISIONINFOVIEW_H
+
+#include "components/ui_label_ext.h"
+#include "components/ui_button.h"
+#include "components/ui_image_view.h"
+#include "components/ui_scroll_view.h"
+
+namespace OHOS
+{
+    static constexpr const char *SYSTEMSUPERVISIONINFOVIEWID = "SystemSuperVisionInfoView";   // 监管信息
+    class SystemSuperVisionInfoView
+    {
+    public:
+        SystemSuperVisionInfoView();
+        ~SystemSuperVisionInfoView();
+
+        UIScrollView *SystemSuperVisionInfoViewInit(void);
+        struct LabelConfig
+        {
+            int16_t left;
+            int16_t top;
+            int16_t width;
+            int16_t height;
+            int16_t fontSize;      // 字体大小
+            int16_t lineHeigh;     // 行高
+            std::string text;      // 文本
+            uint16_t textId;      
+            uint8_t lineBreakMode; // 断行模式。
+        };
+
+    private:
+        void ClearAll(void);
+        UILabelExt *InitLabel_Ext(LabelConfig &labelConfig);
+        UILabel *InitLabel(LabelConfig &labelConfig);
+        UIScrollView *SystemSuperVisionInfoScrollView{nullptr};
+        UILabel *title{nullptr};
+        //型号
+        UILabel *watchModelTitle{nullptr};
+        UILabel *watchModel{nullptr};
+        //输入信息
+        UILabel *inputInfoTitle{nullptr};
+        UILabel *inputInfo1{nullptr};
+        UILabel *inputInfo2{nullptr};
+        //产品名称
+        UILabel *productNameTitle{nullptr};
+        UILabel *productName{nullptr};
+        //CMIT ID
+        UILabel *cmitTitle{nullptr};
+        UILabel *cmit{nullptr};
+        //公司名称
+        UILabel *companyNameTitle{nullptr};
+        UILabel *companyName{nullptr};
+    };
+
+}
+
+#endif // SYSTEMSUPERVISIONINFOVIEW_H
\ No newline at end of file
index 93a73ca..d6eb50d 100644 (file)
@@ -25,6 +25,7 @@
 #include "system/include/SystemShutdown.h"\r
 #include "system/include/SystemRestart.h"\r
 #include "rebootandshutdown/include/ShutDownImageAnimatorView.h"\r
+#include "system/include/SystemSuperVisionInfoView.h"\r
 namespace OHOS\r
 {\r
     static constexpr const char *ABOUT_THE_WATCH = "AboutTheWatchButton";       // 关于手表\r
@@ -45,6 +46,7 @@ namespace OHOS
         SHUTDOWNVIEW,         // 关机视图(subView)\r
         FACTORYRESETVIEW,     // 恢复出厂设置视图(subView)\r
         SHUTDOWNANIMATIONVIEW, // 关机动画(subView)\r
+        SUPERVISIONINFOVIEW, // 监管信息视图(subView)\r
         MAX_SYSTEMVIEWID,\r
     } SYSTEMVIEWID;\r
 \r
@@ -87,6 +89,7 @@ namespace OHOS
         bool ChangeToSystemRestartView(int16_t thisView);\r
         bool ChangeToSystemShutdownView(int16_t thisView);\r
         bool ChangeToSystemShutdownAnimatorView(int16_t thisView);\r
+        bool ChangeToSystemSuperVisionInfoView(int16_t thisView);\r
         bool ClickFunc(int16_t interface);\r
         bool CheckViewParam(int16_t hideView, int16_t showView);\r
         void ChangeView(int16_t hideView, int16_t showView);\r
@@ -98,6 +101,7 @@ namespace OHOS
         SystemRestart *p_SystemRestart{nullptr};                         // 重启\r
         SystemShutdown *p_SystemShutdown{nullptr};                       // 关机\r
         ShutDownImageAnimatorView *p_ShutDownImageAnimatorView{nullptr}; // 关机动画\r
+        SystemSuperVisionInfoView *p_SystemSuperVisionInfoView{nullptr}; // 监管信息视图\r
 \r
     private:\r
         UILabelButtonExt *SystemViewLabelButtonInit(ButtonConfig &buttonconfig);\r
index 305c756..81bd2d1 100644 (file)
@@ -30,6 +30,7 @@
 #define WATCH_FONT_VALUE_TOP (WATCH_FONT_TOP + WATCH_ABOUT_TITLE_HEIGHT)\r
 #define WATCH_CYWEEVER_TOP (WATCH_FONT_VALUE_TOP + WATCH_ABOUT_VALUE_HEIGHT)\r
 #define WATCH_CYWEEVER_TOP_VALUE_TOP (WATCH_CYWEEVER_TOP + WATCH_ABOUT_TITLE_HEIGHT)\r
+#define WATCH_SUPERVISIONINFO_TOP (WATCH_CYWEEVER_TOP_VALUE_TOP + WATCH_ABOUT_VALUE_HEIGHT)\r
 \r
 namespace OHOS\r
 {\r
@@ -136,6 +137,11 @@ namespace OHOS
             delete APNprotocol;\r
             APNprotocol = nullptr;\r
 \r
+            delete SupervisionInfoTitleButton;\r
+            SupervisionInfoTitleButton = nullptr;\r
+            delete SupervisionInfoTitle;\r
+            SupervisionInfoTitle = nullptr;\r
+\r
             delete SystemAboutTheWatchScrollView;\r
             SystemAboutTheWatchScrollView = nullptr;\r
         }\r
@@ -195,6 +201,7 @@ namespace OHOS
         SystemAboutTheWatchScrollView->SetSwipeACCLevel(200); /*设置手指抬起屏幕后的补偿距离。*/\r
         SystemAboutTheWatchScrollView->RequestFocus();\r
         SystemAboutTheWatchScrollView->SetRotateFactor(1.0);\r
+        SystemAboutTheWatchScrollView->SetScrollBlankSize(75, OHOS::UIAbstractScroll::Direction::BOTTOM);\r
         UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemPresenter::GetInstance());\r
         if (draglistener == nullptr)\r
         {\r
@@ -678,6 +685,43 @@ namespace OHOS
         CyweeVersion->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
         SystemAboutTheWatchScrollView->Add(CyweeVersion);\r
 \r
+        /* -------------------------------------------------------------------------- */\r
+        SupervisionInfoTitleButton = new UILabelButton();\r
+        if (SupervisionInfoTitleButton == nullptr)\r
+        {\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::SupervisionInfoTitleButton new fail!");\r
+            return nullptr;\r
+        }\r
+        SupervisionInfoTitleButton->SetPosition((HORIZONTAL_RESOLUTION-380)/2, WATCH_SUPERVISIONINFO_TOP, 380, 100);\r
+        SupervisionInfoTitleButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        SupervisionInfoTitleButton->SetViewId(VIEW_ID_SUPERVISIONINFO_TITLE_BUTTON);\r
+        SupervisionInfoTitleButton->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff000000, UIButton::PRESSED);\r
+        SupervisionInfoTitleButton->SetOnClickListener(SystemPresenter::GetInstance());\r
+        SystemAboutTheWatchScrollView->Add(SupervisionInfoTitleButton);\r
+        /* -------------------------------------------------------------------------- */\r
+        Config = {\r
+            .left = TITLE_LABEL_X,\r
+            .top = (int16_t)(SupervisionInfoTitleButton->GetY() + (SupervisionInfoTitleButton->GetHeight()-TITLE_LABEL_H) / 2),\r
+            .width = TITLE_LABEL_W,\r
+            .height = TITLE_LABEL_H,\r
+            .fontSize = TITLE_LABEL_FONTSIZE,\r
+            .lineHeigh = TITLE_LABEL_LINEHEIGHT,\r
+            .text = "监管信息",\r
+            .textId = 0,\r
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,\r
+        };\r
+        SupervisionInfoTitle = InitLabel(Config);\r
+        if (SupervisionInfoTitle == nullptr)\r
+        {\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::SupervisionInfoTitle new fail!");\r
+            return nullptr;\r
+        }\r
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SupervisionInfoTitle:(%d,%d,%d,%d)",\r
+            SupervisionInfoTitle->GetX(),\r
+            SupervisionInfoTitle->GetY(),\r
+            SupervisionInfoTitle->GetWidth(),\r
+            SupervisionInfoTitle->GetHeight());\r
+        SystemAboutTheWatchScrollView->Add(SupervisionInfoTitle);\r
         /* -------------------------------------------------------------------------- */\r
         initViewStatus = true;\r
         return SystemAboutTheWatchScrollView;\r
index 18a9769..fdd3fbe 100644 (file)
@@ -104,6 +104,10 @@ namespace OHOS
             {\r
                 p_SystemView->ChangeView(FACTORYRESETVIEW, SYSTEMVIEW);\r
             }\r
+            else if (&view == p_SystemView->GetSystemScrollView(SUPERVISIONINFOVIEW))\r
+            {\r
+                p_SystemView->ChangeView(SUPERVISIONINFOVIEW, SYSTEMVIEW);\r
+            }\r
             SystemPresenter::X_DRAG_FLAG = false;\r
             return true;\r
         }\r
@@ -121,6 +125,12 @@ namespace OHOS
             return false;\r
         }\r
 \r
+        if (strcmp(view.GetViewId(), VIEW_ID_SUPERVISIONINFO_TITLE_BUTTON) == 0) // 点击进入监管信息界面\r
+        {\r
+            p_SystemView->ChangeView(SYSTEMVIEW, SUPERVISIONINFOVIEW);\r
+            return true;\r
+        }\r
+\r
         if (strcmp(view.GetViewId(), SYSTEMABOUTTHEWATCHVIEWID) == 0) // 连续点击进入产测模式\r
         {\r
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchTitle");\r
diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemSuperVisionInfoView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemSuperVisionInfoView.cpp
new file mode 100644 (file)
index 0000000..c663542
--- /dev/null
@@ -0,0 +1,420 @@
+#include "system/include/SystemSuperVisionInfoView.h"
+#include "system/include/SystemPresenter.h"
+#include "wearable_log.h"
+#include "common/screen.h"
+
+#define SUPERVISIONINFO_TITLE_HEIGHT 165
+#define SUPERVISIONINFO_VALUE_HEIGHT 55
+#define WatchModelTitle_POS_TOP 160
+#define WatchModel_POS_TOP (WatchModelTitle_POS_TOP + SUPERVISIONINFO_VALUE_HEIGHT)
+#define inputInfoTitle_POS_TOP (WatchModelTitle_POS_TOP + SUPERVISIONINFO_TITLE_HEIGHT)
+#define inputInfo1_POS_TOP (inputInfoTitle_POS_TOP + SUPERVISIONINFO_VALUE_HEIGHT)
+#define inputInfo2_POS_TOP (inputInfo1_POS_TOP + SUPERVISIONINFO_VALUE_HEIGHT)
+#define productNameTitle_POS_TOP (inputInfoTitle_POS_TOP + SUPERVISIONINFO_TITLE_HEIGHT)
+#define productName_POS_TOP (productNameTitle_POS_TOP + SUPERVISIONINFO_VALUE_HEIGHT)
+#define cmitTitle_POS_TOP (productNameTitle_POS_TOP + SUPERVISIONINFO_TITLE_HEIGHT)
+#define cmit_POS_TOP (cmitTitle_POS_TOP + SUPERVISIONINFO_VALUE_HEIGHT)
+#define companyNameTitle_POS_TOP (cmitTitle_POS_TOP + SUPERVISIONINFO_TITLE_HEIGHT)
+#define companyName_POS_TOP (companyNameTitle_POS_TOP + SUPERVISIONINFO_VALUE_HEIGHT)
+
+namespace OHOS
+{
+
+    static constexpr uint16_t TITLE_LABEL_X = 53;
+    static constexpr uint16_t TITLE_LABEL_W = 360;
+    static constexpr uint16_t TITLE_LABEL_H = 35;
+    static constexpr uint16_t TITLE_LABEL_FONTSIZE = 30;
+    static constexpr uint16_t TITLE_LABEL_LINEHEIGHT = 35;
+
+    static constexpr uint16_t LABEL_X = 33;
+    static constexpr uint16_t LABEL_W = 400;
+    static constexpr uint16_t LABEL_H = 35;
+    static constexpr uint16_t LABEL_FONTSIZE = 30;
+    static constexpr uint16_t LABEL_LINEHEIGHT = 35;
+
+    SystemSuperVisionInfoView::SystemSuperVisionInfoView()
+    {
+    }
+    SystemSuperVisionInfoView::~SystemSuperVisionInfoView()
+    {
+        ClearAll();
+    }
+
+    void SystemSuperVisionInfoView::ClearAll(void)
+    {
+        if (SystemSuperVisionInfoScrollView != nullptr)
+        {
+            SystemSuperVisionInfoScrollView->RemoveAll();
+            delete SystemSuperVisionInfoScrollView;
+            SystemSuperVisionInfoScrollView = nullptr;
+
+            if (title != nullptr)
+            {
+                delete title;
+                title = nullptr;
+            }
+            // 型号
+            if (watchModelTitle != nullptr)
+            {
+                delete watchModelTitle;
+                watchModelTitle = nullptr;
+            }
+            if (watchModel != nullptr)
+            {
+                delete watchModel;
+                watchModel = nullptr;
+            }
+            // 输入信息
+            if (inputInfoTitle != nullptr)
+            {
+                delete inputInfoTitle;
+                inputInfoTitle = nullptr;
+            }
+            if (inputInfo1 != nullptr)
+            {
+                delete inputInfo1;
+                inputInfo1 = nullptr;
+            }
+            if (inputInfo2 != nullptr)
+            {
+                delete inputInfo2;
+                inputInfo2 = nullptr;
+            }
+            // 产品名称
+            if (productNameTitle != nullptr)
+            {
+                delete productNameTitle;
+                productNameTitle = nullptr;
+            }
+            if (productName != nullptr)
+            {
+                delete productName;
+                productName = nullptr;
+            }
+            // CMIT ID
+            if (cmitTitle != nullptr)
+            {
+                delete cmitTitle;
+                cmitTitle = nullptr;
+            }
+            if (cmit != nullptr)
+            {
+                delete cmit;
+                cmit = nullptr;
+            }
+            // 公司名称
+            if (companyNameTitle != nullptr)
+            {
+                delete companyNameTitle;
+                companyNameTitle = nullptr;
+            }
+            if (companyName != nullptr)
+            {
+                delete companyName;
+                companyName = nullptr;
+            }
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::ClearAll");
+        }
+    }
+
+    UILabelExt *SystemSuperVisionInfoView::InitLabel_Ext(LabelConfig &labelConfig)
+    {
+        UILabelExt *label = new UILabelExt();
+        if (label == nullptr)
+        {
+            return nullptr;
+        }
+        label->SetPosition(labelConfig.left, labelConfig.top, labelConfig.width, labelConfig.height); // 位置大小
+        label->SetStyle(STYLE_TEXT_FONT, labelConfig.fontSize);                                       // 字体大小
+        label->SetStyle(STYLE_LINE_HEIGHT, labelConfig.lineHeigh);                                    // 字体行高
+        // label->SetText(labelConfig.text.c_str());                                                  // 内容
+        label->SetTextId(labelConfig.textId);
+        label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。
+        label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP);
+        label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize);
+        return label;
+    }
+
+    UILabel *SystemSuperVisionInfoView::InitLabel(LabelConfig &labelConfig)
+    {
+        UILabel *label = new UILabel();
+        if (label == nullptr)
+        {
+            return nullptr;
+        }
+        label->SetPosition(labelConfig.left, labelConfig.top, labelConfig.width, labelConfig.height); // 位置大小
+        label->SetStyle(STYLE_TEXT_FONT, labelConfig.fontSize);                                       // 字体大小
+        label->SetStyle(STYLE_LINE_HEIGHT, labelConfig.lineHeigh);                                    // 字体行高
+        label->SetText(labelConfig.text.c_str());                                                     // 内容
+        label->SetLineBreakMode(labelConfig.lineBreakMode);                                           // 断行模式。
+        label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP);
+        label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize);
+        return label;
+    }
+
+    UIScrollView *SystemSuperVisionInfoView::SystemSuperVisionInfoViewInit(void)
+    {
+        SystemSuperVisionInfoScrollView = new UIScrollView();
+        if (SystemSuperVisionInfoScrollView == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::SystemSuperVisionInfoScrollView new fail!");
+            return nullptr;
+        }
+        SystemSuperVisionInfoScrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+        SystemSuperVisionInfoScrollView->SetViewId(SYSTEMSUPERVISIONINFOVIEWID);
+        SystemSuperVisionInfoScrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+        SystemSuperVisionInfoScrollView->SetStyle(STYLE_BORDER_RADIUS, 1294);
+        SystemSuperVisionInfoScrollView->SetScrollBlankSize(30);
+        SystemSuperVisionInfoScrollView->SetReboundSize(30);
+        SystemSuperVisionInfoScrollView->SetDirection(1);
+        SystemSuperVisionInfoScrollView->SetThrowDrag(true);
+        SystemSuperVisionInfoScrollView->SetMaxScrollDistance(1000);
+        SystemSuperVisionInfoScrollView->SetSwipeACCLevel(200); /*设置手指抬起屏幕后的补偿距离。*/
+        SystemSuperVisionInfoScrollView->RequestFocus();
+        SystemSuperVisionInfoScrollView->SetRotateFactor(1.0);
+        SystemSuperVisionInfoScrollView->SetScrollBlankSize(30, OHOS::UIAbstractScroll::Direction::BOTTOM);
+        UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemPresenter::GetInstance());
+        if (draglistener == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::draglistener can not be nullptr!");
+            return nullptr;
+        }
+        SystemSuperVisionInfoScrollView->SetOnDragListener(draglistener);
+        /* -------------------------------------------------------------------------- */
+        LabelConfig Config = {
+            .left = 83,
+            .top = 50,
+            .width = 300,
+            .height = 35,
+            .fontSize = 30,
+            .lineHeigh = 35,
+            .text = "监管信息",
+            .textId = 0,
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
+        };
+        title = InitLabel(Config);
+        if (title == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::title new fail!");
+            return nullptr;
+        }
+        SystemSuperVisionInfoScrollView->Add(title);
+        /* -------------------------------------------------------------------------- */
+        // 型号
+        Config = {
+            .left = TITLE_LABEL_X,
+            .top = WatchModelTitle_POS_TOP,
+            .width = TITLE_LABEL_W,
+            .height = TITLE_LABEL_H,
+            .fontSize = TITLE_LABEL_FONTSIZE,
+            .lineHeigh = TITLE_LABEL_LINEHEIGHT,
+            .text = "型号",
+            .textId = 0,
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
+        };
+        watchModelTitle = InitLabel(Config);
+        if (watchModelTitle == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::watchModelTitle new fail!");
+            return nullptr;
+        }
+        SystemSuperVisionInfoScrollView->Add(watchModelTitle);
+        /* -------------------------------------------------------------------------- */
+        Config = {
+            .left = LABEL_X,
+            .top = WatchModel_POS_TOP,
+            .width = LABEL_W,
+            .height = LABEL_H,
+            .fontSize = LABEL_FONTSIZE,
+            .lineHeigh = LABEL_LINEHEIGHT,
+            .text = "VITA",
+            .lineBreakMode = UILabel::LINE_BREAK_WRAP,
+        };
+        watchModel = InitLabel(Config);
+        if (watchModel == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::watchModel new fail!");
+            return nullptr;
+        }
+        watchModel->SetTextColor(Color::GetColorFromRGBA(0x88, 0x88, 0x88, 0xff));
+        SystemSuperVisionInfoScrollView->Add(watchModel);
+        /* -------------------------------------------------------------------------- */
+        // 输入信息
+        Config = {
+            .left = TITLE_LABEL_X,
+            .top = inputInfoTitle_POS_TOP,
+            .width = TITLE_LABEL_W,
+            .height = TITLE_LABEL_H,
+            .fontSize = TITLE_LABEL_FONTSIZE,
+            .lineHeigh = TITLE_LABEL_LINEHEIGHT,
+            .text = "输入信息",
+            .textId = 0,
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
+        };
+        inputInfoTitle = InitLabel(Config);
+        if (inputInfoTitle == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::inputInfoTitle new fail!");
+            return nullptr;
+        }
+        SystemSuperVisionInfoScrollView->Add(inputInfoTitle);
+        /* -------------------------------------------------------------------------- */
+        Config = {
+            .left = LABEL_X,
+            .top = inputInfo1_POS_TOP,
+            .width = LABEL_W,
+            .height = LABEL_H,
+            .fontSize = LABEL_FONTSIZE,
+            .lineHeigh = LABEL_LINEHEIGHT,
+            .text = "5.0 V DC",
+            .lineBreakMode = UILabel::LINE_BREAK_WRAP,
+        };
+        inputInfo1 = InitLabel(Config);
+        if (inputInfo1 == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::inputInfo1 new fail!");
+            return nullptr;
+        }
+        inputInfo1->SetTextColor(Color::GetColorFromRGBA(0x88, 0x88, 0x88, 0xff));
+        SystemSuperVisionInfoScrollView->Add(inputInfo1);
+        /* -------------------------------------------------------------------------- */
+        Config = {
+            .left = LABEL_X,
+            .top = (int16_t)(inputInfo1->GetY() + inputInfo1->GetHeight() + 10),
+            .width = LABEL_W,
+            .height = LABEL_H,
+            .fontSize = LABEL_FONTSIZE,
+            .lineHeigh = LABEL_LINEHEIGHT,
+            .text = "500mA Max",
+            .lineBreakMode = UILabel::LINE_BREAK_WRAP,
+        };
+        inputInfo2 = InitLabel(Config);
+        if (inputInfo2 == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::inputInfo2 new fail!");
+            return nullptr;
+        }
+        inputInfo2->SetTextColor(Color::GetColorFromRGBA(0x88, 0x88, 0x88, 0xff));
+        SystemSuperVisionInfoScrollView->Add(inputInfo2);
+        /* -------------------------------------------------------------------------- */
+        // 产品名称
+        Config = {
+            .left = TITLE_LABEL_X,
+            .top = productNameTitle_POS_TOP,
+            .width = TITLE_LABEL_W,
+            .height = TITLE_LABEL_H,
+            .fontSize = TITLE_LABEL_FONTSIZE,
+            .lineHeigh = TITLE_LABEL_LINEHEIGHT,
+            .text = "产品名称",
+            .textId = 0,
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
+        };
+        productNameTitle = InitLabel(Config);
+        if (productNameTitle == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::productNameTitle new fail!");
+            return nullptr;
+        }
+        SystemSuperVisionInfoScrollView->Add(productNameTitle);
+        /* -------------------------------------------------------------------------- */
+        Config = {
+            .left = LABEL_X,
+            .top = productName_POS_TOP,
+            .width = LABEL_W,
+            .height = LABEL_H,
+            .fontSize = LABEL_FONTSIZE,
+            .lineHeigh = LABEL_LINEHEIGHT,
+            .text = "智能手表",
+            .lineBreakMode = UILabel::LINE_BREAK_WRAP,
+        };
+        productName = InitLabel(Config);
+        if (productName == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::productName new fail!");
+            return nullptr;
+        }
+        productName->SetTextColor(Color::GetColorFromRGBA(0x88, 0x88, 0x88, 0xff));
+        SystemSuperVisionInfoScrollView->Add(productName);
+        /* -------------------------------------------------------------------------- */
+        // CMIT ID
+        Config = {
+            .left = TITLE_LABEL_X,
+            .top = cmitTitle_POS_TOP,
+            .width = TITLE_LABEL_W,
+            .height = TITLE_LABEL_H,
+            .fontSize = TITLE_LABEL_FONTSIZE,
+            .lineHeigh = TITLE_LABEL_LINEHEIGHT,
+            .text = "CMIT ID",
+            .textId = 0,
+            .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
+        };
+        cmitTitle = InitLabel(Config);
+        if (cmitTitle == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::cmitTitle new fail!");
+            return nullptr;
+        }
+        SystemSuperVisionInfoScrollView->Add(cmitTitle);
+        /* -------------------------------------------------------------------------- */
+        Config = {
+            .left = LABEL_X,
+            .top = cmit_POS_TOP,
+            .width = LABEL_W,
+            .height = LABEL_H,
+            .fontSize = LABEL_FONTSIZE,
+            .lineHeigh = LABEL_LINEHEIGHT,
+            .text = "XXXXXXXXXXX",
+            .lineBreakMode = UILabel::LINE_BREAK_WRAP,
+        };
+        cmit = InitLabel(Config);
+        if (cmit == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::cmit new fail!");
+            return nullptr;
+        }
+        cmit->SetTextColor(Color::GetColorFromRGBA(0x88, 0x88, 0x88, 0xff));
+        SystemSuperVisionInfoScrollView->Add(cmit);
+        /* -------------------------------------------------------------------------- */
+        // 公司名称
+        Config = {
+            .left = TITLE_LABEL_X,
+            .top = companyNameTitle_POS_TOP,
+            .width = TITLE_LABEL_W,
+            .height = TITLE_LABEL_H,
+            .fontSize = TITLE_LABEL_FONTSIZE,
+            .lineHeigh = TITLE_LABEL_LINEHEIGHT,
+            .text = "杭州扶鹰健康\n科技有限公司",
+            .textId = 0,
+            .lineBreakMode = UILabel::LINE_BREAK_ADAPT,
+        };
+        companyNameTitle = InitLabel(Config);
+        if (companyNameTitle == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::companyNameTitle new fail!");
+            return nullptr;
+        }
+        companyNameTitle->SetX((HORIZONTAL_RESOLUTION - companyNameTitle->GetWidth()) / 2);
+        SystemSuperVisionInfoScrollView->Add(companyNameTitle);
+        /* -------------------------------------------------------------------------- */
+        Config = {
+            .left = LABEL_X,
+            .top = (int16_t)(companyNameTitle->GetY() + companyNameTitle->GetHeight() + 35),
+            .width = LABEL_W,
+            .height = LABEL_H,
+            .fontSize = LABEL_FONTSIZE,
+            .lineHeigh = LABEL_LINEHEIGHT,
+            .text = "中国制造",
+            .lineBreakMode = UILabel::LINE_BREAK_WRAP,
+        };
+        companyName = InitLabel(Config);
+        if (companyName == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperVisionInfoView::companyName new fail!");
+            return nullptr;
+        }
+        companyName->SetTextColor(Color::GetColorFromRGBA(0x88, 0x88, 0x88, 0xff));
+        SystemSuperVisionInfoScrollView->Add(companyName);
+        /* -------------------------------------------------------------------------- */
+        return SystemSuperVisionInfoScrollView;
+    }
+}
\ No newline at end of file
index 983a75c..7275990 100644 (file)
@@ -107,6 +107,11 @@ namespace OHOS
             delete p_ShutDownImageAnimatorView;\r
             p_ShutDownImageAnimatorView = nullptr;\r
         }\r
+        if (p_SystemSuperVisionInfoView != nullptr)\r
+        {\r
+            delete p_SystemSuperVisionInfoView;\r
+            p_SystemSuperVisionInfoView = nullptr;\r
+        }\r
         for (int i = SYSTEMVIEW; i < MAX_SYSTEMVIEWID; i++)\r
         {\r
             SystemScrollView[i] = nullptr;\r
@@ -455,6 +460,24 @@ namespace OHOS
         return true;\r
     }\r
 \r
+    // 监管信息\r
+    bool SystemView::ChangeToSystemSuperVisionInfoView(int16_t thisView)\r
+    {\r
+        if (SystemScrollView[thisView] == nullptr)\r
+        {\r
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeToSystemSuperVisionInfoView");\r
+            p_SystemSuperVisionInfoView = new SystemSuperVisionInfoView();\r
+            if (p_SystemSuperVisionInfoView == nullptr)\r
+            {\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: new scrollView[%d] fail", thisView);\r
+                return false;\r
+            }\r
+            SystemScrollView[thisView] = p_SystemSuperVisionInfoView->SystemSuperVisionInfoViewInit();\r
+            AddViewToRootContainer(SystemScrollView[thisView]);\r
+        }\r
+        return true;\r
+    }\r
+\r
     struct SystemViewMapper\r
     {\r
         const int16_t viewId;\r
@@ -468,6 +491,7 @@ namespace OHOS
         {RESTARTVIEW, &SystemView::ChangeToSystemRestartView},\r
         {SHUTDOWNVIEW, &SystemView::ChangeToSystemShutdownView},\r
         {SHUTDOWNANIMATIONVIEW, &SystemView::ChangeToSystemShutdownAnimatorView},\r
+        {SUPERVISIONINFOVIEW, &SystemView::ChangeToSystemSuperVisionInfoView},\r
     };\r
 \r
     // 根据传入的interface参数执行相应视图ID关联的成员函数。\r
index 237cc54..485b935 100644 (file)
@@ -118,15 +118,15 @@ namespace OHOS
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "WatchQRCodeView::TitleLabel new label fail");
             return false;
         }
-        TitleLabel->SetPosition(83, 50, 300, 35);
-        TitleLabel->SetStyle(STYLE_TEXT_FONT, 30);
-        TitleLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
+        TitleLabel->SetPosition((Screen::GetInstance().GetWidth() - 326) / 2, 62, 326, 30);
+        TitleLabel->SetStyle(STYLE_TEXT_FONT, 24);
+        TitleLabel->SetStyle(STYLE_LINE_HEIGHT, 30);
         uint8_t ble_name[30] = {0};
         uint32_t ble_name_len = sizeof(ble_name);
         errcode_t ret = uapi_get_nv_btname(ble_name, &ble_name_len);
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "get btname %s ,ret 0x%X\n", ble_name, ret);
         TitleLabel->SetText((char *)ble_name);
-        TitleLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 30);
+        TitleLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 24);
         TitleLabel->SetRollSpeed(23);
         TitleLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);
         TitleLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
index 5ab34cc..4d395dc 100644 (file)
@@ -1210,6 +1210,7 @@ target = {
                             "pgnss_sample",
                             # "gnss_sample",
                             "cyweeBleService",
+                            "aiMediaService",
                            ],
                'image_analysis': False,
                'fs_image_path':'fd272',