12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <title>Owl Admin API Documentation</title>
- <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
- <link rel="stylesheet" href="../docs/css/theme-default.style.css" media="screen">
- <link rel="stylesheet" href="../docs/css/theme-default.print.css" media="print">
- <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
- <link rel="stylesheet"
- href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css">
- <script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script>
- <style id="language-style">
- /* starts out as display none and is replaced with js later */
- body .content .bash-example code { display: none; }
- body .content .javascript-example code { display: none; }
- body .content .php-example code { display: none; }
- </style>
- <script>
- var tryItOutBaseUrl = "http://192.168.110.10";
- var useCsrf = Boolean();
- var csrfUrl = "/sanctum/csrf-cookie";
- </script>
- <script src="../docs/js/tryitout-4.38.0.js"></script>
- <script src="../docs/js/theme-default-4.38.0.js"></script>
- </head>
- <body data-languages="["bash","javascript","php"]">
- <a href="#" id="nav-button">
- <span>
- MENU
- <img src="../docs/images/navbar.png" alt="navbar-image"/>
- </span>
- </a>
- <div class="tocify-wrapper">
-
- <div class="lang-selector">
- <button type="button" class="lang-button" data-language-name="bash">bash</button>
- <button type="button" class="lang-button" data-language-name="javascript">javascript</button>
- <button type="button" class="lang-button" data-language-name="php">php</button>
- </div>
-
- <div class="search">
- <input type="text" class="search" id="input-search" placeholder="Search">
- </div>
- <div id="toc">
- <ul id="tocify-header-introduction" class="tocify-header">
- <li class="tocify-item level-1" data-unique="introduction">
- <a href="#introduction">Introduction</a>
- </li>
- </ul>
- <ul id="tocify-header-authenticating-requests" class="tocify-header">
- <li class="tocify-item level-1" data-unique="authenticating-requests">
- <a href="#authenticating-requests">Authenticating requests</a>
- </li>
- </ul>
- <ul id="tocify-header-endpoints" class="tocify-header">
- <li class="tocify-item level-1" data-unique="endpoints">
- <a href="#endpoints">Endpoints</a>
- </li>
- <ul id="tocify-subheader-endpoints" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="endpoints-GETapi-scribe-update-token--mobile-">
- <a href="#endpoints-GETapi-scribe-update-token--mobile-">更新API文档的认证Token</a>
- </li>
- <li class="tocify-item level-2" data-unique="endpoints-POSTapi-account-send-code">
- <a href="#endpoints-POSTapi-account-send-code">[账户管理] 发送验证码</a>
- </li>
- <li class="tocify-item level-2" data-unique="endpoints-POSTapi-account-login">
- <a href="#endpoints-POSTapi-account-login">[账户管理] 用户登录</a>
- </li>
- <li class="tocify-item level-2" data-unique="endpoints-POSTapi-account-wx-login">
- <a href="#endpoints-POSTapi-account-wx-login">[账户管理] 微信登录</a>
- </li>
- <li class="tocify-item level-2" data-unique="endpoints-POSTapi-account-logout">
- <a href="#endpoints-POSTapi-account-logout">[账户管理] 用户退出</a>
- </li>
- <li class="tocify-item level-2" data-unique="endpoints-DELETEapi-account">
- <a href="#endpoints-DELETEapi-account">[账户管理] 用户注销</a>
- </li>
- <li class="tocify-item level-2" data-unique="endpoints-POSTapi-user-withdraw">
- <a href="#endpoints-POSTapi-user-withdraw">[用户管理] 用户提现</a>
- </li>
- <li class="tocify-item level-2" data-unique="endpoints-POSTapi-user-feedback">
- <a href="#endpoints-POSTapi-user-feedback">[用户管理] 用户反馈</a>
- </li>
- <li class="tocify-item level-2" data-unique="endpoints-POSTapi-user-apply-coach">
- <a href="#endpoints-POSTapi-user-apply-coach">[用户管理] 申请成为技师</a>
- </li>
- </ul>
- </ul>
- </div>
- <ul class="toc-footer" id="toc-footer">
- <li style="padding-bottom: 5px;"><a href="../docs/collection.json">View Postman collection</a></li>
- <li style="padding-bottom: 5px;"><a href="../docs/openapi.yaml">View OpenAPI spec</a></li>
- <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
- </ul>
- <ul class="toc-footer" id="last-updated">
- <li>Last updated: November 18, 2024</li>
- </ul>
- </div>
- <div class="page-wrapper">
- <div class="dark-box"></div>
- <div class="content">
- <h1 id="introduction">Introduction</h1>
- <p>Owl Admin API 接口文档</p>
- <aside>
- <strong>Base URL</strong>: <code>http://192.168.110.10</code>
- </aside>
- <p>欢迎使用 Owl Admin API 文档。</p>
- <p>本文档提供了所有 API 接口的详细信息,包括请求参数、响应格式等。</p>
- <h1 id="authenticating-requests">Authenticating requests</h1>
- <p>To authenticate requests, include an <strong><code>Authorization</code></strong> header with the value <strong><code>"Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></strong>.</p>
- <p>All authenticated endpoints are marked with a <code>requires authentication</code> badge in the documentation below.</p>
- <p>通过登录接口获取 token,格式为 Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743{token}</p>
- <h1 id="endpoints">Endpoints</h1>
-
- <h2 id="endpoints-GETapi-scribe-update-token--mobile-">更新API文档的认证Token</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>通过手机号获取验证码并登录,然后更新API文档的认证Token</p>
- <span id="example-requests-GETapi-scribe-update-token--mobile-">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://192.168.110.10/api/scribe/update-token/13800138000" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/scribe/update-token/13800138000"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/scribe/update-token/13800138000';
- $response = $client->get(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-GETapi-scribe-update-token--mobile-">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "Token更新成功",
- "data": {
- "token": "your_new_token_here"
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-scribe-update-token--mobile-" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-scribe-update-token--mobile-"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-scribe-update-token--mobile-"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-scribe-update-token--mobile-" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-scribe-update-token--mobile-">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-scribe-update-token--mobile-" data-method="GET"
- data-path="api/scribe/update-token/{mobile}"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-scribe-update-token--mobile-', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-scribe-update-token--mobile-"
- onclick="tryItOut('GETapi-scribe-update-token--mobile-');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-scribe-update-token--mobile-"
- onclick="cancelTryOut('GETapi-scribe-update-token--mobile-');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-scribe-update-token--mobile-"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/scribe/update-token/{mobile}</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-scribe-update-token--mobile-"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>mobile</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="mobile" data-endpoint="GETapi-scribe-update-token--mobile-"
- value="13800138000"
- data-component="url">
- <br>
- <p>手机号码. Example: <code>13800138000</code></p>
- </div>
- </form>
- <h2 id="endpoints-POSTapi-account-send-code">[账户管理] 发送验证码</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>向指定手机号发送验证码</p>
- <span id="example-requests-POSTapi-account-send-code">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://192.168.110.10/api/account/send-code" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
- --header "Content-Type: application/json" \
- --data "{
- \"mobile\": \"13800138000\"
- }"
- </code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/account/send-code"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "mobile": "13800138000"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/account/send-code';
- $response = $client->post(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- 'Content-Type' => 'application/json',
- ],
- 'json' => [
- 'mobile' => '13800138000',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-POSTapi-account-send-code">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "验证码发送成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-account-send-code" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-account-send-code"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-account-send-code"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-account-send-code" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-account-send-code">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-account-send-code" data-method="POST"
- data-path="api/account/send-code"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-send-code', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-account-send-code"
- onclick="tryItOut('POSTapi-account-send-code');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-account-send-code"
- onclick="cancelTryOut('POSTapi-account-send-code');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-account-send-code"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/account/send-code</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-account-send-code"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-account-send-code"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>mobile</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="mobile" data-endpoint="POSTapi-account-send-code"
- value="13800138000"
- data-component="body">
- <br>
- <p>手机号码. Example: <code>13800138000</code></p>
- </div>
- </form>
- <h2 id="endpoints-POSTapi-account-login">[账户管理] 用户登录</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>使用手机号和验证码登录账户</p>
- <span id="example-requests-POSTapi-account-login">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://192.168.110.10/api/account/login" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
- --header "Content-Type: application/json" \
- --data "{
- \"mobile\": \"13800138000\",
- \"code\": \"123456\"
- }"
- </code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/account/login"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "mobile": "13800138000",
- "code": "123456"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/account/login';
- $response = $client->post(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- 'Content-Type' => 'application/json',
- ],
- 'json' => [
- 'mobile' => '13800138000',
- 'code' => '123456',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-POSTapi-account-login">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "登录成功",
- "data": {
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
- "user": {
- "id": 1,
- "mobile": "13800138000",
- "nickname": "用户昵称"
- }
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-account-login" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-account-login"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-account-login"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-account-login" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-account-login">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-account-login" data-method="POST"
- data-path="api/account/login"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-login', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-account-login"
- onclick="tryItOut('POSTapi-account-login');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-account-login"
- onclick="cancelTryOut('POSTapi-account-login');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-account-login"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/account/login</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-account-login"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-account-login"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>mobile</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="mobile" data-endpoint="POSTapi-account-login"
- value="13800138000"
- data-component="body">
- <br>
- <p>手机号码. Example: <code>13800138000</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>code</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="code" data-endpoint="POSTapi-account-login"
- value="123456"
- data-component="body">
- <br>
- <p>验证码. Example: <code>123456</code></p>
- </div>
- </form>
- <h2 id="endpoints-POSTapi-account-wx-login">[账户管理] 微信登录</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>使用微信openid登录账户</p>
- <span id="example-requests-POSTapi-account-wx-login">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://192.168.110.10/api/account/wx-login" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
- --header "Content-Type: application/json" \
- --data "{
- \"openid\": \"wx_123456789\"
- }"
- </code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/account/wx-login"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "openid": "wx_123456789"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/account/wx-login';
- $response = $client->post(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- 'Content-Type' => 'application/json',
- ],
- 'json' => [
- 'openid' => 'wx_123456789',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-POSTapi-account-wx-login">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "登录成功",
- "data": {
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
- "user": {
- "id": 1,
- "openid": "wx_123456789",
- "nickname": "微信昵称"
- }
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-account-wx-login" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-account-wx-login"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-account-wx-login"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-account-wx-login" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-account-wx-login">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-account-wx-login" data-method="POST"
- data-path="api/account/wx-login"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-wx-login', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-account-wx-login"
- onclick="tryItOut('POSTapi-account-wx-login');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-account-wx-login"
- onclick="cancelTryOut('POSTapi-account-wx-login');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-account-wx-login"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/account/wx-login</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-account-wx-login"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-account-wx-login"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>openid</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="openid" data-endpoint="POSTapi-account-wx-login"
- value="wx_123456789"
- data-component="body">
- <br>
- <p>微信openid. Example: <code>wx_123456789</code></p>
- </div>
- </form>
- <h2 id="endpoints-POSTapi-account-logout">[账户管理] 用户退出</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>退出当前账户登录状态</p>
- <span id="example-requests-POSTapi-account-logout">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://192.168.110.10/api/account/logout" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/account/logout"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "POST",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/account/logout';
- $response = $client->post(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-POSTapi-account-logout">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "退出成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-account-logout" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-account-logout"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-account-logout"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-account-logout" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-account-logout">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-account-logout" data-method="POST"
- data-path="api/account/logout"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-logout', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-account-logout"
- onclick="tryItOut('POSTapi-account-logout');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-account-logout"
- onclick="cancelTryOut('POSTapi-account-logout');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-account-logout"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/account/logout</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-account-logout"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- </form>
- <h2 id="endpoints-DELETEapi-account">[账户管理] 用户注销</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>永久注销当前账户</p>
- <span id="example-requests-DELETEapi-account">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request DELETE \
- "http://192.168.110.10/api/account" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/account"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "DELETE",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/account';
- $response = $client->delete(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-DELETEapi-account">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "注销成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-DELETEapi-account" hidden>
- <blockquote>Received response<span
- id="execution-response-status-DELETEapi-account"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-DELETEapi-account"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-DELETEapi-account" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-DELETEapi-account">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-DELETEapi-account" data-method="DELETE"
- data-path="api/account"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('DELETEapi-account', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-DELETEapi-account"
- onclick="tryItOut('DELETEapi-account');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-DELETEapi-account"
- onclick="cancelTryOut('DELETEapi-account');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-DELETEapi-account"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-red">DELETE</small>
- <b><code>api/account</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="DELETEapi-account"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- </form>
- <h2 id="endpoints-POSTapi-user-withdraw">[用户管理] 用户提现</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>提现用户的余额</p>
- <span id="example-requests-POSTapi-user-withdraw">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://192.168.110.10/api/user/withdraw" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
- --header "Content-Type: application/json" \
- --data "{
- \"amount\": \"100.00\"
- }"
- </code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/user/withdraw"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "amount": "100.00"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/user/withdraw';
- $response = $client->post(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- 'Content-Type' => 'application/json',
- ],
- 'json' => [
- 'amount' => '100.00',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-POSTapi-user-withdraw">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "提现成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-user-withdraw" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-user-withdraw"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-user-withdraw"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-user-withdraw" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-user-withdraw">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-user-withdraw" data-method="POST"
- data-path="api/user/withdraw"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-withdraw', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-user-withdraw"
- onclick="tryItOut('POSTapi-user-withdraw');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-user-withdraw"
- onclick="cancelTryOut('POSTapi-user-withdraw');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-user-withdraw"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/user/withdraw</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-user-withdraw"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-user-withdraw"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>amount</code></b>
- <small>decimal</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="amount" data-endpoint="POSTapi-user-withdraw"
- value="100.00"
- data-component="body">
- <br>
- <p>提现金额. Example: <code>100.00</code></p>
- </div>
- </form>
- <h2 id="endpoints-POSTapi-user-feedback">[用户管理] 用户反馈</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>提交用户的反馈信息</p>
- <span id="example-requests-POSTapi-user-feedback">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://192.168.110.10/api/user/feedback" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
- --header "Content-Type: application/json" \
- --data "{
- \"content\": \"这是一个反馈信息\"
- }"
- </code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/user/feedback"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "content": "这是一个反馈信息"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/user/feedback';
- $response = $client->post(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- 'Content-Type' => 'application/json',
- ],
- 'json' => [
- 'content' => '这是一个反馈信息',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-POSTapi-user-feedback">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "提交成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-user-feedback" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-user-feedback"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-user-feedback"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-user-feedback" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-user-feedback">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-user-feedback" data-method="POST"
- data-path="api/user/feedback"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-feedback', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-user-feedback"
- onclick="tryItOut('POSTapi-user-feedback');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-user-feedback"
- onclick="cancelTryOut('POSTapi-user-feedback');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-user-feedback"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/user/feedback</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-user-feedback"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-user-feedback"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>content</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="content" data-endpoint="POSTapi-user-feedback"
- value="这是一个反馈信息"
- data-component="body">
- <br>
- <p>反馈内容. Example: <code>这是一个反馈信息</code></p>
- </div>
- </form>
- <h2 id="endpoints-POSTapi-user-apply-coach">[用户管理] 申请成为技师</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>申请成为技师</p>
- <span id="example-requests-POSTapi-user-apply-coach">
- <blockquote>Example request:</blockquote>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://192.168.110.10/api/user/apply-coach" \
- --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></pre></div>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://192.168.110.10/api/user/apply-coach"
- );
- const headers = {
- "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "POST",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="php-example">
- <pre><code class="language-php">$client = new \GuzzleHttp\Client();
- $url = 'http://192.168.110.10/api/user/apply-coach';
- $response = $client->post(
- $url,
- [
- 'headers' => [
- 'Authorization' => 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
- ],
- ]
- );
- $body = $response->getBody();
- print_r(json_decode((string) $body));</code></pre></div>
- </span>
- <span id="example-responses-POSTapi-user-apply-coach">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "申请成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-user-apply-coach" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-user-apply-coach"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-user-apply-coach"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-user-apply-coach" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-user-apply-coach">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-user-apply-coach" data-method="POST"
- data-path="api/user/apply-coach"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-apply-coach', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-user-apply-coach"
- onclick="tryItOut('POSTapi-user-apply-coach');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-user-apply-coach"
- onclick="cancelTryOut('POSTapi-user-apply-coach');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-user-apply-coach"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/user/apply-coach</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-user-apply-coach"
- value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
- data-component="header">
- <br>
- <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
- </div>
- </form>
-
-
- </div>
- <div class="dark-box">
- <div class="lang-selector">
- <button type="button" class="lang-button" data-language-name="bash">bash</button>
- <button type="button" class="lang-button" data-language-name="javascript">javascript</button>
- <button type="button" class="lang-button" data-language-name="php">php</button>
- </div>
- </div>
- </div>
- </body>
- </html>
|