NEW: [STUDIO-2476] design_staffpick

Change-Id: Ibe4d540ca31882e199437dc2811925e1a40680ec
This commit is contained in:
chunmao.guo 2023-03-20 10:52:34 +08:00 committed by Lane.Wei
parent 20ad3c7f9a
commit 84580f6f94
8 changed files with 97 additions and 2 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()) {