import{_ as s,c as a,a as n,o as e}from"./app-Dgsdh8A6.js";const d={};function l(o,t){return e(),a("div",null,t[0]||(t[0]=[n(`<h1 id="加入老粉计划" tabindex="-1"><a class="header-anchor" href="#加入老粉计划"><span>加入老粉计划</span></a></h1><blockquote><p>https://api.bilibili.com/x/v1/contract/add_contract</p></blockquote><p><em>请求方式：POST</em></p><p>是否需要登录：<code>是</code></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>正文参数 (application/x-www-form-urlencoded)：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>aid</td><td>str</td><td><code>空串</code></td><td></td><td></td></tr><tr><td>up_mid</td><td>str</td><td>UP主UID</td><td>必要</td><td></td></tr><tr><td>source</td><td>str</td><td><code>4</code></td><td></td><td></td></tr><tr><td>scene</td><td>str</td><td><code>105</code></td><td></td><td></td></tr><tr><td>platform</td><td>str</td><td><code>web</code></td><td></td><td></td></tr><tr><td>mobi_app</td><td>str</td><td><code>pc</code></td><td></td><td></td></tr><tr><td>csrf</td><td>str</td><td>用户csrf</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>num</td><td>响应码</td><td>0：成功<br>158001：<code>不满足条件</code></td></tr><tr><td>message</td><td>str</td><td>0</td><td></td></tr><tr><td>ttl</td><td>num</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>allow_message</td><td>bool</td><td><code>true</code></td><td></td></tr><tr><td>input_text</td><td>str</td><td><code>UP主加油！看好你噢~</code></td><td></td></tr><tr><td>input_title</td><td>str</td><td><code>感谢你对UP主的特别支持，“老粉”可期！私信留言鼓励下TA吧~ </code></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:#569CD6;"> --location</span><span style="color:#569CD6;"> --request</span><span style="color:#CE9178;"> POST</span><span style="color:#CE9178;"> &#39;https://api.bilibili.com/x/v1/contract/add_contract&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Cookie: SESSDATA=xxx&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Content-Type: application/x-www-form-urlencoded&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;up_mid=2&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;csrf=xxx&#39;</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></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;allow_message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;input_text&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;UP主加油！看好你噢~&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;input_title&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;感谢你对UP主的特别支持，“老粉”可期！私信留言鼓励下TA吧~&quot;</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></div></details><h1 id="老粉计划发送留言" tabindex="-1"><a class="header-anchor" href="#老粉计划发送留言"><span>老粉计划发送留言</span></a></h1><blockquote><p>https://api.bilibili.com/x/v1/contract/add_message</p></blockquote><p><em>请求方式：POST</em></p><p>认证方式：Cookie (SESSDATA)</p><p><strong>正文参数 (application/x-www-form-urlencoded)：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>aid</td><td>str</td><td><code>空串</code></td><td></td><td></td></tr><tr><td>up_mid</td><td>str</td><td>UP主UID</td><td>必要</td><td></td></tr><tr><td>source</td><td>str</td><td><code>4</code></td><td></td><td></td></tr><tr><td>scene</td><td>str</td><td><code>105</code></td><td></td><td></td></tr><tr><td>content</td><td>str</td><td>留言内容</td><td>必要</td><td></td></tr><tr><td>csrf</td><td>str</td><td>用户csrf</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>num</td><td>响应码</td><td>0：成功<br>158005：您跟up主还不是契约关系</td></tr><tr><td>message</td><td>str</td><td>0</td><td></td></tr><tr><td>ttl</td><td>num</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>success_toast</td><td>str</td><td><code>提交成功，UP主已收到留言~</code></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:#569CD6;"> --location</span><span style="color:#569CD6;"> --request</span><span style="color:#CE9178;"> POST</span><span style="color:#CE9178;"> &#39;https://api.bilibili.com/x/v1/contract/add_message&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Cookie: SESSDATA=xxx&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Content-Type: application/x-www-form-urlencoded&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;up_mid=2&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;content=..&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;csrf=xxx&#39;</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></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;success_toast&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;提交成功，UP主已收到留言~&quot;</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></div></details>`,29)]))}const c=s(d,[["render",l]]),p=JSON.parse('{"path":"/docs/user/contract.html","title":"加入老粉计划","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1749972386000,"contributors":[{"name":"SocialSisterYi","username":"SocialSisterYi","email":"1440239038@qq.com","commits":1,"url":"https://github.com/SocialSisterYi"},{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":1,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"ffba41758237c897b75e0c650c208b54469e6560","time":1749972386000,"email":"102411014+SessionHu@users.noreply.github.com","author":"SessionHu","message":"fix(user/contract.md): missing <code>~</code>"},{"hash":"7d89ece2ac46425810647c4ac92acf5f3721cb68","time":1676998806000,"email":"1440239038@qq.com","author":"SocialSisterYi","message":"🚀调整项目结构"}]},"filePathRelative":"docs/user/contract.md"}');export{c as comp,p as data};
