Files
netease-modsdk-wiki/docs/mcdocs/1-ModAPI/接口/商城.md
2025-03-18 14:46:12 +08:00

161 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
sidebarDepth: 1
---
# 商城
# 索引
---
| 接口 | <div style="width: 3em"></div> | 描述 |
| --- | --- | --- |
| [CloseShopWindow](商城.md#closeshopwindow) | <span style="display:inline;color:#7575f9">客户端</span> | 关闭网易商城窗口 |
| [HideShopGate](商城.md#hideshopgate) | <span style="display:inline;color:#7575f9">客户端</span> | 隐藏网易商城入口 |
| [OpenItemDetailWindow](商城.md#openitemdetailwindow) | <span style="display:inline;color:#7575f9">客户端</span> | 打开特定商品的详情界面 |
| [OpenShopWindow](商城.md#openshopwindow) | <span style="display:inline;color:#7575f9">客户端</span> | 打开网易商城窗口。PC端无效Apollo的PC端请使用商城插件 |
| [ShowShopGate](商城.md#showshopgate) | <span style="display:inline;color:#7575f9">客户端</span> | 显示网易商城入口 |
## CloseShopWindow
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.neteaseShopCompClient.NeteaseShopCompClient
- 描述
关闭网易商城窗口
- 参数
- 返回值
- 示例
```python
import client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateNeteaseShop(levelId)
comp.CloseShopWindow()
```
## HideShopGate
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.neteaseShopCompClient.NeteaseShopCompClient
- 描述
隐藏网易商城入口
- 参数
- 返回值
- 示例
```python
import client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateNeteaseShop(levelId)
comp.HideShopGate()
```
## OpenItemDetailWindow
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.neteaseShopCompClient.NeteaseShopCompClient
- 描述
打开特定商品的详情界面
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| categoryName | str | 商品分类名称 |
| itemName | str | 商品名称 |
- 返回值
- 示例
```python
import client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateNeteaseShop(levelId)
comp.OpenItemDetailWindow("商品", "测试商品1")
```
## OpenShopWindow
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.neteaseShopCompClient.NeteaseShopCompClient
- 描述
打开网易商城窗口。PC端无效Apollo的PC端请使用商城插件
- 参数
- 返回值
- 示例
```python
import client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateNeteaseShop(levelId)
comp.OpenShopWindow()
```
## ShowShopGate
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.neteaseShopCompClient.NeteaseShopCompClient
- 描述
显示网易商城入口
- 参数
- 返回值
- 示例
```python
import client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateNeteaseShop(levelId)
comp.ShowShopGate()
```