index.blade.php 196 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041
  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="{{ asset("/vendor/scribe/css/theme-default.style.css") }}" media="screen">
  10. <link rel="stylesheet" href="{{ asset("/vendor/scribe/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" href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css">
  13. <script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
  14. <script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script>
  15. <style id="language-style">
  16. /* starts out as display none and is replaced with js later */
  17. body .content .javascript-example code {
  18. display: none;
  19. }
  20. body .content .bash-example code {
  21. display: none;
  22. }
  23. </style>
  24. <script>
  25. var tryItOutBaseUrl = "http://127.0.0.1";
  26. var useCsrf = Boolean();
  27. var csrfUrl = "/sanctum/csrf-cookie";
  28. </script>
  29. <script src="{{ asset("/vendor/scribe/js/tryitout-4.38.0.js") }}"></script>
  30. <script src="{{ asset("/vendor/scribe/js/theme-default-4.38.0.js") }}"></script>
  31. </head>
  32. <body data-languages="[&quot;javascript&quot;,&quot;bash&quot;]">
  33. <a href="#" id="nav-button">
  34. <span>
  35. MENU
  36. <img src="{{ asset("/vendor/scribe/images/navbar.png") }}" alt="navbar-image" />
  37. </span>
  38. </a>
  39. <div class="tocify-wrapper">
  40. <div class="lang-selector">
  41. <button type="button" class="lang-button"
  42. data-language-name="javascript">javascript</button>
  43. <button type="button" class="lang-button"
  44. data-language-name="bash">bash</button>
  45. </div>
  46. <div class="search">
  47. <input type="text" class="search" id="input-search" placeholder="Search">
  48. </div>
  49. <div id="toc">
  50. <ul id="tocify-header-introduction" class="tocify-header">
  51. <li class="tocify-item level-1" data-unique="introduction">
  52. <a href="#introduction">Introduction</a>
  53. </li>
  54. </ul>
  55. <ul id="tocify-header-authenticating-requests" class="tocify-header">
  56. <li class="tocify-item level-1" data-unique="authenticating-requests">
  57. <a href="#authenticating-requests">Authenticating requests</a>
  58. </li>
  59. </ul>
  60. <ul id="tocify-header-" class="tocify-header">
  61. <li class="tocify-item level-1" data-unique="">
  62. <a href="#"></a>
  63. </li>
  64. <ul id="tocify-subheader-" class="tocify-subheader">
  65. <li class="tocify-item level-2" data-unique="-GETapi-scribe-update-token--mobile-">
  66. <a href="#-GETapi-scribe-update-token--mobile-">更新API文档的认证Token</a>
  67. </li>
  68. </ul>
  69. </ul>
  70. <ul id="tocify-header-" class="tocify-header">
  71. <li class="tocify-item level-1" data-unique="">
  72. <a href="#">用户端</a>
  73. </li>
  74. <ul id="tocify-subheader-" class="tocify-subheader">
  75. <li class="tocify-item level-2" data-unique="-GETapi-user">
  76. <a href="#-GETapi-user">获取用户信息</a>
  77. </li>
  78. <li class="tocify-item level-2" data-unique="-PUTapi-user">
  79. <a href="#-PUTapi-user">修改用户信息</a>
  80. </li>
  81. <li class="tocify-item level-2" data-unique="-GETapi-user-wallet">
  82. <a href="#-GETapi-user-wallet">获取用户钱包</a>
  83. </li>
  84. <li class="tocify-item level-2" data-unique="-POSTapi-user-withdraw">
  85. <a href="#-POSTapi-user-withdraw">用户提现</a>
  86. </li>
  87. <li class="tocify-item level-2" data-unique="-POSTapi-user-apply-coach">
  88. <a href="#-POSTapi-user-apply-coach">申请成为技师</a>
  89. </li>
  90. <li class="tocify-item level-2" data-unique="-GETapi-project">
  91. <a href="#-GETapi-project">获取项目列表</a>
  92. </li>
  93. <li class="tocify-item level-2" data-unique="-GETapi-project--id--detail">
  94. <a href="#-GETapi-project--id--detail">获取项目详情</a>
  95. </li>
  96. <li class="tocify-item level-2" data-unique="-GETapi-project-coach-list">
  97. <a href="#-GETapi-project-coach-list">获取技师项目列表</a>
  98. </li>
  99. <li class="tocify-item level-2" data-unique="-GETapi-coach-location">
  100. <a href="#-GETapi-coach-location">获取定位列表</a>
  101. </li>
  102. <li class="tocify-item level-2" data-unique="-POSTapi-coach-location">
  103. <a href="#-POSTapi-coach-location">创建定位</a>
  104. </li>
  105. <li class="tocify-item level-2" data-unique="-DELETEapi-coach-location--id-">
  106. <a href="#-DELETEapi-coach-location--id-">删除定位</a>
  107. </li>
  108. <li class="tocify-item level-2" data-unique="-GETapi-coach">
  109. <a href="#-GETapi-coach">获取技师列表</a>
  110. </li>
  111. <li class="tocify-item level-2" data-unique="-GETapi-coach--id-">
  112. <a href="#-GETapi-coach--id-">获取技师详情</a>
  113. </li>
  114. <li class="tocify-item level-2" data-unique="-GETapi-address-default">
  115. <a href="#-GETapi-address-default">获取默认地址2</a>
  116. </li>
  117. <li class="tocify-item level-2" data-unique="-POSTapi-address">
  118. <a href="#-POSTapi-address">添加地址</a>
  119. </li>
  120. <li class="tocify-item level-2" data-unique="-PUTapi-address--id-">
  121. <a href="#-PUTapi-address--id-">修改地址</a>
  122. </li>
  123. <li class="tocify-item level-2" data-unique="-DELETEapi-address--id-">
  124. <a href="#-DELETEapi-address--id-">删除地址</a>
  125. </li>
  126. <li class="tocify-item level-2" data-unique="-PUTapi-address--id--default">
  127. <a href="#-PUTapi-address--id--default">设置默认地址</a>
  128. </li>
  129. <li class="tocify-item level-2" data-unique="-POSTapi-orders-initialize">
  130. <a href="#-POSTapi-orders-initialize">订单初始化</a>
  131. </li>
  132. <li class="tocify-item level-2" data-unique="-POSTapi-orders-create">
  133. <a href="#-POSTapi-orders-create">创建订单</a>
  134. </li>
  135. <li class="tocify-item level-2" data-unique="-POSTapi-orders-cancel">
  136. <a href="#-POSTapi-orders-cancel">取消订单</a>
  137. </li>
  138. <li class="tocify-item level-2" data-unique="-POSTapi-orders-finish">
  139. <a href="#-POSTapi-orders-finish">结束订单</a>
  140. </li>
  141. <li class="tocify-item level-2" data-unique="-POSTapi-orders-confirm-leave">
  142. <a href="#-POSTapi-orders-confirm-leave">确认技师离开</a>
  143. </li>
  144. <li class="tocify-item level-2" data-unique="-GETapi-orders-list">
  145. <a href="#-GETapi-orders-list">获取订单列表</a>
  146. </li>
  147. <li class="tocify-item level-2" data-unique="-GETapi-orders-detail--id-">
  148. <a href="#-GETapi-orders-detail--id-">获取订单详情</a>
  149. </li>
  150. </ul>
  151. </ul>
  152. <ul id="tocify-header-" class="tocify-header">
  153. <li class="tocify-item level-1" data-unique="">
  154. <a href="#">账户管理</a>
  155. </li>
  156. <ul id="tocify-subheader-" class="tocify-subheader">
  157. <li class="tocify-item level-2" data-unique="-POSTapi-account-send-code">
  158. <a href="#-POSTapi-account-send-code">发送验证码</a>
  159. </li>
  160. <li class="tocify-item level-2" data-unique="-POSTapi-account-login">
  161. <a href="#-POSTapi-account-login">用户登录</a>
  162. </li>
  163. <li class="tocify-item level-2" data-unique="-POSTapi-account-wx-login">
  164. <a href="#-POSTapi-account-wx-login">微信登录</a>
  165. </li>
  166. <li class="tocify-item level-2" data-unique="-POSTapi-account-logout">
  167. <a href="#-POSTapi-account-logout">用户退出</a>
  168. </li>
  169. <li class="tocify-item level-2" data-unique="-DELETEapi-account">
  170. <a href="#-DELETEapi-account">用户注销</a>
  171. </li>
  172. </ul>
  173. </ul>
  174. </div>
  175. <ul class="toc-footer" id="toc-footer">
  176. <li style="padding-bottom: 5px;"><a href="{{ route("scribe.postman") }}">View Postman collection</a></li>
  177. <li style="padding-bottom: 5px;"><a href="{{ route("scribe.openapi") }}">View OpenAPI spec</a></li>
  178. <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
  179. </ul>
  180. <ul class="toc-footer" id="last-updated">
  181. <li>November 22 2024</li>
  182. </ul>
  183. </div>
  184. <div class="page-wrapper">
  185. <div class="dark-box"></div>
  186. <div class="content">
  187. <h1 id="introduction">Introduction</h1>
  188. <p>Owl Admin API 接口文档</p>
  189. <aside>
  190. <strong>Base URL</strong>: <code>http://127.0.0.1</code>
  191. </aside>
  192. <p>欢迎使用 Owl Admin API 接口文档。</p>
  193. <p>该文档提供了所有可用的API接口信息。</p>
  194. <h1 id="authenticating-requests">Authenticating requests</h1>
  195. <p>To authenticate requests, include an <strong><code>Authorization</code></strong> header with the value <strong><code>"Bearer 171|4wDLRqkRn3A5mQm3b5l9gelKO8BijUZKZrgVugt544296a98"</code></strong>.</p>
  196. <p>All authenticated endpoints are marked with a <code>requires authentication</code> badge in the documentation below.</p>
  197. <p>通过登录接口获取 token,格式为 Bearer {token}</p>
  198. <h1 id=""></h1>
  199. <h2 id="-GETapi-scribe-update-token--mobile-">更新API文档的认证Token</h2>
  200. <p>
  201. <small class="badge badge-darkred">requires authentication</small>
  202. </p>
  203. <p>通过手机号获取验证码并登录,然后更新API文档的认证Token</p>
  204. <span id="example-requests-GETapi-scribe-update-token--mobile-">
  205. <blockquote>Example request:</blockquote>
  206. <div class="javascript-example">
  207. <pre><code class="language-javascript">const url = new URL(
  208. "http://127.0.0.1/api/scribe/update-token/13800138000"
  209. );
  210. const headers = {
  211. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  212. "Accept": "application/json",
  213. };
  214. fetch(url, {
  215. method: "GET",
  216. headers,
  217. }).then(response =&gt; response.json());</code></pre></div>
  218. <div class="bash-example">
  219. <pre><code class="language-bash">curl --request GET \
  220. --get "http://127.0.0.1/api/scribe/update-token/13800138000" \
  221. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  222. </span>
  223. <span id="example-responses-GETapi-scribe-update-token--mobile-">
  224. <blockquote>
  225. <p>Example response (200):</p>
  226. </blockquote>
  227. <pre>
  228. <code class="language-json" style="max-height: 300px;">{
  229. &quot;code&quot;: 200,
  230. &quot;message&quot;: &quot;Token更新成功&quot;,
  231. &quot;data&quot;: {
  232. &quot;token&quot;: &quot;your_new_token_here&quot;
  233. }
  234. }</code>
  235. </pre>
  236. </span>
  237. <span id="execution-results-GETapi-scribe-update-token--mobile-" hidden>
  238. <blockquote>Received response<span
  239. id="execution-response-status-GETapi-scribe-update-token--mobile-"></span>:
  240. </blockquote>
  241. <pre class="json"><code id="execution-response-content-GETapi-scribe-update-token--mobile-"
  242. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  243. </span>
  244. <span id="execution-error-GETapi-scribe-update-token--mobile-" hidden>
  245. <blockquote>Request failed with error:</blockquote>
  246. <pre><code id="execution-error-message-GETapi-scribe-update-token--mobile-">
  247. Tip: Check that you&#039;re properly connected to the network.
  248. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  249. You can check the Dev Tools console for debugging information.</code></pre>
  250. </span>
  251. <form id="form-GETapi-scribe-update-token--mobile-" data-method="GET"
  252. data-path="api/scribe/update-token/{mobile}"
  253. data-authed="1"
  254. data-hasfiles="0"
  255. data-isarraybody="0"
  256. autocomplete="off"
  257. onsubmit="event.preventDefault(); executeTryOut('GETapi-scribe-update-token--mobile-', this);">
  258. <h3>
  259. Request&nbsp;&nbsp;&nbsp;
  260. <button type="button"
  261. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  262. id="btn-tryout-GETapi-scribe-update-token--mobile-"
  263. onclick="tryItOut('GETapi-scribe-update-token--mobile-');">Try it out ⚡
  264. </button>
  265. <button type="button"
  266. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  267. id="btn-canceltryout-GETapi-scribe-update-token--mobile-"
  268. onclick="cancelTryOut('GETapi-scribe-update-token--mobile-');" hidden>Cancel 🛑
  269. </button>&nbsp;&nbsp;
  270. <button type="submit"
  271. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  272. id="btn-executetryout-GETapi-scribe-update-token--mobile-"
  273. data-initial-text="Send Request 💥"
  274. data-loading-text="⏱ Sending..."
  275. hidden>Send Request 💥
  276. </button>
  277. </h3>
  278. <p>
  279. <small class="badge badge-green">GET</small>
  280. <b><code>api/scribe/update-token/{mobile}</code></b>
  281. </p>
  282. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  283. <div style="padding-left: 28px; clear: unset;">
  284. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  285. &nbsp;
  286. &nbsp;
  287. <input type="text" style="display: none"
  288. name="Authorization" class="auth-value" data-endpoint="GETapi-scribe-update-token--mobile-"
  289. value="Bearer {YOUR_AUTH_KEY}"
  290. data-component="header">
  291. <br>
  292. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  293. </div>
  294. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  295. <div style="padding-left: 28px; clear: unset;">
  296. <b style="line-height: 2;"><code>mobile</code></b>&nbsp;&nbsp;
  297. <small>string</small>&nbsp;
  298. &nbsp;
  299. <input type="text" style="display: none"
  300. name="mobile" data-endpoint="GETapi-scribe-update-token--mobile-"
  301. value="13800138000"
  302. data-component="url">
  303. <br>
  304. <p>手机号码. Example: <code>13800138000</code></p>
  305. </div>
  306. </form>
  307. <h1 id="">用户端</h1>
  308. <p>用户相关的API接口</p>
  309. <h2 id="-GETapi-user">获取用户信息</h2>
  310. <p>
  311. <small class="badge badge-darkred">requires authentication</small>
  312. </p>
  313. <p>获取当前用户的信息</p>
  314. <span id="example-requests-GETapi-user">
  315. <blockquote>Example request:</blockquote>
  316. <div class="javascript-example">
  317. <pre><code class="language-javascript">const url = new URL(
  318. "http://127.0.0.1/api/user"
  319. );
  320. const headers = {
  321. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  322. "Accept": "application/json",
  323. };
  324. fetch(url, {
  325. method: "GET",
  326. headers,
  327. }).then(response =&gt; response.json());</code></pre></div>
  328. <div class="bash-example">
  329. <pre><code class="language-bash">curl --request GET \
  330. --get "http://127.0.0.1/api/user" \
  331. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  332. </span>
  333. <span id="example-responses-GETapi-user">
  334. <blockquote>
  335. <p>Example response (200):</p>
  336. </blockquote>
  337. <pre>
  338. <code class="language-json" style="max-height: 300px;">{
  339. &quot;code&quot;: 200,
  340. &quot;message&quot;: &quot;获取成功&quot;,
  341. &quot;data&quot;: {
  342. &quot;id&quot;: 1,
  343. &quot;mobile&quot;: &quot;13800138000&quot;,
  344. &quot;nickname&quot;: &quot;用户昵称&quot;
  345. }
  346. }</code>
  347. </pre>
  348. </span>
  349. <span id="execution-results-GETapi-user" hidden>
  350. <blockquote>Received response<span
  351. id="execution-response-status-GETapi-user"></span>:
  352. </blockquote>
  353. <pre class="json"><code id="execution-response-content-GETapi-user"
  354. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  355. </span>
  356. <span id="execution-error-GETapi-user" hidden>
  357. <blockquote>Request failed with error:</blockquote>
  358. <pre><code id="execution-error-message-GETapi-user">
  359. Tip: Check that you&#039;re properly connected to the network.
  360. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  361. You can check the Dev Tools console for debugging information.</code></pre>
  362. </span>
  363. <form id="form-GETapi-user" data-method="GET"
  364. data-path="api/user"
  365. data-authed="1"
  366. data-hasfiles="0"
  367. data-isarraybody="0"
  368. autocomplete="off"
  369. onsubmit="event.preventDefault(); executeTryOut('GETapi-user', this);">
  370. <h3>
  371. Request&nbsp;&nbsp;&nbsp;
  372. <button type="button"
  373. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  374. id="btn-tryout-GETapi-user"
  375. onclick="tryItOut('GETapi-user');">Try it out ⚡
  376. </button>
  377. <button type="button"
  378. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  379. id="btn-canceltryout-GETapi-user"
  380. onclick="cancelTryOut('GETapi-user');" hidden>Cancel 🛑
  381. </button>&nbsp;&nbsp;
  382. <button type="submit"
  383. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  384. id="btn-executetryout-GETapi-user"
  385. data-initial-text="Send Request 💥"
  386. data-loading-text="⏱ Sending..."
  387. hidden>Send Request 💥
  388. </button>
  389. </h3>
  390. <p>
  391. <small class="badge badge-green">GET</small>
  392. <b><code>api/user</code></b>
  393. </p>
  394. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  395. <div style="padding-left: 28px; clear: unset;">
  396. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  397. &nbsp;
  398. &nbsp;
  399. <input type="text" style="display: none"
  400. name="Authorization" class="auth-value" data-endpoint="GETapi-user"
  401. value="Bearer {YOUR_AUTH_KEY}"
  402. data-component="header">
  403. <br>
  404. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  405. </div>
  406. </form>
  407. <h2 id="-PUTapi-user">修改用户信息</h2>
  408. <p>
  409. <small class="badge badge-darkred">requires authentication</small>
  410. </p>
  411. <p>修改当前用户的信息</p>
  412. <span id="example-requests-PUTapi-user">
  413. <blockquote>Example request:</blockquote>
  414. <div class="javascript-example">
  415. <pre><code class="language-javascript">const url = new URL(
  416. "http://127.0.0.1/api/user"
  417. );
  418. const headers = {
  419. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  420. "Content-Type": "application/json",
  421. "Accept": "application/json",
  422. };
  423. let body = {
  424. "nickname": "用户昵称",
  425. "avatar": "https:\/\/example.com\/avatar.jpg"
  426. };
  427. fetch(url, {
  428. method: "PUT",
  429. headers,
  430. body: JSON.stringify(body),
  431. }).then(response =&gt; response.json());</code></pre></div>
  432. <div class="bash-example">
  433. <pre><code class="language-bash">curl --request PUT \
  434. "http://127.0.0.1/api/user" \
  435. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  436. --header "Content-Type: application/json" \
  437. --data "{
  438. \"nickname\": \"用户昵称\",
  439. \"avatar\": \"https:\\/\\/example.com\\/avatar.jpg\"
  440. }"
  441. </code></pre></div>
  442. </span>
  443. <span id="example-responses-PUTapi-user">
  444. <blockquote>
  445. <p>Example response (200):</p>
  446. </blockquote>
  447. <pre>
  448. <code class="language-json" style="max-height: 300px;">{
  449. &quot;code&quot;: 200,
  450. &quot;message&quot;: &quot;修改成功&quot;,
  451. &quot;data&quot;: null
  452. }</code>
  453. </pre>
  454. </span>
  455. <span id="execution-results-PUTapi-user" hidden>
  456. <blockquote>Received response<span
  457. id="execution-response-status-PUTapi-user"></span>:
  458. </blockquote>
  459. <pre class="json"><code id="execution-response-content-PUTapi-user"
  460. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  461. </span>
  462. <span id="execution-error-PUTapi-user" hidden>
  463. <blockquote>Request failed with error:</blockquote>
  464. <pre><code id="execution-error-message-PUTapi-user">
  465. Tip: Check that you&#039;re properly connected to the network.
  466. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  467. You can check the Dev Tools console for debugging information.</code></pre>
  468. </span>
  469. <form id="form-PUTapi-user" data-method="PUT"
  470. data-path="api/user"
  471. data-authed="1"
  472. data-hasfiles="0"
  473. data-isarraybody="0"
  474. autocomplete="off"
  475. onsubmit="event.preventDefault(); executeTryOut('PUTapi-user', this);">
  476. <h3>
  477. Request&nbsp;&nbsp;&nbsp;
  478. <button type="button"
  479. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  480. id="btn-tryout-PUTapi-user"
  481. onclick="tryItOut('PUTapi-user');">Try it out ⚡
  482. </button>
  483. <button type="button"
  484. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  485. id="btn-canceltryout-PUTapi-user"
  486. onclick="cancelTryOut('PUTapi-user');" hidden>Cancel 🛑
  487. </button>&nbsp;&nbsp;
  488. <button type="submit"
  489. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  490. id="btn-executetryout-PUTapi-user"
  491. data-initial-text="Send Request 💥"
  492. data-loading-text="⏱ Sending..."
  493. hidden>Send Request 💥
  494. </button>
  495. </h3>
  496. <p>
  497. <small class="badge badge-darkblue">PUT</small>
  498. <b><code>api/user</code></b>
  499. </p>
  500. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  501. <div style="padding-left: 28px; clear: unset;">
  502. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  503. &nbsp;
  504. &nbsp;
  505. <input type="text" style="display: none"
  506. name="Authorization" class="auth-value" data-endpoint="PUTapi-user"
  507. value="Bearer {YOUR_AUTH_KEY}"
  508. data-component="header">
  509. <br>
  510. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  511. </div>
  512. <div style="padding-left: 28px; clear: unset;">
  513. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  514. &nbsp;
  515. &nbsp;
  516. <input type="text" style="display: none"
  517. name="Content-Type" data-endpoint="PUTapi-user"
  518. value="application/json"
  519. data-component="header">
  520. <br>
  521. <p>Example: <code>application/json</code></p>
  522. </div>
  523. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  524. <div style=" padding-left: 28px; clear: unset;">
  525. <b style="line-height: 2;"><code>nickname</code></b>&nbsp;&nbsp;
  526. <small>string</small>&nbsp;
  527. <i>optional</i> &nbsp;
  528. <input type="text" style="display: none"
  529. name="nickname" data-endpoint="PUTapi-user"
  530. value="用户昵称"
  531. data-component="body">
  532. <br>
  533. <p>用户昵称. Example: <code>用户昵称</code></p>
  534. </div>
  535. <div style=" padding-left: 28px; clear: unset;">
  536. <b style="line-height: 2;"><code>avatar</code></b>&nbsp;&nbsp;
  537. <small>string</small>&nbsp;
  538. <i>optional</i> &nbsp;
  539. <input type="text" style="display: none"
  540. name="avatar" data-endpoint="PUTapi-user"
  541. value="https://example.com/avatar.jpg"
  542. data-component="body">
  543. <br>
  544. <p>用户头像. Example: <code>https://example.com/avatar.jpg</code></p>
  545. </div>
  546. </form>
  547. <h2 id="-GETapi-user-wallet">获取用户钱包</h2>
  548. <p>
  549. <small class="badge badge-darkred">requires authentication</small>
  550. </p>
  551. <p>获取当前用户的钱包信息</p>
  552. <span id="example-requests-GETapi-user-wallet">
  553. <blockquote>Example request:</blockquote>
  554. <div class="javascript-example">
  555. <pre><code class="language-javascript">const url = new URL(
  556. "http://127.0.0.1/api/user/wallet"
  557. );
  558. const headers = {
  559. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  560. "Accept": "application/json",
  561. };
  562. fetch(url, {
  563. method: "GET",
  564. headers,
  565. }).then(response =&gt; response.json());</code></pre></div>
  566. <div class="bash-example">
  567. <pre><code class="language-bash">curl --request GET \
  568. --get "http://127.0.0.1/api/user/wallet" \
  569. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  570. </span>
  571. <span id="example-responses-GETapi-user-wallet">
  572. <blockquote>
  573. <p>Example response (200):</p>
  574. </blockquote>
  575. <pre>
  576. <code class="language-json" style="max-height: 300px;">{
  577. &quot;code&quot;: 200,
  578. &quot;message&quot;: &quot;获取成功&quot;,
  579. &quot;data&quot;: {
  580. &quot;balance&quot;: 100,
  581. &quot;freeze&quot;: 0
  582. }
  583. }</code>
  584. </pre>
  585. </span>
  586. <span id="execution-results-GETapi-user-wallet" hidden>
  587. <blockquote>Received response<span
  588. id="execution-response-status-GETapi-user-wallet"></span>:
  589. </blockquote>
  590. <pre class="json"><code id="execution-response-content-GETapi-user-wallet"
  591. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  592. </span>
  593. <span id="execution-error-GETapi-user-wallet" hidden>
  594. <blockquote>Request failed with error:</blockquote>
  595. <pre><code id="execution-error-message-GETapi-user-wallet">
  596. Tip: Check that you&#039;re properly connected to the network.
  597. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  598. You can check the Dev Tools console for debugging information.</code></pre>
  599. </span>
  600. <form id="form-GETapi-user-wallet" data-method="GET"
  601. data-path="api/user/wallet"
  602. data-authed="1"
  603. data-hasfiles="0"
  604. data-isarraybody="0"
  605. autocomplete="off"
  606. onsubmit="event.preventDefault(); executeTryOut('GETapi-user-wallet', this);">
  607. <h3>
  608. Request&nbsp;&nbsp;&nbsp;
  609. <button type="button"
  610. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  611. id="btn-tryout-GETapi-user-wallet"
  612. onclick="tryItOut('GETapi-user-wallet');">Try it out ⚡
  613. </button>
  614. <button type="button"
  615. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  616. id="btn-canceltryout-GETapi-user-wallet"
  617. onclick="cancelTryOut('GETapi-user-wallet');" hidden>Cancel 🛑
  618. </button>&nbsp;&nbsp;
  619. <button type="submit"
  620. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  621. id="btn-executetryout-GETapi-user-wallet"
  622. data-initial-text="Send Request 💥"
  623. data-loading-text="⏱ Sending..."
  624. hidden>Send Request 💥
  625. </button>
  626. </h3>
  627. <p>
  628. <small class="badge badge-green">GET</small>
  629. <b><code>api/user/wallet</code></b>
  630. </p>
  631. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  632. <div style="padding-left: 28px; clear: unset;">
  633. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  634. &nbsp;
  635. &nbsp;
  636. <input type="text" style="display: none"
  637. name="Authorization" class="auth-value" data-endpoint="GETapi-user-wallet"
  638. value="Bearer {YOUR_AUTH_KEY}"
  639. data-component="header">
  640. <br>
  641. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  642. </div>
  643. </form>
  644. <h2 id="-POSTapi-user-withdraw">用户提现</h2>
  645. <p>
  646. <small class="badge badge-darkred">requires authentication</small>
  647. </p>
  648. <p>提现用户的余额</p>
  649. <span id="example-requests-POSTapi-user-withdraw">
  650. <blockquote>Example request:</blockquote>
  651. <div class="javascript-example">
  652. <pre><code class="language-javascript">const url = new URL(
  653. "http://127.0.0.1/api/user/withdraw"
  654. );
  655. const headers = {
  656. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  657. "Content-Type": "application/json",
  658. "Accept": "application/json",
  659. };
  660. let body = {
  661. "amount": "100.00",
  662. "type": "wechat",
  663. "area_code": "330100"
  664. };
  665. fetch(url, {
  666. method: "POST",
  667. headers,
  668. body: JSON.stringify(body),
  669. }).then(response =&gt; response.json());</code></pre></div>
  670. <div class="bash-example">
  671. <pre><code class="language-bash">curl --request POST \
  672. "http://127.0.0.1/api/user/withdraw" \
  673. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  674. --header "Content-Type: application/json" \
  675. --data "{
  676. \"amount\": \"100.00\",
  677. \"type\": \"wechat\",
  678. \"area_code\": \"330100\"
  679. }"
  680. </code></pre></div>
  681. </span>
  682. <span id="example-responses-POSTapi-user-withdraw">
  683. <blockquote>
  684. <p>Example response (200):</p>
  685. </blockquote>
  686. <pre>
  687. <code class="language-json" style="max-height: 300px;">{
  688. &quot;code&quot;: 200,
  689. &quot;message&quot;: &quot;提现成功&quot;,
  690. &quot;data&quot;: null
  691. }</code>
  692. </pre>
  693. </span>
  694. <span id="execution-results-POSTapi-user-withdraw" hidden>
  695. <blockquote>Received response<span
  696. id="execution-response-status-POSTapi-user-withdraw"></span>:
  697. </blockquote>
  698. <pre class="json"><code id="execution-response-content-POSTapi-user-withdraw"
  699. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  700. </span>
  701. <span id="execution-error-POSTapi-user-withdraw" hidden>
  702. <blockquote>Request failed with error:</blockquote>
  703. <pre><code id="execution-error-message-POSTapi-user-withdraw">
  704. Tip: Check that you&#039;re properly connected to the network.
  705. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  706. You can check the Dev Tools console for debugging information.</code></pre>
  707. </span>
  708. <form id="form-POSTapi-user-withdraw" data-method="POST"
  709. data-path="api/user/withdraw"
  710. data-authed="1"
  711. data-hasfiles="0"
  712. data-isarraybody="0"
  713. autocomplete="off"
  714. onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-withdraw', this);">
  715. <h3>
  716. Request&nbsp;&nbsp;&nbsp;
  717. <button type="button"
  718. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  719. id="btn-tryout-POSTapi-user-withdraw"
  720. onclick="tryItOut('POSTapi-user-withdraw');">Try it out ⚡
  721. </button>
  722. <button type="button"
  723. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  724. id="btn-canceltryout-POSTapi-user-withdraw"
  725. onclick="cancelTryOut('POSTapi-user-withdraw');" hidden>Cancel 🛑
  726. </button>&nbsp;&nbsp;
  727. <button type="submit"
  728. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  729. id="btn-executetryout-POSTapi-user-withdraw"
  730. data-initial-text="Send Request 💥"
  731. data-loading-text="⏱ Sending..."
  732. hidden>Send Request 💥
  733. </button>
  734. </h3>
  735. <p>
  736. <small class="badge badge-black">POST</small>
  737. <b><code>api/user/withdraw</code></b>
  738. </p>
  739. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  740. <div style="padding-left: 28px; clear: unset;">
  741. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  742. &nbsp;
  743. &nbsp;
  744. <input type="text" style="display: none"
  745. name="Authorization" class="auth-value" data-endpoint="POSTapi-user-withdraw"
  746. value="Bearer {YOUR_AUTH_KEY}"
  747. data-component="header">
  748. <br>
  749. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  750. </div>
  751. <div style="padding-left: 28px; clear: unset;">
  752. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  753. &nbsp;
  754. &nbsp;
  755. <input type="text" style="display: none"
  756. name="Content-Type" data-endpoint="POSTapi-user-withdraw"
  757. value="application/json"
  758. data-component="header">
  759. <br>
  760. <p>Example: <code>application/json</code></p>
  761. </div>
  762. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  763. <div style=" padding-left: 28px; clear: unset;">
  764. <b style="line-height: 2;"><code>amount</code></b>&nbsp;&nbsp;
  765. <small>decimal</small>&nbsp;
  766. <i>optional</i> &nbsp;
  767. <input type="text" style="display: none"
  768. name="amount" data-endpoint="POSTapi-user-withdraw"
  769. value="100.00"
  770. data-component="body">
  771. <br>
  772. <p>提现金额. Example: <code>100.00</code></p>
  773. </div>
  774. <div style=" padding-left: 28px; clear: unset;">
  775. <b style="line-height: 2;"><code>type</code></b>&nbsp;&nbsp;
  776. <small>string</small>&nbsp;
  777. <i>optional</i> &nbsp;
  778. <input type="text" style="display: none"
  779. name="type" data-endpoint="POSTapi-user-withdraw"
  780. value="wechat"
  781. data-component="body">
  782. <br>
  783. <p>提现方式. Example: <code>wechat</code></p>
  784. </div>
  785. <div style=" padding-left: 28px; clear: unset;">
  786. <b style="line-height: 2;"><code>area_code</code></b>&nbsp;&nbsp;
  787. <small>string</small>&nbsp;
  788. <i>optional</i> &nbsp;
  789. <input type="text" style="display: none"
  790. name="area_code" data-endpoint="POSTapi-user-withdraw"
  791. value="330100"
  792. data-component="body">
  793. <br>
  794. <p>行政区划代码. Example: <code>330100</code></p>
  795. </div>
  796. </form>
  797. <h2 id="-POSTapi-user-apply-coach">申请成为技师</h2>
  798. <p>
  799. <small class="badge badge-darkred">requires authentication</small>
  800. </p>
  801. <p>申请成为技师</p>
  802. <span id="example-requests-POSTapi-user-apply-coach">
  803. <blockquote>Example request:</blockquote>
  804. <div class="javascript-example">
  805. <pre><code class="language-javascript">const url = new URL(
  806. "http://127.0.0.1/api/user/apply-coach"
  807. );
  808. const headers = {
  809. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  810. "Content-Type": "application/json",
  811. "Accept": "application/json",
  812. };
  813. let body = {
  814. "mobile": "13800138000",
  815. "gender": "male",
  816. "work_years": "5",
  817. "intention_city": "杭州"
  818. };
  819. fetch(url, {
  820. method: "POST",
  821. headers,
  822. body: JSON.stringify(body),
  823. }).then(response =&gt; response.json());</code></pre></div>
  824. <div class="bash-example">
  825. <pre><code class="language-bash">curl --request POST \
  826. "http://127.0.0.1/api/user/apply-coach" \
  827. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  828. --header "Content-Type: application/json" \
  829. --data "{
  830. \"mobile\": \"13800138000\",
  831. \"gender\": \"male\",
  832. \"work_years\": \"5\",
  833. \"intention_city\": \"杭州\"
  834. }"
  835. </code></pre></div>
  836. </span>
  837. <span id="example-responses-POSTapi-user-apply-coach">
  838. <blockquote>
  839. <p>Example response (200):</p>
  840. </blockquote>
  841. <pre>
  842. <code class="language-json" style="max-height: 300px;">{
  843. &quot;code&quot;: 200,
  844. &quot;message&quot;: &quot;申请成功&quot;,
  845. &quot;data&quot;: null
  846. }</code>
  847. </pre>
  848. </span>
  849. <span id="execution-results-POSTapi-user-apply-coach" hidden>
  850. <blockquote>Received response<span
  851. id="execution-response-status-POSTapi-user-apply-coach"></span>:
  852. </blockquote>
  853. <pre class="json"><code id="execution-response-content-POSTapi-user-apply-coach"
  854. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  855. </span>
  856. <span id="execution-error-POSTapi-user-apply-coach" hidden>
  857. <blockquote>Request failed with error:</blockquote>
  858. <pre><code id="execution-error-message-POSTapi-user-apply-coach">
  859. Tip: Check that you&#039;re properly connected to the network.
  860. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  861. You can check the Dev Tools console for debugging information.</code></pre>
  862. </span>
  863. <form id="form-POSTapi-user-apply-coach" data-method="POST"
  864. data-path="api/user/apply-coach"
  865. data-authed="1"
  866. data-hasfiles="0"
  867. data-isarraybody="0"
  868. autocomplete="off"
  869. onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-apply-coach', this);">
  870. <h3>
  871. Request&nbsp;&nbsp;&nbsp;
  872. <button type="button"
  873. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  874. id="btn-tryout-POSTapi-user-apply-coach"
  875. onclick="tryItOut('POSTapi-user-apply-coach');">Try it out ⚡
  876. </button>
  877. <button type="button"
  878. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  879. id="btn-canceltryout-POSTapi-user-apply-coach"
  880. onclick="cancelTryOut('POSTapi-user-apply-coach');" hidden>Cancel 🛑
  881. </button>&nbsp;&nbsp;
  882. <button type="submit"
  883. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  884. id="btn-executetryout-POSTapi-user-apply-coach"
  885. data-initial-text="Send Request 💥"
  886. data-loading-text="⏱ Sending..."
  887. hidden>Send Request 💥
  888. </button>
  889. </h3>
  890. <p>
  891. <small class="badge badge-black">POST</small>
  892. <b><code>api/user/apply-coach</code></b>
  893. </p>
  894. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  895. <div style="padding-left: 28px; clear: unset;">
  896. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  897. &nbsp;
  898. &nbsp;
  899. <input type="text" style="display: none"
  900. name="Authorization" class="auth-value" data-endpoint="POSTapi-user-apply-coach"
  901. value="Bearer {YOUR_AUTH_KEY}"
  902. data-component="header">
  903. <br>
  904. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  905. </div>
  906. <div style="padding-left: 28px; clear: unset;">
  907. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  908. &nbsp;
  909. &nbsp;
  910. <input type="text" style="display: none"
  911. name="Content-Type" data-endpoint="POSTapi-user-apply-coach"
  912. value="application/json"
  913. data-component="header">
  914. <br>
  915. <p>Example: <code>application/json</code></p>
  916. </div>
  917. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  918. <div style=" padding-left: 28px; clear: unset;">
  919. <b style="line-height: 2;"><code>mobile</code></b>&nbsp;&nbsp;
  920. <small>string</small>&nbsp;
  921. <i>optional</i> &nbsp;
  922. <input type="text" style="display: none"
  923. name="mobile" data-endpoint="POSTapi-user-apply-coach"
  924. value="13800138000"
  925. data-component="body">
  926. <br>
  927. <p>手机号. Example: <code>13800138000</code></p>
  928. </div>
  929. <div style=" padding-left: 28px; clear: unset;">
  930. <b style="line-height: 2;"><code>gender</code></b>&nbsp;&nbsp;
  931. <small>string</small>&nbsp;
  932. <i>optional</i> &nbsp;
  933. <input type="text" style="display: none"
  934. name="gender" data-endpoint="POSTapi-user-apply-coach"
  935. value="male"
  936. data-component="body">
  937. <br>
  938. <p>性别. Example: <code>male</code></p>
  939. </div>
  940. <div style=" padding-left: 28px; clear: unset;">
  941. <b style="line-height: 2;"><code>work_years</code></b>&nbsp;&nbsp;
  942. <small>string</small>&nbsp;
  943. <i>optional</i> &nbsp;
  944. <input type="text" style="display: none"
  945. name="work_years" data-endpoint="POSTapi-user-apply-coach"
  946. value="5"
  947. data-component="body">
  948. <br>
  949. <p>工作年限. Example: <code>5</code></p>
  950. </div>
  951. <div style=" padding-left: 28px; clear: unset;">
  952. <b style="line-height: 2;"><code>intention_city</code></b>&nbsp;&nbsp;
  953. <small>string</small>&nbsp;
  954. <i>optional</i> &nbsp;
  955. <input type="text" style="display: none"
  956. name="intention_city" data-endpoint="POSTapi-user-apply-coach"
  957. value="杭州"
  958. data-component="body">
  959. <br>
  960. <p>意向城市. Example: <code>杭州</code></p>
  961. </div>
  962. </form>
  963. <h2 id="-GETapi-project">获取项目列表</h2>
  964. <p>
  965. <small class="badge badge-darkred">requires authentication</small>
  966. </p>
  967. <p>根据区域代码获取项目列表</p>
  968. <span id="example-requests-GETapi-project">
  969. <blockquote>Example request:</blockquote>
  970. <div class="javascript-example">
  971. <pre><code class="language-javascript">const url = new URL(
  972. "http://127.0.0.1/api/project"
  973. );
  974. const params = {
  975. "area_code": "330100",
  976. "project_cate_id": "1",
  977. };
  978. Object.keys(params)
  979. .forEach(key =&gt; url.searchParams.append(key, params[key]));
  980. const headers = {
  981. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  982. "Accept": "application/json",
  983. };
  984. fetch(url, {
  985. method: "GET",
  986. headers,
  987. }).then(response =&gt; response.json());</code></pre></div>
  988. <div class="bash-example">
  989. <pre><code class="language-bash">curl --request GET \
  990. --get "http://127.0.0.1/api/project?area_code=330100&amp;project_cate_id=1" \
  991. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  992. </span>
  993. <span id="example-responses-GETapi-project">
  994. <blockquote>
  995. <p>Example response (200):</p>
  996. </blockquote>
  997. <pre>
  998. <code class="language-json" style="max-height: 300px;">{
  999. &quot;code&quot;: 200,
  1000. &quot;message&quot;: &quot;获取成功&quot;,
  1001. &quot;data&quot;: {
  1002. &quot;current_page&quot;: 1,
  1003. &quot;data&quot;: [
  1004. {
  1005. &quot;id&quot;: 1,
  1006. &quot;name&quot;: &quot;项目名称&quot;,
  1007. &quot;description&quot;: &quot;项目描述&quot;,
  1008. &quot;price&quot;: &quot;100.00&quot;,
  1009. &quot;duration&quot;: 60,
  1010. &quot;category&quot;: {
  1011. &quot;id&quot;: 1,
  1012. &quot;name&quot;: &quot;分类名称&quot;
  1013. }
  1014. }
  1015. ],
  1016. &quot;total&quot;: 10,
  1017. &quot;per_page&quot;: 10
  1018. }
  1019. }</code>
  1020. </pre>
  1021. </span>
  1022. <span id="execution-results-GETapi-project" hidden>
  1023. <blockquote>Received response<span
  1024. id="execution-response-status-GETapi-project"></span>:
  1025. </blockquote>
  1026. <pre class="json"><code id="execution-response-content-GETapi-project"
  1027. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1028. </span>
  1029. <span id="execution-error-GETapi-project" hidden>
  1030. <blockquote>Request failed with error:</blockquote>
  1031. <pre><code id="execution-error-message-GETapi-project">
  1032. Tip: Check that you&#039;re properly connected to the network.
  1033. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1034. You can check the Dev Tools console for debugging information.</code></pre>
  1035. </span>
  1036. <form id="form-GETapi-project" data-method="GET"
  1037. data-path="api/project"
  1038. data-authed="1"
  1039. data-hasfiles="0"
  1040. data-isarraybody="0"
  1041. autocomplete="off"
  1042. onsubmit="event.preventDefault(); executeTryOut('GETapi-project', this);">
  1043. <h3>
  1044. Request&nbsp;&nbsp;&nbsp;
  1045. <button type="button"
  1046. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1047. id="btn-tryout-GETapi-project"
  1048. onclick="tryItOut('GETapi-project');">Try it out ⚡
  1049. </button>
  1050. <button type="button"
  1051. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1052. id="btn-canceltryout-GETapi-project"
  1053. onclick="cancelTryOut('GETapi-project');" hidden>Cancel 🛑
  1054. </button>&nbsp;&nbsp;
  1055. <button type="submit"
  1056. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1057. id="btn-executetryout-GETapi-project"
  1058. data-initial-text="Send Request 💥"
  1059. data-loading-text="⏱ Sending..."
  1060. hidden>Send Request 💥
  1061. </button>
  1062. </h3>
  1063. <p>
  1064. <small class="badge badge-green">GET</small>
  1065. <b><code>api/project</code></b>
  1066. </p>
  1067. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1068. <div style="padding-left: 28px; clear: unset;">
  1069. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1070. &nbsp;
  1071. &nbsp;
  1072. <input type="text" style="display: none"
  1073. name="Authorization" class="auth-value" data-endpoint="GETapi-project"
  1074. value="Bearer {YOUR_AUTH_KEY}"
  1075. data-component="header">
  1076. <br>
  1077. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  1078. </div>
  1079. <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
  1080. <div style="padding-left: 28px; clear: unset;">
  1081. <b style="line-height: 2;"><code>area_code</code></b>&nbsp;&nbsp;
  1082. <small>string</small>&nbsp;
  1083. <i>optional</i> &nbsp;
  1084. <input type="text" style="display: none"
  1085. name="area_code" data-endpoint="GETapi-project"
  1086. value="330100"
  1087. data-component="query">
  1088. <br>
  1089. <p>区域代码. Example: <code>330100</code></p>
  1090. </div>
  1091. <div style="padding-left: 28px; clear: unset;">
  1092. <b style="line-height: 2;"><code>project_cate_id</code></b>&nbsp;&nbsp;
  1093. <small>integer</small>&nbsp;
  1094. <i>optional</i> &nbsp;
  1095. <input type="number" style="display: none"
  1096. step="any" name="project_cate_id" data-endpoint="GETapi-project"
  1097. value="1"
  1098. data-component="query">
  1099. <br>
  1100. <p>项目分类ID. Example: <code>1</code></p>
  1101. </div>
  1102. </form>
  1103. <h2 id="-GETapi-project--id--detail">获取项目详情</h2>
  1104. <p>
  1105. <small class="badge badge-darkred">requires authentication</small>
  1106. </p>
  1107. <p>获取指定项目的详细信息</p>
  1108. <span id="example-requests-GETapi-project--id--detail">
  1109. <blockquote>Example request:</blockquote>
  1110. <div class="javascript-example">
  1111. <pre><code class="language-javascript">const url = new URL(
  1112. "http://127.0.0.1/api/project/1/detail"
  1113. );
  1114. const params = {
  1115. "area_code": "330100",
  1116. };
  1117. Object.keys(params)
  1118. .forEach(key =&gt; url.searchParams.append(key, params[key]));
  1119. const headers = {
  1120. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  1121. "Accept": "application/json",
  1122. };
  1123. fetch(url, {
  1124. method: "GET",
  1125. headers,
  1126. }).then(response =&gt; response.json());</code></pre></div>
  1127. <div class="bash-example">
  1128. <pre><code class="language-bash">curl --request GET \
  1129. --get "http://127.0.0.1/api/project/1/detail?area_code=330100" \
  1130. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  1131. </span>
  1132. <span id="example-responses-GETapi-project--id--detail">
  1133. <blockquote>
  1134. <p>Example response (200):</p>
  1135. </blockquote>
  1136. <pre>
  1137. <code class="language-json" style="max-height: 300px;">{
  1138. &quot;code&quot;: 200,
  1139. &quot;message&quot;: &quot;获取成功&quot;,
  1140. &quot;data&quot;: {
  1141. &quot;id&quot;: 1,
  1142. &quot;name&quot;: &quot;项目名称&quot;,
  1143. &quot;description&quot;: &quot;项目描述&quot;,
  1144. &quot;price&quot;: &quot;100.00&quot;,
  1145. &quot;duration&quot;: 60,
  1146. &quot;category&quot;: {
  1147. &quot;id&quot;: 1,
  1148. &quot;name&quot;: &quot;分类名称&quot;
  1149. },
  1150. &quot;agent&quot;: {
  1151. &quot;id&quot;: 1,
  1152. &quot;name&quot;: &quot;代理商名称&quot;,
  1153. &quot;contact&quot;: &quot;联系人&quot;,
  1154. &quot;mobile&quot;: &quot;13800138000&quot;
  1155. }
  1156. }
  1157. }</code>
  1158. </pre>
  1159. <blockquote>
  1160. <p>Example response (400):</p>
  1161. </blockquote>
  1162. <pre>
  1163. <code class="language-json" style="max-height: 300px;">{
  1164. &quot;code&quot;: 400,
  1165. &quot;message&quot;: &quot;该区域暂无代理商&quot;
  1166. }</code>
  1167. </pre>
  1168. <blockquote>
  1169. <p>Example response (404):</p>
  1170. </blockquote>
  1171. <pre>
  1172. <code class="language-json" style="max-height: 300px;">{
  1173. &quot;code&quot;: 404,
  1174. &quot;message&quot;: &quot;项目不存在&quot;
  1175. }</code>
  1176. </pre>
  1177. </span>
  1178. <span id="execution-results-GETapi-project--id--detail" hidden>
  1179. <blockquote>Received response<span
  1180. id="execution-response-status-GETapi-project--id--detail"></span>:
  1181. </blockquote>
  1182. <pre class="json"><code id="execution-response-content-GETapi-project--id--detail"
  1183. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1184. </span>
  1185. <span id="execution-error-GETapi-project--id--detail" hidden>
  1186. <blockquote>Request failed with error:</blockquote>
  1187. <pre><code id="execution-error-message-GETapi-project--id--detail">
  1188. Tip: Check that you&#039;re properly connected to the network.
  1189. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1190. You can check the Dev Tools console for debugging information.</code></pre>
  1191. </span>
  1192. <form id="form-GETapi-project--id--detail" data-method="GET"
  1193. data-path="api/project/{id}/detail"
  1194. data-authed="1"
  1195. data-hasfiles="0"
  1196. data-isarraybody="0"
  1197. autocomplete="off"
  1198. onsubmit="event.preventDefault(); executeTryOut('GETapi-project--id--detail', this);">
  1199. <h3>
  1200. Request&nbsp;&nbsp;&nbsp;
  1201. <button type="button"
  1202. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1203. id="btn-tryout-GETapi-project--id--detail"
  1204. onclick="tryItOut('GETapi-project--id--detail');">Try it out ⚡
  1205. </button>
  1206. <button type="button"
  1207. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1208. id="btn-canceltryout-GETapi-project--id--detail"
  1209. onclick="cancelTryOut('GETapi-project--id--detail');" hidden>Cancel 🛑
  1210. </button>&nbsp;&nbsp;
  1211. <button type="submit"
  1212. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1213. id="btn-executetryout-GETapi-project--id--detail"
  1214. data-initial-text="Send Request 💥"
  1215. data-loading-text="⏱ Sending..."
  1216. hidden>Send Request 💥
  1217. </button>
  1218. </h3>
  1219. <p>
  1220. <small class="badge badge-green">GET</small>
  1221. <b><code>api/project/{id}/detail</code></b>
  1222. </p>
  1223. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1224. <div style="padding-left: 28px; clear: unset;">
  1225. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1226. &nbsp;
  1227. &nbsp;
  1228. <input type="text" style="display: none"
  1229. name="Authorization" class="auth-value" data-endpoint="GETapi-project--id--detail"
  1230. value="Bearer {YOUR_AUTH_KEY}"
  1231. data-component="header">
  1232. <br>
  1233. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  1234. </div>
  1235. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  1236. <div style="padding-left: 28px; clear: unset;">
  1237. <b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
  1238. <small>integer</small>&nbsp;
  1239. &nbsp;
  1240. <input type="number" style="display: none"
  1241. step="any" name="id" data-endpoint="GETapi-project--id--detail"
  1242. value="1"
  1243. data-component="url">
  1244. <br>
  1245. <p>项目ID. Example: <code>1</code></p>
  1246. </div>
  1247. <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
  1248. <div style="padding-left: 28px; clear: unset;">
  1249. <b style="line-height: 2;"><code>area_code</code></b>&nbsp;&nbsp;
  1250. <small>string</small>&nbsp;
  1251. &nbsp;
  1252. <input type="text" style="display: none"
  1253. name="area_code" data-endpoint="GETapi-project--id--detail"
  1254. value="330100"
  1255. data-component="query">
  1256. <br>
  1257. <p>区域代码. Example: <code>330100</code></p>
  1258. </div>
  1259. </form>
  1260. <h2 id="-GETapi-project-coach-list">获取技师项目列表</h2>
  1261. <p>
  1262. <small class="badge badge-darkred">requires authentication</small>
  1263. </p>
  1264. <p>获取指定技师已开通的项目列表</p>
  1265. <span id="example-requests-GETapi-project-coach-list">
  1266. <blockquote>Example request:</blockquote>
  1267. <div class="javascript-example">
  1268. <pre><code class="language-javascript">const url = new URL(
  1269. "http://127.0.0.1/api/project/coach-list"
  1270. );
  1271. const params = {
  1272. "coach_id": "1",
  1273. "area_code": "330100",
  1274. "project_cate_id": "1",
  1275. };
  1276. Object.keys(params)
  1277. .forEach(key =&gt; url.searchParams.append(key, params[key]));
  1278. const headers = {
  1279. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  1280. "Accept": "application/json",
  1281. };
  1282. fetch(url, {
  1283. method: "GET",
  1284. headers,
  1285. }).then(response =&gt; response.json());</code></pre></div>
  1286. <div class="bash-example">
  1287. <pre><code class="language-bash">curl --request GET \
  1288. --get "http://127.0.0.1/api/project/coach-list?coach_id=1&amp;area_code=330100&amp;project_cate_id=1" \
  1289. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  1290. </span>
  1291. <span id="example-responses-GETapi-project-coach-list">
  1292. <blockquote>
  1293. <p>Example response (200):</p>
  1294. </blockquote>
  1295. <pre>
  1296. <code class="language-json" style="max-height: 300px;">{
  1297. &quot;code&quot;: 200,
  1298. &quot;message&quot;: &quot;获取成功&quot;,
  1299. &quot;data&quot;: {
  1300. &quot;current_page&quot;: 1,
  1301. &quot;data&quot;: [
  1302. {
  1303. &quot;id&quot;: 1,
  1304. &quot;name&quot;: &quot;项目名称&quot;,
  1305. &quot;description&quot;: &quot;项目描述&quot;,
  1306. &quot;price&quot;: &quot;100.00&quot;,
  1307. &quot;duration&quot;: 60,
  1308. &quot;category&quot;: {
  1309. &quot;id&quot;: 1,
  1310. &quot;name&quot;: &quot;分类名称&quot;
  1311. }
  1312. }
  1313. ],
  1314. &quot;total&quot;: 10,
  1315. &quot;per_page&quot;: 10
  1316. }
  1317. }</code>
  1318. </pre>
  1319. <blockquote>
  1320. <p>Example response (404):</p>
  1321. </blockquote>
  1322. <pre>
  1323. <code class="language-json" style="max-height: 300px;">{
  1324. &quot;code&quot;: 404,
  1325. &quot;message&quot;: &quot;技师不存在或未通过认证&quot;
  1326. }</code>
  1327. </pre>
  1328. </span>
  1329. <span id="execution-results-GETapi-project-coach-list" hidden>
  1330. <blockquote>Received response<span
  1331. id="execution-response-status-GETapi-project-coach-list"></span>:
  1332. </blockquote>
  1333. <pre class="json"><code id="execution-response-content-GETapi-project-coach-list"
  1334. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1335. </span>
  1336. <span id="execution-error-GETapi-project-coach-list" hidden>
  1337. <blockquote>Request failed with error:</blockquote>
  1338. <pre><code id="execution-error-message-GETapi-project-coach-list">
  1339. Tip: Check that you&#039;re properly connected to the network.
  1340. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1341. You can check the Dev Tools console for debugging information.</code></pre>
  1342. </span>
  1343. <form id="form-GETapi-project-coach-list" data-method="GET"
  1344. data-path="api/project/coach-list"
  1345. data-authed="1"
  1346. data-hasfiles="0"
  1347. data-isarraybody="0"
  1348. autocomplete="off"
  1349. onsubmit="event.preventDefault(); executeTryOut('GETapi-project-coach-list', this);">
  1350. <h3>
  1351. Request&nbsp;&nbsp;&nbsp;
  1352. <button type="button"
  1353. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1354. id="btn-tryout-GETapi-project-coach-list"
  1355. onclick="tryItOut('GETapi-project-coach-list');">Try it out ⚡
  1356. </button>
  1357. <button type="button"
  1358. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1359. id="btn-canceltryout-GETapi-project-coach-list"
  1360. onclick="cancelTryOut('GETapi-project-coach-list');" hidden>Cancel 🛑
  1361. </button>&nbsp;&nbsp;
  1362. <button type="submit"
  1363. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1364. id="btn-executetryout-GETapi-project-coach-list"
  1365. data-initial-text="Send Request 💥"
  1366. data-loading-text="⏱ Sending..."
  1367. hidden>Send Request 💥
  1368. </button>
  1369. </h3>
  1370. <p>
  1371. <small class="badge badge-green">GET</small>
  1372. <b><code>api/project/coach-list</code></b>
  1373. </p>
  1374. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1375. <div style="padding-left: 28px; clear: unset;">
  1376. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1377. &nbsp;
  1378. &nbsp;
  1379. <input type="text" style="display: none"
  1380. name="Authorization" class="auth-value" data-endpoint="GETapi-project-coach-list"
  1381. value="Bearer {YOUR_AUTH_KEY}"
  1382. data-component="header">
  1383. <br>
  1384. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  1385. </div>
  1386. <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
  1387. <div style="padding-left: 28px; clear: unset;">
  1388. <b style="line-height: 2;"><code>coach_id</code></b>&nbsp;&nbsp;
  1389. <small>integer</small>&nbsp;
  1390. &nbsp;
  1391. <input type="number" style="display: none"
  1392. step="any" name="coach_id" data-endpoint="GETapi-project-coach-list"
  1393. value="1"
  1394. data-component="query">
  1395. <br>
  1396. <p>技师ID. Example: <code>1</code></p>
  1397. </div>
  1398. <div style="padding-left: 28px; clear: unset;">
  1399. <b style="line-height: 2;"><code>area_code</code></b>&nbsp;&nbsp;
  1400. <small>string</small>&nbsp;
  1401. &nbsp;
  1402. <input type="text" style="display: none"
  1403. name="area_code" data-endpoint="GETapi-project-coach-list"
  1404. value="330100"
  1405. data-component="query">
  1406. <br>
  1407. <p>区域代码. Example: <code>330100</code></p>
  1408. </div>
  1409. <div style="padding-left: 28px; clear: unset;">
  1410. <b style="line-height: 2;"><code>project_cate_id</code></b>&nbsp;&nbsp;
  1411. <small>integer</small>&nbsp;
  1412. <i>optional</i> &nbsp;
  1413. <input type="number" style="display: none"
  1414. step="any" name="project_cate_id" data-endpoint="GETapi-project-coach-list"
  1415. value="1"
  1416. data-component="query">
  1417. <br>
  1418. <p>项目分类ID. Example: <code>1</code></p>
  1419. </div>
  1420. </form>
  1421. <h2 id="-GETapi-coach-location">获取定位列表</h2>
  1422. <p>
  1423. <small class="badge badge-darkred">requires authentication</small>
  1424. </p>
  1425. <span id="example-requests-GETapi-coach-location">
  1426. <blockquote>Example request:</blockquote>
  1427. <div class="javascript-example">
  1428. <pre><code class="language-javascript">const url = new URL(
  1429. "http://127.0.0.1/api/coach/location"
  1430. );
  1431. const headers = {
  1432. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  1433. "Accept": "application/json",
  1434. };
  1435. fetch(url, {
  1436. method: "GET",
  1437. headers,
  1438. }).then(response =&gt; response.json());</code></pre></div>
  1439. <div class="bash-example">
  1440. <pre><code class="language-bash">curl --request GET \
  1441. --get "http://127.0.0.1/api/coach/location" \
  1442. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  1443. </span>
  1444. <span id="example-responses-GETapi-coach-location">
  1445. <blockquote>
  1446. <p>Example response (200):</p>
  1447. </blockquote>
  1448. <pre>
  1449. <code class="language-json" style="max-height: 300px;">{
  1450. &quot;code&quot;: 200,
  1451. &quot;message&quot;: &quot;获取成功&quot;,
  1452. &quot;data&quot;: [
  1453. {
  1454. &quot;id&quot;: 1,
  1455. &quot;type&quot;: &quot;home&quot;,
  1456. &quot;latitude&quot;: 34.0522,
  1457. &quot;longitude&quot;: -118.2437,
  1458. &quot;city&quot;: &quot;Los Angeles&quot;,
  1459. &quot;district&quot;: &quot;Downtown&quot;,
  1460. &quot;location&quot;: &quot;123 Main St&quot;,
  1461. &quot;area_code&quot;: &quot;90001&quot;
  1462. }
  1463. ]
  1464. }</code>
  1465. </pre>
  1466. </span>
  1467. <span id="execution-results-GETapi-coach-location" hidden>
  1468. <blockquote>Received response<span
  1469. id="execution-response-status-GETapi-coach-location"></span>:
  1470. </blockquote>
  1471. <pre class="json"><code id="execution-response-content-GETapi-coach-location"
  1472. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1473. </span>
  1474. <span id="execution-error-GETapi-coach-location" hidden>
  1475. <blockquote>Request failed with error:</blockquote>
  1476. <pre><code id="execution-error-message-GETapi-coach-location">
  1477. Tip: Check that you&#039;re properly connected to the network.
  1478. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1479. You can check the Dev Tools console for debugging information.</code></pre>
  1480. </span>
  1481. <form id="form-GETapi-coach-location" data-method="GET"
  1482. data-path="api/coach/location"
  1483. data-authed="1"
  1484. data-hasfiles="0"
  1485. data-isarraybody="0"
  1486. autocomplete="off"
  1487. onsubmit="event.preventDefault(); executeTryOut('GETapi-coach-location', this);">
  1488. <h3>
  1489. Request&nbsp;&nbsp;&nbsp;
  1490. <button type="button"
  1491. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1492. id="btn-tryout-GETapi-coach-location"
  1493. onclick="tryItOut('GETapi-coach-location');">Try it out ⚡
  1494. </button>
  1495. <button type="button"
  1496. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1497. id="btn-canceltryout-GETapi-coach-location"
  1498. onclick="cancelTryOut('GETapi-coach-location');" hidden>Cancel 🛑
  1499. </button>&nbsp;&nbsp;
  1500. <button type="submit"
  1501. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1502. id="btn-executetryout-GETapi-coach-location"
  1503. data-initial-text="Send Request 💥"
  1504. data-loading-text="⏱ Sending..."
  1505. hidden>Send Request 💥
  1506. </button>
  1507. </h3>
  1508. <p>
  1509. <small class="badge badge-green">GET</small>
  1510. <b><code>api/coach/location</code></b>
  1511. </p>
  1512. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1513. <div style="padding-left: 28px; clear: unset;">
  1514. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1515. &nbsp;
  1516. &nbsp;
  1517. <input type="text" style="display: none"
  1518. name="Authorization" class="auth-value" data-endpoint="GETapi-coach-location"
  1519. value="Bearer {YOUR_AUTH_KEY}"
  1520. data-component="header">
  1521. <br>
  1522. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  1523. </div>
  1524. </form>
  1525. <h2 id="-POSTapi-coach-location">创建定位</h2>
  1526. <p>
  1527. <small class="badge badge-darkred">requires authentication</small>
  1528. </p>
  1529. <span id="example-requests-POSTapi-coach-location">
  1530. <blockquote>Example request:</blockquote>
  1531. <div class="javascript-example">
  1532. <pre><code class="language-javascript">const url = new URL(
  1533. "http://127.0.0.1/api/coach/location"
  1534. );
  1535. const headers = {
  1536. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  1537. "Content-Type": "application/json",
  1538. "Accept": "application/json",
  1539. };
  1540. let body = {
  1541. "type": "home",
  1542. "latitude": 34.0522,
  1543. "longitude": -118.2437,
  1544. "city": "Los Angeles",
  1545. "district": "Downtown",
  1546. "location": "123 Main St",
  1547. "area_code": "90001"
  1548. };
  1549. fetch(url, {
  1550. method: "POST",
  1551. headers,
  1552. body: JSON.stringify(body),
  1553. }).then(response =&gt; response.json());</code></pre></div>
  1554. <div class="bash-example">
  1555. <pre><code class="language-bash">curl --request POST \
  1556. "http://127.0.0.1/api/coach/location" \
  1557. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  1558. --header "Content-Type: application/json" \
  1559. --data "{
  1560. \"type\": \"home\",
  1561. \"latitude\": 34.0522,
  1562. \"longitude\": -118.2437,
  1563. \"city\": \"Los Angeles\",
  1564. \"district\": \"Downtown\",
  1565. \"location\": \"123 Main St\",
  1566. \"area_code\": \"90001\"
  1567. }"
  1568. </code></pre></div>
  1569. </span>
  1570. <span id="example-responses-POSTapi-coach-location">
  1571. <blockquote>
  1572. <p>Example response (200):</p>
  1573. </blockquote>
  1574. <pre>
  1575. <code class="language-json" style="max-height: 300px;">{
  1576. &quot;code&quot;: 200,
  1577. &quot;message&quot;: &quot;创建成功&quot;,
  1578. &quot;data&quot;: {
  1579. &quot;id&quot;: 1,
  1580. &quot;type&quot;: &quot;home&quot;,
  1581. &quot;latitude&quot;: 34.0522,
  1582. &quot;longitude&quot;: -118.2437,
  1583. &quot;city&quot;: &quot;Los Angeles&quot;,
  1584. &quot;district&quot;: &quot;Downtown&quot;,
  1585. &quot;location&quot;: &quot;123 Main St&quot;,
  1586. &quot;area_code&quot;: &quot;90001&quot;
  1587. }
  1588. }</code>
  1589. </pre>
  1590. </span>
  1591. <span id="execution-results-POSTapi-coach-location" hidden>
  1592. <blockquote>Received response<span
  1593. id="execution-response-status-POSTapi-coach-location"></span>:
  1594. </blockquote>
  1595. <pre class="json"><code id="execution-response-content-POSTapi-coach-location"
  1596. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1597. </span>
  1598. <span id="execution-error-POSTapi-coach-location" hidden>
  1599. <blockquote>Request failed with error:</blockquote>
  1600. <pre><code id="execution-error-message-POSTapi-coach-location">
  1601. Tip: Check that you&#039;re properly connected to the network.
  1602. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1603. You can check the Dev Tools console for debugging information.</code></pre>
  1604. </span>
  1605. <form id="form-POSTapi-coach-location" data-method="POST"
  1606. data-path="api/coach/location"
  1607. data-authed="1"
  1608. data-hasfiles="0"
  1609. data-isarraybody="0"
  1610. autocomplete="off"
  1611. onsubmit="event.preventDefault(); executeTryOut('POSTapi-coach-location', this);">
  1612. <h3>
  1613. Request&nbsp;&nbsp;&nbsp;
  1614. <button type="button"
  1615. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1616. id="btn-tryout-POSTapi-coach-location"
  1617. onclick="tryItOut('POSTapi-coach-location');">Try it out ⚡
  1618. </button>
  1619. <button type="button"
  1620. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1621. id="btn-canceltryout-POSTapi-coach-location"
  1622. onclick="cancelTryOut('POSTapi-coach-location');" hidden>Cancel 🛑
  1623. </button>&nbsp;&nbsp;
  1624. <button type="submit"
  1625. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1626. id="btn-executetryout-POSTapi-coach-location"
  1627. data-initial-text="Send Request 💥"
  1628. data-loading-text="⏱ Sending..."
  1629. hidden>Send Request 💥
  1630. </button>
  1631. </h3>
  1632. <p>
  1633. <small class="badge badge-black">POST</small>
  1634. <b><code>api/coach/location</code></b>
  1635. </p>
  1636. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1637. <div style="padding-left: 28px; clear: unset;">
  1638. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1639. &nbsp;
  1640. &nbsp;
  1641. <input type="text" style="display: none"
  1642. name="Authorization" class="auth-value" data-endpoint="POSTapi-coach-location"
  1643. value="Bearer {YOUR_AUTH_KEY}"
  1644. data-component="header">
  1645. <br>
  1646. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  1647. </div>
  1648. <div style="padding-left: 28px; clear: unset;">
  1649. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  1650. &nbsp;
  1651. &nbsp;
  1652. <input type="text" style="display: none"
  1653. name="Content-Type" data-endpoint="POSTapi-coach-location"
  1654. value="application/json"
  1655. data-component="header">
  1656. <br>
  1657. <p>Example: <code>application/json</code></p>
  1658. </div>
  1659. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  1660. <div style=" padding-left: 28px; clear: unset;">
  1661. <b style="line-height: 2;"><code>type</code></b>&nbsp;&nbsp;
  1662. <small>string</small>&nbsp;
  1663. &nbsp;
  1664. <input type="text" style="display: none"
  1665. name="type" data-endpoint="POSTapi-coach-location"
  1666. value="home"
  1667. data-component="body">
  1668. <br>
  1669. <p>类型. Example: <code>home</code></p>
  1670. </div>
  1671. <div style=" padding-left: 28px; clear: unset;">
  1672. <b style="line-height: 2;"><code>latitude</code></b>&nbsp;&nbsp;
  1673. <small>number</small>&nbsp;
  1674. &nbsp;
  1675. <input type="number" style="display: none"
  1676. step="any" name="latitude" data-endpoint="POSTapi-coach-location"
  1677. value="34.0522"
  1678. data-component="body">
  1679. <br>
  1680. <p>纬度. Example: <code>34.0522</code></p>
  1681. </div>
  1682. <div style=" padding-left: 28px; clear: unset;">
  1683. <b style="line-height: 2;"><code>longitude</code></b>&nbsp;&nbsp;
  1684. <small>number</small>&nbsp;
  1685. &nbsp;
  1686. <input type="number" style="display: none"
  1687. step="any" name="longitude" data-endpoint="POSTapi-coach-location"
  1688. value="-118.2437"
  1689. data-component="body">
  1690. <br>
  1691. <p>经度. Example: <code>-118.2437</code></p>
  1692. </div>
  1693. <div style=" padding-left: 28px; clear: unset;">
  1694. <b style="line-height: 2;"><code>city</code></b>&nbsp;&nbsp;
  1695. <small>string</small>&nbsp;
  1696. &nbsp;
  1697. <input type="text" style="display: none"
  1698. name="city" data-endpoint="POSTapi-coach-location"
  1699. value="Los Angeles"
  1700. data-component="body">
  1701. <br>
  1702. <p>市. Example: <code>Los Angeles</code></p>
  1703. </div>
  1704. <div style=" padding-left: 28px; clear: unset;">
  1705. <b style="line-height: 2;"><code>district</code></b>&nbsp;&nbsp;
  1706. <small>string</small>&nbsp;
  1707. &nbsp;
  1708. <input type="text" style="display: none"
  1709. name="district" data-endpoint="POSTapi-coach-location"
  1710. value="Downtown"
  1711. data-component="body">
  1712. <br>
  1713. <p>区. Example: <code>Downtown</code></p>
  1714. </div>
  1715. <div style=" padding-left: 28px; clear: unset;">
  1716. <b style="line-height: 2;"><code>location</code></b>&nbsp;&nbsp;
  1717. <small>string</small>&nbsp;
  1718. &nbsp;
  1719. <input type="text" style="display: none"
  1720. name="location" data-endpoint="POSTapi-coach-location"
  1721. value="123 Main St"
  1722. data-component="body">
  1723. <br>
  1724. <p>详细地址. Example: <code>123 Main St</code></p>
  1725. </div>
  1726. <div style=" padding-left: 28px; clear: unset;">
  1727. <b style="line-height: 2;"><code>area_code</code></b>&nbsp;&nbsp;
  1728. <small>string</small>&nbsp;
  1729. &nbsp;
  1730. <input type="text" style="display: none"
  1731. name="area_code" data-endpoint="POSTapi-coach-location"
  1732. value="90001"
  1733. data-component="body">
  1734. <br>
  1735. <p>区域编码. Example: <code>90001</code></p>
  1736. </div>
  1737. </form>
  1738. <h2 id="-DELETEapi-coach-location--id-">删除定位</h2>
  1739. <p>
  1740. <small class="badge badge-darkred">requires authentication</small>
  1741. </p>
  1742. <span id="example-requests-DELETEapi-coach-location--id-">
  1743. <blockquote>Example request:</blockquote>
  1744. <div class="javascript-example">
  1745. <pre><code class="language-javascript">const url = new URL(
  1746. "http://127.0.0.1/api/coach/location/nobis"
  1747. );
  1748. const headers = {
  1749. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  1750. "Content-Type": "application/json",
  1751. "Accept": "application/json",
  1752. };
  1753. let body = {
  1754. "coach_id": 1,
  1755. "type": "home"
  1756. };
  1757. fetch(url, {
  1758. method: "DELETE",
  1759. headers,
  1760. body: JSON.stringify(body),
  1761. }).then(response =&gt; response.json());</code></pre></div>
  1762. <div class="bash-example">
  1763. <pre><code class="language-bash">curl --request DELETE \
  1764. "http://127.0.0.1/api/coach/location/nobis" \
  1765. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  1766. --header "Content-Type: application/json" \
  1767. --data "{
  1768. \"coach_id\": 1,
  1769. \"type\": \"home\"
  1770. }"
  1771. </code></pre></div>
  1772. </span>
  1773. <span id="example-responses-DELETEapi-coach-location--id-">
  1774. <blockquote>
  1775. <p>Example response (200):</p>
  1776. </blockquote>
  1777. <pre>
  1778. <code class="language-json" style="max-height: 300px;">{
  1779. &quot;code&quot;: 200,
  1780. &quot;message&quot;: &quot;删除成功&quot;,
  1781. &quot;data&quot;: null
  1782. }</code>
  1783. </pre>
  1784. </span>
  1785. <span id="execution-results-DELETEapi-coach-location--id-" hidden>
  1786. <blockquote>Received response<span
  1787. id="execution-response-status-DELETEapi-coach-location--id-"></span>:
  1788. </blockquote>
  1789. <pre class="json"><code id="execution-response-content-DELETEapi-coach-location--id-"
  1790. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1791. </span>
  1792. <span id="execution-error-DELETEapi-coach-location--id-" hidden>
  1793. <blockquote>Request failed with error:</blockquote>
  1794. <pre><code id="execution-error-message-DELETEapi-coach-location--id-">
  1795. Tip: Check that you&#039;re properly connected to the network.
  1796. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1797. You can check the Dev Tools console for debugging information.</code></pre>
  1798. </span>
  1799. <form id="form-DELETEapi-coach-location--id-" data-method="DELETE"
  1800. data-path="api/coach/location/{id}"
  1801. data-authed="1"
  1802. data-hasfiles="0"
  1803. data-isarraybody="0"
  1804. autocomplete="off"
  1805. onsubmit="event.preventDefault(); executeTryOut('DELETEapi-coach-location--id-', this);">
  1806. <h3>
  1807. Request&nbsp;&nbsp;&nbsp;
  1808. <button type="button"
  1809. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1810. id="btn-tryout-DELETEapi-coach-location--id-"
  1811. onclick="tryItOut('DELETEapi-coach-location--id-');">Try it out ⚡
  1812. </button>
  1813. <button type="button"
  1814. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1815. id="btn-canceltryout-DELETEapi-coach-location--id-"
  1816. onclick="cancelTryOut('DELETEapi-coach-location--id-');" hidden>Cancel 🛑
  1817. </button>&nbsp;&nbsp;
  1818. <button type="submit"
  1819. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1820. id="btn-executetryout-DELETEapi-coach-location--id-"
  1821. data-initial-text="Send Request 💥"
  1822. data-loading-text="⏱ Sending..."
  1823. hidden>Send Request 💥
  1824. </button>
  1825. </h3>
  1826. <p>
  1827. <small class="badge badge-red">DELETE</small>
  1828. <b><code>api/coach/location/{id}</code></b>
  1829. </p>
  1830. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1831. <div style="padding-left: 28px; clear: unset;">
  1832. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1833. &nbsp;
  1834. &nbsp;
  1835. <input type="text" style="display: none"
  1836. name="Authorization" class="auth-value" data-endpoint="DELETEapi-coach-location--id-"
  1837. value="Bearer {YOUR_AUTH_KEY}"
  1838. data-component="header">
  1839. <br>
  1840. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  1841. </div>
  1842. <div style="padding-left: 28px; clear: unset;">
  1843. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  1844. &nbsp;
  1845. &nbsp;
  1846. <input type="text" style="display: none"
  1847. name="Content-Type" data-endpoint="DELETEapi-coach-location--id-"
  1848. value="application/json"
  1849. data-component="header">
  1850. <br>
  1851. <p>Example: <code>application/json</code></p>
  1852. </div>
  1853. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  1854. <div style="padding-left: 28px; clear: unset;">
  1855. <b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
  1856. <small>string</small>&nbsp;
  1857. &nbsp;
  1858. <input type="text" style="display: none"
  1859. name="id" data-endpoint="DELETEapi-coach-location--id-"
  1860. value="nobis"
  1861. data-component="url">
  1862. <br>
  1863. <p>The ID of the location. Example: <code>nobis</code></p>
  1864. </div>
  1865. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  1866. <div style=" padding-left: 28px; clear: unset;">
  1867. <b style="line-height: 2;"><code>coach_id</code></b>&nbsp;&nbsp;
  1868. <small>integer</small>&nbsp;
  1869. &nbsp;
  1870. <input type="number" style="display: none"
  1871. step="any" name="coach_id" data-endpoint="DELETEapi-coach-location--id-"
  1872. value="1"
  1873. data-component="body">
  1874. <br>
  1875. <p>技师ID. Example: <code>1</code></p>
  1876. </div>
  1877. <div style=" padding-left: 28px; clear: unset;">
  1878. <b style="line-height: 2;"><code>type</code></b>&nbsp;&nbsp;
  1879. <small>string</small>&nbsp;
  1880. &nbsp;
  1881. <input type="text" style="display: none"
  1882. name="type" data-endpoint="DELETEapi-coach-location--id-"
  1883. value="home"
  1884. data-component="body">
  1885. <br>
  1886. <p>类型. Example: <code>home</code></p>
  1887. </div>
  1888. </form>
  1889. <h2 id="-GETapi-coach">获取技师列表</h2>
  1890. <p>
  1891. <small class="badge badge-darkred">requires authentication</small>
  1892. </p>
  1893. <p>根据经纬度获取技师列表</p>
  1894. <span id="example-requests-GETapi-coach">
  1895. <blockquote>Example request:</blockquote>
  1896. <div class="javascript-example">
  1897. <pre><code class="language-javascript">const url = new URL(
  1898. "http://127.0.0.1/api/coach"
  1899. );
  1900. const params = {
  1901. "latitude": "34.0522",
  1902. "longitude": "-118.2437",
  1903. };
  1904. Object.keys(params)
  1905. .forEach(key =&gt; url.searchParams.append(key, params[key]));
  1906. const headers = {
  1907. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  1908. "Accept": "application/json",
  1909. };
  1910. fetch(url, {
  1911. method: "GET",
  1912. headers,
  1913. }).then(response =&gt; response.json());</code></pre></div>
  1914. <div class="bash-example">
  1915. <pre><code class="language-bash">curl --request GET \
  1916. --get "http://127.0.0.1/api/coach?latitude=34.0522&amp;longitude=-118.2437" \
  1917. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  1918. </span>
  1919. <span id="example-responses-GETapi-coach">
  1920. <blockquote>
  1921. <p>Example response (200):</p>
  1922. </blockquote>
  1923. <pre>
  1924. <code class="language-json" style="max-height: 300px;">{
  1925. &quot;code&quot;: 200,
  1926. &quot;message&quot;: &quot;获取成功&quot;,
  1927. &quot;data&quot;: [
  1928. {
  1929. &quot;id&quot;: 1,
  1930. &quot;name&quot;: &quot;技师A&quot;,
  1931. &quot;latitude&quot;: 34.0522,
  1932. &quot;longitude&quot;: -118.2437
  1933. }
  1934. ]
  1935. }</code>
  1936. </pre>
  1937. </span>
  1938. <span id="execution-results-GETapi-coach" hidden>
  1939. <blockquote>Received response<span
  1940. id="execution-response-status-GETapi-coach"></span>:
  1941. </blockquote>
  1942. <pre class="json"><code id="execution-response-content-GETapi-coach"
  1943. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  1944. </span>
  1945. <span id="execution-error-GETapi-coach" hidden>
  1946. <blockquote>Request failed with error:</blockquote>
  1947. <pre><code id="execution-error-message-GETapi-coach">
  1948. Tip: Check that you&#039;re properly connected to the network.
  1949. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  1950. You can check the Dev Tools console for debugging information.</code></pre>
  1951. </span>
  1952. <form id="form-GETapi-coach" data-method="GET"
  1953. data-path="api/coach"
  1954. data-authed="1"
  1955. data-hasfiles="0"
  1956. data-isarraybody="0"
  1957. autocomplete="off"
  1958. onsubmit="event.preventDefault(); executeTryOut('GETapi-coach', this);">
  1959. <h3>
  1960. Request&nbsp;&nbsp;&nbsp;
  1961. <button type="button"
  1962. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1963. id="btn-tryout-GETapi-coach"
  1964. onclick="tryItOut('GETapi-coach');">Try it out ⚡
  1965. </button>
  1966. <button type="button"
  1967. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1968. id="btn-canceltryout-GETapi-coach"
  1969. onclick="cancelTryOut('GETapi-coach');" hidden>Cancel 🛑
  1970. </button>&nbsp;&nbsp;
  1971. <button type="submit"
  1972. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  1973. id="btn-executetryout-GETapi-coach"
  1974. data-initial-text="Send Request 💥"
  1975. data-loading-text="⏱ Sending..."
  1976. hidden>Send Request 💥
  1977. </button>
  1978. </h3>
  1979. <p>
  1980. <small class="badge badge-green">GET</small>
  1981. <b><code>api/coach</code></b>
  1982. </p>
  1983. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  1984. <div style="padding-left: 28px; clear: unset;">
  1985. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  1986. &nbsp;
  1987. &nbsp;
  1988. <input type="text" style="display: none"
  1989. name="Authorization" class="auth-value" data-endpoint="GETapi-coach"
  1990. value="Bearer {YOUR_AUTH_KEY}"
  1991. data-component="header">
  1992. <br>
  1993. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  1994. </div>
  1995. <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
  1996. <div style="padding-left: 28px; clear: unset;">
  1997. <b style="line-height: 2;"><code>latitude</code></b>&nbsp;&nbsp;
  1998. <small>number</small>&nbsp;
  1999. &nbsp;
  2000. <input type="number" style="display: none"
  2001. step="any" name="latitude" data-endpoint="GETapi-coach"
  2002. value="34.0522"
  2003. data-component="query">
  2004. <br>
  2005. <p>纬度. Example: <code>34.0522</code></p>
  2006. </div>
  2007. <div style="padding-left: 28px; clear: unset;">
  2008. <b style="line-height: 2;"><code>longitude</code></b>&nbsp;&nbsp;
  2009. <small>number</small>&nbsp;
  2010. &nbsp;
  2011. <input type="number" style="display: none"
  2012. step="any" name="longitude" data-endpoint="GETapi-coach"
  2013. value="-118.2437"
  2014. data-component="query">
  2015. <br>
  2016. <p>经度. Example: <code>-118.2437</code></p>
  2017. </div>
  2018. </form>
  2019. <h2 id="-GETapi-coach--id-">获取技师详情</h2>
  2020. <p>
  2021. <small class="badge badge-darkred">requires authentication</small>
  2022. </p>
  2023. <p>根据ID获取技师的详细信息</p>
  2024. <span id="example-requests-GETapi-coach--id-">
  2025. <blockquote>Example request:</blockquote>
  2026. <div class="javascript-example">
  2027. <pre><code class="language-javascript">const url = new URL(
  2028. "http://127.0.0.1/api/coach/1"
  2029. );
  2030. const params = {
  2031. "latitude": "34.0522",
  2032. "longitude": "-118.2437",
  2033. };
  2034. Object.keys(params)
  2035. .forEach(key =&gt; url.searchParams.append(key, params[key]));
  2036. const headers = {
  2037. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  2038. "Accept": "application/json",
  2039. };
  2040. fetch(url, {
  2041. method: "GET",
  2042. headers,
  2043. }).then(response =&gt; response.json());</code></pre></div>
  2044. <div class="bash-example">
  2045. <pre><code class="language-bash">curl --request GET \
  2046. --get "http://127.0.0.1/api/coach/1?latitude=34.0522&amp;longitude=-118.2437" \
  2047. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  2048. </span>
  2049. <span id="example-responses-GETapi-coach--id-">
  2050. <blockquote>
  2051. <p>Example response (200):</p>
  2052. </blockquote>
  2053. <pre>
  2054. <code class="language-json" style="max-height: 300px;">{
  2055. &quot;code&quot;: 200,
  2056. &quot;message&quot;: &quot;获取成功&quot;,
  2057. &quot;data&quot;: {
  2058. &quot;id&quot;: 1,
  2059. &quot;name&quot;: &quot;技师A&quot;,
  2060. &quot;latitude&quot;: 34.0522,
  2061. &quot;longitude&quot;: -118.2437,
  2062. &quot;details&quot;: &quot;详细信息&quot;
  2063. }
  2064. }</code>
  2065. </pre>
  2066. </span>
  2067. <span id="execution-results-GETapi-coach--id-" hidden>
  2068. <blockquote>Received response<span
  2069. id="execution-response-status-GETapi-coach--id-"></span>:
  2070. </blockquote>
  2071. <pre class="json"><code id="execution-response-content-GETapi-coach--id-"
  2072. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  2073. </span>
  2074. <span id="execution-error-GETapi-coach--id-" hidden>
  2075. <blockquote>Request failed with error:</blockquote>
  2076. <pre><code id="execution-error-message-GETapi-coach--id-">
  2077. Tip: Check that you&#039;re properly connected to the network.
  2078. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  2079. You can check the Dev Tools console for debugging information.</code></pre>
  2080. </span>
  2081. <form id="form-GETapi-coach--id-" data-method="GET"
  2082. data-path="api/coach/{id}"
  2083. data-authed="1"
  2084. data-hasfiles="0"
  2085. data-isarraybody="0"
  2086. autocomplete="off"
  2087. onsubmit="event.preventDefault(); executeTryOut('GETapi-coach--id-', this);">
  2088. <h3>
  2089. Request&nbsp;&nbsp;&nbsp;
  2090. <button type="button"
  2091. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2092. id="btn-tryout-GETapi-coach--id-"
  2093. onclick="tryItOut('GETapi-coach--id-');">Try it out ⚡
  2094. </button>
  2095. <button type="button"
  2096. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2097. id="btn-canceltryout-GETapi-coach--id-"
  2098. onclick="cancelTryOut('GETapi-coach--id-');" hidden>Cancel 🛑
  2099. </button>&nbsp;&nbsp;
  2100. <button type="submit"
  2101. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2102. id="btn-executetryout-GETapi-coach--id-"
  2103. data-initial-text="Send Request 💥"
  2104. data-loading-text="⏱ Sending..."
  2105. hidden>Send Request 💥
  2106. </button>
  2107. </h3>
  2108. <p>
  2109. <small class="badge badge-green">GET</small>
  2110. <b><code>api/coach/{id}</code></b>
  2111. </p>
  2112. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  2113. <div style="padding-left: 28px; clear: unset;">
  2114. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  2115. &nbsp;
  2116. &nbsp;
  2117. <input type="text" style="display: none"
  2118. name="Authorization" class="auth-value" data-endpoint="GETapi-coach--id-"
  2119. value="Bearer {YOUR_AUTH_KEY}"
  2120. data-component="header">
  2121. <br>
  2122. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  2123. </div>
  2124. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  2125. <div style="padding-left: 28px; clear: unset;">
  2126. <b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
  2127. <small>integer</small>&nbsp;
  2128. &nbsp;
  2129. <input type="number" style="display: none"
  2130. step="any" name="id" data-endpoint="GETapi-coach--id-"
  2131. value="1"
  2132. data-component="url">
  2133. <br>
  2134. <p>技师ID. Example: <code>1</code></p>
  2135. </div>
  2136. <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
  2137. <div style="padding-left: 28px; clear: unset;">
  2138. <b style="line-height: 2;"><code>latitude</code></b>&nbsp;&nbsp;
  2139. <small>number</small>&nbsp;
  2140. <i>optional</i> &nbsp;
  2141. <input type="number" style="display: none"
  2142. step="any" name="latitude" data-endpoint="GETapi-coach--id-"
  2143. value="34.0522"
  2144. data-component="query">
  2145. <br>
  2146. <p>纬度. Example: <code>34.0522</code></p>
  2147. </div>
  2148. <div style="padding-left: 28px; clear: unset;">
  2149. <b style="line-height: 2;"><code>longitude</code></b>&nbsp;&nbsp;
  2150. <small>number</small>&nbsp;
  2151. <i>optional</i> &nbsp;
  2152. <input type="number" style="display: none"
  2153. step="any" name="longitude" data-endpoint="GETapi-coach--id-"
  2154. value="-118.2437"
  2155. data-component="query">
  2156. <br>
  2157. <p>经度. Example: <code>-118.2437</code></p>
  2158. </div>
  2159. </form>
  2160. <h2 id="-GETapi-address-default">获取默认地址2</h2>
  2161. <p>
  2162. <small class="badge badge-darkred">requires authentication</small>
  2163. </p>
  2164. <span id="example-requests-GETapi-address-default">
  2165. <blockquote>Example request:</blockquote>
  2166. <div class="javascript-example">
  2167. <pre><code class="language-javascript">const url = new URL(
  2168. "http://127.0.0.1/api/address/default"
  2169. );
  2170. const headers = {
  2171. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  2172. "Accept": "application/json",
  2173. };
  2174. fetch(url, {
  2175. method: "GET",
  2176. headers,
  2177. }).then(response =&gt; response.json());</code></pre></div>
  2178. <div class="bash-example">
  2179. <pre><code class="language-bash">curl --request GET \
  2180. --get "http://127.0.0.1/api/address/default" \
  2181. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  2182. </span>
  2183. <span id="example-responses-GETapi-address-default">
  2184. <blockquote>
  2185. <p>Example response (200):</p>
  2186. </blockquote>
  2187. <pre>
  2188. <code class="language-json" style="max-height: 300px;">{
  2189. &quot;code&quot;: 200,
  2190. &quot;message&quot;: &quot;success&quot;,
  2191. &quot;data&quot;: {
  2192. &quot;id&quot;: 1,
  2193. &quot;user_id&quot;: 1,
  2194. &quot;name&quot;: &quot;张三&quot;,
  2195. &quot;phone&quot;: &quot;13800138000&quot;,
  2196. &quot;province&quot;: &quot;广东省&quot;,
  2197. &quot;city&quot;: &quot;深圳市&quot;,
  2198. &quot;district&quot;: &quot;南山区&quot;,
  2199. &quot;address&quot;: &quot;科技园&quot;,
  2200. &quot;is_default&quot;: 1,
  2201. &quot;created_at&quot;: &quot;2024-01-01 00:00:00&quot;,
  2202. &quot;updated_at&quot;: &quot;2024-01-01 00:00:00&quot;
  2203. }
  2204. }</code>
  2205. </pre>
  2206. </span>
  2207. <span id="execution-results-GETapi-address-default" hidden>
  2208. <blockquote>Received response<span
  2209. id="execution-response-status-GETapi-address-default"></span>:
  2210. </blockquote>
  2211. <pre class="json"><code id="execution-response-content-GETapi-address-default"
  2212. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  2213. </span>
  2214. <span id="execution-error-GETapi-address-default" hidden>
  2215. <blockquote>Request failed with error:</blockquote>
  2216. <pre><code id="execution-error-message-GETapi-address-default">
  2217. Tip: Check that you&#039;re properly connected to the network.
  2218. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  2219. You can check the Dev Tools console for debugging information.</code></pre>
  2220. </span>
  2221. <form id="form-GETapi-address-default" data-method="GET"
  2222. data-path="api/address/default"
  2223. data-authed="1"
  2224. data-hasfiles="0"
  2225. data-isarraybody="0"
  2226. autocomplete="off"
  2227. onsubmit="event.preventDefault(); executeTryOut('GETapi-address-default', this);">
  2228. <h3>
  2229. Request&nbsp;&nbsp;&nbsp;
  2230. <button type="button"
  2231. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2232. id="btn-tryout-GETapi-address-default"
  2233. onclick="tryItOut('GETapi-address-default');">Try it out ⚡
  2234. </button>
  2235. <button type="button"
  2236. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2237. id="btn-canceltryout-GETapi-address-default"
  2238. onclick="cancelTryOut('GETapi-address-default');" hidden>Cancel 🛑
  2239. </button>&nbsp;&nbsp;
  2240. <button type="submit"
  2241. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2242. id="btn-executetryout-GETapi-address-default"
  2243. data-initial-text="Send Request 💥"
  2244. data-loading-text="⏱ Sending..."
  2245. hidden>Send Request 💥
  2246. </button>
  2247. </h3>
  2248. <p>
  2249. <small class="badge badge-green">GET</small>
  2250. <b><code>api/address/default</code></b>
  2251. </p>
  2252. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  2253. <div style="padding-left: 28px; clear: unset;">
  2254. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  2255. &nbsp;
  2256. &nbsp;
  2257. <input type="text" style="display: none"
  2258. name="Authorization" class="auth-value" data-endpoint="GETapi-address-default"
  2259. value="Bearer {YOUR_AUTH_KEY}"
  2260. data-component="header">
  2261. <br>
  2262. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  2263. </div>
  2264. </form>
  2265. <h2 id="-POSTapi-address">添加地址</h2>
  2266. <p>
  2267. <small class="badge badge-darkred">requires authentication</small>
  2268. </p>
  2269. <span id="example-requests-POSTapi-address">
  2270. <blockquote>Example request:</blockquote>
  2271. <div class="javascript-example">
  2272. <pre><code class="language-javascript">const url = new URL(
  2273. "http://127.0.0.1/api/address"
  2274. );
  2275. const headers = {
  2276. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  2277. "Content-Type": "application/json",
  2278. "Accept": "application/json",
  2279. };
  2280. let body = {
  2281. "phone": "13800138000",
  2282. "province": "广东省",
  2283. "city": "深圳市",
  2284. "district": "南山区",
  2285. "longitude": "113.93041",
  2286. "latitude": "22.53332",
  2287. "area_code": "440305",
  2288. "is_default": true,
  2289. "location": "科技园",
  2290. "detail": "科技园南区"
  2291. };
  2292. fetch(url, {
  2293. method: "POST",
  2294. headers,
  2295. body: JSON.stringify(body),
  2296. }).then(response =&gt; response.json());</code></pre></div>
  2297. <div class="bash-example">
  2298. <pre><code class="language-bash">curl --request POST \
  2299. "http://127.0.0.1/api/address" \
  2300. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  2301. --header "Content-Type: application/json" \
  2302. --data "{
  2303. \"phone\": \"13800138000\",
  2304. \"province\": \"广东省\",
  2305. \"city\": \"深圳市\",
  2306. \"district\": \"南山区\",
  2307. \"longitude\": \"113.93041\",
  2308. \"latitude\": \"22.53332\",
  2309. \"area_code\": \"440305\",
  2310. \"is_default\": true,
  2311. \"location\": \"科技园\",
  2312. \"detail\": \"科技园南区\"
  2313. }"
  2314. </code></pre></div>
  2315. </span>
  2316. <span id="example-responses-POSTapi-address">
  2317. <blockquote>
  2318. <p>Example response (200):</p>
  2319. </blockquote>
  2320. <pre>
  2321. <code class="language-json" style="max-height: 300px;">{
  2322. &quot;code&quot;: 200,
  2323. &quot;message&quot;: &quot;添加成功&quot;
  2324. }</code>
  2325. </pre>
  2326. </span>
  2327. <span id="execution-results-POSTapi-address" hidden>
  2328. <blockquote>Received response<span
  2329. id="execution-response-status-POSTapi-address"></span>:
  2330. </blockquote>
  2331. <pre class="json"><code id="execution-response-content-POSTapi-address"
  2332. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  2333. </span>
  2334. <span id="execution-error-POSTapi-address" hidden>
  2335. <blockquote>Request failed with error:</blockquote>
  2336. <pre><code id="execution-error-message-POSTapi-address">
  2337. Tip: Check that you&#039;re properly connected to the network.
  2338. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  2339. You can check the Dev Tools console for debugging information.</code></pre>
  2340. </span>
  2341. <form id="form-POSTapi-address" data-method="POST"
  2342. data-path="api/address"
  2343. data-authed="1"
  2344. data-hasfiles="0"
  2345. data-isarraybody="0"
  2346. autocomplete="off"
  2347. onsubmit="event.preventDefault(); executeTryOut('POSTapi-address', this);">
  2348. <h3>
  2349. Request&nbsp;&nbsp;&nbsp;
  2350. <button type="button"
  2351. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2352. id="btn-tryout-POSTapi-address"
  2353. onclick="tryItOut('POSTapi-address');">Try it out ⚡
  2354. </button>
  2355. <button type="button"
  2356. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2357. id="btn-canceltryout-POSTapi-address"
  2358. onclick="cancelTryOut('POSTapi-address');" hidden>Cancel 🛑
  2359. </button>&nbsp;&nbsp;
  2360. <button type="submit"
  2361. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2362. id="btn-executetryout-POSTapi-address"
  2363. data-initial-text="Send Request 💥"
  2364. data-loading-text="⏱ Sending..."
  2365. hidden>Send Request 💥
  2366. </button>
  2367. </h3>
  2368. <p>
  2369. <small class="badge badge-black">POST</small>
  2370. <b><code>api/address</code></b>
  2371. </p>
  2372. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  2373. <div style="padding-left: 28px; clear: unset;">
  2374. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  2375. &nbsp;
  2376. &nbsp;
  2377. <input type="text" style="display: none"
  2378. name="Authorization" class="auth-value" data-endpoint="POSTapi-address"
  2379. value="Bearer {YOUR_AUTH_KEY}"
  2380. data-component="header">
  2381. <br>
  2382. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  2383. </div>
  2384. <div style="padding-left: 28px; clear: unset;">
  2385. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  2386. &nbsp;
  2387. &nbsp;
  2388. <input type="text" style="display: none"
  2389. name="Content-Type" data-endpoint="POSTapi-address"
  2390. value="application/json"
  2391. data-component="header">
  2392. <br>
  2393. <p>Example: <code>application/json</code></p>
  2394. </div>
  2395. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  2396. <div style=" padding-left: 28px; clear: unset;">
  2397. <b style="line-height: 2;"><code>phone</code></b>&nbsp;&nbsp;
  2398. <small>string</small>&nbsp;
  2399. &nbsp;
  2400. <input type="text" style="display: none"
  2401. name="phone" data-endpoint="POSTapi-address"
  2402. value="13800138000"
  2403. data-component="body">
  2404. <br>
  2405. <p>手机号 Example: <code>13800138000</code></p>
  2406. </div>
  2407. <div style=" padding-left: 28px; clear: unset;">
  2408. <b style="line-height: 2;"><code>province</code></b>&nbsp;&nbsp;
  2409. <small>string</small>&nbsp;
  2410. &nbsp;
  2411. <input type="text" style="display: none"
  2412. name="province" data-endpoint="POSTapi-address"
  2413. value="广东省"
  2414. data-component="body">
  2415. <br>
  2416. <p>省份 Example: <code>广东省</code></p>
  2417. </div>
  2418. <div style=" padding-left: 28px; clear: unset;">
  2419. <b style="line-height: 2;"><code>city</code></b>&nbsp;&nbsp;
  2420. <small>string</small>&nbsp;
  2421. &nbsp;
  2422. <input type="text" style="display: none"
  2423. name="city" data-endpoint="POSTapi-address"
  2424. value="深圳市"
  2425. data-component="body">
  2426. <br>
  2427. <p>城市 Example: <code>深圳市</code></p>
  2428. </div>
  2429. <div style=" padding-left: 28px; clear: unset;">
  2430. <b style="line-height: 2;"><code>district</code></b>&nbsp;&nbsp;
  2431. <small>string</small>&nbsp;
  2432. &nbsp;
  2433. <input type="text" style="display: none"
  2434. name="district" data-endpoint="POSTapi-address"
  2435. value="南山区"
  2436. data-component="body">
  2437. <br>
  2438. <p>区县 Example: <code>南山区</code></p>
  2439. </div>
  2440. <div style=" padding-left: 28px; clear: unset;">
  2441. <b style="line-height: 2;"><code>longitude</code></b>&nbsp;&nbsp;
  2442. <small>string</small>&nbsp;
  2443. &nbsp;
  2444. <input type="text" style="display: none"
  2445. name="longitude" data-endpoint="POSTapi-address"
  2446. value="113.93041"
  2447. data-component="body">
  2448. <br>
  2449. <p>经度 Example: <code>113.93041</code></p>
  2450. </div>
  2451. <div style=" padding-left: 28px; clear: unset;">
  2452. <b style="line-height: 2;"><code>latitude</code></b>&nbsp;&nbsp;
  2453. <small>string</small>&nbsp;
  2454. &nbsp;
  2455. <input type="text" style="display: none"
  2456. name="latitude" data-endpoint="POSTapi-address"
  2457. value="22.53332"
  2458. data-component="body">
  2459. <br>
  2460. <p>纬度 Example: <code>22.53332</code></p>
  2461. </div>
  2462. <div style=" padding-left: 28px; clear: unset;">
  2463. <b style="line-height: 2;"><code>area_code</code></b>&nbsp;&nbsp;
  2464. <small>string</small>&nbsp;
  2465. &nbsp;
  2466. <input type="text" style="display: none"
  2467. name="area_code" data-endpoint="POSTapi-address"
  2468. value="440305"
  2469. data-component="body">
  2470. <br>
  2471. <p>区划代码 Example: <code>440305</code></p>
  2472. </div>
  2473. <div style=" padding-left: 28px; clear: unset;">
  2474. <b style="line-height: 2;"><code>is_default</code></b>&nbsp;&nbsp;
  2475. <small>boolean</small>&nbsp;
  2476. &nbsp;
  2477. <label data-endpoint="POSTapi-address" style="display: none">
  2478. <input type="radio" name="is_default"
  2479. value="true"
  2480. data-endpoint="POSTapi-address"
  2481. data-component="body" >
  2482. <code>true</code>
  2483. </label>
  2484. <label data-endpoint="POSTapi-address" style="display: none">
  2485. <input type="radio" name="is_default"
  2486. value="false"
  2487. data-endpoint="POSTapi-address"
  2488. data-component="body" >
  2489. <code>false</code>
  2490. </label>
  2491. <br>
  2492. <p>是否默认地址 Example: <code>true</code></p>
  2493. </div>
  2494. <div style=" padding-left: 28px; clear: unset;">
  2495. <b style="line-height: 2;"><code>location</code></b>&nbsp;&nbsp;
  2496. <small>string</small>&nbsp;
  2497. &nbsp;
  2498. <input type="text" style="display: none"
  2499. name="location" data-endpoint="POSTapi-address"
  2500. value="科技园"
  2501. data-component="body">
  2502. <br>
  2503. <p>定位地址 Example: <code>科技园</code></p>
  2504. </div>
  2505. <div style=" padding-left: 28px; clear: unset;">
  2506. <b style="line-height: 2;"><code>detail</code></b>&nbsp;&nbsp;
  2507. <small>string</small>&nbsp;
  2508. &nbsp;
  2509. <input type="text" style="display: none"
  2510. name="detail" data-endpoint="POSTapi-address"
  2511. value="科技园南区"
  2512. data-component="body">
  2513. <br>
  2514. <p>详细地址 Example: <code>科技园南区</code></p>
  2515. </div>
  2516. </form>
  2517. <h2 id="-PUTapi-address--id-">修改地址</h2>
  2518. <p>
  2519. <small class="badge badge-darkred">requires authentication</small>
  2520. </p>
  2521. <span id="example-requests-PUTapi-address--id-">
  2522. <blockquote>Example request:</blockquote>
  2523. <div class="javascript-example">
  2524. <pre><code class="language-javascript">const url = new URL(
  2525. "http://127.0.0.1/api/address/1"
  2526. );
  2527. const headers = {
  2528. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  2529. "Content-Type": "application/json",
  2530. "Accept": "application/json",
  2531. };
  2532. let body = {
  2533. "phone": "13800138000",
  2534. "province": "广东省",
  2535. "city": "深圳市",
  2536. "district": "南山区",
  2537. "longitude": "113.93041",
  2538. "latitude": "22.53332",
  2539. "area_code": "440305",
  2540. "is_default": true,
  2541. "location": "科技园",
  2542. "detail": "科技园南区"
  2543. };
  2544. fetch(url, {
  2545. method: "PUT",
  2546. headers,
  2547. body: JSON.stringify(body),
  2548. }).then(response =&gt; response.json());</code></pre></div>
  2549. <div class="bash-example">
  2550. <pre><code class="language-bash">curl --request PUT \
  2551. "http://127.0.0.1/api/address/1" \
  2552. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  2553. --header "Content-Type: application/json" \
  2554. --data "{
  2555. \"phone\": \"13800138000\",
  2556. \"province\": \"广东省\",
  2557. \"city\": \"深圳市\",
  2558. \"district\": \"南山区\",
  2559. \"longitude\": \"113.93041\",
  2560. \"latitude\": \"22.53332\",
  2561. \"area_code\": \"440305\",
  2562. \"is_default\": true,
  2563. \"location\": \"科技园\",
  2564. \"detail\": \"科技园南区\"
  2565. }"
  2566. </code></pre></div>
  2567. </span>
  2568. <span id="example-responses-PUTapi-address--id-">
  2569. <blockquote>
  2570. <p>Example response (200):</p>
  2571. </blockquote>
  2572. <pre>
  2573. <code class="language-json" style="max-height: 300px;">{
  2574. &quot;code&quot;: 200,
  2575. &quot;message&quot;: &quot;修改成功&quot;
  2576. }</code>
  2577. </pre>
  2578. </span>
  2579. <span id="execution-results-PUTapi-address--id-" hidden>
  2580. <blockquote>Received response<span
  2581. id="execution-response-status-PUTapi-address--id-"></span>:
  2582. </blockquote>
  2583. <pre class="json"><code id="execution-response-content-PUTapi-address--id-"
  2584. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  2585. </span>
  2586. <span id="execution-error-PUTapi-address--id-" hidden>
  2587. <blockquote>Request failed with error:</blockquote>
  2588. <pre><code id="execution-error-message-PUTapi-address--id-">
  2589. Tip: Check that you&#039;re properly connected to the network.
  2590. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  2591. You can check the Dev Tools console for debugging information.</code></pre>
  2592. </span>
  2593. <form id="form-PUTapi-address--id-" data-method="PUT"
  2594. data-path="api/address/{id}"
  2595. data-authed="1"
  2596. data-hasfiles="0"
  2597. data-isarraybody="0"
  2598. autocomplete="off"
  2599. onsubmit="event.preventDefault(); executeTryOut('PUTapi-address--id-', this);">
  2600. <h3>
  2601. Request&nbsp;&nbsp;&nbsp;
  2602. <button type="button"
  2603. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2604. id="btn-tryout-PUTapi-address--id-"
  2605. onclick="tryItOut('PUTapi-address--id-');">Try it out ⚡
  2606. </button>
  2607. <button type="button"
  2608. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2609. id="btn-canceltryout-PUTapi-address--id-"
  2610. onclick="cancelTryOut('PUTapi-address--id-');" hidden>Cancel 🛑
  2611. </button>&nbsp;&nbsp;
  2612. <button type="submit"
  2613. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2614. id="btn-executetryout-PUTapi-address--id-"
  2615. data-initial-text="Send Request 💥"
  2616. data-loading-text="⏱ Sending..."
  2617. hidden>Send Request 💥
  2618. </button>
  2619. </h3>
  2620. <p>
  2621. <small class="badge badge-darkblue">PUT</small>
  2622. <b><code>api/address/{id}</code></b>
  2623. </p>
  2624. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  2625. <div style="padding-left: 28px; clear: unset;">
  2626. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  2627. &nbsp;
  2628. &nbsp;
  2629. <input type="text" style="display: none"
  2630. name="Authorization" class="auth-value" data-endpoint="PUTapi-address--id-"
  2631. value="Bearer {YOUR_AUTH_KEY}"
  2632. data-component="header">
  2633. <br>
  2634. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  2635. </div>
  2636. <div style="padding-left: 28px; clear: unset;">
  2637. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  2638. &nbsp;
  2639. &nbsp;
  2640. <input type="text" style="display: none"
  2641. name="Content-Type" data-endpoint="PUTapi-address--id-"
  2642. value="application/json"
  2643. data-component="header">
  2644. <br>
  2645. <p>Example: <code>application/json</code></p>
  2646. </div>
  2647. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  2648. <div style="padding-left: 28px; clear: unset;">
  2649. <b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
  2650. <small>integer</small>&nbsp;
  2651. &nbsp;
  2652. <input type="number" style="display: none"
  2653. step="any" name="id" data-endpoint="PUTapi-address--id-"
  2654. value="1"
  2655. data-component="url">
  2656. <br>
  2657. <p>地址ID Example: <code>1</code></p>
  2658. </div>
  2659. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  2660. <div style=" padding-left: 28px; clear: unset;">
  2661. <b style="line-height: 2;"><code>phone</code></b>&nbsp;&nbsp;
  2662. <small>string</small>&nbsp;
  2663. &nbsp;
  2664. <input type="text" style="display: none"
  2665. name="phone" data-endpoint="PUTapi-address--id-"
  2666. value="13800138000"
  2667. data-component="body">
  2668. <br>
  2669. <p>手机号 Example: <code>13800138000</code></p>
  2670. </div>
  2671. <div style=" padding-left: 28px; clear: unset;">
  2672. <b style="line-height: 2;"><code>province</code></b>&nbsp;&nbsp;
  2673. <small>string</small>&nbsp;
  2674. &nbsp;
  2675. <input type="text" style="display: none"
  2676. name="province" data-endpoint="PUTapi-address--id-"
  2677. value="广东省"
  2678. data-component="body">
  2679. <br>
  2680. <p>省份 Example: <code>广东省</code></p>
  2681. </div>
  2682. <div style=" padding-left: 28px; clear: unset;">
  2683. <b style="line-height: 2;"><code>city</code></b>&nbsp;&nbsp;
  2684. <small>string</small>&nbsp;
  2685. &nbsp;
  2686. <input type="text" style="display: none"
  2687. name="city" data-endpoint="PUTapi-address--id-"
  2688. value="深圳市"
  2689. data-component="body">
  2690. <br>
  2691. <p>城市 Example: <code>深圳市</code></p>
  2692. </div>
  2693. <div style=" padding-left: 28px; clear: unset;">
  2694. <b style="line-height: 2;"><code>district</code></b>&nbsp;&nbsp;
  2695. <small>string</small>&nbsp;
  2696. &nbsp;
  2697. <input type="text" style="display: none"
  2698. name="district" data-endpoint="PUTapi-address--id-"
  2699. value="南山区"
  2700. data-component="body">
  2701. <br>
  2702. <p>区县 Example: <code>南山区</code></p>
  2703. </div>
  2704. <div style=" padding-left: 28px; clear: unset;">
  2705. <b style="line-height: 2;"><code>longitude</code></b>&nbsp;&nbsp;
  2706. <small>string</small>&nbsp;
  2707. &nbsp;
  2708. <input type="text" style="display: none"
  2709. name="longitude" data-endpoint="PUTapi-address--id-"
  2710. value="113.93041"
  2711. data-component="body">
  2712. <br>
  2713. <p>经度 Example: <code>113.93041</code></p>
  2714. </div>
  2715. <div style=" padding-left: 28px; clear: unset;">
  2716. <b style="line-height: 2;"><code>latitude</code></b>&nbsp;&nbsp;
  2717. <small>string</small>&nbsp;
  2718. &nbsp;
  2719. <input type="text" style="display: none"
  2720. name="latitude" data-endpoint="PUTapi-address--id-"
  2721. value="22.53332"
  2722. data-component="body">
  2723. <br>
  2724. <p>纬度 Example: <code>22.53332</code></p>
  2725. </div>
  2726. <div style=" padding-left: 28px; clear: unset;">
  2727. <b style="line-height: 2;"><code>area_code</code></b>&nbsp;&nbsp;
  2728. <small>string</small>&nbsp;
  2729. &nbsp;
  2730. <input type="text" style="display: none"
  2731. name="area_code" data-endpoint="PUTapi-address--id-"
  2732. value="440305"
  2733. data-component="body">
  2734. <br>
  2735. <p>区划代码 Example: <code>440305</code></p>
  2736. </div>
  2737. <div style=" padding-left: 28px; clear: unset;">
  2738. <b style="line-height: 2;"><code>is_default</code></b>&nbsp;&nbsp;
  2739. <small>boolean</small>&nbsp;
  2740. &nbsp;
  2741. <label data-endpoint="PUTapi-address--id-" style="display: none">
  2742. <input type="radio" name="is_default"
  2743. value="true"
  2744. data-endpoint="PUTapi-address--id-"
  2745. data-component="body" >
  2746. <code>true</code>
  2747. </label>
  2748. <label data-endpoint="PUTapi-address--id-" style="display: none">
  2749. <input type="radio" name="is_default"
  2750. value="false"
  2751. data-endpoint="PUTapi-address--id-"
  2752. data-component="body" >
  2753. <code>false</code>
  2754. </label>
  2755. <br>
  2756. <p>是否默认地址 Example: <code>true</code></p>
  2757. </div>
  2758. <div style=" padding-left: 28px; clear: unset;">
  2759. <b style="line-height: 2;"><code>location</code></b>&nbsp;&nbsp;
  2760. <small>string</small>&nbsp;
  2761. &nbsp;
  2762. <input type="text" style="display: none"
  2763. name="location" data-endpoint="PUTapi-address--id-"
  2764. value="科技园"
  2765. data-component="body">
  2766. <br>
  2767. <p>定位地址 Example: <code>科技园</code></p>
  2768. </div>
  2769. <div style=" padding-left: 28px; clear: unset;">
  2770. <b style="line-height: 2;"><code>detail</code></b>&nbsp;&nbsp;
  2771. <small>string</small>&nbsp;
  2772. &nbsp;
  2773. <input type="text" style="display: none"
  2774. name="detail" data-endpoint="PUTapi-address--id-"
  2775. value="科技园南区"
  2776. data-component="body">
  2777. <br>
  2778. <p>详细地址 Example: <code>科技园南区</code></p>
  2779. </div>
  2780. </form>
  2781. <h2 id="-DELETEapi-address--id-">删除地址</h2>
  2782. <p>
  2783. <small class="badge badge-darkred">requires authentication</small>
  2784. </p>
  2785. <span id="example-requests-DELETEapi-address--id-">
  2786. <blockquote>Example request:</blockquote>
  2787. <div class="javascript-example">
  2788. <pre><code class="language-javascript">const url = new URL(
  2789. "http://127.0.0.1/api/address/1"
  2790. );
  2791. const headers = {
  2792. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  2793. "Accept": "application/json",
  2794. };
  2795. fetch(url, {
  2796. method: "DELETE",
  2797. headers,
  2798. }).then(response =&gt; response.json());</code></pre></div>
  2799. <div class="bash-example">
  2800. <pre><code class="language-bash">curl --request DELETE \
  2801. "http://127.0.0.1/api/address/1" \
  2802. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  2803. </span>
  2804. <span id="example-responses-DELETEapi-address--id-">
  2805. <blockquote>
  2806. <p>Example response (200):</p>
  2807. </blockquote>
  2808. <pre>
  2809. <code class="language-json" style="max-height: 300px;">{
  2810. &quot;code&quot;: 200,
  2811. &quot;message&quot;: &quot;删除成功&quot;
  2812. }</code>
  2813. </pre>
  2814. </span>
  2815. <span id="execution-results-DELETEapi-address--id-" hidden>
  2816. <blockquote>Received response<span
  2817. id="execution-response-status-DELETEapi-address--id-"></span>:
  2818. </blockquote>
  2819. <pre class="json"><code id="execution-response-content-DELETEapi-address--id-"
  2820. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  2821. </span>
  2822. <span id="execution-error-DELETEapi-address--id-" hidden>
  2823. <blockquote>Request failed with error:</blockquote>
  2824. <pre><code id="execution-error-message-DELETEapi-address--id-">
  2825. Tip: Check that you&#039;re properly connected to the network.
  2826. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  2827. You can check the Dev Tools console for debugging information.</code></pre>
  2828. </span>
  2829. <form id="form-DELETEapi-address--id-" data-method="DELETE"
  2830. data-path="api/address/{id}"
  2831. data-authed="1"
  2832. data-hasfiles="0"
  2833. data-isarraybody="0"
  2834. autocomplete="off"
  2835. onsubmit="event.preventDefault(); executeTryOut('DELETEapi-address--id-', this);">
  2836. <h3>
  2837. Request&nbsp;&nbsp;&nbsp;
  2838. <button type="button"
  2839. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2840. id="btn-tryout-DELETEapi-address--id-"
  2841. onclick="tryItOut('DELETEapi-address--id-');">Try it out ⚡
  2842. </button>
  2843. <button type="button"
  2844. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2845. id="btn-canceltryout-DELETEapi-address--id-"
  2846. onclick="cancelTryOut('DELETEapi-address--id-');" hidden>Cancel 🛑
  2847. </button>&nbsp;&nbsp;
  2848. <button type="submit"
  2849. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2850. id="btn-executetryout-DELETEapi-address--id-"
  2851. data-initial-text="Send Request 💥"
  2852. data-loading-text="⏱ Sending..."
  2853. hidden>Send Request 💥
  2854. </button>
  2855. </h3>
  2856. <p>
  2857. <small class="badge badge-red">DELETE</small>
  2858. <b><code>api/address/{id}</code></b>
  2859. </p>
  2860. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  2861. <div style="padding-left: 28px; clear: unset;">
  2862. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  2863. &nbsp;
  2864. &nbsp;
  2865. <input type="text" style="display: none"
  2866. name="Authorization" class="auth-value" data-endpoint="DELETEapi-address--id-"
  2867. value="Bearer {YOUR_AUTH_KEY}"
  2868. data-component="header">
  2869. <br>
  2870. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  2871. </div>
  2872. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  2873. <div style="padding-left: 28px; clear: unset;">
  2874. <b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
  2875. <small>integer</small>&nbsp;
  2876. &nbsp;
  2877. <input type="number" style="display: none"
  2878. step="any" name="id" data-endpoint="DELETEapi-address--id-"
  2879. value="1"
  2880. data-component="url">
  2881. <br>
  2882. <p>地址ID Example: <code>1</code></p>
  2883. </div>
  2884. </form>
  2885. <h2 id="-PUTapi-address--id--default">设置默认地址</h2>
  2886. <p>
  2887. <small class="badge badge-darkred">requires authentication</small>
  2888. </p>
  2889. <span id="example-requests-PUTapi-address--id--default">
  2890. <blockquote>Example request:</blockquote>
  2891. <div class="javascript-example">
  2892. <pre><code class="language-javascript">const url = new URL(
  2893. "http://127.0.0.1/api/address/1/default"
  2894. );
  2895. const headers = {
  2896. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  2897. "Accept": "application/json",
  2898. };
  2899. fetch(url, {
  2900. method: "PUT",
  2901. headers,
  2902. }).then(response =&gt; response.json());</code></pre></div>
  2903. <div class="bash-example">
  2904. <pre><code class="language-bash">curl --request PUT \
  2905. "http://127.0.0.1/api/address/1/default" \
  2906. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  2907. </span>
  2908. <span id="example-responses-PUTapi-address--id--default">
  2909. <blockquote>
  2910. <p>Example response (200):</p>
  2911. </blockquote>
  2912. <pre>
  2913. <code class="language-json" style="max-height: 300px;">{
  2914. &quot;code&quot;: 200,
  2915. &quot;message&quot;: &quot;设置成功&quot;
  2916. }</code>
  2917. </pre>
  2918. </span>
  2919. <span id="execution-results-PUTapi-address--id--default" hidden>
  2920. <blockquote>Received response<span
  2921. id="execution-response-status-PUTapi-address--id--default"></span>:
  2922. </blockquote>
  2923. <pre class="json"><code id="execution-response-content-PUTapi-address--id--default"
  2924. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  2925. </span>
  2926. <span id="execution-error-PUTapi-address--id--default" hidden>
  2927. <blockquote>Request failed with error:</blockquote>
  2928. <pre><code id="execution-error-message-PUTapi-address--id--default">
  2929. Tip: Check that you&#039;re properly connected to the network.
  2930. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  2931. You can check the Dev Tools console for debugging information.</code></pre>
  2932. </span>
  2933. <form id="form-PUTapi-address--id--default" data-method="PUT"
  2934. data-path="api/address/{id}/default"
  2935. data-authed="1"
  2936. data-hasfiles="0"
  2937. data-isarraybody="0"
  2938. autocomplete="off"
  2939. onsubmit="event.preventDefault(); executeTryOut('PUTapi-address--id--default', this);">
  2940. <h3>
  2941. Request&nbsp;&nbsp;&nbsp;
  2942. <button type="button"
  2943. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2944. id="btn-tryout-PUTapi-address--id--default"
  2945. onclick="tryItOut('PUTapi-address--id--default');">Try it out ⚡
  2946. </button>
  2947. <button type="button"
  2948. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2949. id="btn-canceltryout-PUTapi-address--id--default"
  2950. onclick="cancelTryOut('PUTapi-address--id--default');" hidden>Cancel 🛑
  2951. </button>&nbsp;&nbsp;
  2952. <button type="submit"
  2953. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  2954. id="btn-executetryout-PUTapi-address--id--default"
  2955. data-initial-text="Send Request 💥"
  2956. data-loading-text="⏱ Sending..."
  2957. hidden>Send Request 💥
  2958. </button>
  2959. </h3>
  2960. <p>
  2961. <small class="badge badge-darkblue">PUT</small>
  2962. <b><code>api/address/{id}/default</code></b>
  2963. </p>
  2964. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  2965. <div style="padding-left: 28px; clear: unset;">
  2966. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  2967. &nbsp;
  2968. &nbsp;
  2969. <input type="text" style="display: none"
  2970. name="Authorization" class="auth-value" data-endpoint="PUTapi-address--id--default"
  2971. value="Bearer {YOUR_AUTH_KEY}"
  2972. data-component="header">
  2973. <br>
  2974. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  2975. </div>
  2976. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  2977. <div style="padding-left: 28px; clear: unset;">
  2978. <b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
  2979. <small>integer</small>&nbsp;
  2980. &nbsp;
  2981. <input type="number" style="display: none"
  2982. step="any" name="id" data-endpoint="PUTapi-address--id--default"
  2983. value="1"
  2984. data-component="url">
  2985. <br>
  2986. <p>地址ID Example: <code>1</code></p>
  2987. </div>
  2988. </form>
  2989. <h2 id="-POSTapi-orders-initialize">订单初始化</h2>
  2990. <p>
  2991. <small class="badge badge-darkred">requires authentication</small>
  2992. </p>
  2993. <p>初始化订单</p>
  2994. <span id="example-requests-POSTapi-orders-initialize">
  2995. <blockquote>Example request:</blockquote>
  2996. <div class="javascript-example">
  2997. <pre><code class="language-javascript">const url = new URL(
  2998. "http://127.0.0.1/api/orders/initialize"
  2999. );
  3000. const headers = {
  3001. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  3002. "Content-Type": "application/json",
  3003. "Accept": "application/json",
  3004. };
  3005. let body = {
  3006. "coach_id": 1,
  3007. "area_code": "370602",
  3008. "project_id": 1
  3009. };
  3010. fetch(url, {
  3011. method: "POST",
  3012. headers,
  3013. body: JSON.stringify(body),
  3014. }).then(response =&gt; response.json());</code></pre></div>
  3015. <div class="bash-example">
  3016. <pre><code class="language-bash">curl --request POST \
  3017. "http://127.0.0.1/api/orders/initialize" \
  3018. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  3019. --header "Content-Type: application/json" \
  3020. --data "{
  3021. \"coach_id\": 1,
  3022. \"area_code\": \"370602\",
  3023. \"project_id\": 1
  3024. }"
  3025. </code></pre></div>
  3026. </span>
  3027. <span id="example-responses-POSTapi-orders-initialize">
  3028. <blockquote>
  3029. <p>Example response (200):</p>
  3030. </blockquote>
  3031. <pre>
  3032. <code class="language-json" style="max-height: 300px;">{
  3033. &quot;status&quot;: &quot;success&quot;,
  3034. &quot;data&quot;: {}
  3035. }</code>
  3036. </pre>
  3037. </span>
  3038. <span id="execution-results-POSTapi-orders-initialize" hidden>
  3039. <blockquote>Received response<span
  3040. id="execution-response-status-POSTapi-orders-initialize"></span>:
  3041. </blockquote>
  3042. <pre class="json"><code id="execution-response-content-POSTapi-orders-initialize"
  3043. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  3044. </span>
  3045. <span id="execution-error-POSTapi-orders-initialize" hidden>
  3046. <blockquote>Request failed with error:</blockquote>
  3047. <pre><code id="execution-error-message-POSTapi-orders-initialize">
  3048. Tip: Check that you&#039;re properly connected to the network.
  3049. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  3050. You can check the Dev Tools console for debugging information.</code></pre>
  3051. </span>
  3052. <form id="form-POSTapi-orders-initialize" data-method="POST"
  3053. data-path="api/orders/initialize"
  3054. data-authed="1"
  3055. data-hasfiles="0"
  3056. data-isarraybody="0"
  3057. autocomplete="off"
  3058. onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-initialize', this);">
  3059. <h3>
  3060. Request&nbsp;&nbsp;&nbsp;
  3061. <button type="button"
  3062. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3063. id="btn-tryout-POSTapi-orders-initialize"
  3064. onclick="tryItOut('POSTapi-orders-initialize');">Try it out ⚡
  3065. </button>
  3066. <button type="button"
  3067. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3068. id="btn-canceltryout-POSTapi-orders-initialize"
  3069. onclick="cancelTryOut('POSTapi-orders-initialize');" hidden>Cancel 🛑
  3070. </button>&nbsp;&nbsp;
  3071. <button type="submit"
  3072. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3073. id="btn-executetryout-POSTapi-orders-initialize"
  3074. data-initial-text="Send Request 💥"
  3075. data-loading-text="⏱ Sending..."
  3076. hidden>Send Request 💥
  3077. </button>
  3078. </h3>
  3079. <p>
  3080. <small class="badge badge-black">POST</small>
  3081. <b><code>api/orders/initialize</code></b>
  3082. </p>
  3083. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  3084. <div style="padding-left: 28px; clear: unset;">
  3085. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  3086. &nbsp;
  3087. &nbsp;
  3088. <input type="text" style="display: none"
  3089. name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-initialize"
  3090. value="Bearer {YOUR_AUTH_KEY}"
  3091. data-component="header">
  3092. <br>
  3093. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  3094. </div>
  3095. <div style="padding-left: 28px; clear: unset;">
  3096. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  3097. &nbsp;
  3098. &nbsp;
  3099. <input type="text" style="display: none"
  3100. name="Content-Type" data-endpoint="POSTapi-orders-initialize"
  3101. value="application/json"
  3102. data-component="header">
  3103. <br>
  3104. <p>Example: <code>application/json</code></p>
  3105. </div>
  3106. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  3107. <div style=" padding-left: 28px; clear: unset;">
  3108. <b style="line-height: 2;"><code>coach_id</code></b>&nbsp;&nbsp;
  3109. <small>integer</small>&nbsp;
  3110. &nbsp;
  3111. <input type="number" style="display: none"
  3112. step="any" name="coach_id" data-endpoint="POSTapi-orders-initialize"
  3113. value="1"
  3114. data-component="body">
  3115. <br>
  3116. <p>技师ID. Example: <code>1</code></p>
  3117. </div>
  3118. <div style=" padding-left: 28px; clear: unset;">
  3119. <b style="line-height: 2;"><code>area_code</code></b>&nbsp;&nbsp;
  3120. <small>string</small>&nbsp;
  3121. &nbsp;
  3122. <input type="text" style="display: none"
  3123. name="area_code" data-endpoint="POSTapi-orders-initialize"
  3124. value="370602"
  3125. data-component="body">
  3126. <br>
  3127. <p>区划代码. Example: <code>370602</code></p>
  3128. </div>
  3129. <div style=" padding-left: 28px; clear: unset;">
  3130. <b style="line-height: 2;"><code>project_id</code></b>&nbsp;&nbsp;
  3131. <small>integer</small>&nbsp;
  3132. &nbsp;
  3133. <input type="number" style="display: none"
  3134. step="any" name="project_id" data-endpoint="POSTapi-orders-initialize"
  3135. value="1"
  3136. data-component="body">
  3137. <br>
  3138. <p>项目ID. Example: <code>1</code></p>
  3139. </div>
  3140. </form>
  3141. <h2 id="-POSTapi-orders-create">创建订单</h2>
  3142. <p>
  3143. <small class="badge badge-darkred">requires authentication</small>
  3144. </p>
  3145. <p>创建订单</p>
  3146. <span id="example-requests-POSTapi-orders-create">
  3147. <blockquote>Example request:</blockquote>
  3148. <div class="javascript-example">
  3149. <pre><code class="language-javascript">const url = new URL(
  3150. "http://127.0.0.1/api/orders/create"
  3151. );
  3152. const headers = {
  3153. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  3154. "Content-Type": "application/json",
  3155. "Accept": "application/json",
  3156. };
  3157. let body = {
  3158. "project_id": 1,
  3159. "address_id": 1,
  3160. "coach_id": 6,
  3161. "use_balance": false,
  3162. "service_time": "2024-01-01 10:00:00",
  3163. "order_id": null
  3164. };
  3165. fetch(url, {
  3166. method: "POST",
  3167. headers,
  3168. body: JSON.stringify(body),
  3169. }).then(response =&gt; response.json());</code></pre></div>
  3170. <div class="bash-example">
  3171. <pre><code class="language-bash">curl --request POST \
  3172. "http://127.0.0.1/api/orders/create" \
  3173. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  3174. --header "Content-Type: application/json" \
  3175. --data "{
  3176. \"project_id\": 1,
  3177. \"address_id\": 1,
  3178. \"coach_id\": 6,
  3179. \"use_balance\": false,
  3180. \"service_time\": \"2024-01-01 10:00:00\",
  3181. \"order_id\": null
  3182. }"
  3183. </code></pre></div>
  3184. </span>
  3185. <span id="example-responses-POSTapi-orders-create">
  3186. <blockquote>
  3187. <p>Example response (200):</p>
  3188. </blockquote>
  3189. <pre>
  3190. <code class="language-json" style="max-height: 300px;">{
  3191. &quot;status&quot;: &quot;success&quot;,
  3192. &quot;data&quot;: {}
  3193. }</code>
  3194. </pre>
  3195. </span>
  3196. <span id="execution-results-POSTapi-orders-create" hidden>
  3197. <blockquote>Received response<span
  3198. id="execution-response-status-POSTapi-orders-create"></span>:
  3199. </blockquote>
  3200. <pre class="json"><code id="execution-response-content-POSTapi-orders-create"
  3201. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  3202. </span>
  3203. <span id="execution-error-POSTapi-orders-create" hidden>
  3204. <blockquote>Request failed with error:</blockquote>
  3205. <pre><code id="execution-error-message-POSTapi-orders-create">
  3206. Tip: Check that you&#039;re properly connected to the network.
  3207. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  3208. You can check the Dev Tools console for debugging information.</code></pre>
  3209. </span>
  3210. <form id="form-POSTapi-orders-create" data-method="POST"
  3211. data-path="api/orders/create"
  3212. data-authed="1"
  3213. data-hasfiles="0"
  3214. data-isarraybody="0"
  3215. autocomplete="off"
  3216. onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-create', this);">
  3217. <h3>
  3218. Request&nbsp;&nbsp;&nbsp;
  3219. <button type="button"
  3220. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3221. id="btn-tryout-POSTapi-orders-create"
  3222. onclick="tryItOut('POSTapi-orders-create');">Try it out ⚡
  3223. </button>
  3224. <button type="button"
  3225. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3226. id="btn-canceltryout-POSTapi-orders-create"
  3227. onclick="cancelTryOut('POSTapi-orders-create');" hidden>Cancel 🛑
  3228. </button>&nbsp;&nbsp;
  3229. <button type="submit"
  3230. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3231. id="btn-executetryout-POSTapi-orders-create"
  3232. data-initial-text="Send Request 💥"
  3233. data-loading-text="⏱ Sending..."
  3234. hidden>Send Request 💥
  3235. </button>
  3236. </h3>
  3237. <p>
  3238. <small class="badge badge-black">POST</small>
  3239. <b><code>api/orders/create</code></b>
  3240. </p>
  3241. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  3242. <div style="padding-left: 28px; clear: unset;">
  3243. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  3244. &nbsp;
  3245. &nbsp;
  3246. <input type="text" style="display: none"
  3247. name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-create"
  3248. value="Bearer {YOUR_AUTH_KEY}"
  3249. data-component="header">
  3250. <br>
  3251. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  3252. </div>
  3253. <div style="padding-left: 28px; clear: unset;">
  3254. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  3255. &nbsp;
  3256. &nbsp;
  3257. <input type="text" style="display: none"
  3258. name="Content-Type" data-endpoint="POSTapi-orders-create"
  3259. value="application/json"
  3260. data-component="header">
  3261. <br>
  3262. <p>Example: <code>application/json</code></p>
  3263. </div>
  3264. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  3265. <div style=" padding-left: 28px; clear: unset;">
  3266. <b style="line-height: 2;"><code>project_id</code></b>&nbsp;&nbsp;
  3267. <small>integer</small>&nbsp;
  3268. &nbsp;
  3269. <input type="number" style="display: none"
  3270. step="any" name="project_id" data-endpoint="POSTapi-orders-create"
  3271. value="1"
  3272. data-component="body">
  3273. <br>
  3274. <p>项目ID. Example: <code>1</code></p>
  3275. </div>
  3276. <div style=" padding-left: 28px; clear: unset;">
  3277. <b style="line-height: 2;"><code>address_id</code></b>&nbsp;&nbsp;
  3278. <small>integer</small>&nbsp;
  3279. &nbsp;
  3280. <input type="number" style="display: none"
  3281. step="any" name="address_id" data-endpoint="POSTapi-orders-create"
  3282. value="1"
  3283. data-component="body">
  3284. <br>
  3285. <p>地址ID. Example: <code>1</code></p>
  3286. </div>
  3287. <div style=" padding-left: 28px; clear: unset;">
  3288. <b style="line-height: 2;"><code>coach_id</code></b>&nbsp;&nbsp;
  3289. <small>integer</small>&nbsp;
  3290. &nbsp;
  3291. <input type="number" style="display: none"
  3292. step="any" name="coach_id" data-endpoint="POSTapi-orders-create"
  3293. value="6"
  3294. data-component="body">
  3295. <br>
  3296. <p>技师ID. Example: <code>6</code></p>
  3297. </div>
  3298. <div style=" padding-left: 28px; clear: unset;">
  3299. <b style="line-height: 2;"><code>use_balance</code></b>&nbsp;&nbsp;
  3300. <small>boolean</small>&nbsp;
  3301. <i>optional</i> &nbsp;
  3302. <label data-endpoint="POSTapi-orders-create" style="display: none">
  3303. <input type="radio" name="use_balance"
  3304. value="true"
  3305. data-endpoint="POSTapi-orders-create"
  3306. data-component="body" >
  3307. <code>true</code>
  3308. </label>
  3309. <label data-endpoint="POSTapi-orders-create" style="display: none">
  3310. <input type="radio" name="use_balance"
  3311. value="false"
  3312. data-endpoint="POSTapi-orders-create"
  3313. data-component="body" >
  3314. <code>false</code>
  3315. </label>
  3316. <br>
  3317. <p>使用余额. Example: <code>false</code></p>
  3318. </div>
  3319. <div style=" padding-left: 28px; clear: unset;">
  3320. <b style="line-height: 2;"><code>service_time</code></b>&nbsp;&nbsp;
  3321. <small>datetime</small>&nbsp;
  3322. &nbsp;
  3323. <input type="text" style="display: none"
  3324. name="service_time" data-endpoint="POSTapi-orders-create"
  3325. value="2024-01-01 10:00:00"
  3326. data-component="body">
  3327. <br>
  3328. <p>服务时间. Example: <code>2024-01-01 10:00:00</code></p>
  3329. </div>
  3330. <div style=" padding-left: 28px; clear: unset;">
  3331. <b style="line-height: 2;"><code>order_id</code></b>&nbsp;&nbsp;
  3332. <small>integer</small>&nbsp;
  3333. <i>optional</i> &nbsp;
  3334. <input type="number" style="display: none"
  3335. step="any" name="order_id" data-endpoint="POSTapi-orders-create"
  3336. value=""
  3337. data-component="body">
  3338. <br>
  3339. <p>订单ID.</p>
  3340. </div>
  3341. </form>
  3342. <h2 id="-POSTapi-orders-cancel">取消订单</h2>
  3343. <p>
  3344. <small class="badge badge-darkred">requires authentication</small>
  3345. </p>
  3346. <p>取消订单</p>
  3347. <span id="example-requests-POSTapi-orders-cancel">
  3348. <blockquote>Example request:</blockquote>
  3349. <div class="javascript-example">
  3350. <pre><code class="language-javascript">const url = new URL(
  3351. "http://127.0.0.1/api/orders/cancel"
  3352. );
  3353. const headers = {
  3354. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  3355. "Content-Type": "application/json",
  3356. "Accept": "application/json",
  3357. };
  3358. let body = {
  3359. "order_id": 123
  3360. };
  3361. fetch(url, {
  3362. method: "POST",
  3363. headers,
  3364. body: JSON.stringify(body),
  3365. }).then(response =&gt; response.json());</code></pre></div>
  3366. <div class="bash-example">
  3367. <pre><code class="language-bash">curl --request POST \
  3368. "http://127.0.0.1/api/orders/cancel" \
  3369. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  3370. --header "Content-Type: application/json" \
  3371. --data "{
  3372. \"order_id\": 123
  3373. }"
  3374. </code></pre></div>
  3375. </span>
  3376. <span id="example-responses-POSTapi-orders-cancel">
  3377. <blockquote>
  3378. <p>Example response (200):</p>
  3379. </blockquote>
  3380. <pre>
  3381. <code class="language-json" style="max-height: 300px;">{
  3382. &quot;status&quot;: &quot;success&quot;,
  3383. &quot;data&quot;: {}
  3384. }</code>
  3385. </pre>
  3386. </span>
  3387. <span id="execution-results-POSTapi-orders-cancel" hidden>
  3388. <blockquote>Received response<span
  3389. id="execution-response-status-POSTapi-orders-cancel"></span>:
  3390. </blockquote>
  3391. <pre class="json"><code id="execution-response-content-POSTapi-orders-cancel"
  3392. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  3393. </span>
  3394. <span id="execution-error-POSTapi-orders-cancel" hidden>
  3395. <blockquote>Request failed with error:</blockquote>
  3396. <pre><code id="execution-error-message-POSTapi-orders-cancel">
  3397. Tip: Check that you&#039;re properly connected to the network.
  3398. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  3399. You can check the Dev Tools console for debugging information.</code></pre>
  3400. </span>
  3401. <form id="form-POSTapi-orders-cancel" data-method="POST"
  3402. data-path="api/orders/cancel"
  3403. data-authed="1"
  3404. data-hasfiles="0"
  3405. data-isarraybody="0"
  3406. autocomplete="off"
  3407. onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-cancel', this);">
  3408. <h3>
  3409. Request&nbsp;&nbsp;&nbsp;
  3410. <button type="button"
  3411. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3412. id="btn-tryout-POSTapi-orders-cancel"
  3413. onclick="tryItOut('POSTapi-orders-cancel');">Try it out ⚡
  3414. </button>
  3415. <button type="button"
  3416. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3417. id="btn-canceltryout-POSTapi-orders-cancel"
  3418. onclick="cancelTryOut('POSTapi-orders-cancel');" hidden>Cancel 🛑
  3419. </button>&nbsp;&nbsp;
  3420. <button type="submit"
  3421. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3422. id="btn-executetryout-POSTapi-orders-cancel"
  3423. data-initial-text="Send Request 💥"
  3424. data-loading-text="⏱ Sending..."
  3425. hidden>Send Request 💥
  3426. </button>
  3427. </h3>
  3428. <p>
  3429. <small class="badge badge-black">POST</small>
  3430. <b><code>api/orders/cancel</code></b>
  3431. </p>
  3432. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  3433. <div style="padding-left: 28px; clear: unset;">
  3434. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  3435. &nbsp;
  3436. &nbsp;
  3437. <input type="text" style="display: none"
  3438. name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-cancel"
  3439. value="Bearer {YOUR_AUTH_KEY}"
  3440. data-component="header">
  3441. <br>
  3442. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  3443. </div>
  3444. <div style="padding-left: 28px; clear: unset;">
  3445. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  3446. &nbsp;
  3447. &nbsp;
  3448. <input type="text" style="display: none"
  3449. name="Content-Type" data-endpoint="POSTapi-orders-cancel"
  3450. value="application/json"
  3451. data-component="header">
  3452. <br>
  3453. <p>Example: <code>application/json</code></p>
  3454. </div>
  3455. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  3456. <div style=" padding-left: 28px; clear: unset;">
  3457. <b style="line-height: 2;"><code>order_id</code></b>&nbsp;&nbsp;
  3458. <small>integer</small>&nbsp;
  3459. &nbsp;
  3460. <input type="number" style="display: none"
  3461. step="any" name="order_id" data-endpoint="POSTapi-orders-cancel"
  3462. value="123"
  3463. data-component="body">
  3464. <br>
  3465. <p>订单ID. Example: <code>123</code></p>
  3466. </div>
  3467. </form>
  3468. <h2 id="-POSTapi-orders-finish">结束订单</h2>
  3469. <p>
  3470. <small class="badge badge-darkred">requires authentication</small>
  3471. </p>
  3472. <p>结束订单</p>
  3473. <span id="example-requests-POSTapi-orders-finish">
  3474. <blockquote>Example request:</blockquote>
  3475. <div class="javascript-example">
  3476. <pre><code class="language-javascript">const url = new URL(
  3477. "http://127.0.0.1/api/orders/finish"
  3478. );
  3479. const headers = {
  3480. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  3481. "Content-Type": "application/json",
  3482. "Accept": "application/json",
  3483. };
  3484. let body = {
  3485. "order_id": 1
  3486. };
  3487. fetch(url, {
  3488. method: "POST",
  3489. headers,
  3490. body: JSON.stringify(body),
  3491. }).then(response =&gt; response.json());</code></pre></div>
  3492. <div class="bash-example">
  3493. <pre><code class="language-bash">curl --request POST \
  3494. "http://127.0.0.1/api/orders/finish" \
  3495. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  3496. --header "Content-Type: application/json" \
  3497. --data "{
  3498. \"order_id\": 1
  3499. }"
  3500. </code></pre></div>
  3501. </span>
  3502. <span id="example-responses-POSTapi-orders-finish">
  3503. <blockquote>
  3504. <p>Example response (200):</p>
  3505. </blockquote>
  3506. <pre>
  3507. <code class="language-json" style="max-height: 300px;">{
  3508. &quot;status&quot;: &quot;success&quot;,
  3509. &quot;data&quot;: {}
  3510. }</code>
  3511. </pre>
  3512. </span>
  3513. <span id="execution-results-POSTapi-orders-finish" hidden>
  3514. <blockquote>Received response<span
  3515. id="execution-response-status-POSTapi-orders-finish"></span>:
  3516. </blockquote>
  3517. <pre class="json"><code id="execution-response-content-POSTapi-orders-finish"
  3518. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  3519. </span>
  3520. <span id="execution-error-POSTapi-orders-finish" hidden>
  3521. <blockquote>Request failed with error:</blockquote>
  3522. <pre><code id="execution-error-message-POSTapi-orders-finish">
  3523. Tip: Check that you&#039;re properly connected to the network.
  3524. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  3525. You can check the Dev Tools console for debugging information.</code></pre>
  3526. </span>
  3527. <form id="form-POSTapi-orders-finish" data-method="POST"
  3528. data-path="api/orders/finish"
  3529. data-authed="1"
  3530. data-hasfiles="0"
  3531. data-isarraybody="0"
  3532. autocomplete="off"
  3533. onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-finish', this);">
  3534. <h3>
  3535. Request&nbsp;&nbsp;&nbsp;
  3536. <button type="button"
  3537. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3538. id="btn-tryout-POSTapi-orders-finish"
  3539. onclick="tryItOut('POSTapi-orders-finish');">Try it out ⚡
  3540. </button>
  3541. <button type="button"
  3542. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3543. id="btn-canceltryout-POSTapi-orders-finish"
  3544. onclick="cancelTryOut('POSTapi-orders-finish');" hidden>Cancel 🛑
  3545. </button>&nbsp;&nbsp;
  3546. <button type="submit"
  3547. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3548. id="btn-executetryout-POSTapi-orders-finish"
  3549. data-initial-text="Send Request 💥"
  3550. data-loading-text="⏱ Sending..."
  3551. hidden>Send Request 💥
  3552. </button>
  3553. </h3>
  3554. <p>
  3555. <small class="badge badge-black">POST</small>
  3556. <b><code>api/orders/finish</code></b>
  3557. </p>
  3558. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  3559. <div style="padding-left: 28px; clear: unset;">
  3560. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  3561. &nbsp;
  3562. &nbsp;
  3563. <input type="text" style="display: none"
  3564. name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-finish"
  3565. value="Bearer {YOUR_AUTH_KEY}"
  3566. data-component="header">
  3567. <br>
  3568. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  3569. </div>
  3570. <div style="padding-left: 28px; clear: unset;">
  3571. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  3572. &nbsp;
  3573. &nbsp;
  3574. <input type="text" style="display: none"
  3575. name="Content-Type" data-endpoint="POSTapi-orders-finish"
  3576. value="application/json"
  3577. data-component="header">
  3578. <br>
  3579. <p>Example: <code>application/json</code></p>
  3580. </div>
  3581. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  3582. <div style=" padding-left: 28px; clear: unset;">
  3583. <b style="line-height: 2;"><code>order_id</code></b>&nbsp;&nbsp;
  3584. <small>integer</small>&nbsp;
  3585. &nbsp;
  3586. <input type="number" style="display: none"
  3587. step="any" name="order_id" data-endpoint="POSTapi-orders-finish"
  3588. value="1"
  3589. data-component="body">
  3590. <br>
  3591. <p>订单ID. Example: <code>1</code></p>
  3592. </div>
  3593. </form>
  3594. <h2 id="-POSTapi-orders-confirm-leave">确认技师离开</h2>
  3595. <p>
  3596. <small class="badge badge-darkred">requires authentication</small>
  3597. </p>
  3598. <p>确认技师离开</p>
  3599. <span id="example-requests-POSTapi-orders-confirm-leave">
  3600. <blockquote>Example request:</blockquote>
  3601. <div class="javascript-example">
  3602. <pre><code class="language-javascript">const url = new URL(
  3603. "http://127.0.0.1/api/orders/confirm-leave"
  3604. );
  3605. const headers = {
  3606. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  3607. "Content-Type": "application/json",
  3608. "Accept": "application/json",
  3609. };
  3610. let body = {
  3611. "order_id": 123
  3612. };
  3613. fetch(url, {
  3614. method: "POST",
  3615. headers,
  3616. body: JSON.stringify(body),
  3617. }).then(response =&gt; response.json());</code></pre></div>
  3618. <div class="bash-example">
  3619. <pre><code class="language-bash">curl --request POST \
  3620. "http://127.0.0.1/api/orders/confirm-leave" \
  3621. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  3622. --header "Content-Type: application/json" \
  3623. --data "{
  3624. \"order_id\": 123
  3625. }"
  3626. </code></pre></div>
  3627. </span>
  3628. <span id="example-responses-POSTapi-orders-confirm-leave">
  3629. <blockquote>
  3630. <p>Example response (200):</p>
  3631. </blockquote>
  3632. <pre>
  3633. <code class="language-json" style="max-height: 300px;">{
  3634. &quot;status&quot;: &quot;success&quot;,
  3635. &quot;data&quot;: {}
  3636. }</code>
  3637. </pre>
  3638. </span>
  3639. <span id="execution-results-POSTapi-orders-confirm-leave" hidden>
  3640. <blockquote>Received response<span
  3641. id="execution-response-status-POSTapi-orders-confirm-leave"></span>:
  3642. </blockquote>
  3643. <pre class="json"><code id="execution-response-content-POSTapi-orders-confirm-leave"
  3644. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  3645. </span>
  3646. <span id="execution-error-POSTapi-orders-confirm-leave" hidden>
  3647. <blockquote>Request failed with error:</blockquote>
  3648. <pre><code id="execution-error-message-POSTapi-orders-confirm-leave">
  3649. Tip: Check that you&#039;re properly connected to the network.
  3650. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  3651. You can check the Dev Tools console for debugging information.</code></pre>
  3652. </span>
  3653. <form id="form-POSTapi-orders-confirm-leave" data-method="POST"
  3654. data-path="api/orders/confirm-leave"
  3655. data-authed="1"
  3656. data-hasfiles="0"
  3657. data-isarraybody="0"
  3658. autocomplete="off"
  3659. onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-confirm-leave', this);">
  3660. <h3>
  3661. Request&nbsp;&nbsp;&nbsp;
  3662. <button type="button"
  3663. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3664. id="btn-tryout-POSTapi-orders-confirm-leave"
  3665. onclick="tryItOut('POSTapi-orders-confirm-leave');">Try it out ⚡
  3666. </button>
  3667. <button type="button"
  3668. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3669. id="btn-canceltryout-POSTapi-orders-confirm-leave"
  3670. onclick="cancelTryOut('POSTapi-orders-confirm-leave');" hidden>Cancel 🛑
  3671. </button>&nbsp;&nbsp;
  3672. <button type="submit"
  3673. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3674. id="btn-executetryout-POSTapi-orders-confirm-leave"
  3675. data-initial-text="Send Request 💥"
  3676. data-loading-text="⏱ Sending..."
  3677. hidden>Send Request 💥
  3678. </button>
  3679. </h3>
  3680. <p>
  3681. <small class="badge badge-black">POST</small>
  3682. <b><code>api/orders/confirm-leave</code></b>
  3683. </p>
  3684. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  3685. <div style="padding-left: 28px; clear: unset;">
  3686. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  3687. &nbsp;
  3688. &nbsp;
  3689. <input type="text" style="display: none"
  3690. name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-confirm-leave"
  3691. value="Bearer {YOUR_AUTH_KEY}"
  3692. data-component="header">
  3693. <br>
  3694. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  3695. </div>
  3696. <div style="padding-left: 28px; clear: unset;">
  3697. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  3698. &nbsp;
  3699. &nbsp;
  3700. <input type="text" style="display: none"
  3701. name="Content-Type" data-endpoint="POSTapi-orders-confirm-leave"
  3702. value="application/json"
  3703. data-component="header">
  3704. <br>
  3705. <p>Example: <code>application/json</code></p>
  3706. </div>
  3707. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  3708. <div style=" padding-left: 28px; clear: unset;">
  3709. <b style="line-height: 2;"><code>order_id</code></b>&nbsp;&nbsp;
  3710. <small>integer</small>&nbsp;
  3711. &nbsp;
  3712. <input type="number" style="display: none"
  3713. step="any" name="order_id" data-endpoint="POSTapi-orders-confirm-leave"
  3714. value="123"
  3715. data-component="body">
  3716. <br>
  3717. <p>订单ID. Example: <code>123</code></p>
  3718. </div>
  3719. </form>
  3720. <h2 id="-GETapi-orders-list">获取订单列表</h2>
  3721. <p>
  3722. <small class="badge badge-darkred">requires authentication</small>
  3723. </p>
  3724. <p>获取订单列表</p>
  3725. <span id="example-requests-GETapi-orders-list">
  3726. <blockquote>Example request:</blockquote>
  3727. <div class="javascript-example">
  3728. <pre><code class="language-javascript">const url = new URL(
  3729. "http://127.0.0.1/api/orders/list"
  3730. );
  3731. const headers = {
  3732. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  3733. "Accept": "application/json",
  3734. };
  3735. fetch(url, {
  3736. method: "GET",
  3737. headers,
  3738. }).then(response =&gt; response.json());</code></pre></div>
  3739. <div class="bash-example">
  3740. <pre><code class="language-bash">curl --request GET \
  3741. --get "http://127.0.0.1/api/orders/list" \
  3742. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  3743. </span>
  3744. <span id="example-responses-GETapi-orders-list">
  3745. <blockquote>
  3746. <p>Example response (200):</p>
  3747. </blockquote>
  3748. <pre>
  3749. <code class="language-json" style="max-height: 300px;">{
  3750. &quot;status&quot;: &quot;success&quot;,
  3751. &quot;data&quot;: []
  3752. }</code>
  3753. </pre>
  3754. </span>
  3755. <span id="execution-results-GETapi-orders-list" hidden>
  3756. <blockquote>Received response<span
  3757. id="execution-response-status-GETapi-orders-list"></span>:
  3758. </blockquote>
  3759. <pre class="json"><code id="execution-response-content-GETapi-orders-list"
  3760. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  3761. </span>
  3762. <span id="execution-error-GETapi-orders-list" hidden>
  3763. <blockquote>Request failed with error:</blockquote>
  3764. <pre><code id="execution-error-message-GETapi-orders-list">
  3765. Tip: Check that you&#039;re properly connected to the network.
  3766. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  3767. You can check the Dev Tools console for debugging information.</code></pre>
  3768. </span>
  3769. <form id="form-GETapi-orders-list" data-method="GET"
  3770. data-path="api/orders/list"
  3771. data-authed="1"
  3772. data-hasfiles="0"
  3773. data-isarraybody="0"
  3774. autocomplete="off"
  3775. onsubmit="event.preventDefault(); executeTryOut('GETapi-orders-list', this);">
  3776. <h3>
  3777. Request&nbsp;&nbsp;&nbsp;
  3778. <button type="button"
  3779. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3780. id="btn-tryout-GETapi-orders-list"
  3781. onclick="tryItOut('GETapi-orders-list');">Try it out ⚡
  3782. </button>
  3783. <button type="button"
  3784. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3785. id="btn-canceltryout-GETapi-orders-list"
  3786. onclick="cancelTryOut('GETapi-orders-list');" hidden>Cancel 🛑
  3787. </button>&nbsp;&nbsp;
  3788. <button type="submit"
  3789. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3790. id="btn-executetryout-GETapi-orders-list"
  3791. data-initial-text="Send Request 💥"
  3792. data-loading-text="⏱ Sending..."
  3793. hidden>Send Request 💥
  3794. </button>
  3795. </h3>
  3796. <p>
  3797. <small class="badge badge-green">GET</small>
  3798. <b><code>api/orders/list</code></b>
  3799. </p>
  3800. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  3801. <div style="padding-left: 28px; clear: unset;">
  3802. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  3803. &nbsp;
  3804. &nbsp;
  3805. <input type="text" style="display: none"
  3806. name="Authorization" class="auth-value" data-endpoint="GETapi-orders-list"
  3807. value="Bearer {YOUR_AUTH_KEY}"
  3808. data-component="header">
  3809. <br>
  3810. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  3811. </div>
  3812. </form>
  3813. <h2 id="-GETapi-orders-detail--id-">获取订单详情</h2>
  3814. <p>
  3815. <small class="badge badge-darkred">requires authentication</small>
  3816. </p>
  3817. <p>获取订单详情</p>
  3818. <span id="example-requests-GETapi-orders-detail--id-">
  3819. <blockquote>Example request:</blockquote>
  3820. <div class="javascript-example">
  3821. <pre><code class="language-javascript">const url = new URL(
  3822. "http://127.0.0.1/api/orders/detail/1"
  3823. );
  3824. const headers = {
  3825. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  3826. "Accept": "application/json",
  3827. };
  3828. fetch(url, {
  3829. method: "GET",
  3830. headers,
  3831. }).then(response =&gt; response.json());</code></pre></div>
  3832. <div class="bash-example">
  3833. <pre><code class="language-bash">curl --request GET \
  3834. --get "http://127.0.0.1/api/orders/detail/1" \
  3835. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  3836. </span>
  3837. <span id="example-responses-GETapi-orders-detail--id-">
  3838. <blockquote>
  3839. <p>Example response (200):</p>
  3840. </blockquote>
  3841. <pre>
  3842. <code class="language-json" style="max-height: 300px;">{
  3843. &quot;status&quot;: &quot;success&quot;,
  3844. &quot;data&quot;: {}
  3845. }</code>
  3846. </pre>
  3847. </span>
  3848. <span id="execution-results-GETapi-orders-detail--id-" hidden>
  3849. <blockquote>Received response<span
  3850. id="execution-response-status-GETapi-orders-detail--id-"></span>:
  3851. </blockquote>
  3852. <pre class="json"><code id="execution-response-content-GETapi-orders-detail--id-"
  3853. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  3854. </span>
  3855. <span id="execution-error-GETapi-orders-detail--id-" hidden>
  3856. <blockquote>Request failed with error:</blockquote>
  3857. <pre><code id="execution-error-message-GETapi-orders-detail--id-">
  3858. Tip: Check that you&#039;re properly connected to the network.
  3859. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  3860. You can check the Dev Tools console for debugging information.</code></pre>
  3861. </span>
  3862. <form id="form-GETapi-orders-detail--id-" data-method="GET"
  3863. data-path="api/orders/detail/{id}"
  3864. data-authed="1"
  3865. data-hasfiles="0"
  3866. data-isarraybody="0"
  3867. autocomplete="off"
  3868. onsubmit="event.preventDefault(); executeTryOut('GETapi-orders-detail--id-', this);">
  3869. <h3>
  3870. Request&nbsp;&nbsp;&nbsp;
  3871. <button type="button"
  3872. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3873. id="btn-tryout-GETapi-orders-detail--id-"
  3874. onclick="tryItOut('GETapi-orders-detail--id-');">Try it out ⚡
  3875. </button>
  3876. <button type="button"
  3877. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3878. id="btn-canceltryout-GETapi-orders-detail--id-"
  3879. onclick="cancelTryOut('GETapi-orders-detail--id-');" hidden>Cancel 🛑
  3880. </button>&nbsp;&nbsp;
  3881. <button type="submit"
  3882. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3883. id="btn-executetryout-GETapi-orders-detail--id-"
  3884. data-initial-text="Send Request 💥"
  3885. data-loading-text="⏱ Sending..."
  3886. hidden>Send Request 💥
  3887. </button>
  3888. </h3>
  3889. <p>
  3890. <small class="badge badge-green">GET</small>
  3891. <b><code>api/orders/detail/{id}</code></b>
  3892. </p>
  3893. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  3894. <div style="padding-left: 28px; clear: unset;">
  3895. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  3896. &nbsp;
  3897. &nbsp;
  3898. <input type="text" style="display: none"
  3899. name="Authorization" class="auth-value" data-endpoint="GETapi-orders-detail--id-"
  3900. value="Bearer {YOUR_AUTH_KEY}"
  3901. data-component="header">
  3902. <br>
  3903. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  3904. </div>
  3905. <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
  3906. <div style="padding-left: 28px; clear: unset;">
  3907. <b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
  3908. <small>string</small>&nbsp;
  3909. &nbsp;
  3910. <input type="text" style="display: none"
  3911. name="id" data-endpoint="GETapi-orders-detail--id-"
  3912. value="1"
  3913. data-component="url">
  3914. <br>
  3915. <p>订单ID. Example: <code>1</code></p>
  3916. </div>
  3917. </form>
  3918. <h1 id="">账户管理</h1>
  3919. <p>=======</p>
  3920. <h2 id="-POSTapi-account-send-code">发送验证码</h2>
  3921. <p>
  3922. <small class="badge badge-darkred">requires authentication</small>
  3923. </p>
  3924. <p>向指定手机号发送验证码</p>
  3925. <span id="example-requests-POSTapi-account-send-code">
  3926. <blockquote>Example request:</blockquote>
  3927. <div class="javascript-example">
  3928. <pre><code class="language-javascript">const url = new URL(
  3929. "http://127.0.0.1/api/account/send-code"
  3930. );
  3931. const headers = {
  3932. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  3933. "Content-Type": "application/json",
  3934. "Accept": "application/json",
  3935. };
  3936. let body = {
  3937. "mobile": "13800138000"
  3938. };
  3939. fetch(url, {
  3940. method: "POST",
  3941. headers,
  3942. body: JSON.stringify(body),
  3943. }).then(response =&gt; response.json());</code></pre></div>
  3944. <div class="bash-example">
  3945. <pre><code class="language-bash">curl --request POST \
  3946. "http://127.0.0.1/api/account/send-code" \
  3947. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  3948. --header "Content-Type: application/json" \
  3949. --data "{
  3950. \"mobile\": \"13800138000\"
  3951. }"
  3952. </code></pre></div>
  3953. </span>
  3954. <span id="example-responses-POSTapi-account-send-code">
  3955. <blockquote>
  3956. <p>Example response (200):</p>
  3957. </blockquote>
  3958. <pre>
  3959. <code class="language-json" style="max-height: 300px;">{
  3960. &quot;code&quot;: 200,
  3961. &quot;message&quot;: &quot;验证码发送成功&quot;,
  3962. &quot;data&quot;: null
  3963. }</code>
  3964. </pre>
  3965. </span>
  3966. <span id="execution-results-POSTapi-account-send-code" hidden>
  3967. <blockquote>Received response<span
  3968. id="execution-response-status-POSTapi-account-send-code"></span>:
  3969. </blockquote>
  3970. <pre class="json"><code id="execution-response-content-POSTapi-account-send-code"
  3971. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  3972. </span>
  3973. <span id="execution-error-POSTapi-account-send-code" hidden>
  3974. <blockquote>Request failed with error:</blockquote>
  3975. <pre><code id="execution-error-message-POSTapi-account-send-code">
  3976. Tip: Check that you&#039;re properly connected to the network.
  3977. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  3978. You can check the Dev Tools console for debugging information.</code></pre>
  3979. </span>
  3980. <form id="form-POSTapi-account-send-code" data-method="POST"
  3981. data-path="api/account/send-code"
  3982. data-authed="1"
  3983. data-hasfiles="0"
  3984. data-isarraybody="0"
  3985. autocomplete="off"
  3986. onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-send-code', this);">
  3987. <h3>
  3988. Request&nbsp;&nbsp;&nbsp;
  3989. <button type="button"
  3990. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3991. id="btn-tryout-POSTapi-account-send-code"
  3992. onclick="tryItOut('POSTapi-account-send-code');">Try it out ⚡
  3993. </button>
  3994. <button type="button"
  3995. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  3996. id="btn-canceltryout-POSTapi-account-send-code"
  3997. onclick="cancelTryOut('POSTapi-account-send-code');" hidden>Cancel 🛑
  3998. </button>&nbsp;&nbsp;
  3999. <button type="submit"
  4000. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4001. id="btn-executetryout-POSTapi-account-send-code"
  4002. data-initial-text="Send Request 💥"
  4003. data-loading-text="⏱ Sending..."
  4004. hidden>Send Request 💥
  4005. </button>
  4006. </h3>
  4007. <p>
  4008. <small class="badge badge-black">POST</small>
  4009. <b><code>api/account/send-code</code></b>
  4010. </p>
  4011. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  4012. <div style="padding-left: 28px; clear: unset;">
  4013. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  4014. &nbsp;
  4015. &nbsp;
  4016. <input type="text" style="display: none"
  4017. name="Authorization" class="auth-value" data-endpoint="POSTapi-account-send-code"
  4018. value="Bearer {YOUR_AUTH_KEY}"
  4019. data-component="header">
  4020. <br>
  4021. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  4022. </div>
  4023. <div style="padding-left: 28px; clear: unset;">
  4024. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  4025. &nbsp;
  4026. &nbsp;
  4027. <input type="text" style="display: none"
  4028. name="Content-Type" data-endpoint="POSTapi-account-send-code"
  4029. value="application/json"
  4030. data-component="header">
  4031. <br>
  4032. <p>Example: <code>application/json</code></p>
  4033. </div>
  4034. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  4035. <div style=" padding-left: 28px; clear: unset;">
  4036. <b style="line-height: 2;"><code>mobile</code></b>&nbsp;&nbsp;
  4037. <small>string</small>&nbsp;
  4038. &nbsp;
  4039. <input type="text" style="display: none"
  4040. name="mobile" data-endpoint="POSTapi-account-send-code"
  4041. value="13800138000"
  4042. data-component="body">
  4043. <br>
  4044. <p>手机号码. Example: <code>13800138000</code></p>
  4045. </div>
  4046. </form>
  4047. <h2 id="-POSTapi-account-login">用户登录</h2>
  4048. <p>
  4049. <small class="badge badge-darkred">requires authentication</small>
  4050. </p>
  4051. <p>使用手机号和验证码登录账户</p>
  4052. <span id="example-requests-POSTapi-account-login">
  4053. <blockquote>Example request:</blockquote>
  4054. <div class="javascript-example">
  4055. <pre><code class="language-javascript">const url = new URL(
  4056. "http://127.0.0.1/api/account/login"
  4057. );
  4058. const headers = {
  4059. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  4060. "Content-Type": "application/json",
  4061. "Accept": "application/json",
  4062. };
  4063. let body = {
  4064. "mobile": "13800138000",
  4065. "code": "123456"
  4066. };
  4067. fetch(url, {
  4068. method: "POST",
  4069. headers,
  4070. body: JSON.stringify(body),
  4071. }).then(response =&gt; response.json());</code></pre></div>
  4072. <div class="bash-example">
  4073. <pre><code class="language-bash">curl --request POST \
  4074. "http://127.0.0.1/api/account/login" \
  4075. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  4076. --header "Content-Type: application/json" \
  4077. --data "{
  4078. \"mobile\": \"13800138000\",
  4079. \"code\": \"123456\"
  4080. }"
  4081. </code></pre></div>
  4082. </span>
  4083. <span id="example-responses-POSTapi-account-login">
  4084. <blockquote>
  4085. <p>Example response (200):</p>
  4086. </blockquote>
  4087. <pre>
  4088. <code class="language-json" style="max-height: 300px;">{
  4089. &quot;code&quot;: 200,
  4090. &quot;message&quot;: &quot;登录成功&quot;,
  4091. &quot;data&quot;: {
  4092. &quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...&quot;,
  4093. &quot;user&quot;: {
  4094. &quot;id&quot;: 1,
  4095. &quot;mobile&quot;: &quot;13800138000&quot;,
  4096. &quot;nickname&quot;: &quot;用户昵称&quot;
  4097. }
  4098. }
  4099. }</code>
  4100. </pre>
  4101. </span>
  4102. <span id="execution-results-POSTapi-account-login" hidden>
  4103. <blockquote>Received response<span
  4104. id="execution-response-status-POSTapi-account-login"></span>:
  4105. </blockquote>
  4106. <pre class="json"><code id="execution-response-content-POSTapi-account-login"
  4107. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  4108. </span>
  4109. <span id="execution-error-POSTapi-account-login" hidden>
  4110. <blockquote>Request failed with error:</blockquote>
  4111. <pre><code id="execution-error-message-POSTapi-account-login">
  4112. Tip: Check that you&#039;re properly connected to the network.
  4113. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  4114. You can check the Dev Tools console for debugging information.</code></pre>
  4115. </span>
  4116. <form id="form-POSTapi-account-login" data-method="POST"
  4117. data-path="api/account/login"
  4118. data-authed="1"
  4119. data-hasfiles="0"
  4120. data-isarraybody="0"
  4121. autocomplete="off"
  4122. onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-login', this);">
  4123. <h3>
  4124. Request&nbsp;&nbsp;&nbsp;
  4125. <button type="button"
  4126. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4127. id="btn-tryout-POSTapi-account-login"
  4128. onclick="tryItOut('POSTapi-account-login');">Try it out ⚡
  4129. </button>
  4130. <button type="button"
  4131. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4132. id="btn-canceltryout-POSTapi-account-login"
  4133. onclick="cancelTryOut('POSTapi-account-login');" hidden>Cancel 🛑
  4134. </button>&nbsp;&nbsp;
  4135. <button type="submit"
  4136. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4137. id="btn-executetryout-POSTapi-account-login"
  4138. data-initial-text="Send Request 💥"
  4139. data-loading-text="⏱ Sending..."
  4140. hidden>Send Request 💥
  4141. </button>
  4142. </h3>
  4143. <p>
  4144. <small class="badge badge-black">POST</small>
  4145. <b><code>api/account/login</code></b>
  4146. </p>
  4147. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  4148. <div style="padding-left: 28px; clear: unset;">
  4149. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  4150. &nbsp;
  4151. &nbsp;
  4152. <input type="text" style="display: none"
  4153. name="Authorization" class="auth-value" data-endpoint="POSTapi-account-login"
  4154. value="Bearer {YOUR_AUTH_KEY}"
  4155. data-component="header">
  4156. <br>
  4157. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  4158. </div>
  4159. <div style="padding-left: 28px; clear: unset;">
  4160. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  4161. &nbsp;
  4162. &nbsp;
  4163. <input type="text" style="display: none"
  4164. name="Content-Type" data-endpoint="POSTapi-account-login"
  4165. value="application/json"
  4166. data-component="header">
  4167. <br>
  4168. <p>Example: <code>application/json</code></p>
  4169. </div>
  4170. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  4171. <div style=" padding-left: 28px; clear: unset;">
  4172. <b style="line-height: 2;"><code>mobile</code></b>&nbsp;&nbsp;
  4173. <small>string</small>&nbsp;
  4174. &nbsp;
  4175. <input type="text" style="display: none"
  4176. name="mobile" data-endpoint="POSTapi-account-login"
  4177. value="13800138000"
  4178. data-component="body">
  4179. <br>
  4180. <p>手机号码. Example: <code>13800138000</code></p>
  4181. </div>
  4182. <div style=" padding-left: 28px; clear: unset;">
  4183. <b style="line-height: 2;"><code>code</code></b>&nbsp;&nbsp;
  4184. <small>string</small>&nbsp;
  4185. &nbsp;
  4186. <input type="text" style="display: none"
  4187. name="code" data-endpoint="POSTapi-account-login"
  4188. value="123456"
  4189. data-component="body">
  4190. <br>
  4191. <p>验证码. Example: <code>123456</code></p>
  4192. </div>
  4193. </form>
  4194. <h2 id="-POSTapi-account-wx-login">微信登录</h2>
  4195. <p>
  4196. <small class="badge badge-darkred">requires authentication</small>
  4197. </p>
  4198. <p>使用微信openid登录账户</p>
  4199. <span id="example-requests-POSTapi-account-wx-login">
  4200. <blockquote>Example request:</blockquote>
  4201. <div class="javascript-example">
  4202. <pre><code class="language-javascript">const url = new URL(
  4203. "http://127.0.0.1/api/account/wx-login"
  4204. );
  4205. const headers = {
  4206. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  4207. "Content-Type": "application/json",
  4208. "Accept": "application/json",
  4209. };
  4210. let body = {
  4211. "openid": "wx_123456789"
  4212. };
  4213. fetch(url, {
  4214. method: "POST",
  4215. headers,
  4216. body: JSON.stringify(body),
  4217. }).then(response =&gt; response.json());</code></pre></div>
  4218. <div class="bash-example">
  4219. <pre><code class="language-bash">curl --request POST \
  4220. "http://127.0.0.1/api/account/wx-login" \
  4221. --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  4222. --header "Content-Type: application/json" \
  4223. --data "{
  4224. \"openid\": \"wx_123456789\"
  4225. }"
  4226. </code></pre></div>
  4227. </span>
  4228. <span id="example-responses-POSTapi-account-wx-login">
  4229. <blockquote>
  4230. <p>Example response (200):</p>
  4231. </blockquote>
  4232. <pre>
  4233. <code class="language-json" style="max-height: 300px;">{
  4234. &quot;code&quot;: 200,
  4235. &quot;message&quot;: &quot;登录成功&quot;,
  4236. &quot;data&quot;: {
  4237. &quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...&quot;,
  4238. &quot;user&quot;: {
  4239. &quot;id&quot;: 1,
  4240. &quot;openid&quot;: &quot;wx_123456789&quot;,
  4241. &quot;nickname&quot;: &quot;微信昵称&quot;
  4242. }
  4243. }
  4244. }</code>
  4245. </pre>
  4246. </span>
  4247. <span id="execution-results-POSTapi-account-wx-login" hidden>
  4248. <blockquote>Received response<span
  4249. id="execution-response-status-POSTapi-account-wx-login"></span>:
  4250. </blockquote>
  4251. <pre class="json"><code id="execution-response-content-POSTapi-account-wx-login"
  4252. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  4253. </span>
  4254. <span id="execution-error-POSTapi-account-wx-login" hidden>
  4255. <blockquote>Request failed with error:</blockquote>
  4256. <pre><code id="execution-error-message-POSTapi-account-wx-login">
  4257. Tip: Check that you&#039;re properly connected to the network.
  4258. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  4259. You can check the Dev Tools console for debugging information.</code></pre>
  4260. </span>
  4261. <form id="form-POSTapi-account-wx-login" data-method="POST"
  4262. data-path="api/account/wx-login"
  4263. data-authed="1"
  4264. data-hasfiles="0"
  4265. data-isarraybody="0"
  4266. autocomplete="off"
  4267. onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-wx-login', this);">
  4268. <h3>
  4269. Request&nbsp;&nbsp;&nbsp;
  4270. <button type="button"
  4271. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4272. id="btn-tryout-POSTapi-account-wx-login"
  4273. onclick="tryItOut('POSTapi-account-wx-login');">Try it out ⚡
  4274. </button>
  4275. <button type="button"
  4276. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4277. id="btn-canceltryout-POSTapi-account-wx-login"
  4278. onclick="cancelTryOut('POSTapi-account-wx-login');" hidden>Cancel 🛑
  4279. </button>&nbsp;&nbsp;
  4280. <button type="submit"
  4281. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4282. id="btn-executetryout-POSTapi-account-wx-login"
  4283. data-initial-text="Send Request 💥"
  4284. data-loading-text="⏱ Sending..."
  4285. hidden>Send Request 💥
  4286. </button>
  4287. </h3>
  4288. <p>
  4289. <small class="badge badge-black">POST</small>
  4290. <b><code>api/account/wx-login</code></b>
  4291. </p>
  4292. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  4293. <div style="padding-left: 28px; clear: unset;">
  4294. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  4295. &nbsp;
  4296. &nbsp;
  4297. <input type="text" style="display: none"
  4298. name="Authorization" class="auth-value" data-endpoint="POSTapi-account-wx-login"
  4299. value="Bearer {YOUR_AUTH_KEY}"
  4300. data-component="header">
  4301. <br>
  4302. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  4303. </div>
  4304. <div style="padding-left: 28px; clear: unset;">
  4305. <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
  4306. &nbsp;
  4307. &nbsp;
  4308. <input type="text" style="display: none"
  4309. name="Content-Type" data-endpoint="POSTapi-account-wx-login"
  4310. value="application/json"
  4311. data-component="header">
  4312. <br>
  4313. <p>Example: <code>application/json</code></p>
  4314. </div>
  4315. <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
  4316. <div style=" padding-left: 28px; clear: unset;">
  4317. <b style="line-height: 2;"><code>openid</code></b>&nbsp;&nbsp;
  4318. <small>string</small>&nbsp;
  4319. &nbsp;
  4320. <input type="text" style="display: none"
  4321. name="openid" data-endpoint="POSTapi-account-wx-login"
  4322. value="wx_123456789"
  4323. data-component="body">
  4324. <br>
  4325. <p>微信openid. Example: <code>wx_123456789</code></p>
  4326. </div>
  4327. </form>
  4328. <h2 id="-POSTapi-account-logout">用户退出</h2>
  4329. <p>
  4330. <small class="badge badge-darkred">requires authentication</small>
  4331. </p>
  4332. <p>退出当前账户登录状态</p>
  4333. <span id="example-requests-POSTapi-account-logout">
  4334. <blockquote>Example request:</blockquote>
  4335. <div class="javascript-example">
  4336. <pre><code class="language-javascript">const url = new URL(
  4337. "http://127.0.0.1/api/account/logout"
  4338. );
  4339. const headers = {
  4340. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  4341. "Accept": "application/json",
  4342. };
  4343. fetch(url, {
  4344. method: "POST",
  4345. headers,
  4346. }).then(response =&gt; response.json());</code></pre></div>
  4347. <div class="bash-example">
  4348. <pre><code class="language-bash">curl --request POST \
  4349. "http://127.0.0.1/api/account/logout" \
  4350. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  4351. </span>
  4352. <span id="example-responses-POSTapi-account-logout">
  4353. <blockquote>
  4354. <p>Example response (200):</p>
  4355. </blockquote>
  4356. <pre>
  4357. <code class="language-json" style="max-height: 300px;">{
  4358. &quot;code&quot;: 200,
  4359. &quot;message&quot;: &quot;退出成功&quot;,
  4360. &quot;data&quot;: null
  4361. }</code>
  4362. </pre>
  4363. </span>
  4364. <span id="execution-results-POSTapi-account-logout" hidden>
  4365. <blockquote>Received response<span
  4366. id="execution-response-status-POSTapi-account-logout"></span>:
  4367. </blockquote>
  4368. <pre class="json"><code id="execution-response-content-POSTapi-account-logout"
  4369. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  4370. </span>
  4371. <span id="execution-error-POSTapi-account-logout" hidden>
  4372. <blockquote>Request failed with error:</blockquote>
  4373. <pre><code id="execution-error-message-POSTapi-account-logout">
  4374. Tip: Check that you&#039;re properly connected to the network.
  4375. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  4376. You can check the Dev Tools console for debugging information.</code></pre>
  4377. </span>
  4378. <form id="form-POSTapi-account-logout" data-method="POST"
  4379. data-path="api/account/logout"
  4380. data-authed="1"
  4381. data-hasfiles="0"
  4382. data-isarraybody="0"
  4383. autocomplete="off"
  4384. onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-logout', this);">
  4385. <h3>
  4386. Request&nbsp;&nbsp;&nbsp;
  4387. <button type="button"
  4388. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4389. id="btn-tryout-POSTapi-account-logout"
  4390. onclick="tryItOut('POSTapi-account-logout');">Try it out ⚡
  4391. </button>
  4392. <button type="button"
  4393. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4394. id="btn-canceltryout-POSTapi-account-logout"
  4395. onclick="cancelTryOut('POSTapi-account-logout');" hidden>Cancel 🛑
  4396. </button>&nbsp;&nbsp;
  4397. <button type="submit"
  4398. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4399. id="btn-executetryout-POSTapi-account-logout"
  4400. data-initial-text="Send Request 💥"
  4401. data-loading-text="⏱ Sending..."
  4402. hidden>Send Request 💥
  4403. </button>
  4404. </h3>
  4405. <p>
  4406. <small class="badge badge-black">POST</small>
  4407. <b><code>api/account/logout</code></b>
  4408. </p>
  4409. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  4410. <div style="padding-left: 28px; clear: unset;">
  4411. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  4412. &nbsp;
  4413. &nbsp;
  4414. <input type="text" style="display: none"
  4415. name="Authorization" class="auth-value" data-endpoint="POSTapi-account-logout"
  4416. value="Bearer {YOUR_AUTH_KEY}"
  4417. data-component="header">
  4418. <br>
  4419. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  4420. </div>
  4421. </form>
  4422. <h2 id="-DELETEapi-account">用户注销</h2>
  4423. <p>
  4424. <small class="badge badge-darkred">requires authentication</small>
  4425. </p>
  4426. <p>永久注销当前账户</p>
  4427. <span id="example-requests-DELETEapi-account">
  4428. <blockquote>Example request:</blockquote>
  4429. <div class="javascript-example">
  4430. <pre><code class="language-javascript">const url = new URL(
  4431. "http://127.0.0.1/api/account"
  4432. );
  4433. const headers = {
  4434. "Authorization": "Bearer {YOUR_AUTH_KEY}",
  4435. "Accept": "application/json",
  4436. };
  4437. fetch(url, {
  4438. method: "DELETE",
  4439. headers,
  4440. }).then(response =&gt; response.json());</code></pre></div>
  4441. <div class="bash-example">
  4442. <pre><code class="language-bash">curl --request DELETE \
  4443. "http://127.0.0.1/api/account" \
  4444. --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
  4445. </span>
  4446. <span id="example-responses-DELETEapi-account">
  4447. <blockquote>
  4448. <p>Example response (200):</p>
  4449. </blockquote>
  4450. <pre>
  4451. <code class="language-json" style="max-height: 300px;">{
  4452. &quot;code&quot;: 200,
  4453. &quot;message&quot;: &quot;注销成功&quot;,
  4454. &quot;data&quot;: null
  4455. }</code>
  4456. </pre>
  4457. </span>
  4458. <span id="execution-results-DELETEapi-account" hidden>
  4459. <blockquote>Received response<span
  4460. id="execution-response-status-DELETEapi-account"></span>:
  4461. </blockquote>
  4462. <pre class="json"><code id="execution-response-content-DELETEapi-account"
  4463. data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
  4464. </span>
  4465. <span id="execution-error-DELETEapi-account" hidden>
  4466. <blockquote>Request failed with error:</blockquote>
  4467. <pre><code id="execution-error-message-DELETEapi-account">
  4468. Tip: Check that you&#039;re properly connected to the network.
  4469. If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
  4470. You can check the Dev Tools console for debugging information.</code></pre>
  4471. </span>
  4472. <form id="form-DELETEapi-account" data-method="DELETE"
  4473. data-path="api/account"
  4474. data-authed="1"
  4475. data-hasfiles="0"
  4476. data-isarraybody="0"
  4477. autocomplete="off"
  4478. onsubmit="event.preventDefault(); executeTryOut('DELETEapi-account', this);">
  4479. <h3>
  4480. Request&nbsp;&nbsp;&nbsp;
  4481. <button type="button"
  4482. style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4483. id="btn-tryout-DELETEapi-account"
  4484. onclick="tryItOut('DELETEapi-account');">Try it out ⚡
  4485. </button>
  4486. <button type="button"
  4487. style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4488. id="btn-canceltryout-DELETEapi-account"
  4489. onclick="cancelTryOut('DELETEapi-account');" hidden>Cancel 🛑
  4490. </button>&nbsp;&nbsp;
  4491. <button type="submit"
  4492. style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
  4493. id="btn-executetryout-DELETEapi-account"
  4494. data-initial-text="Send Request 💥"
  4495. data-loading-text="⏱ Sending..."
  4496. hidden>Send Request 💥
  4497. </button>
  4498. </h3>
  4499. <p>
  4500. <small class="badge badge-red">DELETE</small>
  4501. <b><code>api/account</code></b>
  4502. </p>
  4503. <h4 class="fancy-heading-panel"><b>Headers</b></h4>
  4504. <div style="padding-left: 28px; clear: unset;">
  4505. <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp;
  4506. &nbsp;
  4507. &nbsp;
  4508. <input type="text" style="display: none"
  4509. name="Authorization" class="auth-value" data-endpoint="DELETEapi-account"
  4510. value="Bearer {YOUR_AUTH_KEY}"
  4511. data-component="header">
  4512. <br>
  4513. <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
  4514. </div>
  4515. </form>
  4516. </div>
  4517. <div class="dark-box">
  4518. <div class="lang-selector">
  4519. <button type="button" class="lang-button"
  4520. data-language-name="javascript">javascript</button>
  4521. <button type="button" class="lang-button"
  4522. data-language-name="bash">bash</button>
  4523. </div>
  4524. </div>
  4525. </div>
  4526. </body>
  4527. <script src="http://127.0.0.1/vendor/scribe/js/tryitout-4.38.0.js"></script>
  4528. <script src="http://127.0.0.1/vendor/scribe/js/theme-default-4.38.0.js"></script>
  4529. <script type="text/javascript">
  4530. document.querySelectorAll('.tocify-header .level-1 a').forEach(link => {
  4531. const parentLi = link.closest('li');
  4532. const nextUl = parentLi.nextElementSibling;
  4533. if (nextUl && nextUl.tagName === 'UL') {
  4534. link.addEventListener('click', function(e) {
  4535. e.preventDefault();
  4536. nextUl.classList.toggle('visible');
  4537. });
  4538. }
  4539. });
  4540. </script>
  4541. </html>