优化产测二维码内容显示 2117/1 2117/head 2118/target/1
authorpenglei <1624952103@qq.com>
Thu, 21 Aug 2025 05:49:39 +0000 (13:49 +0800)
committerpenglei <1624952103@qq.com>
Thu, 21 Aug 2025 05:49:39 +0000 (13:49 +0800)
code/sdk/zhihui/UI/producttest/src/testQRCode.cpp
code/sdk/zhihui/UI/producttest/src/testView.cpp

index 3254437..310163b 100644 (file)
@@ -191,16 +191,16 @@ namespace OHOS
     // 生成产品信息
     std::string testQRCodeView::GenerateProductInfo()
     {
-        std::string content = "产品: ";
+        std::string content = "DEV: ";
         content += GetProductModelString();
-        content += "\n";
+        content += "\r\n";
         return content;
     }
 
     // 获取产品型号字符串
     std::string testQRCodeView::GetProductModelString()
     {
-        #ifdef FD230
+        #ifdef BOARD_FD230
         return "FD230";
         #elif defined(BOARD_N9)
         return "N9";
@@ -217,28 +217,28 @@ namespace OHOS
         std::string content;
         
         // 测试开始时间
-        content += "开始: ";
+        content += "START: ";
         if (testModel::GetInstance()) {
             content += testModel::GetInstance()->GetStartTime();
             if (content.back() == '\n') {
                 content.pop_back(); // 移除多余的换行符
             }
         } else {
-            content += "fail";
+            content += "FAIL";
         }
-        content += "\n";
+        content += "\r\n";
         
         // 测试结束时间(如果有的话)
         if (testModel::GetInstance() && !testModel::GetInstance()->GetEndTime().empty()) {
-            content += "结束: ";
+            content += "END: ";
             content += testModel::GetInstance()->GetEndTime();
             content += "\n";
         } else if (testModel::GetInstance()) {
             // 检查是否所有测试都完成了
             if (testModel::GetInstance()->IsAllTestsCompleted()) {
-                content += "结束: ";
+                content += "END: ";
                 content += testModel::GetInstance()->GetEndTime();
-                content += "\n";
+                content += "\r\n";
             }
         }
         
@@ -269,8 +269,8 @@ namespace OHOS
         content += GetFirmwareVersion();
         content += "\n";
         
-        // Model版本(4G模块版本)
-        content += "4GMODEL: ";
+        // Modem
+        content += "MODEM: ";
         if (ConfigModel::GetInstance()) {
             content += ConfigModel::GetInstance()->GetmoderVer();
         } else {
@@ -279,7 +279,7 @@ namespace OHOS
         content += "\n";
         
         // Python版本
-        content += "Python: ";
+        content += "PY: ";
         if (ConfigModel::GetInstance()) {
             content += ConfigModel::GetInstance()->GetpyVer();
         } else {
@@ -348,18 +348,18 @@ namespace OHOS
             }
             
             // 显示统计信息
-            content += "成功:" + std::to_string(successCount) + "\n";
-            content += "失败:" + std::to_string(failCount) + "\n";
-            content += "未测:" + std::to_string(notTestCount) + "\n";
+            content += "SUC:" + std::to_string(successCount) + "\n";
+            content += "FAIL:" + std::to_string(failCount) + "\n";
+            content += "NOTEST:" + std::to_string(notTestCount) + "\n";
             
             // 显示失败项的ID列表
             if (failCount > 0) {
-                content += "失败项:" + failedIds + "\n";
+                content += "FAILID:" + failedIds + "\n";
             }
             
             // 显示未测试项的ID列表
             if (notTestCount > 0) {
-                content += "未测项:" + notTestIds + "\n";
+                content += "NOTESTID:" + notTestIds + "\n";
             }
         }
         
index 39ec7ed..9a95103 100644 (file)
@@ -40,6 +40,7 @@ namespace OHOS
     // 2.ViewMapper[] 是一个静态的视图映射数组,将视图ID与MainStopWatchView类中的特定成员函数指针进行了绑定。\r
     test_ext Test_ViewMapper_t[] = {\r
         {TESTVIEW, "", "", "", &testView::ChangeSystemAboutView, false}, // 占位,空的\r
+        {QRCODE, "QRCodeButton", "QRCode", "QRCodeButton_next", &testView::ChangeQRCodeTESTView, true},\r
         {VISON, "AboutTheWatchButton", "Verison", "AboutTheWatchButton_next", &testView::ChangeSystemAboutView, true},\r
         {LCD, "LCDButton", "LCD", "LCDButton_next", &testView::ChangeLCDTESTView, true},\r
         {TP, "TPButton", "TP", "TPButton_next", &testView::ChangeTPTESTView, true},\r
@@ -58,7 +59,6 @@ namespace OHOS
         {BTTEST, "BTbutton", "BT", "BTbutton_next", &testView::ChangeBTTESTView, true},\r
         {SEChipTest, "SEChipTestbutton", "SEChipTest", "SEChipTestbutton_next", &testView::ChangeSEChipTESTView, true},\r
         {PingTest, "PingTestbutton", "PingTest", "PingTestbutton_next", &testView::ChangePingTESTView, true},\r
-        {QRCODE, "QRCodeButton", "QRCode", "QRCodeButton_next", &testView::ChangeQRCodeTESTView, true},\r
 #if defined(SUPPORT_GNSS)\r
         {GPSTEST, "GPSTestbutton", "GPSTest", "GPSTestbutton_next", &testView::ChangeGPSTESTView, true},\r
 #endif\r