NEW: [STUDIO-2476] design_staffpick

This reverts commit 4d13a44a2e4136d0c2e173e367e13f6a6ba00670.

Reason for revert: 123

Change-Id: I008a0ab3540589e5938fb3e1814571e00c467227
This commit is contained in:
战马 2023-04-19 08:50:22 +08:00 committed by Lane.Wei
parent 8eb84e8d4f
commit 0a9d33157a
18 changed files with 363 additions and 556 deletions

View file

@ -427,6 +427,23 @@ void WebViewPanel::SendRecentList(wxString const &sequence_id)
RunScript(wxString::Format("window.postMessage(%s)", oss.str()));
}
void WebViewPanel::SendDesignStaffpick(NetworkAgent *agent)
{
if (agent) {
agent->get_design_staffpick(0, 60, [this](std::string body) {
if (body.empty() || body.front() != '{') {
BOOST_LOG_TRIVIAL(warning) << "get_design_staffpick failed " + body;
return;
}
CallAfter([this, body] {
auto body2 = body;
body2.insert(1, "\"command\": \"modelmall_model_advise_get\", ");
RunScript(wxString::Format("window.postMessage(%s)", body2));
});
});
}
}
void WebViewPanel::SendLoginInfo()
{
if (wxGetApp().getAgent()) {