fix some bug

This commit is contained in:
wjyLearn
2026-01-23 11:55:27 +08:00
parent 1c2612e116
commit 43b1e29445
8 changed files with 137 additions and 69 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
Build
Build.bat
/build/
/build2/
/build2022/
deps/build
MYMETA.json

View File

@@ -0,0 +1,3 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M25.313 14.8577C25.8116 14.7499 25.9047 14.3886 25.5223 14.0519L15.1727 5.00017C14.7886 4.6651 14.161 4.66346 13.7769 4.99853L3.39301 14.0519C3.0089 14.387 3.10207 14.7482 3.60059 14.8561L4.84606 15.1242C5.34458 15.232 5.75156 15.7371 5.75156 16.247V24.6744C5.75156 25.1844 6.16836 25.6012 6.67831 25.6012H11.062C11.572 25.6012 11.9887 25.1844 11.9887 24.6744V20.6307C11.9887 20.1208 12.4055 19.704 12.9155 19.704H15.8723C16.3822 19.704 16.799 20.1208 16.799 20.6307V24.6744C16.799 25.1844 17.2158 25.6012 17.7258 25.6012H22.2369C22.7469 25.6012 23.1637 25.1844 23.1637 24.6744V16.247C23.1637 15.7371 23.5707 15.232 24.0692 15.1258L25.313 14.8577Z" fill="#4479fb" fill-opacity="0.2" stroke="#4479fb" stroke-width="0.718299" stroke-miterlimit="10" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 884 B

View File

@@ -139,6 +139,17 @@ var LangText={
"t146": "Upload limit exceeded",
"t147": "File upload failed",
"t148": "Add",
"t204": "Login Guide",
"t205": "After registering and logging in with QIDI MAKER or QIDI LINK account, you can bind your QIDI STUDIO software to your account.",
"t206": "After the binding is completed, the QIDI STUDIO slicing software can remotely control and manage the pre-printing machine through the QIDI cloud server, enabling the remote sending",
"t207": " of print jobs, status synchronization, and device management.",
"t208": "More",
"t209": "What is the difference between QIDI MAKER and QIDI LINK ?",
"t210": "QIDI MAKER is a comprehensive upgrade of QIDI LINK, which can better adapt to QIDI 3D printers, providing ",
"t211": "more stable and faster connection as well as richer functions and support.",
"t212": "QIDI MAKER will gradually support more models of QIDI 3D printers.",
"t213": "The account cannot be logged in?",
"t214": "If you encounter any problems, please feel free to contact the official after-sales support of QIDI at any time:",
"wk17": "QIDI Tech Academy",
"wk18": "Quick Start Tutorial",
"wk19": "Learn by Topic",
@@ -292,6 +303,17 @@ var LangText={
"t201": "设备连接",
"t202":"请设置您的打印机连接以查看设备。",
"t203":"请使用 QIDI Link APP 连接您的打印机。链接完成后,在线设备将同步到 “Link” 页面。",
"t204":"登录指南",
"t205":"通过 QIDI MAKER 或 QIDI LINK 注册并登录账号后,即可将你的 QIDI STUDIO 软件绑定至账户。",
"t206":"完成绑定后QIDI STUDIO切片软件可通过 QIDI 云服务器,远程控制并管理前打印机,实现远程发",
"t207":"送打印任务、状态同步与设备管理。",
"t208":"了解更多",
"t209":"QIDI MAKER与QIDI LINK的区别 ",
"t210":"QIDI MAKER 是QIDI LINK的全面升级版本能够更好的适配QIDI 3D打印机提",
"t211":"供更稳定、快速的连接和更丰富的功能与支持。",
"t212":"QIDI MAKER将逐步支持更多QIDI 3D打印机型号。",
"t213":"账号无法登录 ",
"t214":"如遇到任何问题请随时联系QIDI官方售后支持",
"wk1": "快速入门指南",
"wk2": "本文介绍了QIDI Studio的最基本用法。它指导用户配置软件创建项目并逐步完成第一个打印任务。",
"wk3": "基于项目的工作流",

View File

@@ -1,14 +1,18 @@
<!DOCTYPE html>
<html lang="zh-CN">
<html>
<head>
<meta charset="UTF-8">
<title>登录指南</title>
<meta charset="utf-8">
<script type="text/javascript" src="../include/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../include/globalapi.js"></script>
<script type="text/javascript" src="../data/text.js"></script>
<title class='trans'>Login Guide</title>
<style>
body {
font-family: 'Segoe UI', sans-serif;
line-height: 1.8;
color: #FFFFFF;
margin: 40px;
margin-top: 0px;
margin-left : 45px;
padding: 0;
background: white;
min-height: 100vh;
@@ -20,27 +24,28 @@
}
.content {
max-width: 1000px;
max-width: 1600px;
margin: 0;
width: 100%;
}
h1 {
font-weight: normal;
font-size: 55px;
margin-bottom: 50px;
font-weight: 300;
font-size: 79px;
margin-bottom: 42px;
margin-top: 20px;
color: #FFFFFF;
text-align: left;
}
.intro {
margin-bottom: 80px;
margin-bottom: 138px;
}
.intro p {
font-size: 20px;
font-size: 24px;
color: #FFFFFF;
line-height: 1.8;
line-height: 1.43;
margin: 0;
padding: 0;
}
@@ -57,11 +62,12 @@
color: white;
border: none;
padding: 10px 14px 0px;
border-radius: 6px;
font-size: 20px;
border-radius: 8px;
font-size: 30px;
cursor: pointer;
min-width: 180px;
height: 60px;
min-width: 200px;
height: 78px;
width: 295px;
letter-spacing: 1px;
}
@@ -69,31 +75,33 @@
background-color: #4459FB;
color: white;
border: none;
padding: 14px 14px;
border-radius: 6px;
font-size: 20px;
padding: 16px 14px 10px 18px;
border-radius: 8px;
font-size: 30px;
cursor: pointer;
min-width: 180px;
height: 60px;
height: 78px;
width: 300px;
letter-spacing: 1px;
margin-left : 25px;
}
.arrow-icon {
margin-left: 10px;
margin-left: 13px;
margin-right: 0px;
padding: 0px;
width: 35px;
height: 35px;
width: 48px;
height: 48px;
vertical-align: middle;
display: inline-block;
padding: 0;
margin-bottom: 8px;
}
.secondary-arrow-icon {
margin-left: 40px;
margin-left: 60px;
margin-right: 0px;
padding: 0px;
width: 35px;
height: 35px;
width: 48px;
height: 48px;
vertical-align: middle;
display: inline-block;
padding: 0;
@@ -104,17 +112,22 @@
background-color: transparent;
border: 1px solid white;
color: white;
border-radius: 2px;
font-size: 18px;
height: 30px;
width: 105px;
border-radius: 5px;
cursor: pointer;
margin-top: 60px;
font-weight: 550;
}
.faq-section {
margin-top: 20px;
margin-top: 40px;
}
.faq-title {
font-size: 16px;
font-size: 18px;
font-weight: bold;
margin-bottom: 0px;
color: #FFFFFF;
@@ -130,12 +143,22 @@
font-size: 16px;
color: #FFFFFF;
}
.faq-answer {
font-size: 14px;
.faq-question2 {
font-weight: 900;
margin-bottom: 0px;
font-size: 17px;
color: #FFFFFF;
}
.answer {
margin-bottom: 15px;
}
.faq-answer p {
font-size: 16px;
color: #FFFFFF;
line-height: 1.6;
margin-bottom: 0px;
margin: 0;
padding: 0;
}
.support-section {
@@ -153,11 +176,12 @@
.support-link {
color: #007bff;
text-decoration: none;
font-size: 14px;
font-size: 16px;
display: inline-block;
margin-top: 0px;
margin-bottom: 0px;
color: #FFFFFF;
text-decoration: underline;
}
.footer {
@@ -170,14 +194,12 @@
</head>
<body>
<div class="content">
<h1>登录指南</h1>
<h1 class="trans" tid="t204">Login Guide</h1>
<div class="intro">
<p>通过 QIDI MAKER QIDI LINK 注册并登录账号后,即可将你的 QIDI </p>
<p>STUDIO 软件绑定至账户。</p>
<p>完成绑定后QIDI STUDIO 切片软件可通过 QIDI 云服务器、远程控制并管理
<p>当前全部已登录该用户账号的打印机,实现远程发送打印任务、状态同步与
<p>设备管理。</p>
<div class="intro" >
<p class="trans" tid="t205">After registering and logging in with QIDI MAKER or QIDI LINK account, you can bind your QIDI STUDIO software to your account.</p>
<p class='trans' tid="t206">After the binding is completed, the QIDI STUDIO slicing software can remotely control and manage the pre-printing machine through the QIDI cloud server, enabling the remote sending</p>
<p class='trans' tid="t207"> of print jobs, status synchronization, and device management.</p>
</div>
<div class="button-container">
@@ -192,27 +214,28 @@
</div>
<div class="detail-button">
<button class="more-button" id="more" >
了解更多
<button class="more-button trans" id="more" tid="t208">
More
</button>
</div>
<div class = "detail-text" id = "text-detail">
<div class="faq-section" id="faq">
<div class="faq-item">
<div class="faq-question">QIDI MAKERQIDI LINK的区别?</div>
<div class="faq-answer">QIDI MAKER APP是一个面向用户的一站式3D打印平台致力于为用户提供便<br>
捷、流畅且愉悦的3D打印体验。目前QIDI MAKER暂时仅兼容QIDI Max4<br>
后续将逐步支持更多QIDI 3D打印机型号。</div>
<div class="faq-question trans" tid="t209">What is the difference between QIDI MAKER and QIDI LINK ?</div>
<div class="faq-answer">
<p class="trans" tid="t210">QIDI MAKER is a comprehensive upgrade of QIDI LINK, which can better adapt to QIDI 3D printers, providing </p>
<p class="trans" tid="t211">more stable and faster connection as well as richer functions and support.</p>
<p class="trans" tid="t212">QIDI MAKER will gradually support more models of QIDI 3D printers.</p>
</div>
</div>
<div class="faq-item">
<div class="faq-question">账号无法登录?</div>
<div class="faq-answer">如遇到任何问题请随时联系QIDI官方售后支持</div>
<div class="faq-question2 trans" tid="t213">The account cannot be logged in?</div>
<div class="faq-answer trans" tid="t214">If you encounter any problems, please feel free to contact the official after-sales support of QIDI at any time:</div>
</div>
</div>
<div class="support-section">
<div class="support-title">官方售后支持</div>
<div>
<a href="https://wiki.qidi3d.com/en/AfterSalesContact" target="_blank" class="support-link">
https://wiki.qidi3d.com/en/AfterSalesContact
@@ -231,6 +254,7 @@
}
}
window.addEventListener('DOMContentLoaded', function() {
TranslatePage();
document.getElementById('text-detail').hidden = true;
});
document.getElementById('more').addEventListener('click', function() {

View File

@@ -332,10 +332,12 @@ void PrinterWebView::init_scroll_window(wxPanel* Panel) {
devicesizer->Add(label_boxsizer_online);
devicesizer->AddSpacer(7);
}
#if QDT_RELEASE_TO_PUBLIC
m_net_devices = wxGetApp().get_devices();
for (const auto& device : m_net_devices) {
AddNetButton(device);
}
#endif
}
//y40
if (webisNetMode == isNetWeb) {
@@ -475,7 +477,6 @@ void PrinterWebView::SetLoginStatus(bool status) {
{
s_lastDeviceCount = currentDeviceCount;
// <20><><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD><DFB3>и<EFBFBD><D0B8><EFBFBD>UI
GUI::wxGetApp().CallAfter([this]() {
this->UpdateState();
this->SetPresetChanged(true);
@@ -488,14 +489,14 @@ void PrinterWebView::SetLoginStatus(bool status) {
}).detach();
#endif
} else {
#if QDT_RELEASE_TO_PUBLIC
std::vector<NetDevice> devices;
wxGetApp().set_devices(devices);
if (!wxGetApp().is_link_connect()) // <20><>link<6E><6B>¼<EFBFBD><C2BC>ʱ<EFBFBD><CAB1><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>¼<EFBFBD><C2BC>Ҫ<EFBFBD>ر<EFBFBD>sse<73><65><EFBFBD><EFBFBD>
if (!wxGetApp().is_link_connect())
{
#if QDT_RELEASE_TO_PUBLIC
MakerHttpHandle::getInstance().closeSSEClient();
#endif
}
#endif
// y28
if(webisNetMode == isNetWeb)
webisNetMode = isDisconnect;
@@ -708,7 +709,7 @@ void PrinterWebView::updateDeviceConnectType(const std::string& device_id, const
if (machine_button == nullptr) {
return;
}
// cj_1 <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD>ð<EFBFBD>ť<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// cj_1 <20>л<EFBFBD><D0BB><EFBFBD>ð<EFBFBD>ť<EFBFBD><C5A5>ʾ<EFBFBD><CABE>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>
cancelAllDevButtonSelect();
clearStatusPanelData();
machine_button->SetIsSelected(true);
@@ -1107,7 +1108,9 @@ void PrinterWebView::onStatusPanelTask(wxCommandEvent& event)
m_device_manager->sendActionCommand(m_cur_deviceId, action_type);
}
} else {
}
#if QDT_RELEASE_TO_PUBLIC
else {
HttpData httpData;
json bodyJson;
bodyJson["serialNumber"] = m_cur_deviceId;
@@ -1153,6 +1156,7 @@ void PrinterWebView::onStatusPanelTask(wxCommandEvent& event)
return;
}
}
#endif
}
//cj_1
@@ -1186,6 +1190,7 @@ void PrinterWebView::onSetBoxTask(wxCommandEvent& event)
return;
}
#if QDT_RELEASE_TO_PUBLIC
HttpData httpData;
json bodyJson;
bodyJson["serialNumber"] = m_cur_deviceId;
@@ -1207,7 +1212,7 @@ void PrinterWebView::onSetBoxTask(wxCommandEvent& event)
std::cout << "http error" << isSucceed << std::endl;
return;
}
#endif
}
void PrinterWebView::onRefreshRfid(wxCommandEvent& event)
@@ -1225,6 +1230,7 @@ void PrinterWebView::onRefreshRfid(wxCommandEvent& event)
return;
}
#if QDT_RELEASE_TO_PUBLIC
//RFID_READ SLOT=slot3
HttpData httpData;
json bodyJson;
@@ -1245,7 +1251,7 @@ void PrinterWebView::onRefreshRfid(wxCommandEvent& event)
auto device = m_device_manager->getDevice(m_cur_deviceId);
return;
#endif
}
@@ -1458,22 +1464,22 @@ void PrinterWebView::OnScroll(wxScrollWinEvent& event)
}
std::string extractBetweenMarkers(const std::string& path) {
// <20><><EFBFBD><EFBFBD> "/gcodes" <20><>λ<EFBFBD><CEBB>
// <20><><EFBFBD><EFBFBD> "/gcodes" <20><>λ<EFBFBD><CEBB>
size_t startPos = path.find("/gcodes");
if (startPos == std::string::npos) {
return ""; // û<>ҵ<EFBFBD> /gcodes
return ""; // û<>ҵ<EFBFBD> /gcodes
}
// <20><> /gcodes <20><><EFBFBD>ʼ<E6BFAA><CABC><EFBFBD><EFBFBD><EFBFBD>ϳ<EFBFBD><CFB3>ȣ<EFBFBD>
startPos += 7; // "/gcodes" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>7
// <20><> /gcodes <20><><EFBFBD>ʼ<E6BFAA><CABC><EFBFBD><EFBFBD><EFBFBD>ϳ<EFBFBD><CFB3>ȣ<EFBFBD>
startPos += 7; // "/gcodes" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>7
// <20><><EFBFBD><EFBFBD> ".3mf" <20><>λ<EFBFBD><CEBB>
// <20><><EFBFBD><EFBFBD> ".3mf" <20><>λ<EFBFBD><CEBB>
size_t endPos = path.find(".3mf", startPos);
if (endPos == std::string::npos) {
return ""; // û<>ҵ<EFBFBD> .3mf
return ""; // û<>ҵ<EFBFBD> .3mf
}
// <20><>ȡ<EFBFBD>м䲿<D0BC><E4B2BF>
// <20><>ȡ<EFBFBD>м䲿<D0BC><E4B2BF>
return path.substr(startPos, endPos - startPos);
}
@@ -1510,7 +1516,7 @@ void PrinterWebView::OnScroll(wxScrollWinEvent& event)
std::string oldPrintFileName = device->m_print_filename;
device->updateByJsonData(status);
device->last_update = std::chrono::steady_clock::now();
//cj_1 <20><><EFBFBD><EFBFBD>ӡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD>´<EFBFBD>ӡ<EFBFBD>̶<EFBFBD><CCB6><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ļ<EFBFBD>ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//cj_1 <20><><EFBFBD><EFBFBD>ӡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD>´<EFBFBD>ӡ<EFBFBD>̶<EFBFBD><CCB6><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ļ<EFBFBD>ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (oldPrintFileName != device->m_print_filename) {
std::string url = device->m_frp_url + "/api/qidiclient/files/list";
@@ -1723,7 +1729,7 @@ void PrinterWebView::bindTaskHandle()
return;
}
// <20><><EFBFBD><EFBFBD> key-value <20><>
// <20><><EFBFBD><EFBFBD> key-value <20><>
for (auto& pair : m_eventToTaskPath) {
const wxEventTypeTag< wxCommandEvent >eventType = pair.first;
t_status_page->Bind(eventType, &PrinterWebView::onStatusPanelTask, this);
@@ -1817,15 +1823,15 @@ std::string extractEndNumbers(const std::string& str) {
size_t endPos = str.find_last_not_of("0123456789");
if (endPos == std::string::npos) {
// <20>ַ<EFBFBD><D6B7><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20>ַ<EFBFBD><D6B7><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
return str;
}
else if (endPos == str.length() - 1) {
// <20><><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
return "";
}
else {
// <20><><EFBFBD><EFBFBD>ĩβ<C4A9><CEB2><EFBFBD><EFBFBD><EFBFBD>ֲ<EFBFBD><D6B2><EFBFBD>
// <20><><EFBFBD><EFBFBD>ĩβ<C4A9><CEB2><EFBFBD><EFBFBD><EFBFBD>ֲ<EFBFBD><D6B2><EFBFBD>
return str.substr(endPos + 1);
}
}

View File

@@ -215,7 +215,9 @@ private:
std::map<wxEventType, std::string> m_localEventToTaskPath;
std::string m_userInfo;
#if QDT_RELEASE_TO_PUBLIC
std::vector<NetDevice> m_net_devices;
#endif
};

View File

@@ -143,6 +143,7 @@ void QDSFilamentConfig::init()
void QDSFilamentConfig::initTypeName()
{
#if QDT_RELEASE_TO_PUBLIC
std::string resultBody = MakerHttpHandle::getInstance().httpGetTask(Environment::TESTENV, m_typeName.path);
if (resultBody == "") {
return;
@@ -172,10 +173,12 @@ void QDSFilamentConfig::initTypeName()
catch (...) {
}
#endif
}
void QDSFilamentConfig::initFilamentData(FilamentData& filamentData)
{
#if QDT_RELEASE_TO_PUBLIC
std::string resultBody = MakerHttpHandle::getInstance().httpGetTask(Environment::TESTENV, filamentData.path);
if (resultBody == "") {
return;
@@ -197,7 +200,7 @@ void QDSFilamentConfig::initFilamentData(FilamentData& filamentData)
catch (...) {
}
#endif
}
std::string QDSFilamentConfig::getData(FilamentData filamentData, int index)
@@ -1838,6 +1841,7 @@ void QDSDeviceManager::unSelected(){
}
//y76
#if QDT_RELEASE_TO_PUBLIC
void QDSDeviceManager::setNetDevices(std::vector<NetDevice> devices){
std::lock_guard<std::mutex> lock(manager_mutex_);
net_devices = devices;
@@ -1847,6 +1851,7 @@ std::vector<NetDevice> QDSDeviceManager::getNetDevices(){
std::lock_guard<std::mutex> lock(manager_mutex_);
return net_devices;
}
#endif
void QDSDeviceManager::upBoxInfoToBoxMsg(std::shared_ptr<QDSDevice>& device){
std::vector<int> slot_state(17);

View File

@@ -245,8 +245,10 @@ public:
void setSelected(const std::string& device_id);
std::shared_ptr<QDSDevice> getSelectedDevice();
void unSelected();
#if QDT_RELEASE_TO_PUBLIC
void setNetDevices(std::vector<NetDevice> devices);
std::vector<NetDevice> getNetDevices();
#endif
void upBoxInfoToBoxMsg(std::shared_ptr<QDSDevice>& device);
private:
@@ -269,7 +271,10 @@ private:
std::mutex callback_mutex_;
std::unordered_map<std::string, std::shared_ptr<QDSDevice>> devices_;
std::unordered_map<std::string, std::shared_ptr<WebSocketConnect>> connections_;
#if QDT_RELEASE_TO_PUBLIC
std::vector<NetDevice> net_devices;
#endif
// WebSocket