index.html 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  7. <title>Owl Admin API Documentation</title>
  8. <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
  9. <link rel="stylesheet" href="../docs/css/theme-default.style.css" media="screen">
  10. <link rel="stylesheet" href="../docs/css/theme-default.print.css" media="print">
  11. <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
  12. <link rel="stylesheet"
  13. href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css">
  14. <script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
  15. <script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script>
  16. <style id="language-style">
  17. /* starts out as display none and is replaced with js later */
  18. body .content .bash-example code { display: none; }
  19. body .content .javascript-example code { display: none; }
  20. body .content .php-example code { display: none; }
  21. </style>
  22. <script>
  23. var tryItOutBaseUrl = "http://192.168.110.10";
  24. var useCsrf = Boolean();
  25. var csrfUrl = "/sanctum/csrf-cookie";
  26. </script>
  27. <script src="../docs/js/tryitout-4.38.0.js"></script>
  28. <script src="../docs/js/theme-default-4.38.0.js"></script>
  29. </head>
  30. <body data-languages="[&quot;bash&quot;,&quot;javascript&quot;,&quot;php&quot;]">
  31. <a href="#" id="nav-button">
  32. <span>
  33. MENU
  34. <img src="../docs/images/navbar.png" alt="navbar-image"/>
  35. </span>
  36. </a>
  37. <div class="tocify-wrapper">
  38. <div class="lang-selector">
  39. <button type="button" class="lang-button" data-language-name="bash">bash</button>
  40. <button type="button" class="lang-button" data-language-name="javascript">javascript</button>
  41. <button type="button" class="lang-button" data-language-name="php">php</button>
  42. </div>
  43. <div class="search">
  44. <input type="text" class="search" id="input-search" placeholder="Search">
  45. </div>
  46. <div id="toc">
  47. <ul id="tocify-header-introduction" class="tocify-header">
  48. <li class="tocify-item level-1" data-unique="introduction">
  49. <a href="#introduction">Introduction</a>
  50. </li>
  51. </ul>
  52. <ul id="tocify-header-authenticating-requests" class="tocify-header">
  53. <li class="tocify-item level-1" data-unique="authenticating-requests">
  54. <a href="#authenticating-requests">Authenticating requests</a>
  55. </li>
  56. </ul>
  57. <ul id="tocify-header-endpoints" class="tocify-header">
  58. <li class="tocify-item level-1" data-unique="endpoints">
  59. <a href="#endpoints">Endpoints</a>
  60. </li>
  61. <ul id="tocify-subheader-endpoints" class="tocify-subheader">
  62. <li class="tocify-item level-2" data-unique="endpoints-GETapi-scribe-update-token--mobile-">
  63. <a href="#endpoints-GETapi-scribe-update-token--mobile-">更新API文档的认证Token</a>
  64. </li>
  65. <li class="tocify-item level-2" data-unique="endpoints-POSTapi-account-send-code">
  66. <a href="#endpoints-POSTapi-account-send-code">[账户管理] 发送验证码</a>
  67. </li>
  68. <li class="tocify-item level-2" data-unique="endpoints-POSTapi-account-login">
  69. <a href="#endpoints-POSTapi-account-login">[账户管理] 用户登录</a>
  70. </li>
  71. <li class="tocify-item level-2" data-unique="endpoints-POSTapi-account-wx-login">
  72. <a href="#endpoints-POSTapi-account-wx-login">[账户管理] 微信登录</a>
  73. </li>
  74. <li class="tocify-item level-2" data-unique="endpoints-POSTapi-account-logout">
  75. <a href="#endpoints-POSTapi-account-logout">[账户管理] 用户退出</a>
  76. </li>
  77. <li class="tocify-item level-2" data-unique="endpoints-DELETEapi-account">
  78. <a href="#endpoints-DELETEapi-account">[账户管理] 用户注销</a>
  79. </li>
  80. <li class="tocify-item level-2" data-unique="endpoints-POSTapi-user-withdraw">
  81. <a href="#endpoints-POSTapi-user-withdraw">[用户管理] 用户提现</a>
  82. </li>
  83. <li class="tocify-item level-2" data-unique="endpoints-POSTapi-user-feedback">
  84. <a href="#endpoints-POSTapi-user-feedback">[用户管理] 用户反馈</a>
  85. </li>
  86. <li class="tocify-item level-2" data-unique="endpoints-POSTapi-user-apply-coach">
  87. <a href="#endpoints-POSTapi-user-apply-coach">[用户管理] 申请成为技师</a>
  88. </li>
  89. </ul>
  90. </ul>
  91. </div>
  92. <ul class="toc-footer" id="toc-footer">
  93. <li style="padding-bottom: 5px;"><a href="../docs/collection.json">View Postman collection</a></li>
  94. <li style="padding-bottom: 5px;"><a href="../docs/openapi.yaml">View OpenAPI spec</a></li>
  95. <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
  96. </ul>
  97. <ul class="toc-footer" id="last-updated">
  98. <li>Last updated: November 18, 2024</li>
  99. </ul>
  100. </div>
  101. <div class="page-wrapper">
  102. <div class="dark-box"></div>
  103. <div class="content">
  104. <h1 id="introduction">Introduction</h1>
  105. <p>Owl Admin API 接口文档</p>
  106. <aside>
  107. <strong>Base URL</strong>: <code>http://192.168.110.10</code>
  108. </aside>
  109. <p>欢迎使用 Owl Admin API 文档。</p>
  110. <p>本文档提供了所有 API 接口的详细信息,包括请求参数、响应格式等。</p>
  111. <h1 id="authenticating-requests">Authenticating requests</h1>
  112. <p>To authenticate requests, include an <strong><code>Authorization</code></strong> header with the value <strong><code>"Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></strong>.</p>
  113. <p>All authenticated endpoints are marked with a <code>requires authentication</code> badge in the documentation below.</p>
  114. <p>通过登录接口获取 token,格式为 Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743{token}</p>
  115. <h1 id="endpoints">Endpoints</h1>
  116. <h2 id="endpoints-GETapi-scribe-update-token--mobile-">更新API文档的认证Token</h2>
  117. <p>
  118. <small class="badge badge-darkred">requires authentication</small>
  119. </p>
  120. <p>通过手机号获取验证码并登录,然后更新API文档的认证Token</p>
  121. <span id="example-requests-GETapi-scribe-update-token--mobile-">
  122. <blockquote>Example request:</blockquote>
  123. <div class="bash-example">
  124. <pre><code class="language-bash">curl --request GET \
  125. --get "http://192.168.110.10/api/scribe/update-token/13800138000" \
  126. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></pre></div>
  127. <div class="javascript-example">
  128. <pre><code class="language-javascript">const url = new URL(
  129. "http://192.168.110.10/api/scribe/update-token/13800138000"
  130. );
  131. const headers = {
  132. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  133. "Accept": "application/json",
  134. };
  135. fetch(url, {
  136. method: "GET",
  137. headers,
  138. }).then(response =&gt; response.json());</code></pre></div>
  139. <div class="php-example">
  140. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  141. $url = 'http://192.168.110.10/api/scribe/update-token/13800138000';
  142. $response = $client-&gt;get(
  143. $url,
  144. [
  145. 'headers' =&gt; [
  146. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  147. ],
  148. ]
  149. );
  150. $body = $response-&gt;getBody();
  151. print_r(json_decode((string) $body));</code></pre></div>
  152. </span>
  153. <span id="example-responses-GETapi-scribe-update-token--mobile-">
  154. <blockquote>
  155. <p>Example response (200):</p>
  156. </blockquote>
  157. <pre>
  158. <code class="language-json" style="max-height: 300px;">{
  159. &quot;code&quot;: 200,
  160. &quot;message&quot;: &quot;Token更新成功&quot;,
  161. &quot;data&quot;: {
  162. &quot;token&quot;: &quot;your_new_token_here&quot;
  163. }
  164. }</code>
  165. </pre>
  166. </span>
  167. <span id="execution-results-GETapi-scribe-update-token--mobile-" hidden>
  168. <blockquote>Received response<span
  169. id="execution-response-status-GETapi-scribe-update-token--mobile-"></span>:
  170. </blockquote>
  171. <pre class="json"><code id="execution-response-content-GETapi-scribe-update-token--mobile-"
  172. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  173. </span>
  174. <span id="execution-error-GETapi-scribe-update-token--mobile-" hidden>
  175. <blockquote>Request failed with error:</blockquote>
  176. <pre><code id="execution-error-message-GETapi-scribe-update-token--mobile-">
  177. Tip: Check that you&#039;re properly connected to the network.
  178. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  179. You can check the Dev Tools console for debugging information.</code></pre>
  180. </span>
  181. <form id="form-GETapi-scribe-update-token--mobile-" data-method="GET"
  182. data-path="api/scribe/update-token/{mobile}"
  183. data-authed="1"
  184. data-hasfiles="0"
  185. data-isarraybody="0"
  186. autocomplete="off"
  187. onsubmit="event.preventDefault(); executeTryOut('GETapi-scribe-update-token--mobile-', this);">
  188. <h3>
  189. Request&nbsp;&nbsp;&nbsp;
  190. <button type="button"
  191. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  192. id="btn-tryout-GETapi-scribe-update-token--mobile-"
  193. onclick="tryItOut('GETapi-scribe-update-token--mobile-');">Try it out ⚡
  194. </button>
  195. <button type="button"
  196. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  197. id="btn-canceltryout-GETapi-scribe-update-token--mobile-"
  198. onclick="cancelTryOut('GETapi-scribe-update-token--mobile-');" hidden>Cancel 🛑
  199. </button>&nbsp;&nbsp;
  200. <button type="submit"
  201. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  202. id="btn-executetryout-GETapi-scribe-update-token--mobile-"
  203. data-initial-text="Send Request 💥"
  204. data-loading-text="⏱ Sending..."
  205. hidden>Send Request 💥
  206. </button>
  207. </h3>
  208. <p>
  209. <small class="badge badge-green">GET</small>
  210. <b><code>api/scribe/update-token/{mobile}</code></b>
  211. </p>
  212. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  213. <div style="padding-left: 28px; clear: unset;">
  214. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  215. &nbsp;
  216. &nbsp;
  217. <input type="text" style="display: none"
  218. name="Authorization" class="auth-value" data-endpoint="GETapi-scribe-update-token--mobile-"
  219. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  220. data-component="header">
  221. <br>
  222. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  223. </div>
  224. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  225. <div style="padding-left: 28px; clear: unset;">
  226. <b style="line-height: 2;"><code>mobile</code></b>&nbsp;&nbsp;
  227. <small>string</small>&nbsp;
  228. &nbsp;
  229. <input type="text" style="display: none"
  230. name="mobile" data-endpoint="GETapi-scribe-update-token--mobile-"
  231. value="13800138000"
  232. data-component="url">
  233. <br>
  234. <p>手机号码. Example: <code>13800138000</code></p>
  235. </div>
  236. </form>
  237. <h2 id="endpoints-POSTapi-account-send-code">[账户管理] 发送验证码</h2>
  238. <p>
  239. <small class="badge badge-darkred">requires authentication</small>
  240. </p>
  241. <p>向指定手机号发送验证码</p>
  242. <span id="example-requests-POSTapi-account-send-code">
  243. <blockquote>Example request:</blockquote>
  244. <div class="bash-example">
  245. <pre><code class="language-bash">curl --request POST \
  246. "http://192.168.110.10/api/account/send-code" \
  247. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
  248. --header "Content-Type: application/json" \
  249. --data "{
  250. \"mobile\": \"13800138000\"
  251. }"
  252. </code></pre></div>
  253. <div class="javascript-example">
  254. <pre><code class="language-javascript">const url = new URL(
  255. "http://192.168.110.10/api/account/send-code"
  256. );
  257. const headers = {
  258. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  259. "Content-Type": "application/json",
  260. "Accept": "application/json",
  261. };
  262. let body = {
  263. "mobile": "13800138000"
  264. };
  265. fetch(url, {
  266. method: "POST",
  267. headers,
  268. body: JSON.stringify(body),
  269. }).then(response =&gt; response.json());</code></pre></div>
  270. <div class="php-example">
  271. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  272. $url = 'http://192.168.110.10/api/account/send-code';
  273. $response = $client-&gt;post(
  274. $url,
  275. [
  276. 'headers' =&gt; [
  277. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  278. 'Content-Type' =&gt; 'application/json',
  279. ],
  280. 'json' =&gt; [
  281. 'mobile' =&gt; '13800138000',
  282. ],
  283. ]
  284. );
  285. $body = $response-&gt;getBody();
  286. print_r(json_decode((string) $body));</code></pre></div>
  287. </span>
  288. <span id="example-responses-POSTapi-account-send-code">
  289. <blockquote>
  290. <p>Example response (200):</p>
  291. </blockquote>
  292. <pre>
  293. <code class="language-json" style="max-height: 300px;">{
  294. &quot;code&quot;: 200,
  295. &quot;message&quot;: &quot;验证码发送成功&quot;,
  296. &quot;data&quot;: null
  297. }</code>
  298. </pre>
  299. </span>
  300. <span id="execution-results-POSTapi-account-send-code" hidden>
  301. <blockquote>Received response<span
  302. id="execution-response-status-POSTapi-account-send-code"></span>:
  303. </blockquote>
  304. <pre class="json"><code id="execution-response-content-POSTapi-account-send-code"
  305. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  306. </span>
  307. <span id="execution-error-POSTapi-account-send-code" hidden>
  308. <blockquote>Request failed with error:</blockquote>
  309. <pre><code id="execution-error-message-POSTapi-account-send-code">
  310. Tip: Check that you&#039;re properly connected to the network.
  311. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  312. You can check the Dev Tools console for debugging information.</code></pre>
  313. </span>
  314. <form id="form-POSTapi-account-send-code" data-method="POST"
  315. data-path="api/account/send-code"
  316. data-authed="1"
  317. data-hasfiles="0"
  318. data-isarraybody="0"
  319. autocomplete="off"
  320. onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-send-code', this);">
  321. <h3>
  322. Request&nbsp;&nbsp;&nbsp;
  323. <button type="button"
  324. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  325. id="btn-tryout-POSTapi-account-send-code"
  326. onclick="tryItOut('POSTapi-account-send-code');">Try it out ⚡
  327. </button>
  328. <button type="button"
  329. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  330. id="btn-canceltryout-POSTapi-account-send-code"
  331. onclick="cancelTryOut('POSTapi-account-send-code');" hidden>Cancel 🛑
  332. </button>&nbsp;&nbsp;
  333. <button type="submit"
  334. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  335. id="btn-executetryout-POSTapi-account-send-code"
  336. data-initial-text="Send Request 💥"
  337. data-loading-text="⏱ Sending..."
  338. hidden>Send Request 💥
  339. </button>
  340. </h3>
  341. <p>
  342. <small class="badge badge-black">POST</small>
  343. <b><code>api/account/send-code</code></b>
  344. </p>
  345. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  346. <div style="padding-left: 28px; clear: unset;">
  347. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  348. &nbsp;
  349. &nbsp;
  350. <input type="text" style="display: none"
  351. name="Authorization" class="auth-value" data-endpoint="POSTapi-account-send-code"
  352. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  353. data-component="header">
  354. <br>
  355. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  356. </div>
  357. <div style="padding-left: 28px; clear: unset;">
  358. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  359. &nbsp;
  360. &nbsp;
  361. <input type="text" style="display: none"
  362. name="Content-Type" data-endpoint="POSTapi-account-send-code"
  363. value="application/json"
  364. data-component="header">
  365. <br>
  366. <p>Example: <code>application/json</code></p>
  367. </div>
  368. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  369. <div style=" padding-left: 28px; clear: unset;">
  370. <b style="line-height: 2;"><code>mobile</code></b>&nbsp;&nbsp;
  371. <small>string</small>&nbsp;
  372. &nbsp;
  373. <input type="text" style="display: none"
  374. name="mobile" data-endpoint="POSTapi-account-send-code"
  375. value="13800138000"
  376. data-component="body">
  377. <br>
  378. <p>手机号码. Example: <code>13800138000</code></p>
  379. </div>
  380. </form>
  381. <h2 id="endpoints-POSTapi-account-login">[账户管理] 用户登录</h2>
  382. <p>
  383. <small class="badge badge-darkred">requires authentication</small>
  384. </p>
  385. <p>使用手机号和验证码登录账户</p>
  386. <span id="example-requests-POSTapi-account-login">
  387. <blockquote>Example request:</blockquote>
  388. <div class="bash-example">
  389. <pre><code class="language-bash">curl --request POST \
  390. "http://192.168.110.10/api/account/login" \
  391. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
  392. --header "Content-Type: application/json" \
  393. --data "{
  394. \"mobile\": \"13800138000\",
  395. \"code\": \"123456\"
  396. }"
  397. </code></pre></div>
  398. <div class="javascript-example">
  399. <pre><code class="language-javascript">const url = new URL(
  400. "http://192.168.110.10/api/account/login"
  401. );
  402. const headers = {
  403. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  404. "Content-Type": "application/json",
  405. "Accept": "application/json",
  406. };
  407. let body = {
  408. "mobile": "13800138000",
  409. "code": "123456"
  410. };
  411. fetch(url, {
  412. method: "POST",
  413. headers,
  414. body: JSON.stringify(body),
  415. }).then(response =&gt; response.json());</code></pre></div>
  416. <div class="php-example">
  417. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  418. $url = 'http://192.168.110.10/api/account/login';
  419. $response = $client-&gt;post(
  420. $url,
  421. [
  422. 'headers' =&gt; [
  423. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  424. 'Content-Type' =&gt; 'application/json',
  425. ],
  426. 'json' =&gt; [
  427. 'mobile' =&gt; '13800138000',
  428. 'code' =&gt; '123456',
  429. ],
  430. ]
  431. );
  432. $body = $response-&gt;getBody();
  433. print_r(json_decode((string) $body));</code></pre></div>
  434. </span>
  435. <span id="example-responses-POSTapi-account-login">
  436. <blockquote>
  437. <p>Example response (200):</p>
  438. </blockquote>
  439. <pre>
  440. <code class="language-json" style="max-height: 300px;">{
  441. &quot;code&quot;: 200,
  442. &quot;message&quot;: &quot;登录成功&quot;,
  443. &quot;data&quot;: {
  444. &quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...&quot;,
  445. &quot;user&quot;: {
  446. &quot;id&quot;: 1,
  447. &quot;mobile&quot;: &quot;13800138000&quot;,
  448. &quot;nickname&quot;: &quot;用户昵称&quot;
  449. }
  450. }
  451. }</code>
  452. </pre>
  453. </span>
  454. <span id="execution-results-POSTapi-account-login" hidden>
  455. <blockquote>Received response<span
  456. id="execution-response-status-POSTapi-account-login"></span>:
  457. </blockquote>
  458. <pre class="json"><code id="execution-response-content-POSTapi-account-login"
  459. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  460. </span>
  461. <span id="execution-error-POSTapi-account-login" hidden>
  462. <blockquote>Request failed with error:</blockquote>
  463. <pre><code id="execution-error-message-POSTapi-account-login">
  464. Tip: Check that you&#039;re properly connected to the network.
  465. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  466. You can check the Dev Tools console for debugging information.</code></pre>
  467. </span>
  468. <form id="form-POSTapi-account-login" data-method="POST"
  469. data-path="api/account/login"
  470. data-authed="1"
  471. data-hasfiles="0"
  472. data-isarraybody="0"
  473. autocomplete="off"
  474. onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-login', this);">
  475. <h3>
  476. Request&nbsp;&nbsp;&nbsp;
  477. <button type="button"
  478. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  479. id="btn-tryout-POSTapi-account-login"
  480. onclick="tryItOut('POSTapi-account-login');">Try it out ⚡
  481. </button>
  482. <button type="button"
  483. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  484. id="btn-canceltryout-POSTapi-account-login"
  485. onclick="cancelTryOut('POSTapi-account-login');" hidden>Cancel 🛑
  486. </button>&nbsp;&nbsp;
  487. <button type="submit"
  488. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  489. id="btn-executetryout-POSTapi-account-login"
  490. data-initial-text="Send Request 💥"
  491. data-loading-text="⏱ Sending..."
  492. hidden>Send Request 💥
  493. </button>
  494. </h3>
  495. <p>
  496. <small class="badge badge-black">POST</small>
  497. <b><code>api/account/login</code></b>
  498. </p>
  499. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  500. <div style="padding-left: 28px; clear: unset;">
  501. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  502. &nbsp;
  503. &nbsp;
  504. <input type="text" style="display: none"
  505. name="Authorization" class="auth-value" data-endpoint="POSTapi-account-login"
  506. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  507. data-component="header">
  508. <br>
  509. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  510. </div>
  511. <div style="padding-left: 28px; clear: unset;">
  512. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  513. &nbsp;
  514. &nbsp;
  515. <input type="text" style="display: none"
  516. name="Content-Type" data-endpoint="POSTapi-account-login"
  517. value="application/json"
  518. data-component="header">
  519. <br>
  520. <p>Example: <code>application/json</code></p>
  521. </div>
  522. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  523. <div style=" padding-left: 28px; clear: unset;">
  524. <b style="line-height: 2;"><code>mobile</code></b>&nbsp;&nbsp;
  525. <small>string</small>&nbsp;
  526. &nbsp;
  527. <input type="text" style="display: none"
  528. name="mobile" data-endpoint="POSTapi-account-login"
  529. value="13800138000"
  530. data-component="body">
  531. <br>
  532. <p>手机号码. Example: <code>13800138000</code></p>
  533. </div>
  534. <div style=" padding-left: 28px; clear: unset;">
  535. <b style="line-height: 2;"><code>code</code></b>&nbsp;&nbsp;
  536. <small>string</small>&nbsp;
  537. &nbsp;
  538. <input type="text" style="display: none"
  539. name="code" data-endpoint="POSTapi-account-login"
  540. value="123456"
  541. data-component="body">
  542. <br>
  543. <p>验证码. Example: <code>123456</code></p>
  544. </div>
  545. </form>
  546. <h2 id="endpoints-POSTapi-account-wx-login">[账户管理] 微信登录</h2>
  547. <p>
  548. <small class="badge badge-darkred">requires authentication</small>
  549. </p>
  550. <p>使用微信openid登录账户</p>
  551. <span id="example-requests-POSTapi-account-wx-login">
  552. <blockquote>Example request:</blockquote>
  553. <div class="bash-example">
  554. <pre><code class="language-bash">curl --request POST \
  555. "http://192.168.110.10/api/account/wx-login" \
  556. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
  557. --header "Content-Type: application/json" \
  558. --data "{
  559. \"openid\": \"wx_123456789\"
  560. }"
  561. </code></pre></div>
  562. <div class="javascript-example">
  563. <pre><code class="language-javascript">const url = new URL(
  564. "http://192.168.110.10/api/account/wx-login"
  565. );
  566. const headers = {
  567. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  568. "Content-Type": "application/json",
  569. "Accept": "application/json",
  570. };
  571. let body = {
  572. "openid": "wx_123456789"
  573. };
  574. fetch(url, {
  575. method: "POST",
  576. headers,
  577. body: JSON.stringify(body),
  578. }).then(response =&gt; response.json());</code></pre></div>
  579. <div class="php-example">
  580. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  581. $url = 'http://192.168.110.10/api/account/wx-login';
  582. $response = $client-&gt;post(
  583. $url,
  584. [
  585. 'headers' =&gt; [
  586. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  587. 'Content-Type' =&gt; 'application/json',
  588. ],
  589. 'json' =&gt; [
  590. 'openid' =&gt; 'wx_123456789',
  591. ],
  592. ]
  593. );
  594. $body = $response-&gt;getBody();
  595. print_r(json_decode((string) $body));</code></pre></div>
  596. </span>
  597. <span id="example-responses-POSTapi-account-wx-login">
  598. <blockquote>
  599. <p>Example response (200):</p>
  600. </blockquote>
  601. <pre>
  602. <code class="language-json" style="max-height: 300px;">{
  603. &quot;code&quot;: 200,
  604. &quot;message&quot;: &quot;登录成功&quot;,
  605. &quot;data&quot;: {
  606. &quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...&quot;,
  607. &quot;user&quot;: {
  608. &quot;id&quot;: 1,
  609. &quot;openid&quot;: &quot;wx_123456789&quot;,
  610. &quot;nickname&quot;: &quot;微信昵称&quot;
  611. }
  612. }
  613. }</code>
  614. </pre>
  615. </span>
  616. <span id="execution-results-POSTapi-account-wx-login" hidden>
  617. <blockquote>Received response<span
  618. id="execution-response-status-POSTapi-account-wx-login"></span>:
  619. </blockquote>
  620. <pre class="json"><code id="execution-response-content-POSTapi-account-wx-login"
  621. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  622. </span>
  623. <span id="execution-error-POSTapi-account-wx-login" hidden>
  624. <blockquote>Request failed with error:</blockquote>
  625. <pre><code id="execution-error-message-POSTapi-account-wx-login">
  626. Tip: Check that you&#039;re properly connected to the network.
  627. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  628. You can check the Dev Tools console for debugging information.</code></pre>
  629. </span>
  630. <form id="form-POSTapi-account-wx-login" data-method="POST"
  631. data-path="api/account/wx-login"
  632. data-authed="1"
  633. data-hasfiles="0"
  634. data-isarraybody="0"
  635. autocomplete="off"
  636. onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-wx-login', this);">
  637. <h3>
  638. Request&nbsp;&nbsp;&nbsp;
  639. <button type="button"
  640. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  641. id="btn-tryout-POSTapi-account-wx-login"
  642. onclick="tryItOut('POSTapi-account-wx-login');">Try it out ⚡
  643. </button>
  644. <button type="button"
  645. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  646. id="btn-canceltryout-POSTapi-account-wx-login"
  647. onclick="cancelTryOut('POSTapi-account-wx-login');" hidden>Cancel 🛑
  648. </button>&nbsp;&nbsp;
  649. <button type="submit"
  650. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  651. id="btn-executetryout-POSTapi-account-wx-login"
  652. data-initial-text="Send Request 💥"
  653. data-loading-text="⏱ Sending..."
  654. hidden>Send Request 💥
  655. </button>
  656. </h3>
  657. <p>
  658. <small class="badge badge-black">POST</small>
  659. <b><code>api/account/wx-login</code></b>
  660. </p>
  661. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  662. <div style="padding-left: 28px; clear: unset;">
  663. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  664. &nbsp;
  665. &nbsp;
  666. <input type="text" style="display: none"
  667. name="Authorization" class="auth-value" data-endpoint="POSTapi-account-wx-login"
  668. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  669. data-component="header">
  670. <br>
  671. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  672. </div>
  673. <div style="padding-left: 28px; clear: unset;">
  674. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  675. &nbsp;
  676. &nbsp;
  677. <input type="text" style="display: none"
  678. name="Content-Type" data-endpoint="POSTapi-account-wx-login"
  679. value="application/json"
  680. data-component="header">
  681. <br>
  682. <p>Example: <code>application/json</code></p>
  683. </div>
  684. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  685. <div style=" padding-left: 28px; clear: unset;">
  686. <b style="line-height: 2;"><code>openid</code></b>&nbsp;&nbsp;
  687. <small>string</small>&nbsp;
  688. &nbsp;
  689. <input type="text" style="display: none"
  690. name="openid" data-endpoint="POSTapi-account-wx-login"
  691. value="wx_123456789"
  692. data-component="body">
  693. <br>
  694. <p>微信openid. Example: <code>wx_123456789</code></p>
  695. </div>
  696. </form>
  697. <h2 id="endpoints-POSTapi-account-logout">[账户管理] 用户退出</h2>
  698. <p>
  699. <small class="badge badge-darkred">requires authentication</small>
  700. </p>
  701. <p>退出当前账户登录状态</p>
  702. <span id="example-requests-POSTapi-account-logout">
  703. <blockquote>Example request:</blockquote>
  704. <div class="bash-example">
  705. <pre><code class="language-bash">curl --request POST \
  706. "http://192.168.110.10/api/account/logout" \
  707. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></pre></div>
  708. <div class="javascript-example">
  709. <pre><code class="language-javascript">const url = new URL(
  710. "http://192.168.110.10/api/account/logout"
  711. );
  712. const headers = {
  713. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  714. "Accept": "application/json",
  715. };
  716. fetch(url, {
  717. method: "POST",
  718. headers,
  719. }).then(response =&gt; response.json());</code></pre></div>
  720. <div class="php-example">
  721. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  722. $url = 'http://192.168.110.10/api/account/logout';
  723. $response = $client-&gt;post(
  724. $url,
  725. [
  726. 'headers' =&gt; [
  727. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  728. ],
  729. ]
  730. );
  731. $body = $response-&gt;getBody();
  732. print_r(json_decode((string) $body));</code></pre></div>
  733. </span>
  734. <span id="example-responses-POSTapi-account-logout">
  735. <blockquote>
  736. <p>Example response (200):</p>
  737. </blockquote>
  738. <pre>
  739. <code class="language-json" style="max-height: 300px;">{
  740. &quot;code&quot;: 200,
  741. &quot;message&quot;: &quot;退出成功&quot;,
  742. &quot;data&quot;: null
  743. }</code>
  744. </pre>
  745. </span>
  746. <span id="execution-results-POSTapi-account-logout" hidden>
  747. <blockquote>Received response<span
  748. id="execution-response-status-POSTapi-account-logout"></span>:
  749. </blockquote>
  750. <pre class="json"><code id="execution-response-content-POSTapi-account-logout"
  751. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  752. </span>
  753. <span id="execution-error-POSTapi-account-logout" hidden>
  754. <blockquote>Request failed with error:</blockquote>
  755. <pre><code id="execution-error-message-POSTapi-account-logout">
  756. Tip: Check that you&#039;re properly connected to the network.
  757. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  758. You can check the Dev Tools console for debugging information.</code></pre>
  759. </span>
  760. <form id="form-POSTapi-account-logout" data-method="POST"
  761. data-path="api/account/logout"
  762. data-authed="1"
  763. data-hasfiles="0"
  764. data-isarraybody="0"
  765. autocomplete="off"
  766. onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-logout', this);">
  767. <h3>
  768. Request&nbsp;&nbsp;&nbsp;
  769. <button type="button"
  770. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  771. id="btn-tryout-POSTapi-account-logout"
  772. onclick="tryItOut('POSTapi-account-logout');">Try it out ⚡
  773. </button>
  774. <button type="button"
  775. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  776. id="btn-canceltryout-POSTapi-account-logout"
  777. onclick="cancelTryOut('POSTapi-account-logout');" hidden>Cancel 🛑
  778. </button>&nbsp;&nbsp;
  779. <button type="submit"
  780. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  781. id="btn-executetryout-POSTapi-account-logout"
  782. data-initial-text="Send Request 💥"
  783. data-loading-text="⏱ Sending..."
  784. hidden>Send Request 💥
  785. </button>
  786. </h3>
  787. <p>
  788. <small class="badge badge-black">POST</small>
  789. <b><code>api/account/logout</code></b>
  790. </p>
  791. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  792. <div style="padding-left: 28px; clear: unset;">
  793. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  794. &nbsp;
  795. &nbsp;
  796. <input type="text" style="display: none"
  797. name="Authorization" class="auth-value" data-endpoint="POSTapi-account-logout"
  798. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  799. data-component="header">
  800. <br>
  801. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  802. </div>
  803. </form>
  804. <h2 id="endpoints-DELETEapi-account">[账户管理] 用户注销</h2>
  805. <p>
  806. <small class="badge badge-darkred">requires authentication</small>
  807. </p>
  808. <p>永久注销当前账户</p>
  809. <span id="example-requests-DELETEapi-account">
  810. <blockquote>Example request:</blockquote>
  811. <div class="bash-example">
  812. <pre><code class="language-bash">curl --request DELETE \
  813. "http://192.168.110.10/api/account" \
  814. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></pre></div>
  815. <div class="javascript-example">
  816. <pre><code class="language-javascript">const url = new URL(
  817. "http://192.168.110.10/api/account"
  818. );
  819. const headers = {
  820. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  821. "Accept": "application/json",
  822. };
  823. fetch(url, {
  824. method: "DELETE",
  825. headers,
  826. }).then(response =&gt; response.json());</code></pre></div>
  827. <div class="php-example">
  828. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  829. $url = 'http://192.168.110.10/api/account';
  830. $response = $client-&gt;delete(
  831. $url,
  832. [
  833. 'headers' =&gt; [
  834. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  835. ],
  836. ]
  837. );
  838. $body = $response-&gt;getBody();
  839. print_r(json_decode((string) $body));</code></pre></div>
  840. </span>
  841. <span id="example-responses-DELETEapi-account">
  842. <blockquote>
  843. <p>Example response (200):</p>
  844. </blockquote>
  845. <pre>
  846. <code class="language-json" style="max-height: 300px;">{
  847. &quot;code&quot;: 200,
  848. &quot;message&quot;: &quot;注销成功&quot;,
  849. &quot;data&quot;: null
  850. }</code>
  851. </pre>
  852. </span>
  853. <span id="execution-results-DELETEapi-account" hidden>
  854. <blockquote>Received response<span
  855. id="execution-response-status-DELETEapi-account"></span>:
  856. </blockquote>
  857. <pre class="json"><code id="execution-response-content-DELETEapi-account"
  858. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  859. </span>
  860. <span id="execution-error-DELETEapi-account" hidden>
  861. <blockquote>Request failed with error:</blockquote>
  862. <pre><code id="execution-error-message-DELETEapi-account">
  863. Tip: Check that you&#039;re properly connected to the network.
  864. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  865. You can check the Dev Tools console for debugging information.</code></pre>
  866. </span>
  867. <form id="form-DELETEapi-account" data-method="DELETE"
  868. data-path="api/account"
  869. data-authed="1"
  870. data-hasfiles="0"
  871. data-isarraybody="0"
  872. autocomplete="off"
  873. onsubmit="event.preventDefault(); executeTryOut('DELETEapi-account', this);">
  874. <h3>
  875. Request&nbsp;&nbsp;&nbsp;
  876. <button type="button"
  877. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  878. id="btn-tryout-DELETEapi-account"
  879. onclick="tryItOut('DELETEapi-account');">Try it out ⚡
  880. </button>
  881. <button type="button"
  882. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  883. id="btn-canceltryout-DELETEapi-account"
  884. onclick="cancelTryOut('DELETEapi-account');" hidden>Cancel 🛑
  885. </button>&nbsp;&nbsp;
  886. <button type="submit"
  887. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  888. id="btn-executetryout-DELETEapi-account"
  889. data-initial-text="Send Request 💥"
  890. data-loading-text="⏱ Sending..."
  891. hidden>Send Request 💥
  892. </button>
  893. </h3>
  894. <p>
  895. <small class="badge badge-red">DELETE</small>
  896. <b><code>api/account</code></b>
  897. </p>
  898. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  899. <div style="padding-left: 28px; clear: unset;">
  900. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  901. &nbsp;
  902. &nbsp;
  903. <input type="text" style="display: none"
  904. name="Authorization" class="auth-value" data-endpoint="DELETEapi-account"
  905. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  906. data-component="header">
  907. <br>
  908. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  909. </div>
  910. </form>
  911. <h2 id="endpoints-POSTapi-user-withdraw">[用户管理] 用户提现</h2>
  912. <p>
  913. <small class="badge badge-darkred">requires authentication</small>
  914. </p>
  915. <p>提现用户的余额</p>
  916. <span id="example-requests-POSTapi-user-withdraw">
  917. <blockquote>Example request:</blockquote>
  918. <div class="bash-example">
  919. <pre><code class="language-bash">curl --request POST \
  920. "http://192.168.110.10/api/user/withdraw" \
  921. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
  922. --header "Content-Type: application/json" \
  923. --data "{
  924. \"amount\": \"100.00\"
  925. }"
  926. </code></pre></div>
  927. <div class="javascript-example">
  928. <pre><code class="language-javascript">const url = new URL(
  929. "http://192.168.110.10/api/user/withdraw"
  930. );
  931. const headers = {
  932. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  933. "Content-Type": "application/json",
  934. "Accept": "application/json",
  935. };
  936. let body = {
  937. "amount": "100.00"
  938. };
  939. fetch(url, {
  940. method: "POST",
  941. headers,
  942. body: JSON.stringify(body),
  943. }).then(response =&gt; response.json());</code></pre></div>
  944. <div class="php-example">
  945. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  946. $url = 'http://192.168.110.10/api/user/withdraw';
  947. $response = $client-&gt;post(
  948. $url,
  949. [
  950. 'headers' =&gt; [
  951. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  952. 'Content-Type' =&gt; 'application/json',
  953. ],
  954. 'json' =&gt; [
  955. 'amount' =&gt; '100.00',
  956. ],
  957. ]
  958. );
  959. $body = $response-&gt;getBody();
  960. print_r(json_decode((string) $body));</code></pre></div>
  961. </span>
  962. <span id="example-responses-POSTapi-user-withdraw">
  963. <blockquote>
  964. <p>Example response (200):</p>
  965. </blockquote>
  966. <pre>
  967. <code class="language-json" style="max-height: 300px;">{
  968. &quot;code&quot;: 200,
  969. &quot;message&quot;: &quot;提现成功&quot;,
  970. &quot;data&quot;: null
  971. }</code>
  972. </pre>
  973. </span>
  974. <span id="execution-results-POSTapi-user-withdraw" hidden>
  975. <blockquote>Received response<span
  976. id="execution-response-status-POSTapi-user-withdraw"></span>:
  977. </blockquote>
  978. <pre class="json"><code id="execution-response-content-POSTapi-user-withdraw"
  979. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  980. </span>
  981. <span id="execution-error-POSTapi-user-withdraw" hidden>
  982. <blockquote>Request failed with error:</blockquote>
  983. <pre><code id="execution-error-message-POSTapi-user-withdraw">
  984. Tip: Check that you&#039;re properly connected to the network.
  985. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  986. You can check the Dev Tools console for debugging information.</code></pre>
  987. </span>
  988. <form id="form-POSTapi-user-withdraw" data-method="POST"
  989. data-path="api/user/withdraw"
  990. data-authed="1"
  991. data-hasfiles="0"
  992. data-isarraybody="0"
  993. autocomplete="off"
  994. onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-withdraw', this);">
  995. <h3>
  996. Request&nbsp;&nbsp;&nbsp;
  997. <button type="button"
  998. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  999. id="btn-tryout-POSTapi-user-withdraw"
  1000. onclick="tryItOut('POSTapi-user-withdraw');">Try it out ⚡
  1001. </button>
  1002. <button type="button"
  1003. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1004. id="btn-canceltryout-POSTapi-user-withdraw"
  1005. onclick="cancelTryOut('POSTapi-user-withdraw');" hidden>Cancel 🛑
  1006. </button>&nbsp;&nbsp;
  1007. <button type="submit"
  1008. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1009. id="btn-executetryout-POSTapi-user-withdraw"
  1010. data-initial-text="Send Request 💥"
  1011. data-loading-text="⏱ Sending..."
  1012. hidden>Send Request 💥
  1013. </button>
  1014. </h3>
  1015. <p>
  1016. <small class="badge badge-black">POST</small>
  1017. <b><code>api/user/withdraw</code></b>
  1018. </p>
  1019. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1020. <div style="padding-left: 28px; clear: unset;">
  1021. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1022. &nbsp;
  1023. &nbsp;
  1024. <input type="text" style="display: none"
  1025. name="Authorization" class="auth-value" data-endpoint="POSTapi-user-withdraw"
  1026. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  1027. data-component="header">
  1028. <br>
  1029. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  1030. </div>
  1031. <div style="padding-left: 28px; clear: unset;">
  1032. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  1033. &nbsp;
  1034. &nbsp;
  1035. <input type="text" style="display: none"
  1036. name="Content-Type" data-endpoint="POSTapi-user-withdraw"
  1037. value="application/json"
  1038. data-component="header">
  1039. <br>
  1040. <p>Example: <code>application/json</code></p>
  1041. </div>
  1042. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  1043. <div style=" padding-left: 28px; clear: unset;">
  1044. <b style="line-height: 2;"><code>amount</code></b>&nbsp;&nbsp;
  1045. <small>decimal</small>&nbsp;
  1046. <i>optional</i> &nbsp;
  1047. <input type="text" style="display: none"
  1048. name="amount" data-endpoint="POSTapi-user-withdraw"
  1049. value="100.00"
  1050. data-component="body">
  1051. <br>
  1052. <p>提现金额. Example: <code>100.00</code></p>
  1053. </div>
  1054. </form>
  1055. <h2 id="endpoints-POSTapi-user-feedback">[用户管理] 用户反馈</h2>
  1056. <p>
  1057. <small class="badge badge-darkred">requires authentication</small>
  1058. </p>
  1059. <p>提交用户的反馈信息</p>
  1060. <span id="example-requests-POSTapi-user-feedback">
  1061. <blockquote>Example request:</blockquote>
  1062. <div class="bash-example">
  1063. <pre><code class="language-bash">curl --request POST \
  1064. "http://192.168.110.10/api/user/feedback" \
  1065. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743" \
  1066. --header "Content-Type: application/json" \
  1067. --data "{
  1068. \"content\": \"这是一个反馈信息\"
  1069. }"
  1070. </code></pre></div>
  1071. <div class="javascript-example">
  1072. <pre><code class="language-javascript">const url = new URL(
  1073. "http://192.168.110.10/api/user/feedback"
  1074. );
  1075. const headers = {
  1076. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  1077. "Content-Type": "application/json",
  1078. "Accept": "application/json",
  1079. };
  1080. let body = {
  1081. "content": "这是一个反馈信息"
  1082. };
  1083. fetch(url, {
  1084. method: "POST",
  1085. headers,
  1086. body: JSON.stringify(body),
  1087. }).then(response =&gt; response.json());</code></pre></div>
  1088. <div class="php-example">
  1089. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  1090. $url = 'http://192.168.110.10/api/user/feedback';
  1091. $response = $client-&gt;post(
  1092. $url,
  1093. [
  1094. 'headers' =&gt; [
  1095. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  1096. 'Content-Type' =&gt; 'application/json',
  1097. ],
  1098. 'json' =&gt; [
  1099. 'content' =&gt; '这是一个反馈信息',
  1100. ],
  1101. ]
  1102. );
  1103. $body = $response-&gt;getBody();
  1104. print_r(json_decode((string) $body));</code></pre></div>
  1105. </span>
  1106. <span id="example-responses-POSTapi-user-feedback">
  1107. <blockquote>
  1108. <p>Example response (200):</p>
  1109. </blockquote>
  1110. <pre>
  1111. <code class="language-json" style="max-height: 300px;">{
  1112. &quot;code&quot;: 200,
  1113. &quot;message&quot;: &quot;提交成功&quot;,
  1114. &quot;data&quot;: null
  1115. }</code>
  1116. </pre>
  1117. </span>
  1118. <span id="execution-results-POSTapi-user-feedback" hidden>
  1119. <blockquote>Received response<span
  1120. id="execution-response-status-POSTapi-user-feedback"></span>:
  1121. </blockquote>
  1122. <pre class="json"><code id="execution-response-content-POSTapi-user-feedback"
  1123. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1124. </span>
  1125. <span id="execution-error-POSTapi-user-feedback" hidden>
  1126. <blockquote>Request failed with error:</blockquote>
  1127. <pre><code id="execution-error-message-POSTapi-user-feedback">
  1128. Tip: Check that you&#039;re properly connected to the network.
  1129. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1130. You can check the Dev Tools console for debugging information.</code></pre>
  1131. </span>
  1132. <form id="form-POSTapi-user-feedback" data-method="POST"
  1133. data-path="api/user/feedback"
  1134. data-authed="1"
  1135. data-hasfiles="0"
  1136. data-isarraybody="0"
  1137. autocomplete="off"
  1138. onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-feedback', this);">
  1139. <h3>
  1140. Request&nbsp;&nbsp;&nbsp;
  1141. <button type="button"
  1142. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1143. id="btn-tryout-POSTapi-user-feedback"
  1144. onclick="tryItOut('POSTapi-user-feedback');">Try it out ⚡
  1145. </button>
  1146. <button type="button"
  1147. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1148. id="btn-canceltryout-POSTapi-user-feedback"
  1149. onclick="cancelTryOut('POSTapi-user-feedback');" hidden>Cancel 🛑
  1150. </button>&nbsp;&nbsp;
  1151. <button type="submit"
  1152. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1153. id="btn-executetryout-POSTapi-user-feedback"
  1154. data-initial-text="Send Request 💥"
  1155. data-loading-text="⏱ Sending..."
  1156. hidden>Send Request 💥
  1157. </button>
  1158. </h3>
  1159. <p>
  1160. <small class="badge badge-black">POST</small>
  1161. <b><code>api/user/feedback</code></b>
  1162. </p>
  1163. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1164. <div style="padding-left: 28px; clear: unset;">
  1165. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1166. &nbsp;
  1167. &nbsp;
  1168. <input type="text" style="display: none"
  1169. name="Authorization" class="auth-value" data-endpoint="POSTapi-user-feedback"
  1170. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  1171. data-component="header">
  1172. <br>
  1173. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  1174. </div>
  1175. <div style="padding-left: 28px; clear: unset;">
  1176. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  1177. &nbsp;
  1178. &nbsp;
  1179. <input type="text" style="display: none"
  1180. name="Content-Type" data-endpoint="POSTapi-user-feedback"
  1181. value="application/json"
  1182. data-component="header">
  1183. <br>
  1184. <p>Example: <code>application/json</code></p>
  1185. </div>
  1186. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  1187. <div style=" padding-left: 28px; clear: unset;">
  1188. <b style="line-height: 2;"><code>content</code></b>&nbsp;&nbsp;
  1189. <small>string</small>&nbsp;
  1190. <i>optional</i> &nbsp;
  1191. <input type="text" style="display: none"
  1192. name="content" data-endpoint="POSTapi-user-feedback"
  1193. value="这是一个反馈信息"
  1194. data-component="body">
  1195. <br>
  1196. <p>反馈内容. Example: <code>这是一个反馈信息</code></p>
  1197. </div>
  1198. </form>
  1199. <h2 id="endpoints-POSTapi-user-apply-coach">[用户管理] 申请成为技师</h2>
  1200. <p>
  1201. <small class="badge badge-darkred">requires authentication</small>
  1202. </p>
  1203. <p>申请成为技师</p>
  1204. <span id="example-requests-POSTapi-user-apply-coach">
  1205. <blockquote>Example request:</blockquote>
  1206. <div class="bash-example">
  1207. <pre><code class="language-bash">curl --request POST \
  1208. "http://192.168.110.10/api/user/apply-coach" \
  1209. --header "Authorization: Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"</code></pre></div>
  1210. <div class="javascript-example">
  1211. <pre><code class="language-javascript">const url = new URL(
  1212. "http://192.168.110.10/api/user/apply-coach"
  1213. );
  1214. const headers = {
  1215. "Authorization": "Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743",
  1216. "Accept": "application/json",
  1217. };
  1218. fetch(url, {
  1219. method: "POST",
  1220. headers,
  1221. }).then(response =&gt; response.json());</code></pre></div>
  1222. <div class="php-example">
  1223. <pre><code class="language-php">$client = new \GuzzleHttp\Client();
  1224. $url = 'http://192.168.110.10/api/user/apply-coach';
  1225. $response = $client-&gt;post(
  1226. $url,
  1227. [
  1228. 'headers' =&gt; [
  1229. 'Authorization' =&gt; 'Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743',
  1230. ],
  1231. ]
  1232. );
  1233. $body = $response-&gt;getBody();
  1234. print_r(json_decode((string) $body));</code></pre></div>
  1235. </span>
  1236. <span id="example-responses-POSTapi-user-apply-coach">
  1237. <blockquote>
  1238. <p>Example response (200):</p>
  1239. </blockquote>
  1240. <pre>
  1241. <code class="language-json" style="max-height: 300px;">{
  1242. &quot;code&quot;: 200,
  1243. &quot;message&quot;: &quot;申请成功&quot;,
  1244. &quot;data&quot;: null
  1245. }</code>
  1246. </pre>
  1247. </span>
  1248. <span id="execution-results-POSTapi-user-apply-coach" hidden>
  1249. <blockquote>Received response<span
  1250. id="execution-response-status-POSTapi-user-apply-coach"></span>:
  1251. </blockquote>
  1252. <pre class="json"><code id="execution-response-content-POSTapi-user-apply-coach"
  1253. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1254. </span>
  1255. <span id="execution-error-POSTapi-user-apply-coach" hidden>
  1256. <blockquote>Request failed with error:</blockquote>
  1257. <pre><code id="execution-error-message-POSTapi-user-apply-coach">
  1258. Tip: Check that you&#039;re properly connected to the network.
  1259. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1260. You can check the Dev Tools console for debugging information.</code></pre>
  1261. </span>
  1262. <form id="form-POSTapi-user-apply-coach" data-method="POST"
  1263. data-path="api/user/apply-coach"
  1264. data-authed="1"
  1265. data-hasfiles="0"
  1266. data-isarraybody="0"
  1267. autocomplete="off"
  1268. onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-apply-coach', this);">
  1269. <h3>
  1270. Request&nbsp;&nbsp;&nbsp;
  1271. <button type="button"
  1272. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1273. id="btn-tryout-POSTapi-user-apply-coach"
  1274. onclick="tryItOut('POSTapi-user-apply-coach');">Try it out ⚡
  1275. </button>
  1276. <button type="button"
  1277. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1278. id="btn-canceltryout-POSTapi-user-apply-coach"
  1279. onclick="cancelTryOut('POSTapi-user-apply-coach');" hidden>Cancel 🛑
  1280. </button>&nbsp;&nbsp;
  1281. <button type="submit"
  1282. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1283. id="btn-executetryout-POSTapi-user-apply-coach"
  1284. data-initial-text="Send Request 💥"
  1285. data-loading-text="⏱ Sending..."
  1286. hidden>Send Request 💥
  1287. </button>
  1288. </h3>
  1289. <p>
  1290. <small class="badge badge-black">POST</small>
  1291. <b><code>api/user/apply-coach</code></b>
  1292. </p>
  1293. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1294. <div style="padding-left: 28px; clear: unset;">
  1295. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1296. &nbsp;
  1297. &nbsp;
  1298. <input type="text" style="display: none"
  1299. name="Authorization" class="auth-value" data-endpoint="POSTapi-user-apply-coach"
  1300. value="Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743"
  1301. data-component="header">
  1302. <br>
  1303. <p>Example: <code>Bearer 69|KO7sJGJlD0AxUDOxnKf5uEs4AnvEJKeRQG527cns36375743</code></p>
  1304. </div>
  1305. </form>
  1306. </div>
  1307. <div class="dark-box">
  1308. <div class="lang-selector">
  1309. <button type="button" class="lang-button" data-language-name="bash">bash</button>
  1310. <button type="button" class="lang-button" data-language-name="javascript">javascript</button>
  1311. <button type="button" class="lang-button" data-language-name="php">php</button>
  1312. </div>
  1313. </div>
  1314. </div>
  1315. </body>
  1316. </html>