1
This commit is contained in:
parent
db0d36269e
commit
3058200cd6
@ -88,7 +88,7 @@ void BoxDrop::RequestAllocBoxNum()
|
||||
url_params->SetVal("session_id", session_id);
|
||||
HttpProxy::Instance()->HttpGet
|
||||
(
|
||||
[]
|
||||
[room_wp = room_->weak_from_this()]
|
||||
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
||||
{
|
||||
if (ok) {
|
||||
@ -101,6 +101,10 @@ void BoxDrop::RequestAllocBoxNum()
|
||||
!rsp_obj->HasKey("errcode")) {
|
||||
return;
|
||||
}
|
||||
if (!room_wp.expired()) {
|
||||
auto room = room_wp.lock();
|
||||
room->GetBoxDrop()->OnAllocOk(0);
|
||||
}
|
||||
} else {
|
||||
f8::UdpLog::Instance()->Warning
|
||||
("RequestAllocBoxNum error %s",
|
||||
@ -188,3 +192,8 @@ bool BoxDrop::FillAccountIdSessionId(std::string account_id, std::string session
|
||||
});
|
||||
return ok;
|
||||
}
|
||||
|
||||
void BoxDrop::OnAllocOk(int box_num)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ class BoxDrop : public std::enable_shared_from_this<BoxDrop>
|
||||
void RequestAllocBoxNum();
|
||||
int GetRemainNum();
|
||||
bool FillAccountIdSessionId(std::string account_id, std::string session_id);
|
||||
void OnAllocOk(int box_num);
|
||||
|
||||
private:
|
||||
Room* room_ = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user