import{_ as t,c as n,a,o as l}from"./app-Dgsdh8A6.js";const e={};function o(p,s){return l(),n("div",null,s[0]||(s[0]=[a(`<h1 id="首页公告栏" tabindex="-1"><a class="header-anchor" href="#首页公告栏"><span>首页公告栏</span></a></h1><h2 id="动态首页公告栏-新版" tabindex="-1"><a class="header-anchor" href="#动态首页公告栏-新版"><span>动态首页公告栏 (新版)</span></a></h2><blockquote><p>https://api.bilibili.com/x/dynamic/feed/dyn/banner</p></blockquote><p><em>请求方法: GET</em></p><p><strong>URL 参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>platform</td><td>number</td><td>平台?</td><td>不必要</td><td>默认为 <code>1</code>, 留空无</td></tr><tr><td>position</td><td>string</td><td>位置?</td><td>不必要</td><td>默认为 <code>web动态</code>, 留空无</td></tr><tr><td>web_location</td><td>string</td><td><code>333.1365</code></td><td>不必要</td><td></td></tr></tbody></table><p><strong>JSON 回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>number</td><td>返回值</td><td>0: 成功</td></tr><tr><td>data</td><td>object</td><td>数据本体</td><td></td></tr><tr><td>message</td><td>string</td><td>错误信息</td><td>成功时为 <code>0</code></td></tr><tr><td>ttl</td><td>number</td><td><code>1</code></td><td></td></tr></tbody></table><p><code>data</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>banners</td><td>object[]</td><td>横幅们</td><td>套了个娃</td></tr></tbody></table><p><code>data.banners[]</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>banner_id</td><td>number</td><td>横幅 id</td><td>旧版接口无</td></tr><tr><td>end_time</td><td>number</td><td>结束时间</td><td>UNIX 秒级时间戳</td></tr><tr><td>img_url</td><td>string</td><td>图片 URL</td><td></td></tr><tr><td>link</td><td>string</td><td>跳转链接</td><td></td></tr><tr><td>platform</td><td>number</td><td>平台</td><td>与请求参数对应</td></tr><tr><td>position</td><td>string</td><td>位置</td><td>与请求参数对应</td></tr><tr><td>start_time</td><td>number</td><td>开始时间</td><td>UNIX 秒级时间戳</td></tr><tr><td>title</td><td>string</td><td>标题</td><td></td></tr><tr><td>weight</td><td>number</td><td>权重</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://api.bilibili.com/x/dynamic/feed/dyn/banner?platform=1&amp;position=web动态&amp;web_location=333.1365&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;banners&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;banner_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">20</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;end_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">2056204800</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;img_url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://i0.hdslb.com/bfs/vc/9c699f2acbcad00197e92c401b835d2c6aba8a55.png&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;link&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://www.bilibili.com/blackboard/activity-5zJxM3spoS.html&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;platform&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;position&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;web动态&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;start_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1582862523</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;title&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;点击进入&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;weight&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span></span>
<span class="line"><span style="color:#D4D4D4;">      }</span></span>
<span class="line"><span style="color:#D4D4D4;">    ]</span></span>
<span class="line"><span style="color:#D4D4D4;">  },</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="动态首页公告栏-旧版" tabindex="-1"><a class="header-anchor" href="#动态首页公告栏-旧版"><span>动态首页公告栏 (旧版)</span></a></h2><blockquote><p>https://api.vc.bilibili.com/banner_svr/v1/banner_svr/show</p></blockquote><p><em>请求方法: GET</em></p><p><strong>URL 参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>platform</td><td>number</td><td>平台?</td><td>不必要</td><td>默认为 <code>1</code></td></tr><tr><td>position</td><td>string</td><td>位置?</td><td>不必要</td><td>默认为 <code>web动态</code></td></tr></tbody></table><p><strong>JSON 回复:</strong></p><p>与 <a href="#%E5%8A%A8%E6%80%81%E9%A6%96%E9%A1%B5%E5%85%AC%E5%91%8A%E6%A0%8F-%E6%96%B0%E7%89%88">动态首页公告栏 (新版)</a> 相同, 除了少了个 <code>data.banners[].banner_id</code></p><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://api.vc.bilibili.com/banner_svr/v1/banner_svr/show&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;banners&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;img_url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://i0.hdslb.com/bfs/vc/9c699f2acbcad00197e92c401b835d2c6aba8a55.png&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;title&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;点击进入&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;link&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://www.bilibili.com/blackboard/activity-5zJxM3spoS.html&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;platform&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;weight&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;position&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;web动态&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;start_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1582862523</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;end_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">2056204800</span></span>
<span class="line"><span style="color:#D4D4D4;">      }</span></span>
<span class="line"><span style="color:#D4D4D4;">    ]</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,26)]))}const r=t(e,[["render",o]]),i=JSON.parse('{"path":"/docs/dynamic/banner.html","title":"首页公告栏","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1746060344000,"contributors":[{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":2,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"8c6bb6be92e88f285b73f0d0b3f4f5831196c062","time":1746060344000,"email":"102411014+SessionHu@users.noreply.github.com","author":"SessionHu","message":"feat: 动态首页公告栏 (旧版)"},{"hash":"f9d238b0be29ff95f7584e58967afa007f8d6d6f","time":1746059860000,"email":"102411014+SessionHu@users.noreply.github.com","author":"SessionHu","message":"feat: 动态首页公告栏 (新版)"}]},"filePathRelative":"docs/dynamic/banner.md"}');export{r as comp,i as data};
