加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
api接口文档.doc 162.74 KB
一键复制 编辑 原始数据 按行查看 历史
Dz 提交于 2022-07-12 17:48 . ZeusAdmin_v1.0.0
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head><meta http-equiv=Content-Type content="text/html; charset=utf-8">
<style type="text/css">
table
{
border-collapse: collapse;
border: none;
width: 100%;
}
td,tr
{
border: solid #CCC 1px;
padding:3px;
font-size:9pt;
}
.codestyle{
word-break: break-all;
mso-highlight:rgb(252, 252, 252);
padding-left: 5px; background-color: rgb(252, 252, 252); border: 1px solid rgb(225, 225, 232);
}
img {
width:100;
}
</style>
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<xml><w:WordDocument><w:View>Print</w:View></xml></head>
<body><h1>1、说明</h1><div style="margin-left:20px;"><h1>zeus系统</h1>
<hr />
<p>版本:v1</p>
<hr />
<p>返回格式:json</p>
<p>{
"code": 200,
"msg": "ok",
"new_token": "",
"data": "返回内容"
}</p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段</th>
<th style="text-align: left;">是否存在</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">一定存在</td>
<td style="text-align: left;">返回码</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">一定存在</td>
<td style="text-align: left;">说明</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">不一定存在</td>
<td style="text-align: left;">返回内容</td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">不一定存在</td>
<td style="text-align: left;">重置token</td>
</tr>
</tbody>
</table>
<hr /></div><h1>2、返回码</h1><div style="margin-left:20px;"><table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th>Code</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>请求成功</td>
</tr>
<tr>
<td>201</td>
<td>添加成功</td>
</tr>
<tr>
<td>202</td>
<td>修改成功</td>
</tr>
<tr>
<td>204</td>
<td>删除成功</td>
</tr>
<tr>
<td>1404</td>
<td>drf异常或主动抛错误</td>
</tr>
<tr>
<td>2404</td>
<td>服务器异常</td>
</tr>
<tr>
<td>1001</td>
<td>验证码错误</td>
</tr>
<tr>
<td>1002</td>
<td>验证码过期</td>
</tr>
<tr>
<td>1101</td>
<td>账号不存在</td>
</tr>
<tr>
<td>1102</td>
<td>登录失败</td>
</tr>
<tr>
<td>1103</td>
<td>账号信息异常</td>
</tr>
<tr>
<td>1104</td>
<td>账号失效或锁定</td>
</tr>
<tr>
<td>1105</td>
<td>旧密码不正确</td>
</tr>
<tr>
<td>1201</td>
<td>token未携带</td>
</tr>
<tr>
<td>1202</td>
<td>token签名过期</td>
</tr>
<tr>
<td>1203</td>
<td>token签名验证失败</td>
</tr>
<tr>
<td>1204</td>
<td>token未知错误</td>
</tr>
</tbody>
</table></div><h1>3、通用api</h1><div style="margin-left:0px;"><h2>3.1、验证码</h2><div style="margin-left:0px;"><h5>简要描述</h5>
<ul>
<li>生成验证码图片</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/captcha/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"data": {
"captcha_id": "c3a39f003cb44bc1db711d32a9ddcaeb4c20d5e7",
"captcha_image": "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAkCAIAAABHZfBIAAAQ6UlEQVR4nLVaa3ATV5a+eluyHlZ3GyMbYxssy4DBNsYIIpOQEAhyQCazMz8S2EoQM7tVpIb5MRXyY7emqJqpqTLZmqohtVObTCGyiQ3DEMJIMZaBmIdBAdlgXjam8UO2bMkP9W09bT0sqffHNU1HMoTs1t5yUe326XPPd973XHhADRiaAQAAAHgYj31+3noZmp9Eichenu1P2jeDLY9hGIqmCIwgB0n0Csdx9EBgRAYjlkan1VE0ZWu3mRpNLBlFUxBCq93aZGxiWWUwoWiKfba12wx6AwDA0moxGU0ERiB6loZ9hhA6nA6D3sDKlrF1Bn8IIWJr3mvmysBn6XAcdzgdiJ2t3bao2rg0AABToymDgIXKklE0xUXIZW5qNCEa814z+hZCiIgtLRb2GdGjvbjfZuNE9EhrVruVCxX9iQfUwDfkQ1pEKgFPzUtgRDQajSfiAACpVCoRS7haz9jMH\/CTQySkYSqVYl9KJJIuR5d5n7l0ealAIAAc23I9wtZu02l1AACb3fbRoY9isdioe\/Qf7f\/48MCHcrmcx+MBjp0zdme38wf9rMGzKclBslJfKWRohlUJ4HgIRVNT01PjnvG+gb40k9bX6Qs1hVgexuc\/cwfuCgQDZ21n79y7k5hPoDcCgSAYCq5dvdbhdIjF4oL8ArFYzBWU9TpTowmFgMlomvHNxOKxnrs9OZKcyelJ\/TI9UtOiKo7FYzO+mamZKQIjAsGAQW+AEBIYkR0+aC8h2g9CiOM42pglaj3Tmpub+\/dzf6cDdK++98C+A2tWrZGIJRniIjn8Af\/QyFA\/2Z8ry8UxXCwST89Mz0Xnrly\/Mu4Z5\/F4217bpinQIENlRCNyWhQCl65eWkIsuXL9ijxXHg6HIQ35Aj7XG1k7p1PpqZmp7t7u8xfOr6pc1aBvuNx1+f1330dpiIsWQmiz2xia4fMwnqXVQg6RHx\/5mGvk+cR8\/fr6y12X+8n+R48f9dztcbldyWQyQ7vZEb5z287Dhw43H2n+\/b\/9vmZtjaZAM+GdOPn1SfeEGwUF+yEDGJPRxADGareiOMdxfNtr2\/oe9\/kD\/qVLlioVSluHDemCjWH0K4Tw5NmTA08GrO3Wnns9p785\/Yf\/+INAIPjzf\/05EokwzLM8zE0cfIZmTEbT8ZbjFKSOHjtKDpIOp8PhdLjcrjv374x7xufn54UiYSKRSCQSXC4MwzAMs9u4mwtVIVdQNLWhdoNBb9jasLX5SPMH730gk8q8U96Hjx5Go1H0YSQSqaupC4aCiUQiV5bbZGxChiUwQiwWz0Xn+Hy+dqU2Ly9vz9t7QFZysrXb4ol4fW19R2eHe8KtWaJRKVVz0bmz356Nx+O993u9k16kWaQXm92GEqEQAKDT6g4fOmxptTQZmyytFgpSkIYAALFY7Jn0FGoKR1wjAACRUMSiSqfT\/oA\/HA6LRCJ1npqrhfraegAAj8fLx\/OxPIz204VLC0dGR3yULxaLAQCSySTDMA6no2+gb\/my5dtf315cVExgBJ\/PT6VSoVDIO+kNBAPSHKk8V44cDYFk\/XP3zt3TvumBJwP9j\/tzJDmmRtP6deu7e7vbL7XffXjX5Xa9+0\/vvrHlDYlEEk\/Evzj5BYK6gJbACKAFzUeaIYTmveajx44GQ8FwJDw7N1uQX5CIJ3AMD4aC\/qA\/GArG4jEI4ezcrGfKc+X6leKi4iZjU0lxCWtbhVyhlCuRXlOpFKRhZDaC8FM0JRKJkqmkd8p7+97ta45rIpHI4XQcPHCwuqoaU2PpdNoz6ZmanuLz+fbv7BvXbwRZyYnAiMhsxB\/wd3R2xGKxLZu3GLcZy0rKVlWsWq1b\/dmJz6Z90ydaTzzof1C\/vt7hdPzyn3+JPuRhPCHLgmX3m3\/9zcjoyJenv5zwTryy8ZV1a9Z99sVn0Vj0a9vXK0pWzM7NHm85HovFCjWFA+RA6fLSV195NVeWC2nIhgdFU2kmTQ6SNrtNmiP1B\/yR2Qifz3dPuO3f2Xe9tasgv0AoEJYuL+UBnmfS8+nnnxq3G3e8vkMsErvcrsR8AlfjifmEP+hHKYetjjiOKxXKyalJ+3d2cpBcXrx8++vbS5eXqpQqpUIpzZEqFcq\/nf3b5euXe+\/3jo2PFeQXIJGsditDM0JWPgAAhPCG88amDZsGngzE4jGdVrfn7T0yqWxN5Zq+gb6thq0nTp4IR8LjnvF4Ij44MhiPxzfVb0qn04AHrHYrACAcCbvGXAq5ovNa58qylQ6nwzvlFfAFywqX9T7oXVG6ghwiDXoDgRHvv\/s+7ae9U15ykHTecZ4+d9o76d1Qu+Hew3uJ+cTm+s316+ttdpsZMyNLWO1WSMP97+33+Xw9d3s6OjtmqJmatTUERoiEIlQXBUJBwZKCxHxiffX6davXVVdVEzjhcDqajE3mfU\/jFmnO4XTotLq66rrb92533exKJpP1NfUV5RWRSESaI0XFw\/im8dTZUx+8+8Gt27euOa5hamzMPRYIBLyTXl257nLX5XAkfMZ65oz1jFgkbrvYJpPK0um0TCbb8caOmrU1Pb095r1mh9Nh3mfGcfzct+fefO3Nhk0NpSWlndc6u77v6r3fO+4ZV6lUNWtrFHIFkk0HdACAJmMTRVOnvjm1cf3Gjs4OClKpVOp+3\/32S+0yqUwqlaZSqWAoaLPbDh44KJPK1HlqTI1FY9HVlatZ5xWCp\/2qqdHko3xnrGei0eiwa3hZ4bKGzQ35eH4sFuPxeWkmLc+VPxl+8rvDv3v0+NEMNZNP5G9cv\/HVV1499c2pfDx\/ZGwkT5U3PDqcTqVRv6Yp0CiVypVlK6vXVI+6RytWVmxt2AohRGoGALyz+x0AQFFu0fz8vEwqu3j54sCTAQpSUqlUIpHk5OTg2ELfhxoG5bSycXvjV6e\/ekQ+ypHklJWUodB4MvRky+Yt\/WS\/WCj+9b\/8Gjk8YIBCrlAqlNyYF3Iz3uzsbNWqqj\/955+YNKOv02tXaHNzc5k0AxgAABCJRHt\/sRdCOPBkwEf51q5au+utXXfu3zHvNfN4PNeY6+ixo4hpk7GJwAk+n1+kKVpZtlKdp965badAKGC7nIw+IRAKOG87f7b7Z\/ce3mu70BaZjZxrO\/fbD3\/L6gUtkUjkGnX1Puj1B\/wV5RWuMdeO13d093YPuYbu99+vqqx6Z\/c7qVRKrVajjhB1MploUSNF0ZQ\/4Hc4HXNzc2UlZQa9gcAJPo8PeCCdTqdSqVxZrkwqezj18NbtW1Kp1LDJUFJcsql+E5\/PR3WydHmpd8qrUCge9D8o1BQSGDHjmykuKp6emU5hKfaQAJ52UaZGEwqir05\/RWBE+YryIk3R8Ohw951uTI3x+XxcjbMSR6NR97j7\/KXzY+NjK0pWhCPh2rW1sVjsj\/\/+xxvOG1dvXHV73Bc6LxTkF0hl0uwzwwJaHsY7fOiwyWiCNPyL5S\/eSa9YJN5cv7mspEwmk\/F4vFQqlZhPMAwjkUimZ6Zv3LrhnnDX1dRVrKyoWFmRk5ODSguEkIKUQq54Y8sboUioydiEYzgAwGZ\/2hgYTSQgAQAobbACocMKgRHqPHVkLlJTVTM4POiecEdmI55Jz+zsLFJQNBq9eOXizZ6boVBoeHR4\/3v7VUoVgRGBUKBSWxmZjVy6culmz03NUg3DMCjm0XbsMugNQoZmHE6Htd067hmnKGrCO6Er14nFYnKInPBOYGpsemZ6PjnPpJlYLEYOkT13e5QKpUQsKS4qlkgkrO6\/afsmGAqiEwl7voU01JXrkLgfH\/kYvTTvNZNDJE7jiKBSW4maGR\/0hSNhhmFSqdQAOXDh8oWqVVUnvz4JAMDVeDqdfjz0mPbTiUQiT5l3\/eb1spIyoVBIYMR8cj4yG6kor0gmk6g45Uhysg3bYGxYyMm6cp1UKqUglXalXWOuz\/\/7c6VCyefzMTVm0BsGyIFkKjnqHu1\/3D\/hnShYUlC7rvYR+cgHfc9QaXU2u00sFrvGXKFICGmXPXxRkMIxnBwiCYyw2q2V2kqKptimjV3JZNIf9EMI0+n0+YvnnbedYrFYIBCYGk18Hr+jsyMcDvson0gkKi8rHxsf+9X7vyouKl7UabNX85FmHlCDw4cOMwwzF52DNIQ0dHvcbCnXrtAGggEKUoFgQCgUSiSScDhcUlwiz5XL5XLaT7O8\/AF\/PB6Hfrj99e2FSws7OjuQM0N6YZqR8cx18oVAoCnkzwKBAPqhQq7Y\/97++tr60uWlGIZJxBLvpPeq42rbhbbJ6cm5ubmd23a+\/dbbtWtrVUqVUCh8GcA81LJyX0EaHm85DgAw7zNjedjQyNAXp77ovd8rEAiUCmVNVU0oHGrc0cjKisQNBAIAgNKSUu0KLQBALBaDrCN4xjNyeKSF4y3HkZ13vbXL4\/XYO+0qhcq8z9y4vTGRSCDVJ+IJ6IfDruGum13fO79PppKV2kqT0bShZsPSgqUyqYwVht0lA+3CqYD7Z+TYaAN1njpPlXf95vW+gb5kMllRXtHU2LRm1ZpzbeeajzSz2qEgZWm14Bh+YN8BZDfWRdGviy7UZiDkbHj\/9cu\/BoIBTYFGnitXKVXOO85LVy8RGPHRoY\/EEnF3b\/e2V7et1q3WFGjaOtoctxyuMdeet\/f83PTz4mXFQsGChVEF4hoDoeMxDEMOkla7FW2cIRDDMBPeCUuL5duOb+eT87t37t73i30qlUokEnG1Y2mxVGorUTOAdJc9o8tYi1qAoilykESnMYZhrHYrOUjyeDyT0cTyx3FcKVcOuYY+\/fzTVCo1MjpSVFh08MDBuuo6oVDI7agXjPF0Itd8pJnHMMzRY0ebjE0ZAyskBwWpcCTsmfT0P+6fmp7a2rC1uqpapVRxC3dGCc1m8jzbvlgLEEJLq0VXrnN0O1g+JuOzo59UKp2cnpyanmIYprqqurioGKG1tFgQHACApcVi0BtsdpvJaGowNixMWEHWWIydTtnabXU1dRKJJJlMago0KqUqEAosapb\/I7xFZ7HIMiwNt3oDAJLJpEKuwDF86ZKlYrGYrfzIVVHmO3rs6OFDhwEABr2Bhw7iz8sl5CBJ0RSk4ePBx+a9ZgInwE\/xUnYtSrmoU7xAF2zq5sIGHIOz42h2eGq1Ww16A5sgnqHNBoA+s7RaAADZs1nwfNuy3MDzx9zspuxM\/OVpWNgoF1rtVq6fAwAgvTDfQ8kPpZIfoF0UwCfHPjHoDTiG67S6F0z9wQ9NtKhtF50kg6dd+gvQgufbH0UpunAATw2OUh0CD2lo3mtmiw6PO1LKhsHedGQLlGHAF5sIPN\/\/fzQuQJYxuCENnt6\/kIMkOURSkKJoCsHGMZzACdTMoGKxUIEA586GC4ONE9b1wQ9bHzbRvwDnohKzi3u3BH4s5jMG0RlVwNJiAQCgJKwr16Esw\/ZOzyoQACADDKJATFnzZvDNLtH\/i8ycYVu2hKDdn3erhmb92cGMKNFfkfCsVAsVKMO24Ie5ga0B2Ulv0Ss5bvXikmUgzOgBMoReNHy4tfRHtZnt\/AtZ6nn5A3DyPmoMF+23MhByP7S0WFCeyJDvBd4Bnvo2N5dmKGhROV8MHq2FK6yMCw40UmFZoPso9tSK7hq4AYaurdguhdWRQW8w6A2WVgvrY+xi7we4KkA\/6N6UwIgMqdDtCQsebcHSZEu1OFokFmokFqU27zPrtDpuEeLKgeDhOM7dGHmjTqvTletwDM8QBdFz3TiDLcqR6F9UUchBkq00SGZLi4WiKZYGQvjJsU9YpS+6FirQ\/+t\/B3j5Ny\/gBgB48ecvA+F\/AMGFPhDHdqTuAAAAAElFTkSuQmCC"
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">captcha_id</td>
<td style="text-align: left;">string</td>
<td>验证码id</td>
</tr>
<tr>
<td style="text-align: left;">captcha_image</td>
<td style="text-align: left;">string</td>
<td>验证码图片</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>登录时提交captcha_id和验证码给后端进行比对</p></div></div><h1>4、管理后台api</h1><div style="margin-left:0px;"><h2>4.1、系统管理</h2><div style="margin-left:0px;"><h3>4.1.1、七牛云存储接口</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取上传token接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/qiniu_token/admin/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"data": {
"token": "Y678TLiHlc4KTCD5_xU0-nY0x2R1Rdd5tF6F-kcM:AGMY92_lfdsewoH-5UTh1l6pSDM=:eyJzY29wZSI6InpldXM1NiIsImRlYWRsaW5lIjoxNjU2NzkxNzQ5fQ=="
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;">string</td>
<td>七牛云上传token</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>登录时提交captcha_id和验证码给后端进行比对</p></div><h2>4.1.1、系统接口</h2><div style="margin-left:0px;"><h3>4.1.1.1、SEO信息获取</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取SEO信息接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/config/info/seo/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"data": {
"title": "宙斯科技",
"logo": "",
"keywords": "",
"description": ""
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">string</td>
<td>seo标题</td>
</tr>
<tr>
<td style="text-align: left;">logo</td>
<td style="text-align: left;">string</td>
<td>logo</td>
</tr>
<tr>
<td style="text-align: left;">keywords</td>
<td style="text-align: left;">string</td>
<td>keywords</td>
</tr>
<tr>
<td style="text-align: left;">description</td>
<td style="text-align: left;">string</td>
<td>keywords</td>
</tr>
</tbody>
</table></div><h3>4.1.1.2、SEO信息修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>修改SEO信息接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/config/set/seo/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"title": "宙斯科技",
"logo": "",
"keywords": "啊啊啊啊顶顶顶1",
"description": "aaa"
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>站点标题</td>
</tr>
<tr>
<td style="text-align: left;">logo</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>logo</td>
</tr>
<tr>
<td style="text-align: left;">keywords</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>keywords</td>
</tr>
<tr>
<td style="text-align: left;">description</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>description</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok",
"data": {
"title": "宙斯科技",
"logo": "",
"keywords": "啊啊啊啊顶顶顶",
"description": "aaa"
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回202,修改成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回修改的数据</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">string</td>
<td>站点标题</td>
</tr>
<tr>
<td style="text-align: left;">logo</td>
<td style="text-align: left;">string</td>
<td>logo</td>
</tr>
<tr>
<td style="text-align: left;">keywords</td>
<td style="text-align: left;">string</td>
<td>keywords</td>
</tr>
<tr>
<td style="text-align: left;">description</td>
<td style="text-align: left;">string</td>
<td>description</td>
</tr>
</tbody>
</table></div><h3>4.1.1.3、站点信息获取</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取站点信息接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/config/info/site/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"data": {
"name": "宙斯科技",
"state": true,
"stop_info": ""
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>站点名称</td>
</tr>
<tr>
<td style="text-align: left;">state</td>
<td style="text-align: left;">boolean</td>
<td>站点状态</td>
</tr>
<tr>
<td style="text-align: left;">stop_info</td>
<td style="text-align: left;">string</td>
<td>站点关闭说明</td>
</tr>
</tbody>
</table></div><h3>4.1.1.4、站点信息修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>修改站点信息接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/config/set/site/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "宙斯科技",
"state": true,
"stop_info": "啊啊啊啊顶顶顶"
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>站点名称</td>
</tr>
<tr>
<td style="text-align: left;">state</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>站点状态</td>
</tr>
<tr>
<td style="text-align: left;">stop_info</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>站点关闭说明</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok",
"data": {
"name": "宙斯科技",
"state": true,
"stop_info": "啊啊啊啊顶顶顶"
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回202,修改成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回修改的数据</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>站点名称</td>
</tr>
<tr>
<td style="text-align: left;">state</td>
<td style="text-align: left;">boolean</td>
<td>站点状态</td>
</tr>
<tr>
<td style="text-align: left;">stop_info</td>
<td style="text-align: left;">string</td>
<td>站点关闭说明</td>
</tr>
</tbody>
</table></div></div><h2>4.1.2、菜单权限</h2><div style="margin-left:0px;"><h3>4.1.2.1、管理员菜单</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取管理员菜单权限</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/menu/backstage/get_admin_menu/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>JWT</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"data": {
"auth": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20"
],
"menu_list": [
{
"path": "\/sys",
"name": "sys",
"component": "Layout",
"meta": {
"id": 1,
"title": "系统管理",
"icon": "Setting",
"pid": 0,
"is_menu": true
},
"children": [
{
"path": "\/seo",
"name": "seo",
"component": "\/sys\/set\/SeoSet",
"meta": {
"id": 2,
"title": "SEO设置",
"icon": "Promotion",
"pid": 1,
"is_menu": true
}
},
{
"path": "\/menu",
"name": "menu",
"component": "\/sys\/menu\/MenuList",
"meta": {
"id": 16,
"title": "菜单权限",
"icon": "Menu",
"pid": 1,
"is_menu": true
}
}
]
},
{
"path": "\/staff",
"name": "staff",
"component": "Layout",
"meta": {
"id": 3,
"title": "人事管理",
"icon": "Avatar",
"pid": 0,
"is_menu": true
},
"children": [
{
"path": "\/department",
"name": "department",
"component": "\/staff\/department\/DeptList",
"meta": {
"id": 4,
"title": "部门管理",
"icon": "OfficeBuilding",
"pid": 3,
"is_menu": true
}
},
{
"path": "\/role",
"name": "role",
"component": "\/staff\/role\/RoleList",
"meta": {
"id": 8,
"title": "角色管理",
"icon": "UserFilled",
"pid": 3,
"is_menu": true
}
},
{
"path": "\/admins",
"name": "admins",
"component": "\/staff\/admins\/AdminList",
"meta": {
"id": 12,
"title": "员工管理",
"icon": "User",
"pid": 3,
"is_menu": true
}
}
]
}
]
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">int</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">auth</td>
<td style="text-align: left;">array</td>
<td>管理员权限</td>
</tr>
<tr>
<td style="text-align: left;">menu_list</td>
<td style="text-align: left;">array</td>
<td>菜单列表</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.path</td>
<td style="text-align: left;">string</td>
<td>前端路由地址</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.name</td>
<td style="text-align: left;">string</td>
<td>菜单名称</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.component</td>
<td style="text-align: left;">string</td>
<td>前端模块</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.meta</td>
<td style="text-align: left;">object</td>
<td>菜单信息</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.meta.id</td>
<td style="text-align: left;">int</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.meta.title</td>
<td style="text-align: left;">string</td>
<td>标题</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.meta.icon</td>
<td style="text-align: left;">string</td>
<td>图标</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.meta.pid</td>
<td style="text-align: left;">int</td>
<td>父id</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.meta.is_menu</td>
<td style="text-align: left;">boolean</td>
<td>是否菜单显示</td>
</tr>
<tr>
<td style="text-align: left;">menu_list.children</td>
<td style="text-align: left;">array</td>
<td>子菜单</td>
</tr>
</tbody>
</table></div><h3>4.1.2.2、菜单列表</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取所有菜单</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/menu/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>JWT</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NjY4MTc2MH0.TlrpjIWA8-WhbaqV0pEHmY5dKwHssa0oTlq-gHIR-jw",
"data": [
{
"id": 1,
"name": "sys",
"path": "\/sys",
"component": "Layout",
"title": "系统管理",
"icon": "Setting",
"ord": 99,
"urls": "",
"method": "",
"is_route": true,
"is_menu": true,
"pid": 0,
"value": 1,
"label": "系统管理",
"children": [
{
"id": 2,
"name": "seo",
"path": "\/seo",
"component": "\/sys\/set\/SeoSet",
"title": "SEO设置",
"icon": "Promotion",
"ord": 98,
"urls": "^\/api\/config\/info\/seo\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 1,
"value": 2,
"label": "SEO设置",
"children": [
{
"id": 107,
"name": "",
"path": "",
"component": "",
"title": "SEO修改",
"icon": "",
"ord": 0,
"urls": "^\/api\/config\/set\/seo\/$",
"method": "POST",
"is_route": false,
"is_menu": false,
"pid": 2,
"value": 107,
"label": "SEO修改"
}
]
},
{
"id": 16,
"name": "menu",
"path": "\/menu",
"component": "\/sys\/menu\/MenuList",
"title": "菜单权限",
"icon": "Menu",
"ord": 97,
"urls": "^\/api\/menu\/backstage\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 1,
"value": 16,
"label": "菜单权限",
"children": [
{
"id": 19,
"name": "",
"path": "",
"component": "",
"title": "删除菜单",
"icon": "",
"ord": 0,
"urls": "^\/api\/menu\/backstage\/(0|[1-9][0-9]*)\/$",
"method": "DELETE",
"is_route": false,
"is_menu": false,
"pid": 16,
"value": 19,
"label": "删除菜单"
},
{
"id": 18,
"name": "",
"path": "",
"component": "",
"title": "修改菜单",
"icon": "",
"ord": 0,
"urls": "^\/api\/menu\/backstage\/(0|[1-9][0-9]*)\/$",
"method": "PUT",
"is_route": false,
"is_menu": false,
"pid": 16,
"value": 18,
"label": "修改菜单"
},
{
"id": 17,
"name": "",
"path": "",
"component": "",
"title": "新增菜单",
"icon": "",
"ord": 0,
"urls": "^\/api\/menu\/backstage\/$",
"method": "POST",
"is_route": false,
"is_menu": false,
"pid": 16,
"value": 17,
"label": "新增菜单"
}
]
}
]
},
{
"id": 3,
"name": "staff",
"path": "\/staff",
"component": "Layout",
"title": "人事管理",
"icon": "Avatar",
"ord": 89,
"urls": "",
"method": "",
"is_route": true,
"is_menu": true,
"pid": 0,
"value": 3,
"label": "人事管理",
"children": [
{
"id": 4,
"name": "department",
"path": "\/department",
"component": "\/staff\/department\/DeptList",
"title": "部门管理",
"icon": "OfficeBuilding",
"ord": 88,
"urls": "^\/api\/department\/backstage\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 3,
"value": 4,
"label": "部门管理",
"children": [
{
"id": 7,
"name": "",
"path": "",
"component": "",
"title": "删除部门",
"icon": "",
"ord": 0,
"urls": "^\/api\/department\/backstage\/(0|[1-9][0-9]*)\/$",
"method": "DELETE",
"is_route": false,
"is_menu": false,
"pid": 4,
"value": 7,
"label": "删除部门"
},
{
"id": 6,
"name": "",
"path": "",
"component": "",
"title": "修改部门",
"icon": "",
"ord": 0,
"urls": "^\/api\/department\/backstage\/(0|[1-9][0-9]*)\/$",
"method": "PUT",
"is_route": false,
"is_menu": false,
"pid": 4,
"value": 6,
"label": "修改部门"
},
{
"id": 5,
"name": "",
"path": "",
"component": "",
"title": "新增部门",
"icon": "",
"ord": 0,
"urls": "^\/api\/department\/backstage\/$",
"method": "POST",
"is_route": false,
"is_menu": false,
"pid": 4,
"value": 5,
"label": "新增部门"
}
]
},
{
"id": 8,
"name": "role",
"path": "\/role",
"component": "\/staff\/role\/RoleList",
"title": "角色管理",
"icon": "UserFilled",
"ord": 87,
"urls": "^\/api\/role\/backstage\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 3,
"value": 8,
"label": "角色管理",
"children": [
{
"id": 11,
"name": "",
"path": "",
"component": "",
"title": "删除角色",
"icon": "",
"ord": 0,
"urls": "^\/api\/role\/backstage\/(0|[1-9][0-9]*)\/$",
"method": "DELETE",
"is_route": false,
"is_menu": false,
"pid": 8,
"value": 11,
"label": "删除角色"
},
{
"id": 10,
"name": "",
"path": "",
"component": "",
"title": "修改角色",
"icon": "",
"ord": 0,
"urls": "^\/api\/role\/backstage\/(0|[1-9][0-9]*)\/$",
"method": "PUT",
"is_route": false,
"is_menu": false,
"pid": 8,
"value": 10,
"label": "修改角色"
},
{
"id": 9,
"name": "",
"path": "",
"component": "",
"title": "新增角色",
"icon": "",
"ord": 0,
"urls": "^\/api\/role\/backstage\/$",
"method": "POST",
"is_route": false,
"is_menu": false,
"pid": 8,
"value": 9,
"label": "新增角色"
}
]
},
{
"id": 12,
"name": "admins",
"path": "\/admins",
"component": "\/staff\/admins\/AdminsList",
"title": "员工管理",
"icon": "User",
"ord": 86,
"urls": "^\/api\/admins\/backstage\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 3,
"value": 12,
"label": "员工管理",
"children": [
{
"id": 15,
"name": "",
"path": "",
"component": "",
"title": "删除员工",
"icon": "",
"ord": 0,
"urls": "^\/api\/admins\/backstage\/(0|[1-9][0-9]*)\/$",
"method": "DELETE",
"is_route": false,
"is_menu": false,
"pid": 12,
"value": 15,
"label": "删除员工"
},
{
"id": 14,
"name": "",
"path": "",
"component": "",
"title": "修改员工",
"icon": "",
"ord": 0,
"urls": "^\/api\/admins\/backstage\/(0|[1-9][0-9]*)\/$",
"method": "PUT",
"is_route": false,
"is_menu": false,
"pid": 12,
"value": 14,
"label": "修改员工"
},
{
"id": 13,
"name": "",
"path": "",
"component": "",
"title": "新增员工",
"icon": "",
"ord": 0,
"urls": "^\/api\/admins\/backstage\/$",
"method": "POST",
"is_route": false,
"is_menu": false,
"pid": 12,
"value": 13,
"label": "新增员工"
}
]
}
]
},
{
"id": 22,
"name": "article",
"path": "\/article",
"component": "Layout",
"title": "文章管理",
"icon": "Document",
"ord": 0,
"urls": "",
"method": "",
"is_route": true,
"is_menu": true,
"pid": 0,
"value": 22,
"label": "文章管理",
"children": [
{
"id": 24,
"name": "articleAdd",
"path": "\/article\/article_add",
"component": "\/article\/ArticleList",
"title": "添加文章",
"icon": "DocumentAdd",
"ord": 9,
"urls": "",
"method": "",
"is_route": true,
"is_menu": true,
"pid": 22,
"value": 24,
"label": "添加文章"
},
{
"id": 108,
"name": "articleSort",
"path": "\/article\/sort",
"component": "\/article\/sort\/SortList",
"title": "文章分类",
"icon": "Files",
"ord": 0,
"urls": "^\/api\/sort\/backstage\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 22,
"value": 108,
"label": "文章分类"
},
{
"id": 74,
"name": "",
"path": "",
"component": "",
"title": "获取文章信息",
"icon": "",
"ord": 0,
"urls": "^\/api\/article\/$",
"method": "GET",
"is_route": false,
"is_menu": true,
"pid": 22,
"value": 74,
"label": "获取文章信息"
},
{
"id": 25,
"name": "",
"path": "",
"component": "",
"title": "修改文章",
"icon": "",
"ord": 0,
"urls": "",
"method": "",
"is_route": false,
"is_menu": false,
"pid": 22,
"value": 25,
"label": "修改文章"
},
{
"id": 23,
"name": "articleList",
"path": "\/article\/article_list",
"component": "\/article\/ArticleList",
"title": "文章列表",
"icon": "Document",
"ord": 0,
"urls": "",
"method": "",
"is_route": true,
"is_menu": true,
"pid": 22,
"value": 23,
"label": "文章列表"
}
]
}
]
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">array</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>路由名称</td>
</tr>
<tr>
<td style="text-align: left;">path</td>
<td style="text-align: left;">string</td>
<td>路由地址</td>
</tr>
<tr>
<td style="text-align: left;">component</td>
<td style="text-align: left;">string</td>
<td>模块</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">string</td>
<td>菜单标题</td>
</tr>
<tr>
<td style="text-align: left;">icon</td>
<td style="text-align: left;">string</td>
<td>图标</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">number</td>
<td>排序</td>
</tr>
<tr>
<td style="text-align: left;">urls</td>
<td style="text-align: left;">string</td>
<td>api正则匹配规则</td>
</tr>
<tr>
<td style="text-align: left;">method</td>
<td style="text-align: left;">object</td>
<td>请求方式</td>
</tr>
<tr>
<td style="text-align: left;">is_route</td>
<td style="text-align: left;">boolean</td>
<td>是否前端路由</td>
</tr>
<tr>
<td style="text-align: left;">is_menu</td>
<td style="text-align: left;">boolean</td>
<td>是否后台菜单</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">number</td>
<td>父id</td>
</tr>
<tr>
<td style="text-align: left;">value</td>
<td style="text-align: left;">number</td>
<td>父级下拉框值,与id一致</td>
</tr>
<tr>
<td style="text-align: left;">label</td>
<td style="text-align: left;">string</td>
<td>父级下拉框名称,与title一致</td>
</tr>
<tr>
<td style="text-align: left;">children</td>
<td style="text-align: left;">string</td>
<td>子菜单</td>
</tr>
</tbody>
</table></div><h3>4.1.2.3、菜单添加</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>添加菜单接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/menu/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>JWT</td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "box",
"path": "\/box",
"component": "\/box\/Box",
"title": "菜单标题",
"icon": "Box",
"ord": 0,
"urls": "^\/api\/admins\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 0
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>路由名称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">path</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>前端路由地址 max_length=255</td>
</tr>
<tr>
<td style="text-align: left;">component</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>模块 max_length=255</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>菜单标题 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">icon</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>图标 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>排序 默认0</td>
</tr>
<tr>
<td style="text-align: left;">urls</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>api正则匹配地址 max_length=255</td>
</tr>
<tr>
<td style="text-align: left;">method</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>请求方式 GET/POST/PUT/DELETE</td>
</tr>
<tr>
<td style="text-align: left;">is_route</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否路由 默认False</td>
</tr>
<tr>
<td style="text-align: left;">is_menu</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否后台菜单 默认False</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>父id 0为顶级</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 201,
"msg": "ok",
"data": {
"id": 26,
"name": "box",
"path": "\/box",
"component": "\/box\/Box",
"title": "菜单标题",
"icon": "Box",
"ord": 0,
"urls": "^\/api\/admins\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 0
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回201,添加成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回添加的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>路由名称</td>
</tr>
<tr>
<td style="text-align: left;">path</td>
<td style="text-align: left;">string</td>
<td>路由地址</td>
</tr>
<tr>
<td style="text-align: left;">component</td>
<td style="text-align: left;">string</td>
<td>模块</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">string</td>
<td>菜单标题</td>
</tr>
<tr>
<td style="text-align: left;">icon</td>
<td style="text-align: left;">string</td>
<td>图标</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">number</td>
<td>排序</td>
</tr>
<tr>
<td style="text-align: left;">urls</td>
<td style="text-align: left;">string</td>
<td>api正则匹配规则</td>
</tr>
<tr>
<td style="text-align: left;">method</td>
<td style="text-align: left;">object</td>
<td>请求方式</td>
</tr>
<tr>
<td style="text-align: left;">is_route</td>
<td style="text-align: left;">boolean</td>
<td>是否前端路由</td>
</tr>
<tr>
<td style="text-align: left;">is_menu</td>
<td style="text-align: left;">boolean</td>
<td>是否后台菜单</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">number</td>
<td>父id</td>
</tr>
</tbody>
</table></div><h3>4.1.2.4、菜单修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>修改菜单接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/menu/backstage/26/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>put</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>JWT</td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "box1",
"path": "\/box",
"component": "\/box\/Box",
"title": "菜单标题",
"icon": "Box",
"ord": 0,
"urls": "^\/api\/admins\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 0
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>路由名称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">path</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>前端路由地址 max_length=255</td>
</tr>
<tr>
<td style="text-align: left;">component</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>模块 max_length=255</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>菜单标题 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">icon</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>图标 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>排序 默认0</td>
</tr>
<tr>
<td style="text-align: left;">urls</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>api正则匹配地址 max_length=255</td>
</tr>
<tr>
<td style="text-align: left;">method</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>请求方式 GET/POST/PUT/DELETE</td>
</tr>
<tr>
<td style="text-align: left;">is_route</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否路由 默认False</td>
</tr>
<tr>
<td style="text-align: left;">is_menu</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否后台菜单 默认False</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>父id 0为顶级</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok",
"data": {
"id": 26,
"name": "box1",
"path": "\/box",
"component": "\/box\/Box",
"title": "菜单标题",
"icon": "Box",
"ord": 0,
"urls": "^\/api\/admins\/$",
"method": "GET",
"is_route": true,
"is_menu": true,
"pid": 0
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回202,修改成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回修改的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>路由名称</td>
</tr>
<tr>
<td style="text-align: left;">path</td>
<td style="text-align: left;">string</td>
<td>路由地址</td>
</tr>
<tr>
<td style="text-align: left;">component</td>
<td style="text-align: left;">string</td>
<td>模块</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">string</td>
<td>菜单标题</td>
</tr>
<tr>
<td style="text-align: left;">icon</td>
<td style="text-align: left;">string</td>
<td>图标</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">number</td>
<td>排序</td>
</tr>
<tr>
<td style="text-align: left;">urls</td>
<td style="text-align: left;">string</td>
<td>api正则匹配规则</td>
</tr>
<tr>
<td style="text-align: left;">method</td>
<td style="text-align: left;">object</td>
<td>请求方式</td>
</tr>
<tr>
<td style="text-align: left;">is_route</td>
<td style="text-align: left;">boolean</td>
<td>是否前端路由</td>
</tr>
<tr>
<td style="text-align: left;">is_menu</td>
<td style="text-align: left;">boolean</td>
<td>是否后台菜单</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">number</td>
<td>父id</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/config/admin_menu/[id]/</p></div><h3>4.1.2.5、菜单删除</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>删除菜单接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/menu/backstage/100/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>delete</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>JWT</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 204,
"msg": "ok",
"data": 100
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">string</td>
<td>返回204,删除成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">string</td>
<td>删除数据的id</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/config/admin_menu/[id]/</p></div></div></div><h2>4.2、文章管理</h2><div style="margin-left:0px;"><h2>4.2.1、分类</h2><div style="margin-left:0px;"><h3>4.2.1.1、文章分类列表</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取文章分类列表</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/sort/backstage/article/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NjY4NzIyN30.aZDP7LLgkUfd7X5Ldccf0toQT5ydLenW8xDZ0ZkECOc",
"data": [
{
"id": 11,
"name": "啊啊啊666",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true,
"value": 11,
"label": "啊啊啊666"
},
{
"id": 10,
"name": "啊啊啊222",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true,
"value": 10,
"label": "啊啊啊222"
},
{
"id": 9,
"name": "啊啊啊",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true,
"value": 9,
"label": "啊啊啊"
},
{
"id": 8,
"name": "啊啊啊",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true,
"value": 8,
"label": "啊啊啊"
},
{
"id": 5,
"name": "啊啊啊",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true,
"value": 5,
"label": "啊啊啊"
},
{
"id": 4,
"name": "啊啊啊",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true,
"value": 4,
"label": "啊啊啊"
},
{
"id": 3,
"name": "啊啊啊",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true,
"value": 3,
"label": "啊啊啊"
},
{
"id": 1,
"name": "公司资讯",
"ord": 0,
"pid": 0,
"is_active": true,
"is_choice": true,
"value": 1,
"label": "公司资讯",
"children": [
{
"id": 2,
"name": "公告",
"ord": 0,
"pid": 1,
"is_active": true,
"is_choice": true,
"value": 2,
"label": "公告"
}
]
}
]
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">array</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>分类id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>分类名称</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">number</td>
<td>排序</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">number</td>
<td>父id</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;">boolean</td>
<td>是否启用 0禁用 1启用</td>
</tr>
<tr>
<td style="text-align: left;">is_choice</td>
<td style="text-align: left;">string</td>
<td>是否允许选择 0禁止 1允许</td>
</tr>
<tr>
<td style="text-align: left;">value</td>
<td style="text-align: left;">number</td>
<td>父级下拉框值,与id一致</td>
</tr>
<tr>
<td style="text-align: left;">label</td>
<td style="text-align: left;">string</td>
<td>父级下拉框名称,与title一致</td>
</tr>
<tr>
<td style="text-align: left;">children</td>
<td style="text-align: left;">array</td>
<td>子分类</td>
</tr>
</tbody>
</table></div><h3>4.2.1.2、文章分类添加</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>添加文章分类接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/sort/backstage/article/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "啊啊77",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>分类名称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>排序 默认0</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>父id 0为顶级</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否启用 0禁止 1允许</td>
</tr>
<tr>
<td style="text-align: left;">is_choice</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否允许选择 0禁止 1允许</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 201,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NjY4NzQ0MX0.HHfFPb5LW7fLvuG9eE1jfGKEoJDyYuC0Nco6QaLT-wE",
"data": {
"id": 12,
"name": "啊啊77",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回201,添加成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回添加的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>分类id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>分类名称</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">number</td>
<td>排序</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">number</td>
<td>父id</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;">boolean</td>
<td>是否启用 0禁用 1启用</td>
</tr>
<tr>
<td style="text-align: left;">is_choice</td>
<td style="text-align: left;">boolean</td>
<td>是否允许选择 0禁止 1允许</td>
</tr>
</tbody>
</table></div><h3>4.2.1.3、文章分类修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>修改文章分类接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/sort/backstage/article/10/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>put</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "啊啊77",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>分类名称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>排序 默认0</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>父id 0为顶级</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否启用 0禁止 1允许</td>
</tr>
<tr>
<td style="text-align: left;">is_choice</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否允许选择 0禁止 1允许</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NjY4NzgzNH0.TsLVa1-G0BpKYlMmPELLfCTMhGEa6SZQHHkpQ3n9TVc",
"data": {
"id": 10,
"name": "啊啊77",
"ord": 0,
"pid": 0,
"is_active": false,
"is_choice": true
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回202,修改成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回修改的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>分类id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>分类名称</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">number</td>
<td>排序</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">number</td>
<td>父id</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;">boolean</td>
<td>是否启用 0禁用 1启用</td>
</tr>
<tr>
<td style="text-align: left;">is_choice</td>
<td style="text-align: left;">boolean</td>
<td>是否允许选择 0禁止 1允许</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/sort/backstage/article/[id]/</p></div><h3>4.2.1.4、文章分类删除</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>删除文章分类接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/sort/backstage/article/10/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>delete</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 204,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NjY4ODAxOH0.5nYK8--aNddQt7h81IDPjRVtO-ok614YlLozcqcUoNI",
"data": 10
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回204,删除成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回删除的id</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/sort/backstage/article/[id]/</p></div></div><h2>4.2.2、文章</h2><div style="margin-left:0px;"><h3>4.2.2.1、文章列表</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取文章列表</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/article/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求Query参数</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">page</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>第几页</td>
</tr>
<tr>
<td style="text-align: left;">size</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>每页多少条,默认20条,最多100条</td>
</tr>
<tr>
<td style="text-align: left;">sort</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>精确搜索,文章分类id</td>
</tr>
<tr>
<td style="text-align: left;">admin</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>精确搜索,管理员id</td>
</tr>
<tr>
<td style="text-align: left;">search</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>模糊搜索,文章标题</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1Njc4MzI3OX0.dFLd3ZERwXmMXEn9CTfOlFF_BpFInE4ZnN6fMCa7ifM",
"data": {
"count": 13,
"next": "http:\/\/127.0.0.1:8000\/api\/article\/backstage\/?admin=1&page=2&search=%E6%96%87%E7%AB%A0&size=10&sort=2",
"previous": null,
"results": [
{
"id": 13,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 12,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 11,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 10,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 9,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 8,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 7,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 6,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 5,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
},
{
"id": 4,
"title": "文章1",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": "公告",
"admin": "张三"
}
]
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">count</td>
<td style="text-align: left;">number</td>
<td>记录总条数</td>
</tr>
<tr>
<td style="text-align: left;">next</td>
<td style="text-align: left;">string</td>
<td>下一页url</td>
</tr>
<tr>
<td style="text-align: left;">previous</td>
<td style="text-align: left;">string</td>
<td>上一页url</td>
</tr>
<tr>
<td style="text-align: left;">results</td>
<td style="text-align: left;">array</td>
<td>数据</td>
</tr>
<tr>
<td style="text-align: left;">results.id</td>
<td style="text-align: left;">string</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">results.title</td>
<td style="text-align: left;">string</td>
<td>文章标题</td>
</tr>
<tr>
<td style="text-align: left;">results.pic</td>
<td style="text-align: left;">string</td>
<td>封面图片地址</td>
</tr>
<tr>
<td style="text-align: left;">results.date_add</td>
<td style="text-align: left;">date</td>
<td>添加时间</td>
</tr>
<tr>
<td style="text-align: left;">results.date_update</td>
<td style="text-align: left;">date</td>
<td>更新时间</td>
</tr>
<tr>
<td style="text-align: left;">results.is_active</td>
<td style="text-align: left;">boolean</td>
<td>文章状态 0下架 1发布</td>
</tr>
<tr>
<td style="text-align: left;">results.is_recommend</td>
<td style="text-align: left;">boolean</td>
<td>是否推荐 0正常 1推荐</td>
</tr>
<tr>
<td style="text-align: left;">results.sort</td>
<td style="text-align: left;">string</td>
<td>文章分类名称</td>
</tr>
<tr>
<td style="text-align: left;">results.admin</td>
<td style="text-align: left;">string</td>
<td>发布者名称</td>
</tr>
</tbody>
</table></div><h3>4.2.2.2、文章详情</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取文章详情</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/article/backstage/22/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1Njc4MzI1N30.BsVjk67GBHPkCd-gKZMT_1RY_cbTEkRUrtoxbhLiI6Y",
"data": {
"id": 1,
"title": "文章1",
"shorter": "",
"keywords": "",
"description": "",
"pic": "",
"date_add": "2022-07-01T15:19:55",
"date_update": "2022-07-02T01:31:48.506285",
"is_active": true,
"is_recommend": false,
"sort": 2,
"admin": 1,
"content": "<p>1111<\/p>"
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">string</td>
<td>文章标题</td>
</tr>
<tr>
<td style="text-align: left;">shorter</td>
<td style="text-align: left;">string</td>
<td>文章标题简称</td>
</tr>
<tr>
<td style="text-align: left;">keywords</td>
<td style="text-align: left;">string</td>
<td>关键字</td>
</tr>
<tr>
<td style="text-align: left;">description</td>
<td style="text-align: left;">string</td>
<td>简介</td>
</tr>
<tr>
<td style="text-align: left;">pic</td>
<td style="text-align: left;">string</td>
<td>封面图片地址</td>
</tr>
<tr>
<td style="text-align: left;">date_add</td>
<td style="text-align: left;">date</td>
<td>添加时间</td>
</tr>
<tr>
<td style="text-align: left;">date_update</td>
<td style="text-align: left;">date</td>
<td>更新时间</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;">boolean</td>
<td>文章状态 0下架 1发布</td>
</tr>
<tr>
<td style="text-align: left;">is_recommend</td>
<td style="text-align: left;">boolean</td>
<td>是否推荐 0正常 1推荐</td>
</tr>
<tr>
<td style="text-align: left;">sort</td>
<td style="text-align: left;">number</td>
<td>文章分类id</td>
</tr>
<tr>
<td style="text-align: left;">admin</td>
<td style="text-align: left;">number</td>
<td>发布者id</td>
</tr>
<tr>
<td style="text-align: left;">content</td>
<td style="text-align: left;">string</td>
<td>文章内容</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/article/backstage/[id]/</p></div><h3>4.2.2.3、文章添加</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>添加文章接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/article/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"title": "标题111111",
"shorter": "",
"keywords": "",
"description": "",
"pic": "",
"is_active": true,
"is_recommend": false,
"sort": 2,
"content": "<p>1111<\/p>"
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>文章标题</td>
</tr>
<tr>
<td style="text-align: left;">shorter</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>文章标题简称</td>
</tr>
<tr>
<td style="text-align: left;">keywords</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>关键字</td>
</tr>
<tr>
<td style="text-align: left;">description</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>简介</td>
</tr>
<tr>
<td style="text-align: left;">pic</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>封面图片地址</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>文章状态 0下架 1发布</td>
</tr>
<tr>
<td style="text-align: left;">is_recommend</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否推荐 0正常 1推荐</td>
</tr>
<tr>
<td style="text-align: left;">sort</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>文章分类id</td>
</tr>
<tr>
<td style="text-align: left;">content</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>文章内容</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 201,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1Njc4NjY4M30.5MICqPqGuNd8jAxzmoPqtrOW7jdPNdoPBATIxHZVynk",
"data": {
"id": 22,
"title": "标题111111",
"shorter": "",
"keywords": "",
"description": "",
"pic": "",
"date_add": "2022-07-02T02:31:23.356012",
"date_update": "2022-07-02T02:31:23.356012",
"is_active": true,
"is_recommend": false,
"sort": 2,
"admin": 1,
"content": "<p>1111<\/p>"
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回201,添加成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回添加的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">string</td>
<td>文章标题</td>
</tr>
<tr>
<td style="text-align: left;">shorter</td>
<td style="text-align: left;">string</td>
<td>文章标题简称</td>
</tr>
<tr>
<td style="text-align: left;">keywords</td>
<td style="text-align: left;">string</td>
<td>关键字</td>
</tr>
<tr>
<td style="text-align: left;">description</td>
<td style="text-align: left;">string</td>
<td>简介</td>
</tr>
<tr>
<td style="text-align: left;">pic</td>
<td style="text-align: left;">string</td>
<td>封面图片地址</td>
</tr>
<tr>
<td style="text-align: left;">date_add</td>
<td style="text-align: left;">date</td>
<td>添加时间</td>
</tr>
<tr>
<td style="text-align: left;">date_update</td>
<td style="text-align: left;">date</td>
<td>更新时间</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;">boolean</td>
<td>文章状态 0下架 1发布</td>
</tr>
<tr>
<td style="text-align: left;">is_recommend</td>
<td style="text-align: left;">boolean</td>
<td>是否推荐 0正常 1推荐</td>
</tr>
<tr>
<td style="text-align: left;">sort</td>
<td style="text-align: left;">number</td>
<td>文章分类id</td>
</tr>
<tr>
<td style="text-align: left;">admin</td>
<td style="text-align: left;">number</td>
<td>发布者id</td>
</tr>
<tr>
<td style="text-align: left;">content</td>
<td style="text-align: left;">string</td>
<td>文章内容</td>
</tr>
</tbody>
</table></div><h3>4.2.2.4、文章修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>修改文章接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/article/backstage/22/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>put</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"title": "标题22222",
"shorter": "22搜索",
"keywords": "2",
"description": "2",
"pic": "",
"is_active": true,
"is_recommend": false,
"sort": 2,
"content": "<p>2x惺惺惜惺杀杀杀惺<\/p>"
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>文章标题</td>
</tr>
<tr>
<td style="text-align: left;">shorter</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>文章标题简称</td>
</tr>
<tr>
<td style="text-align: left;">keywords</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>关键字</td>
</tr>
<tr>
<td style="text-align: left;">description</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>简介</td>
</tr>
<tr>
<td style="text-align: left;">pic</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>封面图片地址</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>文章状态 0下架 1发布</td>
</tr>
<tr>
<td style="text-align: left;">is_recommend</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否推荐 0正常 1推荐</td>
</tr>
<tr>
<td style="text-align: left;">sort</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>文章分类id</td>
</tr>
<tr>
<td style="text-align: left;">content</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>文章内容</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1Njc4ODY0M30.8a-7RiVl-jmkJ1tWcPSvWG1XNfNNbq0dzc2YFWV2Po0",
"data": {
"id": 22,
"title": "标题22222",
"shorter": "22搜索",
"keywords": "2",
"description": "2",
"pic": "",
"date_add": "2022-07-02T02:31:23.356012",
"date_update": "2022-07-02T03:04:03.820947",
"is_active": true,
"is_recommend": false,
"sort": 2,
"admin": 1,
"content": "<p>2x惺惺惜惺杀杀杀惺<\/p>"
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回202,添加成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回添加的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">string</td>
<td>文章标题</td>
</tr>
<tr>
<td style="text-align: left;">shorter</td>
<td style="text-align: left;">string</td>
<td>文章标题简称</td>
</tr>
<tr>
<td style="text-align: left;">keywords</td>
<td style="text-align: left;">string</td>
<td>关键字</td>
</tr>
<tr>
<td style="text-align: left;">description</td>
<td style="text-align: left;">string</td>
<td>简介</td>
</tr>
<tr>
<td style="text-align: left;">pic</td>
<td style="text-align: left;">string</td>
<td>封面图片地址</td>
</tr>
<tr>
<td style="text-align: left;">date_add</td>
<td style="text-align: left;">date</td>
<td>添加时间</td>
</tr>
<tr>
<td style="text-align: left;">date_update</td>
<td style="text-align: left;">date</td>
<td>更新时间</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;">boolean</td>
<td>文章状态 0下架 1发布</td>
</tr>
<tr>
<td style="text-align: left;">is_recommend</td>
<td style="text-align: left;">boolean</td>
<td>是否推荐 0正常 1推荐</td>
</tr>
<tr>
<td style="text-align: left;">sort</td>
<td style="text-align: left;">number</td>
<td>文章分类id</td>
</tr>
<tr>
<td style="text-align: left;">admin</td>
<td style="text-align: left;">number</td>
<td>发布者id</td>
</tr>
<tr>
<td style="text-align: left;">content</td>
<td style="text-align: left;">string</td>
<td>文章内容</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/article/backstage/[id]/</p></div><h3>4.2.2.5、文章删除</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>删除文章接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/article/backstage/22/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>delete</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 204,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1Njc4ODc4MH0.y9s9Pu45KqZkxuCe_-Ec9h-Hytq82fDIsRRHXqUqdzc",
"data": 22
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回204,删除成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回删除的id</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/article/backstage/[id]/</p></div></div></div><h2>4.3、人事管理</h2><div style="margin-left:0px;"><h2>4.3.1、角色</h2><div style="margin-left:0px;"><h3>4.3.1.1、角色列表</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取角色列表</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/role/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"data": [
{
"id": 3,
"name": "游客",
"auth": "",
"ord": 0
},
{
"id": 2,
"name": "管理员",
"auth": "1,2,3,4,5,6,8,9,10",
"ord": 0
},
{
"id": 1,
"name": "超级管理员",
"auth": "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25",
"ord": 0
}
]
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">array</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">string</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>角色名称</td>
</tr>
<tr>
<td style="text-align: left;">auth</td>
<td style="text-align: left;">string</td>
<td>权限</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">number</td>
<td>排序</td>
</tr>
</tbody>
</table></div><h3>4.3.1.2、角色添加</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>添加角色接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/role/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "adas3333",
"auth": "",
"ord": 0
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>角色名称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">auth</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>权限</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>排序 默认0</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 201,
"msg": "ok",
"data": {
"id": 5,
"name": "adas",
"auth": "",
"ord": 0
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">string</td>
<td>返回201,添加成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回添加的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">string</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>角色名称</td>
</tr>
<tr>
<td style="text-align: left;">auth</td>
<td style="text-align: left;">string</td>
<td>权限</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">string</td>
<td>排序</td>
</tr>
</tbody>
</table></div><h3>4.3.1.3、角色修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>修改角色接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/role/backstage/4/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>put</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "adaddddsss",
"auth": "",
"ord": 0
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>角色名称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">auth</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>权限</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>排序 默认0</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok",
"data": {
"id": 5,
"name": "adasss",
"auth": "",
"ord": 0
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">string</td>
<td>返回202,修改成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回修改的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">string</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>角色名称</td>
</tr>
<tr>
<td style="text-align: left;">auth</td>
<td style="text-align: left;">string</td>
<td>权限</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">string</td>
<td>排序</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/admins/role/[id]/</p></div><h3>4.3.1.4、角色删除</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>删除角色接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/role/backstage/4/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>delete</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 204,
"msg": "ok",
"data": 100
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">string</td>
<td>返回204,删除成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">string</td>
<td>删除数据的id</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/admins/role/[id]/</p></div></div><h2>4.3.2、管理员</h2><div style="margin-left:0px;"><h3>4.3.2.1、账号查询</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>查询管理员账号是否存在</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/admins/user_query/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"username": "admin"
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">username</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>查询的管理员账号</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "账号存在!"
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,账号存在</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>失败返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 1101,
"msg": "账号不存在!"
}
</code></pre></table>
<h5>失败返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回1101,账号不存在</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>账号不存在直接返回全局错误码1404</p></div><h3>4.3.2.2、管理员密码修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>管理员密码修改接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/admins/update_password/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"oldPassword": "21232f297a57a5a743894a0e4a801fc3",
"newPassword": "21232f297a57a5a743894a0e4a801fc3"
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">oldPassword</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>MD5加密过的旧密码</td>
</tr>
<tr>
<td style="text-align: left;">newPassword</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>MD5加密过的新密码</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok"
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回202,修改成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>失败返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 1101,
"msg": "账号不存在!"
}
</code></pre></table>
<h5>失败返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回1101,账号不存在</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>账号不存在直接返回全局错误码1404</p></div><h3>4.3.2.3、管理员列表</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取管理员列表</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/admins/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求Query参数</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">page</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>第几页</td>
</tr>
<tr>
<td style="text-align: left;">size</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>每页多少条,默认20条,最多100条</td>
</tr>
<tr>
<td style="text-align: left;">department</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>精确搜索,部门id</td>
</tr>
<tr>
<td style="text-align: left;">search</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>模糊搜索,账号或昵称</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NjI1ODQxOX0.FvRflkeiROsf3AEtBglYMBTqJWZhvvVkSeK7si8I9Nc",
"data": {
"count": 27,
"next": "http:\/\/127.0.0.1:8000\/api\/admins\/backstage\/?department=1&page=2&search=&size=10",
"previous": null,
"results": [
{
"id": 27,
"username": "admin26",
"name": "张三",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": null
},
{
"id": 26,
"username": "admin25",
"name": "张三",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": null
},
{
"id": 25,
"username": "admin24",
"name": "张三",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": {
"id": 74,
"name": "的撒旦"
}
},
{
"id": 24,
"username": "admin23",
"name": "张三",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": {
"id": 67,
"name": "龙港分公司"
}
},
{
"id": 23,
"username": "admin22",
"name": "张三",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": null
},
{
"id": 22,
"username": "admin21",
"name": "张三",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": null
},
{
"id": 21,
"username": "admin20",
"name": "李伟",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": null
},
{
"id": 20,
"username": "admin19",
"name": "王伟",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": null
},
{
"id": 19,
"username": "admin18",
"name": "李四",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": null
},
{
"id": 18,
"username": "admin17",
"name": "张三",
"tel": "13555555555",
"email": "1@qq.com",
"is_active": true,
"date_add": "2022-06-01T22:06:41",
"date_lock": "2022-06-01T22:06:47",
"err_num": 0,
"role": null,
"department": null
}
]
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">count</td>
<td style="text-align: left;">number</td>
<td>记录总条数</td>
</tr>
<tr>
<td style="text-align: left;">next</td>
<td style="text-align: left;">string</td>
<td>下一页url</td>
</tr>
<tr>
<td style="text-align: left;">previous</td>
<td style="text-align: left;">string</td>
<td>上一页url</td>
</tr>
<tr>
<td style="text-align: left;">results</td>
<td style="text-align: left;">array</td>
<td>数据</td>
</tr>
<tr>
<td style="text-align: left;">results.id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">results.username</td>
<td style="text-align: left;">string</td>
<td>管理员账号</td>
</tr>
<tr>
<td style="text-align: left;">results.name</td>
<td style="text-align: left;">string</td>
<td>昵称</td>
</tr>
<tr>
<td style="text-align: left;">results.tel</td>
<td style="text-align: left;">string</td>
<td>联系电话</td>
</tr>
<tr>
<td style="text-align: left;">results.email</td>
<td style="text-align: left;">string</td>
<td>邮箱</td>
</tr>
<tr>
<td style="text-align: left;">results.is_active</td>
<td style="text-align: left;">boolean</td>
<td>账号状态 0禁用 1启用</td>
</tr>
<tr>
<td style="text-align: left;">results.date_add</td>
<td style="text-align: left;">date</td>
<td>添加时间</td>
</tr>
<tr>
<td style="text-align: left;">results.date_lock</td>
<td style="text-align: left;">date</td>
<td>解锁时间,大于当前时间账号锁定</td>
</tr>
<tr>
<td style="text-align: left;">results.err_num</td>
<td style="text-align: left;">number</td>
<td>登录时密码错误次数,大于7次账号开始锁定,登录成功归0</td>
</tr>
<tr>
<td style="text-align: left;">results.role</td>
<td style="text-align: left;">object</td>
<td>角色</td>
</tr>
<tr>
<td style="text-align: left;">results.role.id</td>
<td style="text-align: left;">number</td>
<td>角色id</td>
</tr>
<tr>
<td style="text-align: left;">results.role.name</td>
<td style="text-align: left;">string</td>
<td>角色名称</td>
</tr>
<tr>
<td style="text-align: left;">results.department</td>
<td style="text-align: left;">object</td>
<td>部门</td>
</tr>
<tr>
<td style="text-align: left;">results.department.id</td>
<td style="text-align: left;">number</td>
<td>部门id</td>
</tr>
<tr>
<td style="text-align: left;">results.department.name</td>
<td style="text-align: left;">string</td>
<td>部门名称</td>
</tr>
</tbody>
</table>
<h5>备注</h5></div><h3>4.3.2.4、管理员日志</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取管理员日志列表</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/record/admins/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求Query参数</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">admin</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>管理员id</td>
</tr>
<tr>
<td style="text-align: left;">group</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>分组id</td>
</tr>
<tr>
<td style="text-align: left;">page</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>第几页</td>
</tr>
<tr>
<td style="text-align: left;">size</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>每页多少条,默认20条,最多100条</td>
</tr>
<tr>
<td style="text-align: left;">start_time</td>
<td style="text-align: left;"></td>
<td>date</td>
<td>开始时间</td>
</tr>
<tr>
<td style="text-align: left;">end_time</td>
<td style="text-align: left;"></td>
<td>date</td>
<td>结束时间</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NzA5NDgyOH0.GjyK8mEjmPnhJ2vz808H_ty85zzLZBvEil6sTxzZFdg",
"data": {
"count": 212,
"next": "http:\/\/127.0.0.1:8000\/api\/record\/admins\/?page=2",
"previous": null,
"results": [
{
"id": 212,
"group_name": "系统",
"detail": "修改角色,内容:{'id': 1, 'name': '超级管理员', 'auth': '1,2,107,16,19,18,17,3,4,7,6,5,8,11,10,9,12,15,14,13,113,22,108,111,110,109,23,24,112,74,25', 'ord': 99}",
"date_add": "2022-07-05T16:00:16.544661",
"admin": 1
},
{
"id": 211,
"group_name": "系统",
"detail": "修改角色,内容:{'id': 1, 'name': '超级管理员', 'auth': '1,2,107,16,19,18,17,3,4,7,6,5,8,11,10,9,12,15,14,13,22,108,111,110,109,23,24,112,74,25', 'ord': 99}",
"date_add": "2022-07-05T15:58:27.896882",
"admin": 1
},
{
"id": 210,
"group_name": "系统",
"detail": "修改角色,内容:{'id': 1, 'name': '超级管理员', 'auth': '1,2,107,16,19,18,17,3,4,7,6,5,8,11,10,9,12,15,14,13,22,108,111,110,109,23,24,112,74,25', 'ord': 99}",
"date_add": "2022-07-05T15:57:34.902368",
"admin": 1
},
{
"id": 209,
"group_name": "系统",
"detail": "修改角色,内容:{'id': 1, 'name': '超级管理员', 'auth': '1,2,107,16,19,18,17,3,4,7,6,5,8,11,10,9,12,15,14,13,113,22,108,111,110,109,23,24,112,74,25', 'ord': 99}",
"date_add": "2022-07-05T15:54:57.807720",
"admin": 1
},
{
"id": 208,
"group_name": "系统",
"detail": "修改菜单,内容:{'id': 113, 'name': 'record', 'path': '\/record', 'component': '\/staff\/record\/RecordList', 'title': '管理员日志', 'icon': 'Reading', 'ord': 0, 'urls': '^\/api\/record\/admins\/$', 'method': 'GET', 'is_route': True, 'is_menu': True, 'pid': 3}",
"date_add": "2022-07-05T15:53:49.614313",
"admin": 1
},
{
"id": 207,
"group_name": "系统",
"detail": "修改菜单,内容:{'id': 113, 'name': 'record', 'path': '\/record', 'component': '\/staff\/record\/RecordList', 'title': '管理员日志', 'icon': 'Reading', 'ord': 0, 'urls': '^\/api\/record\/admins\/', 'method': 'GET', 'is_route': True, 'is_menu': True, 'pid': 3}",
"date_add": "2022-07-05T15:53:43.476809",
"admin": 1
},
{
"id": 206,
"group_name": "系统",
"detail": "添加菜单,内容:{'id': 113, 'name': 'record', 'path': '\/record', 'component': '\/staff\/record\/RecordList', 'title': '管理员日志', 'icon': 'Reading', 'ord': 0, 'urls': '\/api\/record\/admins\/', 'method': 'GET', 'is_route': True, 'is_menu': True, 'pid': 3}",
"date_add": "2022-07-05T15:53:26.633904",
"admin": 1
},
{
"id": 205,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-05T15:30:21.846205",
"admin": 1
},
{
"id": 204,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-05T15:28:29.845106",
"admin": 1
},
{
"id": 203,
"group_name": "系统",
"detail": "添加管理员,内容:{'id': 31, 'username': 'zeus123', 'name': '谢先生', 'tel': '', 'email': '', 'is_active': True, 'date_add': '2022-07-05T15:14:27.583149', 'date_lock': '2022-07-05T15:14:27.583149', 'err_num': 0, 'role': 1, 'department': 1}",
"date_add": "2022-07-05T15:14:27.596310",
"admin": 1
},
{
"id": 202,
"group_name": "系统",
"detail": "添加角色,内容:{'id': 14, 'name': '11112222', 'auth': '1,2,107,3', 'ord': 1}",
"date_add": "2022-07-05T00:05:56.173711",
"admin": 1
},
{
"id": 201,
"group_name": "系统",
"detail": "添加角色,内容:{'id': 13, 'name': '11111111', 'auth': '1,2,107', 'ord': 0}",
"date_add": "2022-07-05T00:04:38.375782",
"admin": 1
},
{
"id": 200,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-04T22:19:02.075536",
"admin": 1
},
{
"id": 199,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-04T21:44:40.199317",
"admin": 1
},
{
"id": 198,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-04T21:43:58.064123",
"admin": 1
},
{
"id": 197,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-04T21:42:25.169305",
"admin": 1
},
{
"id": 196,
"group_name": "资讯",
"detail": "添加文章,内容:{'id': 26, 'title': 'aaaddadaad', 'shorter': '', 'keywords': '', 'description': '', 'pic': 'https:\/\/zs.cdn.zeus56.net\/Fv4YcaZJegkVaagn_M7szFLyOzrV', 'date_add': '2022-07-04T16:09:09.495213', 'date_update': '2022-07-04T16:09:09.495213', 'is_active': False, 'is_recommend': False, 'sort': 1, 'admin': 1, 'content': '<p><br><\/p><p><img style='max-width:500' src=\"https:\/\/zs.cdn.zeus56.net\/Fix9M2A30kf74x-KE2xX-O8lfbeX\" alt=\"\" data-href=\"https:\/\/zs.cdn.zeus56.net\/Fix9M2A30kf74x-KE2xX-O8lfbeX\" style=\"\"\/><\/p>'}",
"date_add": "2022-07-04T16:09:09.513192",
"admin": 1
},
{
"id": 195,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-04T01:03:22.827548",
"admin": 1
},
{
"id": 194,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-04T01:03:06.784705",
"admin": 1
},
{
"id": 193,
"group_name": "系统",
"detail": "登录系统,IP:127.0.0.1",
"date_add": "2022-07-03T17:50:32.445181",
"admin": 1
}
]
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">count</td>
<td style="text-align: left;">number</td>
<td>记录总条数</td>
</tr>
<tr>
<td style="text-align: left;">next</td>
<td style="text-align: left;">string</td>
<td>下一页url</td>
</tr>
<tr>
<td style="text-align: left;">previous</td>
<td style="text-align: left;">string</td>
<td>上一页url</td>
</tr>
<tr>
<td style="text-align: left;">results</td>
<td style="text-align: left;">array</td>
<td>数据</td>
</tr>
<tr>
<td style="text-align: left;">results.id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">results.group_name</td>
<td style="text-align: left;">string</td>
<td>分组名称</td>
</tr>
<tr>
<td style="text-align: left;">results.detail</td>
<td style="text-align: left;">string</td>
<td>详情</td>
</tr>
<tr>
<td style="text-align: left;">results.date_add</td>
<td style="text-align: left;">date</td>
<td>添加时间</td>
</tr>
<tr>
<td style="text-align: left;">results.admin</td>
<td style="text-align: left;">string</td>
<td>管理员id</td>
</tr>
</tbody>
</table>
<h5>备注</h5></div><h3>4.3.2.5、管理员添加</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>添加管理员接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/admins/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"username": "add",
"password": "21232f297a57a5a743894a0e4a801fc3",
"name": "",
"tel": "",
"email": "",
"is_active": 0,
"role": 1,
"department": 1
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">username</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>管理员账号 min_length=6 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">password</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>管理员密码 md5加密过的密码</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>昵称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">tel</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>电话 max_length=15</td>
</tr>
<tr>
<td style="text-align: left;">email</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>邮箱 max_length=254</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否启用 0禁用 1启用 默认0</td>
</tr>
<tr>
<td style="text-align: left;">role</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>角色id</td>
</tr>
<tr>
<td style="text-align: left;">department</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>部门id</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 201,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NTM5NzEwOH0.EB9TQYWct72tHJKr_0BrkyBjQ3tMP6cT2FVYxlQ9_tQ",
"data": {
"id": 32,
"username": "admsssssssssssssssss",
"password": "21232f297a57a5a743894a0e4a801fc3",
"name": "",
"tel": "",
"email": "",
"is_active": false,
"date_add": "2022-06-16T00:31:48.286922",
"date_lock": "2022-06-16T00:31:48.286946",
"err_num": 0,
"role": 1,
"department": 1
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回201,添加成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回添加的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">username</td>
<td style="text-align: left;">string</td>
<td>管理员账号</td>
</tr>
<tr>
<td style="text-align: left;">password</td>
<td style="text-align: left;">string</td>
<td>管理员密码</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>昵称</td>
</tr>
<tr>
<td style="text-align: left;">tel</td>
<td style="text-align: left;">string</td>
<td>电话</td>
</tr>
<tr>
<td style="text-align: left;">email</td>
<td style="text-align: left;">string</td>
<td>邮箱</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;">boolean</td>
<td>是否启用 0禁用 1启用</td>
</tr>
<tr>
<td style="text-align: left;">date_add</td>
<td style="text-align: left;">date</td>
<td>账号注册时间</td>
</tr>
<tr>
<td style="text-align: left;">date_lock</td>
<td style="text-align: left;">date</td>
<td>账号解锁时间</td>
</tr>
<tr>
<td style="text-align: left;">err_num</td>
<td style="text-align: left;">number</td>
<td>密码错误次数</td>
</tr>
<tr>
<td style="text-align: left;">role</td>
<td style="text-align: left;">number</td>
<td>角色id</td>
</tr>
<tr>
<td style="text-align: left;">department</td>
<td style="text-align: left;">number</td>
<td>部门id</td>
</tr>
</tbody>
</table></div><h3>4.3.2.6、管理员修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>修改管理员接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/admins/backstage/1/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>put</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"username": "admin",
"password": "21232f297a57a5a743894a0e4a801fc3",
"name": "张三",
"tel": "122222222223",
"email": "",
"is_active": 1,
"date_lock": "2022-06-01 22:06:41",
"role": 1,
"department": 1
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">username</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>管理员账号 不可修改 可不传</td>
</tr>
<tr>
<td style="text-align: left;">password</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>管理员密码 md5加密过的密码 不传或者空字符串表示不修改密码</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>昵称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">tel</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>电话 max_length=15</td>
</tr>
<tr>
<td style="text-align: left;">email</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>邮箱 max_length=254</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;"></td>
<td>boolean</td>
<td>是否启用 0禁用 1启用 默认0</td>
</tr>
<tr>
<td style="text-align: left;">date_lock</td>
<td style="text-align: left;"></td>
<td>date</td>
<td>解锁时间</td>
</tr>
<tr>
<td style="text-align: left;">role</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>角色id</td>
</tr>
<tr>
<td style="text-align: left;">department</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>部门id</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NTQwMzk3Nn0.HYFX_sHoNMyzztxQJ2Riud-au-AZlwqX5DSY19ao_bs",
"data": {
"id": 52,
"username": "adddaaw4",
"name": "aa",
"tel": "122222222223",
"email": "",
"is_active": true,
"date_add": "2022-06-16T02:20:55.810444",
"date_lock": "2022-06-01T22:06:41",
"err_num": 0,
"role": 1,
"department": 1
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回202,修改成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回修改的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">username</td>
<td style="text-align: left;">string</td>
<td>管理员账号</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>昵称</td>
</tr>
<tr>
<td style="text-align: left;">tel</td>
<td style="text-align: left;">string</td>
<td>电话</td>
</tr>
<tr>
<td style="text-align: left;">email</td>
<td style="text-align: left;">string</td>
<td>邮箱</td>
</tr>
<tr>
<td style="text-align: left;">is_active</td>
<td style="text-align: left;">boolean</td>
<td>是否启用 0禁用 1启用</td>
</tr>
<tr>
<td style="text-align: left;">date_add</td>
<td style="text-align: left;">date</td>
<td>账号注册时间</td>
</tr>
<tr>
<td style="text-align: left;">date_lock</td>
<td style="text-align: left;">date</td>
<td>账号解锁时间</td>
</tr>
<tr>
<td style="text-align: left;">err_num</td>
<td style="text-align: left;">number</td>
<td>密码错误次数</td>
</tr>
<tr>
<td style="text-align: left;">role</td>
<td style="text-align: left;">number</td>
<td>角色id</td>
</tr>
<tr>
<td style="text-align: left;">department</td>
<td style="text-align: left;">number</td>
<td>部门id</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/admins/backstage/[id]/</p></div><h3>4.3.2.7、管理员删除</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>删除管理员接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/admins/backstage/34/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>delete</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 204,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NTQwNDMxMH0.xUdoXpHn3AuhRHKWALMiGD_mNxGgD5bl5gIrg-QPZW0",
"data": 52
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回204,删除成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">new_token</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">number</td>
<td>删除数据的id</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/admins/backstage/[id]/</p></div><h3>4.3.2.8、登录</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>管理员登录接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/admins/login/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"username": "YWRtaW4=",
"password": "21232f297a57a5a743894a0e4a801fc3",
"captcha_id": "baae613b44086704d96ab9c83b044e618d7f2c6d",
"captcha": "tenb"
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">username</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>base64加密过的管理员账号</td>
</tr>
<tr>
<td style="text-align: left;">password</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>md5加密过的密码</td>
</tr>
<tr>
<td style="text-align: left;">captcha_id</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>验证码id</td>
</tr>
<tr>
<td style="text-align: left;">captcha</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>验证码</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"data": {
"username": "admin",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6InpldXMiLCJleHAiOjE2NDk2MDAzMzAsImVtYWlsIjoiaW5mb0B6ZXVzLmNuLmNvbSJ9.eCBrd0hoOprXdNg_y3sOKVn5eu-a_GMH_BHGFYJGS1U"
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回200,登录成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">username</td>
<td style="text-align: left;">string</td>
<td>管理员账号</td>
</tr>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;">string</td>
<td>token</td>
</tr>
</tbody>
</table>
<h5>失败返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 1102,
"msg": "账号或密码错误!"
}
</code></pre></table>
<h5>失败返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">number</td>
<td>返回1102,登录失败</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td>失败原因</td>
</tr>
</tbody>
</table></div></div><h2>4.3.3、部门</h2><div style="margin-left:0px;"><h3>4.3.3.1、部门列表</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>获取部门列表</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/department/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 200,
"msg": "ok",
"new_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTY1NjY4MTc5NX0.qFviMD8-O3jIz3Ux3eG_fDMdlGb5x8uJShEB58uRB2s",
"data": [
{
"id": 1,
"name": "总公司",
"director": "张三1",
"director_tel": "18888888888",
"remarks": null,
"ord": 999,
"pid": 0,
"value": 1,
"label": "总公司"
},
{
"id": 75,
"name": "撒大大啊啊啊",
"director": "",
"director_tel": "11111",
"remarks": "",
"ord": 0,
"pid": 0,
"value": 75,
"label": "撒大大啊啊啊"
},
{
"id": 74,
"name": "的撒旦",
"director": "搜索",
"director_tel": "",
"remarks": "",
"ord": 0,
"pid": 0,
"value": 74,
"label": "的撒旦"
},
{
"id": 68,
"name": "啊啊",
"director": "",
"director_tel": "",
"remarks": "",
"ord": 0,
"pid": 0,
"value": 68,
"label": "啊啊",
"children": [
{
"id": 69,
"name": "撒旦撒",
"director": "",
"director_tel": "",
"remarks": "",
"ord": 0,
"pid": 68,
"value": 69,
"label": "撒旦撒"
}
]
},
{
"id": 67,
"name": "龙港分公司",
"director": "张三",
"director_tel": "",
"remarks": "",
"ord": 0,
"pid": 0,
"value": 67,
"label": "龙港分公司",
"children": [
{
"id": 70,
"name": "搜索",
"director": "",
"director_tel": "",
"remarks": "",
"ord": 0,
"pid": 67,
"value": 70,
"label": "搜索"
}
]
},
{
"id": 62,
"name": "sds",
"director": "",
"director_tel": "",
"remarks": "",
"ord": 0,
"pid": 0,
"value": 62,
"label": "sds"
},
{
"id": 4,
"name": "灵溪分公司",
"director": "朱六",
"director_tel": null,
"remarks": null,
"ord": 0,
"pid": 0,
"value": 4,
"label": "灵溪分公司",
"children": [
{
"id": 5,
"name": "财务部",
"director": "朱六",
"director_tel": null,
"remarks": null,
"ord": 0,
"pid": 4,
"value": 5,
"label": "财务部"
}
]
}
]
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">int</td>
<td>返回200,获取成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">array</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">int</td>
<td>部门id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>部门名称</td>
</tr>
<tr>
<td style="text-align: left;">director</td>
<td style="text-align: left;">string</td>
<td>负责人</td>
</tr>
<tr>
<td style="text-align: left;">director_tel</td>
<td style="text-align: left;">string</td>
<td>部门联系方式</td>
</tr>
<tr>
<td style="text-align: left;">remarks</td>
<td style="text-align: left;">string</td>
<td>备注</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">int</td>
<td>排序</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">int</td>
<td>父id</td>
</tr>
<tr>
<td style="text-align: left;">children</td>
<td style="text-align: left;">array</td>
<td>子部门</td>
</tr>
<tr>
<td style="text-align: left;">value</td>
<td style="text-align: left;">number</td>
<td>父级下拉框值,与id一致</td>
</tr>
<tr>
<td style="text-align: left;">label</td>
<td style="text-align: left;">string</td>
<td>父级下拉框名称,与name一致</td>
</tr>
</tbody>
</table></div><h3>4.3.3.2、部门添加</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>添加部门接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/department/backstage/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "公司763333",
"director": "张三",
"director_tel": "",
"remarks": "",
"ord": 0,
"pid": 2
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>部门名称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">director</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>负责人 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">director_tel</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>部门联系方式 max_length=15</td>
</tr>
<tr>
<td style="text-align: left;">remarks</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>备注 max_length=255</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>排序 默认0</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>父id 0为顶级</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 201,
"msg": "ok",
"data": {
"id": 25,
"name": "公司76",
"director": "张三",
"director_tel": "18888888888",
"remarks": null,
"ord": 0,
"pid": 2
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">string</td>
<td>返回201,添加成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回添加的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">string</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>部门名称</td>
</tr>
<tr>
<td style="text-align: left;">director</td>
<td style="text-align: left;">string</td>
<td>负责人</td>
</tr>
<tr>
<td style="text-align: left;">director_tel</td>
<td style="text-align: left;">string</td>
<td>部门联系方式</td>
</tr>
<tr>
<td style="text-align: left;">remarks</td>
<td style="text-align: left;">object</td>
<td>备注</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">string</td>
<td>排序</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">string</td>
<td>父id</td>
</tr>
</tbody>
</table></div><h3>4.3.3.3、部门修改</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>修改部门接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/department/backstage/51/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>put</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>请求参数示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"name": "公司76",
"director": "张三",
"director_tel": "18888888888",
"remarks": null,
"ord": 0,
"pid": 2
}
</code></pre></table>
<h5>json字段说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>部门名称 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">director</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>负责人 max_length=32</td>
</tr>
<tr>
<td style="text-align: left;">director_tel</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>部门联系方式 max_length=15</td>
</tr>
<tr>
<td style="text-align: left;">remarks</td>
<td style="text-align: left;"></td>
<td>string</td>
<td>备注 max_length=255</td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>排序 默认0</td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;"></td>
<td>number</td>
<td>父id 0为顶级</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 202,
"msg": "ok",
"data": {
"id": 3,
"name": "公司76",
"director": "张三",
"director_tel": "18888888888",
"remarks": null,
"ord": 0,
"pid": 2
}
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">string</td>
<td>返回202,修改成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>返回修改后的数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">director</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">director_tel</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">remarks</td>
<td style="text-align: left;">object</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">ord</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/department/backstage/[id]/</p></div><h3>4.3.3.4、部门删除</h3><div style="margin-left:30px;"><h5>简要描述</h5>
<ul>
<li>删除部门接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:8000/api/department/backstage/58/</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>delete</li>
</ul>
<h5>Header</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">header</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;"></td>
<td>string</td>
<td></td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<table width='100%' class='codestyle'><pre><code>{
"code": 204,
"msg": "ok",
"data": 100
}
</code></pre></table>
<h5>成功返回示例的参数说明</h5>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">string</td>
<td>返回204,删除成功</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">string</td>
<td>删除数据的id</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<p>请求地址:/api/department/backstage/[id]/</p></div></div></div></div></body></html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化