自动关闭虎牙支付成功弹窗
This commit is contained in:
@@ -588,6 +588,42 @@ class HuyaHttpClient:
|
||||
return self.call_rpc("shopMiddleUI", "getGoodsInfoV5", req,
|
||||
GoodsInfoRsp, uid, guid, cookie)
|
||||
|
||||
def query_user_order_list(self, uid, guid, cookie, offset=0, page_size=10,
|
||||
order_type=1, status=0, timeout=15.0):
|
||||
"""查询用户订单列表,用于支付二维码后的付款状态轮询。"""
|
||||
from .shop_structs import QueryUserOrderListReq, QueryUserOrderListRsp
|
||||
|
||||
req = QueryUserOrderListReq()
|
||||
req.userId = self._build_user(uid, guid, cookie)
|
||||
req.offset = int(offset or 0)
|
||||
req.orderType = int(order_type or 1)
|
||||
req.pageSize = int(page_size or 10)
|
||||
req.status = int(status or 0)
|
||||
|
||||
result = self.call_rpc(
|
||||
"shopMiddleUI",
|
||||
"queryUserOrderList",
|
||||
req,
|
||||
QueryUserOrderListRsp,
|
||||
uid,
|
||||
guid,
|
||||
cookie,
|
||||
timeout=timeout,
|
||||
)
|
||||
if result is not None and getattr(result, "orders", None):
|
||||
return result
|
||||
fallback = self.call_rpc(
|
||||
"revenueWebUI",
|
||||
"queryUserOrderList",
|
||||
req,
|
||||
QueryUserOrderListRsp,
|
||||
uid,
|
||||
guid,
|
||||
cookie,
|
||||
timeout=timeout,
|
||||
)
|
||||
return fallback if fallback is not None else result
|
||||
|
||||
def create_order(self, uid, guid, cookie, pid, spu_id, sku_id,
|
||||
item_count=1, source_id="yellowcarlist", game_id="", scene=7,
|
||||
order_type=None):
|
||||
|
||||
Reference in New Issue
Block a user