index.blade.php 198 KB

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