接入虎牙精英宝典最新商城前置流程

This commit is contained in:
yml2213
2026-09-01 11:42:52 +08:00
parent 684e16a07a
commit eb065a7c77
6 changed files with 243 additions and 2 deletions
+40
View File
@@ -656,6 +656,46 @@ class HuyaWssClient:
"shopMiddleUI", "getGoodsInfoV5", req, GoodsInfoRsp, timeout=15.0
)
async def list_pay_channels(
self, uid: int, guid: str, cookie: str, spu_id: str, sku_id: int = 0,
supplier_id: int = 87401,
):
from .shop_structs import ListPayChannelReq, ListPayChannelRsp
req = ListPayChannelReq()
req.userId = self._build_biz_user(uid, cookie)
req.shopAppInfo = self._build_shop_app("yellowcarlist", WSS_SHOP_SCENE)
req.supplierId = int(supplier_id or 0)
req.spuId = spu_id
req.skuId = int(sku_id or 0)
return await self.call_rpc(
"shopMiddleUI", "listPayChannelV5", req, ListPayChannelRsp, timeout=15.0
)
async def check_hy_protocol(self, uid: int, guid: str, cookie: str):
from .shop_structs import CheckHyProtocolReq, ShopCodeRsp
req = CheckHyProtocolReq()
req.userId = self._build_biz_user(uid, cookie)
req.shopAppInfo = self._build_shop_app("yellowcarlist", WSS_SHOP_SCENE)
return await self.call_rpc(
"shopMiddleUI", "checkHyProtocolV5", req, ShopCodeRsp, timeout=15.0
)
async def check_user_buy_auth(
self, uid: int, guid: str, cookie: str, spu_id: str, sku_id: int,
):
from .shop_structs import CheckUserBuyAuthReq, ShopCodeRsp
req = CheckUserBuyAuthReq()
req.userId = self._build_biz_user(uid, cookie)
req.shopAppInfo = self._build_shop_app("yellowcarlist", WSS_SHOP_SCENE)
req.spuId = spu_id
req.skuId = int(sku_id or 0)
return await self.call_rpc(
"shopMiddleUI", "checkUserBuyAuth", req, ShopCodeRsp, timeout=15.0
)
async def query_user_order_list(
self,
uid: int,