1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <title>Owl Admin API Documentation</title>
- <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
- <link rel="stylesheet" href="{{ asset("/vendor/scribe/css/theme-default.style.css") }}" media="screen">
- <link rel="stylesheet" href="{{ asset("/vendor/scribe/css/theme-default.print.css") }}" media="print">
- <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
- <link rel="stylesheet"
- href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css">
- <script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script>
- <style id="language-style">
- /* starts out as display none and is replaced with js later */
- body .content .javascript-example code { display: none; }
- body .content .bash-example code { display: none; }
- </style>
- <script>
- var tryItOutBaseUrl = "http://127.0.0.1";
- var useCsrf = Boolean();
- var csrfUrl = "/sanctum/csrf-cookie";
- </script>
- <script src="{{ asset("/vendor/scribe/js/tryitout-4.38.0.js") }}"></script>
- <script src="{{ asset("/vendor/scribe/js/theme-default-4.38.0.js") }}"></script>
- </head>
- <body data-languages="["javascript","bash"]">
- <a href="#" id="nav-button">
- <span>
- MENU
- <img src="{{ asset("/vendor/scribe/images/navbar.png") }}" alt="navbar-image"/>
- </span>
- </a>
- <div class="tocify-wrapper">
-
- <div class="lang-selector">
- <button type="button" class="lang-button" data-language-name="javascript">javascript</button>
- <button type="button" class="lang-button" data-language-name="bash">bash</button>
- </div>
-
- <div class="search">
- <input type="text" class="search" id="input-search" placeholder="Search">
- </div>
- <div id="toc">
- <ul id="tocify-header-introduction" class="tocify-header">
- <li class="tocify-item level-1" data-unique="introduction">
- <a href="#introduction">Introduction</a>
- </li>
- </ul>
- <ul id="tocify-header-authenticating-requests" class="tocify-header">
- <li class="tocify-item level-1" data-unique="authenticating-requests">
- <a href="#authenticating-requests">Authenticating requests</a>
- </li>
- </ul>
- <ul id="tocify-header-" class="tocify-header">
- <li class="tocify-item level-1" data-unique="">
- <a href="#"></a>
- </li>
- <ul id="tocify-subheader-" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="-GETapi-scribe-update-token--mobile-">
- <a href="#-GETapi-scribe-update-token--mobile-">更新API文档的认证Token</a>
- </li>
- </ul>
- </ul>
- <ul id="tocify-header-" class="tocify-header">
- <li class="tocify-item level-1" data-unique="">
- <a href="#">用户端-地址管理</a>
- </li>
- <ul id="tocify-subheader-" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="-GETapi-address-default">
- <a href="#-GETapi-address-default">获取默认地址2</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-address">
- <a href="#-POSTapi-address">添加地址</a>
- </li>
- <li class="tocify-item level-2" data-unique="-PUTapi-address--id-">
- <a href="#-PUTapi-address--id-">修改地址</a>
- </li>
- <li class="tocify-item level-2" data-unique="-DELETEapi-address--id-">
- <a href="#-DELETEapi-address--id-">删除地址</a>
- </li>
- <li class="tocify-item level-2" data-unique="-PUTapi-address--id--default">
- <a href="#-PUTapi-address--id--default">设置默认地址</a>
- </li>
- </ul>
- </ul>
- <ul id="tocify-header-" class="tocify-header">
- <li class="tocify-item level-1" data-unique="">
- <a href="#">用户端-技师定位管理</a>
- </li>
- <ul id="tocify-subheader-" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="-GETapi-coach-location">
- <a href="#-GETapi-coach-location">获取定位列表</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-coach-location">
- <a href="#-POSTapi-coach-location">创建定位</a>
- </li>
- <li class="tocify-item level-2" data-unique="-DELETEapi-coach-location--id-">
- <a href="#-DELETEapi-coach-location--id-">删除定位</a>
- </li>
- </ul>
- </ul>
- <ul id="tocify-header-" class="tocify-header">
- <li class="tocify-item level-1" data-unique="">
- <a href="#">用户端-技师管理</a>
- </li>
- <ul id="tocify-subheader-" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="-GETapi-coach">
- <a href="#-GETapi-coach">获取技师列表</a>
- </li>
- <li class="tocify-item level-2" data-unique="-GETapi-coach--id-">
- <a href="#-GETapi-coach--id-">获取技师详情</a>
- </li>
- </ul>
- </ul>
- <ul id="tocify-header-" class="tocify-header">
- <li class="tocify-item level-1" data-unique="">
- <a href="#">用户端-用户管理</a>
- </li>
- <ul id="tocify-subheader-" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="-GETapi-user">
- <a href="#-GETapi-user">获取用户信息</a>
- </li>
- <li class="tocify-item level-2" data-unique="-PUTapi-user">
- <a href="#-PUTapi-user">修改用户信息</a>
- </li>
- <li class="tocify-item level-2" data-unique="-GETapi-user-wallet">
- <a href="#-GETapi-user-wallet">获取用户钱包</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-user-withdraw">
- <a href="#-POSTapi-user-withdraw">用户提现</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-user-apply-coach">
- <a href="#-POSTapi-user-apply-coach">申请成为技师</a>
- </li>
- </ul>
- </ul>
- <ul id="tocify-header-" class="tocify-header">
- <li class="tocify-item level-1" data-unique="">
- <a href="#">用户端-订单管理</a>
- </li>
- <ul id="tocify-subheader-" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="-POSTapi-orders-initialize">
- <a href="#-POSTapi-orders-initialize">订单初始化</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-orders-create">
- <a href="#-POSTapi-orders-create">创建订单</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-orders-cancel">
- <a href="#-POSTapi-orders-cancel">取消订单</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-orders-finish">
- <a href="#-POSTapi-orders-finish">结束订单</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-orders-confirm-leave">
- <a href="#-POSTapi-orders-confirm-leave">确认技师离开</a>
- </li>
- <li class="tocify-item level-2" data-unique="-GETapi-orders-list">
- <a href="#-GETapi-orders-list">获取订单列表</a>
- </li>
- <li class="tocify-item level-2" data-unique="-GETapi-orders-detail--id-">
- <a href="#-GETapi-orders-detail--id-">获取订单详情</a>
- </li>
- </ul>
- </ul>
- <ul id="tocify-header-" class="tocify-header">
- <li class="tocify-item level-1" data-unique="">
- <a href="#">用户端-项目管理</a>
- </li>
- <ul id="tocify-subheader-" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="-GETapi-project">
- <a href="#-GETapi-project">获取项目列表</a>
- </li>
- <li class="tocify-item level-2" data-unique="-GETapi-project--id--detail">
- <a href="#-GETapi-project--id--detail">获取项目详情</a>
- </li>
- <li class="tocify-item level-2" data-unique="-GETapi-project-coach-list">
- <a href="#-GETapi-project-coach-list">获取技师项目列表</a>
- </li>
- </ul>
- </ul>
- <ul id="tocify-header-" class="tocify-header">
- <li class="tocify-item level-1" data-unique="">
- <a href="#">账户管理</a>
- </li>
- <ul id="tocify-subheader-" class="tocify-subheader">
- <li class="tocify-item level-2" data-unique="-POSTapi-account-send-code">
- <a href="#-POSTapi-account-send-code">发送验证码</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-account-login">
- <a href="#-POSTapi-account-login">用户登录</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-account-wx-login">
- <a href="#-POSTapi-account-wx-login">微信登录</a>
- </li>
- <li class="tocify-item level-2" data-unique="-POSTapi-account-logout">
- <a href="#-POSTapi-account-logout">用户退出</a>
- </li>
- <li class="tocify-item level-2" data-unique="-DELETEapi-account">
- <a href="#-DELETEapi-account">用户注销</a>
- </li>
- </ul>
- </ul>
- </div>
- <ul class="toc-footer" id="toc-footer">
- <li style="padding-bottom: 5px;"><a href="{{ route("scribe.postman") }}">View Postman collection</a></li>
- <li style="padding-bottom: 5px;"><a href="{{ route("scribe.openapi") }}">View OpenAPI spec</a></li>
- <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
- </ul>
- <ul class="toc-footer" id="last-updated">
- <li>November 22 2024</li>
- </ul>
- </div>
- <div class="page-wrapper">
- <div class="dark-box"></div>
- <div class="content">
- <h1 id="introduction">Introduction</h1>
- <p>Owl Admin API 接口文档</p>
- <aside>
- <strong>Base URL</strong>: <code>http://127.0.0.1</code>
- </aside>
- <p>欢迎使用 Owl Admin API 接口文档。</p>
- <p>该文档提供了所有可用的API接口信息。</p>
- <h1 id="authenticating-requests">Authenticating requests</h1>
- <p>To authenticate requests, include an <strong><code>Authorization</code></strong> header with the value <strong><code>"Bearer 171|4wDLRqkRn3A5mQm3b5l9gelKO8BijUZKZrgVugt544296a98"</code></strong>.</p>
- <p>All authenticated endpoints are marked with a <code>requires authentication</code> badge in the documentation below.</p>
- <p>通过登录接口获取 token,格式为 Bearer {token}</p>
- <h1 id=""></h1>
-
- <h2 id="-GETapi-scribe-update-token--mobile-">更新API文档的认证Token</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>通过手机号获取验证码并登录,然后更新API文档的认证Token</p>
- <span id="example-requests-GETapi-scribe-update-token--mobile-">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/scribe/update-token/13800138000"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/scribe/update-token/13800138000" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-scribe-update-token--mobile-">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "Token更新成功",
- "data": {
- "token": "your_new_token_here"
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-scribe-update-token--mobile-" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-scribe-update-token--mobile-"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-scribe-update-token--mobile-"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-scribe-update-token--mobile-" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-scribe-update-token--mobile-">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-scribe-update-token--mobile-" data-method="GET"
- data-path="api/scribe/update-token/{mobile}"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-scribe-update-token--mobile-', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-scribe-update-token--mobile-"
- onclick="tryItOut('GETapi-scribe-update-token--mobile-');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-scribe-update-token--mobile-"
- onclick="cancelTryOut('GETapi-scribe-update-token--mobile-');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-scribe-update-token--mobile-"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/scribe/update-token/{mobile}</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-scribe-update-token--mobile-"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>mobile</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="mobile" data-endpoint="GETapi-scribe-update-token--mobile-"
- value="13800138000"
- data-component="url">
- <br>
- <p>手机号码. Example: <code>13800138000</code></p>
- </div>
- </form>
- <h1 id="">用户端-地址管理</h1>
- <p>用户地址相关的API接口</p>
- <h2 id="-GETapi-address-default">获取默认地址2</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <span id="example-requests-GETapi-address-default">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/address/default"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/address/default" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-address-default">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "success",
- "data": {
- "id": 1,
- "user_id": 1,
- "name": "张三",
- "phone": "13800138000",
- "province": "广东省",
- "city": "深圳市",
- "district": "南山区",
- "address": "科技园",
- "is_default": 1,
- "created_at": "2024-01-01 00:00:00",
- "updated_at": "2024-01-01 00:00:00"
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-address-default" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-address-default"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-address-default"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-address-default" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-address-default">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-address-default" data-method="GET"
- data-path="api/address/default"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-address-default', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-address-default"
- onclick="tryItOut('GETapi-address-default');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-address-default"
- onclick="cancelTryOut('GETapi-address-default');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-address-default"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/address/default</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-address-default"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-address">添加地址</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <span id="example-requests-POSTapi-address">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/address"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "phone": "13800138000",
- "province": "广东省",
- "city": "深圳市",
- "district": "南山区",
- "longitude": "113.93041",
- "latitude": "22.53332",
- "area_code": "440305",
- "is_default": true,
- "location": "科技园",
- "detail": "科技园南区"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/address" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"phone\": \"13800138000\",
- \"province\": \"广东省\",
- \"city\": \"深圳市\",
- \"district\": \"南山区\",
- \"longitude\": \"113.93041\",
- \"latitude\": \"22.53332\",
- \"area_code\": \"440305\",
- \"is_default\": true,
- \"location\": \"科技园\",
- \"detail\": \"科技园南区\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-address">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "添加成功"
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-address" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-address"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-address"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-address" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-address">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-address" data-method="POST"
- data-path="api/address"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-address', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-address"
- onclick="tryItOut('POSTapi-address');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-address"
- onclick="cancelTryOut('POSTapi-address');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-address"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/address</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-address"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-address"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>phone</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="phone" data-endpoint="POSTapi-address"
- value="13800138000"
- data-component="body">
- <br>
- <p>手机号 Example: <code>13800138000</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>province</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="province" data-endpoint="POSTapi-address"
- value="广东省"
- data-component="body">
- <br>
- <p>省份 Example: <code>广东省</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>city</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="city" data-endpoint="POSTapi-address"
- value="深圳市"
- data-component="body">
- <br>
- <p>城市 Example: <code>深圳市</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>district</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="district" data-endpoint="POSTapi-address"
- value="南山区"
- data-component="body">
- <br>
- <p>区县 Example: <code>南山区</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>longitude</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="longitude" data-endpoint="POSTapi-address"
- value="113.93041"
- data-component="body">
- <br>
- <p>经度 Example: <code>113.93041</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>latitude</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="latitude" data-endpoint="POSTapi-address"
- value="22.53332"
- data-component="body">
- <br>
- <p>纬度 Example: <code>22.53332</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>area_code</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="area_code" data-endpoint="POSTapi-address"
- value="440305"
- data-component="body">
- <br>
- <p>区划代码 Example: <code>440305</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>is_default</code></b>
- <small>boolean</small>
-
- <label data-endpoint="POSTapi-address" style="display: none">
- <input type="radio" name="is_default"
- value="true"
- data-endpoint="POSTapi-address"
- data-component="body" >
- <code>true</code>
- </label>
- <label data-endpoint="POSTapi-address" style="display: none">
- <input type="radio" name="is_default"
- value="false"
- data-endpoint="POSTapi-address"
- data-component="body" >
- <code>false</code>
- </label>
- <br>
- <p>是否默认地址 Example: <code>true</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>location</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="location" data-endpoint="POSTapi-address"
- value="科技园"
- data-component="body">
- <br>
- <p>定位地址 Example: <code>科技园</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>detail</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="detail" data-endpoint="POSTapi-address"
- value="科技园南区"
- data-component="body">
- <br>
- <p>详细地址 Example: <code>科技园南区</code></p>
- </div>
- </form>
- <h2 id="-PUTapi-address--id-">修改地址</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <span id="example-requests-PUTapi-address--id-">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/address/1"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "phone": "13800138000",
- "province": "广东省",
- "city": "深圳市",
- "district": "南山区",
- "longitude": "113.93041",
- "latitude": "22.53332",
- "area_code": "440305",
- "is_default": true,
- "location": "科技园",
- "detail": "科技园南区"
- };
- fetch(url, {
- method: "PUT",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request PUT \
- "http://127.0.0.1/api/address/1" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"phone\": \"13800138000\",
- \"province\": \"广东省\",
- \"city\": \"深圳市\",
- \"district\": \"南山区\",
- \"longitude\": \"113.93041\",
- \"latitude\": \"22.53332\",
- \"area_code\": \"440305\",
- \"is_default\": true,
- \"location\": \"科技园\",
- \"detail\": \"科技园南区\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-PUTapi-address--id-">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "修改成功"
- }</code>
- </pre>
- </span>
- <span id="execution-results-PUTapi-address--id-" hidden>
- <blockquote>Received response<span
- id="execution-response-status-PUTapi-address--id-"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-PUTapi-address--id-"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-PUTapi-address--id-" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-PUTapi-address--id-">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-PUTapi-address--id-" data-method="PUT"
- data-path="api/address/{id}"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('PUTapi-address--id-', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-PUTapi-address--id-"
- onclick="tryItOut('PUTapi-address--id-');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-PUTapi-address--id-"
- onclick="cancelTryOut('PUTapi-address--id-');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-PUTapi-address--id-"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-darkblue">PUT</small>
- <b><code>api/address/{id}</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="PUTapi-address--id-"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="PUTapi-address--id-"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="id" data-endpoint="PUTapi-address--id-"
- value="1"
- data-component="url">
- <br>
- <p>地址ID Example: <code>1</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>phone</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="phone" data-endpoint="PUTapi-address--id-"
- value="13800138000"
- data-component="body">
- <br>
- <p>手机号 Example: <code>13800138000</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>province</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="province" data-endpoint="PUTapi-address--id-"
- value="广东省"
- data-component="body">
- <br>
- <p>省份 Example: <code>广东省</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>city</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="city" data-endpoint="PUTapi-address--id-"
- value="深圳市"
- data-component="body">
- <br>
- <p>城市 Example: <code>深圳市</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>district</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="district" data-endpoint="PUTapi-address--id-"
- value="南山区"
- data-component="body">
- <br>
- <p>区县 Example: <code>南山区</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>longitude</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="longitude" data-endpoint="PUTapi-address--id-"
- value="113.93041"
- data-component="body">
- <br>
- <p>经度 Example: <code>113.93041</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>latitude</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="latitude" data-endpoint="PUTapi-address--id-"
- value="22.53332"
- data-component="body">
- <br>
- <p>纬度 Example: <code>22.53332</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>area_code</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="area_code" data-endpoint="PUTapi-address--id-"
- value="440305"
- data-component="body">
- <br>
- <p>区划代码 Example: <code>440305</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>is_default</code></b>
- <small>boolean</small>
-
- <label data-endpoint="PUTapi-address--id-" style="display: none">
- <input type="radio" name="is_default"
- value="true"
- data-endpoint="PUTapi-address--id-"
- data-component="body" >
- <code>true</code>
- </label>
- <label data-endpoint="PUTapi-address--id-" style="display: none">
- <input type="radio" name="is_default"
- value="false"
- data-endpoint="PUTapi-address--id-"
- data-component="body" >
- <code>false</code>
- </label>
- <br>
- <p>是否默认地址 Example: <code>true</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>location</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="location" data-endpoint="PUTapi-address--id-"
- value="科技园"
- data-component="body">
- <br>
- <p>定位地址 Example: <code>科技园</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>detail</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="detail" data-endpoint="PUTapi-address--id-"
- value="科技园南区"
- data-component="body">
- <br>
- <p>详细地址 Example: <code>科技园南区</code></p>
- </div>
- </form>
- <h2 id="-DELETEapi-address--id-">删除地址</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <span id="example-requests-DELETEapi-address--id-">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/address/1"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "DELETE",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request DELETE \
- "http://127.0.0.1/api/address/1" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-DELETEapi-address--id-">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "删除成功"
- }</code>
- </pre>
- </span>
- <span id="execution-results-DELETEapi-address--id-" hidden>
- <blockquote>Received response<span
- id="execution-response-status-DELETEapi-address--id-"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-DELETEapi-address--id-"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-DELETEapi-address--id-" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-DELETEapi-address--id-">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-DELETEapi-address--id-" data-method="DELETE"
- data-path="api/address/{id}"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('DELETEapi-address--id-', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-DELETEapi-address--id-"
- onclick="tryItOut('DELETEapi-address--id-');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-DELETEapi-address--id-"
- onclick="cancelTryOut('DELETEapi-address--id-');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-DELETEapi-address--id-"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-red">DELETE</small>
- <b><code>api/address/{id}</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="DELETEapi-address--id-"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="id" data-endpoint="DELETEapi-address--id-"
- value="1"
- data-component="url">
- <br>
- <p>地址ID Example: <code>1</code></p>
- </div>
- </form>
- <h2 id="-PUTapi-address--id--default">设置默认地址</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <span id="example-requests-PUTapi-address--id--default">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/address/1/default"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "PUT",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request PUT \
- "http://127.0.0.1/api/address/1/default" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-PUTapi-address--id--default">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "设置成功"
- }</code>
- </pre>
- </span>
- <span id="execution-results-PUTapi-address--id--default" hidden>
- <blockquote>Received response<span
- id="execution-response-status-PUTapi-address--id--default"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-PUTapi-address--id--default"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-PUTapi-address--id--default" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-PUTapi-address--id--default">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-PUTapi-address--id--default" data-method="PUT"
- data-path="api/address/{id}/default"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('PUTapi-address--id--default', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-PUTapi-address--id--default"
- onclick="tryItOut('PUTapi-address--id--default');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-PUTapi-address--id--default"
- onclick="cancelTryOut('PUTapi-address--id--default');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-PUTapi-address--id--default"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-darkblue">PUT</small>
- <b><code>api/address/{id}/default</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="PUTapi-address--id--default"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="id" data-endpoint="PUTapi-address--id--default"
- value="1"
- data-component="url">
- <br>
- <p>地址ID Example: <code>1</code></p>
- </div>
- </form>
- <h1 id="">用户端-技师定位管理</h1>
- <p>技师定位相关的API接口</p>
- <h2 id="-GETapi-coach-location">获取定位列表</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <span id="example-requests-GETapi-coach-location">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/coach/location"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/coach/location" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-coach-location">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "获取成功",
- "data": [
- {
- "id": 1,
- "type": "home",
- "latitude": 34.0522,
- "longitude": -118.2437,
- "city": "Los Angeles",
- "district": "Downtown",
- "location": "123 Main St",
- "area_code": "90001"
- }
- ]
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-coach-location" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-coach-location"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-coach-location"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-coach-location" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-coach-location">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-coach-location" data-method="GET"
- data-path="api/coach/location"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-coach-location', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-coach-location"
- onclick="tryItOut('GETapi-coach-location');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-coach-location"
- onclick="cancelTryOut('GETapi-coach-location');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-coach-location"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/coach/location</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-coach-location"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-coach-location">创建定位</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <span id="example-requests-POSTapi-coach-location">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/coach/location"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "type": "home",
- "latitude": 34.0522,
- "longitude": -118.2437,
- "city": "Los Angeles",
- "district": "Downtown",
- "location": "123 Main St",
- "area_code": "90001"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/coach/location" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"type\": \"home\",
- \"latitude\": 34.0522,
- \"longitude\": -118.2437,
- \"city\": \"Los Angeles\",
- \"district\": \"Downtown\",
- \"location\": \"123 Main St\",
- \"area_code\": \"90001\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-coach-location">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "创建成功",
- "data": {
- "id": 1,
- "type": "home",
- "latitude": 34.0522,
- "longitude": -118.2437,
- "city": "Los Angeles",
- "district": "Downtown",
- "location": "123 Main St",
- "area_code": "90001"
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-coach-location" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-coach-location"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-coach-location"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-coach-location" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-coach-location">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-coach-location" data-method="POST"
- data-path="api/coach/location"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-coach-location', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-coach-location"
- onclick="tryItOut('POSTapi-coach-location');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-coach-location"
- onclick="cancelTryOut('POSTapi-coach-location');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-coach-location"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/coach/location</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-coach-location"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-coach-location"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>type</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="type" data-endpoint="POSTapi-coach-location"
- value="home"
- data-component="body">
- <br>
- <p>类型. Example: <code>home</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>latitude</code></b>
- <small>number</small>
-
- <input type="number" style="display: none"
- step="any" name="latitude" data-endpoint="POSTapi-coach-location"
- value="34.0522"
- data-component="body">
- <br>
- <p>纬度. Example: <code>34.0522</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>longitude</code></b>
- <small>number</small>
-
- <input type="number" style="display: none"
- step="any" name="longitude" data-endpoint="POSTapi-coach-location"
- value="-118.2437"
- data-component="body">
- <br>
- <p>经度. Example: <code>-118.2437</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>city</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="city" data-endpoint="POSTapi-coach-location"
- value="Los Angeles"
- data-component="body">
- <br>
- <p>市. Example: <code>Los Angeles</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>district</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="district" data-endpoint="POSTapi-coach-location"
- value="Downtown"
- data-component="body">
- <br>
- <p>区. Example: <code>Downtown</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>location</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="location" data-endpoint="POSTapi-coach-location"
- value="123 Main St"
- data-component="body">
- <br>
- <p>详细地址. Example: <code>123 Main St</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>area_code</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="area_code" data-endpoint="POSTapi-coach-location"
- value="90001"
- data-component="body">
- <br>
- <p>区域编码. Example: <code>90001</code></p>
- </div>
- </form>
- <h2 id="-DELETEapi-coach-location--id-">删除定位</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <span id="example-requests-DELETEapi-coach-location--id-">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/coach/location/quis"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "coach_id": 1,
- "type": "home"
- };
- fetch(url, {
- method: "DELETE",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request DELETE \
- "http://127.0.0.1/api/coach/location/quis" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"coach_id\": 1,
- \"type\": \"home\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-DELETEapi-coach-location--id-">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "删除成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-DELETEapi-coach-location--id-" hidden>
- <blockquote>Received response<span
- id="execution-response-status-DELETEapi-coach-location--id-"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-DELETEapi-coach-location--id-"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-DELETEapi-coach-location--id-" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-DELETEapi-coach-location--id-">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-DELETEapi-coach-location--id-" data-method="DELETE"
- data-path="api/coach/location/{id}"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('DELETEapi-coach-location--id-', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-DELETEapi-coach-location--id-"
- onclick="tryItOut('DELETEapi-coach-location--id-');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-DELETEapi-coach-location--id-"
- onclick="cancelTryOut('DELETEapi-coach-location--id-');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-DELETEapi-coach-location--id-"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-red">DELETE</small>
- <b><code>api/coach/location/{id}</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="DELETEapi-coach-location--id-"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="DELETEapi-coach-location--id-"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>id</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="id" data-endpoint="DELETEapi-coach-location--id-"
- value="quis"
- data-component="url">
- <br>
- <p>The ID of the location. Example: <code>quis</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>coach_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="coach_id" data-endpoint="DELETEapi-coach-location--id-"
- value="1"
- data-component="body">
- <br>
- <p>技师ID. Example: <code>1</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>type</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="type" data-endpoint="DELETEapi-coach-location--id-"
- value="home"
- data-component="body">
- <br>
- <p>类型. Example: <code>home</code></p>
- </div>
- </form>
- <h1 id="">用户端-技师管理</h1>
- <p>技师相关的API接口</p>
- <h2 id="-GETapi-coach">获取技师列表</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>根据经纬度获取技师列表</p>
- <span id="example-requests-GETapi-coach">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/coach"
- );
- const params = {
- "latitude": "34.0522",
- "longitude": "-118.2437",
- };
- Object.keys(params)
- .forEach(key => url.searchParams.append(key, params[key]));
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/coach?latitude=34.0522&longitude=-118.2437" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-coach">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "获取成功",
- "data": [
- {
- "id": 1,
- "name": "技师A",
- "latitude": 34.0522,
- "longitude": -118.2437
- }
- ]
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-coach" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-coach"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-coach"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-coach" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-coach">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-coach" data-method="GET"
- data-path="api/coach"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-coach', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-coach"
- onclick="tryItOut('GETapi-coach');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-coach"
- onclick="cancelTryOut('GETapi-coach');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-coach"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/coach</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-coach"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>latitude</code></b>
- <small>number</small>
-
- <input type="number" style="display: none"
- step="any" name="latitude" data-endpoint="GETapi-coach"
- value="34.0522"
- data-component="query">
- <br>
- <p>纬度. Example: <code>34.0522</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>longitude</code></b>
- <small>number</small>
-
- <input type="number" style="display: none"
- step="any" name="longitude" data-endpoint="GETapi-coach"
- value="-118.2437"
- data-component="query">
- <br>
- <p>经度. Example: <code>-118.2437</code></p>
- </div>
- </form>
- <h2 id="-GETapi-coach--id-">获取技师详情</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>根据ID获取技师的详细信息</p>
- <span id="example-requests-GETapi-coach--id-">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/coach/1"
- );
- const params = {
- "latitude": "34.0522",
- "longitude": "-118.2437",
- };
- Object.keys(params)
- .forEach(key => url.searchParams.append(key, params[key]));
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/coach/1?latitude=34.0522&longitude=-118.2437" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-coach--id-">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "获取成功",
- "data": {
- "id": 1,
- "name": "技师A",
- "latitude": 34.0522,
- "longitude": -118.2437,
- "details": "详细信息"
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-coach--id-" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-coach--id-"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-coach--id-"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-coach--id-" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-coach--id-">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-coach--id-" data-method="GET"
- data-path="api/coach/{id}"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-coach--id-', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-coach--id-"
- onclick="tryItOut('GETapi-coach--id-');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-coach--id-"
- onclick="cancelTryOut('GETapi-coach--id-');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-coach--id-"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/coach/{id}</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-coach--id-"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="id" data-endpoint="GETapi-coach--id-"
- value="1"
- data-component="url">
- <br>
- <p>技师ID. Example: <code>1</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>latitude</code></b>
- <small>number</small>
- <i>optional</i>
- <input type="number" style="display: none"
- step="any" name="latitude" data-endpoint="GETapi-coach--id-"
- value="34.0522"
- data-component="query">
- <br>
- <p>纬度. Example: <code>34.0522</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>longitude</code></b>
- <small>number</small>
- <i>optional</i>
- <input type="number" style="display: none"
- step="any" name="longitude" data-endpoint="GETapi-coach--id-"
- value="-118.2437"
- data-component="query">
- <br>
- <p>经度. Example: <code>-118.2437</code></p>
- </div>
- </form>
- <h1 id="">用户端-用户管理</h1>
- <p>用户相关的API接口</p>
- <h2 id="-GETapi-user">获取用户信息</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>获取当前用户的信息</p>
- <span id="example-requests-GETapi-user">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/user"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/user" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-user">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "获取成功",
- "data": {
- "id": 1,
- "mobile": "13800138000",
- "nickname": "用户昵称"
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-user" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-user"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-user"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-user" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-user">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-user" data-method="GET"
- data-path="api/user"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-user', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-user"
- onclick="tryItOut('GETapi-user');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-user"
- onclick="cancelTryOut('GETapi-user');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-user"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/user</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-user"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- </form>
- <h2 id="-PUTapi-user">修改用户信息</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>修改当前用户的信息</p>
- <span id="example-requests-PUTapi-user">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/user"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "nickname": "用户昵称",
- "avatar": "https:\/\/example.com\/avatar.jpg"
- };
- fetch(url, {
- method: "PUT",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request PUT \
- "http://127.0.0.1/api/user" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"nickname\": \"用户昵称\",
- \"avatar\": \"https:\\/\\/example.com\\/avatar.jpg\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-PUTapi-user">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "修改成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-PUTapi-user" hidden>
- <blockquote>Received response<span
- id="execution-response-status-PUTapi-user"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-PUTapi-user"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-PUTapi-user" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-PUTapi-user">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-PUTapi-user" data-method="PUT"
- data-path="api/user"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('PUTapi-user', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-PUTapi-user"
- onclick="tryItOut('PUTapi-user');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-PUTapi-user"
- onclick="cancelTryOut('PUTapi-user');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-PUTapi-user"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-darkblue">PUT</small>
- <b><code>api/user</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="PUTapi-user"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="PUTapi-user"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>nickname</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="nickname" data-endpoint="PUTapi-user"
- value="用户昵称"
- data-component="body">
- <br>
- <p>用户昵称. Example: <code>用户昵称</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>avatar</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="avatar" data-endpoint="PUTapi-user"
- value="https://example.com/avatar.jpg"
- data-component="body">
- <br>
- <p>用户头像. Example: <code>https://example.com/avatar.jpg</code></p>
- </div>
- </form>
- <h2 id="-GETapi-user-wallet">获取用户钱包</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>获取当前用户的钱包信息</p>
- <span id="example-requests-GETapi-user-wallet">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/user/wallet"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/user/wallet" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-user-wallet">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "获取成功",
- "data": {
- "balance": 100,
- "freeze": 0
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-user-wallet" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-user-wallet"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-user-wallet"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-user-wallet" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-user-wallet">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-user-wallet" data-method="GET"
- data-path="api/user/wallet"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-user-wallet', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-user-wallet"
- onclick="tryItOut('GETapi-user-wallet');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-user-wallet"
- onclick="cancelTryOut('GETapi-user-wallet');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-user-wallet"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/user/wallet</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-user-wallet"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-user-withdraw">用户提现</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>提现用户的余额</p>
- <span id="example-requests-POSTapi-user-withdraw">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/user/withdraw"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "amount": "100.00",
- "type": "wechat",
- "area_code": "330100"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/user/withdraw" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"amount\": \"100.00\",
- \"type\": \"wechat\",
- \"area_code\": \"330100\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-user-withdraw">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "提现成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-user-withdraw" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-user-withdraw"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-user-withdraw"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-user-withdraw" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-user-withdraw">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-user-withdraw" data-method="POST"
- data-path="api/user/withdraw"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-withdraw', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-user-withdraw"
- onclick="tryItOut('POSTapi-user-withdraw');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-user-withdraw"
- onclick="cancelTryOut('POSTapi-user-withdraw');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-user-withdraw"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/user/withdraw</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-user-withdraw"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-user-withdraw"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>amount</code></b>
- <small>decimal</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="amount" data-endpoint="POSTapi-user-withdraw"
- value="100.00"
- data-component="body">
- <br>
- <p>提现金额. Example: <code>100.00</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>type</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="type" data-endpoint="POSTapi-user-withdraw"
- value="wechat"
- data-component="body">
- <br>
- <p>提现方式. Example: <code>wechat</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>area_code</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="area_code" data-endpoint="POSTapi-user-withdraw"
- value="330100"
- data-component="body">
- <br>
- <p>行政区划代码. Example: <code>330100</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-user-apply-coach">申请成为技师</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>申请成为技师</p>
- <span id="example-requests-POSTapi-user-apply-coach">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/user/apply-coach"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "mobile": "13800138000",
- "gender": "male",
- "work_years": "5",
- "intention_city": "杭州"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/user/apply-coach" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"mobile\": \"13800138000\",
- \"gender\": \"male\",
- \"work_years\": \"5\",
- \"intention_city\": \"杭州\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-user-apply-coach">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "申请成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-user-apply-coach" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-user-apply-coach"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-user-apply-coach"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-user-apply-coach" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-user-apply-coach">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-user-apply-coach" data-method="POST"
- data-path="api/user/apply-coach"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-user-apply-coach', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-user-apply-coach"
- onclick="tryItOut('POSTapi-user-apply-coach');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-user-apply-coach"
- onclick="cancelTryOut('POSTapi-user-apply-coach');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-user-apply-coach"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/user/apply-coach</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-user-apply-coach"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-user-apply-coach"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>mobile</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="mobile" data-endpoint="POSTapi-user-apply-coach"
- value="13800138000"
- data-component="body">
- <br>
- <p>手机号. Example: <code>13800138000</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>gender</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="gender" data-endpoint="POSTapi-user-apply-coach"
- value="male"
- data-component="body">
- <br>
- <p>性别. Example: <code>male</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>work_years</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="work_years" data-endpoint="POSTapi-user-apply-coach"
- value="5"
- data-component="body">
- <br>
- <p>工作年限. Example: <code>5</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>intention_city</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="intention_city" data-endpoint="POSTapi-user-apply-coach"
- value="杭州"
- data-component="body">
- <br>
- <p>意向城市. Example: <code>杭州</code></p>
- </div>
- </form>
- <h1 id="">用户端-订单管理</h1>
- <p>订单相关的API接口</p>
- <h2 id="-POSTapi-orders-initialize">订单初始化</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>初始化订单</p>
- <span id="example-requests-POSTapi-orders-initialize">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/orders/initialize"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "coach_id": 1,
- "area_code": "370602",
- "project_id": 1
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/orders/initialize" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"coach_id\": 1,
- \"area_code\": \"370602\",
- \"project_id\": 1
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-orders-initialize">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "status": "success",
- "data": {}
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-orders-initialize" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-orders-initialize"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-orders-initialize"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-orders-initialize" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-orders-initialize">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-orders-initialize" data-method="POST"
- data-path="api/orders/initialize"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-initialize', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-orders-initialize"
- onclick="tryItOut('POSTapi-orders-initialize');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-orders-initialize"
- onclick="cancelTryOut('POSTapi-orders-initialize');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-orders-initialize"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/orders/initialize</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-initialize"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-orders-initialize"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>coach_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="coach_id" data-endpoint="POSTapi-orders-initialize"
- value="1"
- data-component="body">
- <br>
- <p>技师ID. Example: <code>1</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>area_code</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="area_code" data-endpoint="POSTapi-orders-initialize"
- value="370602"
- data-component="body">
- <br>
- <p>区划代码. Example: <code>370602</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>project_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="project_id" data-endpoint="POSTapi-orders-initialize"
- value="1"
- data-component="body">
- <br>
- <p>项目ID. Example: <code>1</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-orders-create">创建订单</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>创建订单</p>
- <span id="example-requests-POSTapi-orders-create">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/orders/create"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "project_id": 1,
- "address_id": 1,
- "coach_id": 6,
- "use_balance": false,
- "service_time": "2024-01-01 10:00:00",
- "order_id": null
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/orders/create" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"project_id\": 1,
- \"address_id\": 1,
- \"coach_id\": 6,
- \"use_balance\": false,
- \"service_time\": \"2024-01-01 10:00:00\",
- \"order_id\": null
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-orders-create">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "status": "success",
- "data": {}
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-orders-create" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-orders-create"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-orders-create"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-orders-create" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-orders-create">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-orders-create" data-method="POST"
- data-path="api/orders/create"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-create', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-orders-create"
- onclick="tryItOut('POSTapi-orders-create');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-orders-create"
- onclick="cancelTryOut('POSTapi-orders-create');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-orders-create"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/orders/create</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-create"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-orders-create"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>project_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="project_id" data-endpoint="POSTapi-orders-create"
- value="1"
- data-component="body">
- <br>
- <p>项目ID. Example: <code>1</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>address_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="address_id" data-endpoint="POSTapi-orders-create"
- value="1"
- data-component="body">
- <br>
- <p>地址ID. Example: <code>1</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>coach_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="coach_id" data-endpoint="POSTapi-orders-create"
- value="6"
- data-component="body">
- <br>
- <p>技师ID. Example: <code>6</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>use_balance</code></b>
- <small>boolean</small>
- <i>optional</i>
- <label data-endpoint="POSTapi-orders-create" style="display: none">
- <input type="radio" name="use_balance"
- value="true"
- data-endpoint="POSTapi-orders-create"
- data-component="body" >
- <code>true</code>
- </label>
- <label data-endpoint="POSTapi-orders-create" style="display: none">
- <input type="radio" name="use_balance"
- value="false"
- data-endpoint="POSTapi-orders-create"
- data-component="body" >
- <code>false</code>
- </label>
- <br>
- <p>使用余额. Example: <code>false</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>service_time</code></b>
- <small>datetime</small>
-
- <input type="text" style="display: none"
- name="service_time" data-endpoint="POSTapi-orders-create"
- value="2024-01-01 10:00:00"
- data-component="body">
- <br>
- <p>服务时间. Example: <code>2024-01-01 10:00:00</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>order_id</code></b>
- <small>integer</small>
- <i>optional</i>
- <input type="number" style="display: none"
- step="any" name="order_id" data-endpoint="POSTapi-orders-create"
- value=""
- data-component="body">
- <br>
- <p>订单ID.</p>
- </div>
- </form>
- <h2 id="-POSTapi-orders-cancel">取消订单</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>取消订单</p>
- <span id="example-requests-POSTapi-orders-cancel">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/orders/cancel"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "order_id": 123
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/orders/cancel" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"order_id\": 123
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-orders-cancel">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "status": "success",
- "data": {}
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-orders-cancel" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-orders-cancel"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-orders-cancel"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-orders-cancel" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-orders-cancel">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-orders-cancel" data-method="POST"
- data-path="api/orders/cancel"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-cancel', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-orders-cancel"
- onclick="tryItOut('POSTapi-orders-cancel');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-orders-cancel"
- onclick="cancelTryOut('POSTapi-orders-cancel');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-orders-cancel"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/orders/cancel</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-cancel"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-orders-cancel"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>order_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="order_id" data-endpoint="POSTapi-orders-cancel"
- value="123"
- data-component="body">
- <br>
- <p>订单ID. Example: <code>123</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-orders-finish">结束订单</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>结束订单</p>
- <span id="example-requests-POSTapi-orders-finish">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/orders/finish"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "order_id": 1
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/orders/finish" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"order_id\": 1
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-orders-finish">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "status": "success",
- "data": {}
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-orders-finish" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-orders-finish"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-orders-finish"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-orders-finish" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-orders-finish">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-orders-finish" data-method="POST"
- data-path="api/orders/finish"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-finish', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-orders-finish"
- onclick="tryItOut('POSTapi-orders-finish');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-orders-finish"
- onclick="cancelTryOut('POSTapi-orders-finish');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-orders-finish"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/orders/finish</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-finish"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-orders-finish"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>order_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="order_id" data-endpoint="POSTapi-orders-finish"
- value="1"
- data-component="body">
- <br>
- <p>订单ID. Example: <code>1</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-orders-confirm-leave">确认技师离开</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>确认技师离开</p>
- <span id="example-requests-POSTapi-orders-confirm-leave">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/orders/confirm-leave"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "order_id": 123
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/orders/confirm-leave" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"order_id\": 123
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-orders-confirm-leave">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "status": "success",
- "data": {}
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-orders-confirm-leave" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-orders-confirm-leave"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-orders-confirm-leave"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-orders-confirm-leave" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-orders-confirm-leave">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-orders-confirm-leave" data-method="POST"
- data-path="api/orders/confirm-leave"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-orders-confirm-leave', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-orders-confirm-leave"
- onclick="tryItOut('POSTapi-orders-confirm-leave');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-orders-confirm-leave"
- onclick="cancelTryOut('POSTapi-orders-confirm-leave');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-orders-confirm-leave"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/orders/confirm-leave</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-orders-confirm-leave"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-orders-confirm-leave"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>order_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="order_id" data-endpoint="POSTapi-orders-confirm-leave"
- value="123"
- data-component="body">
- <br>
- <p>订单ID. Example: <code>123</code></p>
- </div>
- </form>
- <h2 id="-GETapi-orders-list">获取订单列表</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>获取订单列表</p>
- <span id="example-requests-GETapi-orders-list">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/orders/list"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/orders/list" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-orders-list">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "status": "success",
- "data": []
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-orders-list" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-orders-list"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-orders-list"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-orders-list" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-orders-list">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-orders-list" data-method="GET"
- data-path="api/orders/list"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-orders-list', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-orders-list"
- onclick="tryItOut('GETapi-orders-list');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-orders-list"
- onclick="cancelTryOut('GETapi-orders-list');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-orders-list"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/orders/list</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-orders-list"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- </form>
- <h2 id="-GETapi-orders-detail--id-">获取订单详情</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>获取订单详情</p>
- <span id="example-requests-GETapi-orders-detail--id-">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/orders/detail/1"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/orders/detail/1" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-orders-detail--id-">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "status": "success",
- "data": {}
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-orders-detail--id-" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-orders-detail--id-"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-orders-detail--id-"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-orders-detail--id-" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-orders-detail--id-">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-orders-detail--id-" data-method="GET"
- data-path="api/orders/detail/{id}"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-orders-detail--id-', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-orders-detail--id-"
- onclick="tryItOut('GETapi-orders-detail--id-');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-orders-detail--id-"
- onclick="cancelTryOut('GETapi-orders-detail--id-');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-orders-detail--id-"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/orders/detail/{id}</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-orders-detail--id-"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>id</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="id" data-endpoint="GETapi-orders-detail--id-"
- value="1"
- data-component="url">
- <br>
- <p>订单ID. Example: <code>1</code></p>
- </div>
- </form>
- <h1 id="">用户端-项目管理</h1>
- <p>项目相关的API接口</p>
- <h2 id="-GETapi-project">获取项目列表</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>根据区域代码获取项目列表</p>
- <span id="example-requests-GETapi-project">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/project"
- );
- const params = {
- "area_code": "330100",
- "project_cate_id": "1",
- };
- Object.keys(params)
- .forEach(key => url.searchParams.append(key, params[key]));
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/project?area_code=330100&project_cate_id=1" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-project">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "获取成功",
- "data": {
- "current_page": 1,
- "data": [
- {
- "id": 1,
- "name": "项目名称",
- "description": "项目描述",
- "price": "100.00",
- "duration": 60,
- "category": {
- "id": 1,
- "name": "分类名称"
- }
- }
- ],
- "total": 10,
- "per_page": 10
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-project" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-project"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-project"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-project" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-project">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-project" data-method="GET"
- data-path="api/project"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-project', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-project"
- onclick="tryItOut('GETapi-project');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-project"
- onclick="cancelTryOut('GETapi-project');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-project"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/project</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-project"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>area_code</code></b>
- <small>string</small>
- <i>optional</i>
- <input type="text" style="display: none"
- name="area_code" data-endpoint="GETapi-project"
- value="330100"
- data-component="query">
- <br>
- <p>区域代码. Example: <code>330100</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>project_cate_id</code></b>
- <small>integer</small>
- <i>optional</i>
- <input type="number" style="display: none"
- step="any" name="project_cate_id" data-endpoint="GETapi-project"
- value="1"
- data-component="query">
- <br>
- <p>项目分类ID. Example: <code>1</code></p>
- </div>
- </form>
- <h2 id="-GETapi-project--id--detail">获取项目详情</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>获取指定项目的详细信息</p>
- <span id="example-requests-GETapi-project--id--detail">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/project/1/detail"
- );
- const params = {
- "area_code": "330100",
- };
- Object.keys(params)
- .forEach(key => url.searchParams.append(key, params[key]));
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/project/1/detail?area_code=330100" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-project--id--detail">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "获取成功",
- "data": {
- "id": 1,
- "name": "项目名称",
- "description": "项目描述",
- "price": "100.00",
- "duration": 60,
- "category": {
- "id": 1,
- "name": "分类名称"
- },
- "agent": {
- "id": 1,
- "name": "代理商名称",
- "contact": "联系人",
- "mobile": "13800138000"
- }
- }
- }</code>
- </pre>
- <blockquote>
- <p>Example response (400):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 400,
- "message": "该区域暂无代理商"
- }</code>
- </pre>
- <blockquote>
- <p>Example response (404):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 404,
- "message": "项目不存在"
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-project--id--detail" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-project--id--detail"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-project--id--detail"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-project--id--detail" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-project--id--detail">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-project--id--detail" data-method="GET"
- data-path="api/project/{id}/detail"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-project--id--detail', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-project--id--detail"
- onclick="tryItOut('GETapi-project--id--detail');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-project--id--detail"
- onclick="cancelTryOut('GETapi-project--id--detail');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-project--id--detail"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/project/{id}/detail</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-project--id--detail"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="id" data-endpoint="GETapi-project--id--detail"
- value="1"
- data-component="url">
- <br>
- <p>项目ID. Example: <code>1</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>area_code</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="area_code" data-endpoint="GETapi-project--id--detail"
- value="330100"
- data-component="query">
- <br>
- <p>区域代码. Example: <code>330100</code></p>
- </div>
- </form>
- <h2 id="-GETapi-project-coach-list">获取技师项目列表</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>获取指定技师已开通的项目列表</p>
- <span id="example-requests-GETapi-project-coach-list">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/project/coach-list"
- );
- const params = {
- "coach_id": "1",
- "area_code": "330100",
- "project_cate_id": "1",
- };
- Object.keys(params)
- .forEach(key => url.searchParams.append(key, params[key]));
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "GET",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request GET \
- --get "http://127.0.0.1/api/project/coach-list?coach_id=1&area_code=330100&project_cate_id=1" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-GETapi-project-coach-list">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "获取成功",
- "data": {
- "current_page": 1,
- "data": [
- {
- "id": 1,
- "name": "项目名称",
- "description": "项目描述",
- "price": "100.00",
- "duration": 60,
- "category": {
- "id": 1,
- "name": "分类名称"
- }
- }
- ],
- "total": 10,
- "per_page": 10
- }
- }</code>
- </pre>
- <blockquote>
- <p>Example response (404):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 404,
- "message": "技师不存在或未通过认证"
- }</code>
- </pre>
- </span>
- <span id="execution-results-GETapi-project-coach-list" hidden>
- <blockquote>Received response<span
- id="execution-response-status-GETapi-project-coach-list"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-GETapi-project-coach-list"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-GETapi-project-coach-list" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-GETapi-project-coach-list">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-GETapi-project-coach-list" data-method="GET"
- data-path="api/project/coach-list"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('GETapi-project-coach-list', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-GETapi-project-coach-list"
- onclick="tryItOut('GETapi-project-coach-list');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-GETapi-project-coach-list"
- onclick="cancelTryOut('GETapi-project-coach-list');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-GETapi-project-coach-list"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-green">GET</small>
- <b><code>api/project/coach-list</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="GETapi-project-coach-list"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>coach_id</code></b>
- <small>integer</small>
-
- <input type="number" style="display: none"
- step="any" name="coach_id" data-endpoint="GETapi-project-coach-list"
- value="1"
- data-component="query">
- <br>
- <p>技师ID. Example: <code>1</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>area_code</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="area_code" data-endpoint="GETapi-project-coach-list"
- value="330100"
- data-component="query">
- <br>
- <p>区域代码. Example: <code>330100</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>project_cate_id</code></b>
- <small>integer</small>
- <i>optional</i>
- <input type="number" style="display: none"
- step="any" name="project_cate_id" data-endpoint="GETapi-project-coach-list"
- value="1"
- data-component="query">
- <br>
- <p>项目分类ID. Example: <code>1</code></p>
- </div>
- </form>
- <h1 id="">账户管理</h1>
- <p>包含登录、注册、账户管理等基础功能</p>
- <h2 id="-POSTapi-account-send-code">发送验证码</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>向指定手机号发送验证码</p>
- <span id="example-requests-POSTapi-account-send-code">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/account/send-code"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "mobile": "13800138000"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/account/send-code" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"mobile\": \"13800138000\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-account-send-code">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "验证码发送成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-account-send-code" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-account-send-code"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-account-send-code"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-account-send-code" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-account-send-code">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-account-send-code" data-method="POST"
- data-path="api/account/send-code"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-send-code', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-account-send-code"
- onclick="tryItOut('POSTapi-account-send-code');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-account-send-code"
- onclick="cancelTryOut('POSTapi-account-send-code');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-account-send-code"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/account/send-code</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-account-send-code"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-account-send-code"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>mobile</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="mobile" data-endpoint="POSTapi-account-send-code"
- value="13800138000"
- data-component="body">
- <br>
- <p>手机号码. Example: <code>13800138000</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-account-login">用户登录</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>使用手机号和验证码登录账户</p>
- <span id="example-requests-POSTapi-account-login">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/account/login"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "mobile": "13800138000",
- "code": "123456"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/account/login" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"mobile\": \"13800138000\",
- \"code\": \"123456\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-account-login">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "登录成功",
- "data": {
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
- "user": {
- "id": 1,
- "mobile": "13800138000",
- "nickname": "用户昵称"
- }
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-account-login" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-account-login"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-account-login"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-account-login" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-account-login">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-account-login" data-method="POST"
- data-path="api/account/login"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-login', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-account-login"
- onclick="tryItOut('POSTapi-account-login');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-account-login"
- onclick="cancelTryOut('POSTapi-account-login');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-account-login"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/account/login</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-account-login"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-account-login"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>mobile</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="mobile" data-endpoint="POSTapi-account-login"
- value="13800138000"
- data-component="body">
- <br>
- <p>手机号码. Example: <code>13800138000</code></p>
- </div>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>code</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="code" data-endpoint="POSTapi-account-login"
- value="123456"
- data-component="body">
- <br>
- <p>验证码. Example: <code>123456</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-account-wx-login">微信登录</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>使用微信openid登录账户</p>
- <span id="example-requests-POSTapi-account-wx-login">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/account/wx-login"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Content-Type": "application/json",
- "Accept": "application/json",
- };
- let body = {
- "openid": "wx_123456789"
- };
- fetch(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/account/wx-login" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
- --header "Content-Type: application/json" \
- --data "{
- \"openid\": \"wx_123456789\"
- }"
- </code></pre></div>
- </span>
- <span id="example-responses-POSTapi-account-wx-login">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "登录成功",
- "data": {
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
- "user": {
- "id": 1,
- "openid": "wx_123456789",
- "nickname": "微信昵称"
- }
- }
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-account-wx-login" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-account-wx-login"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-account-wx-login"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-account-wx-login" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-account-wx-login">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-account-wx-login" data-method="POST"
- data-path="api/account/wx-login"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-wx-login', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-account-wx-login"
- onclick="tryItOut('POSTapi-account-wx-login');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-account-wx-login"
- onclick="cancelTryOut('POSTapi-account-wx-login');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-account-wx-login"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/account/wx-login</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-account-wx-login"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Content-Type</code></b>
-
-
- <input type="text" style="display: none"
- name="Content-Type" data-endpoint="POSTapi-account-wx-login"
- value="application/json"
- data-component="header">
- <br>
- <p>Example: <code>application/json</code></p>
- </div>
- <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
- <div style=" padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>openid</code></b>
- <small>string</small>
-
- <input type="text" style="display: none"
- name="openid" data-endpoint="POSTapi-account-wx-login"
- value="wx_123456789"
- data-component="body">
- <br>
- <p>微信openid. Example: <code>wx_123456789</code></p>
- </div>
- </form>
- <h2 id="-POSTapi-account-logout">用户退出</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>退出当前账户登录状态</p>
- <span id="example-requests-POSTapi-account-logout">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/account/logout"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "POST",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request POST \
- "http://127.0.0.1/api/account/logout" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-POSTapi-account-logout">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "退出成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-POSTapi-account-logout" hidden>
- <blockquote>Received response<span
- id="execution-response-status-POSTapi-account-logout"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-POSTapi-account-logout"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-POSTapi-account-logout" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-POSTapi-account-logout">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-POSTapi-account-logout" data-method="POST"
- data-path="api/account/logout"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('POSTapi-account-logout', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-POSTapi-account-logout"
- onclick="tryItOut('POSTapi-account-logout');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-POSTapi-account-logout"
- onclick="cancelTryOut('POSTapi-account-logout');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-POSTapi-account-logout"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-black">POST</small>
- <b><code>api/account/logout</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="POSTapi-account-logout"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- </form>
- <h2 id="-DELETEapi-account">用户注销</h2>
- <p>
- <small class="badge badge-darkred">requires authentication</small>
- </p>
- <p>永久注销当前账户</p>
- <span id="example-requests-DELETEapi-account">
- <blockquote>Example request:</blockquote>
- <div class="javascript-example">
- <pre><code class="language-javascript">const url = new URL(
- "http://127.0.0.1/api/account"
- );
- const headers = {
- "Authorization": "Bearer {YOUR_AUTH_KEY}",
- "Accept": "application/json",
- };
- fetch(url, {
- method: "DELETE",
- headers,
- }).then(response => response.json());</code></pre></div>
- <div class="bash-example">
- <pre><code class="language-bash">curl --request DELETE \
- "http://127.0.0.1/api/account" \
- --header "Authorization: Bearer {YOUR_AUTH_KEY}"</code></pre></div>
- </span>
- <span id="example-responses-DELETEapi-account">
- <blockquote>
- <p>Example response (200):</p>
- </blockquote>
- <pre>
- <code class="language-json" style="max-height: 300px;">{
- "code": 200,
- "message": "注销成功",
- "data": null
- }</code>
- </pre>
- </span>
- <span id="execution-results-DELETEapi-account" hidden>
- <blockquote>Received response<span
- id="execution-response-status-DELETEapi-account"></span>:
- </blockquote>
- <pre class="json"><code id="execution-response-content-DELETEapi-account"
- data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
- </span>
- <span id="execution-error-DELETEapi-account" hidden>
- <blockquote>Request failed with error:</blockquote>
- <pre><code id="execution-error-message-DELETEapi-account">
- Tip: Check that you're properly connected to the network.
- If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
- You can check the Dev Tools console for debugging information.</code></pre>
- </span>
- <form id="form-DELETEapi-account" data-method="DELETE"
- data-path="api/account"
- data-authed="1"
- data-hasfiles="0"
- data-isarraybody="0"
- autocomplete="off"
- onsubmit="event.preventDefault(); executeTryOut('DELETEapi-account', this);">
- <h3>
- Request
- <button type="button"
- style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-tryout-DELETEapi-account"
- onclick="tryItOut('DELETEapi-account');">Try it out ⚡
- </button>
- <button type="button"
- style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-canceltryout-DELETEapi-account"
- onclick="cancelTryOut('DELETEapi-account');" hidden>Cancel 🛑
- </button>
- <button type="submit"
- style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
- id="btn-executetryout-DELETEapi-account"
- data-initial-text="Send Request 💥"
- data-loading-text="⏱ Sending..."
- hidden>Send Request 💥
- </button>
- </h3>
- <p>
- <small class="badge badge-red">DELETE</small>
- <b><code>api/account</code></b>
- </p>
- <h4 class="fancy-heading-panel"><b>Headers</b></h4>
- <div style="padding-left: 28px; clear: unset;">
- <b style="line-height: 2;"><code>Authorization</code></b>
-
-
- <input type="text" style="display: none"
- name="Authorization" class="auth-value" data-endpoint="DELETEapi-account"
- value="Bearer {YOUR_AUTH_KEY}"
- data-component="header">
- <br>
- <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p>
- </div>
- </form>
-
-
- </div>
- <div class="dark-box">
- <div class="lang-selector">
- <button type="button" class="lang-button" data-language-name="javascript">javascript</button>
- <button type="button" class="lang-button" data-language-name="bash">bash</button>
- </div>
- </div>
- </div>
- </body>
- <script src="http://127.0.0.1/vendor/scribe/js/tryitout-4.38.0.js"></script>
- <script src="http://127.0.0.1/vendor/scribe/js/theme-default-4.38.0.js"></script>
- <script src="http://127.0.0.1/vendor/scribe/js/my-custom.js"></script>
- <script src="http://127.0.0.1/vendor/scribe/js/custom.js"></script>
- </html>
|