import{_ as p,c as i,a as e,b as n,d as l,e as a,w as o,r,o as d}from"./app-Dgsdh8A6.js";const u={};function D(c,s){const t=r("RouteLink");return d(),i("div",null,[s[32]||(s[32]=e('<h1 id="横幅轮播图" tabindex="-1"><a class="header-anchor" href="#横幅轮播图"><span>横幅轮播图</span></a></h1><h2 id="获取各分区的轮播图-web端" tabindex="-1"><a class="header-anchor" href="#获取各分区的轮播图-web端"><span>获取各分区的轮播图_web端</span></a></h2><blockquote><p>https://api.bilibili.com/x/web-show/region/banner</p></blockquote><p><em>请求方式: GET</em></p><p>需要请求头参数 User-Agent</p><p>鉴权方式：Wbi 签名 (可选)</p><p><strong>URL参数:</strong></p>',7)),n("table",null,[s[18]||(s[18]=n("thead",null,[n("tr",null,[n("th",null,"字段"),n("th",null,"类型"),n("th",null,"内容"),n("th",null,"必要性"),n("th",null,"备注")])],-1)),n("tbody",null,[n("tr",null,[s[2]||(s[2]=n("td",null,"region_id",-1)),s[3]||(s[3]=n("td",null,"num",-1)),s[4]||(s[4]=n("td",null,"目标分区id",-1)),s[5]||(s[5]=n("td",null,"必要",-1)),n("td",null,[s[1]||(s[1]=l("参见")),a(t,{to:"/docs/video/video_zone_v2.html"},{default:o(()=>s[0]||(s[0]=[l("视频分区一览v2")])),_:1,__:[0]})])]),n("tr",null,[s[8]||(s[8]=n("td",null,"w_rid",-1)),s[9]||(s[9]=n("td",null,"str",-1)),s[10]||(s[10]=n("td",null,"Wbi 签名",-1)),s[11]||(s[11]=n("td",null,"非必要",-1)),n("td",null,[s[7]||(s[7]=l("详见 ")),a(t,{to:"/docs/misc/sign/wbi.html"},{default:o(()=>s[6]||(s[6]=[l("Wbi 签名")])),_:1,__:[6]})])]),n("tr",null,[s[14]||(s[14]=n("td",null,"wts",-1)),s[15]||(s[15]=n("td",null,"num",-1)),s[16]||(s[16]=n("td",null,"当前时间戳",-1)),s[17]||(s[17]=n("td",null,"非必要",-1)),n("td",null,[s[13]||(s[13]=l("详见 ")),a(t,{to:"/docs/misc/sign/wbi.html"},{default:o(()=>s[12]||(s[12]=[l("Wbi 签名")])),_:1,__:[12]})])])])]),s[33]||(s[33]=e("<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>num</td><td>返回值</td><td>0: 成功</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>str</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</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>region_banner_list</td><td>array</td><td>存储轮播图的对象</td><td></td></tr></tbody></table><p><code>data</code> 对象里的 <code>region_banner_list</code> 数组:</p><table><thead><tr><th>项</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>obj</td><td>第一个轮播图对象</td><td></td></tr><tr><td>n</td><td>obj</td><td>第 (n+1) 轮播图对象</td><td></td></tr><tr><td>……</td><td>obj</td><td>……</td><td></td></tr></tbody></table><p><code>region_banner_list</code> 数组里的对象:</p>",8)),n("table",null,[s[28]||(s[28]=n("thead",null,[n("tr",null,[n("th",null,"字段"),n("th",null,"类型"),n("th",null,"内容"),n("th",null,"备注")])],-1)),n("tbody",null,[s[24]||(s[24]=n("tr",null,[n("td",null,"image"),n("td",null,"str"),n("td",null,"封面资源路径"),n("td")],-1)),s[25]||(s[25]=n("tr",null,[n("td",null,"title"),n("td",null,"str"),n("td",null,"封面标题"),n("td")],-1)),s[26]||(s[26]=n("tr",null,[n("td",null,"sub_title"),n("td",null,"str"),n("td",null,"封面子标题"),n("td",null,"空")],-1)),s[27]||(s[27]=n("tr",null,[n("td",null,"url"),n("td",null,"str"),n("td",null,"点击封面后指向的链接"),n("td",null,"可能为视频地址，也有可能是活动地址")],-1)),n("tr",null,[s[21]||(s[21]=n("td",null,"rid",-1)),s[22]||(s[22]=n("td",null,"num",-1)),n("td",null,[s[20]||(s[20]=l("分区参见")),a(t,{to:"/docs/video/video_zone_v2.html"},{default:o(()=>s[19]||(s[19]=[l("视频分区一览v2")])),_:1,__:[19]})]),s[23]||(s[23]=n("td",null,null,-1))])])]),s[34]||(s[34]=e(`<p><strong>示例:</strong></p><p>获取 <code>音乐区</code> 时刻为 <code>Wed, 06 Aug 2025 01:41:35 GMT</code> 的 B 站轮播图 <a href="https://www.bilibili.com/c/music/" target="_blank" rel="noopener noreferrer">音乐区地址</a></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:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://api.bilibili.com/x/web-show/region/banner&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">      --data-urlencode</span><span style="color:#CE9178;"> &quot;region_id=1003&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">      -H</span><span style="color:#CE9178;"> &quot;User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko Chrome/58.0.3029.110 Safari/537.36&quot;</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></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;region_banner_list&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;image&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;http://i0.hdslb.com/bfs/app/61e4bf3bba74f7d975342ae9d6ec7b0a2ea7c83f.jpg&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;sub_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;url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://www.bilibili.com/blackboard/era/wzjckpevcdCgf4Rv.html&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;rid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1003</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;image&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;http://i0.hdslb.com/bfs/app/a7d63dc78d10f769bd80c6c27ba6cc337b00d9d9.jpg&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;sub_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;url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://www.bilibili.com/video/BV1Tbtjz1Ehv&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;rid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1003</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;image&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;http://i0.hdslb.com/bfs/app/01beb60c493f98eea6844cc2efcbde7315ce6224.jpg&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;陶喆Alin合作曲MV首播！&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;sub_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;url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://www.bilibili.com/video/BV1w1tnznEMw/?spm_id_from=333.337.search-card.all.click&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;rid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1003</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;image&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;http://i0.hdslb.com/bfs/app/64060527172b03292b860e43532ff56faabdbe2d.jpg&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;四种语言版《AMANI》：愿世界和平&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;sub_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;url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://www.bilibili.com/video/BV1WTgVzHE2S/&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;rid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1003</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;image&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;http://i0.hdslb.com/bfs/app/cbc4469b10c041702c49e847552301afeea323cd.jpg&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;孙亦航来B站啦！&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;sub_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;url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://www.bilibili.com/video/BV1RHtFzLEUA&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;rid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1003</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;image&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;http://i0.hdslb.com/bfs/app/134cede692acbbe3080dc2a2ecc920db1f4f7498.jpg&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;潘玮柏狂爱《Yes I Do》&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;sub_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;url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://www.bilibili.com/video/BV1RAtcz7EJX/?spm_id_from=333.337.search-card.all.click&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;rid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1003</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 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 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>`,4)),n("ul",null,[n("li",null,[s[30]||(s[30]=l("Tip: 可以使用 ")),a(t,{to:"/docs/misc/picture.html"},{default:o(()=>s[29]||(s[29]=[l("图片格式化")])),_:1,__:[29]}),s[31]||(s[31]=l("中 获取主色调的方式获取轮播图封面的主色调"))])])])}const y=p(u,[["render",D]]),v=JSON.parse('{"path":"/docs/web_widget/banner.html","title":"横幅轮播图","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1754482183000,"contributors":[{"name":"TeAnli","username":"TeAnli","email":"159260777+TeAnli@users.noreply.github.com","commits":1,"url":"https://github.com/TeAnli"}],"changelog":[{"hash":"268b4cfe10fa51a9857a6d2f6cc772a6927306e3","time":1754482183000,"email":"159260777+TeAnli@users.noreply.github.com","author":"TeAnli","message":"feat: 添加各分区轮播图 (#1372)"}]},"filePathRelative":"docs/web_widget/banner.md"}');export{y as comp,v as data};
