app-service.js 1.2 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452
  1. var __defProp = Object.defineProperty;
  2. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  3. var __publicField = (obj, key, value) => {
  4. __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  5. return value;
  6. };
  7. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  8. Promise.prototype.finally = function(callback) {
  9. const promise = this.constructor;
  10. return this.then(
  11. (value) => promise.resolve(callback()).then(() => value),
  12. (reason) => promise.resolve(callback()).then(() => {
  13. throw reason;
  14. })
  15. );
  16. };
  17. }
  18. ;
  19. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  20. const global2 = uni.requireGlobal();
  21. ArrayBuffer = global2.ArrayBuffer;
  22. Int8Array = global2.Int8Array;
  23. Uint8Array = global2.Uint8Array;
  24. Uint8ClampedArray = global2.Uint8ClampedArray;
  25. Int16Array = global2.Int16Array;
  26. Uint16Array = global2.Uint16Array;
  27. Int32Array = global2.Int32Array;
  28. Uint32Array = global2.Uint32Array;
  29. Float32Array = global2.Float32Array;
  30. Float64Array = global2.Float64Array;
  31. BigInt64Array = global2.BigInt64Array;
  32. BigUint64Array = global2.BigUint64Array;
  33. }
  34. ;
  35. if (uni.restoreGlobal) {
  36. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  37. }
  38. (function(vue) {
  39. "use strict";
  40. const icons$1 = {
  41. "uicon-level": "",
  42. "uicon-column-line": "",
  43. "uicon-checkbox-mark": "",
  44. "uicon-folder": "",
  45. "uicon-movie": "",
  46. "uicon-star-fill": "",
  47. "uicon-star": "",
  48. "uicon-phone-fill": "",
  49. "uicon-phone": "",
  50. "uicon-apple-fill": "",
  51. "uicon-chrome-circle-fill": "",
  52. "uicon-backspace": "",
  53. "uicon-attach": "",
  54. "uicon-cut": "",
  55. "uicon-empty-car": "",
  56. "uicon-empty-coupon": "",
  57. "uicon-empty-address": "",
  58. "uicon-empty-favor": "",
  59. "uicon-empty-permission": "",
  60. "uicon-empty-news": "",
  61. "uicon-empty-search": "",
  62. "uicon-github-circle-fill": "",
  63. "uicon-rmb": "",
  64. "uicon-person-delete-fill": "",
  65. "uicon-reload": "",
  66. "uicon-order": "",
  67. "uicon-server-man": "",
  68. "uicon-search": "",
  69. "uicon-fingerprint": "",
  70. "uicon-more-dot-fill": "",
  71. "uicon-scan": "",
  72. "uicon-share-square": "",
  73. "uicon-map": "",
  74. "uicon-map-fill": "",
  75. "uicon-tags": "",
  76. "uicon-tags-fill": "",
  77. "uicon-bookmark-fill": "",
  78. "uicon-bookmark": "",
  79. "uicon-eye": "",
  80. "uicon-eye-fill": "",
  81. "uicon-mic": "",
  82. "uicon-mic-off": "",
  83. "uicon-calendar": "",
  84. "uicon-calendar-fill": "",
  85. "uicon-trash": "",
  86. "uicon-trash-fill": "",
  87. "uicon-play-left": "",
  88. "uicon-play-right": "",
  89. "uicon-minus": "",
  90. "uicon-plus": "",
  91. "uicon-info": "",
  92. "uicon-info-circle": "",
  93. "uicon-info-circle-fill": "",
  94. "uicon-question": "",
  95. "uicon-error": "",
  96. "uicon-close": "",
  97. "uicon-checkmark": "",
  98. "uicon-android-circle-fill": "",
  99. "uicon-android-fill": "",
  100. "uicon-ie": "",
  101. "uicon-IE-circle-fill": "",
  102. "uicon-google": "",
  103. "uicon-google-circle-fill": "",
  104. "uicon-setting-fill": "",
  105. "uicon-setting": "",
  106. "uicon-minus-square-fill": "",
  107. "uicon-plus-square-fill": "",
  108. "uicon-heart": "",
  109. "uicon-heart-fill": "",
  110. "uicon-camera": "",
  111. "uicon-camera-fill": "",
  112. "uicon-more-circle": "",
  113. "uicon-more-circle-fill": "",
  114. "uicon-chat": "",
  115. "uicon-chat-fill": "",
  116. "uicon-bag-fill": "",
  117. "uicon-bag": "",
  118. "uicon-error-circle-fill": "",
  119. "uicon-error-circle": "",
  120. "uicon-close-circle": "",
  121. "uicon-close-circle-fill": "",
  122. "uicon-checkmark-circle": "",
  123. "uicon-checkmark-circle-fill": "",
  124. "uicon-question-circle-fill": "",
  125. "uicon-question-circle": "",
  126. "uicon-share": "",
  127. "uicon-share-fill": "",
  128. "uicon-shopping-cart": "",
  129. "uicon-shopping-cart-fill": "",
  130. "uicon-bell": "",
  131. "uicon-bell-fill": "",
  132. "uicon-list": "",
  133. "uicon-list-dot": "",
  134. "uicon-zhihu": "",
  135. "uicon-zhihu-circle-fill": "",
  136. "uicon-zhifubao": "",
  137. "uicon-zhifubao-circle-fill": "",
  138. "uicon-weixin-circle-fill": "",
  139. "uicon-weixin-fill": "",
  140. "uicon-twitter-circle-fill": "",
  141. "uicon-twitter": "",
  142. "uicon-taobao-circle-fill": "",
  143. "uicon-taobao": "",
  144. "uicon-weibo-circle-fill": "",
  145. "uicon-weibo": "",
  146. "uicon-qq-fill": "",
  147. "uicon-qq-circle-fill": "",
  148. "uicon-moments-circel-fill": "",
  149. "uicon-moments": "",
  150. "uicon-qzone": "",
  151. "uicon-qzone-circle-fill": "",
  152. "uicon-baidu-circle-fill": "",
  153. "uicon-baidu": "",
  154. "uicon-facebook-circle-fill": "",
  155. "uicon-facebook": "",
  156. "uicon-car": "",
  157. "uicon-car-fill": "",
  158. "uicon-warning-fill": "",
  159. "uicon-warning": "",
  160. "uicon-clock-fill": "",
  161. "uicon-clock": "",
  162. "uicon-edit-pen": "",
  163. "uicon-edit-pen-fill": "",
  164. "uicon-email": "",
  165. "uicon-email-fill": "",
  166. "uicon-minus-circle": "",
  167. "uicon-minus-circle-fill": "",
  168. "uicon-plus-circle": "",
  169. "uicon-plus-circle-fill": "",
  170. "uicon-file-text": "",
  171. "uicon-file-text-fill": "",
  172. "uicon-pushpin": "",
  173. "uicon-pushpin-fill": "",
  174. "uicon-grid": "",
  175. "uicon-grid-fill": "",
  176. "uicon-play-circle": "",
  177. "uicon-play-circle-fill": "",
  178. "uicon-pause-circle-fill": "",
  179. "uicon-pause": "",
  180. "uicon-pause-circle": "",
  181. "uicon-eye-off": "",
  182. "uicon-eye-off-outline": "",
  183. "uicon-gift-fill": "",
  184. "uicon-gift": "",
  185. "uicon-rmb-circle-fill": "",
  186. "uicon-rmb-circle": "",
  187. "uicon-kefu-ermai": "",
  188. "uicon-server-fill": "",
  189. "uicon-coupon-fill": "",
  190. "uicon-coupon": "",
  191. "uicon-integral": "",
  192. "uicon-integral-fill": "",
  193. "uicon-home-fill": "",
  194. "uicon-home": "",
  195. "uicon-hourglass-half-fill": "",
  196. "uicon-hourglass": "",
  197. "uicon-account": "",
  198. "uicon-plus-people-fill": "",
  199. "uicon-minus-people-fill": "",
  200. "uicon-account-fill": "",
  201. "uicon-thumb-down-fill": "",
  202. "uicon-thumb-down": "",
  203. "uicon-thumb-up": "",
  204. "uicon-thumb-up-fill": "",
  205. "uicon-lock-fill": "",
  206. "uicon-lock-open": "",
  207. "uicon-lock-opened-fill": "",
  208. "uicon-lock": "",
  209. "uicon-red-packet-fill": "",
  210. "uicon-photo-fill": "",
  211. "uicon-photo": "",
  212. "uicon-volume-off-fill": "",
  213. "uicon-volume-off": "",
  214. "uicon-volume-fill": "",
  215. "uicon-volume": "",
  216. "uicon-red-packet": "",
  217. "uicon-download": "",
  218. "uicon-arrow-up-fill": "",
  219. "uicon-arrow-down-fill": "",
  220. "uicon-play-left-fill": "",
  221. "uicon-play-right-fill": "",
  222. "uicon-rewind-left-fill": "",
  223. "uicon-rewind-right-fill": "",
  224. "uicon-arrow-downward": "",
  225. "uicon-arrow-leftward": "",
  226. "uicon-arrow-rightward": "",
  227. "uicon-arrow-upward": "",
  228. "uicon-arrow-down": "",
  229. "uicon-arrow-right": "",
  230. "uicon-arrow-left": "",
  231. "uicon-arrow-up": "",
  232. "uicon-skip-back-left": "",
  233. "uicon-skip-forward-right": "",
  234. "uicon-rewind-right": "",
  235. "uicon-rewind-left": "",
  236. "uicon-arrow-right-double": "",
  237. "uicon-arrow-left-double": "",
  238. "uicon-wifi-off": "",
  239. "uicon-wifi": "",
  240. "uicon-empty-data": "",
  241. "uicon-empty-history": "",
  242. "uicon-empty-list": "",
  243. "uicon-empty-page": "",
  244. "uicon-empty-order": "",
  245. "uicon-man": "",
  246. "uicon-woman": "",
  247. "uicon-man-add": "",
  248. "uicon-man-add-fill": "",
  249. "uicon-man-delete": "",
  250. "uicon-man-delete-fill": "",
  251. "uicon-zh": "",
  252. "uicon-en": ""
  253. };
  254. const ON_SHOW = "onShow";
  255. const ON_HIDE = "onHide";
  256. const ON_LAUNCH = "onLaunch";
  257. const ON_LOAD = "onLoad";
  258. const ON_UNLOAD = "onUnload";
  259. function requireNativePlugin(name) {
  260. return weex.requireModule(name);
  261. }
  262. function formatAppLog(type2, filename, ...args) {
  263. if (uni.__log__) {
  264. uni.__log__(type2, filename, ...args);
  265. } else {
  266. console[type2].apply(console, [...args, filename]);
  267. }
  268. }
  269. function resolveEasycom(component, easycom) {
  270. return typeof component === "string" ? easycom : component;
  271. }
  272. const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
  273. !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
  274. };
  275. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  276. const onHide = /* @__PURE__ */ createHook(ON_HIDE);
  277. const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
  278. const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
  279. const onUnload = /* @__PURE__ */ createHook(ON_UNLOAD);
  280. const version = "3";
  281. {
  282. formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", `
  283. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  284. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  285. }
  286. const config = {
  287. v: version,
  288. version,
  289. // 主题名称
  290. type: [
  291. "primary",
  292. "success",
  293. "info",
  294. "error",
  295. "warning"
  296. ],
  297. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  298. color: {
  299. "u-primary": "#2979ff",
  300. "u-warning": "#ff9900",
  301. "u-success": "#19be6b",
  302. "u-error": "#fa3534",
  303. "u-info": "#909399",
  304. "u-main-color": "#303133",
  305. "u-content-color": "#606266",
  306. "u-tips-color": "#909399",
  307. "u-light-color": "#c0c4cc"
  308. },
  309. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  310. unit: "px"
  311. };
  312. const ActionSheet = {
  313. // action-sheet组件
  314. actionSheet: {
  315. show: false,
  316. title: "",
  317. description: "",
  318. actions: () => [],
  319. index: "",
  320. cancelText: "",
  321. closeOnClickAction: true,
  322. safeAreaInsetBottom: true,
  323. openType: "",
  324. closeOnClickOverlay: true,
  325. round: 0
  326. }
  327. };
  328. const Album = {
  329. // album 组件
  330. album: {
  331. urls: () => [],
  332. keyName: "",
  333. singleSize: 180,
  334. multipleSize: 70,
  335. space: 6,
  336. singleMode: "scaleToFill",
  337. multipleMode: "aspectFill",
  338. maxCount: 9,
  339. previewFullImage: true,
  340. rowCount: 3,
  341. showMore: true
  342. }
  343. };
  344. const Alert = {
  345. // alert警告组件
  346. alert: {
  347. title: "",
  348. type: "warning",
  349. description: "",
  350. closable: false,
  351. showIcon: false,
  352. effect: "light",
  353. center: false,
  354. fontSize: 14
  355. }
  356. };
  357. const Avatar = {
  358. // avatar 组件
  359. avatar: {
  360. src: "",
  361. shape: "circle",
  362. size: 40,
  363. mode: "scaleToFill",
  364. text: "",
  365. bgColor: "#c0c4cc",
  366. color: "#ffffff",
  367. fontSize: 18,
  368. icon: "",
  369. mpAvatar: false,
  370. randomBgColor: false,
  371. defaultUrl: "",
  372. colorIndex: "",
  373. name: ""
  374. }
  375. };
  376. const AvatarGroup = {
  377. // avatarGroup 组件
  378. avatarGroup: {
  379. urls: () => [],
  380. maxCount: 5,
  381. shape: "circle",
  382. mode: "scaleToFill",
  383. showMore: true,
  384. size: 40,
  385. keyName: "",
  386. gap: 0.5,
  387. extraValue: 0
  388. }
  389. };
  390. const Backtop = {
  391. // backtop组件
  392. backtop: {
  393. mode: "circle",
  394. icon: "arrow-upward",
  395. text: "",
  396. duration: 100,
  397. scrollTop: 0,
  398. top: 400,
  399. bottom: 100,
  400. right: 20,
  401. zIndex: 9,
  402. iconStyle: () => ({
  403. color: "#909399",
  404. fontSize: "19px"
  405. })
  406. }
  407. };
  408. const Badge = {
  409. // 徽标数组件
  410. badge: {
  411. isDot: false,
  412. value: "",
  413. show: true,
  414. max: 999,
  415. type: "error",
  416. showZero: false,
  417. bgColor: null,
  418. color: null,
  419. shape: "circle",
  420. numberType: "overflow",
  421. offset: () => [],
  422. inverted: false,
  423. absolute: false
  424. }
  425. };
  426. const Button = {
  427. // button组件
  428. button: {
  429. hairline: false,
  430. type: "info",
  431. size: "normal",
  432. shape: "square",
  433. plain: false,
  434. disabled: false,
  435. loading: false,
  436. loadingText: "",
  437. loadingMode: "spinner",
  438. loadingSize: 15,
  439. openType: "",
  440. formType: "",
  441. appParameter: "",
  442. hoverStopPropagation: true,
  443. lang: "en",
  444. sessionFrom: "",
  445. sendMessageTitle: "",
  446. sendMessagePath: "",
  447. sendMessageImg: "",
  448. showMessageCard: false,
  449. dataName: "",
  450. throttleTime: 0,
  451. hoverStartTime: 0,
  452. hoverStayTime: 200,
  453. text: "",
  454. icon: "",
  455. iconColor: "",
  456. color: ""
  457. }
  458. };
  459. const Calendar$2 = {
  460. // calendar 组件
  461. calendar: {
  462. title: "日期选择",
  463. showTitle: true,
  464. showSubtitle: true,
  465. mode: "single",
  466. startText: "开始",
  467. endText: "结束",
  468. customList: () => [],
  469. color: "#3c9cff",
  470. minDate: 0,
  471. maxDate: 0,
  472. defaultDate: null,
  473. maxCount: Number.MAX_SAFE_INTEGER,
  474. // Infinity
  475. rowHeight: 56,
  476. formatter: null,
  477. showLunar: false,
  478. showMark: true,
  479. confirmText: "确定",
  480. confirmDisabledText: "确定",
  481. show: false,
  482. closeOnClickOverlay: false,
  483. readonly: false,
  484. showConfirm: true,
  485. maxRange: Number.MAX_SAFE_INTEGER,
  486. // Infinity
  487. rangePrompt: "",
  488. showRangePrompt: true,
  489. allowSameDay: false,
  490. round: 0,
  491. monthNum: 3
  492. }
  493. };
  494. const CarKeyboard = {
  495. // 车牌号键盘
  496. carKeyboard: {
  497. random: false
  498. }
  499. };
  500. const Cell = {
  501. // cell组件的props
  502. cell: {
  503. customClass: "",
  504. title: "",
  505. label: "",
  506. value: "",
  507. icon: "",
  508. disabled: false,
  509. border: true,
  510. center: false,
  511. url: "",
  512. linkType: "navigateTo",
  513. clickable: false,
  514. isLink: false,
  515. required: false,
  516. arrowDirection: "",
  517. iconStyle: {},
  518. rightIconStyle: {},
  519. rightIcon: "arrow-right",
  520. titleStyle: {},
  521. size: "",
  522. stop: true,
  523. name: ""
  524. }
  525. };
  526. const CellGroup = {
  527. // cell-group组件的props
  528. cellGroup: {
  529. title: "",
  530. border: true,
  531. customStyle: {}
  532. }
  533. };
  534. const Checkbox = {
  535. // checkbox组件
  536. checkbox: {
  537. name: "",
  538. shape: "",
  539. size: "",
  540. checkbox: false,
  541. disabled: "",
  542. activeColor: "",
  543. inactiveColor: "",
  544. iconSize: "",
  545. iconColor: "",
  546. label: "",
  547. labelSize: "",
  548. labelColor: "",
  549. labelDisabled: ""
  550. }
  551. };
  552. const CheckboxGroup = {
  553. // checkbox-group组件
  554. checkboxGroup: {
  555. name: "",
  556. value: () => [],
  557. shape: "square",
  558. disabled: false,
  559. activeColor: "#2979ff",
  560. inactiveColor: "#c8c9cc",
  561. size: 18,
  562. placement: "row",
  563. labelSize: 14,
  564. labelColor: "#303133",
  565. labelDisabled: false,
  566. iconColor: "#ffffff",
  567. iconSize: 12,
  568. iconPlacement: "left",
  569. borderBottom: false
  570. }
  571. };
  572. const CircleProgress = {
  573. // circleProgress 组件
  574. circleProgress: {
  575. percentage: 30
  576. }
  577. };
  578. const Code = {
  579. // code 组件
  580. code: {
  581. seconds: 60,
  582. startText: "获取验证码",
  583. changeText: "X秒重新获取",
  584. endText: "重新获取",
  585. keepRunning: false,
  586. uniqueKey: ""
  587. }
  588. };
  589. const CodeInput = {
  590. // codeInput 组件
  591. codeInput: {
  592. adjustPosition: true,
  593. maxlength: 6,
  594. dot: false,
  595. mode: "box",
  596. hairline: false,
  597. space: 10,
  598. value: "",
  599. focus: false,
  600. bold: false,
  601. color: "#606266",
  602. fontSize: 18,
  603. size: 35,
  604. disabledKeyboard: false,
  605. borderColor: "#c9cacc",
  606. disabledDot: true
  607. }
  608. };
  609. const Col = {
  610. // col 组件
  611. col: {
  612. span: 12,
  613. offset: 0,
  614. justify: "start",
  615. align: "stretch",
  616. textAlign: "left"
  617. }
  618. };
  619. const Collapse = {
  620. // collapse 组件
  621. collapse: {
  622. value: null,
  623. accordion: false,
  624. border: true
  625. }
  626. };
  627. const CollapseItem = {
  628. // collapseItem 组件
  629. collapseItem: {
  630. title: "",
  631. value: "",
  632. label: "",
  633. disabled: false,
  634. isLink: true,
  635. clickable: true,
  636. border: true,
  637. align: "left",
  638. name: "",
  639. icon: "",
  640. duration: 300
  641. }
  642. };
  643. const ColumnNotice = {
  644. // columnNotice 组件
  645. columnNotice: {
  646. text: "",
  647. icon: "volume",
  648. mode: "",
  649. color: "#f9ae3d",
  650. bgColor: "#fdf6ec",
  651. fontSize: 14,
  652. speed: 80,
  653. step: false,
  654. duration: 1500,
  655. disableTouch: true
  656. }
  657. };
  658. const CountDown = {
  659. // u-count-down 计时器组件
  660. countDown: {
  661. time: 0,
  662. format: "HH:mm:ss",
  663. autoStart: true,
  664. millisecond: false
  665. }
  666. };
  667. const CountTo = {
  668. // countTo 组件
  669. countTo: {
  670. startVal: 0,
  671. endVal: 0,
  672. duration: 2e3,
  673. autoplay: true,
  674. decimals: 0,
  675. useEasing: true,
  676. decimal: ".",
  677. color: "#606266",
  678. fontSize: 22,
  679. bold: false,
  680. separator: ""
  681. }
  682. };
  683. const DatetimePicker = {
  684. // datetimePicker 组件
  685. datetimePicker: {
  686. show: false,
  687. showToolbar: true,
  688. value: "",
  689. title: "",
  690. mode: "datetime",
  691. maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
  692. minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
  693. minHour: 0,
  694. maxHour: 23,
  695. minMinute: 0,
  696. maxMinute: 59,
  697. filter: null,
  698. formatter: null,
  699. loading: false,
  700. itemHeight: 44,
  701. cancelText: "取消",
  702. confirmText: "确认",
  703. cancelColor: "#909193",
  704. confirmColor: "#3c9cff",
  705. visibleItemCount: 5,
  706. closeOnClickOverlay: false,
  707. defaultIndex: () => []
  708. }
  709. };
  710. const Divider = {
  711. // divider组件
  712. divider: {
  713. dashed: false,
  714. hairline: true,
  715. dot: false,
  716. textPosition: "center",
  717. text: "",
  718. textSize: 14,
  719. textColor: "#909399",
  720. lineColor: "#dcdfe6"
  721. }
  722. };
  723. const Empty = {
  724. // empty组件
  725. empty: {
  726. icon: "",
  727. text: "",
  728. textColor: "#c0c4cc",
  729. textSize: 14,
  730. iconColor: "#c0c4cc",
  731. iconSize: 90,
  732. mode: "data",
  733. width: 160,
  734. height: 160,
  735. show: true,
  736. marginTop: 0
  737. }
  738. };
  739. const Form = {
  740. // form 组件
  741. form: {
  742. model: () => ({}),
  743. rules: () => ({}),
  744. errorType: "message",
  745. borderBottom: true,
  746. labelPosition: "left",
  747. labelWidth: 45,
  748. labelAlign: "left",
  749. labelStyle: () => ({})
  750. }
  751. };
  752. const GormItem = {
  753. // formItem 组件
  754. formItem: {
  755. label: "",
  756. prop: "",
  757. borderBottom: "",
  758. labelWidth: "",
  759. rightIcon: "",
  760. leftIcon: "",
  761. required: false,
  762. leftIconStyle: ""
  763. }
  764. };
  765. const Gap = {
  766. // gap组件
  767. gap: {
  768. bgColor: "transparent",
  769. height: 20,
  770. marginTop: 0,
  771. marginBottom: 0,
  772. customStyle: {}
  773. }
  774. };
  775. const Grid = {
  776. // grid组件
  777. grid: {
  778. col: 3,
  779. border: false,
  780. align: "left"
  781. }
  782. };
  783. const GridItem = {
  784. // grid-item组件
  785. gridItem: {
  786. name: null,
  787. bgColor: "transparent"
  788. }
  789. };
  790. const {
  791. color: color$3
  792. } = config;
  793. const Icon = {
  794. // icon组件
  795. icon: {
  796. name: "",
  797. color: color$3["u-content-color"],
  798. size: "16px",
  799. bold: false,
  800. index: "",
  801. hoverClass: "",
  802. customPrefix: "uicon",
  803. label: "",
  804. labelPos: "right",
  805. labelSize: "15px",
  806. labelColor: color$3["u-content-color"],
  807. space: "3px",
  808. imgMode: "",
  809. width: "",
  810. height: "",
  811. top: 0,
  812. stop: false
  813. }
  814. };
  815. const Image = {
  816. // image组件
  817. image: {
  818. src: "",
  819. mode: "aspectFill",
  820. width: "300",
  821. height: "225",
  822. shape: "square",
  823. radius: 0,
  824. lazyLoad: true,
  825. showMenuByLongpress: true,
  826. loadingIcon: "photo",
  827. errorIcon: "error-circle",
  828. showLoading: true,
  829. showError: true,
  830. fade: true,
  831. webp: false,
  832. duration: 500,
  833. bgColor: "#f3f4f6"
  834. }
  835. };
  836. const IndexAnchor = {
  837. // indexAnchor 组件
  838. indexAnchor: {
  839. text: "",
  840. color: "#606266",
  841. size: 14,
  842. bgColor: "#dedede",
  843. height: 32
  844. }
  845. };
  846. const IndexList = {
  847. // indexList 组件
  848. indexList: {
  849. inactiveColor: "#606266",
  850. activeColor: "#5677fc",
  851. indexList: () => [],
  852. sticky: true,
  853. customNavHeight: 0
  854. }
  855. };
  856. const Input = {
  857. // index 组件
  858. input: {
  859. value: "",
  860. type: "text",
  861. fixed: false,
  862. disabled: false,
  863. disabledColor: "#f5f7fa",
  864. clearable: false,
  865. password: false,
  866. maxlength: -1,
  867. placeholder: null,
  868. placeholderClass: "input-placeholder",
  869. placeholderStyle: "color: #c0c4cc",
  870. showWordLimit: false,
  871. confirmType: "done",
  872. confirmHold: false,
  873. holdKeyboard: false,
  874. focus: false,
  875. autoBlur: false,
  876. disableDefaultPadding: false,
  877. cursor: -1,
  878. cursorSpacing: 30,
  879. selectionStart: -1,
  880. selectionEnd: -1,
  881. adjustPosition: true,
  882. inputAlign: "left",
  883. fontSize: "15px",
  884. color: "#303133",
  885. prefixIcon: "",
  886. prefixIconStyle: "",
  887. suffixIcon: "",
  888. suffixIconStyle: "",
  889. border: "surround",
  890. readonly: false,
  891. shape: "square",
  892. formatter: null
  893. }
  894. };
  895. const Keyboard = {
  896. // 键盘组件
  897. keyboard: {
  898. mode: "number",
  899. dotDisabled: false,
  900. tooltip: true,
  901. showTips: true,
  902. tips: "",
  903. showCancel: true,
  904. showConfirm: true,
  905. random: false,
  906. safeAreaInsetBottom: true,
  907. closeOnClickOverlay: true,
  908. show: false,
  909. overlay: true,
  910. zIndex: 10075,
  911. cancelText: "取消",
  912. confirmText: "确定",
  913. autoChange: false
  914. }
  915. };
  916. const Line = {
  917. // line组件
  918. line: {
  919. color: "#d6d7d9",
  920. length: "100%",
  921. direction: "row",
  922. hairline: true,
  923. margin: 0,
  924. dashed: false
  925. }
  926. };
  927. const LineProgress = {
  928. // lineProgress 组件
  929. lineProgress: {
  930. activeColor: "#19be6b",
  931. inactiveColor: "#ececec",
  932. percentage: 0,
  933. showText: true,
  934. height: 12
  935. }
  936. };
  937. const {
  938. color: color$2
  939. } = config;
  940. const Link = {
  941. // link超链接组件props参数
  942. link: {
  943. color: color$2["u-primary"],
  944. fontSize: 15,
  945. underLine: false,
  946. href: "",
  947. mpTips: "链接已复制,请在浏览器打开",
  948. lineColor: "",
  949. text: ""
  950. }
  951. };
  952. const List = {
  953. // list 组件
  954. list: {
  955. showScrollbar: false,
  956. lowerThreshold: 50,
  957. upperThreshold: 0,
  958. scrollTop: 0,
  959. offsetAccuracy: 10,
  960. enableFlex: false,
  961. pagingEnabled: false,
  962. scrollable: true,
  963. scrollIntoView: "",
  964. scrollWithAnimation: false,
  965. enableBackToTop: false,
  966. height: 0,
  967. width: 0,
  968. preLoadScreen: 1
  969. }
  970. };
  971. const ListItem = {
  972. // listItem 组件
  973. listItem: {
  974. anchor: ""
  975. }
  976. };
  977. const {
  978. color: color$1
  979. } = config;
  980. const LoadingIcon = {
  981. // loading-icon加载中图标组件
  982. loadingIcon: {
  983. show: true,
  984. color: color$1["u-tips-color"],
  985. textColor: color$1["u-tips-color"],
  986. vertical: false,
  987. mode: "spinner",
  988. size: 24,
  989. textSize: 15,
  990. text: "",
  991. timingFunction: "ease-in-out",
  992. duration: 1200,
  993. inactiveColor: ""
  994. }
  995. };
  996. const LoadingPage = {
  997. // loading-page组件
  998. loadingPage: {
  999. loadingText: "正在加载",
  1000. image: "",
  1001. loadingMode: "circle",
  1002. loading: false,
  1003. bgColor: "#ffffff",
  1004. color: "#C8C8C8",
  1005. fontSize: 19,
  1006. iconSize: 28,
  1007. loadingColor: "#C8C8C8"
  1008. }
  1009. };
  1010. const Loadmore = {
  1011. // loadmore 组件
  1012. loadmore: {
  1013. status: "loadmore",
  1014. bgColor: "transparent",
  1015. icon: true,
  1016. fontSize: 14,
  1017. iconSize: 17,
  1018. color: "#606266",
  1019. loadingIcon: "spinner",
  1020. loadmoreText: "加载更多",
  1021. loadingText: "正在加载...",
  1022. nomoreText: "没有更多了",
  1023. isDot: false,
  1024. iconColor: "#b7b7b7",
  1025. marginTop: 10,
  1026. marginBottom: 10,
  1027. height: "auto",
  1028. line: false,
  1029. lineColor: "#E6E8EB",
  1030. dashed: false
  1031. }
  1032. };
  1033. const Modal = {
  1034. // modal 组件
  1035. modal: {
  1036. show: false,
  1037. title: "",
  1038. content: "",
  1039. confirmText: "确认",
  1040. cancelText: "取消",
  1041. showConfirmButton: true,
  1042. showCancelButton: false,
  1043. confirmColor: "#2979ff",
  1044. cancelColor: "#606266",
  1045. buttonReverse: false,
  1046. zoom: true,
  1047. asyncClose: false,
  1048. closeOnClickOverlay: false,
  1049. negativeTop: 0,
  1050. width: "650rpx",
  1051. confirmButtonShape: ""
  1052. }
  1053. };
  1054. const color = {
  1055. primary: "#3c9cff",
  1056. info: "#909399",
  1057. default: "#909399",
  1058. warning: "#f9ae3d",
  1059. error: "#f56c6c",
  1060. success: "#5ac725",
  1061. mainColor: "#303133",
  1062. contentColor: "#606266",
  1063. tipsColor: "#909399",
  1064. lightColor: "#c0c4cc",
  1065. borderColor: "#e4e7ed"
  1066. };
  1067. const Navbar = {
  1068. // navbar 组件
  1069. navbar: {
  1070. safeAreaInsetTop: true,
  1071. placeholder: false,
  1072. fixed: true,
  1073. border: false,
  1074. leftIcon: "arrow-left",
  1075. leftText: "",
  1076. rightText: "",
  1077. rightIcon: "",
  1078. title: "",
  1079. bgColor: "#ffffff",
  1080. titleWidth: "400rpx",
  1081. height: "44px",
  1082. leftIconSize: 20,
  1083. leftIconColor: color.mainColor,
  1084. autoBack: false,
  1085. titleStyle: ""
  1086. }
  1087. };
  1088. const NoNetwork = {
  1089. // noNetwork
  1090. noNetwork: {
  1091. tips: "哎呀,网络信号丢失",
  1092. zIndex: "",
  1093. image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC"
  1094. }
  1095. };
  1096. const NoticeBar = {
  1097. // noticeBar
  1098. noticeBar: {
  1099. text: () => [],
  1100. direction: "row",
  1101. step: false,
  1102. icon: "volume",
  1103. mode: "",
  1104. color: "#f9ae3d",
  1105. bgColor: "#fdf6ec",
  1106. speed: 80,
  1107. fontSize: 14,
  1108. duration: 2e3,
  1109. disableTouch: true,
  1110. url: "",
  1111. linkType: "navigateTo"
  1112. }
  1113. };
  1114. const Notify = {
  1115. // notify组件
  1116. notify: {
  1117. top: 0,
  1118. type: "primary",
  1119. color: "#ffffff",
  1120. bgColor: "",
  1121. message: "",
  1122. duration: 3e3,
  1123. fontSize: 15,
  1124. safeAreaInsetTop: false
  1125. }
  1126. };
  1127. const NumberBox = {
  1128. // 步进器组件
  1129. numberBox: {
  1130. name: "",
  1131. value: 0,
  1132. min: 1,
  1133. max: Number.MAX_SAFE_INTEGER,
  1134. step: 1,
  1135. integer: false,
  1136. disabled: false,
  1137. disabledInput: false,
  1138. asyncChange: false,
  1139. inputWidth: 35,
  1140. showMinus: true,
  1141. showPlus: true,
  1142. decimalLength: null,
  1143. longPress: true,
  1144. color: "#323233",
  1145. buttonSize: 30,
  1146. bgColor: "#EBECEE",
  1147. cursorSpacing: 100,
  1148. disableMinus: false,
  1149. disablePlus: false,
  1150. iconStyle: ""
  1151. }
  1152. };
  1153. const NumberKeyboard = {
  1154. // 数字键盘
  1155. numberKeyboard: {
  1156. mode: "number",
  1157. dotDisabled: false,
  1158. random: false
  1159. }
  1160. };
  1161. const Overlay = {
  1162. // overlay组件
  1163. overlay: {
  1164. show: false,
  1165. zIndex: 10070,
  1166. duration: 300,
  1167. opacity: 0.5
  1168. }
  1169. };
  1170. const Parse = {
  1171. // parse
  1172. parse: {
  1173. copyLink: true,
  1174. errorImg: "",
  1175. lazyLoad: false,
  1176. loadingImg: "",
  1177. pauseVideo: true,
  1178. previewImg: true,
  1179. setTitle: true,
  1180. showImgMenu: true
  1181. }
  1182. };
  1183. const Picker = {
  1184. // picker
  1185. picker: {
  1186. show: false,
  1187. showToolbar: true,
  1188. title: "",
  1189. columns: () => [],
  1190. loading: false,
  1191. itemHeight: 44,
  1192. cancelText: "取消",
  1193. confirmText: "确定",
  1194. cancelColor: "#909193",
  1195. confirmColor: "#3c9cff",
  1196. visibleItemCount: 5,
  1197. keyName: "text",
  1198. closeOnClickOverlay: false,
  1199. defaultIndex: () => [],
  1200. immediateChange: false
  1201. }
  1202. };
  1203. const Popup = {
  1204. // popup组件
  1205. popup: {
  1206. show: false,
  1207. overlay: true,
  1208. mode: "bottom",
  1209. duration: 300,
  1210. closeable: false,
  1211. overlayStyle: () => {
  1212. },
  1213. closeOnClickOverlay: true,
  1214. zIndex: 10075,
  1215. safeAreaInsetBottom: true,
  1216. safeAreaInsetTop: false,
  1217. closeIconPos: "top-right",
  1218. round: 0,
  1219. zoom: true,
  1220. bgColor: "",
  1221. overlayOpacity: 0.5
  1222. }
  1223. };
  1224. const Radio = {
  1225. // radio组件
  1226. radio: {
  1227. name: "",
  1228. shape: "",
  1229. disabled: "",
  1230. labelDisabled: "",
  1231. activeColor: "",
  1232. inactiveColor: "",
  1233. iconSize: "",
  1234. labelSize: "",
  1235. label: "",
  1236. labelColor: "",
  1237. size: "",
  1238. iconColor: "",
  1239. placement: ""
  1240. }
  1241. };
  1242. const RadioGroup = {
  1243. // radio-group组件
  1244. radioGroup: {
  1245. value: "",
  1246. disabled: false,
  1247. shape: "circle",
  1248. activeColor: "#2979ff",
  1249. inactiveColor: "#c8c9cc",
  1250. name: "",
  1251. size: 18,
  1252. placement: "row",
  1253. label: "",
  1254. labelColor: "#303133",
  1255. labelSize: 14,
  1256. labelDisabled: false,
  1257. iconColor: "#ffffff",
  1258. iconSize: 12,
  1259. borderBottom: false,
  1260. iconPlacement: "left"
  1261. }
  1262. };
  1263. const Rate = {
  1264. // rate组件
  1265. rate: {
  1266. value: 1,
  1267. count: 5,
  1268. disabled: false,
  1269. size: 18,
  1270. inactiveColor: "#b2b2b2",
  1271. activeColor: "#FA3534",
  1272. gutter: 4,
  1273. minCount: 1,
  1274. allowHalf: false,
  1275. activeIcon: "star-fill",
  1276. inactiveIcon: "star",
  1277. touchable: true
  1278. }
  1279. };
  1280. const ReadMore = {
  1281. // readMore
  1282. readMore: {
  1283. showHeight: 400,
  1284. toggle: false,
  1285. closeText: "展开阅读全文",
  1286. openText: "收起",
  1287. color: "#2979ff",
  1288. fontSize: 14,
  1289. textIndent: "2em",
  1290. name: ""
  1291. }
  1292. };
  1293. const Row = {
  1294. // row
  1295. row: {
  1296. gutter: 0,
  1297. justify: "start",
  1298. align: "center"
  1299. }
  1300. };
  1301. const RowNotice = {
  1302. // rowNotice
  1303. rowNotice: {
  1304. text: "",
  1305. icon: "volume",
  1306. mode: "",
  1307. color: "#f9ae3d",
  1308. bgColor: "#fdf6ec",
  1309. fontSize: 14,
  1310. speed: 80
  1311. }
  1312. };
  1313. const ScrollList = {
  1314. // scrollList
  1315. scrollList: {
  1316. indicatorWidth: 50,
  1317. indicatorBarWidth: 20,
  1318. indicator: true,
  1319. indicatorColor: "#f2f2f2",
  1320. indicatorActiveColor: "#3c9cff",
  1321. indicatorStyle: ""
  1322. }
  1323. };
  1324. const Search = {
  1325. // search
  1326. search: {
  1327. shape: "round",
  1328. bgColor: "#f2f2f2",
  1329. placeholder: "请输入关键字",
  1330. clearabled: true,
  1331. focus: false,
  1332. showAction: true,
  1333. actionStyle: () => ({}),
  1334. actionText: "搜索",
  1335. inputAlign: "left",
  1336. inputStyle: () => ({}),
  1337. disabled: false,
  1338. borderColor: "transparent",
  1339. searchIconColor: "#909399",
  1340. searchIconSize: 22,
  1341. color: "#606266",
  1342. placeholderColor: "#909399",
  1343. searchIcon: "search",
  1344. margin: "0",
  1345. animation: false,
  1346. value: "",
  1347. maxlength: "-1",
  1348. height: 32,
  1349. label: null
  1350. }
  1351. };
  1352. const Section = {
  1353. // u-section组件
  1354. section: {
  1355. title: "",
  1356. subTitle: "更多",
  1357. right: true,
  1358. fontSize: 15,
  1359. bold: true,
  1360. color: "#303133",
  1361. subColor: "#909399",
  1362. showLine: true,
  1363. lineColor: "",
  1364. arrow: true
  1365. }
  1366. };
  1367. const Skeleton = {
  1368. // skeleton
  1369. skeleton: {
  1370. loading: true,
  1371. animate: true,
  1372. rows: 0,
  1373. rowsWidth: "100%",
  1374. rowsHeight: 18,
  1375. title: true,
  1376. titleWidth: "50%",
  1377. titleHeight: 18,
  1378. avatar: false,
  1379. avatarSize: 32,
  1380. avatarShape: "circle"
  1381. }
  1382. };
  1383. const Slider = {
  1384. // slider组件
  1385. slider: {
  1386. value: 0,
  1387. blockSize: 18,
  1388. min: 0,
  1389. max: 100,
  1390. step: 1,
  1391. activeColor: "#2979ff",
  1392. inactiveColor: "#c0c4cc",
  1393. blockColor: "#ffffff",
  1394. showValue: false,
  1395. disabled: false,
  1396. blockStyle: () => {
  1397. }
  1398. }
  1399. };
  1400. const StatusBar = {
  1401. // statusBar
  1402. statusBar: {
  1403. bgColor: "transparent"
  1404. }
  1405. };
  1406. const Steps = {
  1407. // steps组件
  1408. steps: {
  1409. direction: "row",
  1410. current: 0,
  1411. activeColor: "#3c9cff",
  1412. inactiveColor: "#969799",
  1413. activeIcon: "",
  1414. inactiveIcon: "",
  1415. dot: false
  1416. }
  1417. };
  1418. const StepsItem = {
  1419. // steps-item组件
  1420. stepsItem: {
  1421. title: "",
  1422. desc: "",
  1423. iconSize: 17,
  1424. error: false
  1425. }
  1426. };
  1427. const Sticky = {
  1428. // sticky组件
  1429. sticky: {
  1430. offsetTop: 0,
  1431. customNavHeight: 0,
  1432. disabled: false,
  1433. bgColor: "transparent",
  1434. zIndex: "",
  1435. index: ""
  1436. }
  1437. };
  1438. const Subsection = {
  1439. // subsection组件
  1440. subsection: {
  1441. list: [],
  1442. current: 0,
  1443. activeColor: "#3c9cff",
  1444. inactiveColor: "#303133",
  1445. mode: "button",
  1446. fontSize: 12,
  1447. bold: true,
  1448. bgColor: "#eeeeef",
  1449. keyName: "name"
  1450. }
  1451. };
  1452. const SwipeAction = {
  1453. // swipe-action组件
  1454. swipeAction: {
  1455. autoClose: true
  1456. }
  1457. };
  1458. const SwipeActionItem = {
  1459. // swipeActionItem 组件
  1460. swipeActionItem: {
  1461. show: false,
  1462. name: "",
  1463. disabled: false,
  1464. threshold: 20,
  1465. autoClose: true,
  1466. options: [],
  1467. duration: 300
  1468. }
  1469. };
  1470. const Swiper = {
  1471. // swiper 组件
  1472. swiper: {
  1473. list: () => [],
  1474. indicator: false,
  1475. indicatorActiveColor: "#FFFFFF",
  1476. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  1477. indicatorStyle: "",
  1478. indicatorMode: "line",
  1479. autoplay: true,
  1480. current: 0,
  1481. currentItemId: "",
  1482. interval: 3e3,
  1483. duration: 300,
  1484. circular: false,
  1485. previousMargin: 0,
  1486. nextMargin: 0,
  1487. acceleration: false,
  1488. displayMultipleItems: 1,
  1489. easingFunction: "default",
  1490. keyName: "url",
  1491. imgMode: "aspectFill",
  1492. height: 130,
  1493. bgColor: "#f3f4f6",
  1494. radius: 4,
  1495. loading: false,
  1496. showTitle: false
  1497. }
  1498. };
  1499. const SwipterIndicator = {
  1500. // swiperIndicator 组件
  1501. swiperIndicator: {
  1502. length: 0,
  1503. current: 0,
  1504. indicatorActiveColor: "",
  1505. indicatorInactiveColor: "",
  1506. indicatorMode: "line"
  1507. }
  1508. };
  1509. const Switch = {
  1510. // switch
  1511. switch: {
  1512. loading: false,
  1513. disabled: false,
  1514. size: 25,
  1515. activeColor: "#2979ff",
  1516. inactiveColor: "#ffffff",
  1517. value: false,
  1518. activeValue: true,
  1519. inactiveValue: false,
  1520. asyncChange: false,
  1521. space: 0
  1522. }
  1523. };
  1524. const Tabbar = {
  1525. // tabbar
  1526. tabbar: {
  1527. value: null,
  1528. safeAreaInsetBottom: true,
  1529. border: true,
  1530. zIndex: 1,
  1531. activeColor: "#1989fa",
  1532. inactiveColor: "#7d7e80",
  1533. fixed: true,
  1534. placeholder: true
  1535. }
  1536. };
  1537. const TabbarItem = {
  1538. //
  1539. tabbarItem: {
  1540. name: null,
  1541. icon: "",
  1542. badge: null,
  1543. dot: false,
  1544. text: "",
  1545. badgeStyle: "top: 6px;right:2px;"
  1546. }
  1547. };
  1548. const Tabs = {
  1549. //
  1550. tabs: {
  1551. duration: 300,
  1552. list: () => [],
  1553. lineColor: "#3c9cff",
  1554. activeStyle: () => ({
  1555. color: "#303133"
  1556. }),
  1557. inactiveStyle: () => ({
  1558. color: "#606266"
  1559. }),
  1560. lineWidth: 20,
  1561. lineHeight: 3,
  1562. lineBgSize: "cover",
  1563. itemStyle: () => ({
  1564. height: "44px"
  1565. }),
  1566. scrollable: true,
  1567. current: 0,
  1568. keyName: "name"
  1569. }
  1570. };
  1571. const Tag = {
  1572. // tag 组件
  1573. tag: {
  1574. type: "primary",
  1575. disabled: false,
  1576. size: "medium",
  1577. shape: "square",
  1578. text: "",
  1579. bgColor: "",
  1580. color: "",
  1581. borderColor: "",
  1582. closeColor: "#C6C7CB",
  1583. name: "",
  1584. plainFill: false,
  1585. plain: false,
  1586. closable: false,
  1587. show: true,
  1588. icon: ""
  1589. }
  1590. };
  1591. const Text = {
  1592. // text 组件
  1593. text: {
  1594. type: "",
  1595. show: true,
  1596. text: "",
  1597. prefixIcon: "",
  1598. suffixIcon: "",
  1599. mode: "",
  1600. href: "",
  1601. format: "",
  1602. call: false,
  1603. openType: "",
  1604. bold: false,
  1605. block: false,
  1606. lines: "",
  1607. color: "#303133",
  1608. size: 15,
  1609. iconStyle: () => ({
  1610. fontSize: "15px"
  1611. }),
  1612. decoration: "none",
  1613. margin: 0,
  1614. lineHeight: "",
  1615. align: "left",
  1616. wordWrap: "normal"
  1617. }
  1618. };
  1619. const Textarea = {
  1620. // textarea 组件
  1621. textarea: {
  1622. value: "",
  1623. placeholder: "",
  1624. placeholderClass: "textarea-placeholder",
  1625. placeholderStyle: "color: #c0c4cc",
  1626. height: 70,
  1627. confirmType: "done",
  1628. disabled: false,
  1629. count: false,
  1630. focus: false,
  1631. autoHeight: false,
  1632. fixed: false,
  1633. cursorSpacing: 0,
  1634. cursor: "",
  1635. showConfirmBar: true,
  1636. selectionStart: -1,
  1637. selectionEnd: -1,
  1638. adjustPosition: true,
  1639. disableDefaultPadding: false,
  1640. holdKeyboard: false,
  1641. maxlength: 140,
  1642. border: "surround",
  1643. formatter: null
  1644. }
  1645. };
  1646. const Toast = {
  1647. // toast组件
  1648. toast: {
  1649. zIndex: 10090,
  1650. loading: false,
  1651. text: "",
  1652. icon: "",
  1653. type: "",
  1654. loadingMode: "",
  1655. show: "",
  1656. overlay: false,
  1657. position: "center",
  1658. params: () => {
  1659. },
  1660. duration: 2e3,
  1661. isTab: false,
  1662. url: "",
  1663. callback: null,
  1664. back: false
  1665. }
  1666. };
  1667. const Toolbar = {
  1668. // toolbar 组件
  1669. toolbar: {
  1670. show: true,
  1671. cancelText: "取消",
  1672. confirmText: "确认",
  1673. cancelColor: "#909193",
  1674. confirmColor: "#3c9cff",
  1675. title: ""
  1676. }
  1677. };
  1678. const Tooltip = {
  1679. // tooltip 组件
  1680. tooltip: {
  1681. text: "",
  1682. copyText: "",
  1683. size: 14,
  1684. color: "#606266",
  1685. bgColor: "transparent",
  1686. direction: "top",
  1687. zIndex: 10071,
  1688. showCopy: true,
  1689. buttons: () => [],
  1690. overlay: true,
  1691. showToast: true
  1692. }
  1693. };
  1694. const Transition = {
  1695. // transition动画组件的props
  1696. transition: {
  1697. show: false,
  1698. mode: "fade",
  1699. duration: "300",
  1700. timingFunction: "ease-out"
  1701. }
  1702. };
  1703. const Upload = {
  1704. // upload组件
  1705. upload: {
  1706. accept: "image",
  1707. capture: () => ["album", "camera"],
  1708. compressed: true,
  1709. camera: "back",
  1710. maxDuration: 60,
  1711. uploadIcon: "camera-fill",
  1712. uploadIconColor: "#D3D4D6",
  1713. useBeforeRead: false,
  1714. previewFullImage: true,
  1715. maxCount: 52,
  1716. disabled: false,
  1717. imageMode: "aspectFill",
  1718. name: "",
  1719. sizeType: () => ["original", "compressed"],
  1720. multiple: false,
  1721. deletable: true,
  1722. maxSize: Number.MAX_VALUE,
  1723. fileList: () => [],
  1724. uploadText: "",
  1725. width: 80,
  1726. height: 80,
  1727. previewImage: true
  1728. }
  1729. };
  1730. const drawer = {
  1731. // 抽屉组件
  1732. drawer: {
  1733. // 是否显示
  1734. show: false,
  1735. // 点击遮罩是否关闭
  1736. mask: true,
  1737. // // 是否显示关闭按钮
  1738. // closeBtn:true,
  1739. // 抽屉宽度
  1740. width: "40%",
  1741. // 抽屉位置
  1742. placement: "left",
  1743. // 权重
  1744. zIndex: 100
  1745. }
  1746. };
  1747. const props$G = {
  1748. ...ActionSheet,
  1749. ...Album,
  1750. ...Alert,
  1751. ...Avatar,
  1752. ...AvatarGroup,
  1753. ...Backtop,
  1754. ...Badge,
  1755. ...Button,
  1756. ...Calendar$2,
  1757. ...CarKeyboard,
  1758. ...Cell,
  1759. ...CellGroup,
  1760. ...Checkbox,
  1761. ...CheckboxGroup,
  1762. ...CircleProgress,
  1763. ...Code,
  1764. ...CodeInput,
  1765. ...Col,
  1766. ...Collapse,
  1767. ...CollapseItem,
  1768. ...ColumnNotice,
  1769. ...CountDown,
  1770. ...CountTo,
  1771. ...DatetimePicker,
  1772. ...Divider,
  1773. ...Empty,
  1774. ...Form,
  1775. ...GormItem,
  1776. ...Gap,
  1777. ...Grid,
  1778. ...GridItem,
  1779. ...Icon,
  1780. ...Image,
  1781. ...IndexAnchor,
  1782. ...IndexList,
  1783. ...Input,
  1784. ...Keyboard,
  1785. ...Line,
  1786. ...LineProgress,
  1787. ...Link,
  1788. ...List,
  1789. ...ListItem,
  1790. ...LoadingIcon,
  1791. ...LoadingPage,
  1792. ...Loadmore,
  1793. ...Modal,
  1794. ...Navbar,
  1795. ...NoNetwork,
  1796. ...NoticeBar,
  1797. ...Notify,
  1798. ...NumberBox,
  1799. ...NumberKeyboard,
  1800. ...Overlay,
  1801. ...Parse,
  1802. ...Picker,
  1803. ...Popup,
  1804. ...Radio,
  1805. ...RadioGroup,
  1806. ...Rate,
  1807. ...ReadMore,
  1808. ...Row,
  1809. ...RowNotice,
  1810. ...ScrollList,
  1811. ...Search,
  1812. ...Section,
  1813. ...Skeleton,
  1814. ...Slider,
  1815. ...StatusBar,
  1816. ...Steps,
  1817. ...StepsItem,
  1818. ...Sticky,
  1819. ...Subsection,
  1820. ...SwipeAction,
  1821. ...SwipeActionItem,
  1822. ...Swiper,
  1823. ...SwipterIndicator,
  1824. ...Switch,
  1825. ...Tabbar,
  1826. ...TabbarItem,
  1827. ...Tabs,
  1828. ...Tag,
  1829. ...Text,
  1830. ...Textarea,
  1831. ...Toast,
  1832. ...Toolbar,
  1833. ...Tooltip,
  1834. ...Transition,
  1835. ...Upload,
  1836. ...drawer
  1837. };
  1838. const props$F = {
  1839. props: {
  1840. // 图标类名
  1841. name: {
  1842. type: String,
  1843. default: props$G.icon.name
  1844. },
  1845. // 图标颜色,可接受主题色
  1846. color: {
  1847. type: String,
  1848. default: props$G.icon.color
  1849. },
  1850. // 字体大小,单位px
  1851. size: {
  1852. type: [String, Number],
  1853. default: props$G.icon.size
  1854. },
  1855. // 是否显示粗体
  1856. bold: {
  1857. type: Boolean,
  1858. default: props$G.icon.bold
  1859. },
  1860. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  1861. index: {
  1862. type: [String, Number],
  1863. default: props$G.icon.index
  1864. },
  1865. // 触摸图标时的类名
  1866. hoverClass: {
  1867. type: String,
  1868. default: props$G.icon.hoverClass
  1869. },
  1870. // 自定义扩展前缀,方便用户扩展自己的图标库
  1871. customPrefix: {
  1872. type: String,
  1873. default: props$G.icon.customPrefix
  1874. },
  1875. // 图标右边或者下面的文字
  1876. label: {
  1877. type: [String, Number],
  1878. default: props$G.icon.label
  1879. },
  1880. // label的位置,只能右边或者下边
  1881. labelPos: {
  1882. type: String,
  1883. default: props$G.icon.labelPos
  1884. },
  1885. // label的大小
  1886. labelSize: {
  1887. type: [String, Number],
  1888. default: props$G.icon.labelSize
  1889. },
  1890. // label的颜色
  1891. labelColor: {
  1892. type: String,
  1893. default: props$G.icon.labelColor
  1894. },
  1895. // label与图标的距离
  1896. space: {
  1897. type: [String, Number],
  1898. default: props$G.icon.space
  1899. },
  1900. // 图片的mode
  1901. imgMode: {
  1902. type: String,
  1903. default: props$G.icon.imgMode
  1904. },
  1905. // 用于显示图片小图标时,图片的宽度
  1906. width: {
  1907. type: [String, Number],
  1908. default: props$G.icon.width
  1909. },
  1910. // 用于显示图片小图标时,图片的高度
  1911. height: {
  1912. type: [String, Number],
  1913. default: props$G.icon.height
  1914. },
  1915. // 用于解决某些情况下,让图标垂直居中的用途
  1916. top: {
  1917. type: [String, Number],
  1918. default: props$G.icon.top
  1919. },
  1920. // 是否阻止事件传播
  1921. stop: {
  1922. type: Boolean,
  1923. default: props$G.icon.stop
  1924. }
  1925. }
  1926. };
  1927. const mpMixin = {};
  1928. const mixin = {
  1929. // 定义每个组件都可能需要用到的外部样式以及类名
  1930. props: {
  1931. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  1932. customStyle: {
  1933. type: [Object, String],
  1934. default: () => ({})
  1935. },
  1936. customClass: {
  1937. type: String,
  1938. default: ""
  1939. },
  1940. // 跳转的页面路径
  1941. url: {
  1942. type: String,
  1943. default: ""
  1944. },
  1945. // 页面跳转的类型
  1946. linkType: {
  1947. type: String,
  1948. default: "navigateTo"
  1949. }
  1950. },
  1951. data() {
  1952. return {};
  1953. },
  1954. onLoad() {
  1955. this.$u.getRect = this.$uGetRect;
  1956. },
  1957. created() {
  1958. this.$u.getRect = this.$uGetRect;
  1959. },
  1960. computed: {
  1961. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  1962. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  1963. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  1964. $u() {
  1965. return uni.$u.deepMerge(uni.$u, {
  1966. props: void 0,
  1967. http: void 0,
  1968. mixin: void 0
  1969. });
  1970. },
  1971. /**
  1972. * 生成bem规则类名
  1973. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  1974. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  1975. * @param {String} name 组件名称
  1976. * @param {Array} fixed 一直会存在的类名
  1977. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  1978. * @returns {Array|string}
  1979. */
  1980. bem() {
  1981. return function(name, fixed, change) {
  1982. const prefix = `u-${name}--`;
  1983. const classes = {};
  1984. if (fixed) {
  1985. fixed.map((item) => {
  1986. classes[prefix + this[item]] = true;
  1987. });
  1988. }
  1989. if (change) {
  1990. change.map((item) => {
  1991. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  1992. });
  1993. }
  1994. return Object.keys(classes);
  1995. };
  1996. }
  1997. },
  1998. methods: {
  1999. // 跳转某一个页面
  2000. openPage(urlKey = "url") {
  2001. const url2 = this[urlKey];
  2002. if (url2) {
  2003. this.$u.route({ type: this.linkType, url: url2 });
  2004. }
  2005. },
  2006. // 查询节点信息
  2007. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  2008. // 解决办法为在组件根部再套一个没有任何作用的view元素
  2009. $uGetRect(selector, all) {
  2010. return new Promise((resolve) => {
  2011. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  2012. if (all && Array.isArray(rect) && rect.length) {
  2013. resolve(rect);
  2014. }
  2015. if (!all && rect) {
  2016. resolve(rect);
  2017. }
  2018. }).exec();
  2019. });
  2020. },
  2021. getParentData(parentName = "") {
  2022. if (!this.parent)
  2023. this.parent = {};
  2024. this.parent = uni.$u.$parent.call(this, parentName);
  2025. if (this.parent.children) {
  2026. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  2027. }
  2028. if (this.parent && this.parentData) {
  2029. Object.keys(this.parentData).map((key) => {
  2030. this.parentData[key] = this.parent[key];
  2031. });
  2032. }
  2033. },
  2034. // 阻止事件冒泡
  2035. preventEvent(e) {
  2036. e && typeof e.stopPropagation === "function" && e.stopPropagation();
  2037. },
  2038. // 空操作
  2039. noop(e) {
  2040. this.preventEvent(e);
  2041. }
  2042. },
  2043. onReachBottom() {
  2044. uni.$emit("uOnReachBottom");
  2045. },
  2046. beforeDestroy() {
  2047. if (this.parent && uni.$u.test.array(this.parent.children)) {
  2048. const childrenList = this.parent.children;
  2049. childrenList.map((child, index2) => {
  2050. if (child === this) {
  2051. childrenList.splice(index2, 1);
  2052. }
  2053. });
  2054. }
  2055. }
  2056. };
  2057. const _export_sfc = (sfc, props2) => {
  2058. const target = sfc.__vccOpts || sfc;
  2059. for (const [key, val] of props2) {
  2060. target[key] = val;
  2061. }
  2062. return target;
  2063. };
  2064. const _sfc_main$28 = {
  2065. name: "u-icon",
  2066. data() {
  2067. return {};
  2068. },
  2069. emits: ["click"],
  2070. mixins: [mpMixin, mixin, props$F],
  2071. computed: {
  2072. uClasses() {
  2073. let classes = [];
  2074. classes.push(this.customPrefix + "-" + this.name);
  2075. if (this.color && uni.$u.config.type.includes(this.color))
  2076. classes.push("u-icon__icon--" + this.color);
  2077. return classes;
  2078. },
  2079. iconStyle() {
  2080. let style = {};
  2081. style = {
  2082. fontSize: uni.$u.addUnit(this.size),
  2083. lineHeight: uni.$u.addUnit(this.size),
  2084. fontWeight: this.bold ? "bold" : "normal",
  2085. // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
  2086. top: uni.$u.addUnit(this.top)
  2087. };
  2088. if (this.color && !uni.$u.config.type.includes(this.color))
  2089. style.color = this.color;
  2090. return style;
  2091. },
  2092. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  2093. isImg() {
  2094. return this.name.indexOf("/") !== -1;
  2095. },
  2096. imgStyle() {
  2097. let style = {};
  2098. style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size);
  2099. style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size);
  2100. return style;
  2101. },
  2102. // 通过图标名,查找对应的图标
  2103. icon() {
  2104. return icons$1["uicon-" + this.name] || this.name;
  2105. }
  2106. },
  2107. methods: {
  2108. clickHandler(e) {
  2109. this.$emit("click", this.index);
  2110. this.stop && this.preventEvent(e);
  2111. }
  2112. }
  2113. };
  2114. function _sfc_render$27(_ctx, _cache, $props, $setup, $data, $options) {
  2115. return vue.openBlock(), vue.createElementBlock(
  2116. "view",
  2117. {
  2118. class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]),
  2119. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  2120. },
  2121. [
  2122. $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
  2123. key: 0,
  2124. class: "u-icon__img",
  2125. src: _ctx.name,
  2126. mode: _ctx.imgMode,
  2127. style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  2128. }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
  2129. key: 1,
  2130. class: vue.normalizeClass(["u-icon__icon", $options.uClasses]),
  2131. style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  2132. "hover-class": _ctx.hoverClass
  2133. }, vue.toDisplayString($options.icon), 15, ["hover-class"])),
  2134. vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
  2135. _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
  2136. "text",
  2137. {
  2138. key: 2,
  2139. class: "u-icon__label",
  2140. style: vue.normalizeStyle({
  2141. color: _ctx.labelColor,
  2142. fontSize: _ctx.$u.addUnit(_ctx.labelSize),
  2143. marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2144. marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2145. marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2146. marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0
  2147. })
  2148. },
  2149. vue.toDisplayString(_ctx.label),
  2150. 5
  2151. /* TEXT, STYLE */
  2152. )) : vue.createCommentVNode("v-if", true)
  2153. ],
  2154. 2
  2155. /* CLASS */
  2156. );
  2157. }
  2158. const __easycom_0$f = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["render", _sfc_render$27], ["__scopeId", "data-v-ac70166d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
  2159. const props$E = {
  2160. props: {
  2161. // 绑定的值
  2162. modelValue: {
  2163. type: [String, Number],
  2164. default: props$G.input.value
  2165. },
  2166. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  2167. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  2168. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  2169. // text-文本输入键盘
  2170. type: {
  2171. type: String,
  2172. default: props$G.input.type
  2173. },
  2174. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  2175. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  2176. fixed: {
  2177. type: Boolean,
  2178. default: props$G.input.fixed
  2179. },
  2180. // 是否禁用输入框
  2181. disabled: {
  2182. type: Boolean,
  2183. default: props$G.input.disabled
  2184. },
  2185. // 禁用状态时的背景色
  2186. disabledColor: {
  2187. type: String,
  2188. default: props$G.input.disabledColor
  2189. },
  2190. // 是否显示清除控件
  2191. clearable: {
  2192. type: Boolean,
  2193. default: props$G.input.clearable
  2194. },
  2195. // 是否密码类型
  2196. password: {
  2197. type: Boolean,
  2198. default: props$G.input.password
  2199. },
  2200. // 最大输入长度,设置为 -1 的时候不限制最大长度
  2201. maxlength: {
  2202. type: [String, Number],
  2203. default: props$G.input.maxlength
  2204. },
  2205. // 输入框为空时的占位符
  2206. placeholder: {
  2207. type: String,
  2208. default: props$G.input.placeholder
  2209. },
  2210. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  2211. placeholderClass: {
  2212. type: String,
  2213. default: props$G.input.placeholderClass
  2214. },
  2215. // 指定placeholder的样式
  2216. placeholderStyle: {
  2217. type: [String, Object],
  2218. default: props$G.input.placeholderStyle
  2219. },
  2220. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  2221. showWordLimit: {
  2222. type: Boolean,
  2223. default: props$G.input.showWordLimit
  2224. },
  2225. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  2226. // https://uniapp.dcloud.io/component/input
  2227. // https://uniapp.dcloud.io/component/textarea
  2228. confirmType: {
  2229. type: String,
  2230. default: props$G.input.confirmType
  2231. },
  2232. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  2233. confirmHold: {
  2234. type: Boolean,
  2235. default: props$G.input.confirmHold
  2236. },
  2237. // focus时,点击页面的时候不收起键盘,微信小程序有效
  2238. holdKeyboard: {
  2239. type: Boolean,
  2240. default: props$G.input.holdKeyboard
  2241. },
  2242. // 自动获取焦点
  2243. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  2244. focus: {
  2245. type: Boolean,
  2246. default: props$G.input.focus
  2247. },
  2248. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  2249. autoBlur: {
  2250. type: Boolean,
  2251. default: props$G.input.autoBlur
  2252. },
  2253. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  2254. disableDefaultPadding: {
  2255. type: Boolean,
  2256. default: props$G.input.disableDefaultPadding
  2257. },
  2258. // 指定focus时光标的位置
  2259. cursor: {
  2260. type: [String, Number],
  2261. default: props$G.input.cursor
  2262. },
  2263. // 输入框聚焦时底部与键盘的距离
  2264. cursorSpacing: {
  2265. type: [String, Number],
  2266. default: props$G.input.cursorSpacing
  2267. },
  2268. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  2269. selectionStart: {
  2270. type: [String, Number],
  2271. default: props$G.input.selectionStart
  2272. },
  2273. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  2274. selectionEnd: {
  2275. type: [String, Number],
  2276. default: props$G.input.selectionEnd
  2277. },
  2278. // 键盘弹起时,是否自动上推页面
  2279. adjustPosition: {
  2280. type: Boolean,
  2281. default: props$G.input.adjustPosition
  2282. },
  2283. // 输入框内容对齐方式,可选值为:left|center|right
  2284. inputAlign: {
  2285. type: String,
  2286. default: props$G.input.inputAlign
  2287. },
  2288. // 输入框字体的大小
  2289. fontSize: {
  2290. type: [String, Number],
  2291. default: "34rpx"
  2292. },
  2293. // 输入框字体颜色
  2294. color: {
  2295. type: String,
  2296. default: props$G.input.color
  2297. },
  2298. // 输入框前置图标
  2299. prefixIcon: {
  2300. type: String,
  2301. default: props$G.input.prefixIcon
  2302. },
  2303. // 前置图标样式,对象或字符串
  2304. prefixIconStyle: {
  2305. type: [String, Object],
  2306. default: props$G.input.prefixIconStyle
  2307. },
  2308. // 输入框后置图标
  2309. suffixIcon: {
  2310. type: String,
  2311. default: props$G.input.suffixIcon
  2312. },
  2313. // 后置图标样式,对象或字符串
  2314. suffixIconStyle: {
  2315. type: [String, Object],
  2316. default: props$G.input.suffixIconStyle
  2317. },
  2318. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  2319. border: {
  2320. type: String,
  2321. default: props$G.input.border
  2322. },
  2323. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  2324. readonly: {
  2325. type: Boolean,
  2326. default: props$G.input.readonly
  2327. },
  2328. // 输入框形状,circle-圆形,square-方形
  2329. shape: {
  2330. type: String,
  2331. default: props$G.input.shape
  2332. },
  2333. // 用于处理或者过滤输入框内容的方法
  2334. formatter: {
  2335. type: [Function, null],
  2336. default: props$G.input.formatter
  2337. },
  2338. // 是否忽略组件内对文本合成系统事件的处理
  2339. ignoreCompositionEvent: {
  2340. type: Boolean,
  2341. default: true
  2342. }
  2343. }
  2344. };
  2345. const _sfc_main$27 = {
  2346. name: "u-input",
  2347. mixins: [mpMixin, mixin, props$E],
  2348. data() {
  2349. return {
  2350. // 输入框的值
  2351. innerValue: "",
  2352. // 是否处于获得焦点状态
  2353. focused: false,
  2354. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  2355. firstChange: true,
  2356. // value绑定值的变化是由内部还是外部引起的
  2357. changeFromInner: false,
  2358. // 过滤处理方法
  2359. innerFormatter: (value2) => value2
  2360. };
  2361. },
  2362. watch: {
  2363. modelValue: {
  2364. immediate: true,
  2365. handler(newVal, oldVal) {
  2366. this.innerValue = newVal;
  2367. this.firstChange = false;
  2368. this.changeFromInner = false;
  2369. }
  2370. }
  2371. },
  2372. computed: {
  2373. // 是否显示清除控件
  2374. isShowClear() {
  2375. const { clearable, readonly, focused, innerValue } = this;
  2376. return !!clearable && !readonly && !!focused && innerValue !== "";
  2377. },
  2378. // 组件的类名
  2379. inputClass() {
  2380. let classes = [], { border, disabled, shape } = this;
  2381. border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
  2382. classes.push(`u-input--${shape}`);
  2383. border === "bottom" && (classes = classes.concat([
  2384. "u-border-bottom",
  2385. "u-input--no-radius"
  2386. ]));
  2387. return classes.join(" ");
  2388. },
  2389. // 组件的样式
  2390. wrapperStyle() {
  2391. const style = {};
  2392. if (this.disabled) {
  2393. style.backgroundColor = this.disabledColor;
  2394. }
  2395. if (this.border === "none") {
  2396. style.padding = "0";
  2397. } else {
  2398. style.paddingTop = "6px";
  2399. style.paddingBottom = "6px";
  2400. style.paddingLeft = "9px";
  2401. style.paddingRight = "9px";
  2402. }
  2403. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  2404. },
  2405. // 输入框的样式
  2406. inputStyle() {
  2407. const style = {
  2408. color: this.color,
  2409. fontSize: uni.$u.addUnit(this.fontSize),
  2410. textAlign: this.inputAlign
  2411. };
  2412. return style;
  2413. }
  2414. },
  2415. emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
  2416. methods: {
  2417. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  2418. setFormatter(e) {
  2419. this.innerFormatter = e;
  2420. },
  2421. // 当键盘输入时,触发input事件
  2422. onInput(e) {
  2423. let { value: value2 = "" } = e.detail || {};
  2424. const formatter = this.formatter || this.innerFormatter;
  2425. const formatValue = formatter(value2);
  2426. this.innerValue = value2;
  2427. this.$nextTick(() => {
  2428. this.innerValue = formatValue;
  2429. this.valueChange();
  2430. });
  2431. },
  2432. // 输入框失去焦点时触发
  2433. onBlur(event) {
  2434. this.$emit("blur", event.detail.value);
  2435. uni.$u.sleep(50).then(() => {
  2436. this.focused = false;
  2437. });
  2438. uni.$u.formValidate(this, "blur");
  2439. },
  2440. // 输入框聚焦时触发
  2441. onFocus(event) {
  2442. this.focused = true;
  2443. this.$emit("focus");
  2444. },
  2445. // 点击完成按钮时触发
  2446. onConfirm(event) {
  2447. this.$emit("confirm", this.innerValue);
  2448. },
  2449. // 键盘高度发生变化的时候触发此事件
  2450. // 兼容性:微信小程序2.7.0+、App 3.1.0+
  2451. onkeyboardheightchange() {
  2452. this.$emit("keyboardheightchange");
  2453. },
  2454. // 内容发生变化,进行处理
  2455. valueChange() {
  2456. const value2 = this.innerValue;
  2457. this.$nextTick(() => {
  2458. this.$emit("update:modelValue", value2);
  2459. this.changeFromInner = true;
  2460. this.$emit("change", value2);
  2461. uni.$u.formValidate(this, "change");
  2462. });
  2463. },
  2464. // 点击清除控件
  2465. onClear() {
  2466. this.innerValue = "";
  2467. this.$nextTick(() => {
  2468. this.valueChange();
  2469. this.$emit("clear");
  2470. });
  2471. },
  2472. /**
  2473. * 在安卓nvue上,事件无法冒泡
  2474. * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
  2475. * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
  2476. */
  2477. clickHandler() {
  2478. }
  2479. }
  2480. };
  2481. function _sfc_render$26(_ctx, _cache, $props, $setup, $data, $options) {
  2482. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  2483. return vue.openBlock(), vue.createElementBlock(
  2484. "view",
  2485. {
  2486. class: vue.normalizeClass(["u-input", $options.inputClass]),
  2487. style: vue.normalizeStyle([$options.wrapperStyle])
  2488. },
  2489. [
  2490. vue.createElementVNode("view", { class: "u-input__content" }, [
  2491. _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", {
  2492. key: 0,
  2493. class: "u-input__content__prefix-icon"
  2494. }, [
  2495. vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
  2496. vue.createVNode(_component_u_icon, {
  2497. name: _ctx.prefixIcon,
  2498. size: "18",
  2499. customStyle: _ctx.prefixIconStyle
  2500. }, null, 8, ["name", "customStyle"])
  2501. ], true)
  2502. ])) : vue.createCommentVNode("v-if", true),
  2503. vue.createElementVNode("view", {
  2504. class: "u-input__content__field-wrapper",
  2505. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  2506. }, [
  2507. vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\n "),
  2508. vue.createElementVNode("input", {
  2509. class: "u-input__content__field-wrapper__field",
  2510. style: vue.normalizeStyle([$options.inputStyle]),
  2511. type: _ctx.type,
  2512. focus: _ctx.focus,
  2513. cursor: _ctx.cursor,
  2514. value: $data.innerValue,
  2515. "auto-blur": _ctx.autoBlur,
  2516. disabled: _ctx.disabled || _ctx.readonly,
  2517. maxlength: _ctx.maxlength,
  2518. placeholder: _ctx.placeholder,
  2519. "placeholder-style": _ctx.placeholderStyle,
  2520. "placeholder-class": _ctx.placeholderClass,
  2521. "confirm-type": _ctx.confirmType,
  2522. "confirm-hold": _ctx.confirmHold,
  2523. "hold-keyboard": _ctx.holdKeyboard,
  2524. "cursor-spacing": _ctx.cursorSpacing,
  2525. "adjust-position": _ctx.adjustPosition,
  2526. "selection-end": _ctx.selectionEnd,
  2527. "selection-start": _ctx.selectionStart,
  2528. password: _ctx.password || _ctx.type === "password" || void 0,
  2529. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  2530. onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
  2531. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  2532. onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
  2533. onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  2534. onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
  2535. }, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"])
  2536. ]),
  2537. $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
  2538. key: 1,
  2539. class: "u-input__content__clear",
  2540. onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args))
  2541. }, [
  2542. vue.createVNode(_component_u_icon, {
  2543. name: "close",
  2544. size: "11",
  2545. color: "#ffffff",
  2546. customStyle: "line-height: 12px"
  2547. })
  2548. ])) : vue.createCommentVNode("v-if", true),
  2549. _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", {
  2550. key: 2,
  2551. class: "u-input__content__subfix-icon"
  2552. }, [
  2553. vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
  2554. vue.createVNode(_component_u_icon, {
  2555. name: _ctx.suffixIcon,
  2556. size: "18",
  2557. customStyle: _ctx.suffixIconStyle
  2558. }, null, 8, ["name", "customStyle"])
  2559. ], true)
  2560. ])) : vue.createCommentVNode("v-if", true)
  2561. ])
  2562. ],
  2563. 6
  2564. /* CLASS, STYLE */
  2565. );
  2566. }
  2567. const __easycom_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["render", _sfc_render$26], ["__scopeId", "data-v-df79975b"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
  2568. const props$D = {
  2569. props: {
  2570. color: {
  2571. type: String,
  2572. default: props$G.line.color
  2573. },
  2574. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  2575. length: {
  2576. type: [String, Number],
  2577. default: props$G.line.length
  2578. },
  2579. // 线条方向,col-竖向,row-横向
  2580. direction: {
  2581. type: String,
  2582. default: props$G.line.direction
  2583. },
  2584. // 是否显示细边框
  2585. hairline: {
  2586. type: Boolean,
  2587. default: props$G.line.hairline
  2588. },
  2589. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  2590. margin: {
  2591. type: [String, Number],
  2592. default: props$G.line.margin
  2593. },
  2594. // 是否虚线,true-虚线,false-实线
  2595. dashed: {
  2596. type: Boolean,
  2597. default: props$G.line.dashed
  2598. }
  2599. }
  2600. };
  2601. const _sfc_main$26 = {
  2602. name: "u-line",
  2603. mixins: [mpMixin, mixin, props$D],
  2604. computed: {
  2605. lineStyle() {
  2606. const style = {};
  2607. style.margin = this.margin;
  2608. if (this.direction === "row") {
  2609. style.borderBottomWidth = "1px";
  2610. style.borderBottomStyle = this.dashed ? "dashed" : "solid";
  2611. style.width = uni.$u.addUnit(this.length);
  2612. if (this.hairline)
  2613. style.transform = "scaleY(0.5)";
  2614. } else {
  2615. style.borderLeftWidth = "1px";
  2616. style.borderLeftStyle = this.dashed ? "dashed" : "solid";
  2617. style.height = uni.$u.addUnit(this.length);
  2618. if (this.hairline)
  2619. style.transform = "scaleX(0.5)";
  2620. }
  2621. style.borderColor = this.color;
  2622. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  2623. }
  2624. }
  2625. };
  2626. function _sfc_render$25(_ctx, _cache, $props, $setup, $data, $options) {
  2627. return vue.openBlock(), vue.createElementBlock(
  2628. "view",
  2629. {
  2630. class: "u-line",
  2631. style: vue.normalizeStyle([$options.lineStyle])
  2632. },
  2633. null,
  2634. 4
  2635. /* STYLE */
  2636. );
  2637. }
  2638. const __easycom_1$c = /* @__PURE__ */ _export_sfc(_sfc_main$26, [["render", _sfc_render$25], ["__scopeId", "data-v-72791e59"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
  2639. const props$C = {
  2640. props: {
  2641. // input的label提示语
  2642. label: {
  2643. type: String,
  2644. default: props$G.formItem.label
  2645. },
  2646. // 绑定的值
  2647. prop: {
  2648. type: String,
  2649. default: props$G.formItem.prop
  2650. },
  2651. // 是否显示表单域的下划线边框
  2652. borderBottom: {
  2653. type: [String, Boolean],
  2654. default: props$G.formItem.borderBottom
  2655. },
  2656. // label的宽度,单位px
  2657. labelWidth: {
  2658. type: [String, Number],
  2659. default: props$G.formItem.labelWidth
  2660. },
  2661. // 右侧图标
  2662. rightIcon: {
  2663. type: String,
  2664. default: props$G.formItem.rightIcon
  2665. },
  2666. // 左侧图标
  2667. leftIcon: {
  2668. type: String,
  2669. default: props$G.formItem.leftIcon
  2670. },
  2671. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  2672. required: {
  2673. type: Boolean,
  2674. default: props$G.formItem.required
  2675. },
  2676. leftIconStyle: {
  2677. type: [String, Object],
  2678. default: props$G.formItem.leftIconStyle
  2679. }
  2680. }
  2681. };
  2682. const _sfc_main$25 = {
  2683. name: "u-form-item",
  2684. mixins: [mpMixin, mixin, props$C],
  2685. data() {
  2686. return {
  2687. // 错误提示语
  2688. message: "",
  2689. parentData: {
  2690. // 提示文本的位置
  2691. labelPosition: "left",
  2692. // 提示文本对齐方式
  2693. labelAlign: "left",
  2694. // 提示文本的样式
  2695. labelStyle: {},
  2696. // 提示文本的宽度
  2697. labelWidth: 45,
  2698. // 错误提示方式
  2699. errorType: "message"
  2700. }
  2701. };
  2702. },
  2703. // 组件创建完成时,将当前实例保存到u-form中
  2704. computed: {
  2705. propsLine() {
  2706. return uni.$u.props.line;
  2707. }
  2708. },
  2709. mounted() {
  2710. this.init();
  2711. },
  2712. methods: {
  2713. init() {
  2714. this.updateParentData();
  2715. if (!this.parent) {
  2716. uni.$u.error("u-form-item需要结合u-form组件使用");
  2717. }
  2718. },
  2719. // 获取父组件的参数
  2720. updateParentData() {
  2721. this.getParentData("u-form");
  2722. },
  2723. // 移除u-form-item的校验结果
  2724. clearValidate() {
  2725. this.message = null;
  2726. },
  2727. // 清空当前的组件的校验结果,并重置为初始值
  2728. resetField() {
  2729. const value2 = uni.$u.getProperty(this.parent.originalModel, this.prop);
  2730. uni.$u.setProperty(this.parent.model, this.prop, value2);
  2731. this.message = null;
  2732. },
  2733. // 点击组件
  2734. clickHandler() {
  2735. this.$emit("click");
  2736. }
  2737. }
  2738. };
  2739. function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) {
  2740. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  2741. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
  2742. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form-item" }, [
  2743. vue.createElementVNode(
  2744. "view",
  2745. {
  2746. class: "u-form-item__body",
  2747. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  2748. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), {
  2749. flexDirection: $data.parentData.labelPosition === "left" ? "row" : "column"
  2750. }])
  2751. },
  2752. [
  2753. vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '),
  2754. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  2755. vue.createCommentVNode(" {{required}} "),
  2756. _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  2757. "view",
  2758. {
  2759. key: 0,
  2760. class: "u-form-item__body__left",
  2761. style: vue.normalizeStyle({
  2762. width: _ctx.$u.addUnit(_ctx.labelWidth || $data.parentData.labelWidth),
  2763. marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px"
  2764. })
  2765. },
  2766. [
  2767. vue.createCommentVNode(" 为了块对齐 "),
  2768. vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [
  2769. vue.createCommentVNode(" nvue不支持伪元素before "),
  2770. _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", {
  2771. key: 0,
  2772. class: "u-form-item__body__left__content__required"
  2773. }, "*")) : vue.createCommentVNode("v-if", true),
  2774. _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  2775. key: 1,
  2776. class: "u-form-item__body__left__content__icon"
  2777. }, [
  2778. vue.createVNode(_component_u_icon, {
  2779. name: _ctx.leftIcon,
  2780. "custom-style": _ctx.leftIconStyle
  2781. }, null, 8, ["name", "custom-style"])
  2782. ])) : vue.createCommentVNode("v-if", true),
  2783. vue.createElementVNode(
  2784. "text",
  2785. {
  2786. class: "u-form-item__body__left__content__label",
  2787. style: vue.normalizeStyle([$data.parentData.labelStyle, {
  2788. justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end"
  2789. }])
  2790. },
  2791. vue.toDisplayString(_ctx.label),
  2792. 5
  2793. /* TEXT, STYLE */
  2794. )
  2795. ])
  2796. ],
  2797. 4
  2798. /* STYLE */
  2799. )) : vue.createCommentVNode("v-if", true)
  2800. ], true),
  2801. vue.createElementVNode("view", { class: "u-form-item__body__right" }, [
  2802. vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [
  2803. vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [
  2804. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  2805. ]),
  2806. _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", {
  2807. key: 0,
  2808. class: "item__body__right__content__icon"
  2809. }, [
  2810. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  2811. ])) : vue.createCommentVNode("v-if", true)
  2812. ])
  2813. ])
  2814. ],
  2815. 4
  2816. /* STYLE */
  2817. ),
  2818. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  2819. !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock(
  2820. "text",
  2821. {
  2822. key: 0,
  2823. class: "u-form-item__body__right__message",
  2824. style: vue.normalizeStyle({
  2825. marginLeft: _ctx.$u.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth)
  2826. })
  2827. },
  2828. vue.toDisplayString($data.message),
  2829. 5
  2830. /* TEXT, STYLE */
  2831. )) : vue.createCommentVNode("v-if", true)
  2832. ], true),
  2833. _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  2834. key: 0,
  2835. color: $data.message && $data.parentData.errorType === "border-bottom" ? _ctx.$u.color.error : $options.propsLine.color,
  2836. customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}`
  2837. }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true)
  2838. ]);
  2839. }
  2840. const __easycom_1$b = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__scopeId", "data-v-42bac3de"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
  2841. const props$B = {
  2842. props: {
  2843. // 是否显示组件
  2844. show: {
  2845. type: Boolean,
  2846. default: props$G.loadingIcon.show
  2847. },
  2848. // 颜色
  2849. color: {
  2850. type: String,
  2851. default: props$G.loadingIcon.color
  2852. },
  2853. // 提示文字颜色
  2854. textColor: {
  2855. type: String,
  2856. default: props$G.loadingIcon.textColor
  2857. },
  2858. // 文字和图标是否垂直排列
  2859. vertical: {
  2860. type: Boolean,
  2861. default: props$G.loadingIcon.vertical
  2862. },
  2863. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  2864. mode: {
  2865. type: String,
  2866. default: props$G.loadingIcon.mode
  2867. },
  2868. // 图标大小,单位默认px
  2869. size: {
  2870. type: [String, Number],
  2871. default: props$G.loadingIcon.size
  2872. },
  2873. // 文字大小
  2874. textSize: {
  2875. type: [String, Number],
  2876. default: props$G.loadingIcon.textSize
  2877. },
  2878. // 文字内容
  2879. text: {
  2880. type: [String, Number],
  2881. default: props$G.loadingIcon.text
  2882. },
  2883. // 动画模式
  2884. timingFunction: {
  2885. type: String,
  2886. default: props$G.loadingIcon.timingFunction
  2887. },
  2888. // 动画执行周期时间
  2889. duration: {
  2890. type: [String, Number],
  2891. default: props$G.loadingIcon.duration
  2892. },
  2893. // mode=circle时的暗边颜色
  2894. inactiveColor: {
  2895. type: String,
  2896. default: props$G.loadingIcon.inactiveColor
  2897. }
  2898. }
  2899. };
  2900. const _sfc_main$24 = {
  2901. name: "u-loading-icon",
  2902. mixins: [mpMixin, mixin, props$B],
  2903. data() {
  2904. return {
  2905. // Array.form可以通过一个伪数组对象创建指定长度的数组
  2906. // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
  2907. array12: Array.from({
  2908. length: 12
  2909. }),
  2910. // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
  2911. // 在iOS nvue上,则会一开始默认执行两个周期的动画
  2912. aniAngel: 360,
  2913. // 动画旋转角度
  2914. webviewHide: false,
  2915. // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
  2916. loading: false
  2917. // 是否运行中,针对nvue使用
  2918. };
  2919. },
  2920. computed: {
  2921. // 当为circle类型时,给其另外三边设置一个更轻一些的颜色
  2922. // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
  2923. // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
  2924. otherBorderColor() {
  2925. const lightColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[80];
  2926. if (this.mode === "circle") {
  2927. return this.inactiveColor ? this.inactiveColor : lightColor;
  2928. } else {
  2929. return "transparent";
  2930. }
  2931. }
  2932. },
  2933. watch: {
  2934. show(n) {
  2935. }
  2936. },
  2937. mounted() {
  2938. this.init();
  2939. },
  2940. methods: {
  2941. init() {
  2942. setTimeout(() => {
  2943. this.show && this.addEventListenerToWebview();
  2944. }, 20);
  2945. },
  2946. // 监听webview的显示与隐藏
  2947. addEventListenerToWebview() {
  2948. const pages2 = getCurrentPages();
  2949. const page2 = pages2[pages2.length - 1];
  2950. const currentWebview = page2.$getAppWebview();
  2951. currentWebview.addEventListener("hide", () => {
  2952. this.webviewHide = true;
  2953. });
  2954. currentWebview.addEventListener("show", () => {
  2955. this.webviewHide = false;
  2956. });
  2957. }
  2958. }
  2959. };
  2960. function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) {
  2961. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  2962. "view",
  2963. {
  2964. key: 0,
  2965. class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]),
  2966. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  2967. },
  2968. [
  2969. !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
  2970. "view",
  2971. {
  2972. key: 0,
  2973. class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]),
  2974. ref: "ani",
  2975. style: vue.normalizeStyle({
  2976. color: _ctx.color,
  2977. width: _ctx.$u.addUnit(_ctx.size),
  2978. height: _ctx.$u.addUnit(_ctx.size),
  2979. borderTopColor: _ctx.color,
  2980. borderBottomColor: $options.otherBorderColor,
  2981. borderLeftColor: $options.otherBorderColor,
  2982. borderRightColor: $options.otherBorderColor,
  2983. "animation-duration": `${_ctx.duration}ms`,
  2984. "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
  2985. })
  2986. },
  2987. [
  2988. _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
  2989. vue.Fragment,
  2990. { key: 0 },
  2991. vue.renderList($data.array12, (item, index2) => {
  2992. return vue.openBlock(), vue.createElementBlock("view", {
  2993. key: index2,
  2994. class: "u-loading-icon__dot"
  2995. });
  2996. }),
  2997. 128
  2998. /* KEYED_FRAGMENT */
  2999. )) : vue.createCommentVNode("v-if", true)
  3000. ],
  3001. 6
  3002. /* CLASS, STYLE */
  3003. )) : vue.createCommentVNode("v-if", true),
  3004. _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  3005. "text",
  3006. {
  3007. key: 1,
  3008. class: "u-loading-icon__text",
  3009. style: vue.normalizeStyle({
  3010. fontSize: _ctx.$u.addUnit(_ctx.textSize),
  3011. color: _ctx.textColor
  3012. })
  3013. },
  3014. vue.toDisplayString(_ctx.text),
  3015. 5
  3016. /* TEXT, STYLE */
  3017. )) : vue.createCommentVNode("v-if", true)
  3018. ],
  3019. 6
  3020. /* CLASS, STYLE */
  3021. )) : vue.createCommentVNode("v-if", true);
  3022. }
  3023. const __easycom_0$d = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__scopeId", "data-v-2af81691"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
  3024. const button = {
  3025. props: {
  3026. lang: String,
  3027. sessionFrom: String,
  3028. sendMessageTitle: String,
  3029. sendMessagePath: String,
  3030. sendMessageImg: String,
  3031. showMessageCard: Boolean,
  3032. appParameter: String,
  3033. formType: String,
  3034. openType: String
  3035. }
  3036. };
  3037. const openType = {
  3038. props: {
  3039. openType: String
  3040. },
  3041. methods: {
  3042. onGetUserInfo(event) {
  3043. this.$emit("getuserinfo", event.detail);
  3044. },
  3045. onContact(event) {
  3046. this.$emit("contact", event.detail);
  3047. },
  3048. onGetPhoneNumber(event) {
  3049. this.$emit("getphonenumber", event.detail);
  3050. },
  3051. onError(event) {
  3052. this.$emit("error", event.detail);
  3053. },
  3054. onLaunchApp(event) {
  3055. this.$emit("launchapp", event.detail);
  3056. },
  3057. onOpenSetting(event) {
  3058. this.$emit("opensetting", event.detail);
  3059. }
  3060. }
  3061. };
  3062. const props$A = {
  3063. props: {
  3064. // 是否细边框
  3065. hairline: {
  3066. type: Boolean,
  3067. default: props$G.button.hairline
  3068. },
  3069. // 按钮的预置样式,info,primary,error,warning,success
  3070. type: {
  3071. type: String,
  3072. default: props$G.button.type
  3073. },
  3074. // 按钮尺寸,large,normal,small,mini
  3075. size: {
  3076. type: String,
  3077. default: props$G.button.size
  3078. },
  3079. // 按钮形状,circle(两边为半圆),square(带圆角)
  3080. shape: {
  3081. type: String,
  3082. default: props$G.button.shape
  3083. },
  3084. // 按钮是否镂空
  3085. plain: {
  3086. type: Boolean,
  3087. default: props$G.button.plain
  3088. },
  3089. // 是否禁止状态
  3090. disabled: {
  3091. type: Boolean,
  3092. default: props$G.button.disabled
  3093. },
  3094. // 是否加载中
  3095. loading: {
  3096. type: Boolean,
  3097. default: props$G.button.loading
  3098. },
  3099. // 加载中提示文字
  3100. loadingText: {
  3101. type: [String, Number],
  3102. default: props$G.button.loadingText
  3103. },
  3104. // 加载状态图标类型
  3105. loadingMode: {
  3106. type: String,
  3107. default: props$G.button.loadingMode
  3108. },
  3109. // 加载图标大小
  3110. loadingSize: {
  3111. type: [String, Number],
  3112. default: props$G.button.loadingSize
  3113. },
  3114. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  3115. // https://uniapp.dcloud.io/component/button
  3116. openType: {
  3117. type: String,
  3118. default: props$G.button.openType
  3119. },
  3120. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  3121. // 取值为submit(提交表单),reset(重置表单)
  3122. formType: {
  3123. type: String,
  3124. default: props$G.button.formType
  3125. },
  3126. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  3127. // 只微信小程序、QQ小程序有效
  3128. appParameter: {
  3129. type: String,
  3130. default: props$G.button.appParameter
  3131. },
  3132. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  3133. hoverStopPropagation: {
  3134. type: Boolean,
  3135. default: props$G.button.hoverStopPropagation
  3136. },
  3137. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  3138. lang: {
  3139. type: String,
  3140. default: props$G.button.lang
  3141. },
  3142. // 会话来源,open-type="contact"时有效。只微信小程序有效
  3143. sessionFrom: {
  3144. type: String,
  3145. default: props$G.button.sessionFrom
  3146. },
  3147. // 会话内消息卡片标题,open-type="contact"时有效
  3148. // 默认当前标题,只微信小程序有效
  3149. sendMessageTitle: {
  3150. type: String,
  3151. default: props$G.button.sendMessageTitle
  3152. },
  3153. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  3154. // 默认当前分享路径,只微信小程序有效
  3155. sendMessagePath: {
  3156. type: String,
  3157. default: props$G.button.sendMessagePath
  3158. },
  3159. // 会话内消息卡片图片,open-type="contact"时有效
  3160. // 默认当前页面截图,只微信小程序有效
  3161. sendMessageImg: {
  3162. type: String,
  3163. default: props$G.button.sendMessageImg
  3164. },
  3165. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  3166. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  3167. showMessageCard: {
  3168. type: Boolean,
  3169. default: props$G.button.showMessageCard
  3170. },
  3171. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  3172. dataName: {
  3173. type: String,
  3174. default: props$G.button.dataName
  3175. },
  3176. // 节流,一定时间内只能触发一次
  3177. throttleTime: {
  3178. type: [String, Number],
  3179. default: props$G.button.throttleTime
  3180. },
  3181. // 按住后多久出现点击态,单位毫秒
  3182. hoverStartTime: {
  3183. type: [String, Number],
  3184. default: props$G.button.hoverStartTime
  3185. },
  3186. // 手指松开后点击态保留时间,单位毫秒
  3187. hoverStayTime: {
  3188. type: [String, Number],
  3189. default: props$G.button.hoverStayTime
  3190. },
  3191. // 按钮文字,之所以通过props传入,是因为slot传入的话
  3192. // nvue中无法控制文字的样式
  3193. text: {
  3194. type: [String, Number],
  3195. default: props$G.button.text
  3196. },
  3197. // 按钮图标
  3198. icon: {
  3199. type: String,
  3200. default: props$G.button.icon
  3201. },
  3202. // 按钮图标
  3203. iconColor: {
  3204. type: String,
  3205. default: props$G.button.icon
  3206. },
  3207. // 按钮颜色,支持传入linear-gradient渐变色
  3208. color: {
  3209. type: String,
  3210. default: props$G.button.color
  3211. }
  3212. }
  3213. };
  3214. const _sfc_main$23 = {
  3215. name: "u-button",
  3216. mixins: [mpMixin, mixin, props$A],
  3217. data() {
  3218. return {};
  3219. },
  3220. computed: {
  3221. // 生成bem风格的类名
  3222. bemClass() {
  3223. if (!this.color) {
  3224. return this.bem(
  3225. "button",
  3226. ["type", "shape", "size"],
  3227. ["disabled", "plain", "hairline"]
  3228. );
  3229. } else {
  3230. return this.bem(
  3231. "button",
  3232. ["shape", "size"],
  3233. ["disabled", "plain", "hairline"]
  3234. );
  3235. }
  3236. },
  3237. loadingColor() {
  3238. if (this.plain) {
  3239. return this.color ? this.color : uni.$u.config.color[`u-${this.type}`];
  3240. }
  3241. if (this.type === "info") {
  3242. return "#c9c9c9";
  3243. }
  3244. return "rgb(200, 200, 200)";
  3245. },
  3246. iconColorCom() {
  3247. if (this.iconColor)
  3248. return this.iconColor;
  3249. if (this.plain) {
  3250. return this.color ? this.color : this.type;
  3251. } else {
  3252. return this.type === "info" ? "#000000" : "#ffffff";
  3253. }
  3254. },
  3255. baseColor() {
  3256. let style = {};
  3257. if (this.color) {
  3258. style.color = this.plain ? this.color : "white";
  3259. if (!this.plain) {
  3260. style["background-color"] = this.color;
  3261. }
  3262. if (this.color.indexOf("gradient") !== -1) {
  3263. style.borderTopWidth = 0;
  3264. style.borderRightWidth = 0;
  3265. style.borderBottomWidth = 0;
  3266. style.borderLeftWidth = 0;
  3267. if (!this.plain) {
  3268. style.backgroundImage = this.color;
  3269. }
  3270. } else {
  3271. style.borderColor = this.color;
  3272. style.borderWidth = "1px";
  3273. style.borderStyle = "solid";
  3274. }
  3275. }
  3276. return style;
  3277. },
  3278. // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
  3279. nvueTextStyle() {
  3280. let style = {};
  3281. if (this.type === "info") {
  3282. style.color = "#323233";
  3283. }
  3284. if (this.color) {
  3285. style.color = this.plain ? this.color : "white";
  3286. }
  3287. style.fontSize = this.textSize + "px";
  3288. return style;
  3289. },
  3290. // 字体大小
  3291. textSize() {
  3292. let fontSize = 16, { size } = this;
  3293. if (size === "large")
  3294. fontSize = 20;
  3295. if (size === "normal")
  3296. fontSize = 16;
  3297. if (size === "small")
  3298. fontSize = 14;
  3299. if (size === "mini")
  3300. fontSize = 12;
  3301. return fontSize;
  3302. }
  3303. },
  3304. emits: [
  3305. "click",
  3306. "getphonenumber",
  3307. "getuserinfo",
  3308. "error",
  3309. "opensetting",
  3310. "launchapp"
  3311. ],
  3312. methods: {
  3313. clickHandler() {
  3314. if (!this.disabled && !this.loading) {
  3315. uni.$u.throttle(() => {
  3316. this.$emit("click");
  3317. }, this.throttleTime);
  3318. }
  3319. },
  3320. // 下面为对接uniapp官方按钮开放能力事件回调的对接
  3321. getphonenumber(res2) {
  3322. this.$emit("getphonenumber", res2);
  3323. },
  3324. getuserinfo(res2) {
  3325. this.$emit("getuserinfo", res2);
  3326. },
  3327. error(res2) {
  3328. this.$emit("error", res2);
  3329. },
  3330. opensetting(res2) {
  3331. this.$emit("opensetting", res2);
  3332. },
  3333. launchapp(res2) {
  3334. this.$emit("launchapp", res2);
  3335. }
  3336. }
  3337. };
  3338. function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
  3339. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  3340. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  3341. return vue.openBlock(), vue.createElementBlock("button", {
  3342. "hover-start-time": Number(_ctx.hoverStartTime),
  3343. "hover-stay-time": Number(_ctx.hoverStayTime),
  3344. "form-type": _ctx.formType,
  3345. "open-type": _ctx.openType,
  3346. "app-parameter": _ctx.appParameter,
  3347. "hover-stop-propagation": _ctx.hoverStopPropagation,
  3348. "send-message-title": _ctx.sendMessageTitle,
  3349. "send-message-path": _ctx.sendMessagePath,
  3350. lang: _ctx.lang,
  3351. "data-name": _ctx.dataName,
  3352. "session-from": _ctx.sessionFrom,
  3353. "send-message-img": _ctx.sendMessageImg,
  3354. "show-message-card": _ctx.showMessageCard,
  3355. onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)),
  3356. onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)),
  3357. onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)),
  3358. onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)),
  3359. onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)),
  3360. "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "",
  3361. class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]),
  3362. style: vue.normalizeStyle([$options.baseColor, _ctx.$u.addStyle(_ctx.customStyle)]),
  3363. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  3364. }, [
  3365. _ctx.loading ? (vue.openBlock(), vue.createElementBlock(
  3366. vue.Fragment,
  3367. { key: 0 },
  3368. [
  3369. vue.createVNode(_component_u_loading_icon, {
  3370. mode: _ctx.loadingMode,
  3371. size: _ctx.loadingSize * 1.15,
  3372. color: $options.loadingColor
  3373. }, null, 8, ["mode", "size", "color"]),
  3374. vue.createElementVNode(
  3375. "text",
  3376. {
  3377. class: "u-button__loading-text",
  3378. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  3379. },
  3380. vue.toDisplayString(_ctx.loadingText || _ctx.text),
  3381. 5
  3382. /* TEXT, STYLE */
  3383. )
  3384. ],
  3385. 64
  3386. /* STABLE_FRAGMENT */
  3387. )) : (vue.openBlock(), vue.createElementBlock(
  3388. vue.Fragment,
  3389. { key: 1 },
  3390. [
  3391. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  3392. key: 0,
  3393. name: _ctx.icon,
  3394. color: $options.iconColorCom,
  3395. size: $options.textSize * 1.35,
  3396. customStyle: { marginRight: "2px" }
  3397. }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true),
  3398. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  3399. vue.createElementVNode(
  3400. "text",
  3401. {
  3402. class: "u-button__text",
  3403. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  3404. },
  3405. vue.toDisplayString(_ctx.text),
  3406. 5
  3407. /* TEXT, STYLE */
  3408. )
  3409. ], true)
  3410. ],
  3411. 64
  3412. /* STABLE_FRAGMENT */
  3413. ))
  3414. ], 46, ["hover-start-time", "hover-stay-time", "form-type", "open-type", "app-parameter", "hover-stop-propagation", "send-message-title", "send-message-path", "lang", "data-name", "session-from", "send-message-img", "show-message-card", "hover-class"]);
  3415. }
  3416. const __easycom_3$6 = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__scopeId", "data-v-5ce41ee6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
  3417. const props$z = {
  3418. props: {
  3419. // 当前form的需要验证字段的集合
  3420. model: {
  3421. type: Object,
  3422. default: props$G.form.model
  3423. },
  3424. // 验证规则
  3425. rules: {
  3426. type: [Object, Function, Array],
  3427. default: props$G.form.rules
  3428. },
  3429. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  3430. // border-bottom-下边框呈现红色,none-无提示
  3431. errorType: {
  3432. type: String,
  3433. default: props$G.form.errorType
  3434. },
  3435. // 是否显示表单域的下划线边框
  3436. borderBottom: {
  3437. type: Boolean,
  3438. default: props$G.form.borderBottom
  3439. },
  3440. // label的位置,left-左边,top-上边
  3441. labelPosition: {
  3442. type: String,
  3443. default: props$G.form.labelPosition
  3444. },
  3445. // label的宽度,单位px
  3446. labelWidth: {
  3447. type: [String, Number],
  3448. default: props$G.form.labelWidth
  3449. },
  3450. // lable字体的对齐方式
  3451. labelAlign: {
  3452. type: String,
  3453. default: props$G.form.labelAlign
  3454. },
  3455. // lable的样式,对象形式
  3456. labelStyle: {
  3457. type: Object,
  3458. default: props$G.form.labelStyle
  3459. }
  3460. }
  3461. };
  3462. var define_process_env_default = {};
  3463. const formatRegExp = /%[sdj%]/g;
  3464. let warning = function warning2() {
  3465. };
  3466. if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
  3467. warning = function warning3(type2, errors) {
  3468. if (typeof console !== "undefined" && console.warn) {
  3469. if (errors.every((e) => typeof e === "string")) {
  3470. formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
  3471. }
  3472. }
  3473. };
  3474. }
  3475. function convertFieldsError(errors) {
  3476. if (!errors || !errors.length)
  3477. return null;
  3478. const fields = {};
  3479. errors.forEach((error2) => {
  3480. const { field } = error2;
  3481. fields[field] = fields[field] || [];
  3482. fields[field].push(error2);
  3483. });
  3484. return fields;
  3485. }
  3486. function format() {
  3487. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3488. args[_key] = arguments[_key];
  3489. }
  3490. let i = 1;
  3491. const f = args[0];
  3492. const len = args.length;
  3493. if (typeof f === "function") {
  3494. return f.apply(null, args.slice(1));
  3495. }
  3496. if (typeof f === "string") {
  3497. let str = String(f).replace(formatRegExp, (x) => {
  3498. if (x === "%%") {
  3499. return "%";
  3500. }
  3501. if (i >= len) {
  3502. return x;
  3503. }
  3504. switch (x) {
  3505. case "%s":
  3506. return String(args[i++]);
  3507. case "%d":
  3508. return Number(args[i++]);
  3509. case "%j":
  3510. try {
  3511. return JSON.stringify(args[i++]);
  3512. } catch (_) {
  3513. return "[Circular]";
  3514. }
  3515. break;
  3516. default:
  3517. return x;
  3518. }
  3519. });
  3520. for (let arg = args[i]; i < len; arg = args[++i]) {
  3521. str += ` ${arg}`;
  3522. }
  3523. return str;
  3524. }
  3525. return f;
  3526. }
  3527. function isNativeStringType(type2) {
  3528. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  3529. }
  3530. function isEmptyValue(value2, type2) {
  3531. if (value2 === void 0 || value2 === null) {
  3532. return true;
  3533. }
  3534. if (type2 === "array" && Array.isArray(value2) && !value2.length) {
  3535. return true;
  3536. }
  3537. if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
  3538. return true;
  3539. }
  3540. return false;
  3541. }
  3542. function asyncParallelArray(arr, func2, callback) {
  3543. const results = [];
  3544. let total = 0;
  3545. const arrLength = arr.length;
  3546. function count(errors) {
  3547. results.push.apply(results, errors);
  3548. total++;
  3549. if (total === arrLength) {
  3550. callback(results);
  3551. }
  3552. }
  3553. arr.forEach((a) => {
  3554. func2(a, count);
  3555. });
  3556. }
  3557. function asyncSerialArray(arr, func2, callback) {
  3558. let index2 = 0;
  3559. const arrLength = arr.length;
  3560. function next(errors) {
  3561. if (errors && errors.length) {
  3562. callback(errors);
  3563. return;
  3564. }
  3565. const original = index2;
  3566. index2 += 1;
  3567. if (original < arrLength) {
  3568. func2(arr[original], next);
  3569. } else {
  3570. callback([]);
  3571. }
  3572. }
  3573. next([]);
  3574. }
  3575. function flattenObjArr(objArr) {
  3576. const ret = [];
  3577. Object.keys(objArr).forEach((k) => {
  3578. ret.push.apply(ret, objArr[k]);
  3579. });
  3580. return ret;
  3581. }
  3582. function asyncMap(objArr, option, func2, callback) {
  3583. if (option.first) {
  3584. const _pending = new Promise((resolve, reject) => {
  3585. const next = function next2(errors) {
  3586. callback(errors);
  3587. return errors.length ? reject({
  3588. errors,
  3589. fields: convertFieldsError(errors)
  3590. }) : resolve();
  3591. };
  3592. const flattenArr = flattenObjArr(objArr);
  3593. asyncSerialArray(flattenArr, func2, next);
  3594. });
  3595. _pending.catch((e) => e);
  3596. return _pending;
  3597. }
  3598. let firstFields = option.firstFields || [];
  3599. if (firstFields === true) {
  3600. firstFields = Object.keys(objArr);
  3601. }
  3602. const objArrKeys = Object.keys(objArr);
  3603. const objArrLength = objArrKeys.length;
  3604. let total = 0;
  3605. const results = [];
  3606. const pending = new Promise((resolve, reject) => {
  3607. const next = function next2(errors) {
  3608. results.push.apply(results, errors);
  3609. total++;
  3610. if (total === objArrLength) {
  3611. callback(results);
  3612. return results.length ? reject({
  3613. errors: results,
  3614. fields: convertFieldsError(results)
  3615. }) : resolve();
  3616. }
  3617. };
  3618. if (!objArrKeys.length) {
  3619. callback(results);
  3620. resolve();
  3621. }
  3622. objArrKeys.forEach((key) => {
  3623. const arr = objArr[key];
  3624. if (firstFields.indexOf(key) !== -1) {
  3625. asyncSerialArray(arr, func2, next);
  3626. } else {
  3627. asyncParallelArray(arr, func2, next);
  3628. }
  3629. });
  3630. });
  3631. pending.catch((e) => e);
  3632. return pending;
  3633. }
  3634. function complementError(rule) {
  3635. return function(oe) {
  3636. if (oe && oe.message) {
  3637. oe.field = oe.field || rule.fullField;
  3638. return oe;
  3639. }
  3640. return {
  3641. message: typeof oe === "function" ? oe() : oe,
  3642. field: oe.field || rule.fullField
  3643. };
  3644. };
  3645. }
  3646. function deepMerge$2(target, source) {
  3647. if (source) {
  3648. for (const s in source) {
  3649. if (source.hasOwnProperty(s)) {
  3650. const value2 = source[s];
  3651. if (typeof value2 === "object" && typeof target[s] === "object") {
  3652. target[s] = { ...target[s], ...value2 };
  3653. } else {
  3654. target[s] = value2;
  3655. }
  3656. }
  3657. }
  3658. }
  3659. return target;
  3660. }
  3661. function required(rule, value2, source, errors, options, type2) {
  3662. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
  3663. errors.push(format(options.messages.required, rule.fullField));
  3664. }
  3665. }
  3666. function whitespace(rule, value2, source, errors, options) {
  3667. if (/^\s+$/.test(value2) || value2 === "") {
  3668. errors.push(format(options.messages.whitespace, rule.fullField));
  3669. }
  3670. }
  3671. const pattern = {
  3672. // http://emailregex.com/
  3673. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  3674. url: new RegExp(
  3675. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  3676. "i"
  3677. ),
  3678. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  3679. };
  3680. var types = {
  3681. integer: function integer(value2) {
  3682. return /^(-)?\d+$/.test(value2);
  3683. },
  3684. float: function float(value2) {
  3685. return /^(-)?\d+(\.\d+)?$/.test(value2);
  3686. },
  3687. array: function array3(value2) {
  3688. return Array.isArray(value2);
  3689. },
  3690. regexp: function regexp(value2) {
  3691. if (value2 instanceof RegExp) {
  3692. return true;
  3693. }
  3694. try {
  3695. return !!new RegExp(value2);
  3696. } catch (e) {
  3697. return false;
  3698. }
  3699. },
  3700. date: function date3(value2) {
  3701. return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
  3702. },
  3703. number: function number3(value2) {
  3704. if (isNaN(value2)) {
  3705. return false;
  3706. }
  3707. return typeof +value2 === "number";
  3708. },
  3709. object: function object3(value2) {
  3710. return typeof value2 === "object" && !types.array(value2);
  3711. },
  3712. method: function method(value2) {
  3713. return typeof value2 === "function";
  3714. },
  3715. email: function email2(value2) {
  3716. return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
  3717. },
  3718. url: function url2(value2) {
  3719. return typeof value2 === "string" && !!value2.match(pattern.url);
  3720. },
  3721. hex: function hex(value2) {
  3722. return typeof value2 === "string" && !!value2.match(pattern.hex);
  3723. }
  3724. };
  3725. function type(rule, value2, source, errors, options) {
  3726. if (rule.required && value2 === void 0) {
  3727. required(rule, value2, source, errors, options);
  3728. return;
  3729. }
  3730. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  3731. const ruleType = rule.type;
  3732. if (custom.indexOf(ruleType) > -1) {
  3733. if (!types[ruleType](value2)) {
  3734. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  3735. }
  3736. } else if (ruleType && typeof value2 !== rule.type) {
  3737. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  3738. }
  3739. }
  3740. function range$2(rule, value2, source, errors, options) {
  3741. const len = typeof rule.len === "number";
  3742. const min = typeof rule.min === "number";
  3743. const max = typeof rule.max === "number";
  3744. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  3745. let val = value2;
  3746. let key = null;
  3747. const num = typeof value2 === "number";
  3748. const str = typeof value2 === "string";
  3749. const arr = Array.isArray(value2);
  3750. if (num) {
  3751. key = "number";
  3752. } else if (str) {
  3753. key = "string";
  3754. } else if (arr) {
  3755. key = "array";
  3756. }
  3757. if (!key) {
  3758. return false;
  3759. }
  3760. if (arr) {
  3761. val = value2.length;
  3762. }
  3763. if (str) {
  3764. val = value2.replace(spRegexp, "_").length;
  3765. }
  3766. if (len) {
  3767. if (val !== rule.len) {
  3768. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  3769. }
  3770. } else if (min && !max && val < rule.min) {
  3771. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  3772. } else if (max && !min && val > rule.max) {
  3773. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  3774. } else if (min && max && (val < rule.min || val > rule.max)) {
  3775. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  3776. }
  3777. }
  3778. const ENUM = "enum";
  3779. function enumerable(rule, value2, source, errors, options) {
  3780. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  3781. if (rule[ENUM].indexOf(value2) === -1) {
  3782. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  3783. }
  3784. }
  3785. function pattern$1(rule, value2, source, errors, options) {
  3786. if (rule.pattern) {
  3787. if (rule.pattern instanceof RegExp) {
  3788. rule.pattern.lastIndex = 0;
  3789. if (!rule.pattern.test(value2)) {
  3790. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  3791. }
  3792. } else if (typeof rule.pattern === "string") {
  3793. const _pattern = new RegExp(rule.pattern);
  3794. if (!_pattern.test(value2)) {
  3795. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  3796. }
  3797. }
  3798. }
  3799. }
  3800. const rules = {
  3801. required,
  3802. whitespace,
  3803. type,
  3804. range: range$2,
  3805. enum: enumerable,
  3806. pattern: pattern$1
  3807. };
  3808. function string$1(rule, value2, callback, source, options) {
  3809. const errors = [];
  3810. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3811. if (validate2) {
  3812. if (isEmptyValue(value2, "string") && !rule.required) {
  3813. return callback();
  3814. }
  3815. rules.required(rule, value2, source, errors, options, "string");
  3816. if (!isEmptyValue(value2, "string")) {
  3817. rules.type(rule, value2, source, errors, options);
  3818. rules.range(rule, value2, source, errors, options);
  3819. rules.pattern(rule, value2, source, errors, options);
  3820. if (rule.whitespace === true) {
  3821. rules.whitespace(rule, value2, source, errors, options);
  3822. }
  3823. }
  3824. }
  3825. callback(errors);
  3826. }
  3827. function method2(rule, value2, callback, source, options) {
  3828. const errors = [];
  3829. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3830. if (validate2) {
  3831. if (isEmptyValue(value2) && !rule.required) {
  3832. return callback();
  3833. }
  3834. rules.required(rule, value2, source, errors, options);
  3835. if (value2 !== void 0) {
  3836. rules.type(rule, value2, source, errors, options);
  3837. }
  3838. }
  3839. callback(errors);
  3840. }
  3841. function number2(rule, value2, callback, source, options) {
  3842. const errors = [];
  3843. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3844. if (validate2) {
  3845. if (value2 === "") {
  3846. value2 = void 0;
  3847. }
  3848. if (isEmptyValue(value2) && !rule.required) {
  3849. return callback();
  3850. }
  3851. rules.required(rule, value2, source, errors, options);
  3852. if (value2 !== void 0) {
  3853. rules.type(rule, value2, source, errors, options);
  3854. rules.range(rule, value2, source, errors, options);
  3855. }
  3856. }
  3857. callback(errors);
  3858. }
  3859. function _boolean(rule, value2, callback, source, options) {
  3860. const errors = [];
  3861. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3862. if (validate2) {
  3863. if (isEmptyValue(value2) && !rule.required) {
  3864. return callback();
  3865. }
  3866. rules.required(rule, value2, source, errors, options);
  3867. if (value2 !== void 0) {
  3868. rules.type(rule, value2, source, errors, options);
  3869. }
  3870. }
  3871. callback(errors);
  3872. }
  3873. function regexp2(rule, value2, callback, source, options) {
  3874. const errors = [];
  3875. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3876. if (validate2) {
  3877. if (isEmptyValue(value2) && !rule.required) {
  3878. return callback();
  3879. }
  3880. rules.required(rule, value2, source, errors, options);
  3881. if (!isEmptyValue(value2)) {
  3882. rules.type(rule, value2, source, errors, options);
  3883. }
  3884. }
  3885. callback(errors);
  3886. }
  3887. function integer2(rule, value2, callback, source, options) {
  3888. const errors = [];
  3889. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3890. if (validate2) {
  3891. if (isEmptyValue(value2) && !rule.required) {
  3892. return callback();
  3893. }
  3894. rules.required(rule, value2, source, errors, options);
  3895. if (value2 !== void 0) {
  3896. rules.type(rule, value2, source, errors, options);
  3897. rules.range(rule, value2, source, errors, options);
  3898. }
  3899. }
  3900. callback(errors);
  3901. }
  3902. function floatFn(rule, value2, callback, source, options) {
  3903. const errors = [];
  3904. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3905. if (validate2) {
  3906. if (isEmptyValue(value2) && !rule.required) {
  3907. return callback();
  3908. }
  3909. rules.required(rule, value2, source, errors, options);
  3910. if (value2 !== void 0) {
  3911. rules.type(rule, value2, source, errors, options);
  3912. rules.range(rule, value2, source, errors, options);
  3913. }
  3914. }
  3915. callback(errors);
  3916. }
  3917. function array2(rule, value2, callback, source, options) {
  3918. const errors = [];
  3919. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3920. if (validate2) {
  3921. if (isEmptyValue(value2, "array") && !rule.required) {
  3922. return callback();
  3923. }
  3924. rules.required(rule, value2, source, errors, options, "array");
  3925. if (!isEmptyValue(value2, "array")) {
  3926. rules.type(rule, value2, source, errors, options);
  3927. rules.range(rule, value2, source, errors, options);
  3928. }
  3929. }
  3930. callback(errors);
  3931. }
  3932. function object2(rule, value2, callback, source, options) {
  3933. const errors = [];
  3934. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3935. if (validate2) {
  3936. if (isEmptyValue(value2) && !rule.required) {
  3937. return callback();
  3938. }
  3939. rules.required(rule, value2, source, errors, options);
  3940. if (value2 !== void 0) {
  3941. rules.type(rule, value2, source, errors, options);
  3942. }
  3943. }
  3944. callback(errors);
  3945. }
  3946. const ENUM$1 = "enum";
  3947. function enumerable$1(rule, value2, callback, source, options) {
  3948. const errors = [];
  3949. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3950. if (validate2) {
  3951. if (isEmptyValue(value2) && !rule.required) {
  3952. return callback();
  3953. }
  3954. rules.required(rule, value2, source, errors, options);
  3955. if (value2 !== void 0) {
  3956. rules[ENUM$1](rule, value2, source, errors, options);
  3957. }
  3958. }
  3959. callback(errors);
  3960. }
  3961. function pattern$2(rule, value2, callback, source, options) {
  3962. const errors = [];
  3963. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3964. if (validate2) {
  3965. if (isEmptyValue(value2, "string") && !rule.required) {
  3966. return callback();
  3967. }
  3968. rules.required(rule, value2, source, errors, options);
  3969. if (!isEmptyValue(value2, "string")) {
  3970. rules.pattern(rule, value2, source, errors, options);
  3971. }
  3972. }
  3973. callback(errors);
  3974. }
  3975. function date2(rule, value2, callback, source, options) {
  3976. const errors = [];
  3977. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3978. if (validate2) {
  3979. if (isEmptyValue(value2) && !rule.required) {
  3980. return callback();
  3981. }
  3982. rules.required(rule, value2, source, errors, options);
  3983. if (!isEmptyValue(value2)) {
  3984. let dateObject;
  3985. if (typeof value2 === "number") {
  3986. dateObject = new Date(value2);
  3987. } else {
  3988. dateObject = value2;
  3989. }
  3990. rules.type(rule, dateObject, source, errors, options);
  3991. if (dateObject) {
  3992. rules.range(rule, dateObject.getTime(), source, errors, options);
  3993. }
  3994. }
  3995. }
  3996. callback(errors);
  3997. }
  3998. function required$1(rule, value2, callback, source, options) {
  3999. const errors = [];
  4000. const type2 = Array.isArray(value2) ? "array" : typeof value2;
  4001. rules.required(rule, value2, source, errors, options, type2);
  4002. callback(errors);
  4003. }
  4004. function type$1(rule, value2, callback, source, options) {
  4005. const ruleType = rule.type;
  4006. const errors = [];
  4007. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  4008. if (validate2) {
  4009. if (isEmptyValue(value2, ruleType) && !rule.required) {
  4010. return callback();
  4011. }
  4012. rules.required(rule, value2, source, errors, options, ruleType);
  4013. if (!isEmptyValue(value2, ruleType)) {
  4014. rules.type(rule, value2, source, errors, options);
  4015. }
  4016. }
  4017. callback(errors);
  4018. }
  4019. function any(rule, value2, callback, source, options) {
  4020. const errors = [];
  4021. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  4022. if (validate2) {
  4023. if (isEmptyValue(value2) && !rule.required) {
  4024. return callback();
  4025. }
  4026. rules.required(rule, value2, source, errors, options);
  4027. }
  4028. callback(errors);
  4029. }
  4030. const validators = {
  4031. string: string$1,
  4032. method: method2,
  4033. number: number2,
  4034. boolean: _boolean,
  4035. regexp: regexp2,
  4036. integer: integer2,
  4037. float: floatFn,
  4038. array: array2,
  4039. object: object2,
  4040. enum: enumerable$1,
  4041. pattern: pattern$2,
  4042. date: date2,
  4043. url: type$1,
  4044. hex: type$1,
  4045. email: type$1,
  4046. required: required$1,
  4047. any
  4048. };
  4049. function newMessages() {
  4050. return {
  4051. default: "Validation error on field %s",
  4052. required: "%s is required",
  4053. enum: "%s must be one of %s",
  4054. whitespace: "%s cannot be empty",
  4055. date: {
  4056. format: "%s date %s is invalid for format %s",
  4057. parse: "%s date could not be parsed, %s is invalid ",
  4058. invalid: "%s date %s is invalid"
  4059. },
  4060. types: {
  4061. string: "%s is not a %s",
  4062. method: "%s is not a %s (function)",
  4063. array: "%s is not an %s",
  4064. object: "%s is not an %s",
  4065. number: "%s is not a %s",
  4066. date: "%s is not a %s",
  4067. boolean: "%s is not a %s",
  4068. integer: "%s is not an %s",
  4069. float: "%s is not a %s",
  4070. regexp: "%s is not a valid %s",
  4071. email: "%s is not a valid %s",
  4072. url: "%s is not a valid %s",
  4073. hex: "%s is not a valid %s"
  4074. },
  4075. string: {
  4076. len: "%s must be exactly %s characters",
  4077. min: "%s must be at least %s characters",
  4078. max: "%s cannot be longer than %s characters",
  4079. range: "%s must be between %s and %s characters"
  4080. },
  4081. number: {
  4082. len: "%s must equal %s",
  4083. min: "%s cannot be less than %s",
  4084. max: "%s cannot be greater than %s",
  4085. range: "%s must be between %s and %s"
  4086. },
  4087. array: {
  4088. len: "%s must be exactly %s in length",
  4089. min: "%s cannot be less than %s in length",
  4090. max: "%s cannot be greater than %s in length",
  4091. range: "%s must be between %s and %s in length"
  4092. },
  4093. pattern: {
  4094. mismatch: "%s value %s does not match pattern %s"
  4095. },
  4096. clone: function clone2() {
  4097. const cloned = JSON.parse(JSON.stringify(this));
  4098. cloned.clone = this.clone;
  4099. return cloned;
  4100. }
  4101. };
  4102. }
  4103. const messages = newMessages();
  4104. function Schema(descriptor) {
  4105. this.rules = null;
  4106. this._messages = messages;
  4107. this.define(descriptor);
  4108. }
  4109. Schema.prototype = {
  4110. messages: function messages2(_messages) {
  4111. if (_messages) {
  4112. this._messages = deepMerge$2(newMessages(), _messages);
  4113. }
  4114. return this._messages;
  4115. },
  4116. define: function define(rules2) {
  4117. if (!rules2) {
  4118. throw new Error("Cannot configure a schema with no rules");
  4119. }
  4120. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  4121. throw new Error("Rules must be an object");
  4122. }
  4123. this.rules = {};
  4124. let z;
  4125. let item;
  4126. for (z in rules2) {
  4127. if (rules2.hasOwnProperty(z)) {
  4128. item = rules2[z];
  4129. this.rules[z] = Array.isArray(item) ? item : [item];
  4130. }
  4131. }
  4132. },
  4133. validate: function validate(source_, o, oc) {
  4134. const _this = this;
  4135. if (o === void 0) {
  4136. o = {};
  4137. }
  4138. if (oc === void 0) {
  4139. oc = function oc2() {
  4140. };
  4141. }
  4142. let source = source_;
  4143. let options = o;
  4144. let callback = oc;
  4145. if (typeof options === "function") {
  4146. callback = options;
  4147. options = {};
  4148. }
  4149. if (!this.rules || Object.keys(this.rules).length === 0) {
  4150. if (callback) {
  4151. callback();
  4152. }
  4153. return Promise.resolve();
  4154. }
  4155. function complete(results) {
  4156. let i;
  4157. let errors = [];
  4158. let fields = {};
  4159. function add(e) {
  4160. if (Array.isArray(e)) {
  4161. let _errors;
  4162. errors = (_errors = errors).concat.apply(_errors, e);
  4163. } else {
  4164. errors.push(e);
  4165. }
  4166. }
  4167. for (i = 0; i < results.length; i++) {
  4168. add(results[i]);
  4169. }
  4170. if (!errors.length) {
  4171. errors = null;
  4172. fields = null;
  4173. } else {
  4174. fields = convertFieldsError(errors);
  4175. }
  4176. callback(errors, fields);
  4177. }
  4178. if (options.messages) {
  4179. let messages$1 = this.messages();
  4180. if (messages$1 === messages) {
  4181. messages$1 = newMessages();
  4182. }
  4183. deepMerge$2(messages$1, options.messages);
  4184. options.messages = messages$1;
  4185. } else {
  4186. options.messages = this.messages();
  4187. }
  4188. let arr;
  4189. let value2;
  4190. const series = {};
  4191. const keys = options.keys || Object.keys(this.rules);
  4192. keys.forEach((z) => {
  4193. arr = _this.rules[z];
  4194. value2 = source[z];
  4195. arr.forEach((r) => {
  4196. let rule = r;
  4197. if (typeof rule.transform === "function") {
  4198. if (source === source_) {
  4199. source = { ...source };
  4200. }
  4201. value2 = source[z] = rule.transform(value2);
  4202. }
  4203. if (typeof rule === "function") {
  4204. rule = {
  4205. validator: rule
  4206. };
  4207. } else {
  4208. rule = { ...rule };
  4209. }
  4210. rule.validator = _this.getValidationMethod(rule);
  4211. rule.field = z;
  4212. rule.fullField = rule.fullField || z;
  4213. rule.type = _this.getType(rule);
  4214. if (!rule.validator) {
  4215. return;
  4216. }
  4217. series[z] = series[z] || [];
  4218. series[z].push({
  4219. rule,
  4220. value: value2,
  4221. source,
  4222. field: z
  4223. });
  4224. });
  4225. });
  4226. const errorFields = {};
  4227. return asyncMap(series, options, (data, doIt) => {
  4228. const { rule } = data;
  4229. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  4230. deep = deep && (rule.required || !rule.required && data.value);
  4231. rule.field = data.field;
  4232. function addFullfield(key, schema) {
  4233. return { ...schema, fullField: `${rule.fullField}.${key}` };
  4234. }
  4235. function cb(e) {
  4236. if (e === void 0) {
  4237. e = [];
  4238. }
  4239. let errors = e;
  4240. if (!Array.isArray(errors)) {
  4241. errors = [errors];
  4242. }
  4243. if (!options.suppressWarning && errors.length) {
  4244. Schema.warning("async-validator:", errors);
  4245. }
  4246. if (errors.length && rule.message) {
  4247. errors = [].concat(rule.message);
  4248. }
  4249. errors = errors.map(complementError(rule));
  4250. if (options.first && errors.length) {
  4251. errorFields[rule.field] = 1;
  4252. return doIt(errors);
  4253. }
  4254. if (!deep) {
  4255. doIt(errors);
  4256. } else {
  4257. if (rule.required && !data.value) {
  4258. if (rule.message) {
  4259. errors = [].concat(rule.message).map(complementError(rule));
  4260. } else if (options.error) {
  4261. errors = [options.error(rule, format(options.messages.required, rule.field))];
  4262. } else {
  4263. errors = [];
  4264. }
  4265. return doIt(errors);
  4266. }
  4267. let fieldsSchema = {};
  4268. if (rule.defaultField) {
  4269. for (const k in data.value) {
  4270. if (data.value.hasOwnProperty(k)) {
  4271. fieldsSchema[k] = rule.defaultField;
  4272. }
  4273. }
  4274. }
  4275. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  4276. for (const f in fieldsSchema) {
  4277. if (fieldsSchema.hasOwnProperty(f)) {
  4278. const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  4279. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  4280. }
  4281. }
  4282. const schema = new Schema(fieldsSchema);
  4283. schema.messages(options.messages);
  4284. if (data.rule.options) {
  4285. data.rule.options.messages = options.messages;
  4286. data.rule.options.error = options.error;
  4287. }
  4288. schema.validate(data.value, data.rule.options || options, (errs) => {
  4289. const finalErrors = [];
  4290. if (errors && errors.length) {
  4291. finalErrors.push.apply(finalErrors, errors);
  4292. }
  4293. if (errs && errs.length) {
  4294. finalErrors.push.apply(finalErrors, errs);
  4295. }
  4296. doIt(finalErrors.length ? finalErrors : null);
  4297. });
  4298. }
  4299. }
  4300. let res2;
  4301. if (rule.asyncValidator) {
  4302. res2 = rule.asyncValidator(rule, data.value, cb, data.source, options);
  4303. } else if (rule.validator) {
  4304. res2 = rule.validator(rule, data.value, cb, data.source, options);
  4305. if (res2 === true) {
  4306. cb();
  4307. } else if (res2 === false) {
  4308. cb(rule.message || `${rule.field} fails`);
  4309. } else if (res2 instanceof Array) {
  4310. cb(res2);
  4311. } else if (res2 instanceof Error) {
  4312. cb(res2.message);
  4313. }
  4314. }
  4315. if (res2 && res2.then) {
  4316. res2.then(() => cb(), (e) => cb(e));
  4317. }
  4318. }, (results) => {
  4319. complete(results);
  4320. });
  4321. },
  4322. getType: function getType(rule) {
  4323. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  4324. rule.type = "pattern";
  4325. }
  4326. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  4327. throw new Error(format("Unknown rule type %s", rule.type));
  4328. }
  4329. return rule.type || "string";
  4330. },
  4331. getValidationMethod: function getValidationMethod(rule) {
  4332. if (typeof rule.validator === "function") {
  4333. return rule.validator;
  4334. }
  4335. const keys = Object.keys(rule);
  4336. const messageIndex = keys.indexOf("message");
  4337. if (messageIndex !== -1) {
  4338. keys.splice(messageIndex, 1);
  4339. }
  4340. if (keys.length === 1 && keys[0] === "required") {
  4341. return validators.required;
  4342. }
  4343. return validators[this.getType(rule)] || false;
  4344. }
  4345. };
  4346. Schema.register = function register(type2, validator) {
  4347. if (typeof validator !== "function") {
  4348. throw new Error("Cannot register a validator by type, validator is not a function");
  4349. }
  4350. validators[type2] = validator;
  4351. };
  4352. Schema.warning = warning;
  4353. Schema.messages = messages;
  4354. Schema.warning = function() {
  4355. };
  4356. const _sfc_main$22 = {
  4357. name: "u-form",
  4358. mixins: [mpMixin, mixin, props$z],
  4359. provide() {
  4360. return {
  4361. uForm: this
  4362. };
  4363. },
  4364. data() {
  4365. return {
  4366. formRules: {},
  4367. // 规则校验器
  4368. validator: {},
  4369. // 原始的model快照,用于resetFields方法重置表单时使用
  4370. originalModel: null
  4371. };
  4372. },
  4373. watch: {
  4374. // 监听规则的变化
  4375. rules: {
  4376. immediate: true,
  4377. handler(n) {
  4378. this.setRules(n);
  4379. }
  4380. },
  4381. // 监听属性的变化,通知子组件u-form-item重新获取信息
  4382. propsChange(n) {
  4383. var _a;
  4384. if ((_a = this.children) == null ? void 0 : _a.length) {
  4385. this.children.map((child) => {
  4386. typeof child.updateParentData == "function" && child.updateParentData();
  4387. });
  4388. }
  4389. },
  4390. // 监听model的初始值作为重置表单的快照
  4391. model: {
  4392. immediate: true,
  4393. handler(n) {
  4394. if (!this.originalModel) {
  4395. this.originalModel = uni.$u.deepClone(n);
  4396. }
  4397. }
  4398. }
  4399. },
  4400. computed: {
  4401. propsChange() {
  4402. return [
  4403. this.errorType,
  4404. this.borderBottom,
  4405. this.labelPosition,
  4406. this.labelWidth,
  4407. this.labelAlign,
  4408. this.labelStyle
  4409. ];
  4410. }
  4411. },
  4412. created() {
  4413. this.children = [];
  4414. },
  4415. methods: {
  4416. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  4417. setRules(rules2) {
  4418. if (Object.keys(rules2).length === 0)
  4419. return;
  4420. if (Object.keys(this.model).length === 0) {
  4421. uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。");
  4422. return;
  4423. }
  4424. this.formRules = rules2;
  4425. this.validator = new Schema(rules2);
  4426. },
  4427. // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
  4428. resetFields() {
  4429. this.resetModel();
  4430. },
  4431. // 重置model为初始值的快照
  4432. resetModel(obj) {
  4433. this.children.map((child) => {
  4434. const prop = child == null ? void 0 : child.prop;
  4435. const value2 = uni.$u.getProperty(this.originalModel, prop);
  4436. uni.$u.setProperty(this.model, prop, value2);
  4437. });
  4438. },
  4439. // 清空校验结果
  4440. clearValidate(props2) {
  4441. props2 = [].concat(props2);
  4442. this.children.map((child) => {
  4443. if (props2[0] === void 0 || props2.includes(child.prop)) {
  4444. child.message = null;
  4445. }
  4446. });
  4447. },
  4448. // 对部分表单字段进行校验
  4449. async validateField(value2, callback, event = null) {
  4450. this.$nextTick(() => {
  4451. const errorsRes = [];
  4452. value2 = [].concat(value2);
  4453. this.children.map((child) => {
  4454. const childErrors = [];
  4455. if (value2.includes(child.prop)) {
  4456. const propertyVal = uni.$u.getProperty(
  4457. this.model,
  4458. child.prop
  4459. );
  4460. const propertyChain = child.prop.split(".");
  4461. const propertyName = propertyChain[propertyChain.length - 1];
  4462. const rule = this.formRules[child.prop];
  4463. if (!rule)
  4464. return;
  4465. const rules2 = [].concat(rule);
  4466. for (let i = 0; i < rules2.length; i++) {
  4467. const ruleItem = rules2[i];
  4468. const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
  4469. if (event && !trigger.includes(event))
  4470. continue;
  4471. const validator = new Schema({
  4472. [propertyName]: ruleItem
  4473. });
  4474. validator.validate(
  4475. {
  4476. [propertyName]: propertyVal
  4477. },
  4478. (errors, fields) => {
  4479. var _a;
  4480. if (uni.$u.test.array(errors)) {
  4481. errorsRes.push(...errors);
  4482. childErrors.push(...errors);
  4483. }
  4484. child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null;
  4485. }
  4486. );
  4487. }
  4488. }
  4489. });
  4490. typeof callback === "function" && callback(errorsRes);
  4491. });
  4492. },
  4493. // 校验全部数据
  4494. validate(callback) {
  4495. if (Object.keys(this.formRules).length === 0) {
  4496. uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
  4497. return;
  4498. }
  4499. return new Promise((resolve, reject) => {
  4500. this.$nextTick(() => {
  4501. const formItemProps = this.children.map(
  4502. (item) => item.prop
  4503. );
  4504. this.validateField(formItemProps, (errors) => {
  4505. if (errors.length) {
  4506. this.errorType === "toast" && uni.$u.toast(errors[0].message);
  4507. reject(errors);
  4508. } else {
  4509. resolve(true);
  4510. }
  4511. });
  4512. });
  4513. });
  4514. }
  4515. }
  4516. };
  4517. function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
  4518. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
  4519. vue.renderSlot(_ctx.$slots, "default")
  4520. ]);
  4521. }
  4522. const __easycom_2$6 = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  4523. const _sfc_main$21 = {
  4524. name: "u--form",
  4525. mixins: [mpMixin, props$z, mixin],
  4526. components: {
  4527. uvForm: __easycom_2$6
  4528. },
  4529. created() {
  4530. this.children = [];
  4531. },
  4532. methods: {
  4533. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  4534. setRules(rules2) {
  4535. this.$refs.uForm.setRules(rules2);
  4536. },
  4537. validate() {
  4538. return this.$refs.uForm.validate();
  4539. },
  4540. validateField(value2, callback) {
  4541. return this.$refs.uForm.validateField(value2, callback);
  4542. },
  4543. resetFields() {
  4544. return this.$refs.uForm.resetFields();
  4545. },
  4546. clearValidate(props2) {
  4547. return this.$refs.uForm.clearValidate(props2);
  4548. },
  4549. setMpData() {
  4550. this.$refs.uForm.children = this.children;
  4551. }
  4552. }
  4553. };
  4554. function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
  4555. const _component_uvForm = vue.resolveComponent("uvForm");
  4556. return vue.openBlock(), vue.createBlock(_component_uvForm, {
  4557. ref: "uForm",
  4558. model: _ctx.model,
  4559. rules: _ctx.rules,
  4560. errorType: _ctx.errorType,
  4561. borderBottom: _ctx.borderBottom,
  4562. labelPosition: _ctx.labelPosition,
  4563. labelWidth: _ctx.labelWidth,
  4564. labelAlign: _ctx.labelAlign,
  4565. labelStyle: _ctx.labelStyle,
  4566. customStyle: _ctx.customStyle
  4567. }, {
  4568. default: vue.withCtx(() => [
  4569. vue.renderSlot(_ctx.$slots, "default")
  4570. ]),
  4571. _: 3
  4572. /* FORWARDED */
  4573. }, 8, ["model", "rules", "errorType", "borderBottom", "labelPosition", "labelWidth", "labelAlign", "labelStyle", "customStyle"]);
  4574. }
  4575. const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u--form/u--form.vue"]]);
  4576. const _imports_0$3 = "/static/img/logo.png";
  4577. const prefixIconStyle = "font-size:50rpx";
  4578. const placeholderStyle$4 = "font-size:32rpx";
  4579. const _sfc_main$20 = {
  4580. __name: "login",
  4581. setup(__props, { expose: __expose }) {
  4582. __expose();
  4583. const customStyle = vue.reactive({
  4584. "font-size": "40rpx",
  4585. height: "90rpx"
  4586. });
  4587. let { proxy } = vue.getCurrentInstance();
  4588. const formData = vue.reactive({
  4589. username: "",
  4590. password: "",
  4591. code: ""
  4592. });
  4593. const uForm = vue.ref(null);
  4594. const isCountingDown = vue.ref(false);
  4595. const countdown = vue.ref(60);
  4596. const countDownText = vue.ref("获取验证码");
  4597. const startCountDown = () => {
  4598. isCountingDown.value = true;
  4599. countdown.value = 60;
  4600. countDownText.value = `${countdown.value}秒重发`;
  4601. const timer = setInterval(() => {
  4602. countdown.value--;
  4603. countDownText.value = `${countdown.value}秒重发`;
  4604. if (countdown.value <= 0) {
  4605. clearInterval(timer);
  4606. isCountingDown.value = false;
  4607. countDownText.value = "重新发送";
  4608. }
  4609. }, 1e3);
  4610. };
  4611. const getVerifyCode = () => {
  4612. if (isCountingDown.value)
  4613. return;
  4614. if (!formData.username)
  4615. return uni.$u.toast("请输入用户名");
  4616. if (!formData.password)
  4617. return uni.$u.toast("请输入密码");
  4618. let data = {
  4619. username: formData.username,
  4620. password: formData.password
  4621. };
  4622. uni.showLoading({
  4623. mask: true,
  4624. title: "发送中..."
  4625. });
  4626. uni.$u.http.post("/app/appUser/sendMobileCode", data).then((res2) => {
  4627. if (res2.code == 200) {
  4628. uni.showToast({
  4629. title: "验证码发送成功,请注意查收",
  4630. icon: "none"
  4631. });
  4632. startCountDown();
  4633. } else {
  4634. uni.$u.toast(res2.msg);
  4635. }
  4636. }).finally(() => uni.hideLoading());
  4637. };
  4638. const handleLogin = () => {
  4639. if (!formData.username)
  4640. return uni.$u.toast("请输入用户名");
  4641. if (!formData.password)
  4642. return uni.$u.toast("请输入密码");
  4643. uni.showLoading({
  4644. mask: true,
  4645. title: "登录中..."
  4646. });
  4647. uni.$u.http.post("/app/appUser/login", formData).then((res2) => {
  4648. if (res2.code == 200) {
  4649. uni.setStorageSync("token", res2.data);
  4650. setTimeout(() => {
  4651. getUserInfo();
  4652. uni.$u.http.get("/app/appUser/getRouters").then((resp) => {
  4653. if (resp.code == 200) {
  4654. uni.setStorageSync("menuList", resp.data);
  4655. uni.$u.toast("登录成功");
  4656. uni.switchTab({
  4657. url: "/pages/index/index"
  4658. });
  4659. uni.$u.ttsModule.speak("书嗨,不辜负每一个爱书的人");
  4660. } else {
  4661. uni.$u.toast(resp.msg);
  4662. }
  4663. });
  4664. }, 50);
  4665. } else {
  4666. uni.$u.toast(res2.msg);
  4667. }
  4668. }).catch((error2) => {
  4669. uni.showModal({
  4670. title: "登录失败",
  4671. content: JSON.stringify(error2),
  4672. showCancel: false
  4673. });
  4674. }).finally(() => uni.hideLoading());
  4675. };
  4676. function getUserInfo() {
  4677. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  4678. if (res2.code == 200) {
  4679. uni.setStorageSync("userInfo", res2.data);
  4680. }
  4681. });
  4682. }
  4683. function checkToken() {
  4684. uni.showLoading({
  4685. title: "检测登录状态..."
  4686. });
  4687. uni.$u.http.get("/app/appUser/checkToken").then((res2) => {
  4688. if (res2.code == 200) {
  4689. uni.$u.toast("登录成功");
  4690. uni.switchTab({
  4691. url: "/pages/index/index"
  4692. });
  4693. } else {
  4694. uni.$u.toast("请先登录");
  4695. }
  4696. }).finally(() => uni.hideLoading());
  4697. }
  4698. onLoad(() => {
  4699. let token = uni.getStorageSync("token");
  4700. if (token) {
  4701. checkToken();
  4702. }
  4703. });
  4704. const __returned__ = { prefixIconStyle, placeholderStyle: placeholderStyle$4, customStyle, get proxy() {
  4705. return proxy;
  4706. }, set proxy(v) {
  4707. proxy = v;
  4708. }, formData, uForm, isCountingDown, countdown, countDownText, startCountDown, getVerifyCode, handleLogin, getUserInfo, checkToken, ref: vue.ref, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, get onLoad() {
  4709. return onLoad;
  4710. } };
  4711. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  4712. return __returned__;
  4713. }
  4714. };
  4715. function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) {
  4716. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  4717. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  4718. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  4719. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
  4720. return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
  4721. vue.createCommentVNode(" Logo和标题区域 "),
  4722. vue.createElementVNode("view", { class: "logo-section" }, [
  4723. vue.createElementVNode("image", {
  4724. class: "logo",
  4725. src: _imports_0$3,
  4726. mode: "aspectFit"
  4727. })
  4728. ]),
  4729. vue.createCommentVNode(" 表单区域 "),
  4730. vue.createElementVNode("view", { class: "form-section" }, [
  4731. vue.createVNode(_component_u__form, {
  4732. model: $setup.formData,
  4733. ref: "uForm"
  4734. }, {
  4735. default: vue.withCtx(() => [
  4736. vue.createVNode(_component_u_form_item, null, {
  4737. default: vue.withCtx(() => [
  4738. vue.createVNode(_component_u_input, {
  4739. prefixIconStyle: $setup.prefixIconStyle,
  4740. "placeholder-style": $setup.placeholderStyle,
  4741. "custom-style": $setup.customStyle,
  4742. modelValue: $setup.formData.username,
  4743. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.username = $event),
  4744. placeholder: "请输入用户名",
  4745. prefixIcon: "account"
  4746. }, null, 8, ["custom-style", "modelValue"])
  4747. ]),
  4748. _: 1
  4749. /* STABLE */
  4750. }),
  4751. vue.createVNode(_component_u_form_item, null, {
  4752. default: vue.withCtx(() => [
  4753. vue.createVNode(_component_u_input, {
  4754. prefixIconStyle: $setup.prefixIconStyle,
  4755. "placeholder-style": $setup.placeholderStyle,
  4756. "custom-style": $setup.customStyle,
  4757. modelValue: $setup.formData.password,
  4758. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.password = $event),
  4759. type: "password",
  4760. placeholder: "请输入密码",
  4761. prefixIcon: "lock"
  4762. }, null, 8, ["custom-style", "modelValue"])
  4763. ]),
  4764. _: 1
  4765. /* STABLE */
  4766. }),
  4767. vue.createVNode(_component_u_form_item, null, {
  4768. default: vue.withCtx(() => [
  4769. vue.createVNode(_component_u_input, {
  4770. prefixIconStyle: $setup.prefixIconStyle,
  4771. "placeholder-style": $setup.placeholderStyle,
  4772. "custom-style": $setup.customStyle,
  4773. modelValue: $setup.formData.code,
  4774. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.code = $event),
  4775. placeholder: "请输入验证码",
  4776. prefixIcon: "chat"
  4777. }, {
  4778. suffix: vue.withCtx(() => [
  4779. vue.createVNode(_component_u_button, {
  4780. "custom-style": "width:200rpx",
  4781. color: "#22ac38",
  4782. size: "small",
  4783. onClick: $setup.getVerifyCode,
  4784. disabled: $setup.isCountingDown
  4785. }, {
  4786. default: vue.withCtx(() => [
  4787. vue.createTextVNode(
  4788. vue.toDisplayString($setup.countDownText),
  4789. 1
  4790. /* TEXT */
  4791. )
  4792. ]),
  4793. _: 1
  4794. /* STABLE */
  4795. }, 8, ["disabled"])
  4796. ]),
  4797. _: 1
  4798. /* STABLE */
  4799. }, 8, ["custom-style", "modelValue"])
  4800. ]),
  4801. _: 1
  4802. /* STABLE */
  4803. })
  4804. ]),
  4805. _: 1
  4806. /* STABLE */
  4807. }, 8, ["model"]),
  4808. vue.createVNode(_component_u_button, {
  4809. "custom-style": "margin-top:5%",
  4810. type: "primary",
  4811. block: "",
  4812. onClick: $setup.handleLogin,
  4813. color: "#22ac38",
  4814. shape: "circle"
  4815. }, {
  4816. default: vue.withCtx(() => [
  4817. vue.createTextVNode("登录")
  4818. ]),
  4819. _: 1
  4820. /* STABLE */
  4821. })
  4822. ])
  4823. ]);
  4824. }
  4825. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__scopeId", "data-v-e4e4508d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/login/login.vue"]]);
  4826. const _sfc_main$1$ = {
  4827. __name: "index",
  4828. setup(__props, { expose: __expose }) {
  4829. __expose();
  4830. function playGlobalSound() {
  4831. uni.$u.playClickSound();
  4832. }
  4833. const menuData = vue.ref([]);
  4834. let menuPromise = null;
  4835. async function getMenuList() {
  4836. if (menuData.value && menuData.value.length > 0) {
  4837. return menuData.value;
  4838. }
  4839. if (menuPromise) {
  4840. return menuPromise;
  4841. }
  4842. menuPromise = uni.$u.http.get("/app/appUser/getRouters").then((res2) => {
  4843. const data = res2.data;
  4844. menuData.value = data.map((item) => {
  4845. item.children = item.children.map((child) => {
  4846. child.query = child.query ? JSON.parse(child.query) : {};
  4847. return child;
  4848. });
  4849. return item;
  4850. });
  4851. return data;
  4852. }).catch((err) => {
  4853. formatAppLog("error", "at pages/index/index.vue:64", "获取菜单数据失败", err);
  4854. return [];
  4855. }).finally(() => {
  4856. menuPromise = null;
  4857. });
  4858. return menuPromise;
  4859. }
  4860. function getButtonList() {
  4861. uni.$u.http.get("/app/appUser/getInfo").then((res2) => {
  4862. if (res2.code == 200) {
  4863. uni.setStorageSync("buttonList", res2.permissions);
  4864. }
  4865. });
  4866. }
  4867. function getAudioConfig() {
  4868. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  4869. if (res2.code == 200) {
  4870. uni.setStorageSync("audioConfig", res2.data);
  4871. }
  4872. });
  4873. }
  4874. onLoad(() => {
  4875. uni.showLoading({
  4876. title: "加载中...",
  4877. mask: true
  4878. });
  4879. Promise.all([getMenuList(), getButtonList()]).finally(() => {
  4880. uni.hideLoading();
  4881. });
  4882. getAudioConfig();
  4883. });
  4884. const formatName = (name) => {
  4885. if (!name)
  4886. return "";
  4887. let result = name;
  4888. if (result.includes("\\n\\r")) {
  4889. result = result.replace(/\\n\\r/g, "\n");
  4890. }
  4891. return result;
  4892. };
  4893. const expressOperations = vue.ref([
  4894. {
  4895. name: "中转\n\r签收",
  4896. path: "/pages/index/express/transfer-sign",
  4897. type: "primary"
  4898. },
  4899. {
  4900. name: "到仓\n\r签收",
  4901. path: "/pages/index/express/warehouse-sign",
  4902. type: "warning"
  4903. },
  4904. {
  4905. name: "重量\n\r修改",
  4906. path: "/pages/index/express/weight-modify",
  4907. type: "primary"
  4908. },
  4909. {
  4910. name: "快递\n\r验收",
  4911. path: "/pages/index/express/quick-check",
  4912. type: "warning"
  4913. },
  4914. {
  4915. name: "路由签收\n\r异常",
  4916. path: "/pages/index/express/route-exception",
  4917. type: "primary"
  4918. },
  4919. {
  4920. name: "快递\n\r拆包",
  4921. path: "/pages/index/express/quick-unpack",
  4922. type: "warning"
  4923. }
  4924. ]);
  4925. const auditOperations = vue.ref([
  4926. {
  4927. name: "确认\n\r收货",
  4928. path: "/pages/index/audit/confirm-receipt",
  4929. type: "primary"
  4930. },
  4931. {
  4932. name: "扫书\n\r查单",
  4933. path: "/pages/index/audit/scan-order",
  4934. type: "warning"
  4935. },
  4936. {
  4937. name: "根据快递单\n\r或订单",
  4938. path: "/pages/index/audit/express-order",
  4939. type: "warning"
  4940. },
  4941. {
  4942. name: "根据\n\r发件人",
  4943. path: "/pages/index/audit/sender",
  4944. type: "primary"
  4945. }
  4946. ]);
  4947. const wmsOperations = vue.ref([
  4948. {
  4949. name: "中等\n\r入库",
  4950. path: "/pages/index/wms/medium-in",
  4951. type: "primary"
  4952. },
  4953. {
  4954. name: "良品\n\r入库",
  4955. path: "/pages/index/wms/good-in",
  4956. type: "warning"
  4957. },
  4958. {
  4959. name: "次品\n\r入库",
  4960. path: "/pages/index/wms/secondary-in",
  4961. type: "primary"
  4962. },
  4963. {
  4964. name: "不良\n\r入库",
  4965. path: "/pages/index/wms/bad-in",
  4966. type: "warning"
  4967. },
  4968. {
  4969. name: "不良\n\r出库",
  4970. path: "/pages/index/wms/bad-out",
  4971. type: "primary"
  4972. },
  4973. {
  4974. name: "不良\n\r下架",
  4975. path: "/pages/index/wms/bad-off",
  4976. type: "warning"
  4977. },
  4978. {
  4979. name: "订单\n\r查询",
  4980. path: "/pages/index/wms/order-query",
  4981. type: "primary"
  4982. },
  4983. {
  4984. name: "库位\n\r订单",
  4985. path: "/pages/index/wms/location-order",
  4986. type: "warning"
  4987. },
  4988. {
  4989. name: "快速盘点",
  4990. path: "/pages/index/wms/speedy-check",
  4991. type: "primary",
  4992. span: 24
  4993. }
  4994. ]);
  4995. const statisticsOperations = vue.ref([
  4996. {
  4997. name: "审核统计",
  4998. path: "/pages/index/statistic/audit",
  4999. type: "warning",
  5000. span: 24
  5001. },
  5002. {
  5003. name: "售后\n\r统计",
  5004. path: "/pages/index/statistic/after-sale",
  5005. type: "primary"
  5006. },
  5007. {
  5008. name: "打包\n\r统计",
  5009. path: "/pages/index/statistic/package",
  5010. type: "warning"
  5011. }
  5012. ]);
  5013. const offlineOperations = vue.ref([
  5014. {
  5015. name: "线下\n\r核单",
  5016. path: "/pages/index/offline/check-order",
  5017. type: "primary"
  5018. },
  5019. {
  5020. name: "核单\n\r记录",
  5021. path: "/pages/index/offline/check-record",
  5022. type: "warning"
  5023. }
  5024. ]);
  5025. const entryOperations = vue.ref([
  5026. {
  5027. name: "扫码\n\r查书",
  5028. path: "/pages/index/entry/scan-book",
  5029. type: "primary"
  5030. },
  5031. {
  5032. name: "录入\n\r书籍重量",
  5033. path: "/pages/index/entry/book-weight",
  5034. type: "warning"
  5035. },
  5036. {
  5037. name: "商品档案推送",
  5038. path: "/pages/index/entry/commodity-scan",
  5039. type: "primary",
  5040. span: 24
  5041. }
  5042. ]);
  5043. const handleNavigation = (path) => {
  5044. uni.redirectTo({
  5045. url: path,
  5046. fail: () => {
  5047. uni.showToast({
  5048. title: "页面跳转失败",
  5049. icon: "none"
  5050. });
  5051. }
  5052. });
  5053. };
  5054. const __returned__ = { playGlobalSound, menuData, get menuPromise() {
  5055. return menuPromise;
  5056. }, set menuPromise(v) {
  5057. menuPromise = v;
  5058. }, getMenuList, getButtonList, getAudioConfig, formatName, expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  5059. return onLoad;
  5060. } };
  5061. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  5062. return __returned__;
  5063. }
  5064. };
  5065. function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) {
  5066. return vue.openBlock(), vue.createElementBlock("view", {
  5067. class: "operation-container",
  5068. onClick: $setup.playGlobalSound
  5069. }, [
  5070. vue.createCommentVNode(" 直接循环 "),
  5071. (vue.openBlock(true), vue.createElementBlock(
  5072. vue.Fragment,
  5073. null,
  5074. vue.renderList($setup.menuData, (item) => {
  5075. return vue.openBlock(), vue.createElementBlock("view", {
  5076. class: "section",
  5077. key: item.path
  5078. }, [
  5079. vue.createElementVNode(
  5080. "view",
  5081. { class: "section-title" },
  5082. vue.toDisplayString(item.meta.title),
  5083. 1
  5084. /* TEXT */
  5085. ),
  5086. vue.createElementVNode("view", { class: "grid-container" }, [
  5087. (vue.openBlock(true), vue.createElementBlock(
  5088. vue.Fragment,
  5089. null,
  5090. vue.renderList(item.children, (child) => {
  5091. return vue.openBlock(), vue.createElementBlock("view", {
  5092. class: vue.normalizeClass(["grid-item", child.query.type]),
  5093. style: vue.normalizeStyle({ gridColumn: child.query.span ? "span 2" : "span 1" }),
  5094. key: child.path,
  5095. onClick: ($event) => $setup.handleNavigation(child.path)
  5096. }, vue.toDisplayString($setup.formatName(child.meta.title)), 15, ["onClick"]);
  5097. }),
  5098. 128
  5099. /* KEYED_FRAGMENT */
  5100. ))
  5101. ])
  5102. ]);
  5103. }),
  5104. 128
  5105. /* KEYED_FRAGMENT */
  5106. ))
  5107. ]);
  5108. }
  5109. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__scopeId", "data-v-1cf27b2a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/index.vue"]]);
  5110. const props$y = {
  5111. props: {
  5112. // 文字颜色
  5113. color: {
  5114. type: String,
  5115. default: props$G.link.color
  5116. },
  5117. // 字体大小,单位px
  5118. fontSize: {
  5119. type: [String, Number],
  5120. default: props$G.link.fontSize
  5121. },
  5122. // 是否显示下划线
  5123. underLine: {
  5124. type: Boolean,
  5125. default: props$G.link.underLine
  5126. },
  5127. // 要跳转的链接
  5128. href: {
  5129. type: String,
  5130. default: props$G.link.href
  5131. },
  5132. // 小程序中复制到粘贴板的提示语
  5133. mpTips: {
  5134. type: String,
  5135. default: props$G.link.mpTips
  5136. },
  5137. // 下划线颜色
  5138. lineColor: {
  5139. type: String,
  5140. default: props$G.link.lineColor
  5141. },
  5142. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  5143. text: {
  5144. type: String,
  5145. default: props$G.link.text
  5146. }
  5147. }
  5148. };
  5149. const _sfc_main$1_ = {
  5150. name: "u-link",
  5151. mixins: [mpMixin, mixin, props$y],
  5152. computed: {
  5153. linkStyle() {
  5154. const style = {
  5155. color: this.color,
  5156. fontSize: uni.$u.addUnit(this.fontSize),
  5157. // line-height设置为比字体大小多2px
  5158. lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
  5159. textDecoration: this.underLine ? "underline" : "none"
  5160. };
  5161. return style;
  5162. }
  5163. },
  5164. methods: {
  5165. openLink() {
  5166. plus.runtime.openURL(this.href);
  5167. this.$emit("click");
  5168. }
  5169. }
  5170. };
  5171. function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) {
  5172. return vue.openBlock(), vue.createElementBlock(
  5173. "text",
  5174. {
  5175. class: "u-link",
  5176. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
  5177. style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  5178. },
  5179. vue.toDisplayString(_ctx.text),
  5180. 5
  5181. /* TEXT, STYLE */
  5182. );
  5183. }
  5184. const __easycom_1$a = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__scopeId", "data-v-12f6646d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
  5185. const value = {
  5186. computed: {
  5187. // 经处理后需要显示的值
  5188. value() {
  5189. const {
  5190. text,
  5191. mode,
  5192. format: format2,
  5193. href
  5194. } = this;
  5195. if (mode === "price") {
  5196. if (!/^\d+(\.\d+)?$/.test(text)) {
  5197. uni.$u.error("金额模式下,text参数需要为金额格式");
  5198. }
  5199. if (uni.$u.test.func(format2)) {
  5200. return format2(text);
  5201. }
  5202. return uni.$u.priceFormat(text, 2);
  5203. }
  5204. if (mode === "date") {
  5205. !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
  5206. if (uni.$u.test.func(format2)) {
  5207. return format2(text);
  5208. }
  5209. if (format2) {
  5210. return uni.$u.timeFormat(text, format2);
  5211. }
  5212. return uni.$u.timeFormat(text, "yyyy-mm-dd");
  5213. }
  5214. if (mode === "phone") {
  5215. if (uni.$u.test.func(format2)) {
  5216. return format2(text);
  5217. }
  5218. if (format2 === "encrypt") {
  5219. return `${text.substr(0, 3)}****${text.substr(7)}`;
  5220. }
  5221. return text;
  5222. }
  5223. if (mode === "name") {
  5224. !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
  5225. if (uni.$u.test.func(format2)) {
  5226. return format2(text);
  5227. }
  5228. if (format2 === "encrypt") {
  5229. return this.formatName(text);
  5230. }
  5231. return text;
  5232. }
  5233. if (mode === "link") {
  5234. !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
  5235. return text;
  5236. }
  5237. return text;
  5238. }
  5239. },
  5240. methods: {
  5241. // 默认的姓名脱敏规则
  5242. formatName(name) {
  5243. let value2 = "";
  5244. if (name.length === 2) {
  5245. value2 = name.substr(0, 1) + "*";
  5246. } else if (name.length > 2) {
  5247. let char = "";
  5248. for (let i = 0, len = name.length - 2; i < len; i++) {
  5249. char += "*";
  5250. }
  5251. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  5252. } else {
  5253. value2 = name;
  5254. }
  5255. return value2;
  5256. }
  5257. }
  5258. };
  5259. const props$x = {
  5260. props: {
  5261. // 主题颜色
  5262. type: {
  5263. type: String,
  5264. default: props$G.text.type
  5265. },
  5266. // 是否显示
  5267. show: {
  5268. type: Boolean,
  5269. default: props$G.text.show
  5270. },
  5271. // 显示的值
  5272. text: {
  5273. type: [String, Number],
  5274. default: props$G.text.text
  5275. },
  5276. // 前置图标
  5277. prefixIcon: {
  5278. type: String,
  5279. default: props$G.text.prefixIcon
  5280. },
  5281. // 后置图标
  5282. suffixIcon: {
  5283. type: String,
  5284. default: props$G.text.suffixIcon
  5285. },
  5286. // 文本处理的匹配模式
  5287. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  5288. mode: {
  5289. type: String,
  5290. default: props$G.text.mode
  5291. },
  5292. // mode=link下,配置的链接
  5293. href: {
  5294. type: String,
  5295. default: props$G.text.href
  5296. },
  5297. // 格式化规则
  5298. format: {
  5299. type: [String, Function],
  5300. default: props$G.text.format
  5301. },
  5302. // mode=phone时,点击文本是否拨打电话
  5303. call: {
  5304. type: Boolean,
  5305. default: props$G.text.call
  5306. },
  5307. // 小程序的打开方式
  5308. openType: {
  5309. type: String,
  5310. default: props$G.text.openType
  5311. },
  5312. // 是否粗体,默认normal
  5313. bold: {
  5314. type: Boolean,
  5315. default: props$G.text.bold
  5316. },
  5317. // 是否块状
  5318. block: {
  5319. type: Boolean,
  5320. default: props$G.text.block
  5321. },
  5322. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  5323. lines: {
  5324. type: [String, Number],
  5325. default: props$G.text.lines
  5326. },
  5327. // 文本颜色
  5328. color: {
  5329. type: String,
  5330. default: props$G.text.color
  5331. },
  5332. // 字体大小
  5333. size: {
  5334. type: [String, Number],
  5335. default: props$G.text.size
  5336. },
  5337. // 图标的样式
  5338. iconStyle: {
  5339. type: [Object, String],
  5340. default: props$G.text.iconStyle
  5341. },
  5342. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  5343. decoration: {
  5344. tepe: String,
  5345. default: props$G.text.decoration
  5346. },
  5347. // 外边距,对象、字符串,数值形式均可
  5348. margin: {
  5349. type: [Object, String, Number],
  5350. default: props$G.text.margin
  5351. },
  5352. // 文本行高
  5353. lineHeight: {
  5354. type: [String, Number],
  5355. default: props$G.text.lineHeight
  5356. },
  5357. // 文本对齐方式,可选值left|center|right
  5358. align: {
  5359. type: String,
  5360. default: props$G.text.align
  5361. },
  5362. // 文字换行,可选值break-word|normal|anywhere
  5363. wordWrap: {
  5364. type: String,
  5365. default: props$G.text.wordWrap
  5366. }
  5367. }
  5368. };
  5369. const _sfc_main$1Z = {
  5370. name: "u--text",
  5371. mixins: [mpMixin, mixin, value, props$x],
  5372. emits: ["click"],
  5373. computed: {
  5374. valueStyle() {
  5375. const style = {
  5376. textDecoration: this.decoration,
  5377. fontWeight: this.bold ? "bold" : "normal",
  5378. wordWrap: this.wordWrap,
  5379. fontSize: uni.$u.addUnit(this.size)
  5380. };
  5381. !this.type && (style.color = this.color);
  5382. this.isNvue && this.lines && (style.lines = this.lines);
  5383. this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
  5384. !this.isNvue && this.block && (style.display = "block");
  5385. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  5386. },
  5387. isNvue() {
  5388. let nvue = false;
  5389. return nvue;
  5390. },
  5391. isMp() {
  5392. let mp = false;
  5393. return mp;
  5394. }
  5395. },
  5396. data() {
  5397. return {};
  5398. },
  5399. methods: {
  5400. clickHandler() {
  5401. if (this.call && this.mode === "phone") {
  5402. uni.makePhoneCall({
  5403. phoneNumber: this.text
  5404. });
  5405. }
  5406. this.$emit("click");
  5407. }
  5408. }
  5409. };
  5410. function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) {
  5411. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  5412. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$a);
  5413. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  5414. "view",
  5415. {
  5416. key: 0,
  5417. class: vue.normalizeClass(["u-text", []]),
  5418. style: vue.normalizeStyle({
  5419. margin: _ctx.margin,
  5420. justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
  5421. }),
  5422. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5423. },
  5424. [
  5425. _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
  5426. "text",
  5427. {
  5428. key: 0,
  5429. class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
  5430. style: vue.normalizeStyle([$options.valueStyle])
  5431. },
  5432. "¥",
  5433. 6
  5434. /* CLASS, STYLE */
  5435. )) : vue.createCommentVNode("v-if", true),
  5436. _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5437. key: 1,
  5438. class: "u-text__prefix-icon"
  5439. }, [
  5440. vue.createVNode(_component_u_icon, {
  5441. name: _ctx.prefixIcon,
  5442. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5443. }, null, 8, ["name", "customStyle"])
  5444. ])) : vue.createCommentVNode("v-if", true),
  5445. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
  5446. key: 2,
  5447. text: _ctx.value,
  5448. href: _ctx.href,
  5449. underLine: ""
  5450. }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
  5451. key: 3,
  5452. class: "u-reset-button u-text__value",
  5453. style: vue.normalizeStyle([$options.valueStyle]),
  5454. "data-index": _ctx.index,
  5455. openType: _ctx.openType,
  5456. onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
  5457. onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
  5458. onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
  5459. onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
  5460. onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
  5461. onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
  5462. lang: _ctx.lang,
  5463. "session-from": _ctx.sessionFrom,
  5464. "send-message-title": _ctx.sendMessageTitle,
  5465. "send-message-path": _ctx.sendMessagePath,
  5466. "send-message-img": _ctx.sendMessageImg,
  5467. "show-message-card": _ctx.showMessageCard,
  5468. "app-parameter": _ctx.appParameter
  5469. }, vue.toDisplayString(_ctx.value), 45, ["data-index", "openType", "lang", "session-from", "send-message-title", "send-message-path", "send-message-img", "show-message-card", "app-parameter"])) : (vue.openBlock(), vue.createElementBlock(
  5470. "text",
  5471. {
  5472. key: 4,
  5473. class: vue.normalizeClass(["u-text__value", [
  5474. _ctx.type && `u-text__value--${_ctx.type}`,
  5475. _ctx.lines && `u-line-${_ctx.lines}`
  5476. ]]),
  5477. style: vue.normalizeStyle([$options.valueStyle])
  5478. },
  5479. vue.toDisplayString(_ctx.value),
  5480. 7
  5481. /* TEXT, CLASS, STYLE */
  5482. )),
  5483. _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5484. key: 5,
  5485. class: "u-text__suffix-icon"
  5486. }, [
  5487. vue.createVNode(_component_u_icon, {
  5488. name: _ctx.suffixIcon,
  5489. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5490. }, null, 8, ["name", "customStyle"])
  5491. ])) : vue.createCommentVNode("v-if", true)
  5492. ],
  5493. 4
  5494. /* STYLE */
  5495. )) : vue.createCommentVNode("v-if", true);
  5496. }
  5497. const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__scopeId", "data-v-0a574502"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  5498. const _sfc_main$1Y = {
  5499. name: "u--text",
  5500. mixins: [mpMixin, mixin, props$x],
  5501. components: {
  5502. uvText: __easycom_1$9
  5503. }
  5504. };
  5505. function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
  5506. const _component_uvText = vue.resolveComponent("uvText");
  5507. return vue.openBlock(), vue.createBlock(_component_uvText, {
  5508. type: _ctx.type,
  5509. show: _ctx.show,
  5510. text: _ctx.text,
  5511. prefixIcon: _ctx.prefixIcon,
  5512. suffixIcon: _ctx.suffixIcon,
  5513. mode: _ctx.mode,
  5514. href: _ctx.href,
  5515. format: _ctx.format,
  5516. call: _ctx.call,
  5517. openType: _ctx.openType,
  5518. bold: _ctx.bold,
  5519. block: _ctx.block,
  5520. lines: _ctx.lines,
  5521. color: _ctx.color,
  5522. decoration: _ctx.decoration,
  5523. size: _ctx.size,
  5524. iconStyle: _ctx.iconStyle,
  5525. margin: _ctx.margin,
  5526. lineHeight: _ctx.lineHeight,
  5527. align: _ctx.align,
  5528. wordWrap: _ctx.wordWrap,
  5529. customStyle: _ctx.customStyle
  5530. }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
  5531. }
  5532. const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
  5533. const props$w = {
  5534. props: {
  5535. // 头像图片路径(不能为相对路径)
  5536. src: {
  5537. type: String,
  5538. default: props$G.avatar.src
  5539. },
  5540. // 头像形状,circle-圆形,square-方形
  5541. shape: {
  5542. type: String,
  5543. default: props$G.avatar.shape
  5544. },
  5545. // 头像尺寸
  5546. size: {
  5547. type: [String, Number],
  5548. default: props$G.avatar.size
  5549. },
  5550. // 裁剪模式
  5551. mode: {
  5552. type: String,
  5553. default: props$G.avatar.mode
  5554. },
  5555. // 显示的文字
  5556. text: {
  5557. type: String,
  5558. default: props$G.avatar.text
  5559. },
  5560. // 背景色
  5561. bgColor: {
  5562. type: String,
  5563. default: props$G.avatar.bgColor
  5564. },
  5565. // 文字颜色
  5566. color: {
  5567. type: String,
  5568. default: props$G.avatar.color
  5569. },
  5570. // 文字大小
  5571. fontSize: {
  5572. type: [String, Number],
  5573. default: props$G.avatar.fontSize
  5574. },
  5575. // 显示的图标
  5576. icon: {
  5577. type: String,
  5578. default: props$G.avatar.icon
  5579. },
  5580. // 显示小程序头像,只对百度,微信,QQ小程序有效
  5581. mpAvatar: {
  5582. type: Boolean,
  5583. default: props$G.avatar.mpAvatar
  5584. },
  5585. // 是否使用随机背景色
  5586. randomBgColor: {
  5587. type: Boolean,
  5588. default: props$G.avatar.randomBgColor
  5589. },
  5590. // 加载失败的默认头像(组件有内置默认图片)
  5591. defaultUrl: {
  5592. type: String,
  5593. default: props$G.avatar.defaultUrl
  5594. },
  5595. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  5596. colorIndex: {
  5597. type: [String, Number],
  5598. // 校验参数规则,索引在0-19之间
  5599. validator(n) {
  5600. return uni.$u.test.range(n, [0, 19]) || n === "";
  5601. },
  5602. default: props$G.avatar.colorIndex
  5603. },
  5604. // 组件标识符
  5605. name: {
  5606. type: String,
  5607. default: props$G.avatar.name
  5608. }
  5609. }
  5610. };
  5611. const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z";
  5612. const _sfc_main$1X = {
  5613. name: "u-avatar",
  5614. mixins: [mpMixin, mixin, props$w],
  5615. data() {
  5616. return {
  5617. // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
  5618. colors: [
  5619. "#ffb34b",
  5620. "#f2bba9",
  5621. "#f7a196",
  5622. "#f18080",
  5623. "#88a867",
  5624. "#bfbf39",
  5625. "#89c152",
  5626. "#94d554",
  5627. "#f19ec2",
  5628. "#afaae4",
  5629. "#e1b0df",
  5630. "#c38cc1",
  5631. "#72dcdc",
  5632. "#9acdcb",
  5633. "#77b1cc",
  5634. "#448aca",
  5635. "#86cefa",
  5636. "#98d1ee",
  5637. "#73d1f1",
  5638. "#80a7dc"
  5639. ],
  5640. avatarUrl: this.src,
  5641. allowMp: false
  5642. };
  5643. },
  5644. watch: {
  5645. // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
  5646. // 而组件内部不能直接修改props的值,所以需要一个中间变量
  5647. src: {
  5648. immediate: true,
  5649. handler(newVal) {
  5650. this.avatarUrl = newVal;
  5651. if (!newVal) {
  5652. this.errorHandler();
  5653. }
  5654. }
  5655. }
  5656. },
  5657. computed: {
  5658. imageStyle() {
  5659. const style = {};
  5660. return style;
  5661. }
  5662. },
  5663. created() {
  5664. this.init();
  5665. },
  5666. methods: {
  5667. init() {
  5668. },
  5669. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  5670. isImg() {
  5671. return this.src.indexOf("/") !== -1;
  5672. },
  5673. // 图片加载时失败时触发
  5674. errorHandler() {
  5675. this.avatarUrl = this.defaultUrl || base64Avatar;
  5676. },
  5677. clickHandler() {
  5678. this.$emit("click", this.name);
  5679. }
  5680. }
  5681. };
  5682. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  5683. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  5684. const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_1$8);
  5685. return vue.openBlock(), vue.createElementBlock(
  5686. "view",
  5687. {
  5688. class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]),
  5689. style: vue.normalizeStyle([{
  5690. backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : _ctx.$u.random(0, 19)] : _ctx.bgColor : "transparent",
  5691. width: _ctx.$u.addUnit(_ctx.size),
  5692. height: _ctx.$u.addUnit(_ctx.size)
  5693. }, _ctx.$u.addStyle(_ctx.customStyle)]),
  5694. onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5695. },
  5696. [
  5697. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  5698. _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock(
  5699. vue.Fragment,
  5700. { key: 0 },
  5701. [],
  5702. 64
  5703. /* STABLE_FRAGMENT */
  5704. )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5705. key: 1,
  5706. name: _ctx.icon,
  5707. size: _ctx.fontSize,
  5708. color: _ctx.color
  5709. }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_u__text, {
  5710. key: 2,
  5711. text: _ctx.text,
  5712. size: _ctx.fontSize,
  5713. color: _ctx.color,
  5714. align: "center",
  5715. customStyle: "justify-content: center"
  5716. }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  5717. key: 3,
  5718. class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]),
  5719. src: $data.avatarUrl || _ctx.defaultUrl,
  5720. mode: _ctx.mode,
  5721. onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)),
  5722. style: vue.normalizeStyle([{
  5723. width: _ctx.$u.addUnit(_ctx.size),
  5724. height: _ctx.$u.addUnit(_ctx.size)
  5725. }])
  5726. }, null, 46, ["src", "mode"]))
  5727. ], true)
  5728. ],
  5729. 6
  5730. /* CLASS, STYLE */
  5731. );
  5732. }
  5733. const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-34d954f9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
  5734. const props$v = {
  5735. props: {
  5736. // 标题
  5737. title: {
  5738. type: [String, Number],
  5739. default: props$G.cell.title
  5740. },
  5741. // 标题下方的描述信息
  5742. label: {
  5743. type: [String, Number],
  5744. default: props$G.cell.label
  5745. },
  5746. // 右侧的内容
  5747. value: {
  5748. type: [String, Number],
  5749. default: props$G.cell.value
  5750. },
  5751. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  5752. icon: {
  5753. type: String,
  5754. default: props$G.cell.icon
  5755. },
  5756. // 是否禁用cell
  5757. disabled: {
  5758. type: Boolean,
  5759. default: props$G.cell.disabled
  5760. },
  5761. // 是否显示下边框
  5762. border: {
  5763. type: Boolean,
  5764. default: props$G.cell.border
  5765. },
  5766. // 内容是否垂直居中(主要是针对右侧的value部分)
  5767. center: {
  5768. type: Boolean,
  5769. default: props$G.cell.center
  5770. },
  5771. // 点击后跳转的URL地址
  5772. url: {
  5773. type: String,
  5774. default: props$G.cell.url
  5775. },
  5776. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  5777. linkType: {
  5778. type: String,
  5779. default: props$G.cell.linkType
  5780. },
  5781. // 是否开启点击反馈(表现为点击时加上灰色背景)
  5782. clickable: {
  5783. type: Boolean,
  5784. default: props$G.cell.clickable
  5785. },
  5786. // 是否展示右侧箭头并开启点击反馈
  5787. isLink: {
  5788. type: Boolean,
  5789. default: props$G.cell.isLink
  5790. },
  5791. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  5792. required: {
  5793. type: Boolean,
  5794. default: props$G.cell.required
  5795. },
  5796. // 右侧的图标箭头
  5797. rightIcon: {
  5798. type: String,
  5799. default: props$G.cell.rightIcon
  5800. },
  5801. // 右侧箭头的方向,可选值为:left,up,down
  5802. arrowDirection: {
  5803. type: String,
  5804. default: props$G.cell.arrowDirection
  5805. },
  5806. // 左侧图标样式
  5807. iconStyle: {
  5808. type: [Object, String],
  5809. default: () => {
  5810. return uni.$u.props.cell.iconStyle;
  5811. }
  5812. },
  5813. // 右侧箭头图标的样式
  5814. rightIconStyle: {
  5815. type: [Object, String],
  5816. default: () => {
  5817. return uni.$u.props.cell.rightIconStyle;
  5818. }
  5819. },
  5820. // 标题的样式
  5821. titleStyle: {
  5822. type: [Object, String],
  5823. default: () => {
  5824. return uni.$u.props.cell.titleStyle;
  5825. }
  5826. },
  5827. // 单位元的大小,可选值为large
  5828. size: {
  5829. type: String,
  5830. default: props$G.cell.size
  5831. },
  5832. // 点击cell是否阻止事件传播
  5833. stop: {
  5834. type: Boolean,
  5835. default: props$G.cell.stop
  5836. },
  5837. // 标识符,cell被点击时返回
  5838. name: {
  5839. type: [Number, String],
  5840. default: props$G.cell.name
  5841. }
  5842. }
  5843. };
  5844. const _sfc_main$1W = {
  5845. name: "u-cell",
  5846. data() {
  5847. return {};
  5848. },
  5849. mixins: [mpMixin, mixin, props$v],
  5850. computed: {
  5851. titleTextStyle() {
  5852. return uni.$u.addStyle(this.titleStyle);
  5853. }
  5854. },
  5855. emits: ["click"],
  5856. methods: {
  5857. // 点击cell
  5858. clickHandler(e) {
  5859. if (this.disabled)
  5860. return;
  5861. this.$emit("click", {
  5862. name: this.name
  5863. });
  5864. this.openPage();
  5865. this.stop && this.preventEvent(e);
  5866. }
  5867. }
  5868. };
  5869. function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
  5870. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  5871. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
  5872. return vue.openBlock(), vue.createElementBlock("view", {
  5873. class: vue.normalizeClass(["u-cell", [_ctx.customClass]]),
  5874. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5875. "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
  5876. "hover-stay-time": 250,
  5877. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5878. }, [
  5879. vue.createElementVNode(
  5880. "view",
  5881. {
  5882. class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]])
  5883. },
  5884. [
  5885. vue.createElementVNode("view", { class: "u-cell__body__content" }, [
  5886. vue.createElementVNode("view", { class: "u-cell__left-icon-wrap" }, [
  5887. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  5888. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5889. key: 0,
  5890. name: _ctx.icon,
  5891. "custom-style": _ctx.iconStyle,
  5892. size: _ctx.size === "large" ? 22 : 18
  5893. }, null, 8, ["name", "custom-style", "size"])) : vue.createCommentVNode("v-if", true)
  5894. ], true)
  5895. ]),
  5896. vue.createElementVNode("view", { class: "u-cell__title" }, [
  5897. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5898. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  5899. "text",
  5900. {
  5901. key: 0,
  5902. class: vue.normalizeClass(["u-cell__title-text", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]),
  5903. style: vue.normalizeStyle([$options.titleTextStyle])
  5904. },
  5905. vue.toDisplayString(_ctx.title),
  5906. 7
  5907. /* TEXT, CLASS, STYLE */
  5908. )) : vue.createCommentVNode("v-if", true)
  5909. ], true),
  5910. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  5911. _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  5912. "text",
  5913. {
  5914. key: 0,
  5915. class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]])
  5916. },
  5917. vue.toDisplayString(_ctx.label),
  5918. 3
  5919. /* TEXT, CLASS */
  5920. )) : vue.createCommentVNode("v-if", true)
  5921. ], true)
  5922. ])
  5923. ]),
  5924. vue.renderSlot(_ctx.$slots, "value", {}, () => [
  5925. !_ctx.$u.test.empty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock(
  5926. "text",
  5927. {
  5928. key: 0,
  5929. class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]])
  5930. },
  5931. vue.toDisplayString(_ctx.value),
  5932. 3
  5933. /* TEXT, CLASS */
  5934. )) : vue.createCommentVNode("v-if", true)
  5935. ], true),
  5936. vue.createElementVNode(
  5937. "view",
  5938. {
  5939. class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
  5940. },
  5941. [
  5942. vue.renderSlot(_ctx.$slots, "right-icon", {}, () => [
  5943. _ctx.isLink ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5944. key: 0,
  5945. name: _ctx.rightIcon,
  5946. "custom-style": _ctx.rightIconStyle,
  5947. color: _ctx.disabled ? "#c8c9cc" : "info",
  5948. size: _ctx.size === "large" ? 18 : 16
  5949. }, null, 8, ["name", "custom-style", "color", "size"])) : vue.createCommentVNode("v-if", true)
  5950. ], true)
  5951. ],
  5952. 2
  5953. /* CLASS */
  5954. )
  5955. ],
  5956. 2
  5957. /* CLASS */
  5958. ),
  5959. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  5960. ], 14, ["hover-class"]);
  5961. }
  5962. const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-3fd6feca"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
  5963. const props$u = {
  5964. props: {
  5965. // 分组标题
  5966. title: {
  5967. type: String,
  5968. default: props$G.cellGroup.title
  5969. },
  5970. // 是否显示外边框
  5971. border: {
  5972. type: Boolean,
  5973. default: props$G.cellGroup.border
  5974. }
  5975. }
  5976. };
  5977. const _sfc_main$1V = {
  5978. name: "u-cell-group",
  5979. mixins: [mpMixin, mixin, props$u]
  5980. };
  5981. function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
  5982. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
  5983. return vue.openBlock(), vue.createElementBlock(
  5984. "view",
  5985. {
  5986. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5987. class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"])
  5988. },
  5989. [
  5990. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  5991. key: 0,
  5992. class: "u-cell-group__title"
  5993. }, [
  5994. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5995. vue.createElementVNode(
  5996. "text",
  5997. { class: "u-cell-group__title__text" },
  5998. vue.toDisplayString(_ctx.title),
  5999. 1
  6000. /* TEXT */
  6001. )
  6002. ], true)
  6003. ])) : vue.createCommentVNode("v-if", true),
  6004. vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [
  6005. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  6006. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6007. ])
  6008. ],
  6009. 6
  6010. /* CLASS, STYLE */
  6011. );
  6012. }
  6013. const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-014d39dc"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
  6014. const _sfc_main$1U = {
  6015. __name: "my",
  6016. setup(__props, { expose: __expose }) {
  6017. __expose();
  6018. function playGlobalSound() {
  6019. uni.$u.playClickSound();
  6020. }
  6021. let defaultAvatar = "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png";
  6022. const settingsList = vue.ref([
  6023. {
  6024. title: "用户信息",
  6025. path: "/pages/my/page/user-info"
  6026. },
  6027. {
  6028. title: "默认仓库",
  6029. path: "/pages/my/page/warehouse"
  6030. },
  6031. {
  6032. title: "学校设置",
  6033. path: "/pages/my/page/school"
  6034. },
  6035. {
  6036. title: "审核未完成",
  6037. path: "/pages/my/page/audit-unfinished"
  6038. },
  6039. {
  6040. title: "版本设置",
  6041. path: "/pages/my/page/version",
  6042. icon: "tags"
  6043. },
  6044. {
  6045. title: "音频设置",
  6046. path: "/pages/my/page/volume"
  6047. },
  6048. {
  6049. title: "图书显示设置",
  6050. path: "/pages/my/page/book-display"
  6051. },
  6052. {
  6053. title: "修改密码",
  6054. icon: "lock",
  6055. path: "/pages/my/page/password"
  6056. },
  6057. {
  6058. title: "退出账号",
  6059. path: "/pages/my/page/logout",
  6060. type: "logout"
  6061. }
  6062. ]);
  6063. const greeting = vue.ref("");
  6064. const updateGreeting = () => {
  6065. const hour = (/* @__PURE__ */ new Date()).getHours();
  6066. if (hour >= 5 && hour < 12) {
  6067. greeting.value = "早上好";
  6068. } else if (hour >= 12 && hour < 14) {
  6069. greeting.value = "中午好";
  6070. } else if (hour >= 14 && hour < 18) {
  6071. greeting.value = "下午好";
  6072. } else if (hour >= 18 && hour < 22) {
  6073. greeting.value = "晚上好";
  6074. } else {
  6075. greeting.value = "夜深了";
  6076. }
  6077. };
  6078. const userName = vue.ref("-");
  6079. const avatar = vue.ref("");
  6080. function getUserInfo() {
  6081. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  6082. if (res2.code == 200) {
  6083. userName.value = res2.data.userName;
  6084. avatar.value = res2.data.avatar;
  6085. }
  6086. });
  6087. }
  6088. onLoad(() => {
  6089. updateGreeting();
  6090. setInterval(updateGreeting, 60 * 60 * 1e3);
  6091. getUserInfo();
  6092. });
  6093. const handleClick = (item) => {
  6094. if (item.type === "logout") {
  6095. uni.showModal({
  6096. title: "提示",
  6097. content: "确定要退出登录吗?",
  6098. success: (res2) => {
  6099. if (res2.confirm) {
  6100. uni.clearStorageSync();
  6101. uni.reLaunch({
  6102. url: "/pages/login/login"
  6103. });
  6104. }
  6105. }
  6106. });
  6107. return;
  6108. }
  6109. uni.redirectTo({
  6110. url: item.path
  6111. });
  6112. };
  6113. const __returned__ = { playGlobalSound, get defaultAvatar() {
  6114. return defaultAvatar;
  6115. }, set defaultAvatar(v) {
  6116. defaultAvatar = v;
  6117. }, settingsList, greeting, updateGreeting, userName, avatar, getUserInfo, handleClick, ref: vue.ref, onMounted: vue.onMounted, get onLoad() {
  6118. return onLoad;
  6119. } };
  6120. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  6121. return __returned__;
  6122. }
  6123. };
  6124. function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
  6125. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  6126. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  6127. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  6128. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  6129. return vue.openBlock(), vue.createElementBlock("view", {
  6130. class: "settings-page",
  6131. onClick: $setup.playGlobalSound
  6132. }, [
  6133. vue.createCommentVNode(" 顶部用户信息 "),
  6134. vue.createElementVNode("view", { class: "user-header" }, [
  6135. vue.createElementVNode("view", { class: "user-info" }, [
  6136. vue.createVNode(_component_u_avatar, {
  6137. size: 60,
  6138. src: $setup.avatar || $setup.defaultAvatar
  6139. }, null, 8, ["src"]),
  6140. vue.createElementVNode("view", { class: "greeting" }, [
  6141. vue.createElementVNode(
  6142. "text",
  6143. { class: "time" },
  6144. vue.toDisplayString($setup.greeting) + "!",
  6145. 1
  6146. /* TEXT */
  6147. ),
  6148. vue.createElementVNode(
  6149. "text",
  6150. { class: "name" },
  6151. vue.toDisplayString($setup.userName),
  6152. 1
  6153. /* TEXT */
  6154. )
  6155. ])
  6156. ])
  6157. ]),
  6158. vue.createCommentVNode(" 设置列表 "),
  6159. vue.createElementVNode("view", { class: "settings-list" }, [
  6160. vue.createVNode(_component_u_cell_group, { border: false }, {
  6161. default: vue.withCtx(() => [
  6162. (vue.openBlock(true), vue.createElementBlock(
  6163. vue.Fragment,
  6164. null,
  6165. vue.renderList($setup.settingsList, (item, index2) => {
  6166. return vue.openBlock(), vue.createBlock(_component_u_cell, {
  6167. key: index2,
  6168. title: item.title,
  6169. isLink: true,
  6170. onClick: ($event) => $setup.handleClick(item),
  6171. border: index2 == $setup.settingsList.length - 1 ? false : true
  6172. }, {
  6173. icon: vue.withCtx(() => [
  6174. vue.createElementVNode("view", { class: "cell-icon" }, [
  6175. vue.createVNode(_component_u_icon, {
  6176. name: item.icon || "setting",
  6177. size: "22",
  6178. color: "#333"
  6179. }, null, 8, ["name"])
  6180. ])
  6181. ]),
  6182. _: 2
  6183. /* DYNAMIC */
  6184. }, 1032, ["title", "onClick", "border"]);
  6185. }),
  6186. 128
  6187. /* KEYED_FRAGMENT */
  6188. ))
  6189. ]),
  6190. _: 1
  6191. /* STABLE */
  6192. })
  6193. ])
  6194. ]);
  6195. }
  6196. const PagesMyMy = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-2f1ef635"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/my.vue"]]);
  6197. const GlobalOption = {
  6198. down: {
  6199. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  6200. offset: 80,
  6201. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  6202. native: false
  6203. // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  6204. },
  6205. up: {
  6206. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  6207. offset: 150,
  6208. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  6209. toTop: {
  6210. // 回到顶部按钮,需配置src才显示
  6211. src: "https://www.mescroll.com/img/mescroll-totop.png",
  6212. // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  6213. offset: 1e3,
  6214. // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  6215. right: 20,
  6216. // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6217. bottom: 120,
  6218. // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6219. width: 72
  6220. // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6221. },
  6222. empty: {
  6223. use: true,
  6224. // 是否显示空布局
  6225. icon: "https://www.mescroll.com/img/mescroll-empty.png"
  6226. // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  6227. }
  6228. },
  6229. // 国际化配置
  6230. i18n: {
  6231. // 中文
  6232. zh: {
  6233. down: {
  6234. textInOffset: "下拉刷新",
  6235. // 下拉的距离在offset范围内的提示文本
  6236. textOutOffset: "释放更新",
  6237. // 下拉的距离大于offset范围的提示文本
  6238. textLoading: "加载中 ...",
  6239. // 加载中的提示文本
  6240. textSuccess: "加载成功",
  6241. // 加载成功的文本
  6242. textErr: "加载失败"
  6243. // 加载失败的文本
  6244. },
  6245. up: {
  6246. textLoading: "加载中 ...",
  6247. // 加载中的提示文本
  6248. textNoMore: "-- END --",
  6249. // 没有更多数据的提示文本
  6250. empty: {
  6251. tip: "暂无数据"
  6252. // 空提示
  6253. }
  6254. }
  6255. },
  6256. // 英文
  6257. en: {
  6258. down: {
  6259. textInOffset: "drop down refresh",
  6260. textOutOffset: "release updates",
  6261. textLoading: "loading ...",
  6262. textSuccess: "loaded successfully",
  6263. textErr: "loading failed"
  6264. },
  6265. up: {
  6266. textLoading: "loading ...",
  6267. textNoMore: "-- END --",
  6268. empty: {
  6269. tip: "~ absolutely empty ~"
  6270. }
  6271. }
  6272. }
  6273. }
  6274. };
  6275. const mescrollI18n = {
  6276. // 默认语言
  6277. def: "zh",
  6278. // 获取当前语言类型
  6279. getType() {
  6280. return uni.getStorageSync("mescroll-i18n") || this.def;
  6281. },
  6282. // 设置当前语言类型
  6283. setType(type2) {
  6284. uni.setStorageSync("mescroll-i18n", type2);
  6285. }
  6286. };
  6287. const _imports_0$2 = "/assets/no-result.6af066e5.png";
  6288. const _sfc_main$1T = {
  6289. props: {
  6290. // empty的配置项: 默认为GlobalOption.up.empty
  6291. option: {
  6292. type: Object,
  6293. default() {
  6294. return {};
  6295. }
  6296. }
  6297. },
  6298. // 使用computed获取配置,用于支持option的动态配置
  6299. computed: {
  6300. // 图标
  6301. icon() {
  6302. if (this.option.icon != null) {
  6303. return this.option.icon;
  6304. } else {
  6305. let i18nType = mescrollI18n.getType();
  6306. if (this.option.i18n) {
  6307. return this.option.i18n[i18nType].icon;
  6308. } else {
  6309. return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
  6310. }
  6311. }
  6312. },
  6313. // 文本提示
  6314. tip() {
  6315. if (this.option.tip != null) {
  6316. return this.option.tip;
  6317. } else {
  6318. let i18nType = mescrollI18n.getType();
  6319. if (this.option.i18n) {
  6320. return this.option.i18n[i18nType].tip;
  6321. } else {
  6322. return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
  6323. }
  6324. }
  6325. },
  6326. // 按钮文本
  6327. btnText() {
  6328. if (this.option.i18n) {
  6329. let i18nType = mescrollI18n.getType();
  6330. return this.option.i18n[i18nType].btnText;
  6331. } else {
  6332. return this.option.btnText;
  6333. }
  6334. }
  6335. },
  6336. methods: {
  6337. // 点击按钮
  6338. emptyClick() {
  6339. this.$emit("emptyclick");
  6340. }
  6341. }
  6342. };
  6343. function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
  6344. return vue.openBlock(), vue.createElementBlock(
  6345. "view",
  6346. {
  6347. class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
  6348. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
  6349. },
  6350. [
  6351. vue.createCommentVNode(' <view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view> '),
  6352. vue.createElementVNode("view", null, [
  6353. $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  6354. key: 0,
  6355. class: "empty-icon",
  6356. src: _imports_0$2,
  6357. mode: "widthFix"
  6358. })) : vue.createCommentVNode("v-if", true)
  6359. ]),
  6360. $options.tip ? (vue.openBlock(), vue.createElementBlock(
  6361. "view",
  6362. {
  6363. key: 0,
  6364. class: "empty-tip"
  6365. },
  6366. vue.toDisplayString($options.tip),
  6367. 1
  6368. /* TEXT */
  6369. )) : vue.createCommentVNode("v-if", true),
  6370. $options.btnText ? (vue.openBlock(), vue.createElementBlock(
  6371. "view",
  6372. {
  6373. key: 1,
  6374. class: "empty-btn",
  6375. onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
  6376. },
  6377. vue.toDisplayString($options.btnText),
  6378. 1
  6379. /* TEXT */
  6380. )) : vue.createCommentVNode("v-if", true)
  6381. ],
  6382. 6
  6383. /* CLASS, STYLE */
  6384. );
  6385. }
  6386. const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__scopeId", "data-v-7cefd855"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]);
  6387. function MeScroll(options, isScrollBody) {
  6388. let me = this;
  6389. me.version = "1.3.7";
  6390. me.options = options || {};
  6391. me.isScrollBody = isScrollBody || false;
  6392. me.isDownScrolling = false;
  6393. me.isUpScrolling = false;
  6394. let hasDownCallback = me.options.down && me.options.down.callback;
  6395. me.initDownScroll();
  6396. me.initUpScroll();
  6397. setTimeout(function() {
  6398. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  6399. if (me.optDown.autoShowLoading) {
  6400. me.triggerDownScroll();
  6401. } else {
  6402. me.optDown.callback && me.optDown.callback(me);
  6403. }
  6404. }
  6405. if (!me.isUpAutoLoad) {
  6406. setTimeout(function() {
  6407. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  6408. }, 100);
  6409. }
  6410. }, 30);
  6411. }
  6412. MeScroll.prototype.extendDownScroll = function(optDown) {
  6413. MeScroll.extend(optDown, {
  6414. use: true,
  6415. // 是否启用下拉刷新; 默认true
  6416. auto: true,
  6417. // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  6418. native: false,
  6419. // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  6420. autoShowLoading: false,
  6421. // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  6422. isLock: false,
  6423. // 是否锁定下拉刷新,默认false;
  6424. offset: 80,
  6425. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  6426. startTop: 100,
  6427. // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  6428. inOffsetRate: 1,
  6429. // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  6430. outOffsetRate: 0.2,
  6431. // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  6432. bottomOffset: 20,
  6433. // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  6434. minAngle: 45,
  6435. // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  6436. textInOffset: "下拉刷新",
  6437. // 下拉的距离在offset范围内的提示文本
  6438. textOutOffset: "释放更新",
  6439. // 下拉的距离大于offset范围的提示文本
  6440. textLoading: "加载中 ...",
  6441. // 加载中的提示文本
  6442. textSuccess: "加载成功",
  6443. // 加载成功的文本
  6444. textErr: "加载失败",
  6445. // 加载失败的文本
  6446. beforeEndDelay: 0,
  6447. // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
  6448. bgColor: "transparent",
  6449. // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  6450. textColor: "gray",
  6451. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  6452. inited: null,
  6453. // 下拉刷新初始化完毕的回调
  6454. inOffset: null,
  6455. // 下拉的距离进入offset范围内那一刻的回调
  6456. outOffset: null,
  6457. // 下拉的距离大于offset那一刻的回调
  6458. onMoving: null,
  6459. // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  6460. beforeLoading: null,
  6461. // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  6462. showLoading: null,
  6463. // 显示下拉刷新进度的回调
  6464. afterLoading: null,
  6465. // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  6466. beforeEndDownScroll: null,
  6467. // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  6468. endDownScroll: null,
  6469. // 结束下拉刷新的回调
  6470. afterEndDownScroll: null,
  6471. // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  6472. callback: function(mescroll) {
  6473. mescroll.resetUpScroll();
  6474. }
  6475. });
  6476. };
  6477. MeScroll.prototype.extendUpScroll = function(optUp) {
  6478. MeScroll.extend(optUp, {
  6479. use: true,
  6480. // 是否启用上拉加载; 默认true
  6481. auto: true,
  6482. // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  6483. isLock: false,
  6484. // 是否锁定上拉加载,默认false;
  6485. isBoth: true,
  6486. // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  6487. callback: null,
  6488. // 上拉加载的回调;function(page,mescroll){ }
  6489. page: {
  6490. num: 0,
  6491. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  6492. size: 10,
  6493. // 每页数据的数量
  6494. time: null
  6495. // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  6496. },
  6497. noMoreSize: 5,
  6498. // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  6499. offset: 150,
  6500. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  6501. textLoading: "加载中 ...",
  6502. // 加载中的提示文本
  6503. textNoMore: "-- END --",
  6504. // 没有更多数据的提示文本
  6505. bgColor: "transparent",
  6506. // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  6507. textColor: "gray",
  6508. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  6509. inited: null,
  6510. // 初始化完毕的回调
  6511. showLoading: null,
  6512. // 显示加载中的回调
  6513. showNoMore: null,
  6514. // 显示无更多数据的回调
  6515. hideUpScroll: null,
  6516. // 隐藏上拉加载的回调
  6517. errDistance: 60,
  6518. // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  6519. toTop: {
  6520. // 回到顶部按钮,需配置src才显示
  6521. src: null,
  6522. // 图片路径,默认null (绝对路径或网络图)
  6523. offset: 1e3,
  6524. // 列表滚动多少距离才显示回到顶部按钮,默认1000
  6525. duration: 300,
  6526. // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  6527. btnClick: null,
  6528. // 点击按钮的回调
  6529. onShow: null,
  6530. // 是否显示的回调
  6531. zIndex: 9990,
  6532. // fixed定位z-index值
  6533. left: null,
  6534. // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6535. right: 20,
  6536. // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6537. bottom: 120,
  6538. // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6539. safearea: false,
  6540. // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  6541. width: 72,
  6542. // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6543. radius: "50%"
  6544. // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6545. },
  6546. empty: {
  6547. use: true,
  6548. // 是否显示空布局
  6549. icon: null,
  6550. // 图标路径
  6551. tip: "~ 暂无相关数据 ~",
  6552. // 提示
  6553. btnText: "",
  6554. // 按钮
  6555. btnClick: null,
  6556. // 点击按钮的回调
  6557. onShow: null,
  6558. // 是否显示的回调
  6559. fixed: false,
  6560. // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  6561. top: "100rpx",
  6562. // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  6563. zIndex: 99
  6564. // fixed定位z-index值
  6565. },
  6566. onScroll: false
  6567. // 是否监听滚动事件
  6568. });
  6569. };
  6570. MeScroll.extend = function(userOption, defaultOption) {
  6571. if (!userOption)
  6572. return defaultOption;
  6573. for (let key in defaultOption) {
  6574. if (userOption[key] == null) {
  6575. let def = defaultOption[key];
  6576. if (def != null && typeof def === "object") {
  6577. userOption[key] = MeScroll.extend({}, def);
  6578. } else {
  6579. userOption[key] = def;
  6580. }
  6581. } else if (typeof userOption[key] === "object") {
  6582. MeScroll.extend(userOption[key], defaultOption[key]);
  6583. }
  6584. }
  6585. return userOption;
  6586. };
  6587. MeScroll.prototype.hasColor = function(color2) {
  6588. if (!color2)
  6589. return false;
  6590. let c = color2.toLowerCase();
  6591. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  6592. };
  6593. MeScroll.prototype.initDownScroll = function() {
  6594. let me = this;
  6595. me.optDown = me.options.down || {};
  6596. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
  6597. me.optDown.textColor = "#fff";
  6598. me.extendDownScroll(me.optDown);
  6599. if (me.isScrollBody && me.optDown.native) {
  6600. me.optDown.use = false;
  6601. } else {
  6602. me.optDown.native = false;
  6603. }
  6604. me.downHight = 0;
  6605. if (me.optDown.use && me.optDown.inited) {
  6606. setTimeout(function() {
  6607. me.optDown.inited(me);
  6608. }, 0);
  6609. }
  6610. };
  6611. MeScroll.prototype.touchstartEvent = function(e) {
  6612. if (!this.optDown.use)
  6613. return;
  6614. this.startPoint = this.getPoint(e);
  6615. this.startTop = this.getScrollTop();
  6616. this.startAngle = 0;
  6617. this.lastPoint = this.startPoint;
  6618. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
  6619. this.inTouchend = false;
  6620. };
  6621. MeScroll.prototype.touchmoveEvent = function(e) {
  6622. if (!this.optDown.use)
  6623. return;
  6624. let me = this;
  6625. let scrollTop = me.getScrollTop();
  6626. let curPoint = me.getPoint(e);
  6627. let moveY = curPoint.y - me.startPoint.y;
  6628. if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
  6629. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
  6630. if (!me.startAngle)
  6631. me.startAngle = me.getAngle(me.lastPoint, curPoint);
  6632. if (me.startAngle < me.optDown.minAngle)
  6633. return;
  6634. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  6635. me.inTouchend = true;
  6636. me.touchendEvent();
  6637. return;
  6638. }
  6639. me.preventDefault(e);
  6640. let diff = curPoint.y - me.lastPoint.y;
  6641. if (me.downHight < me.optDown.offset) {
  6642. if (me.movetype !== 1) {
  6643. me.movetype = 1;
  6644. me.isDownEndSuccess = null;
  6645. me.optDown.inOffset && me.optDown.inOffset(me);
  6646. me.isMoveDown = true;
  6647. }
  6648. me.downHight += diff * me.optDown.inOffsetRate;
  6649. } else {
  6650. if (me.movetype !== 2) {
  6651. me.movetype = 2;
  6652. me.optDown.outOffset && me.optDown.outOffset(me);
  6653. me.isMoveDown = true;
  6654. }
  6655. if (diff > 0) {
  6656. me.downHight += diff * me.optDown.outOffsetRate;
  6657. } else {
  6658. me.downHight += diff;
  6659. }
  6660. }
  6661. me.downHight = Math.round(me.downHight);
  6662. let rate = me.downHight / me.optDown.offset;
  6663. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
  6664. }
  6665. }
  6666. me.lastPoint = curPoint;
  6667. };
  6668. MeScroll.prototype.touchendEvent = function(e) {
  6669. if (!this.optDown.use)
  6670. return;
  6671. if (this.isMoveDown) {
  6672. if (this.downHight >= this.optDown.offset) {
  6673. this.triggerDownScroll();
  6674. } else {
  6675. this.downHight = 0;
  6676. this.endDownScrollCall(this);
  6677. }
  6678. this.movetype = 0;
  6679. this.isMoveDown = false;
  6680. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
  6681. let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
  6682. if (isScrollUp) {
  6683. let angle = this.getAngle(this.getPoint(e), this.startPoint);
  6684. if (angle > 80) {
  6685. this.triggerUpScroll(true);
  6686. }
  6687. }
  6688. }
  6689. };
  6690. MeScroll.prototype.getPoint = function(e) {
  6691. if (!e) {
  6692. return {
  6693. x: 0,
  6694. y: 0
  6695. };
  6696. }
  6697. if (e.touches && e.touches[0]) {
  6698. return {
  6699. x: e.touches[0].pageX,
  6700. y: e.touches[0].pageY
  6701. };
  6702. } else if (e.changedTouches && e.changedTouches[0]) {
  6703. return {
  6704. x: e.changedTouches[0].pageX,
  6705. y: e.changedTouches[0].pageY
  6706. };
  6707. } else {
  6708. return {
  6709. x: e.clientX,
  6710. y: e.clientY
  6711. };
  6712. }
  6713. };
  6714. MeScroll.prototype.getAngle = function(p1, p2) {
  6715. let x = Math.abs(p1.x - p2.x);
  6716. let y = Math.abs(p1.y - p2.y);
  6717. let z = Math.sqrt(x * x + y * y);
  6718. let angle = 0;
  6719. if (z !== 0) {
  6720. angle = Math.asin(y / z) / Math.PI * 180;
  6721. }
  6722. return angle;
  6723. };
  6724. MeScroll.prototype.triggerDownScroll = function() {
  6725. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
  6726. ;
  6727. else {
  6728. this.showDownScroll();
  6729. !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
  6730. }
  6731. };
  6732. MeScroll.prototype.showDownScroll = function() {
  6733. this.isDownScrolling = true;
  6734. if (this.optDown.native) {
  6735. uni.startPullDownRefresh();
  6736. this.showDownLoadingCall(0);
  6737. } else {
  6738. this.downHight = this.optDown.offset;
  6739. this.showDownLoadingCall(this.downHight);
  6740. }
  6741. };
  6742. MeScroll.prototype.showDownLoadingCall = function(downHight) {
  6743. this.optDown.showLoading && this.optDown.showLoading(this, downHight);
  6744. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
  6745. };
  6746. MeScroll.prototype.onPullDownRefresh = function() {
  6747. this.isDownScrolling = true;
  6748. this.showDownLoadingCall(0);
  6749. this.optDown.callback && this.optDown.callback(this);
  6750. };
  6751. MeScroll.prototype.endDownScroll = function() {
  6752. if (this.optDown.native) {
  6753. this.isDownScrolling = false;
  6754. this.endDownScrollCall(this);
  6755. uni.stopPullDownRefresh();
  6756. return;
  6757. }
  6758. let me = this;
  6759. let endScroll = function() {
  6760. me.downHight = 0;
  6761. me.isDownScrolling = false;
  6762. me.endDownScrollCall(me);
  6763. if (!me.isScrollBody) {
  6764. me.setScrollHeight(0);
  6765. me.scrollTo(0, 0);
  6766. }
  6767. };
  6768. let delay = 0;
  6769. if (me.optDown.beforeEndDownScroll) {
  6770. delay = me.optDown.beforeEndDownScroll(me);
  6771. if (me.isDownEndSuccess == null)
  6772. delay = 0;
  6773. }
  6774. if (typeof delay === "number" && delay > 0) {
  6775. setTimeout(endScroll, delay);
  6776. } else {
  6777. endScroll();
  6778. }
  6779. };
  6780. MeScroll.prototype.endDownScrollCall = function() {
  6781. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  6782. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  6783. };
  6784. MeScroll.prototype.lockDownScroll = function(isLock) {
  6785. if (isLock == null)
  6786. isLock = true;
  6787. this.optDown.isLock = isLock;
  6788. };
  6789. MeScroll.prototype.lockUpScroll = function(isLock) {
  6790. if (isLock == null)
  6791. isLock = true;
  6792. this.optUp.isLock = isLock;
  6793. };
  6794. MeScroll.prototype.initUpScroll = function() {
  6795. let me = this;
  6796. me.optUp = me.options.up || { use: false };
  6797. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
  6798. me.optUp.textColor = "#fff";
  6799. me.extendUpScroll(me.optUp);
  6800. if (me.optUp.use === false)
  6801. return;
  6802. me.optUp.hasNext = true;
  6803. me.startNum = me.optUp.page.num + 1;
  6804. if (me.optUp.inited) {
  6805. setTimeout(function() {
  6806. me.optUp.inited(me);
  6807. }, 0);
  6808. }
  6809. };
  6810. MeScroll.prototype.onReachBottom = function() {
  6811. if (this.isScrollBody && !this.isUpScrolling) {
  6812. if (!this.optUp.isLock && this.optUp.hasNext) {
  6813. this.triggerUpScroll();
  6814. }
  6815. }
  6816. };
  6817. MeScroll.prototype.onPageScroll = function(e) {
  6818. if (!this.isScrollBody)
  6819. return;
  6820. this.setScrollTop(e.scrollTop);
  6821. if (e.scrollTop >= this.optUp.toTop.offset) {
  6822. this.showTopBtn();
  6823. } else {
  6824. this.hideTopBtn();
  6825. }
  6826. };
  6827. MeScroll.prototype.scroll = function(e, onScroll) {
  6828. this.setScrollTop(e.scrollTop);
  6829. this.setScrollHeight(e.scrollHeight);
  6830. if (this.preScrollY == null)
  6831. this.preScrollY = 0;
  6832. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  6833. this.preScrollY = e.scrollTop;
  6834. this.isScrollUp && this.triggerUpScroll(true);
  6835. if (e.scrollTop >= this.optUp.toTop.offset) {
  6836. this.showTopBtn();
  6837. } else {
  6838. this.hideTopBtn();
  6839. }
  6840. this.optUp.onScroll && onScroll && onScroll();
  6841. };
  6842. MeScroll.prototype.triggerUpScroll = function(isCheck) {
  6843. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  6844. if (isCheck === true) {
  6845. let canUp = false;
  6846. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  6847. if (this.getScrollBottom() <= this.optUp.offset) {
  6848. canUp = true;
  6849. }
  6850. }
  6851. if (canUp === false)
  6852. return;
  6853. }
  6854. this.showUpScroll();
  6855. this.optUp.page.num++;
  6856. this.isUpAutoLoad = true;
  6857. this.num = this.optUp.page.num;
  6858. this.size = this.optUp.page.size;
  6859. this.time = this.optUp.page.time;
  6860. this.optUp.callback(this);
  6861. }
  6862. };
  6863. MeScroll.prototype.showUpScroll = function() {
  6864. this.isUpScrolling = true;
  6865. this.optUp.showLoading && this.optUp.showLoading(this);
  6866. };
  6867. MeScroll.prototype.showNoMore = function() {
  6868. this.optUp.hasNext = false;
  6869. this.optUp.showNoMore && this.optUp.showNoMore(this);
  6870. };
  6871. MeScroll.prototype.hideUpScroll = function() {
  6872. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
  6873. };
  6874. MeScroll.prototype.endUpScroll = function(isShowNoMore) {
  6875. if (isShowNoMore != null) {
  6876. if (isShowNoMore) {
  6877. this.showNoMore();
  6878. } else {
  6879. this.hideUpScroll();
  6880. }
  6881. }
  6882. this.isUpScrolling = false;
  6883. };
  6884. MeScroll.prototype.resetUpScroll = function(isShowLoading) {
  6885. if (this.optUp && this.optUp.use) {
  6886. let page2 = this.optUp.page;
  6887. this.prePageNum = page2.num;
  6888. this.prePageTime = page2.time;
  6889. page2.num = this.startNum;
  6890. page2.time = null;
  6891. if (!this.isDownScrolling && isShowLoading !== false) {
  6892. if (isShowLoading == null) {
  6893. this.removeEmpty();
  6894. this.showUpScroll();
  6895. } else {
  6896. this.showDownScroll();
  6897. }
  6898. }
  6899. this.isUpAutoLoad = true;
  6900. this.num = page2.num;
  6901. this.size = page2.size;
  6902. this.time = page2.time;
  6903. this.optUp.callback && this.optUp.callback(this);
  6904. }
  6905. };
  6906. MeScroll.prototype.setPageNum = function(num) {
  6907. this.optUp.page.num = num - 1;
  6908. };
  6909. MeScroll.prototype.setPageSize = function(size) {
  6910. this.optUp.page.size = size;
  6911. };
  6912. MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
  6913. let hasNext;
  6914. if (this.optUp.use && totalPage != null)
  6915. hasNext = this.optUp.page.num < totalPage;
  6916. this.endSuccess(dataSize, hasNext, systime);
  6917. };
  6918. MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
  6919. let hasNext;
  6920. if (this.optUp.use && totalSize != null) {
  6921. let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
  6922. hasNext = loadSize < totalSize;
  6923. }
  6924. this.endSuccess(dataSize, hasNext, systime);
  6925. };
  6926. MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
  6927. let me = this;
  6928. if (me.isDownScrolling) {
  6929. me.isDownEndSuccess = true;
  6930. me.endDownScroll();
  6931. }
  6932. if (me.optUp.use) {
  6933. let isShowNoMore;
  6934. if (dataSize != null) {
  6935. let pageNum = me.optUp.page.num;
  6936. let pageSize = me.optUp.page.size;
  6937. if (pageNum === 1) {
  6938. if (systime)
  6939. me.optUp.page.time = systime;
  6940. }
  6941. if (dataSize < pageSize || hasNext === false) {
  6942. me.optUp.hasNext = false;
  6943. if (dataSize === 0 && pageNum === 1) {
  6944. isShowNoMore = false;
  6945. me.showEmpty();
  6946. } else {
  6947. let allDataSize = (pageNum - 1) * pageSize + dataSize;
  6948. if (allDataSize < me.optUp.noMoreSize) {
  6949. isShowNoMore = false;
  6950. } else {
  6951. isShowNoMore = true;
  6952. }
  6953. me.removeEmpty();
  6954. }
  6955. } else {
  6956. isShowNoMore = false;
  6957. me.optUp.hasNext = true;
  6958. me.removeEmpty();
  6959. }
  6960. }
  6961. me.endUpScroll(isShowNoMore);
  6962. }
  6963. };
  6964. MeScroll.prototype.endErr = function(errDistance) {
  6965. if (this.isDownScrolling) {
  6966. this.isDownEndSuccess = false;
  6967. let page2 = this.optUp.page;
  6968. if (page2 && this.prePageNum) {
  6969. page2.num = this.prePageNum;
  6970. page2.time = this.prePageTime;
  6971. }
  6972. this.endDownScroll();
  6973. }
  6974. if (this.isUpScrolling) {
  6975. this.optUp.page.num--;
  6976. this.endUpScroll(false);
  6977. if (this.isScrollBody && errDistance !== 0) {
  6978. if (!errDistance)
  6979. errDistance = this.optUp.errDistance;
  6980. this.scrollTo(this.getScrollTop() - errDistance, 0);
  6981. }
  6982. }
  6983. };
  6984. MeScroll.prototype.showEmpty = function() {
  6985. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  6986. };
  6987. MeScroll.prototype.removeEmpty = function() {
  6988. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  6989. };
  6990. MeScroll.prototype.showTopBtn = function() {
  6991. if (!this.topBtnShow) {
  6992. this.topBtnShow = true;
  6993. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  6994. }
  6995. };
  6996. MeScroll.prototype.hideTopBtn = function() {
  6997. if (this.topBtnShow) {
  6998. this.topBtnShow = false;
  6999. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  7000. }
  7001. };
  7002. MeScroll.prototype.getScrollTop = function() {
  7003. return this.scrollTop || 0;
  7004. };
  7005. MeScroll.prototype.setScrollTop = function(y) {
  7006. this.scrollTop = y;
  7007. };
  7008. MeScroll.prototype.scrollTo = function(y, t2) {
  7009. this.myScrollTo && this.myScrollTo(y, t2);
  7010. };
  7011. MeScroll.prototype.resetScrollTo = function(myScrollTo) {
  7012. this.myScrollTo = myScrollTo;
  7013. };
  7014. MeScroll.prototype.getScrollBottom = function() {
  7015. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  7016. };
  7017. MeScroll.prototype.getStep = function(star, end, callback, t2, rate) {
  7018. let diff = end - star;
  7019. if (t2 === 0 || diff === 0) {
  7020. callback && callback(end);
  7021. return;
  7022. }
  7023. t2 = t2 || 300;
  7024. rate = rate || 30;
  7025. let count = t2 / rate;
  7026. let step = diff / count;
  7027. let i = 0;
  7028. let timer = setInterval(function() {
  7029. if (i < count - 1) {
  7030. star += step;
  7031. callback && callback(star, timer);
  7032. i++;
  7033. } else {
  7034. callback && callback(end, timer);
  7035. clearInterval(timer);
  7036. }
  7037. }, rate);
  7038. };
  7039. MeScroll.prototype.getClientHeight = function(isReal) {
  7040. let h = this.clientHeight || 0;
  7041. if (h === 0 && isReal !== true) {
  7042. h = this.getBodyHeight();
  7043. }
  7044. return h;
  7045. };
  7046. MeScroll.prototype.setClientHeight = function(h) {
  7047. this.clientHeight = h;
  7048. };
  7049. MeScroll.prototype.getScrollHeight = function() {
  7050. return this.scrollHeight || 0;
  7051. };
  7052. MeScroll.prototype.setScrollHeight = function(h) {
  7053. this.scrollHeight = h;
  7054. };
  7055. MeScroll.prototype.getBodyHeight = function() {
  7056. return this.bodyHeight || 0;
  7057. };
  7058. MeScroll.prototype.setBodyHeight = function(h) {
  7059. this.bodyHeight = h;
  7060. };
  7061. MeScroll.prototype.preventDefault = function(e) {
  7062. if (e && e.cancelable && !e.defaultPrevented)
  7063. e.preventDefault();
  7064. };
  7065. const _sfc_main$1S = {
  7066. props: {
  7067. // up.toTop的配置项
  7068. option: {
  7069. type: Object,
  7070. default() {
  7071. return {};
  7072. }
  7073. },
  7074. // 是否显示
  7075. value: false,
  7076. // vue2
  7077. modelValue: false
  7078. // vue3
  7079. },
  7080. computed: {
  7081. // 优先显示左边
  7082. left() {
  7083. return this.option.left ? this.addUnit(this.option.left) : "auto";
  7084. },
  7085. // 右边距离 (优先显示左边)
  7086. right() {
  7087. return this.option.left ? "auto" : this.addUnit(this.option.right);
  7088. },
  7089. // 是否显示
  7090. isShow() {
  7091. return this.modelValue;
  7092. }
  7093. },
  7094. methods: {
  7095. addUnit(num) {
  7096. if (!num)
  7097. return 0;
  7098. if (typeof num === "number")
  7099. return num + "rpx";
  7100. return num;
  7101. },
  7102. toTopClick() {
  7103. this.$emit("update:modelValue", false);
  7104. this.$emit("click");
  7105. }
  7106. }
  7107. };
  7108. function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
  7109. return $props.option.src ? (vue.openBlock(), vue.createElementBlock("image", {
  7110. key: 0,
  7111. class: vue.normalizeClass(["mescroll-totop", [$options.isShow ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $props.option.safearea }]]),
  7112. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, "left": $options.left, "right": $options.right, "bottom": $options.addUnit($props.option.bottom), "width": $options.addUnit($props.option.width), "border-radius": $options.addUnit($props.option.radius) }),
  7113. src: $props.option.src,
  7114. mode: "widthFix",
  7115. onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
  7116. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
  7117. }
  7118. const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-49fff3a8"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]);
  7119. const WxsMixin = {
  7120. data() {
  7121. return {
  7122. // 传入wxs视图层的数据 (响应式)
  7123. wxsProp: {
  7124. optDown: {},
  7125. // 下拉刷新的配置
  7126. scrollTop: 0,
  7127. // 滚动条的距离
  7128. bodyHeight: 0,
  7129. // body的高度
  7130. isDownScrolling: false,
  7131. // 是否正在下拉刷新中
  7132. isUpScrolling: false,
  7133. // 是否正在上拉加载中
  7134. isScrollBody: true,
  7135. // 是否为mescroll-body滚动
  7136. isUpBoth: true,
  7137. // 上拉加载时,是否同时可以下拉刷新
  7138. t: 0
  7139. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  7140. },
  7141. // 标记调用wxs视图层的方法
  7142. callProp: {
  7143. callType: "",
  7144. // 方法名
  7145. t: 0
  7146. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  7147. }
  7148. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  7149. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  7150. };
  7151. },
  7152. methods: {
  7153. // wxs视图层调用逻辑层的回调
  7154. wxsCall(msg) {
  7155. if (msg.type === "setWxsProp") {
  7156. this.wxsProp = {
  7157. optDown: this.mescroll.optDown,
  7158. scrollTop: this.mescroll.getScrollTop(),
  7159. bodyHeight: this.mescroll.getBodyHeight(),
  7160. isDownScrolling: this.mescroll.isDownScrolling,
  7161. isUpScrolling: this.mescroll.isUpScrolling,
  7162. isUpBoth: this.mescroll.optUp.isBoth,
  7163. isScrollBody: this.mescroll.isScrollBody,
  7164. t: Date.now()
  7165. };
  7166. } else if (msg.type === "setLoadType") {
  7167. this.downLoadType = msg.downLoadType;
  7168. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  7169. this.$set(this.mescroll, "isDownEndSuccess", null);
  7170. } else if (msg.type === "triggerDownScroll") {
  7171. this.mescroll.triggerDownScroll();
  7172. } else if (msg.type === "endDownScroll") {
  7173. this.mescroll.endDownScroll();
  7174. } else if (msg.type === "triggerUpScroll") {
  7175. this.mescroll.triggerUpScroll(true);
  7176. }
  7177. }
  7178. },
  7179. mounted() {
  7180. this.mescroll.optDown.afterLoading = () => {
  7181. this.callProp = { callType: "showLoading", t: Date.now() };
  7182. };
  7183. this.mescroll.optDown.afterEndDownScroll = () => {
  7184. this.callProp = { callType: "endDownScroll", t: Date.now() };
  7185. let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
  7186. setTimeout(() => {
  7187. if (this.downLoadType === 4 || this.downLoadType === 0) {
  7188. this.callProp = { callType: "clearTransform", t: Date.now() };
  7189. }
  7190. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  7191. }, delay);
  7192. };
  7193. this.wxsCall({ type: "setWxsProp" });
  7194. }
  7195. };
  7196. const block0$1 = (Comp) => {
  7197. (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
  7198. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
  7199. };
  7200. const block1 = (Comp) => {
  7201. (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
  7202. (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "5a9dc23f";
  7203. };
  7204. const _sfc_main$1R = {
  7205. name: "mescroll-uni",
  7206. mixins: [WxsMixin],
  7207. components: {
  7208. MescrollTop
  7209. },
  7210. props: {
  7211. down: Object,
  7212. up: Object,
  7213. i18n: Object,
  7214. top: [String, Number],
  7215. topbar: [Boolean, String],
  7216. bottom: [String, Number],
  7217. safearea: Boolean,
  7218. fixed: {
  7219. type: Boolean,
  7220. default: true
  7221. },
  7222. height: [String, Number],
  7223. bottombar: {
  7224. type: Boolean,
  7225. default: true
  7226. },
  7227. disableScroll: Boolean
  7228. },
  7229. data() {
  7230. return {
  7231. mescroll: { optDown: {}, optUp: {} },
  7232. // mescroll实例
  7233. viewId: "id_" + Math.random().toString(36).substr(2, 16),
  7234. // 随机生成mescroll的id(不能数字开头,否则找不到元素)
  7235. downHight: 0,
  7236. //下拉刷新: 容器高度
  7237. downRate: 0,
  7238. // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
  7239. downLoadType: 0,
  7240. // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
  7241. upLoadType: 0,
  7242. // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)
  7243. isShowEmpty: false,
  7244. // 是否显示空布局
  7245. isShowToTop: false,
  7246. // 是否显示回到顶部按钮
  7247. scrollTop: 0,
  7248. // 滚动条的位置
  7249. scrollAnim: false,
  7250. // 是否开启滚动动画
  7251. windowTop: 0,
  7252. // 可使用窗口的顶部位置
  7253. windowBottom: 0,
  7254. // 可使用窗口的底部位置
  7255. windowHeight: 0,
  7256. // 可使用窗口的高度
  7257. statusBarHeight: 0
  7258. // 状态栏高度
  7259. };
  7260. },
  7261. watch: {
  7262. height() {
  7263. this.setClientHeight();
  7264. }
  7265. },
  7266. computed: {
  7267. // 是否使用fixed定位 (当height有值,则不使用)
  7268. isFixed() {
  7269. return !this.height && this.fixed;
  7270. },
  7271. // mescroll的高度
  7272. scrollHeight() {
  7273. if (this.isFixed) {
  7274. return "auto";
  7275. } else if (this.height) {
  7276. return this.toPx(this.height) + "px";
  7277. } else {
  7278. return "100%";
  7279. }
  7280. },
  7281. // 下拉布局往下偏移的距离 (px)
  7282. numTop() {
  7283. return this.toPx(this.top);
  7284. },
  7285. fixedTop() {
  7286. return this.isFixed ? this.numTop + this.windowTop + "px" : 0;
  7287. },
  7288. padTop() {
  7289. return !this.isFixed ? this.numTop + "px" : 0;
  7290. },
  7291. // 上拉布局往上偏移 (px)
  7292. numBottom() {
  7293. return this.toPx(this.bottom);
  7294. },
  7295. fixedBottom() {
  7296. return this.isFixed ? this.numBottom + this.windowBottom + "px" : 0;
  7297. },
  7298. padBottom() {
  7299. return !this.isFixed ? this.numBottom + "px" : 0;
  7300. },
  7301. // 是否为重置下拉的状态
  7302. isDownReset() {
  7303. return this.downLoadType === 3 || this.downLoadType === 4;
  7304. },
  7305. // 过渡
  7306. transition() {
  7307. return this.isDownReset ? "transform 300ms" : "";
  7308. },
  7309. translateY() {
  7310. return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
  7311. },
  7312. // 列表是否可滑动
  7313. scrollable() {
  7314. if (this.disableScroll)
  7315. return false;
  7316. return this.downLoadType === 0 || this.isDownReset;
  7317. },
  7318. // 是否在加载中
  7319. isDownLoading() {
  7320. return this.downLoadType === 3;
  7321. },
  7322. // 旋转的角度
  7323. downRotate() {
  7324. return "rotate(" + 360 * this.downRate + "deg)";
  7325. },
  7326. // 文本提示
  7327. downText() {
  7328. if (!this.mescroll)
  7329. return "";
  7330. switch (this.downLoadType) {
  7331. case 1:
  7332. return this.mescroll.optDown.textInOffset;
  7333. case 2:
  7334. return this.mescroll.optDown.textOutOffset;
  7335. case 3:
  7336. return this.mescroll.optDown.textLoading;
  7337. case 4:
  7338. return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
  7339. default:
  7340. return this.mescroll.optDown.textInOffset;
  7341. }
  7342. }
  7343. },
  7344. methods: {
  7345. //number,rpx,upx,px,% --> px的数值
  7346. toPx(num) {
  7347. if (typeof num === "string") {
  7348. if (num.indexOf("px") !== -1) {
  7349. if (num.indexOf("rpx") !== -1) {
  7350. num = num.replace("rpx", "");
  7351. } else if (num.indexOf("upx") !== -1) {
  7352. num = num.replace("upx", "");
  7353. } else {
  7354. return Number(num.replace("px", ""));
  7355. }
  7356. } else if (num.indexOf("%") !== -1) {
  7357. let rate = Number(num.replace("%", "")) / 100;
  7358. return this.windowHeight * rate;
  7359. }
  7360. }
  7361. return num ? uni.upx2px(Number(num)) : 0;
  7362. },
  7363. //注册列表滚动事件,用于下拉刷新和上拉加载
  7364. scroll(e) {
  7365. this.mescroll.scroll(e.detail, () => {
  7366. this.$emit("scroll", this.mescroll);
  7367. });
  7368. },
  7369. // 点击空布局的按钮回调
  7370. emptyClick() {
  7371. this.$emit("emptyclick", this.mescroll);
  7372. },
  7373. // 点击回到顶部的按钮回调
  7374. toTopClick() {
  7375. this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
  7376. this.$emit("topclick", this.mescroll);
  7377. },
  7378. // 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)
  7379. setClientHeight() {
  7380. if (!this.isExec) {
  7381. this.isExec = true;
  7382. this.$nextTick(() => {
  7383. this.getClientInfo((data) => {
  7384. this.isExec = false;
  7385. if (data) {
  7386. this.mescroll.setClientHeight(data.height);
  7387. } else if (this.clientNum != 3) {
  7388. this.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;
  7389. setTimeout(() => {
  7390. this.setClientHeight();
  7391. }, this.clientNum * 100);
  7392. }
  7393. });
  7394. });
  7395. }
  7396. },
  7397. // 获取滚动区域的信息
  7398. getClientInfo(success) {
  7399. let query = uni.createSelectorQuery().in(this);
  7400. let view = query.select("#" + this.viewId);
  7401. view.boundingClientRect((data) => {
  7402. success(data);
  7403. }).exec();
  7404. }
  7405. },
  7406. // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
  7407. created() {
  7408. let vm = this;
  7409. let diyOption = {
  7410. // 下拉刷新的配置
  7411. down: {
  7412. inOffset() {
  7413. vm.downLoadType = 1;
  7414. },
  7415. outOffset() {
  7416. vm.downLoadType = 2;
  7417. },
  7418. onMoving(mescroll, rate, downHight) {
  7419. vm.downHight = downHight;
  7420. vm.downRate = rate;
  7421. },
  7422. showLoading(mescroll, downHight) {
  7423. vm.downLoadType = 3;
  7424. vm.downHight = downHight;
  7425. },
  7426. beforeEndDownScroll(mescroll) {
  7427. vm.downLoadType = 4;
  7428. return mescroll.optDown.beforeEndDelay;
  7429. },
  7430. endDownScroll() {
  7431. vm.downLoadType = 4;
  7432. vm.downHight = 0;
  7433. vm.downResetTimer && clearTimeout(vm.downResetTimer);
  7434. vm.downResetTimer = setTimeout(() => {
  7435. if (vm.downLoadType === 4)
  7436. vm.downLoadType = 0;
  7437. }, 300);
  7438. },
  7439. // 派发下拉刷新的回调
  7440. callback: function(mescroll) {
  7441. vm.$emit("down", mescroll);
  7442. }
  7443. },
  7444. // 上拉加载的配置
  7445. up: {
  7446. // 显示加载中的回调
  7447. showLoading() {
  7448. vm.upLoadType = 1;
  7449. },
  7450. // 显示无更多数据的回调
  7451. showNoMore() {
  7452. vm.upLoadType = 2;
  7453. },
  7454. // 隐藏上拉加载的回调
  7455. hideUpScroll(mescroll) {
  7456. vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
  7457. },
  7458. // 空布局
  7459. empty: {
  7460. onShow(isShow) {
  7461. vm.isShowEmpty = isShow;
  7462. }
  7463. },
  7464. // 回到顶部
  7465. toTop: {
  7466. onShow(isShow) {
  7467. vm.isShowToTop = isShow;
  7468. }
  7469. },
  7470. // 派发上拉加载的回调
  7471. callback: function(mescroll) {
  7472. vm.$emit("up", mescroll);
  7473. vm.setClientHeight();
  7474. }
  7475. }
  7476. };
  7477. let i18nType = mescrollI18n.getType();
  7478. let i18nOption = { type: i18nType };
  7479. MeScroll.extend(i18nOption, vm.i18n);
  7480. MeScroll.extend(i18nOption, GlobalOption.i18n);
  7481. MeScroll.extend(diyOption, i18nOption[i18nType]);
  7482. MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
  7483. let myOption = JSON.parse(JSON.stringify({ "down": vm.down, "up": vm.up }));
  7484. MeScroll.extend(myOption, diyOption);
  7485. vm.mescroll = new MeScroll(myOption);
  7486. vm.mescroll.viewId = vm.viewId;
  7487. vm.mescroll.i18n = i18nOption;
  7488. vm.$emit("init", vm.mescroll);
  7489. const sys2 = uni.getSystemInfoSync();
  7490. if (sys2.windowTop)
  7491. vm.windowTop = sys2.windowTop;
  7492. if (sys2.windowBottom)
  7493. vm.windowBottom = sys2.windowBottom;
  7494. if (sys2.windowHeight)
  7495. vm.windowHeight = sys2.windowHeight;
  7496. if (sys2.statusBarHeight)
  7497. vm.statusBarHeight = sys2.statusBarHeight;
  7498. vm.mescroll.setBodyHeight(sys2.windowHeight);
  7499. vm.mescroll.resetScrollTo((y, t2) => {
  7500. vm.scrollAnim = t2 !== 0;
  7501. if (typeof y === "string") {
  7502. vm.getClientInfo(function(rect) {
  7503. let mescrollTop = rect.top;
  7504. let selector;
  7505. if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
  7506. selector = "#" + y;
  7507. } else {
  7508. selector = y;
  7509. if (y.indexOf(">>>") != -1) {
  7510. selector = y.split(">>>")[1].trim();
  7511. }
  7512. }
  7513. uni.createSelectorQuery().select(selector).boundingClientRect(function(rect2) {
  7514. if (rect2) {
  7515. let curY2 = vm.mescroll.getScrollTop();
  7516. let top = rect2.top - mescrollTop;
  7517. top += curY2;
  7518. if (!vm.isFixed)
  7519. top -= vm.numTop;
  7520. vm.scrollTop = curY2;
  7521. vm.$nextTick(function() {
  7522. vm.scrollTop = top;
  7523. });
  7524. } else {
  7525. formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue:422", selector + " does not exist");
  7526. }
  7527. }).exec();
  7528. });
  7529. return;
  7530. }
  7531. let curY = vm.mescroll.getScrollTop();
  7532. if (t2 === 0 || t2 === 300) {
  7533. vm.scrollTop = curY;
  7534. vm.$nextTick(function() {
  7535. vm.scrollTop = y;
  7536. });
  7537. } else {
  7538. vm.mescroll.getStep(curY, y, (step) => {
  7539. vm.scrollTop = step;
  7540. }, t2);
  7541. }
  7542. });
  7543. if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
  7544. ;
  7545. else {
  7546. vm.mescroll.optUp.toTop.safearea = vm.safearea;
  7547. }
  7548. uni.$on("setMescrollGlobalOption", (options) => {
  7549. if (!options)
  7550. return;
  7551. let i18nType2 = options.i18n ? options.i18n.type : null;
  7552. if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
  7553. vm.mescroll.i18n.type = i18nType2;
  7554. mescrollI18n.setType(i18nType2);
  7555. MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
  7556. }
  7557. if (options.down) {
  7558. let down = MeScroll.extend({}, options.down);
  7559. vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
  7560. }
  7561. if (options.up) {
  7562. let up = MeScroll.extend({}, options.up);
  7563. vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
  7564. }
  7565. });
  7566. },
  7567. mounted() {
  7568. this.setClientHeight();
  7569. },
  7570. destroyed() {
  7571. uni.$off("setMescrollGlobalOption");
  7572. }
  7573. };
  7574. function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
  7575. const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$b);
  7576. const _component_mescroll_top = vue.resolveComponent("mescroll-top");
  7577. return vue.openBlock(), vue.createElementBlock("view", { class: "mescroll-uni-warp" }, [
  7578. vue.createElementVNode("scroll-view", {
  7579. id: $data.viewId,
  7580. class: vue.normalizeClass(["mescroll-uni", { "mescroll-uni-fixed": $options.isFixed }]),
  7581. style: vue.normalizeStyle({ "height": $options.scrollHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom, "top": $options.fixedTop, "bottom": $options.fixedBottom }),
  7582. "scroll-top": $data.scrollTop,
  7583. "scroll-with-animation": $data.scrollAnim,
  7584. onScroll: _cache[4] || (_cache[4] = (...args) => $options.scroll && $options.scroll(...args)),
  7585. "scroll-y": $options.scrollable,
  7586. "enable-back-to-top": true,
  7587. throttle: false
  7588. }, [
  7589. vue.createElementVNode("view", {
  7590. class: "mescroll-uni-content mescroll-render-touch",
  7591. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
  7592. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
  7593. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  7594. onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  7595. "change:prop": _ctx.wxsBiz.propObserver,
  7596. prop: vue.wp(_ctx.wxsProp)
  7597. }, [
  7598. vue.createCommentVNode(" 状态栏 "),
  7599. $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
  7600. "view",
  7601. {
  7602. key: 0,
  7603. class: "mescroll-topbar",
  7604. style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
  7605. },
  7606. null,
  7607. 4
  7608. /* STYLE */
  7609. )) : vue.createCommentVNode("v-if", true),
  7610. vue.createElementVNode("view", {
  7611. class: "mescroll-wxs-content",
  7612. style: vue.normalizeStyle({ "transform": $options.translateY, "transition": $options.transition }),
  7613. "change:prop": _ctx.wxsBiz.callObserver,
  7614. prop: vue.wp(_ctx.callProp)
  7615. }, [
  7616. vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
  7617. vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
  7618. $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
  7619. "view",
  7620. {
  7621. key: 0,
  7622. class: "mescroll-downwarp",
  7623. style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
  7624. },
  7625. [
  7626. vue.createElementVNode("view", { class: "downwarp-content" }, [
  7627. vue.createElementVNode(
  7628. "view",
  7629. {
  7630. class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
  7631. style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
  7632. },
  7633. null,
  7634. 6
  7635. /* CLASS, STYLE */
  7636. ),
  7637. vue.createElementVNode(
  7638. "view",
  7639. { class: "downwarp-tip" },
  7640. vue.toDisplayString($options.downText),
  7641. 1
  7642. /* TEXT */
  7643. )
  7644. ])
  7645. ],
  7646. 4
  7647. /* STYLE */
  7648. )) : vue.createCommentVNode("v-if", true),
  7649. vue.createCommentVNode(" 列表内容 "),
  7650. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  7651. vue.createCommentVNode(" 空布局 "),
  7652. $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
  7653. key: 1,
  7654. option: $data.mescroll.optUp.empty,
  7655. onEmptyclick: $options.emptyClick
  7656. }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
  7657. vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
  7658. vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
  7659. $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
  7660. "view",
  7661. {
  7662. key: 2,
  7663. class: "mescroll-upwarp",
  7664. style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
  7665. },
  7666. [
  7667. vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
  7668. vue.withDirectives(vue.createElementVNode(
  7669. "view",
  7670. null,
  7671. [
  7672. vue.createElementVNode(
  7673. "view",
  7674. {
  7675. class: "upwarp-progress mescroll-rotate",
  7676. style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
  7677. },
  7678. null,
  7679. 4
  7680. /* STYLE */
  7681. ),
  7682. vue.createElementVNode(
  7683. "view",
  7684. { class: "upwarp-tip" },
  7685. vue.toDisplayString($data.mescroll.optUp.textLoading),
  7686. 1
  7687. /* TEXT */
  7688. )
  7689. ],
  7690. 512
  7691. /* NEED_PATCH */
  7692. ), [
  7693. [vue.vShow, $data.upLoadType === 1]
  7694. ]),
  7695. vue.createCommentVNode(" 无数据 "),
  7696. $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
  7697. "view",
  7698. {
  7699. key: 0,
  7700. class: "upwarp-nodata"
  7701. },
  7702. vue.toDisplayString($data.mescroll.optUp.textNoMore),
  7703. 1
  7704. /* TEXT */
  7705. )) : vue.createCommentVNode("v-if", true)
  7706. ],
  7707. 4
  7708. /* STYLE */
  7709. )) : vue.createCommentVNode("v-if", true)
  7710. ], 12, ["change:prop", "prop"]),
  7711. vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
  7712. vue.createCommentVNode(" 适配iPhoneX "),
  7713. $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
  7714. key: 1,
  7715. class: "mescroll-safearea"
  7716. })) : vue.createCommentVNode("v-if", true)
  7717. ], 40, ["change:prop", "prop"])
  7718. ], 46, ["id", "scroll-top", "scroll-with-animation", "scroll-y"]),
  7719. vue.createCommentVNode(" 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)"),
  7720. vue.createVNode(_component_mescroll_top, {
  7721. modelValue: $data.isShowToTop,
  7722. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.isShowToTop = $event),
  7723. option: $data.mescroll.optUp.toTop,
  7724. onClick: $options.toTopClick
  7725. }, null, 8, ["modelValue", "option", "onClick"]),
  7726. vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
  7727. vue.createElementVNode("view", {
  7728. "change:prop": _ctx.renderBiz.propObserver,
  7729. prop: vue.wp(_ctx.wxsProp)
  7730. }, null, 8, ["change:prop", "prop"])
  7731. ]);
  7732. }
  7733. if (typeof block0$1 === "function")
  7734. block0$1(_sfc_main$1R);
  7735. if (typeof block1 === "function")
  7736. block1(_sfc_main$1R);
  7737. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-97b1664c"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue"]]);
  7738. function useMescroll(onPageScroll, onReachBottom, onPullDownRefresh) {
  7739. let mescroll = null;
  7740. const mescrollInit = (e) => {
  7741. mescroll = e;
  7742. };
  7743. const getMescroll = () => {
  7744. return mescroll;
  7745. };
  7746. const downCallback = () => {
  7747. if (mescroll.optUp.use) {
  7748. mescroll.resetUpScroll();
  7749. } else {
  7750. setTimeout(() => {
  7751. mescroll.endSuccess();
  7752. }, 500);
  7753. }
  7754. };
  7755. const upCallback = () => {
  7756. setTimeout(() => {
  7757. mescroll.endErr();
  7758. }, 500);
  7759. };
  7760. onPullDownRefresh && onPullDownRefresh(() => {
  7761. mescroll && mescroll.onPullDownRefresh();
  7762. });
  7763. onPageScroll && onPageScroll((e) => {
  7764. mescroll && mescroll.onPageScroll(e);
  7765. });
  7766. onReachBottom && onReachBottom(() => {
  7767. mescroll && mescroll.onReachBottom();
  7768. });
  7769. return {
  7770. getMescroll,
  7771. mescrollInit,
  7772. downCallback,
  7773. upCallback
  7774. };
  7775. }
  7776. var isVue2 = false;
  7777. function set(target, key, val) {
  7778. if (Array.isArray(target)) {
  7779. target.length = Math.max(target.length, key);
  7780. target.splice(key, 1, val);
  7781. return val;
  7782. }
  7783. target[key] = val;
  7784. return val;
  7785. }
  7786. function del(target, key) {
  7787. if (Array.isArray(target)) {
  7788. target.splice(key, 1);
  7789. return;
  7790. }
  7791. delete target[key];
  7792. }
  7793. function getDevtoolsGlobalHook() {
  7794. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  7795. }
  7796. function getTarget() {
  7797. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  7798. }
  7799. const isProxyAvailable = typeof Proxy === "function";
  7800. const HOOK_SETUP = "devtools-plugin:setup";
  7801. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  7802. let supported;
  7803. let perf;
  7804. function isPerformanceSupported() {
  7805. var _a;
  7806. if (supported !== void 0) {
  7807. return supported;
  7808. }
  7809. if (typeof window !== "undefined" && window.performance) {
  7810. supported = true;
  7811. perf = window.performance;
  7812. } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
  7813. supported = true;
  7814. perf = global.perf_hooks.performance;
  7815. } else {
  7816. supported = false;
  7817. }
  7818. return supported;
  7819. }
  7820. function now() {
  7821. return isPerformanceSupported() ? perf.now() : Date.now();
  7822. }
  7823. class ApiProxy {
  7824. constructor(plugin, hook) {
  7825. this.target = null;
  7826. this.targetQueue = [];
  7827. this.onQueue = [];
  7828. this.plugin = plugin;
  7829. this.hook = hook;
  7830. const defaultSettings = {};
  7831. if (plugin.settings) {
  7832. for (const id in plugin.settings) {
  7833. const item = plugin.settings[id];
  7834. defaultSettings[id] = item.defaultValue;
  7835. }
  7836. }
  7837. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  7838. let currentSettings = Object.assign({}, defaultSettings);
  7839. try {
  7840. const raw = localStorage.getItem(localSettingsSaveId);
  7841. const data = JSON.parse(raw);
  7842. Object.assign(currentSettings, data);
  7843. } catch (e) {
  7844. }
  7845. this.fallbacks = {
  7846. getSettings() {
  7847. return currentSettings;
  7848. },
  7849. setSettings(value2) {
  7850. try {
  7851. localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
  7852. } catch (e) {
  7853. }
  7854. currentSettings = value2;
  7855. },
  7856. now() {
  7857. return now();
  7858. }
  7859. };
  7860. if (hook) {
  7861. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
  7862. if (pluginId === this.plugin.id) {
  7863. this.fallbacks.setSettings(value2);
  7864. }
  7865. });
  7866. }
  7867. this.proxiedOn = new Proxy({}, {
  7868. get: (_target, prop) => {
  7869. if (this.target) {
  7870. return this.target.on[prop];
  7871. } else {
  7872. return (...args) => {
  7873. this.onQueue.push({
  7874. method: prop,
  7875. args
  7876. });
  7877. };
  7878. }
  7879. }
  7880. });
  7881. this.proxiedTarget = new Proxy({}, {
  7882. get: (_target, prop) => {
  7883. if (this.target) {
  7884. return this.target[prop];
  7885. } else if (prop === "on") {
  7886. return this.proxiedOn;
  7887. } else if (Object.keys(this.fallbacks).includes(prop)) {
  7888. return (...args) => {
  7889. this.targetQueue.push({
  7890. method: prop,
  7891. args,
  7892. resolve: () => {
  7893. }
  7894. });
  7895. return this.fallbacks[prop](...args);
  7896. };
  7897. } else {
  7898. return (...args) => {
  7899. return new Promise((resolve) => {
  7900. this.targetQueue.push({
  7901. method: prop,
  7902. args,
  7903. resolve
  7904. });
  7905. });
  7906. };
  7907. }
  7908. }
  7909. });
  7910. }
  7911. async setRealTarget(target) {
  7912. this.target = target;
  7913. for (const item of this.onQueue) {
  7914. this.target.on[item.method](...item.args);
  7915. }
  7916. for (const item of this.targetQueue) {
  7917. item.resolve(await this.target[item.method](...item.args));
  7918. }
  7919. }
  7920. }
  7921. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  7922. const descriptor = pluginDescriptor;
  7923. const target = getTarget();
  7924. const hook = getDevtoolsGlobalHook();
  7925. const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;
  7926. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  7927. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  7928. } else {
  7929. const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;
  7930. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  7931. list.push({
  7932. pluginDescriptor: descriptor,
  7933. setupFn,
  7934. proxy
  7935. });
  7936. if (proxy)
  7937. setupFn(proxy.proxiedTarget);
  7938. }
  7939. }
  7940. /*!
  7941. * pinia v2.1.7
  7942. * (c) 2023 Eduardo San Martin Morote
  7943. * @license MIT
  7944. */
  7945. let activePinia;
  7946. const setActivePinia = (pinia2) => activePinia = pinia2;
  7947. const piniaSymbol = Symbol("pinia");
  7948. function isPlainObject$1(o) {
  7949. return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
  7950. }
  7951. var MutationType;
  7952. (function(MutationType2) {
  7953. MutationType2["direct"] = "direct";
  7954. MutationType2["patchObject"] = "patch object";
  7955. MutationType2["patchFunction"] = "patch function";
  7956. })(MutationType || (MutationType = {}));
  7957. const IS_CLIENT = typeof window !== "undefined";
  7958. const USE_DEVTOOLS = IS_CLIENT;
  7959. const _global = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })();
  7960. function bom(blob, { autoBom = false } = {}) {
  7961. if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
  7962. return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
  7963. }
  7964. return blob;
  7965. }
  7966. function download(url2, name, opts) {
  7967. const xhr = new XMLHttpRequest();
  7968. xhr.open("GET", url2);
  7969. xhr.responseType = "blob";
  7970. xhr.onload = function() {
  7971. saveAs(xhr.response, name, opts);
  7972. };
  7973. xhr.onerror = function() {
  7974. console.error("could not download file");
  7975. };
  7976. xhr.send();
  7977. }
  7978. function corsEnabled(url2) {
  7979. const xhr = new XMLHttpRequest();
  7980. xhr.open("HEAD", url2, false);
  7981. try {
  7982. xhr.send();
  7983. } catch (e) {
  7984. }
  7985. return xhr.status >= 200 && xhr.status <= 299;
  7986. }
  7987. function click(node) {
  7988. try {
  7989. node.dispatchEvent(new MouseEvent("click"));
  7990. } catch (e) {
  7991. const evt = document.createEvent("MouseEvents");
  7992. evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
  7993. node.dispatchEvent(evt);
  7994. }
  7995. }
  7996. const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
  7997. const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
  7998. const saveAs = !IS_CLIENT ? () => {
  7999. } : (
  8000. // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  8001. typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
  8002. // Use msSaveOrOpenBlob as a second approach
  8003. "msSaveOrOpenBlob" in _navigator ? msSaveAs : (
  8004. // Fallback to using FileReader and a popup
  8005. fileSaverSaveAs
  8006. )
  8007. )
  8008. );
  8009. function downloadSaveAs(blob, name = "download", opts) {
  8010. const a = document.createElement("a");
  8011. a.download = name;
  8012. a.rel = "noopener";
  8013. if (typeof blob === "string") {
  8014. a.href = blob;
  8015. if (a.origin !== location.origin) {
  8016. if (corsEnabled(a.href)) {
  8017. download(blob, name, opts);
  8018. } else {
  8019. a.target = "_blank";
  8020. click(a);
  8021. }
  8022. } else {
  8023. click(a);
  8024. }
  8025. } else {
  8026. a.href = URL.createObjectURL(blob);
  8027. setTimeout(function() {
  8028. URL.revokeObjectURL(a.href);
  8029. }, 4e4);
  8030. setTimeout(function() {
  8031. click(a);
  8032. }, 0);
  8033. }
  8034. }
  8035. function msSaveAs(blob, name = "download", opts) {
  8036. if (typeof blob === "string") {
  8037. if (corsEnabled(blob)) {
  8038. download(blob, name, opts);
  8039. } else {
  8040. const a = document.createElement("a");
  8041. a.href = blob;
  8042. a.target = "_blank";
  8043. setTimeout(function() {
  8044. click(a);
  8045. });
  8046. }
  8047. } else {
  8048. navigator.msSaveOrOpenBlob(bom(blob, opts), name);
  8049. }
  8050. }
  8051. function fileSaverSaveAs(blob, name, opts, popup) {
  8052. popup = popup || open("", "_blank");
  8053. if (popup) {
  8054. popup.document.title = popup.document.body.innerText = "downloading...";
  8055. }
  8056. if (typeof blob === "string")
  8057. return download(blob, name, opts);
  8058. const force = blob.type === "application/octet-stream";
  8059. const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
  8060. const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
  8061. if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
  8062. const reader = new FileReader();
  8063. reader.onloadend = function() {
  8064. let url2 = reader.result;
  8065. if (typeof url2 !== "string") {
  8066. popup = null;
  8067. throw new Error("Wrong reader.result type");
  8068. }
  8069. url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;");
  8070. if (popup) {
  8071. popup.location.href = url2;
  8072. } else {
  8073. location.assign(url2);
  8074. }
  8075. popup = null;
  8076. };
  8077. reader.readAsDataURL(blob);
  8078. } else {
  8079. const url2 = URL.createObjectURL(blob);
  8080. if (popup)
  8081. popup.location.assign(url2);
  8082. else
  8083. location.href = url2;
  8084. popup = null;
  8085. setTimeout(function() {
  8086. URL.revokeObjectURL(url2);
  8087. }, 4e4);
  8088. }
  8089. }
  8090. function toastMessage(message, type2) {
  8091. const piniaMessage = "🍍 " + message;
  8092. if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
  8093. __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);
  8094. } else if (type2 === "error") {
  8095. console.error(piniaMessage);
  8096. } else if (type2 === "warn") {
  8097. console.warn(piniaMessage);
  8098. } else {
  8099. console.log(piniaMessage);
  8100. }
  8101. }
  8102. function isPinia(o) {
  8103. return "_a" in o && "install" in o;
  8104. }
  8105. function checkClipboardAccess() {
  8106. if (!("clipboard" in navigator)) {
  8107. toastMessage(`Your browser doesn't support the Clipboard API`, "error");
  8108. return true;
  8109. }
  8110. }
  8111. function checkNotFocusedError(error2) {
  8112. if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) {
  8113. toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
  8114. return true;
  8115. }
  8116. return false;
  8117. }
  8118. async function actionGlobalCopyState(pinia2) {
  8119. if (checkClipboardAccess())
  8120. return;
  8121. try {
  8122. await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));
  8123. toastMessage("Global state copied to clipboard.");
  8124. } catch (error2) {
  8125. if (checkNotFocusedError(error2))
  8126. return;
  8127. toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
  8128. console.error(error2);
  8129. }
  8130. }
  8131. async function actionGlobalPasteState(pinia2) {
  8132. if (checkClipboardAccess())
  8133. return;
  8134. try {
  8135. loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));
  8136. toastMessage("Global state pasted from clipboard.");
  8137. } catch (error2) {
  8138. if (checkNotFocusedError(error2))
  8139. return;
  8140. toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
  8141. console.error(error2);
  8142. }
  8143. }
  8144. async function actionGlobalSaveState(pinia2) {
  8145. try {
  8146. saveAs(new Blob([JSON.stringify(pinia2.state.value)], {
  8147. type: "text/plain;charset=utf-8"
  8148. }), "pinia-state.json");
  8149. } catch (error2) {
  8150. toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
  8151. console.error(error2);
  8152. }
  8153. }
  8154. let fileInput;
  8155. function getFileOpener() {
  8156. if (!fileInput) {
  8157. fileInput = document.createElement("input");
  8158. fileInput.type = "file";
  8159. fileInput.accept = ".json";
  8160. }
  8161. function openFile() {
  8162. return new Promise((resolve, reject) => {
  8163. fileInput.onchange = async () => {
  8164. const files = fileInput.files;
  8165. if (!files)
  8166. return resolve(null);
  8167. const file = files.item(0);
  8168. if (!file)
  8169. return resolve(null);
  8170. return resolve({ text: await file.text(), file });
  8171. };
  8172. fileInput.oncancel = () => resolve(null);
  8173. fileInput.onerror = reject;
  8174. fileInput.click();
  8175. });
  8176. }
  8177. return openFile;
  8178. }
  8179. async function actionGlobalOpenStateFile(pinia2) {
  8180. try {
  8181. const open2 = getFileOpener();
  8182. const result = await open2();
  8183. if (!result)
  8184. return;
  8185. const { text, file } = result;
  8186. loadStoresState(pinia2, JSON.parse(text));
  8187. toastMessage(`Global state imported from "${file.name}".`);
  8188. } catch (error2) {
  8189. toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
  8190. console.error(error2);
  8191. }
  8192. }
  8193. function loadStoresState(pinia2, state) {
  8194. for (const key in state) {
  8195. const storeState = pinia2.state.value[key];
  8196. if (storeState) {
  8197. Object.assign(storeState, state[key]);
  8198. } else {
  8199. pinia2.state.value[key] = state[key];
  8200. }
  8201. }
  8202. }
  8203. function formatDisplay(display) {
  8204. return {
  8205. _custom: {
  8206. display
  8207. }
  8208. };
  8209. }
  8210. const PINIA_ROOT_LABEL = "🍍 Pinia (root)";
  8211. const PINIA_ROOT_ID = "_root";
  8212. function formatStoreForInspectorTree(store2) {
  8213. return isPinia(store2) ? {
  8214. id: PINIA_ROOT_ID,
  8215. label: PINIA_ROOT_LABEL
  8216. } : {
  8217. id: store2.$id,
  8218. label: store2.$id
  8219. };
  8220. }
  8221. function formatStoreForInspectorState(store2) {
  8222. if (isPinia(store2)) {
  8223. const storeNames = Array.from(store2._s.keys());
  8224. const storeMap = store2._s;
  8225. const state2 = {
  8226. state: storeNames.map((storeId) => ({
  8227. editable: true,
  8228. key: storeId,
  8229. value: store2.state.value[storeId]
  8230. })),
  8231. getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
  8232. const store22 = storeMap.get(id);
  8233. return {
  8234. editable: false,
  8235. key: id,
  8236. value: store22._getters.reduce((getters, key) => {
  8237. getters[key] = store22[key];
  8238. return getters;
  8239. }, {})
  8240. };
  8241. })
  8242. };
  8243. return state2;
  8244. }
  8245. const state = {
  8246. state: Object.keys(store2.$state).map((key) => ({
  8247. editable: true,
  8248. key,
  8249. value: store2.$state[key]
  8250. }))
  8251. };
  8252. if (store2._getters && store2._getters.length) {
  8253. state.getters = store2._getters.map((getterName) => ({
  8254. editable: false,
  8255. key: getterName,
  8256. value: store2[getterName]
  8257. }));
  8258. }
  8259. if (store2._customProperties.size) {
  8260. state.customProperties = Array.from(store2._customProperties).map((key) => ({
  8261. editable: true,
  8262. key,
  8263. value: store2[key]
  8264. }));
  8265. }
  8266. return state;
  8267. }
  8268. function formatEventData(events) {
  8269. if (!events)
  8270. return {};
  8271. if (Array.isArray(events)) {
  8272. return events.reduce((data, event) => {
  8273. data.keys.push(event.key);
  8274. data.operations.push(event.type);
  8275. data.oldValue[event.key] = event.oldValue;
  8276. data.newValue[event.key] = event.newValue;
  8277. return data;
  8278. }, {
  8279. oldValue: {},
  8280. keys: [],
  8281. operations: [],
  8282. newValue: {}
  8283. });
  8284. } else {
  8285. return {
  8286. operation: formatDisplay(events.type),
  8287. key: formatDisplay(events.key),
  8288. oldValue: events.oldValue,
  8289. newValue: events.newValue
  8290. };
  8291. }
  8292. }
  8293. function formatMutationType(type2) {
  8294. switch (type2) {
  8295. case MutationType.direct:
  8296. return "mutation";
  8297. case MutationType.patchFunction:
  8298. return "$patch";
  8299. case MutationType.patchObject:
  8300. return "$patch";
  8301. default:
  8302. return "unknown";
  8303. }
  8304. }
  8305. let isTimelineActive = true;
  8306. const componentStateTypes = [];
  8307. const MUTATIONS_LAYER_ID = "pinia:mutations";
  8308. const INSPECTOR_ID = "pinia";
  8309. const { assign: assign$1 } = Object;
  8310. const getStoreType = (id) => "🍍 " + id;
  8311. function registerPiniaDevtools(app, pinia2) {
  8312. setupDevtoolsPlugin({
  8313. id: "dev.esm.pinia",
  8314. label: "Pinia 🍍",
  8315. logo: "https://pinia.vuejs.org/logo.svg",
  8316. packageName: "pinia",
  8317. homepage: "https://pinia.vuejs.org",
  8318. componentStateTypes,
  8319. app
  8320. }, (api) => {
  8321. if (typeof api.now !== "function") {
  8322. toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.");
  8323. }
  8324. api.addTimelineLayer({
  8325. id: MUTATIONS_LAYER_ID,
  8326. label: `Pinia 🍍`,
  8327. color: 15064968
  8328. });
  8329. api.addInspector({
  8330. id: INSPECTOR_ID,
  8331. label: "Pinia 🍍",
  8332. icon: "storage",
  8333. treeFilterPlaceholder: "Search stores",
  8334. actions: [
  8335. {
  8336. icon: "content_copy",
  8337. action: () => {
  8338. actionGlobalCopyState(pinia2);
  8339. },
  8340. tooltip: "Serialize and copy the state"
  8341. },
  8342. {
  8343. icon: "content_paste",
  8344. action: async () => {
  8345. await actionGlobalPasteState(pinia2);
  8346. api.sendInspectorTree(INSPECTOR_ID);
  8347. api.sendInspectorState(INSPECTOR_ID);
  8348. },
  8349. tooltip: "Replace the state with the content of your clipboard"
  8350. },
  8351. {
  8352. icon: "save",
  8353. action: () => {
  8354. actionGlobalSaveState(pinia2);
  8355. },
  8356. tooltip: "Save the state as a JSON file"
  8357. },
  8358. {
  8359. icon: "folder_open",
  8360. action: async () => {
  8361. await actionGlobalOpenStateFile(pinia2);
  8362. api.sendInspectorTree(INSPECTOR_ID);
  8363. api.sendInspectorState(INSPECTOR_ID);
  8364. },
  8365. tooltip: "Import the state from a JSON file"
  8366. }
  8367. ],
  8368. nodeActions: [
  8369. {
  8370. icon: "restore",
  8371. tooltip: 'Reset the state (with "$reset")',
  8372. action: (nodeId) => {
  8373. const store2 = pinia2._s.get(nodeId);
  8374. if (!store2) {
  8375. toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
  8376. } else if (typeof store2.$reset !== "function") {
  8377. toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
  8378. } else {
  8379. store2.$reset();
  8380. toastMessage(`Store "${nodeId}" reset.`);
  8381. }
  8382. }
  8383. }
  8384. ]
  8385. });
  8386. api.on.inspectComponent((payload, ctx) => {
  8387. const proxy = payload.componentInstance && payload.componentInstance.proxy;
  8388. if (proxy && proxy._pStores) {
  8389. const piniaStores = payload.componentInstance.proxy._pStores;
  8390. Object.values(piniaStores).forEach((store2) => {
  8391. payload.instanceData.state.push({
  8392. type: getStoreType(store2.$id),
  8393. key: "state",
  8394. editable: true,
  8395. value: store2._isOptionsAPI ? {
  8396. _custom: {
  8397. value: vue.toRaw(store2.$state),
  8398. actions: [
  8399. {
  8400. icon: "restore",
  8401. tooltip: "Reset the state of this store",
  8402. action: () => store2.$reset()
  8403. }
  8404. ]
  8405. }
  8406. } : (
  8407. // NOTE: workaround to unwrap transferred refs
  8408. Object.keys(store2.$state).reduce((state, key) => {
  8409. state[key] = store2.$state[key];
  8410. return state;
  8411. }, {})
  8412. )
  8413. });
  8414. if (store2._getters && store2._getters.length) {
  8415. payload.instanceData.state.push({
  8416. type: getStoreType(store2.$id),
  8417. key: "getters",
  8418. editable: false,
  8419. value: store2._getters.reduce((getters, key) => {
  8420. try {
  8421. getters[key] = store2[key];
  8422. } catch (error2) {
  8423. getters[key] = error2;
  8424. }
  8425. return getters;
  8426. }, {})
  8427. });
  8428. }
  8429. });
  8430. }
  8431. });
  8432. api.on.getInspectorTree((payload) => {
  8433. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8434. let stores = [pinia2];
  8435. stores = stores.concat(Array.from(pinia2._s.values()));
  8436. payload.rootNodes = (payload.filter ? stores.filter((store2) => "$id" in store2 ? store2.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);
  8437. }
  8438. });
  8439. api.on.getInspectorState((payload) => {
  8440. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8441. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  8442. if (!inspectedStore) {
  8443. return;
  8444. }
  8445. if (inspectedStore) {
  8446. payload.state = formatStoreForInspectorState(inspectedStore);
  8447. }
  8448. }
  8449. });
  8450. api.on.editInspectorState((payload, ctx) => {
  8451. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8452. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  8453. if (!inspectedStore) {
  8454. return toastMessage(`store "${payload.nodeId}" not found`, "error");
  8455. }
  8456. const { path } = payload;
  8457. if (!isPinia(inspectedStore)) {
  8458. if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
  8459. path.unshift("$state");
  8460. }
  8461. } else {
  8462. path.unshift("state");
  8463. }
  8464. isTimelineActive = false;
  8465. payload.set(inspectedStore, path, payload.state.value);
  8466. isTimelineActive = true;
  8467. }
  8468. });
  8469. api.on.editComponentState((payload) => {
  8470. if (payload.type.startsWith("🍍")) {
  8471. const storeId = payload.type.replace(/^🍍\s*/, "");
  8472. const store2 = pinia2._s.get(storeId);
  8473. if (!store2) {
  8474. return toastMessage(`store "${storeId}" not found`, "error");
  8475. }
  8476. const { path } = payload;
  8477. if (path[0] !== "state") {
  8478. return toastMessage(`Invalid path for store "${storeId}":
  8479. ${path}
  8480. Only state can be modified.`);
  8481. }
  8482. path[0] = "$state";
  8483. isTimelineActive = false;
  8484. payload.set(store2, path, payload.state.value);
  8485. isTimelineActive = true;
  8486. }
  8487. });
  8488. });
  8489. }
  8490. function addStoreToDevtools(app, store2) {
  8491. if (!componentStateTypes.includes(getStoreType(store2.$id))) {
  8492. componentStateTypes.push(getStoreType(store2.$id));
  8493. }
  8494. setupDevtoolsPlugin({
  8495. id: "dev.esm.pinia",
  8496. label: "Pinia 🍍",
  8497. logo: "https://pinia.vuejs.org/logo.svg",
  8498. packageName: "pinia",
  8499. homepage: "https://pinia.vuejs.org",
  8500. componentStateTypes,
  8501. app,
  8502. settings: {
  8503. logStoreChanges: {
  8504. label: "Notify about new/deleted stores",
  8505. type: "boolean",
  8506. defaultValue: true
  8507. }
  8508. // useEmojis: {
  8509. // label: 'Use emojis in messages ⚡️',
  8510. // type: 'boolean',
  8511. // defaultValue: true,
  8512. // },
  8513. }
  8514. }, (api) => {
  8515. const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
  8516. store2.$onAction(({ after, onError, name, args }) => {
  8517. const groupId = runningActionId++;
  8518. api.addTimelineEvent({
  8519. layerId: MUTATIONS_LAYER_ID,
  8520. event: {
  8521. time: now2(),
  8522. title: "🛫 " + name,
  8523. subtitle: "start",
  8524. data: {
  8525. store: formatDisplay(store2.$id),
  8526. action: formatDisplay(name),
  8527. args
  8528. },
  8529. groupId
  8530. }
  8531. });
  8532. after((result) => {
  8533. activeAction = void 0;
  8534. api.addTimelineEvent({
  8535. layerId: MUTATIONS_LAYER_ID,
  8536. event: {
  8537. time: now2(),
  8538. title: "🛬 " + name,
  8539. subtitle: "end",
  8540. data: {
  8541. store: formatDisplay(store2.$id),
  8542. action: formatDisplay(name),
  8543. args,
  8544. result
  8545. },
  8546. groupId
  8547. }
  8548. });
  8549. });
  8550. onError((error2) => {
  8551. activeAction = void 0;
  8552. api.addTimelineEvent({
  8553. layerId: MUTATIONS_LAYER_ID,
  8554. event: {
  8555. time: now2(),
  8556. logType: "error",
  8557. title: "💥 " + name,
  8558. subtitle: "end",
  8559. data: {
  8560. store: formatDisplay(store2.$id),
  8561. action: formatDisplay(name),
  8562. args,
  8563. error: error2
  8564. },
  8565. groupId
  8566. }
  8567. });
  8568. });
  8569. }, true);
  8570. store2._customProperties.forEach((name) => {
  8571. vue.watch(() => vue.unref(store2[name]), (newValue, oldValue) => {
  8572. api.notifyComponentUpdate();
  8573. api.sendInspectorState(INSPECTOR_ID);
  8574. if (isTimelineActive) {
  8575. api.addTimelineEvent({
  8576. layerId: MUTATIONS_LAYER_ID,
  8577. event: {
  8578. time: now2(),
  8579. title: "Change",
  8580. subtitle: name,
  8581. data: {
  8582. newValue,
  8583. oldValue
  8584. },
  8585. groupId: activeAction
  8586. }
  8587. });
  8588. }
  8589. }, { deep: true });
  8590. });
  8591. store2.$subscribe(({ events, type: type2 }, state) => {
  8592. api.notifyComponentUpdate();
  8593. api.sendInspectorState(INSPECTOR_ID);
  8594. if (!isTimelineActive)
  8595. return;
  8596. const eventData = {
  8597. time: now2(),
  8598. title: formatMutationType(type2),
  8599. data: assign$1({ store: formatDisplay(store2.$id) }, formatEventData(events)),
  8600. groupId: activeAction
  8601. };
  8602. if (type2 === MutationType.patchFunction) {
  8603. eventData.subtitle = "⤵️";
  8604. } else if (type2 === MutationType.patchObject) {
  8605. eventData.subtitle = "🧩";
  8606. } else if (events && !Array.isArray(events)) {
  8607. eventData.subtitle = events.type;
  8608. }
  8609. if (events) {
  8610. eventData.data["rawEvent(s)"] = {
  8611. _custom: {
  8612. display: "DebuggerEvent",
  8613. type: "object",
  8614. tooltip: "raw DebuggerEvent[]",
  8615. value: events
  8616. }
  8617. };
  8618. }
  8619. api.addTimelineEvent({
  8620. layerId: MUTATIONS_LAYER_ID,
  8621. event: eventData
  8622. });
  8623. }, { detached: true, flush: "sync" });
  8624. const hotUpdate = store2._hotUpdate;
  8625. store2._hotUpdate = vue.markRaw((newStore) => {
  8626. hotUpdate(newStore);
  8627. api.addTimelineEvent({
  8628. layerId: MUTATIONS_LAYER_ID,
  8629. event: {
  8630. time: now2(),
  8631. title: "🔥 " + store2.$id,
  8632. subtitle: "HMR update",
  8633. data: {
  8634. store: formatDisplay(store2.$id),
  8635. info: formatDisplay(`HMR update`)
  8636. }
  8637. }
  8638. });
  8639. api.notifyComponentUpdate();
  8640. api.sendInspectorTree(INSPECTOR_ID);
  8641. api.sendInspectorState(INSPECTOR_ID);
  8642. });
  8643. const { $dispose } = store2;
  8644. store2.$dispose = () => {
  8645. $dispose();
  8646. api.notifyComponentUpdate();
  8647. api.sendInspectorTree(INSPECTOR_ID);
  8648. api.sendInspectorState(INSPECTOR_ID);
  8649. api.getSettings().logStoreChanges && toastMessage(`Disposed "${store2.$id}" store 🗑`);
  8650. };
  8651. api.notifyComponentUpdate();
  8652. api.sendInspectorTree(INSPECTOR_ID);
  8653. api.sendInspectorState(INSPECTOR_ID);
  8654. api.getSettings().logStoreChanges && toastMessage(`"${store2.$id}" store installed 🆕`);
  8655. });
  8656. }
  8657. let runningActionId = 0;
  8658. let activeAction;
  8659. function patchActionForGrouping(store2, actionNames, wrapWithProxy) {
  8660. const actions = actionNames.reduce((storeActions, actionName) => {
  8661. storeActions[actionName] = vue.toRaw(store2)[actionName];
  8662. return storeActions;
  8663. }, {});
  8664. for (const actionName in actions) {
  8665. store2[actionName] = function() {
  8666. const _actionId = runningActionId;
  8667. const trackedStore = wrapWithProxy ? new Proxy(store2, {
  8668. get(...args) {
  8669. activeAction = _actionId;
  8670. return Reflect.get(...args);
  8671. },
  8672. set(...args) {
  8673. activeAction = _actionId;
  8674. return Reflect.set(...args);
  8675. }
  8676. }) : store2;
  8677. activeAction = _actionId;
  8678. const retValue = actions[actionName].apply(trackedStore, arguments);
  8679. activeAction = void 0;
  8680. return retValue;
  8681. };
  8682. }
  8683. }
  8684. function devtoolsPlugin({ app, store: store2, options }) {
  8685. if (store2.$id.startsWith("__hot:")) {
  8686. return;
  8687. }
  8688. store2._isOptionsAPI = !!options.state;
  8689. patchActionForGrouping(store2, Object.keys(options.actions), store2._isOptionsAPI);
  8690. const originalHotUpdate = store2._hotUpdate;
  8691. vue.toRaw(store2)._hotUpdate = function(newStore) {
  8692. originalHotUpdate.apply(this, arguments);
  8693. patchActionForGrouping(store2, Object.keys(newStore._hmrPayload.actions), !!store2._isOptionsAPI);
  8694. };
  8695. addStoreToDevtools(
  8696. app,
  8697. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  8698. store2
  8699. );
  8700. }
  8701. function createPinia() {
  8702. const scope = vue.effectScope(true);
  8703. const state = scope.run(() => vue.ref({}));
  8704. let _p = [];
  8705. let toBeInstalled = [];
  8706. const pinia2 = vue.markRaw({
  8707. install(app) {
  8708. setActivePinia(pinia2);
  8709. {
  8710. pinia2._a = app;
  8711. app.provide(piniaSymbol, pinia2);
  8712. app.config.globalProperties.$pinia = pinia2;
  8713. if (USE_DEVTOOLS) {
  8714. registerPiniaDevtools(app, pinia2);
  8715. }
  8716. toBeInstalled.forEach((plugin) => _p.push(plugin));
  8717. toBeInstalled = [];
  8718. }
  8719. },
  8720. use(plugin) {
  8721. if (!this._a && !isVue2) {
  8722. toBeInstalled.push(plugin);
  8723. } else {
  8724. _p.push(plugin);
  8725. }
  8726. return this;
  8727. },
  8728. _p,
  8729. // it's actually undefined here
  8730. // @ts-expect-error
  8731. _a: null,
  8732. _e: scope,
  8733. _s: /* @__PURE__ */ new Map(),
  8734. state
  8735. });
  8736. if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
  8737. pinia2.use(devtoolsPlugin);
  8738. }
  8739. return pinia2;
  8740. }
  8741. function patchObject(newState, oldState) {
  8742. for (const key in oldState) {
  8743. const subPatch = oldState[key];
  8744. if (!(key in newState)) {
  8745. continue;
  8746. }
  8747. const targetValue = newState[key];
  8748. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  8749. newState[key] = patchObject(targetValue, subPatch);
  8750. } else {
  8751. {
  8752. newState[key] = subPatch;
  8753. }
  8754. }
  8755. }
  8756. return newState;
  8757. }
  8758. const noop = () => {
  8759. };
  8760. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  8761. subscriptions.push(callback);
  8762. const removeSubscription = () => {
  8763. const idx = subscriptions.indexOf(callback);
  8764. if (idx > -1) {
  8765. subscriptions.splice(idx, 1);
  8766. onCleanup();
  8767. }
  8768. };
  8769. if (!detached && vue.getCurrentScope()) {
  8770. vue.onScopeDispose(removeSubscription);
  8771. }
  8772. return removeSubscription;
  8773. }
  8774. function triggerSubscriptions(subscriptions, ...args) {
  8775. subscriptions.slice().forEach((callback) => {
  8776. callback(...args);
  8777. });
  8778. }
  8779. const fallbackRunWithContext = (fn) => fn();
  8780. function mergeReactiveObjects(target, patchToApply) {
  8781. if (target instanceof Map && patchToApply instanceof Map) {
  8782. patchToApply.forEach((value2, key) => target.set(key, value2));
  8783. }
  8784. if (target instanceof Set && patchToApply instanceof Set) {
  8785. patchToApply.forEach(target.add, target);
  8786. }
  8787. for (const key in patchToApply) {
  8788. if (!patchToApply.hasOwnProperty(key))
  8789. continue;
  8790. const subPatch = patchToApply[key];
  8791. const targetValue = target[key];
  8792. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  8793. target[key] = mergeReactiveObjects(targetValue, subPatch);
  8794. } else {
  8795. target[key] = subPatch;
  8796. }
  8797. }
  8798. return target;
  8799. }
  8800. const skipHydrateSymbol = Symbol("pinia:skipHydration");
  8801. function shouldHydrate(obj) {
  8802. return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  8803. }
  8804. const { assign } = Object;
  8805. function isComputed(o) {
  8806. return !!(vue.isRef(o) && o.effect);
  8807. }
  8808. function createOptionsStore(id, options, pinia2, hot) {
  8809. const { state, actions, getters } = options;
  8810. const initialState = pinia2.state.value[id];
  8811. let store2;
  8812. function setup() {
  8813. if (!initialState && !hot) {
  8814. {
  8815. pinia2.state.value[id] = state ? state() : {};
  8816. }
  8817. }
  8818. const localState = hot ? (
  8819. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  8820. vue.toRefs(vue.ref(state ? state() : {}).value)
  8821. ) : vue.toRefs(pinia2.state.value[id]);
  8822. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  8823. if (name in localState) {
  8824. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
  8825. }
  8826. computedGetters[name] = vue.markRaw(vue.computed(() => {
  8827. setActivePinia(pinia2);
  8828. const store22 = pinia2._s.get(id);
  8829. return getters[name].call(store22, store22);
  8830. }));
  8831. return computedGetters;
  8832. }, {}));
  8833. }
  8834. store2 = createSetupStore(id, setup, options, pinia2, hot, true);
  8835. return store2;
  8836. }
  8837. function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {
  8838. let scope;
  8839. const optionsForPlugin = assign({ actions: {} }, options);
  8840. if (!pinia2._e.active) {
  8841. throw new Error("Pinia destroyed");
  8842. }
  8843. const $subscribeOptions = {
  8844. deep: true
  8845. // flush: 'post',
  8846. };
  8847. {
  8848. $subscribeOptions.onTrigger = (event) => {
  8849. if (isListening) {
  8850. debuggerEvents = event;
  8851. } else if (isListening == false && !store2._hotUpdating) {
  8852. if (Array.isArray(debuggerEvents)) {
  8853. debuggerEvents.push(event);
  8854. } else {
  8855. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  8856. }
  8857. }
  8858. };
  8859. }
  8860. let isListening;
  8861. let isSyncListening;
  8862. let subscriptions = [];
  8863. let actionSubscriptions = [];
  8864. let debuggerEvents;
  8865. const initialState = pinia2.state.value[$id];
  8866. if (!isOptionsStore && !initialState && !hot) {
  8867. {
  8868. pinia2.state.value[$id] = {};
  8869. }
  8870. }
  8871. const hotState = vue.ref({});
  8872. let activeListener;
  8873. function $patch(partialStateOrMutator) {
  8874. let subscriptionMutation;
  8875. isListening = isSyncListening = false;
  8876. {
  8877. debuggerEvents = [];
  8878. }
  8879. if (typeof partialStateOrMutator === "function") {
  8880. partialStateOrMutator(pinia2.state.value[$id]);
  8881. subscriptionMutation = {
  8882. type: MutationType.patchFunction,
  8883. storeId: $id,
  8884. events: debuggerEvents
  8885. };
  8886. } else {
  8887. mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);
  8888. subscriptionMutation = {
  8889. type: MutationType.patchObject,
  8890. payload: partialStateOrMutator,
  8891. storeId: $id,
  8892. events: debuggerEvents
  8893. };
  8894. }
  8895. const myListenerId = activeListener = Symbol();
  8896. vue.nextTick().then(() => {
  8897. if (activeListener === myListenerId) {
  8898. isListening = true;
  8899. }
  8900. });
  8901. isSyncListening = true;
  8902. triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);
  8903. }
  8904. const $reset = isOptionsStore ? function $reset2() {
  8905. const { state } = options;
  8906. const newState = state ? state() : {};
  8907. this.$patch(($state) => {
  8908. assign($state, newState);
  8909. });
  8910. } : (
  8911. /* istanbul ignore next */
  8912. () => {
  8913. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  8914. }
  8915. );
  8916. function $dispose() {
  8917. scope.stop();
  8918. subscriptions = [];
  8919. actionSubscriptions = [];
  8920. pinia2._s.delete($id);
  8921. }
  8922. function wrapAction(name, action) {
  8923. return function() {
  8924. setActivePinia(pinia2);
  8925. const args = Array.from(arguments);
  8926. const afterCallbackList = [];
  8927. const onErrorCallbackList = [];
  8928. function after(callback) {
  8929. afterCallbackList.push(callback);
  8930. }
  8931. function onError(callback) {
  8932. onErrorCallbackList.push(callback);
  8933. }
  8934. triggerSubscriptions(actionSubscriptions, {
  8935. args,
  8936. name,
  8937. store: store2,
  8938. after,
  8939. onError
  8940. });
  8941. let ret;
  8942. try {
  8943. ret = action.apply(this && this.$id === $id ? this : store2, args);
  8944. } catch (error2) {
  8945. triggerSubscriptions(onErrorCallbackList, error2);
  8946. throw error2;
  8947. }
  8948. if (ret instanceof Promise) {
  8949. return ret.then((value2) => {
  8950. triggerSubscriptions(afterCallbackList, value2);
  8951. return value2;
  8952. }).catch((error2) => {
  8953. triggerSubscriptions(onErrorCallbackList, error2);
  8954. return Promise.reject(error2);
  8955. });
  8956. }
  8957. triggerSubscriptions(afterCallbackList, ret);
  8958. return ret;
  8959. };
  8960. }
  8961. const _hmrPayload = /* @__PURE__ */ vue.markRaw({
  8962. actions: {},
  8963. getters: {},
  8964. state: [],
  8965. hotState
  8966. });
  8967. const partialStore = {
  8968. _p: pinia2,
  8969. // _s: scope,
  8970. $id,
  8971. $onAction: addSubscription.bind(null, actionSubscriptions),
  8972. $patch,
  8973. $reset,
  8974. $subscribe(callback, options2 = {}) {
  8975. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  8976. const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => {
  8977. if (options2.flush === "sync" ? isSyncListening : isListening) {
  8978. callback({
  8979. storeId: $id,
  8980. type: MutationType.direct,
  8981. events: debuggerEvents
  8982. }, state);
  8983. }
  8984. }, assign({}, $subscribeOptions, options2)));
  8985. return removeSubscription;
  8986. },
  8987. $dispose
  8988. };
  8989. const store2 = vue.reactive(assign(
  8990. {
  8991. _hmrPayload,
  8992. _customProperties: vue.markRaw(/* @__PURE__ */ new Set())
  8993. // devtools custom properties
  8994. },
  8995. partialStore
  8996. // must be added later
  8997. // setupStore
  8998. ));
  8999. pinia2._s.set($id, store2);
  9000. const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;
  9001. const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup)));
  9002. for (const key in setupStore) {
  9003. const prop = setupStore[key];
  9004. if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) {
  9005. if (hot) {
  9006. set(hotState.value, key, vue.toRef(setupStore, key));
  9007. } else if (!isOptionsStore) {
  9008. if (initialState && shouldHydrate(prop)) {
  9009. if (vue.isRef(prop)) {
  9010. prop.value = initialState[key];
  9011. } else {
  9012. mergeReactiveObjects(prop, initialState[key]);
  9013. }
  9014. }
  9015. {
  9016. pinia2.state.value[$id][key] = prop;
  9017. }
  9018. }
  9019. {
  9020. _hmrPayload.state.push(key);
  9021. }
  9022. } else if (typeof prop === "function") {
  9023. const actionValue = hot ? prop : wrapAction(key, prop);
  9024. {
  9025. setupStore[key] = actionValue;
  9026. }
  9027. {
  9028. _hmrPayload.actions[key] = prop;
  9029. }
  9030. optionsForPlugin.actions[key] = prop;
  9031. } else {
  9032. if (isComputed(prop)) {
  9033. _hmrPayload.getters[key] = isOptionsStore ? (
  9034. // @ts-expect-error
  9035. options.getters[key]
  9036. ) : prop;
  9037. if (IS_CLIENT) {
  9038. const getters = setupStore._getters || // @ts-expect-error: same
  9039. (setupStore._getters = vue.markRaw([]));
  9040. getters.push(key);
  9041. }
  9042. }
  9043. }
  9044. }
  9045. {
  9046. assign(store2, setupStore);
  9047. assign(vue.toRaw(store2), setupStore);
  9048. }
  9049. Object.defineProperty(store2, "$state", {
  9050. get: () => hot ? hotState.value : pinia2.state.value[$id],
  9051. set: (state) => {
  9052. if (hot) {
  9053. throw new Error("cannot set hotState");
  9054. }
  9055. $patch(($state) => {
  9056. assign($state, state);
  9057. });
  9058. }
  9059. });
  9060. {
  9061. store2._hotUpdate = vue.markRaw((newStore) => {
  9062. store2._hotUpdating = true;
  9063. newStore._hmrPayload.state.forEach((stateKey) => {
  9064. if (stateKey in store2.$state) {
  9065. const newStateTarget = newStore.$state[stateKey];
  9066. const oldStateSource = store2.$state[stateKey];
  9067. if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) {
  9068. patchObject(newStateTarget, oldStateSource);
  9069. } else {
  9070. newStore.$state[stateKey] = oldStateSource;
  9071. }
  9072. }
  9073. set(store2, stateKey, vue.toRef(newStore.$state, stateKey));
  9074. });
  9075. Object.keys(store2.$state).forEach((stateKey) => {
  9076. if (!(stateKey in newStore.$state)) {
  9077. del(store2, stateKey);
  9078. }
  9079. });
  9080. isListening = false;
  9081. isSyncListening = false;
  9082. pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState");
  9083. isSyncListening = true;
  9084. vue.nextTick().then(() => {
  9085. isListening = true;
  9086. });
  9087. for (const actionName in newStore._hmrPayload.actions) {
  9088. const action = newStore[actionName];
  9089. set(store2, actionName, wrapAction(actionName, action));
  9090. }
  9091. for (const getterName in newStore._hmrPayload.getters) {
  9092. const getter = newStore._hmrPayload.getters[getterName];
  9093. const getterValue = isOptionsStore ? (
  9094. // special handling of options api
  9095. vue.computed(() => {
  9096. setActivePinia(pinia2);
  9097. return getter.call(store2, store2);
  9098. })
  9099. ) : getter;
  9100. set(store2, getterName, getterValue);
  9101. }
  9102. Object.keys(store2._hmrPayload.getters).forEach((key) => {
  9103. if (!(key in newStore._hmrPayload.getters)) {
  9104. del(store2, key);
  9105. }
  9106. });
  9107. Object.keys(store2._hmrPayload.actions).forEach((key) => {
  9108. if (!(key in newStore._hmrPayload.actions)) {
  9109. del(store2, key);
  9110. }
  9111. });
  9112. store2._hmrPayload = newStore._hmrPayload;
  9113. store2._getters = newStore._getters;
  9114. store2._hotUpdating = false;
  9115. });
  9116. }
  9117. if (USE_DEVTOOLS) {
  9118. const nonEnumerable = {
  9119. writable: true,
  9120. configurable: true,
  9121. // avoid warning on devtools trying to display this property
  9122. enumerable: false
  9123. };
  9124. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
  9125. Object.defineProperty(store2, p, assign({ value: store2[p] }, nonEnumerable));
  9126. });
  9127. }
  9128. pinia2._p.forEach((extender) => {
  9129. if (USE_DEVTOOLS) {
  9130. const extensions = scope.run(() => extender({
  9131. store: store2,
  9132. app: pinia2._a,
  9133. pinia: pinia2,
  9134. options: optionsForPlugin
  9135. }));
  9136. Object.keys(extensions || {}).forEach((key) => store2._customProperties.add(key));
  9137. assign(store2, extensions);
  9138. } else {
  9139. assign(store2, scope.run(() => extender({
  9140. store: store2,
  9141. app: pinia2._a,
  9142. pinia: pinia2,
  9143. options: optionsForPlugin
  9144. })));
  9145. }
  9146. });
  9147. if (store2.$state && typeof store2.$state === "object" && typeof store2.$state.constructor === "function" && !store2.$state.constructor.toString().includes("[native code]")) {
  9148. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  9149. state: () => new MyClass()
  9150. Found in store "${store2.$id}".`);
  9151. }
  9152. if (initialState && isOptionsStore && options.hydrate) {
  9153. options.hydrate(store2.$state, initialState);
  9154. }
  9155. isListening = true;
  9156. isSyncListening = true;
  9157. return store2;
  9158. }
  9159. function defineStore(idOrOptions, setup, setupOptions) {
  9160. let id;
  9161. let options;
  9162. const isSetupStore = typeof setup === "function";
  9163. if (typeof idOrOptions === "string") {
  9164. id = idOrOptions;
  9165. options = isSetupStore ? setupOptions : setup;
  9166. } else {
  9167. options = idOrOptions;
  9168. id = idOrOptions.id;
  9169. if (typeof id !== "string") {
  9170. throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
  9171. }
  9172. }
  9173. function useStore2(pinia2, hot) {
  9174. const hasContext = vue.hasInjectionContext();
  9175. pinia2 = // in test mode, ignore the argument provided as we can always retrieve a
  9176. // pinia instance with getActivePinia()
  9177. pinia2 || (hasContext ? vue.inject(piniaSymbol, null) : null);
  9178. if (pinia2)
  9179. setActivePinia(pinia2);
  9180. if (!activePinia) {
  9181. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
  9182. See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
  9183. This will fail in production.`);
  9184. }
  9185. pinia2 = activePinia;
  9186. if (!pinia2._s.has(id)) {
  9187. if (isSetupStore) {
  9188. createSetupStore(id, setup, options, pinia2);
  9189. } else {
  9190. createOptionsStore(id, options, pinia2);
  9191. }
  9192. {
  9193. useStore2._pinia = pinia2;
  9194. }
  9195. }
  9196. const store2 = pinia2._s.get(id);
  9197. if (hot) {
  9198. const hotId = "__hot:" + id;
  9199. const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign({}, options), pinia2, true);
  9200. hot._hotUpdate(newStore);
  9201. delete pinia2.state.value[hotId];
  9202. pinia2._s.delete(hotId);
  9203. }
  9204. if (IS_CLIENT) {
  9205. const currentInstance = vue.getCurrentInstance();
  9206. if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
  9207. !hot) {
  9208. const vm = currentInstance.proxy;
  9209. const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  9210. cache[id] = store2;
  9211. }
  9212. }
  9213. return store2;
  9214. }
  9215. useStore2.$id = id;
  9216. return useStore2;
  9217. }
  9218. const useStore = defineStore("user", {
  9219. state: () => ({
  9220. userInfo: {},
  9221. // 用户信息
  9222. token: "",
  9223. // uploadUrl: 'http://192.168.1.3:8080/ai-file/upload/oss', // 上传资源的服务器网址
  9224. uploadUrl: "https://gc.sdzcq.com/prod-api/ai-file/upload/oss"
  9225. // 上传资源的服务器网址
  9226. }),
  9227. getters: {},
  9228. actions: {
  9229. setUserInfo(data) {
  9230. if (data.userId) {
  9231. formatAppLog("log", "at store/uses.js:16", "更新全局的用户信息-也更新本地存储", data);
  9232. this.userInfo = data;
  9233. uni.setStorageSync("userInfo", data);
  9234. } else {
  9235. uni.removeStorageSync("userInfo");
  9236. }
  9237. },
  9238. setToken(token) {
  9239. if (token) {
  9240. formatAppLog("log", "at store/uses.js:25", "更新全局的 token -也更新本地存储", token);
  9241. this.token = token;
  9242. uni.setStorageSync("token", token);
  9243. } else {
  9244. uni.removeStorageSync("token");
  9245. }
  9246. }
  9247. }
  9248. });
  9249. const pinia = createPinia();
  9250. const store = useStore(pinia);
  9251. const _sfc_main$1Q = {
  9252. __name: "index",
  9253. props: {
  9254. request: {
  9255. type: Function
  9256. },
  9257. requestStr: {
  9258. type: String
  9259. },
  9260. isRefresh: {
  9261. type: [Number, Boolean],
  9262. default: 0
  9263. },
  9264. height: {
  9265. type: [String, Number]
  9266. },
  9267. total: {
  9268. type: [Number],
  9269. default: 0
  9270. },
  9271. otherParams: {
  9272. type: Object,
  9273. default: () => ({})
  9274. },
  9275. diffHeight: {
  9276. type: Number,
  9277. default: 0
  9278. },
  9279. immediate: {
  9280. type: Boolean,
  9281. default: false
  9282. },
  9283. method: {
  9284. type: String,
  9285. default: "get"
  9286. },
  9287. isUpAutoLoad: {
  9288. type: Boolean,
  9289. default: true
  9290. }
  9291. },
  9292. emits: ["updateList", "update:total"],
  9293. setup(__props, { expose: __expose, emit: __emit }) {
  9294. const {
  9295. mescrollInit,
  9296. downCallback,
  9297. getMescroll
  9298. } = useMescroll();
  9299. const windowHeight = vue.computed(() => {
  9300. return store.clientHeight - props2.diffHeight;
  9301. });
  9302. const emit2 = __emit;
  9303. const props2 = __props;
  9304. const list = vue.ref([]);
  9305. const getList = (mescroll) => {
  9306. return new Promise((resolve, reject) => {
  9307. let params = {
  9308. pageNum: mescroll.num,
  9309. pageSize: mescroll.size,
  9310. ...props2.otherParams
  9311. };
  9312. let methods = props2.method == "post" ? uni.$u.http.post(props2.requestStr, params) : uni.$u.http.get(props2.requestStr, {
  9313. params
  9314. });
  9315. methods.then((res2) => {
  9316. emit2("update:total", res2.total);
  9317. resolve(res2);
  9318. });
  9319. });
  9320. };
  9321. const upCallback = (mescroll) => {
  9322. formatAppLog("log", "at components/pageScroll/index.vue:99", mescroll, "mescroll");
  9323. if (!props2.requestStr)
  9324. return;
  9325. getList(mescroll).then((res2) => {
  9326. const curPageData = res2.rows || res2.data || [];
  9327. if (mescroll.num == 1)
  9328. list.value = [];
  9329. list.value = list.value.concat(curPageData);
  9330. emit2("updateList", list.value, mescroll.num);
  9331. mescroll.endBySize(curPageData.length, res2.total);
  9332. }).catch(() => {
  9333. mescroll.endErr();
  9334. });
  9335. };
  9336. const resetUpScroll = () => {
  9337. setTimeout(() => {
  9338. getMescroll().resetUpScroll();
  9339. }, 100);
  9340. };
  9341. const scroll = (e) => {
  9342. emit2("scroll", e);
  9343. };
  9344. __expose({
  9345. resetUpScroll
  9346. });
  9347. const __returned__ = { mescrollInit, downCallback, getMescroll, windowHeight, emit: emit2, props: props2, list, getList, upCallback, resetUpScroll, scroll, computed: vue.computed, onMounted: vue.onMounted, ref: vue.ref, watch: vue.watch, reactive: vue.reactive, get onShow() {
  9348. return onShow;
  9349. }, get useMescroll() {
  9350. return useMescroll;
  9351. }, get store() {
  9352. return store;
  9353. } };
  9354. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9355. return __returned__;
  9356. }
  9357. };
  9358. function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
  9359. const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$a);
  9360. return vue.openBlock(), vue.createBlock(_component_mescroll_uni, {
  9361. onInit: $setup.mescrollInit,
  9362. onDown: $setup.downCallback,
  9363. onUp: $setup.upCallback,
  9364. height: $props.height || $setup.windowHeight + "px",
  9365. up: { textNoMore: "-- 没有更多了 --", auto: $props.isUpAutoLoad },
  9366. down: { auto: $props.isUpAutoLoad }
  9367. }, {
  9368. default: vue.withCtx(() => [
  9369. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9370. ]),
  9371. _: 3
  9372. /* FORWARDED */
  9373. }, 8, ["onInit", "onDown", "height", "up", "down"]);
  9374. }
  9375. const pageScroll = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-30bc23e1"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/components/pageScroll/index.vue"]]);
  9376. const _sfc_main$1P = {
  9377. __name: "index",
  9378. setup(__props, { expose: __expose }) {
  9379. __expose();
  9380. const statusList = vue.ref([
  9381. {
  9382. label: "待初审",
  9383. value: "1361",
  9384. path: "/pages/order/stat/pending-review"
  9385. },
  9386. {
  9387. label: "待拣件",
  9388. value: "1361",
  9389. path: "/pages/order/stat/pending-pick"
  9390. },
  9391. {
  9392. label: "已拣件待签收",
  9393. value: "1361",
  9394. path: "/pages/order/stat/pending-sign"
  9395. },
  9396. {
  9397. label: "待确认收货",
  9398. value: "1361",
  9399. path: "/pages/order/stat/pending-confirm"
  9400. },
  9401. {
  9402. label: "已到货待审核",
  9403. value: "1361",
  9404. path: "/pages/order/stat/pending-audit"
  9405. },
  9406. {
  9407. label: "待付款",
  9408. value: "1361",
  9409. path: "/pages/order/stat/pending-payment"
  9410. }
  9411. ]);
  9412. const navigateToDetail = (path) => {
  9413. uni.redirectTo({
  9414. url: path
  9415. });
  9416. };
  9417. const __returned__ = { statusList, navigateToDetail, PageScroll: pageScroll, ref: vue.ref };
  9418. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9419. return __returned__;
  9420. }
  9421. };
  9422. function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
  9423. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  9424. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  9425. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  9426. return vue.openBlock(), vue.createElementBlock("view", { class: "order-statistics" }, [
  9427. vue.createCommentVNode(" 顶部统计卡片 "),
  9428. vue.createElementVNode("view", { class: "overview-card" }, [
  9429. vue.createElementVNode("view", { class: "overview-grid" }, [
  9430. vue.createElementVNode("view", { class: "grid-item" }, [
  9431. vue.createElementVNode("text", { class: "item-label" }, "今日订单"),
  9432. vue.createElementVNode("text", { class: "item-value" }, "1361")
  9433. ]),
  9434. vue.createElementVNode("view", { class: "grid-item" }, [
  9435. vue.createElementVNode("text", { class: "item-label" }, "昨日订单"),
  9436. vue.createElementVNode("text", { class: "item-value" }, "1361")
  9437. ]),
  9438. vue.createElementVNode("view", { class: "grid-item" }, [
  9439. vue.createElementVNode("text", { class: "item-label" }, "本月订单"),
  9440. vue.createElementVNode("text", { class: "item-value" }, [
  9441. vue.createTextVNode("2.77"),
  9442. vue.createElementVNode("text", { class: "unit" }, "万")
  9443. ])
  9444. ])
  9445. ])
  9446. ]),
  9447. vue.createCommentVNode(" 订单状态网格 "),
  9448. vue.createElementVNode("view", { class: "status-grid" }, [
  9449. (vue.openBlock(true), vue.createElementBlock(
  9450. vue.Fragment,
  9451. null,
  9452. vue.renderList($setup.statusList, (item, index2) => {
  9453. return vue.openBlock(), vue.createElementBlock("view", {
  9454. key: index2,
  9455. class: "status-item",
  9456. onClick: ($event) => $setup.navigateToDetail(item.path)
  9457. }, [
  9458. vue.createElementVNode("view", { class: "status-content" }, [
  9459. vue.createElementVNode(
  9460. "text",
  9461. { class: "status-label" },
  9462. vue.toDisplayString(item.label),
  9463. 1
  9464. /* TEXT */
  9465. ),
  9466. vue.createElementVNode("view", { class: "status-value-wrap" }, [
  9467. vue.createElementVNode(
  9468. "text",
  9469. { class: "status-value" },
  9470. vue.toDisplayString(item.value),
  9471. 1
  9472. /* TEXT */
  9473. ),
  9474. vue.createVNode(_component_u_icon, {
  9475. name: "arrow-right",
  9476. color: "#999",
  9477. size: "14"
  9478. })
  9479. ])
  9480. ])
  9481. ], 8, ["onClick"]);
  9482. }),
  9483. 128
  9484. /* KEYED_FRAGMENT */
  9485. ))
  9486. ]),
  9487. vue.createCommentVNode(" 底部操作项 "),
  9488. vue.createElementVNode("view", { class: "bottom-actions" }, [
  9489. vue.createVNode(_component_u_cell_group, { border: false }, {
  9490. default: vue.withCtx(() => [
  9491. vue.createVNode(_component_u_cell, {
  9492. title: "收货统计",
  9493. isLink: "",
  9494. onClick: _cache[0] || (_cache[0] = ($event) => $setup.navigateToDetail("/pages/statistics/receive"))
  9495. }),
  9496. vue.createVNode(_component_u_cell, {
  9497. title: "全部订单",
  9498. isLink: "",
  9499. onClick: _cache[1] || (_cache[1] = ($event) => $setup.navigateToDetail("/pages/order/stat/all")),
  9500. border: false
  9501. })
  9502. ]),
  9503. _: 1
  9504. /* STABLE */
  9505. })
  9506. ])
  9507. ]);
  9508. }
  9509. const PagesOrderIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-17a44f9d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/index.vue"]]);
  9510. const props$t = {
  9511. props: {
  9512. // 搜索框形状,round-圆形,square-方形
  9513. shape: {
  9514. type: String,
  9515. default: props$G.search.shape
  9516. },
  9517. // 搜索框背景色,默认值#f2f2f2
  9518. bgColor: {
  9519. type: String,
  9520. default: props$G.search.bgColor
  9521. },
  9522. // 占位提示文字
  9523. placeholder: {
  9524. type: String,
  9525. default: props$G.search.placeholder
  9526. },
  9527. // 是否启用清除控件
  9528. clearabled: {
  9529. type: Boolean,
  9530. default: props$G.search.clearabled
  9531. },
  9532. // 是否自动聚焦
  9533. focus: {
  9534. type: Boolean,
  9535. default: props$G.search.focus
  9536. },
  9537. // 是否在搜索框右侧显示取消按钮
  9538. showAction: {
  9539. type: Boolean,
  9540. default: props$G.search.showAction
  9541. },
  9542. // 右边控件的样式
  9543. actionStyle: {
  9544. type: Object,
  9545. default: props$G.search.actionStyle
  9546. },
  9547. // 取消按钮文字
  9548. actionText: {
  9549. type: String,
  9550. default: props$G.search.actionText
  9551. },
  9552. // 输入框内容对齐方式,可选值为 left|center|right
  9553. inputAlign: {
  9554. type: String,
  9555. default: props$G.search.inputAlign
  9556. },
  9557. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  9558. inputStyle: {
  9559. type: Object,
  9560. default: props$G.search.inputStyle
  9561. },
  9562. // 是否启用输入框
  9563. disabled: {
  9564. type: Boolean,
  9565. default: props$G.search.disabled
  9566. },
  9567. // 边框颜色
  9568. borderColor: {
  9569. type: String,
  9570. default: props$G.search.borderColor
  9571. },
  9572. // 搜索图标的颜色,默认同输入框字体颜色
  9573. searchIconColor: {
  9574. type: String,
  9575. default: props$G.search.searchIconColor
  9576. },
  9577. // 输入框字体颜色
  9578. color: {
  9579. type: String,
  9580. default: props$G.search.color
  9581. },
  9582. // placeholder的颜色
  9583. placeholderColor: {
  9584. type: String,
  9585. default: props$G.search.placeholderColor
  9586. },
  9587. // 左边输入框的图标,可以为uView图标名称或图片路径
  9588. searchIcon: {
  9589. type: String,
  9590. default: props$G.search.searchIcon
  9591. },
  9592. searchIconSize: {
  9593. type: [Number, String],
  9594. default: props$G.search.searchIconSize
  9595. },
  9596. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  9597. margin: {
  9598. type: String,
  9599. default: props$G.search.margin
  9600. },
  9601. // 开启showAction时,是否在input获取焦点时才显示
  9602. animation: {
  9603. type: Boolean,
  9604. default: props$G.search.animation
  9605. },
  9606. // 输入框的初始化内容
  9607. modelValue: {
  9608. type: String,
  9609. default: props$G.search.value
  9610. },
  9611. value: {
  9612. type: String,
  9613. default: props$G.search.value
  9614. },
  9615. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  9616. maxlength: {
  9617. type: [String, Number],
  9618. default: props$G.search.maxlength
  9619. },
  9620. // 搜索框高度,单位px
  9621. height: {
  9622. type: [String, Number],
  9623. default: props$G.search.height
  9624. },
  9625. // 搜索框左侧文本
  9626. label: {
  9627. type: [String, Number, null],
  9628. default: props$G.search.label
  9629. }
  9630. }
  9631. };
  9632. const _sfc_main$1O = {
  9633. name: "u-search",
  9634. mixins: [mpMixin, mixin, props$t],
  9635. data() {
  9636. return {
  9637. keyword: "",
  9638. showClear: false,
  9639. // 是否显示右边的清除图标
  9640. show: false,
  9641. // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件
  9642. focused: this.focus
  9643. // 绑定输入框的值
  9644. // inputValue: this.value
  9645. };
  9646. },
  9647. watch: {
  9648. keyword(nVal) {
  9649. this.$emit("update:modelValue", nVal);
  9650. this.$emit("change", nVal);
  9651. },
  9652. modelValue: {
  9653. immediate: true,
  9654. handler(nVal) {
  9655. this.keyword = nVal;
  9656. }
  9657. }
  9658. },
  9659. computed: {
  9660. showActionBtn() {
  9661. return !this.animation && this.showAction;
  9662. }
  9663. },
  9664. emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"],
  9665. methods: {
  9666. // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化
  9667. inputChange(e) {
  9668. this.keyword = e.detail.value;
  9669. },
  9670. // 清空输入
  9671. // 也可以作为用户通过this.$refs形式调用清空输入框内容
  9672. clear() {
  9673. this.keyword = "";
  9674. this.$nextTick(() => {
  9675. this.$emit("clear");
  9676. });
  9677. },
  9678. // 确定搜索
  9679. search(e) {
  9680. this.$emit("search", e.detail.value);
  9681. try {
  9682. uni.hideKeyboard();
  9683. } catch (e2) {
  9684. }
  9685. },
  9686. // 点击右边自定义按钮的事件
  9687. custom() {
  9688. this.$emit("custom", this.keyword);
  9689. try {
  9690. uni.hideKeyboard();
  9691. } catch (e) {
  9692. }
  9693. },
  9694. // 获取焦点
  9695. getFocus() {
  9696. this.focused = true;
  9697. if (this.animation && this.showAction)
  9698. this.show = true;
  9699. this.$emit("focus", this.keyword);
  9700. },
  9701. // 失去焦点
  9702. blur() {
  9703. setTimeout(() => {
  9704. this.focused = false;
  9705. }, 100);
  9706. this.show = false;
  9707. this.$emit("blur", this.keyword);
  9708. },
  9709. // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
  9710. clickHandler() {
  9711. if (this.disabled)
  9712. this.$emit("click");
  9713. },
  9714. // 点击左边图标
  9715. clickIcon() {
  9716. this.$emit("clickIcon");
  9717. }
  9718. }
  9719. };
  9720. function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
  9721. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  9722. return vue.openBlock(), vue.createElementBlock(
  9723. "view",
  9724. {
  9725. class: "u-search",
  9726. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  9727. style: vue.normalizeStyle([{
  9728. margin: _ctx.margin
  9729. }, _ctx.$u.addStyle(_ctx.customStyle)])
  9730. },
  9731. [
  9732. vue.createElementVNode(
  9733. "view",
  9734. {
  9735. class: "u-search__content",
  9736. style: vue.normalizeStyle({
  9737. backgroundColor: _ctx.bgColor,
  9738. borderRadius: _ctx.shape == "round" ? "100px" : "4px",
  9739. borderColor: _ctx.borderColor
  9740. })
  9741. },
  9742. [
  9743. _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [
  9744. vue.createElementVNode(
  9745. "text",
  9746. { class: "u-search__content__label" },
  9747. vue.toDisplayString(_ctx.label),
  9748. 1
  9749. /* TEXT */
  9750. )
  9751. ], true) : vue.createCommentVNode("v-if", true),
  9752. vue.createElementVNode("view", { class: "u-search__content__icon" }, [
  9753. vue.createVNode(_component_u_icon, {
  9754. onClick: $options.clickIcon,
  9755. size: _ctx.searchIconSize,
  9756. name: _ctx.searchIcon,
  9757. color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
  9758. }, null, 8, ["onClick", "size", "name", "color"])
  9759. ]),
  9760. vue.createElementVNode("input", {
  9761. "confirm-type": "search",
  9762. onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)),
  9763. value: $data.keyword,
  9764. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)),
  9765. onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)),
  9766. disabled: _ctx.disabled,
  9767. onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)),
  9768. focus: _ctx.focus,
  9769. maxlength: _ctx.maxlength,
  9770. "placeholder-class": "u-search__content__input--placeholder",
  9771. placeholder: _ctx.placeholder,
  9772. "placeholder-style": `color: ${_ctx.placeholderColor}`,
  9773. class: "u-search__content__input",
  9774. type: "text",
  9775. style: vue.normalizeStyle([{
  9776. textAlign: _ctx.inputAlign,
  9777. color: _ctx.color,
  9778. backgroundColor: _ctx.bgColor,
  9779. height: _ctx.$u.addUnit(_ctx.height)
  9780. }, _ctx.inputStyle])
  9781. }, null, 44, ["value", "disabled", "focus", "maxlength", "placeholder", "placeholder-style"]),
  9782. $data.keyword && _ctx.clearabled && $data.focused ? (vue.openBlock(), vue.createElementBlock("view", {
  9783. key: 1,
  9784. class: "u-search__content__icon u-search__content__close",
  9785. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  9786. }, [
  9787. vue.createVNode(_component_u_icon, {
  9788. name: "close",
  9789. size: "11",
  9790. color: "#ffffff",
  9791. customStyle: "line-height: 12px"
  9792. })
  9793. ])) : vue.createCommentVNode("v-if", true)
  9794. ],
  9795. 4
  9796. /* STYLE */
  9797. ),
  9798. vue.createElementVNode(
  9799. "text",
  9800. {
  9801. style: vue.normalizeStyle([_ctx.actionStyle]),
  9802. class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]),
  9803. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"]))
  9804. },
  9805. vue.toDisplayString(_ctx.actionText),
  9806. 7
  9807. /* TEXT, CLASS, STYLE */
  9808. )
  9809. ],
  9810. 4
  9811. /* STYLE */
  9812. );
  9813. }
  9814. const __easycom_4$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-e082a34a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
  9815. const props$s = {
  9816. props: {
  9817. // 是否展示组件
  9818. show: {
  9819. type: Boolean,
  9820. default: props$G.transition.show
  9821. },
  9822. // 使用的动画模式
  9823. mode: {
  9824. type: String,
  9825. default: props$G.transition.mode
  9826. },
  9827. // 动画的执行时间,单位ms
  9828. duration: {
  9829. type: [String, Number],
  9830. default: props$G.transition.duration
  9831. },
  9832. // 使用的动画过渡函数
  9833. timingFunction: {
  9834. type: String,
  9835. default: props$G.transition.timingFunction
  9836. }
  9837. }
  9838. };
  9839. const getClassNames = (name) => ({
  9840. enter: `u-${name}-enter u-${name}-enter-active`,
  9841. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  9842. leave: `u-${name}-leave u-${name}-leave-active`,
  9843. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  9844. });
  9845. const transition = {
  9846. methods: {
  9847. // 组件被点击发出事件
  9848. clickHandler() {
  9849. this.$emit("click");
  9850. },
  9851. // vue版本的组件进场处理
  9852. vueEnter() {
  9853. const classNames = getClassNames(this.mode);
  9854. this.status = "enter";
  9855. this.$emit("beforeEnter");
  9856. this.inited = true;
  9857. this.display = true;
  9858. this.classes = classNames.enter;
  9859. this.$nextTick(async () => {
  9860. this.$emit("enter");
  9861. this.transitionEnded = false;
  9862. this.$emit("afterEnter");
  9863. this.classes = classNames["enter-to"];
  9864. });
  9865. },
  9866. // 动画离场处理
  9867. vueLeave() {
  9868. if (!this.display)
  9869. return;
  9870. const classNames = getClassNames(this.mode);
  9871. this.status = "leave";
  9872. this.$emit("beforeLeave");
  9873. this.classes = classNames.leave;
  9874. this.$nextTick(() => {
  9875. this.transitionEnded = false;
  9876. this.$emit("leave");
  9877. setTimeout(this.onTransitionEnd, this.duration);
  9878. this.classes = classNames["leave-to"];
  9879. });
  9880. },
  9881. // 完成过渡后触发
  9882. onTransitionEnd() {
  9883. if (this.transitionEnded)
  9884. return;
  9885. this.transitionEnded = true;
  9886. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  9887. if (!this.show && this.display) {
  9888. this.display = false;
  9889. this.inited = false;
  9890. }
  9891. }
  9892. }
  9893. };
  9894. const _sfc_main$1N = {
  9895. name: "u-transition",
  9896. data() {
  9897. return {
  9898. inited: false,
  9899. // 是否显示/隐藏组件
  9900. viewStyle: {},
  9901. // 组件内部的样式
  9902. status: "",
  9903. // 记录组件动画的状态
  9904. transitionEnded: false,
  9905. // 组件是否结束的标记
  9906. display: false,
  9907. // 组件是否展示
  9908. classes: ""
  9909. // 应用的类名
  9910. };
  9911. },
  9912. computed: {
  9913. mergeStyle() {
  9914. const { viewStyle, customStyle } = this;
  9915. return {
  9916. transitionDuration: `${this.duration}ms`,
  9917. // display: `${this.display ? '' : 'none'}`,
  9918. transitionTimingFunction: this.timingFunction,
  9919. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  9920. ...uni.$u.addStyle(customStyle),
  9921. ...viewStyle
  9922. };
  9923. }
  9924. },
  9925. // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
  9926. mixins: [mpMixin, mixin, transition, props$s],
  9927. watch: {
  9928. show: {
  9929. handler(newVal) {
  9930. newVal ? this.vueEnter() : this.vueLeave();
  9931. },
  9932. // 表示同时监听初始化时的props的show的意思
  9933. immediate: true
  9934. }
  9935. }
  9936. };
  9937. function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
  9938. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  9939. "view",
  9940. {
  9941. key: 0,
  9942. class: vue.normalizeClass(["u-transition", $data.classes]),
  9943. ref: "u-transition",
  9944. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  9945. style: vue.normalizeStyle([$options.mergeStyle]),
  9946. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  9947. },
  9948. [
  9949. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9950. ],
  9951. 38
  9952. /* CLASS, STYLE, NEED_HYDRATION */
  9953. )) : vue.createCommentVNode("v-if", true);
  9954. }
  9955. const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-5cec8177"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  9956. const props$r = {
  9957. props: {
  9958. // 是否显示遮罩
  9959. show: {
  9960. type: Boolean,
  9961. default: props$G.overlay.show
  9962. },
  9963. // 层级z-index
  9964. zIndex: {
  9965. type: [String, Number],
  9966. default: props$G.overlay.zIndex
  9967. },
  9968. // 遮罩的过渡时间,单位为ms
  9969. duration: {
  9970. type: [String, Number],
  9971. default: props$G.overlay.duration
  9972. },
  9973. // 不透明度值,当做rgba的第四个参数
  9974. opacity: {
  9975. type: [String, Number],
  9976. default: props$G.overlay.opacity
  9977. }
  9978. }
  9979. };
  9980. const _sfc_main$1M = {
  9981. name: "u-overlay",
  9982. mixins: [mpMixin, mixin, props$r],
  9983. computed: {
  9984. overlayStyle() {
  9985. const style = {
  9986. position: "fixed",
  9987. top: 0,
  9988. left: 0,
  9989. right: 0,
  9990. zIndex: this.zIndex,
  9991. bottom: 0,
  9992. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  9993. };
  9994. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  9995. }
  9996. },
  9997. methods: {
  9998. clickHandler() {
  9999. this.$emit("click");
  10000. }
  10001. }
  10002. };
  10003. function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
  10004. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  10005. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  10006. show: _ctx.show,
  10007. "custom-class": "u-overlay",
  10008. duration: _ctx.duration,
  10009. "custom-style": $options.overlayStyle,
  10010. onClick: $options.clickHandler
  10011. }, {
  10012. default: vue.withCtx(() => [
  10013. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10014. ]),
  10015. _: 3
  10016. /* FORWARDED */
  10017. }, 8, ["show", "duration", "custom-style", "onClick"]);
  10018. }
  10019. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-9112bed9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  10020. const props$q = {
  10021. props: {
  10022. bgColor: {
  10023. type: String,
  10024. default: props$G.statusBar.bgColor
  10025. }
  10026. }
  10027. };
  10028. const _sfc_main$1L = {
  10029. name: "u-status-bar",
  10030. mixins: [mpMixin, mixin, props$q],
  10031. data() {
  10032. return {};
  10033. },
  10034. computed: {
  10035. style() {
  10036. const style = {};
  10037. style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
  10038. style.backgroundColor = this.bgColor;
  10039. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10040. }
  10041. }
  10042. };
  10043. function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
  10044. return vue.openBlock(), vue.createElementBlock(
  10045. "view",
  10046. {
  10047. style: vue.normalizeStyle([$options.style]),
  10048. class: "u-status-bar"
  10049. },
  10050. [
  10051. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10052. ],
  10053. 4
  10054. /* STYLE */
  10055. );
  10056. }
  10057. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  10058. const props$p = {
  10059. props: {}
  10060. };
  10061. const _sfc_main$1K = {
  10062. name: "u-safe-bottom",
  10063. mixins: [mpMixin, mixin, props$p],
  10064. data() {
  10065. return {
  10066. safeAreaBottomHeight: 0,
  10067. isNvue: false
  10068. };
  10069. },
  10070. computed: {
  10071. style() {
  10072. const style = {};
  10073. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10074. }
  10075. },
  10076. mounted() {
  10077. }
  10078. };
  10079. function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
  10080. return vue.openBlock(), vue.createElementBlock(
  10081. "view",
  10082. {
  10083. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  10084. style: vue.normalizeStyle([$options.style])
  10085. },
  10086. null,
  10087. 6
  10088. /* CLASS, STYLE */
  10089. );
  10090. }
  10091. const __easycom_3$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-f3d22cfe"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  10092. const props$o = {
  10093. props: {
  10094. // 是否展示弹窗
  10095. show: {
  10096. type: Boolean,
  10097. default: props$G.popup.show
  10098. },
  10099. // 是否显示遮罩
  10100. overlay: {
  10101. type: Boolean,
  10102. default: props$G.popup.overlay
  10103. },
  10104. // 弹出的方向,可选值为 top bottom right left center
  10105. mode: {
  10106. type: String,
  10107. default: props$G.popup.mode
  10108. },
  10109. // 动画时长,单位ms
  10110. duration: {
  10111. type: [String, Number],
  10112. default: props$G.popup.duration
  10113. },
  10114. // 是否显示关闭图标
  10115. closeable: {
  10116. type: Boolean,
  10117. default: props$G.popup.closeable
  10118. },
  10119. // 自定义遮罩的样式
  10120. overlayStyle: {
  10121. type: [Object, String],
  10122. default: props$G.popup.overlayStyle
  10123. },
  10124. // 点击遮罩是否关闭弹窗
  10125. closeOnClickOverlay: {
  10126. type: Boolean,
  10127. default: props$G.popup.closeOnClickOverlay
  10128. },
  10129. // 层级
  10130. zIndex: {
  10131. type: [String, Number],
  10132. default: props$G.popup.zIndex
  10133. },
  10134. // 是否为iPhoneX留出底部安全距离
  10135. safeAreaInsetBottom: {
  10136. type: Boolean,
  10137. default: props$G.popup.safeAreaInsetBottom
  10138. },
  10139. // 是否留出顶部安全距离(状态栏高度)
  10140. safeAreaInsetTop: {
  10141. type: Boolean,
  10142. default: props$G.popup.safeAreaInsetTop
  10143. },
  10144. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  10145. closeIconPos: {
  10146. type: String,
  10147. default: props$G.popup.closeIconPos
  10148. },
  10149. // 是否显示圆角
  10150. round: {
  10151. type: [Boolean, String, Number],
  10152. default: props$G.popup.round
  10153. },
  10154. // mode=center,也即中部弹出时,是否使用缩放模式
  10155. zoom: {
  10156. type: Boolean,
  10157. default: props$G.popup.zoom
  10158. },
  10159. // 弹窗背景色,设置为transparent可去除白色背景
  10160. bgColor: {
  10161. type: String,
  10162. default: props$G.popup.bgColor
  10163. },
  10164. // 遮罩的透明度,0-1之间
  10165. overlayOpacity: {
  10166. type: [Number, String],
  10167. default: props$G.popup.overlayOpacity
  10168. }
  10169. }
  10170. };
  10171. const _sfc_main$1J = {
  10172. name: "u-popup",
  10173. mixins: [mpMixin, mixin, props$o],
  10174. data() {
  10175. return {
  10176. overlayDuration: this.duration + 50
  10177. };
  10178. },
  10179. watch: {
  10180. show(newValue, oldValue) {
  10181. }
  10182. },
  10183. computed: {
  10184. transitionStyle() {
  10185. const style = {
  10186. zIndex: this.zIndex,
  10187. position: "fixed",
  10188. display: "flex"
  10189. };
  10190. style[this.mode] = 0;
  10191. if (this.mode === "left") {
  10192. return uni.$u.deepMerge(style, {
  10193. bottom: 0,
  10194. top: 0
  10195. });
  10196. } else if (this.mode === "right") {
  10197. return uni.$u.deepMerge(style, {
  10198. bottom: 0,
  10199. top: 0
  10200. });
  10201. } else if (this.mode === "top") {
  10202. return uni.$u.deepMerge(style, {
  10203. left: 0,
  10204. right: 0
  10205. });
  10206. } else if (this.mode === "bottom") {
  10207. return uni.$u.deepMerge(style, {
  10208. left: 0,
  10209. right: 0
  10210. });
  10211. } else if (this.mode === "center") {
  10212. return uni.$u.deepMerge(style, {
  10213. alignItems: "center",
  10214. "justify-content": "center",
  10215. top: 0,
  10216. left: 0,
  10217. right: 0,
  10218. bottom: 0
  10219. });
  10220. }
  10221. },
  10222. contentStyle() {
  10223. const style = {};
  10224. uni.$u.sys();
  10225. if (this.mode !== "center") {
  10226. style.flex = 1;
  10227. }
  10228. if (this.bgColor) {
  10229. style.backgroundColor = this.bgColor;
  10230. }
  10231. if (this.round) {
  10232. const value2 = uni.$u.addUnit(this.round);
  10233. if (this.mode === "top") {
  10234. style.borderBottomLeftRadius = value2;
  10235. style.borderBottomRightRadius = value2;
  10236. } else if (this.mode === "bottom") {
  10237. style.borderTopLeftRadius = value2;
  10238. style.borderTopRightRadius = value2;
  10239. } else if (this.mode === "center") {
  10240. style.borderRadius = value2;
  10241. }
  10242. }
  10243. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10244. },
  10245. position() {
  10246. if (this.mode === "center") {
  10247. return this.zoom ? "fade-zoom" : "fade";
  10248. }
  10249. if (this.mode === "left") {
  10250. return "slide-left";
  10251. }
  10252. if (this.mode === "right") {
  10253. return "slide-right";
  10254. }
  10255. if (this.mode === "bottom") {
  10256. return "slide-up";
  10257. }
  10258. if (this.mode === "top") {
  10259. return "slide-down";
  10260. }
  10261. }
  10262. },
  10263. methods: {
  10264. // 点击遮罩
  10265. overlayClick() {
  10266. if (this.closeOnClickOverlay) {
  10267. this.$emit("close");
  10268. }
  10269. },
  10270. close(e) {
  10271. this.$emit("close");
  10272. },
  10273. afterEnter() {
  10274. this.$emit("open");
  10275. },
  10276. clickHandler() {
  10277. if (this.mode === "center") {
  10278. this.overlayClick();
  10279. }
  10280. this.$emit("click");
  10281. }
  10282. }
  10283. };
  10284. function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
  10285. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$9);
  10286. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  10287. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  10288. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$5);
  10289. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  10290. return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
  10291. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  10292. key: 0,
  10293. show: _ctx.show,
  10294. onClick: $options.overlayClick,
  10295. duration: $data.overlayDuration,
  10296. customStyle: _ctx.overlayStyle,
  10297. opacity: _ctx.overlayOpacity
  10298. }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  10299. vue.createVNode(_component_u_transition, {
  10300. show: _ctx.show,
  10301. customStyle: $options.transitionStyle,
  10302. mode: $options.position,
  10303. duration: _ctx.duration,
  10304. onAfterEnter: $options.afterEnter,
  10305. onClick: $options.clickHandler
  10306. }, {
  10307. default: vue.withCtx(() => [
  10308. vue.createElementVNode(
  10309. "view",
  10310. {
  10311. class: "u-popup__content",
  10312. style: vue.normalizeStyle([$options.contentStyle]),
  10313. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
  10314. },
  10315. [
  10316. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  10317. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  10318. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  10319. "view",
  10320. {
  10321. key: 1,
  10322. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  10323. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  10324. "hover-class": "u-popup__content__close--hover",
  10325. "hover-stay-time": "150"
  10326. },
  10327. [
  10328. vue.createVNode(_component_u_icon, {
  10329. name: "close",
  10330. color: "#909399",
  10331. size: "18",
  10332. bold: ""
  10333. })
  10334. ],
  10335. 2
  10336. /* CLASS */
  10337. )) : vue.createCommentVNode("v-if", true),
  10338. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  10339. ],
  10340. 4
  10341. /* STYLE */
  10342. )
  10343. ]),
  10344. _: 3
  10345. /* FORWARDED */
  10346. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  10347. ]);
  10348. }
  10349. const __easycom_7 = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-05c24e9b"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  10350. function pickExclude(obj, keys) {
  10351. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  10352. return {};
  10353. }
  10354. return Object.keys(obj).reduce((prev, key) => {
  10355. if (!keys.includes(key)) {
  10356. prev[key] = obj[key];
  10357. }
  10358. return prev;
  10359. }, {});
  10360. }
  10361. function formatImage(res2) {
  10362. return res2.tempFiles.map((item) => ({
  10363. ...pickExclude(item, ["path"]),
  10364. type: "image",
  10365. url: item.path,
  10366. thumb: item.path,
  10367. size: item.size
  10368. }));
  10369. }
  10370. function formatVideo(res2) {
  10371. return [
  10372. {
  10373. ...pickExclude(res2, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  10374. type: "video",
  10375. url: res2.tempFilePath,
  10376. thumb: res2.thumbTempFilePath,
  10377. size: res2.size
  10378. }
  10379. ];
  10380. }
  10381. function chooseFile({
  10382. accept,
  10383. multiple,
  10384. capture,
  10385. compressed,
  10386. maxDuration,
  10387. sizeType,
  10388. camera,
  10389. maxCount
  10390. }) {
  10391. return new Promise((resolve, reject) => {
  10392. switch (accept) {
  10393. case "image":
  10394. uni.chooseImage({
  10395. count: multiple ? Math.min(maxCount, 9) : 1,
  10396. sourceType: capture,
  10397. sizeType,
  10398. success: (res2) => resolve(formatImage(res2)),
  10399. fail: reject
  10400. });
  10401. break;
  10402. case "video":
  10403. uni.chooseVideo({
  10404. sourceType: capture,
  10405. compressed,
  10406. maxDuration,
  10407. camera,
  10408. success: (res2) => resolve(formatVideo(res2)),
  10409. fail: reject
  10410. });
  10411. break;
  10412. }
  10413. });
  10414. }
  10415. const mixinUp = {
  10416. watch: {
  10417. // 监听accept的变化,判断是否符合个平台要求
  10418. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  10419. accept: {
  10420. immediate: true,
  10421. handler(val) {
  10422. if (val === "all" || val === "media") {
  10423. uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
  10424. }
  10425. if (val === "file") {
  10426. uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  10427. }
  10428. }
  10429. }
  10430. }
  10431. };
  10432. const props$n = {
  10433. props: {
  10434. // 接受的文件类型, 可选值为all media image file video
  10435. accept: {
  10436. type: String,
  10437. default: props$G.upload.accept
  10438. },
  10439. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  10440. capture: {
  10441. type: [String, Array],
  10442. default: props$G.upload.capture
  10443. },
  10444. // 当accept为video时生效,是否压缩视频,默认为true
  10445. compressed: {
  10446. type: Boolean,
  10447. default: props$G.upload.compressed
  10448. },
  10449. // 当accept为video时生效,可选值为back或front
  10450. camera: {
  10451. type: String,
  10452. default: props$G.upload.camera
  10453. },
  10454. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  10455. maxDuration: {
  10456. type: Number,
  10457. default: props$G.upload.maxDuration
  10458. },
  10459. // 上传区域的图标,只能内置图标
  10460. uploadIcon: {
  10461. type: String,
  10462. default: props$G.upload.uploadIcon
  10463. },
  10464. // 上传区域的图标的颜色,默认
  10465. uploadIconColor: {
  10466. type: String,
  10467. default: props$G.upload.uploadIconColor
  10468. },
  10469. // 是否开启文件读取前事件
  10470. useBeforeRead: {
  10471. type: Boolean,
  10472. default: props$G.upload.useBeforeRead
  10473. },
  10474. // 读取后的处理函数
  10475. afterRead: {
  10476. type: Function,
  10477. default: null
  10478. },
  10479. // 读取前的处理函数
  10480. beforeRead: {
  10481. type: Function,
  10482. default: null
  10483. },
  10484. // 是否显示组件自带的图片预览功能
  10485. previewFullImage: {
  10486. type: Boolean,
  10487. default: props$G.upload.previewFullImage
  10488. },
  10489. // 最大上传数量
  10490. maxCount: {
  10491. type: [String, Number],
  10492. default: props$G.upload.maxCount
  10493. },
  10494. // 是否启用
  10495. disabled: {
  10496. type: Boolean,
  10497. default: props$G.upload.disabled
  10498. },
  10499. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  10500. imageMode: {
  10501. type: String,
  10502. default: props$G.upload.imageMode
  10503. },
  10504. // 标识符,可以在回调函数的第二项参数中获取
  10505. name: {
  10506. type: String,
  10507. default: props$G.upload.name
  10508. },
  10509. // 所选的图片的尺寸, 可选值为original compressed
  10510. sizeType: {
  10511. type: Array,
  10512. default: props$G.upload.sizeType
  10513. },
  10514. // 是否开启图片多选,部分安卓机型不支持
  10515. multiple: {
  10516. type: Boolean,
  10517. default: props$G.upload.multiple
  10518. },
  10519. // 是否展示删除按钮
  10520. deletable: {
  10521. type: Boolean,
  10522. default: props$G.upload.deletable
  10523. },
  10524. // 文件大小限制,单位为byte
  10525. maxSize: {
  10526. type: [String, Number],
  10527. default: props$G.upload.maxSize
  10528. },
  10529. // 显示已上传的文件列表
  10530. fileList: {
  10531. type: Array,
  10532. default: props$G.upload.fileList
  10533. },
  10534. // 上传区域的提示文字
  10535. uploadText: {
  10536. type: String,
  10537. default: props$G.upload.uploadText
  10538. },
  10539. // 内部预览图片区域和选择图片按钮的区域宽度
  10540. width: {
  10541. type: [String, Number],
  10542. default: props$G.upload.width
  10543. },
  10544. // 内部预览图片区域和选择图片按钮的区域高度
  10545. height: {
  10546. type: [String, Number],
  10547. default: props$G.upload.height
  10548. },
  10549. // 是否在上传完成后展示预览图
  10550. previewImage: {
  10551. type: Boolean,
  10552. default: props$G.upload.previewImage
  10553. }
  10554. }
  10555. };
  10556. const _sfc_main$1I = {
  10557. name: "u-upload",
  10558. mixins: [mpMixin, mixin, mixinUp, props$n],
  10559. data() {
  10560. return {
  10561. lists: [],
  10562. isInCount: true
  10563. };
  10564. },
  10565. watch: {
  10566. // 监听文件列表的变化,重新整理内部数据
  10567. fileList: {
  10568. immediate: true,
  10569. handler() {
  10570. this.formatFileList();
  10571. },
  10572. immediate: true,
  10573. deep: true
  10574. }
  10575. },
  10576. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
  10577. methods: {
  10578. formatFileList() {
  10579. const {
  10580. fileList = [],
  10581. maxCount
  10582. } = this;
  10583. const lists = fileList.map(
  10584. (item) => Object.assign(Object.assign({}, item), {
  10585. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  10586. isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
  10587. isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
  10588. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  10589. })
  10590. );
  10591. this.lists = lists;
  10592. this.isInCount = lists.length < maxCount;
  10593. },
  10594. chooseFile() {
  10595. const {
  10596. maxCount,
  10597. multiple,
  10598. lists,
  10599. disabled
  10600. } = this;
  10601. if (disabled)
  10602. return;
  10603. let capture;
  10604. try {
  10605. capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
  10606. } catch (e) {
  10607. capture = [];
  10608. }
  10609. chooseFile(
  10610. Object.assign({
  10611. accept: this.accept,
  10612. multiple: this.multiple,
  10613. capture,
  10614. compressed: this.compressed,
  10615. maxDuration: this.maxDuration,
  10616. sizeType: this.sizeType,
  10617. camera: this.camera
  10618. }, {
  10619. maxCount: maxCount - lists.length
  10620. })
  10621. ).then((res2) => {
  10622. this.onBeforeRead(multiple ? res2 : res2[0]);
  10623. }).catch((error2) => {
  10624. this.$emit("error", error2);
  10625. });
  10626. },
  10627. // 文件读取之前
  10628. onBeforeRead(file) {
  10629. const {
  10630. beforeRead,
  10631. useBeforeRead
  10632. } = this;
  10633. let res2 = true;
  10634. if (uni.$u.test.func(beforeRead)) {
  10635. res2 = beforeRead(file, this.getDetail());
  10636. }
  10637. if (useBeforeRead) {
  10638. res2 = new Promise((resolve, reject) => {
  10639. this.$emit(
  10640. "beforeRead",
  10641. Object.assign(Object.assign({
  10642. file
  10643. }, this.getDetail()), {
  10644. callback: (ok) => {
  10645. ok ? resolve() : reject();
  10646. }
  10647. })
  10648. );
  10649. });
  10650. }
  10651. if (!res2) {
  10652. return;
  10653. }
  10654. if (uni.$u.test.promise(res2)) {
  10655. res2.then((data) => this.onAfterRead(data || file));
  10656. } else {
  10657. this.onAfterRead(file);
  10658. }
  10659. },
  10660. getDetail(index2) {
  10661. return {
  10662. name: this.name,
  10663. index: index2 == null ? this.fileList.length : index2
  10664. };
  10665. },
  10666. onAfterRead(file) {
  10667. const {
  10668. maxSize,
  10669. afterRead
  10670. } = this;
  10671. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  10672. if (oversize) {
  10673. this.$emit("oversize", Object.assign({
  10674. file
  10675. }, this.getDetail()));
  10676. return;
  10677. }
  10678. if (typeof afterRead === "function") {
  10679. afterRead(file, this.getDetail());
  10680. }
  10681. this.$emit("afterRead", Object.assign({
  10682. file
  10683. }, this.getDetail()));
  10684. },
  10685. deleteItem(index2) {
  10686. this.$emit(
  10687. "delete",
  10688. Object.assign(Object.assign({}, this.getDetail(index2)), {
  10689. file: this.fileList[index2]
  10690. })
  10691. );
  10692. },
  10693. // 预览图片
  10694. onPreviewImage(item) {
  10695. if (!item.isImage || !this.previewFullImage)
  10696. return;
  10697. uni.previewImage({
  10698. // 先filter找出为图片的item,再返回filter结果中的图片url
  10699. urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
  10700. current: item.url || item.thumb,
  10701. fail() {
  10702. uni.$u.toast("预览图片失败");
  10703. }
  10704. });
  10705. },
  10706. onPreviewVideo(event) {
  10707. if (!this.data.previewFullImage)
  10708. return;
  10709. const {
  10710. index: index2
  10711. } = event.currentTarget.dataset;
  10712. const {
  10713. lists
  10714. } = this.data;
  10715. wx.previewMedia({
  10716. sources: lists.filter((item) => isVideoFile(item)).map(
  10717. (item) => Object.assign(Object.assign({}, item), {
  10718. type: "video"
  10719. })
  10720. ),
  10721. current: index2,
  10722. fail() {
  10723. uni.$u.toast("预览视频失败");
  10724. }
  10725. });
  10726. },
  10727. onClickPreview(event) {
  10728. const {
  10729. index: index2
  10730. } = event.currentTarget.dataset;
  10731. const item = this.data.lists[index2];
  10732. this.$emit(
  10733. "clickPreview",
  10734. Object.assign(Object.assign({}, item), this.getDetail(index2))
  10735. );
  10736. }
  10737. }
  10738. };
  10739. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  10740. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  10741. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  10742. return vue.openBlock(), vue.createElementBlock(
  10743. "view",
  10744. {
  10745. class: "u-upload",
  10746. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  10747. },
  10748. [
  10749. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  10750. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  10751. vue.Fragment,
  10752. { key: 0 },
  10753. vue.renderList($data.lists, (item, index2) => {
  10754. return vue.openBlock(), vue.createElementBlock("view", {
  10755. class: "u-upload__wrap__preview",
  10756. key: index2
  10757. }, [
  10758. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  10759. key: 0,
  10760. src: item.thumb || item.url,
  10761. mode: _ctx.imageMode,
  10762. class: "u-upload__wrap__preview__image",
  10763. onClick: ($event) => $options.onPreviewImage(item),
  10764. style: vue.normalizeStyle([{
  10765. width: _ctx.$u.addUnit(_ctx.width),
  10766. height: _ctx.$u.addUnit(_ctx.height)
  10767. }])
  10768. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10769. key: 1,
  10770. class: "u-upload__wrap__preview__other"
  10771. }, [
  10772. vue.createVNode(_component_u_icon, {
  10773. color: "#80CBF9",
  10774. size: "26",
  10775. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  10776. }, null, 8, ["name"]),
  10777. vue.createElementVNode(
  10778. "text",
  10779. { class: "u-upload__wrap__preview__other__text" },
  10780. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
  10781. 1
  10782. /* TEXT */
  10783. )
  10784. ])),
  10785. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  10786. key: 2,
  10787. class: "u-upload__status"
  10788. }, [
  10789. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  10790. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  10791. key: 0,
  10792. name: "close-circle",
  10793. color: "#ffffff",
  10794. size: "25"
  10795. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  10796. key: 1,
  10797. size: "22",
  10798. mode: "circle",
  10799. color: "#ffffff"
  10800. }))
  10801. ]),
  10802. item.message ? (vue.openBlock(), vue.createElementBlock(
  10803. "text",
  10804. {
  10805. key: 0,
  10806. class: "u-upload__status__message"
  10807. },
  10808. vue.toDisplayString(item.message),
  10809. 1
  10810. /* TEXT */
  10811. )) : vue.createCommentVNode("v-if", true)
  10812. ])) : vue.createCommentVNode("v-if", true),
  10813. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  10814. key: 3,
  10815. class: "u-upload__deletable",
  10816. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  10817. }, [
  10818. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  10819. vue.createVNode(_component_u_icon, {
  10820. name: "close",
  10821. color: "#ffffff",
  10822. size: "10"
  10823. })
  10824. ])
  10825. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  10826. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  10827. key: 4,
  10828. class: "u-upload__success"
  10829. }, [
  10830. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  10831. vue.createVNode(_component_u_icon, {
  10832. name: "checkmark",
  10833. color: "#ffffff",
  10834. size: "12"
  10835. })
  10836. ])
  10837. ])) : vue.createCommentVNode("v-if", true)
  10838. ]);
  10839. }),
  10840. 128
  10841. /* KEYED_FRAGMENT */
  10842. )) : vue.createCommentVNode("v-if", true),
  10843. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  10844. vue.Fragment,
  10845. { key: 1 },
  10846. [
  10847. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  10848. key: 0,
  10849. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  10850. }, [
  10851. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10852. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  10853. key: 1,
  10854. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  10855. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  10856. "hover-stay-time": "150",
  10857. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  10858. style: vue.normalizeStyle([{
  10859. width: _ctx.$u.addUnit(_ctx.width),
  10860. height: _ctx.$u.addUnit(_ctx.height)
  10861. }])
  10862. }, [
  10863. vue.createVNode(_component_u_icon, {
  10864. name: _ctx.uploadIcon,
  10865. size: "26",
  10866. color: _ctx.uploadIconColor
  10867. }, null, 8, ["name", "color"]),
  10868. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  10869. "text",
  10870. {
  10871. key: 0,
  10872. class: "u-upload__button__text"
  10873. },
  10874. vue.toDisplayString(_ctx.uploadText),
  10875. 1
  10876. /* TEXT */
  10877. )) : vue.createCommentVNode("v-if", true)
  10878. ], 14, ["hover-class"]))
  10879. ],
  10880. 64
  10881. /* STABLE_FRAGMENT */
  10882. )) : vue.createCommentVNode("v-if", true)
  10883. ])
  10884. ],
  10885. 4
  10886. /* STYLE */
  10887. );
  10888. }
  10889. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-c8491d64"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  10890. const baseUrl = "https://bpi.shuhi.com";
  10891. function initRequest() {
  10892. formatAppLog("log", "at config/request.js:6", "初始化了 http 请求代码");
  10893. uni.$u.http.setConfig((config2) => {
  10894. config2.baseURL = baseUrl;
  10895. config2.custom.toast = true;
  10896. config2.sslVerify = false;
  10897. return config2;
  10898. });
  10899. uni.$u.http.interceptors.request.use(
  10900. (config2) => {
  10901. config2.data = config2.data || {};
  10902. let token = uni.getStorageSync("token");
  10903. config2.header.Authorization = token ? `Bearer ${token}` : "";
  10904. return config2;
  10905. },
  10906. (config2) => {
  10907. return Promise.reject(config2);
  10908. }
  10909. );
  10910. uni.$u.http.interceptors.response.use(
  10911. (response) => {
  10912. var _a;
  10913. const data = response.data;
  10914. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  10915. if (data.code !== 200) {
  10916. if (data.code === 401) {
  10917. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  10918. uni.removeStorageSync("token");
  10919. setTimeout(() => {
  10920. uni.$u.route({
  10921. type: "reLaunch",
  10922. url: "/pages/login/login"
  10923. // 跳转到登录页
  10924. });
  10925. }, 1e3);
  10926. } else {
  10927. if (custom.toast !== false) {
  10928. uni.$u.toast(data.msg);
  10929. }
  10930. return data;
  10931. }
  10932. }
  10933. return data;
  10934. },
  10935. (response) => {
  10936. return Promise.reject(response);
  10937. }
  10938. );
  10939. }
  10940. const _sfc_main$1H = {
  10941. __name: "index",
  10942. props: {
  10943. filename: {
  10944. type: [Array, String],
  10945. default: () => []
  10946. },
  10947. url: {
  10948. type: String
  10949. },
  10950. notFile: {
  10951. type: Boolean,
  10952. default: false
  10953. },
  10954. tips: {
  10955. type: String
  10956. },
  10957. disabled: {
  10958. type: Boolean,
  10959. default: false
  10960. },
  10961. isUpdate: {
  10962. type: Boolean,
  10963. default: false
  10964. },
  10965. loading: {
  10966. type: Boolean,
  10967. default: false
  10968. }
  10969. },
  10970. emits: ["update:filename", "update:keyValue", "success", "update:loading"],
  10971. setup(__props, { expose: __expose, emit: __emit }) {
  10972. __expose();
  10973. const emit2 = __emit;
  10974. const props2 = __props;
  10975. const fileList = vue.ref([]);
  10976. vue.watch(() => props2.filename, (filename) => {
  10977. if (!filename)
  10978. return fileList.value = [];
  10979. if (typeof filename == "string") {
  10980. fileList.value = filename.split(",").map((v) => ({
  10981. url: baseUrl + v
  10982. }));
  10983. } else {
  10984. fileList.value = filename && filename.length > 0 ? filename.map((v) => ({
  10985. url: v.url || v
  10986. })) : [];
  10987. }
  10988. }, {
  10989. immediate: true,
  10990. deep: true
  10991. });
  10992. const afterRead = async (e) => {
  10993. const {
  10994. file
  10995. } = e;
  10996. fileList.value.push({
  10997. ...file,
  10998. status: "uploading",
  10999. message: "上传中..."
  11000. });
  11001. emit2("update:loading", true);
  11002. const result = await uploadFilePromise(file.url);
  11003. formatAppLog("log", "at components/cy-upload/index.vue:73", result, "result");
  11004. fileList.value.forEach((v, index2) => {
  11005. if (index2 == fileList.value.length - 1) {
  11006. v.url = result.url;
  11007. v.status = "success";
  11008. v.message = "";
  11009. }
  11010. });
  11011. formatAppLog("log", "at components/cy-upload/index.vue:82", fileList.value, "fileList.value");
  11012. emit2("update:filename", fileList.value.map((v) => v.url));
  11013. emit2("success", result);
  11014. emit2("update:loading", false);
  11015. };
  11016. const deletePic = (event) => {
  11017. fileList.value.splice(event.index, 1);
  11018. };
  11019. const uploadFilePromise = (url2, baseStr = "/app/common/upload") => {
  11020. let token = uni.getStorageSync("token");
  11021. return new Promise((resolve, reject) => {
  11022. uni.uploadFile({
  11023. url: baseUrl + baseStr,
  11024. // 图片上传地址
  11025. filePath: url2,
  11026. name: "file",
  11027. header: {
  11028. "Authorization": token
  11029. },
  11030. success: (res2) => {
  11031. let respic = JSON.parse(res2.data);
  11032. resolve(respic);
  11033. }
  11034. });
  11035. });
  11036. };
  11037. const __returned__ = { emit: emit2, props: props2, fileList, afterRead, deletePic, uploadFilePromise, watch: vue.watch, ref: vue.ref, get baseUrl() {
  11038. return baseUrl;
  11039. } };
  11040. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11041. return __returned__;
  11042. }
  11043. };
  11044. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  11045. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$7);
  11046. return vue.openBlock(), vue.createElementBlock(
  11047. vue.Fragment,
  11048. null,
  11049. [
  11050. vue.createVNode(_component_u_upload, vue.mergeProps(_ctx.$attrs, {
  11051. fileList: $setup.fileList,
  11052. onAfterRead: $setup.afterRead,
  11053. onDelete: $setup.deletePic,
  11054. notFile: $props.notFile,
  11055. disabled: $props.disabled
  11056. }), null, 16, ["fileList", "notFile", "disabled"]),
  11057. $props.tips ? (vue.openBlock(), vue.createElementBlock(
  11058. "view",
  11059. {
  11060. key: 0,
  11061. class: "tips"
  11062. },
  11063. vue.toDisplayString($props.tips),
  11064. 1
  11065. /* TEXT */
  11066. )) : vue.createCommentVNode("v-if", true)
  11067. ],
  11068. 64
  11069. /* STABLE_FRAGMENT */
  11070. );
  11071. }
  11072. const cyUpload = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-5002576b"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/components/cy-upload/index.vue"]]);
  11073. const _sfc_main$1G = {
  11074. __name: "feedbackPopup",
  11075. emits: ["submit"],
  11076. setup(__props, { expose: __expose, emit: __emit }) {
  11077. const show = vue.ref(false);
  11078. const emit2 = __emit;
  11079. const formRef = vue.ref(null);
  11080. const submitting = vue.ref(false);
  11081. const loading = vue.ref(false);
  11082. const formData = vue.reactive({
  11083. feedbackContent: "",
  11084. imgUrl: [],
  11085. isbn: ""
  11086. });
  11087. const rules2 = {
  11088. feedbackContent: [
  11089. {
  11090. required: true,
  11091. message: "请输入反馈信息",
  11092. trigger: ["blur", "change"]
  11093. }
  11094. ]
  11095. };
  11096. function open2(data) {
  11097. show.value = true;
  11098. formData.isbn = data.isbn;
  11099. }
  11100. function handleCancel() {
  11101. resetForm();
  11102. show.value = false;
  11103. }
  11104. async function handleConfirm() {
  11105. var _a;
  11106. (_a = formRef.value) == null ? void 0 : _a.validate().then((res2) => {
  11107. submitting.value = true;
  11108. let data = JSON.parse(JSON.stringify(formData));
  11109. data.imgUrl = data.imgUrl.join(",");
  11110. uni.$u.http.post("/app/feedback/add", data).then((res3) => {
  11111. if (res3.code == 200) {
  11112. uni.showToast({
  11113. title: "反馈已提交",
  11114. icon: "success"
  11115. });
  11116. emit2("submit", formData);
  11117. show.value = false;
  11118. } else {
  11119. uni.$u.toast(res3.msg);
  11120. }
  11121. }).finally(() => {
  11122. submitting.value = false;
  11123. });
  11124. });
  11125. }
  11126. function resetForm() {
  11127. var _a;
  11128. formData.feedbackContent = "";
  11129. formData.imgUrl = "";
  11130. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  11131. }
  11132. __expose({
  11133. open: open2
  11134. });
  11135. const __returned__ = { show, emit: emit2, formRef, submitting, loading, formData, rules: rules2, open: open2, handleCancel, handleConfirm, resetForm, cyUpload, ref: vue.ref, reactive: vue.reactive };
  11136. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11137. return __returned__;
  11138. }
  11139. };
  11140. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  11141. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  11142. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  11143. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  11144. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  11145. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11146. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11147. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11148. mode: "center",
  11149. show: $setup.show,
  11150. onClose: $setup.handleCancel,
  11151. closeOnClickOverlay: false
  11152. }, {
  11153. default: vue.withCtx(() => [
  11154. vue.createElementVNode("view", { class: "popup-container" }, [
  11155. vue.createVNode(_component_u_form, {
  11156. ref: "formRef",
  11157. model: $setup.formData,
  11158. rules: $setup.rules,
  11159. labelPosition: "top",
  11160. labelWidth: "100%",
  11161. "error-type": "toast"
  11162. }, {
  11163. default: vue.withCtx(() => [
  11164. vue.createCommentVNode(" 反馈信息 "),
  11165. vue.createVNode(_component_u_form_item, {
  11166. label: "反馈图书信息",
  11167. prop: "feedbackContent",
  11168. borderBottom: true
  11169. }, {
  11170. default: vue.withCtx(() => [
  11171. vue.createVNode(_component_u_input, {
  11172. modelValue: $setup.formData.feedbackContent,
  11173. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackContent = $event),
  11174. type: "textarea",
  11175. placeholder: "请输入反馈信息",
  11176. height: "100"
  11177. }, null, 8, ["modelValue"])
  11178. ]),
  11179. _: 1
  11180. /* STABLE */
  11181. }),
  11182. vue.createCommentVNode(" 图片上传 "),
  11183. vue.createVNode(_component_u_form_item, {
  11184. label: "上传照片",
  11185. prop: "imgUrl",
  11186. borderBottom: false
  11187. }, {
  11188. default: vue.withCtx(() => [
  11189. vue.createVNode($setup["cyUpload"], {
  11190. filename: $setup.formData.imgUrl,
  11191. "onUpdate:filename": _cache[1] || (_cache[1] = ($event) => $setup.formData.imgUrl = $event),
  11192. multiple: "",
  11193. maxCount: 4,
  11194. loading: $setup.loading
  11195. }, {
  11196. default: vue.withCtx(() => [
  11197. vue.createElementVNode("view", { class: "upload-slot" }, [
  11198. vue.createVNode(_component_u_icon, {
  11199. name: "plus",
  11200. size: "30"
  11201. }),
  11202. vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
  11203. ])
  11204. ]),
  11205. _: 1
  11206. /* STABLE */
  11207. }, 8, ["filename", "loading"])
  11208. ]),
  11209. _: 1
  11210. /* STABLE */
  11211. })
  11212. ]),
  11213. _: 1
  11214. /* STABLE */
  11215. }, 8, ["model"]),
  11216. vue.createCommentVNode(" 按钮组 "),
  11217. vue.createElementVNode("view", { class: "button-group" }, [
  11218. vue.createVNode(_component_u_button, {
  11219. type: "info",
  11220. text: "取消",
  11221. plain: true,
  11222. onClick: $setup.handleCancel,
  11223. disabled: $setup.submitting
  11224. }, null, 8, ["disabled"]),
  11225. vue.createVNode(_component_u_button, {
  11226. type: "primary",
  11227. text: "确认",
  11228. onClick: $setup.handleConfirm,
  11229. loading: $setup.submitting,
  11230. disabled: $setup.loading
  11231. }, null, 8, ["loading", "disabled"])
  11232. ])
  11233. ])
  11234. ]),
  11235. _: 1
  11236. /* STABLE */
  11237. }, 8, ["show"]);
  11238. }
  11239. const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__scopeId", "data-v-0265fb8a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/book/components/feedbackPopup.vue"]]);
  11240. const _sfc_main$1F = {
  11241. __name: "index",
  11242. setup(__props, { expose: __expose }) {
  11243. __expose();
  11244. const showFeedback = vue.ref(null);
  11245. function handleFeedbackSubmit(data) {
  11246. formatAppLog("log", "at pages/book/index.vue:49", "反馈数据:", data);
  11247. }
  11248. const searchText = vue.ref("");
  11249. const bookList = vue.ref([]);
  11250. async function handleSearch() {
  11251. if (!searchText.value) {
  11252. uni.showToast({
  11253. title: "请输入ISBN",
  11254. icon: "none"
  11255. });
  11256. return;
  11257. }
  11258. await getSimpleBookInfoByIsbn(searchText.value);
  11259. }
  11260. async function getSimpleBookInfoByIsbn(isbn) {
  11261. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  11262. if (res2.code == 200) {
  11263. let bool = bookList.value.some((v) => v.isbn == isbn);
  11264. if (!bool) {
  11265. bookList.value.push(res2.data);
  11266. }
  11267. } else {
  11268. uni.$u.toast(res2.msg);
  11269. }
  11270. });
  11271. }
  11272. function scanCode() {
  11273. uni.scanCode({
  11274. scanType: ["barCode"],
  11275. success: (res2) => {
  11276. searchText.value = res2.result;
  11277. getSimpleBookInfoByIsbn(res2.result);
  11278. },
  11279. fail: () => {
  11280. uni.showToast({
  11281. title: "扫码失败",
  11282. icon: "none"
  11283. });
  11284. }
  11285. });
  11286. }
  11287. function editBook(book) {
  11288. var _a;
  11289. (_a = showFeedback.value) == null ? void 0 : _a.open(book);
  11290. }
  11291. onLoad(() => {
  11292. uni.$u.useGlobalEvent((e) => {
  11293. if (!e.barcode)
  11294. return;
  11295. getSimpleBookInfoByIsbn(e.barcode);
  11296. });
  11297. });
  11298. onShow(() => {
  11299. uni.$u.updateActivePageOnShow();
  11300. });
  11301. onUnload(() => {
  11302. uni.$u.cleanupOnPageUnload();
  11303. });
  11304. const __returned__ = { showFeedback, handleFeedbackSubmit, searchText, bookList, handleSearch, getSimpleBookInfoByIsbn, scanCode, editBook, ref: vue.ref, computed: vue.computed, get onLoad() {
  11305. return onLoad;
  11306. }, get onShow() {
  11307. return onShow;
  11308. }, get onUnload() {
  11309. return onUnload;
  11310. }, FeedbackPopup };
  11311. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11312. return __returned__;
  11313. }
  11314. };
  11315. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  11316. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  11317. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  11318. return vue.openBlock(), vue.createElementBlock("view", {
  11319. class: "book-list",
  11320. style: { "padding": "0" }
  11321. }, [
  11322. vue.createCommentVNode(" 搜索框 "),
  11323. vue.createElementVNode("view", { class: "search-header" }, [
  11324. vue.createElementVNode("view", { class: "search-box" }, [
  11325. vue.createVNode(_component_u_icon, {
  11326. style: { "margin-right": "16rpx" },
  11327. name: "scan",
  11328. size: "30",
  11329. color: "#ffffff",
  11330. onClick: $setup.scanCode
  11331. }),
  11332. vue.createVNode(_component_u_search, {
  11333. height: "80rpx",
  11334. modelValue: $setup.searchText,
  11335. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  11336. placeholder: "请输入ISBN",
  11337. showAction: false,
  11338. clearabled: true,
  11339. onSearch: $setup.handleSearch,
  11340. bgColor: "#ffffff"
  11341. }, null, 8, ["modelValue"])
  11342. ])
  11343. ]),
  11344. vue.createCommentVNode(" 搜索结果列表 "),
  11345. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11346. key: 0,
  11347. class: "book-list"
  11348. }, [
  11349. (vue.openBlock(true), vue.createElementBlock(
  11350. vue.Fragment,
  11351. null,
  11352. vue.renderList($setup.bookList, (book, index2) => {
  11353. return vue.openBlock(), vue.createElementBlock("view", {
  11354. class: "book-item",
  11355. key: index2
  11356. }, [
  11357. vue.createElementVNode("view", { class: "book-info" }, [
  11358. vue.createElementVNode("image", {
  11359. class: "book-image",
  11360. src: book.cover,
  11361. mode: "aspectFill"
  11362. }, null, 8, ["src"]),
  11363. vue.createElementVNode("view", { class: "book-details" }, [
  11364. vue.createElementVNode(
  11365. "text",
  11366. { class: "book-title" },
  11367. vue.toDisplayString(book.bookName),
  11368. 1
  11369. /* TEXT */
  11370. ),
  11371. vue.createElementVNode(
  11372. "text",
  11373. { class: "book-isbn" },
  11374. "ISBN: " + vue.toDisplayString(book.isbn),
  11375. 1
  11376. /* TEXT */
  11377. ),
  11378. vue.createElementVNode(
  11379. "text",
  11380. { class: "book-price" },
  11381. "定价: " + vue.toDisplayString(book.price),
  11382. 1
  11383. /* TEXT */
  11384. ),
  11385. vue.createElementVNode(
  11386. "text",
  11387. { class: "book-set" },
  11388. "套装: " + vue.toDisplayString(book.suit == 1 ? "是" : "否"),
  11389. 1
  11390. /* TEXT */
  11391. )
  11392. ])
  11393. ]),
  11394. vue.createElementVNode("view", { class: "book-action" }, [
  11395. vue.createVNode(_component_u_icon, {
  11396. name: "edit-pen",
  11397. size: "30",
  11398. color: "#4cd964",
  11399. onClick: ($event) => $setup.editBook(book)
  11400. }, null, 8, ["onClick"])
  11401. ])
  11402. ]);
  11403. }),
  11404. 128
  11405. /* KEYED_FRAGMENT */
  11406. ))
  11407. ])) : vue.createCommentVNode("v-if", true),
  11408. vue.createVNode(
  11409. $setup["FeedbackPopup"],
  11410. {
  11411. ref: "showFeedback",
  11412. onSubmit: $setup.handleFeedbackSubmit
  11413. },
  11414. null,
  11415. 512
  11416. /* NEED_PATCH */
  11417. )
  11418. ]);
  11419. }
  11420. const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-0452ab4c"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/book/index.vue"]]);
  11421. const props$m = {
  11422. props: {
  11423. // 标签类型info、primary、success、warning、error
  11424. type: {
  11425. type: String,
  11426. default: props$G.tag.type
  11427. },
  11428. // 不可用
  11429. disabled: {
  11430. type: [Boolean, String],
  11431. default: props$G.tag.disabled
  11432. },
  11433. // 标签的大小,large,medium,mini
  11434. size: {
  11435. type: String,
  11436. default: props$G.tag.size
  11437. },
  11438. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  11439. shape: {
  11440. type: String,
  11441. default: props$G.tag.shape
  11442. },
  11443. // 标签文字
  11444. text: {
  11445. type: [String, Number],
  11446. default: props$G.tag.text
  11447. },
  11448. // 背景颜色,默认为空字符串,即不处理
  11449. bgColor: {
  11450. type: String,
  11451. default: props$G.tag.bgColor
  11452. },
  11453. // 标签字体颜色,默认为空字符串,即不处理
  11454. color: {
  11455. type: String,
  11456. default: props$G.tag.color
  11457. },
  11458. // 标签的边框颜色
  11459. borderColor: {
  11460. type: String,
  11461. default: props$G.tag.borderColor
  11462. },
  11463. // 关闭按钮图标的颜色
  11464. closeColor: {
  11465. type: String,
  11466. default: props$G.tag.closeColor
  11467. },
  11468. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  11469. name: {
  11470. type: [String, Number],
  11471. default: props$G.tag.name
  11472. },
  11473. // // 模式选择,dark|light|plain
  11474. // mode: {
  11475. // type: String,
  11476. // default: 'light'
  11477. // },
  11478. // 镂空时是否填充背景色
  11479. plainFill: {
  11480. type: Boolean,
  11481. default: props$G.tag.plainFill
  11482. },
  11483. // 是否镂空
  11484. plain: {
  11485. type: Boolean,
  11486. default: props$G.tag.plain
  11487. },
  11488. // 是否可关闭
  11489. closable: {
  11490. type: Boolean,
  11491. default: props$G.tag.closable
  11492. },
  11493. // 是否显示
  11494. show: {
  11495. type: Boolean,
  11496. default: props$G.tag.show
  11497. },
  11498. // 内置图标,或绝对路径的图片
  11499. icon: {
  11500. type: String,
  11501. default: props$G.tag.icon
  11502. }
  11503. }
  11504. };
  11505. const _sfc_main$1E = {
  11506. name: "u-tag",
  11507. mixins: [mpMixin, mixin, props$m],
  11508. data() {
  11509. return {};
  11510. },
  11511. computed: {
  11512. style() {
  11513. const style = {};
  11514. if (this.bgColor) {
  11515. style.backgroundColor = this.bgColor;
  11516. }
  11517. if (this.color) {
  11518. style.color = this.color;
  11519. }
  11520. if (this.borderColor) {
  11521. style.borderColor = this.borderColor;
  11522. }
  11523. return style;
  11524. },
  11525. // nvue下,文本颜色无法继承父元素
  11526. textColor() {
  11527. const style = {};
  11528. if (this.color) {
  11529. style.color = this.color;
  11530. }
  11531. return style;
  11532. },
  11533. imgStyle() {
  11534. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  11535. return {
  11536. width,
  11537. height: width
  11538. };
  11539. },
  11540. // 文本的样式
  11541. closeSize() {
  11542. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  11543. return size;
  11544. },
  11545. // 图标大小
  11546. iconSize() {
  11547. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  11548. return size;
  11549. },
  11550. // 图标颜色
  11551. elIconColor() {
  11552. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  11553. }
  11554. },
  11555. methods: {
  11556. // 点击关闭按钮
  11557. closeHandler() {
  11558. this.$emit("close", this.name);
  11559. },
  11560. // 点击标签
  11561. clickHandler() {
  11562. this.$emit("click", this.name);
  11563. }
  11564. }
  11565. };
  11566. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  11567. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  11568. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  11569. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  11570. mode: "fade",
  11571. show: _ctx.show,
  11572. style: { "display": "inline-flex" }
  11573. }, {
  11574. default: vue.withCtx(() => [
  11575. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  11576. vue.createElementVNode(
  11577. "view",
  11578. {
  11579. class: vue.normalizeClass(["u-tag", [`u-tag--${_ctx.shape}`, !_ctx.plain && `u-tag--${_ctx.type}`, _ctx.plain && `u-tag--${_ctx.type}--plain`, `u-tag--${_ctx.size}`, _ctx.plain && _ctx.plainFill && `u-tag--${_ctx.type}--plain--fill`]]),
  11580. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  11581. style: vue.normalizeStyle([{
  11582. marginRight: _ctx.closable ? "10px" : 0,
  11583. marginTop: _ctx.closable ? "10px" : 0
  11584. }, $options.style])
  11585. },
  11586. [
  11587. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  11588. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  11589. key: 0,
  11590. class: "u-tag__icon"
  11591. }, [
  11592. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  11593. key: 0,
  11594. src: _ctx.icon,
  11595. style: vue.normalizeStyle([$options.imgStyle])
  11596. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  11597. key: 1,
  11598. color: $options.elIconColor,
  11599. name: _ctx.icon,
  11600. size: $options.iconSize
  11601. }, null, 8, ["color", "name", "size"]))
  11602. ])) : vue.createCommentVNode("v-if", true)
  11603. ], true),
  11604. vue.createElementVNode(
  11605. "text",
  11606. {
  11607. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  11608. style: vue.normalizeStyle([$options.textColor])
  11609. },
  11610. vue.toDisplayString(_ctx.text),
  11611. 7
  11612. /* TEXT, CLASS, STYLE */
  11613. )
  11614. ],
  11615. 6
  11616. /* CLASS, STYLE */
  11617. ),
  11618. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  11619. "view",
  11620. {
  11621. key: 0,
  11622. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  11623. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  11624. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  11625. },
  11626. [
  11627. vue.createVNode(_component_u_icon, {
  11628. name: "close",
  11629. size: $options.closeSize,
  11630. color: "#ffffff"
  11631. }, null, 8, ["size"])
  11632. ],
  11633. 6
  11634. /* CLASS, STYLE */
  11635. )) : vue.createCommentVNode("v-if", true)
  11636. ])
  11637. ]),
  11638. _: 3
  11639. /* FORWARDED */
  11640. }, 8, ["show"]);
  11641. }
  11642. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-2fd891bb"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  11643. const _sfc_main$1D = {
  11644. __name: "WarehouseSelector",
  11645. props: {
  11646. show: {
  11647. type: Boolean,
  11648. default: false
  11649. }
  11650. },
  11651. emits: ["update:show", "warehouse-selected"],
  11652. setup(__props, { expose: __expose, emit: __emit }) {
  11653. __expose();
  11654. const props2 = __props;
  11655. const emit2 = __emit;
  11656. const searchKeyword = vue.ref("");
  11657. const searchResults = vue.ref([]);
  11658. const historyWarehouses = vue.ref([""]);
  11659. const selectedWarehouse = vue.ref("");
  11660. const warehouseSearch = (name) => {
  11661. formatAppLog("log", "at pages/index/express/components/WarehouseSelector.vue:68", name);
  11662. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  11663. if (res2.code == 200) {
  11664. searchResults.value = res2.data;
  11665. }
  11666. });
  11667. };
  11668. const getUserBindHistory = () => {
  11669. uni.$u.http.get("/app/appUser/getUserBindGodownReocrd").then((res2) => {
  11670. if (res2.code == 200) {
  11671. historyWarehouses.value = res2.data;
  11672. }
  11673. });
  11674. };
  11675. getUserBindHistory();
  11676. const handleSearch = () => {
  11677. warehouseSearch(searchKeyword.value);
  11678. };
  11679. const selectItem = vue.ref({});
  11680. const selectWarehouse = (item) => {
  11681. selectedWarehouse.value = item.godownName;
  11682. selectItem.value = item;
  11683. };
  11684. const handleClose = () => {
  11685. emit2("update:show", false);
  11686. searchKeyword.value = "";
  11687. };
  11688. const handleConfirm = () => {
  11689. if (selectedWarehouse.value) {
  11690. emit2("warehouse-selected", selectItem.value);
  11691. handleClose();
  11692. }
  11693. };
  11694. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, warehouseSearch, getUserBindHistory, handleSearch, selectItem, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
  11695. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11696. return __returned__;
  11697. }
  11698. };
  11699. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  11700. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  11701. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  11702. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11703. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11704. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11705. show: $props.show,
  11706. onClose: $setup.handleClose,
  11707. mode: "bottom",
  11708. round: "10"
  11709. }, {
  11710. default: vue.withCtx(() => [
  11711. vue.createElementVNode("view", { class: "warehouse-selector" }, [
  11712. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  11713. vue.createCommentVNode(" 标题 "),
  11714. vue.createElementVNode("view", { class: "header" }, [
  11715. vue.createElementVNode("text", { class: "title" }, "绑定仓库")
  11716. ]),
  11717. vue.createCommentVNode(" 搜索框 "),
  11718. vue.createElementVNode("view", { class: "search-box" }, [
  11719. vue.createVNode(_component_u_search, {
  11720. inputStyle: { "height": "80rpx", "font-size": "16px" },
  11721. actionStyle: { "font-size": "16px", color: "#22ac38" },
  11722. modelValue: $setup.searchKeyword,
  11723. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  11724. placeholder: "搜索仓库",
  11725. "show-action": true,
  11726. "action-text": "搜索",
  11727. onSearch: $setup.handleSearch,
  11728. onCustom: $setup.handleSearch
  11729. }, null, 8, ["modelValue"])
  11730. ]),
  11731. vue.createCommentVNode(" 搜索结果 "),
  11732. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11733. key: 0,
  11734. class: "search-result"
  11735. }, [
  11736. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  11737. vue.createElementVNode("view", { class: "tag-group" }, [
  11738. (vue.openBlock(true), vue.createElementBlock(
  11739. vue.Fragment,
  11740. null,
  11741. vue.renderList($setup.searchResults, (item) => {
  11742. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11743. key: item,
  11744. text: item.godownName,
  11745. plain: $setup.selectedWarehouse !== item.godownName,
  11746. shape: "circle",
  11747. onClick: ($event) => $setup.selectWarehouse(item),
  11748. size: "large"
  11749. }, null, 8, ["text", "plain", "onClick"]);
  11750. }),
  11751. 128
  11752. /* KEYED_FRAGMENT */
  11753. ))
  11754. ])
  11755. ])) : vue.createCommentVNode("v-if", true),
  11756. vue.createCommentVNode(" 历史绑定 "),
  11757. $setup.historyWarehouses.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11758. key: 1,
  11759. class: "history-section"
  11760. }, [
  11761. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  11762. vue.createElementVNode("view", { class: "tag-group" }, [
  11763. (vue.openBlock(true), vue.createElementBlock(
  11764. vue.Fragment,
  11765. null,
  11766. vue.renderList($setup.historyWarehouses, (item) => {
  11767. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11768. key: item,
  11769. text: item,
  11770. plain: $setup.selectedWarehouse !== item.godownName,
  11771. shape: "circle",
  11772. onClick: ($event) => $setup.selectWarehouse(item),
  11773. size: "large"
  11774. }, null, 8, ["text", "plain", "onClick"]);
  11775. }),
  11776. 128
  11777. /* KEYED_FRAGMENT */
  11778. ))
  11779. ])
  11780. ])) : vue.createCommentVNode("v-if", true)
  11781. ]),
  11782. vue.createCommentVNode(" 底部按钮 "),
  11783. vue.createElementVNode("view", { class: "footer" }, [
  11784. vue.createVNode(_component_u_button, {
  11785. onClick: $setup.handleClose,
  11786. text: "取消",
  11787. plain: "",
  11788. shape: "circle"
  11789. }),
  11790. vue.createVNode(_component_u_button, {
  11791. type: "primary",
  11792. onClick: $setup.handleConfirm,
  11793. text: "确定",
  11794. shape: "circle"
  11795. })
  11796. ])
  11797. ])
  11798. ]),
  11799. _: 1
  11800. /* STABLE */
  11801. }, 8, ["show"]);
  11802. }
  11803. const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-b9bd3f04"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/WarehouseSelector.vue"]]);
  11804. const placeholderStyle$3 = "font-size:32rpx";
  11805. const _sfc_main$1C = {
  11806. __name: "transfer-sign",
  11807. setup(__props, { expose: __expose }) {
  11808. __expose();
  11809. const customStyle = vue.reactive({
  11810. height: "90rpx"
  11811. });
  11812. const selectedWarehouse = vue.ref("");
  11813. const form = vue.ref({
  11814. "packageCode": "",
  11815. "godownId": ""
  11816. });
  11817. const showSelector = vue.ref(false);
  11818. function openWarehouseSelector() {
  11819. showSelector.value = true;
  11820. }
  11821. function handleWarehouseSelected(item) {
  11822. selectedWarehouse.value = item.godownName;
  11823. form.value.godownId = item.id;
  11824. }
  11825. function scanCode() {
  11826. uni.scanCode({
  11827. success: (res2) => {
  11828. form.value.packageCode = res2.result;
  11829. handleBarcode(res2.result);
  11830. },
  11831. fail: (err) => {
  11832. uni.$u.toast("扫码失败");
  11833. }
  11834. });
  11835. }
  11836. function handleBarcode(code2) {
  11837. if (!code2)
  11838. return uni.$u.toast("请输入物流单号");
  11839. uni.$u.http.post("/app/ordersign/transferSign", form.value).then((res2) => {
  11840. if (res2.code == 200) {
  11841. let text = code2 + "签收成功";
  11842. uni.$u.ttsModule.speak(text);
  11843. } else {
  11844. let text = code2 + "订单不存在";
  11845. uni.$u.ttsModule.speak(text);
  11846. }
  11847. });
  11848. }
  11849. function getUserBindWarehouse() {
  11850. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  11851. var _a, _b;
  11852. if (res2.code == 200) {
  11853. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  11854. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  11855. }
  11856. });
  11857. }
  11858. onLoad(() => {
  11859. getUserBindWarehouse();
  11860. uni.$u.useGlobalEvent((e) => {
  11861. form.value.packageCode = e.barcode;
  11862. handleBarcode(e.barcode);
  11863. });
  11864. });
  11865. onShow(() => {
  11866. uni.$u.updateActivePageOnShow();
  11867. });
  11868. onUnload(() => {
  11869. uni.$u.cleanupOnPageUnload();
  11870. });
  11871. const __returned__ = { placeholderStyle: placeholderStyle$3, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  11872. return onLoad;
  11873. }, get onShow() {
  11874. return onShow;
  11875. }, get onUnload() {
  11876. return onUnload;
  11877. }, WarehouseSelector };
  11878. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11879. return __returned__;
  11880. }
  11881. };
  11882. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  11883. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  11884. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11885. const _directive_permission = vue.resolveDirective("permission");
  11886. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11887. vue.createElementVNode("view", { class: "main-content" }, [
  11888. vue.createElementVNode("view", { class: "input-group" }, [
  11889. vue.createVNode(_component_u_input, {
  11890. customStyle: $setup.customStyle,
  11891. "placeholder-style": $setup.placeholderStyle,
  11892. modelValue: $setup.selectedWarehouse,
  11893. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  11894. placeholder: "请选择仓库",
  11895. readonly: "",
  11896. border: "surround"
  11897. }, null, 8, ["customStyle", "modelValue"]),
  11898. vue.createVNode(_component_u_button, {
  11899. customStyle: $setup.customStyle,
  11900. type: "info",
  11901. color: "#a4adb3",
  11902. onClick: $setup.openWarehouseSelector,
  11903. text: "选择"
  11904. }, null, 8, ["customStyle"])
  11905. ]),
  11906. vue.createElementVNode("view", { class: "input-group" }, [
  11907. vue.createVNode(_component_u_input, {
  11908. customStyle: $setup.customStyle,
  11909. "placeholder-style": $setup.placeholderStyle,
  11910. modelValue: $setup.form.packageCode,
  11911. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  11912. placeholder: "扫描/输入物流单号",
  11913. border: "surround"
  11914. }, null, 8, ["customStyle", "modelValue"]),
  11915. vue.withDirectives(vue.createVNode(_component_u_button, {
  11916. customStyle: $setup.customStyle,
  11917. type: "info",
  11918. color: "#a4adb3",
  11919. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  11920. text: "确定"
  11921. }, null, 8, ["customStyle"]), [
  11922. [_directive_permission, "app:express:transferSign:confirm"]
  11923. ])
  11924. ])
  11925. ]),
  11926. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  11927. vue.createVNode(_component_u_button, {
  11928. size: "large",
  11929. type: "success",
  11930. onClick: $setup.scanCode,
  11931. text: "扫码",
  11932. class: "scan-button"
  11933. })
  11934. ]),
  11935. vue.createVNode($setup["WarehouseSelector"], {
  11936. show: $setup.showSelector,
  11937. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  11938. onWarehouseSelected: $setup.handleWarehouseSelected
  11939. }, null, 8, ["show"])
  11940. ]);
  11941. }
  11942. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-333d344a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/transfer-sign.vue"]]);
  11943. const _sfc_main$1B = {
  11944. __name: "scan",
  11945. setup(__props, { expose: __expose }) {
  11946. __expose();
  11947. const isInitializing = vue.ref(false);
  11948. const isBluetoothOpened = vue.ref(false);
  11949. const isDiscovering = vue.ref(false);
  11950. const isConnecting = vue.ref(false);
  11951. const isConnected = vue.ref(false);
  11952. const devices = vue.ref([]);
  11953. const selectedDevice = vue.ref(null);
  11954. const scanData = vue.ref(null);
  11955. const deviceId = vue.ref("");
  11956. const serviceId = vue.ref("");
  11957. const characteristicId = vue.ref("");
  11958. const initBluetooth = () => {
  11959. isInitializing.value = true;
  11960. uni.openBluetoothAdapter({
  11961. success: (res2) => {
  11962. formatAppLog("log", "at pages/index/express/scan.vue:35", "蓝牙适配器初始化成功");
  11963. isBluetoothOpened.value = true;
  11964. isInitializing.value = false;
  11965. },
  11966. fail: (err) => {
  11967. formatAppLog("log", "at pages/index/express/scan.vue:40", "蓝牙适配器初始化失败:", err);
  11968. isInitializing.value = false;
  11969. }
  11970. });
  11971. };
  11972. const startDiscovery = () => {
  11973. isDiscovering.value = true;
  11974. uni.startBluetoothDevicesDiscovery({
  11975. success: (res2) => {
  11976. formatAppLog("log", "at pages/index/express/scan.vue:50", "开始搜索蓝牙设备成功");
  11977. uni.onBluetoothDeviceFound((devicesRes) => {
  11978. const newDevices = devicesRes.devices;
  11979. devices.value = devices.value.concat(newDevices);
  11980. formatAppLog("log", "at pages/index/express/scan.vue:54", devices.value, "devices.value");
  11981. const scanGunDevice = newDevices.find((device) => device.name.includes("Z0"));
  11982. if (scanGunDevice) {
  11983. selectedDevice.value = scanGunDevice;
  11984. deviceId.value = scanGunDevice.deviceId;
  11985. }
  11986. });
  11987. uni.onBluetoothAdapterStateChange((stateRes) => {
  11988. if (!stateRes.available) {
  11989. isDiscovering.value = false;
  11990. formatAppLog("log", "at pages/index/express/scan.vue:64", "蓝牙适配器不可用,停止搜索");
  11991. }
  11992. });
  11993. },
  11994. fail: (err) => {
  11995. formatAppLog("log", "at pages/index/express/scan.vue:69", "开始搜索蓝牙设备失败:", err);
  11996. isDiscovering.value = false;
  11997. }
  11998. });
  11999. };
  12000. const connectDevice = () => {
  12001. isConnecting.value = true;
  12002. uni.createBLEConnection({
  12003. deviceId: deviceId.value,
  12004. success: (res2) => {
  12005. formatAppLog("log", "at pages/index/express/scan.vue:80", "连接蓝牙设备成功");
  12006. isConnected.value = true;
  12007. isConnecting.value = false;
  12008. getBLEDeviceServices(deviceId.value);
  12009. },
  12010. fail: (err) => {
  12011. formatAppLog("log", "at pages/index/express/scan.vue:86", "连接蓝牙设备失败:", err);
  12012. isConnecting.value = false;
  12013. }
  12014. });
  12015. };
  12016. const getBLEDeviceServices = (deviceId2) => {
  12017. uni.getBLEDeviceServices({
  12018. deviceId: deviceId2,
  12019. success: (res2) => {
  12020. formatAppLog("log", "at pages/index/express/scan.vue:96", "获取服务列表成功:", res2.services);
  12021. const targetService = res2.services.find((service) => service.uuid === "目标服务UUID");
  12022. if (targetService) {
  12023. serviceId.value = targetService.uuid;
  12024. getBLEDeviceCharacteristics(deviceId2, serviceId.value);
  12025. }
  12026. },
  12027. fail: (err) => {
  12028. formatAppLog("log", "at pages/index/express/scan.vue:104", "获取服务列表失败:", err);
  12029. }
  12030. });
  12031. };
  12032. const getBLEDeviceCharacteristics = (deviceId2, serviceId2) => {
  12033. uni.getBLEDeviceCharacteristics({
  12034. deviceId: deviceId2,
  12035. serviceId: serviceId2,
  12036. success: (res2) => {
  12037. formatAppLog("log", "at pages/index/express/scan.vue:114", "获取特征列表成功:", res2.characteristics);
  12038. const targetCharacteristic = res2.characteristics.find((characteristic) => characteristic.properties.read && characteristic.properties.notify);
  12039. if (targetCharacteristic) {
  12040. characteristicId.value = targetCharacteristic.uuid;
  12041. }
  12042. },
  12043. fail: (err) => {
  12044. formatAppLog("log", "at pages/index/express/scan.vue:121", "获取特征列表失败:", err);
  12045. }
  12046. });
  12047. };
  12048. const startDataMonitor = () => {
  12049. uni.onBLECharacteristicValueChange((characteristicRes) => {
  12050. const value2 = characteristicRes.value;
  12051. const data = ab2str(value2);
  12052. formatAppLog("log", "at pages/index/express/scan.vue:130", "获取到扫码枪扫描的数据:", data);
  12053. scanData.value = data;
  12054. });
  12055. uni.notifyBLECharacteristicValueChange({
  12056. state: true,
  12057. deviceId: deviceId.value,
  12058. characteristicId: characteristicId.value,
  12059. success: (res2) => {
  12060. formatAppLog("log", "at pages/index/express/scan.vue:138", "开启特征值通知成功");
  12061. },
  12062. fail: (err) => {
  12063. formatAppLog("log", "at pages/index/express/scan.vue:141", "开启特征值通知失败:", err);
  12064. }
  12065. });
  12066. };
  12067. const ab2str = (buffer) => {
  12068. return String.fromCharCode.apply(null, new Uint8Array(buffer));
  12069. };
  12070. const __returned__ = { isInitializing, isBluetoothOpened, isDiscovering, isConnecting, isConnected, devices, selectedDevice, scanData, deviceId, serviceId, characteristicId, initBluetooth, startDiscovery, connectDevice, getBLEDeviceServices, getBLEDeviceCharacteristics, startDataMonitor, ab2str, ref: vue.ref, get onLoad() {
  12071. return onLoad;
  12072. } };
  12073. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12074. return __returned__;
  12075. }
  12076. };
  12077. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  12078. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12079. vue.createElementVNode("button", {
  12080. onClick: $setup.initBluetooth,
  12081. disabled: $setup.isInitializing
  12082. }, "初始化蓝牙", 8, ["disabled"]),
  12083. vue.createElementVNode("button", {
  12084. onClick: $setup.startDiscovery,
  12085. disabled: $setup.isDiscovering || !$setup.isBluetoothOpened
  12086. }, "开始搜索设备", 8, ["disabled"]),
  12087. vue.createElementVNode("button", {
  12088. onClick: $setup.connectDevice,
  12089. disabled: !$setup.selectedDevice || $setup.isConnecting
  12090. }, "连接设备", 8, ["disabled"]),
  12091. vue.createElementVNode("button", {
  12092. onClick: $setup.startDataMonitor,
  12093. disabled: !$setup.isConnected
  12094. }, "开始监听数据", 8, ["disabled"]),
  12095. $setup.scanData ? (vue.openBlock(), vue.createElementBlock(
  12096. "view",
  12097. { key: 0 },
  12098. "扫描结果: " + vue.toDisplayString($setup.scanData),
  12099. 1
  12100. /* TEXT */
  12101. )) : vue.createCommentVNode("v-if", true),
  12102. (vue.openBlock(true), vue.createElementBlock(
  12103. vue.Fragment,
  12104. null,
  12105. vue.renderList($setup.devices, (item) => {
  12106. return vue.openBlock(), vue.createElementBlock(
  12107. "view",
  12108. null,
  12109. vue.toDisplayString(item.name),
  12110. 1
  12111. /* TEXT */
  12112. );
  12113. }),
  12114. 256
  12115. /* UNKEYED_FRAGMENT */
  12116. ))
  12117. ]);
  12118. }
  12119. const PagesIndexExpressScan = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/scan.vue"]]);
  12120. const props$l = {
  12121. props: {
  12122. // radio的名称
  12123. name: {
  12124. type: [String, Number, Boolean],
  12125. default: props$G.radio.name
  12126. },
  12127. // 形状,square为方形,circle为圆型
  12128. shape: {
  12129. type: String,
  12130. default: props$G.radio.shape
  12131. },
  12132. // 是否禁用
  12133. disabled: {
  12134. type: [String, Boolean],
  12135. default: props$G.radio.disabled
  12136. },
  12137. // 是否禁止点击提示语选中单选框
  12138. labelDisabled: {
  12139. type: [String, Boolean],
  12140. default: props$G.radio.labelDisabled
  12141. },
  12142. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12143. activeColor: {
  12144. type: String,
  12145. default: props$G.radio.activeColor
  12146. },
  12147. // 未选中的颜色
  12148. inactiveColor: {
  12149. type: String,
  12150. default: props$G.radio.inactiveColor
  12151. },
  12152. // 图标的大小,单位px
  12153. iconSize: {
  12154. type: [String, Number],
  12155. default: props$G.radio.iconSize
  12156. },
  12157. // label的字体大小,px单位
  12158. labelSize: {
  12159. type: [String, Number],
  12160. default: props$G.radio.labelSize
  12161. },
  12162. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  12163. label: {
  12164. type: [String, Number],
  12165. default: props$G.radio.label
  12166. },
  12167. // 整体的大小
  12168. size: {
  12169. type: [String, Number],
  12170. default: props$G.radio.size
  12171. },
  12172. // 图标颜色
  12173. color: {
  12174. type: String,
  12175. default: props$G.radio.color
  12176. },
  12177. // label的颜色
  12178. labelColor: {
  12179. type: String,
  12180. default: props$G.radio.labelColor
  12181. },
  12182. // 图标颜色
  12183. iconColor: {
  12184. type: String,
  12185. default: props$G.radio.iconColor
  12186. }
  12187. }
  12188. };
  12189. const _sfc_main$1A = {
  12190. name: "u-radio",
  12191. mixins: [mpMixin, mixin, props$l],
  12192. data() {
  12193. return {
  12194. checked: false,
  12195. // 当你看到这段代码的时候,
  12196. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  12197. // 故只能使用如此方法
  12198. parentData: {
  12199. iconSize: 12,
  12200. labelDisabled: null,
  12201. disabled: null,
  12202. shape: null,
  12203. activeColor: null,
  12204. inactiveColor: null,
  12205. size: 18,
  12206. value: null,
  12207. modelValue: null,
  12208. iconColor: null,
  12209. placement: "row",
  12210. borderBottom: false,
  12211. iconPlacement: "left"
  12212. }
  12213. };
  12214. },
  12215. computed: {
  12216. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  12217. elDisabled() {
  12218. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  12219. },
  12220. // 是否禁用label点击
  12221. elLabelDisabled() {
  12222. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  12223. },
  12224. // 组件尺寸,对应size的值,默认值为21px
  12225. elSize() {
  12226. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  12227. },
  12228. // 组件的勾选图标的尺寸,默认12px
  12229. elIconSize() {
  12230. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  12231. },
  12232. // 组件选中激活时的颜色
  12233. elActiveColor() {
  12234. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  12235. },
  12236. // 组件选未中激活时的颜色
  12237. elInactiveColor() {
  12238. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  12239. },
  12240. // label的颜色
  12241. elLabelColor() {
  12242. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  12243. },
  12244. // 组件的形状
  12245. elShape() {
  12246. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  12247. },
  12248. // label大小
  12249. elLabelSize() {
  12250. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  12251. },
  12252. elIconColor() {
  12253. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  12254. if (this.elDisabled) {
  12255. return this.checked ? this.elInactiveColor : "transparent";
  12256. } else {
  12257. return this.checked ? iconColor : "transparent";
  12258. }
  12259. },
  12260. iconClasses() {
  12261. let classes = [];
  12262. classes.push("u-radio__icon-wrap--" + this.elShape);
  12263. if (this.elDisabled) {
  12264. classes.push("u-radio__icon-wrap--disabled");
  12265. }
  12266. if (this.checked && this.elDisabled) {
  12267. classes.push("u-radio__icon-wrap--disabled--checked");
  12268. }
  12269. return classes;
  12270. },
  12271. iconWrapStyle() {
  12272. const style = {};
  12273. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  12274. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  12275. style.width = uni.$u.addUnit(this.elSize);
  12276. style.height = uni.$u.addUnit(this.elSize);
  12277. if (this.parentData.iconPlacement === "right") {
  12278. style.marginRight = 0;
  12279. }
  12280. return style;
  12281. },
  12282. radioStyle() {
  12283. const style = {};
  12284. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  12285. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  12286. }
  12287. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  12288. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  12289. }
  12290. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  12291. }
  12292. },
  12293. mounted() {
  12294. this.init();
  12295. },
  12296. methods: {
  12297. init() {
  12298. this.updateParentData();
  12299. if (!this.parent) {
  12300. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  12301. }
  12302. this.checked = this.name === this.parentData.modelValue;
  12303. },
  12304. updateParentData() {
  12305. this.getParentData("u-radio-group");
  12306. },
  12307. // 点击图标
  12308. iconClickHandler(e) {
  12309. this.preventEvent(e);
  12310. if (!this.elDisabled) {
  12311. this.setRadioCheckedStatus();
  12312. }
  12313. },
  12314. // 横向两端排列时,点击组件即可触发选中事件
  12315. wrapperClickHandler(e) {
  12316. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  12317. },
  12318. // 点击label
  12319. labelClickHandler(e) {
  12320. this.preventEvent(e);
  12321. if (!this.elLabelDisabled && !this.elDisabled) {
  12322. this.setRadioCheckedStatus();
  12323. }
  12324. },
  12325. emitEvent() {
  12326. if (!this.checked) {
  12327. this.$emit("change", this.name);
  12328. this.$nextTick(() => {
  12329. uni.$u.formValidate(this, "change");
  12330. });
  12331. }
  12332. },
  12333. // 改变组件选中状态
  12334. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  12335. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  12336. setRadioCheckedStatus() {
  12337. this.emitEvent();
  12338. this.checked = true;
  12339. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  12340. }
  12341. }
  12342. };
  12343. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  12344. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  12345. return vue.openBlock(), vue.createElementBlock(
  12346. "view",
  12347. {
  12348. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  12349. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  12350. style: vue.normalizeStyle([$options.radioStyle])
  12351. },
  12352. [
  12353. vue.createElementVNode(
  12354. "view",
  12355. {
  12356. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  12357. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  12358. style: vue.normalizeStyle([$options.iconWrapStyle])
  12359. },
  12360. [
  12361. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  12362. vue.createVNode(_component_u_icon, {
  12363. class: "u-radio__icon-wrap__icon",
  12364. name: "checkbox-mark",
  12365. size: $options.elIconSize,
  12366. color: $options.elIconColor
  12367. }, null, 8, ["size", "color"])
  12368. ], true)
  12369. ],
  12370. 6
  12371. /* CLASS, STYLE */
  12372. ),
  12373. vue.createElementVNode(
  12374. "text",
  12375. {
  12376. class: "u-radio__text",
  12377. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  12378. style: vue.normalizeStyle({
  12379. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  12380. fontSize: $options.elLabelSize,
  12381. lineHeight: $options.elLabelSize
  12382. })
  12383. },
  12384. vue.toDisplayString(_ctx.label),
  12385. 5
  12386. /* TEXT, STYLE */
  12387. )
  12388. ],
  12389. 6
  12390. /* CLASS, STYLE */
  12391. );
  12392. }
  12393. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-83036558"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  12394. const props$k = {
  12395. props: {
  12396. // 绑定的值
  12397. modelValue: {
  12398. type: [String, Number, Boolean],
  12399. default: props$G.radioGroup.value
  12400. },
  12401. // 是否禁用全部radio
  12402. disabled: {
  12403. type: Boolean,
  12404. default: props$G.radioGroup.disabled
  12405. },
  12406. // 形状,circle-圆形,square-方形
  12407. shape: {
  12408. type: String,
  12409. default: props$G.radioGroup.shape
  12410. },
  12411. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12412. activeColor: {
  12413. type: String,
  12414. default: props$G.radioGroup.activeColor
  12415. },
  12416. // 未选中的颜色
  12417. inactiveColor: {
  12418. type: String,
  12419. default: props$G.radioGroup.inactiveColor
  12420. },
  12421. // 标识符
  12422. name: {
  12423. type: String,
  12424. default: props$G.radioGroup.name
  12425. },
  12426. // 整个组件的尺寸,默认px
  12427. size: {
  12428. type: [String, Number],
  12429. default: props$G.radioGroup.size
  12430. },
  12431. // 布局方式,row-横向,column-纵向
  12432. placement: {
  12433. type: String,
  12434. default: props$G.radioGroup.placement
  12435. },
  12436. // label的文本
  12437. label: {
  12438. type: [String],
  12439. default: props$G.radioGroup.label
  12440. },
  12441. // label的颜色 (默认 '#303133' )
  12442. labelColor: {
  12443. type: [String],
  12444. default: props$G.radioGroup.labelColor
  12445. },
  12446. // label的字体大小,px单位
  12447. labelSize: {
  12448. type: [String, Number],
  12449. default: props$G.radioGroup.labelSize
  12450. },
  12451. // 是否禁止点击文本操作checkbox(默认 false )
  12452. labelDisabled: {
  12453. type: Boolean,
  12454. default: props$G.radioGroup.labelDisabled
  12455. },
  12456. // 图标颜色
  12457. iconColor: {
  12458. type: String,
  12459. default: props$G.radioGroup.iconColor
  12460. },
  12461. // 图标的大小,单位px
  12462. iconSize: {
  12463. type: [String, Number],
  12464. default: props$G.radioGroup.iconSize
  12465. },
  12466. // 竖向配列时,是否显示下划线
  12467. borderBottom: {
  12468. type: Boolean,
  12469. default: props$G.radioGroup.borderBottom
  12470. },
  12471. // 图标与文字的对齐方式
  12472. iconPlacement: {
  12473. type: String,
  12474. default: props$G.radio.iconPlacement
  12475. }
  12476. }
  12477. };
  12478. const _sfc_main$1z = {
  12479. name: "u-radio-group",
  12480. mixins: [mpMixin, mixin, props$k],
  12481. computed: {
  12482. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  12483. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  12484. // 拉取父组件新的变化后的参数
  12485. parentData() {
  12486. return [
  12487. this.modelValue,
  12488. this.disabled,
  12489. this.inactiveColor,
  12490. this.activeColor,
  12491. this.size,
  12492. this.labelDisabled,
  12493. this.shape,
  12494. this.iconSize,
  12495. this.borderBottom,
  12496. this.placement
  12497. ];
  12498. },
  12499. bemClass() {
  12500. return this.bem("radio-group", ["placement"]);
  12501. }
  12502. },
  12503. watch: {
  12504. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  12505. parentData() {
  12506. if (this.children.length) {
  12507. this.children.map((child) => {
  12508. typeof child.init === "function" && child.init();
  12509. });
  12510. }
  12511. }
  12512. },
  12513. data() {
  12514. return {};
  12515. },
  12516. created() {
  12517. this.children = [];
  12518. },
  12519. emits: ["update:modelValue", "change"],
  12520. methods: {
  12521. // 将其他的radio设置为未选中的状态
  12522. unCheckedOther(childInstance) {
  12523. this.children.map((child) => {
  12524. if (childInstance !== child) {
  12525. child.checked = false;
  12526. }
  12527. });
  12528. const {
  12529. name
  12530. } = childInstance;
  12531. this.$emit("update:modelValue", name);
  12532. this.$emit("change", name);
  12533. }
  12534. }
  12535. };
  12536. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  12537. return vue.openBlock(), vue.createElementBlock(
  12538. "view",
  12539. {
  12540. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  12541. },
  12542. [
  12543. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  12544. ],
  12545. 2
  12546. /* CLASS */
  12547. );
  12548. }
  12549. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-cbc8bf70"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  12550. const props$j = {
  12551. props: {
  12552. // 是否虚线
  12553. dashed: {
  12554. type: Boolean,
  12555. default: props$G.divider.dashed
  12556. },
  12557. // 是否细线
  12558. hairline: {
  12559. type: Boolean,
  12560. default: props$G.divider.hairline
  12561. },
  12562. // 是否以点替代文字,优先于text字段起作用
  12563. dot: {
  12564. type: Boolean,
  12565. default: props$G.divider.dot
  12566. },
  12567. // 内容文本的位置,left-左边,center-中间,right-右边
  12568. textPosition: {
  12569. type: String,
  12570. default: props$G.divider.textPosition
  12571. },
  12572. // 文本内容
  12573. text: {
  12574. type: [String, Number],
  12575. default: props$G.divider.text
  12576. },
  12577. // 文本大小
  12578. textSize: {
  12579. type: [String, Number],
  12580. default: props$G.divider.textSize
  12581. },
  12582. // 文本颜色
  12583. textColor: {
  12584. type: String,
  12585. default: props$G.divider.textColor
  12586. },
  12587. // 线条颜色
  12588. lineColor: {
  12589. type: String,
  12590. default: props$G.divider.lineColor
  12591. }
  12592. }
  12593. };
  12594. const _sfc_main$1y = {
  12595. name: "u-divider",
  12596. mixins: [mpMixin, mixin, props$j],
  12597. computed: {
  12598. textStyle() {
  12599. const style = {};
  12600. style.fontSize = uni.$u.addUnit(this.textSize);
  12601. style.color = this.textColor;
  12602. return style;
  12603. },
  12604. // 左边线条的的样式
  12605. leftLineStyle() {
  12606. const style = {};
  12607. if (this.textPosition === "left") {
  12608. style.width = "80rpx";
  12609. } else {
  12610. style.flex = 1;
  12611. }
  12612. return style;
  12613. },
  12614. // 右边线条的的样式
  12615. rightLineStyle() {
  12616. const style = {};
  12617. if (this.textPosition === "right") {
  12618. style.width = "80rpx";
  12619. } else {
  12620. style.flex = 1;
  12621. }
  12622. return style;
  12623. }
  12624. },
  12625. methods: {
  12626. // divider组件被点击时触发
  12627. click() {
  12628. this.$emit("click");
  12629. }
  12630. }
  12631. };
  12632. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  12633. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
  12634. return vue.openBlock(), vue.createElementBlock(
  12635. "view",
  12636. {
  12637. class: "u-divider",
  12638. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  12639. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  12640. },
  12641. [
  12642. vue.createVNode(_component_u_line, {
  12643. color: _ctx.lineColor,
  12644. customStyle: $options.leftLineStyle,
  12645. hairline: _ctx.hairline,
  12646. dashed: _ctx.dashed
  12647. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  12648. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  12649. key: 0,
  12650. class: "u-divider__dot"
  12651. }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  12652. "text",
  12653. {
  12654. key: 1,
  12655. class: "u-divider__text",
  12656. style: vue.normalizeStyle([$options.textStyle])
  12657. },
  12658. vue.toDisplayString(_ctx.text),
  12659. 5
  12660. /* TEXT, STYLE */
  12661. )) : vue.createCommentVNode("v-if", true),
  12662. vue.createVNode(_component_u_line, {
  12663. color: _ctx.lineColor,
  12664. customStyle: $options.rightLineStyle,
  12665. hairline: _ctx.hairline,
  12666. dashed: _ctx.dashed
  12667. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  12668. ],
  12669. 4
  12670. /* STYLE */
  12671. );
  12672. }
  12673. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-ea022cee"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  12674. const _sfc_main$1x = {
  12675. __name: "quick-check",
  12676. setup(__props, { expose: __expose }) {
  12677. __expose();
  12678. const selectedBatchId = vue.ref("");
  12679. const showBatchSelector = vue.ref(false);
  12680. const count = vue.ref(0);
  12681. const formData = vue.ref({
  12682. batchNum: "",
  12683. packageCode: "",
  12684. searchType: "2",
  12685. packageStatus: ""
  12686. });
  12687. const batchList = vue.ref([]);
  12688. function getBatchList() {
  12689. uni.$u.http.get("/app/batchnum/pagelist").then((res2) => {
  12690. batchList.value = res2.rows;
  12691. });
  12692. }
  12693. getBatchList();
  12694. const openBatchSelector = () => {
  12695. showBatchSelector.value = true;
  12696. };
  12697. const selectBatch = (batch) => {
  12698. selectedBatchId.value = batch.id;
  12699. count.value = Number(batch.num);
  12700. formData.value.batchNum = batch.batchNum;
  12701. showBatchSelector.value = false;
  12702. };
  12703. const handleSearch = () => {
  12704. formatAppLog("log", "at pages/index/express/quick-check.vue:117", "查询:", formData.value.packageCode);
  12705. };
  12706. const handleSubmitBatch = () => {
  12707. formatAppLog("log", "at pages/index/express/quick-check.vue:122", "提交批次:", formData.value.batchNum);
  12708. if (!formData.value.batchNum) {
  12709. uni.$u.toast("请选择批次");
  12710. return;
  12711. }
  12712. if (!formData.value.packageCode) {
  12713. uni.$u.toast("请扫描/输入物流单号");
  12714. return;
  12715. }
  12716. uni.$u.http.post("/app/ordersign/deliverySign", formData.value).then((res2) => {
  12717. formatAppLog("log", "at pages/index/express/quick-check.vue:132", res2);
  12718. if (res2.code == 200) {
  12719. let text = code + "快递验收成功";
  12720. uni.$u.ttsModule.speak(text);
  12721. } else {
  12722. let text = code + "订单不存在";
  12723. uni.$u.ttsModule.speak(text);
  12724. }
  12725. });
  12726. };
  12727. const handleScan = () => {
  12728. uni.scanCode({
  12729. success: (res2) => {
  12730. formData.value.packageCode = res2.result;
  12731. handleSubmitBatch();
  12732. }
  12733. });
  12734. };
  12735. const createNewBatch = () => {
  12736. uni.$u.http.post("/app/batchnum/add").then((res2) => {
  12737. if (res2.code == 200) {
  12738. getBatchList();
  12739. }
  12740. });
  12741. };
  12742. onLoad(() => {
  12743. uni.$u.useGlobalEvent((e) => {
  12744. formData.value.packageCode = e.barcode;
  12745. handleSubmitBatch();
  12746. });
  12747. });
  12748. onShow(() => {
  12749. uni.$u.updateActivePageOnShow();
  12750. });
  12751. onUnload(() => {
  12752. uni.$u.cleanupOnPageUnload();
  12753. });
  12754. const __returned__ = { selectedBatchId, showBatchSelector, count, formData, batchList, getBatchList, openBatchSelector, selectBatch, handleSearch, handleSubmitBatch, handleScan, createNewBatch, ref: vue.ref, get onLoad() {
  12755. return onLoad;
  12756. }, get onShow() {
  12757. return onShow;
  12758. }, get onUnload() {
  12759. return onUnload;
  12760. } };
  12761. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12762. return __returned__;
  12763. }
  12764. };
  12765. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  12766. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  12767. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  12768. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  12769. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  12770. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  12771. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  12772. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  12773. const _directive_permission = vue.resolveDirective("permission");
  12774. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12775. vue.createCommentVNode(" 批次选择区域 "),
  12776. vue.createElementVNode("view", { class: "select-section" }, [
  12777. vue.createElementVNode("view", { class: "batch-select" }, [
  12778. vue.createElementVNode("text", { class: "required" }, "*"),
  12779. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次:"),
  12780. vue.createElementVNode("view", { class: "batch-input" }, [
  12781. vue.createElementVNode("view", {
  12782. class: "batch-input-text",
  12783. onClick: $setup.openBatchSelector
  12784. }),
  12785. vue.createVNode(_component_u_input, {
  12786. modelValue: $setup.formData.batchNum,
  12787. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.batchNum = $event),
  12788. placeholder: "请选择/新建批次",
  12789. readonly: "",
  12790. border: "surround",
  12791. "placeholder-style": "font-size: 32rpx",
  12792. "custom-style": "font-size: 32rpx;height: 88rpx;"
  12793. }, {
  12794. suffix: vue.withCtx(() => [
  12795. vue.createVNode(_component_u_icon, {
  12796. name: "arrow-down",
  12797. size: "18"
  12798. })
  12799. ]),
  12800. _: 1
  12801. /* STABLE */
  12802. }, 8, ["modelValue"])
  12803. ])
  12804. ])
  12805. ]),
  12806. vue.createCommentVNode(" 数量显示 "),
  12807. vue.createElementVNode("view", { class: "count-badge" }, [
  12808. vue.createTextVNode(" 数量 "),
  12809. vue.createElementVNode(
  12810. "text",
  12811. { style: { "font-size": "32rpx" } },
  12812. vue.toDisplayString($setup.count),
  12813. 1
  12814. /* TEXT */
  12815. )
  12816. ]),
  12817. vue.createCommentVNode(" 底部按钮 "),
  12818. vue.createElementVNode("view", { class: "footer" }, [
  12819. vue.createCommentVNode(" 查询区域 "),
  12820. vue.createElementVNode("view", { class: "query-section" }, [
  12821. vue.createVNode(_component_u_radio_group, {
  12822. modelValue: $setup.formData.searchType,
  12823. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.searchType = $event),
  12824. class: "query-radio"
  12825. }, {
  12826. default: vue.withCtx(() => [
  12827. vue.createVNode(_component_u_radio, {
  12828. label: "查订单",
  12829. name: "1",
  12830. labelSize: "16px",
  12831. iconSize: "16px"
  12832. }),
  12833. vue.createVNode(_component_u_radio, {
  12834. label: "查物流",
  12835. "custom-style": "margin-left:20px",
  12836. name: "2",
  12837. labelSize: "16px",
  12838. iconSize: "16px"
  12839. })
  12840. ]),
  12841. _: 1
  12842. /* STABLE */
  12843. }, 8, ["modelValue"]),
  12844. vue.createElementVNode("view", { class: "search-box" }, [
  12845. vue.createVNode(_component_u_input, {
  12846. "custom-style": "font-size: 32rpx;",
  12847. "placeholder-style": "font-size: 32rpx;",
  12848. modelValue: $setup.formData.packageCode,
  12849. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.packageCode = $event),
  12850. adjustPosition: true,
  12851. placeholder: "扫描/输入物流单号",
  12852. border: "surround",
  12853. clearable: ""
  12854. }, null, 8, ["modelValue"]),
  12855. vue.createVNode(_component_u_button, {
  12856. color: "#c8c8c8",
  12857. text: "查询",
  12858. onClick: $setup.handleSearch
  12859. })
  12860. ])
  12861. ]),
  12862. vue.createVNode(_component_u_divider),
  12863. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  12864. vue.createVNode(_component_u_button, {
  12865. size: "large",
  12866. type: "warning",
  12867. text: "验收扫码",
  12868. onClick: $setup.handleScan
  12869. }),
  12870. vue.withDirectives(vue.createVNode(
  12871. _component_u_button,
  12872. {
  12873. size: "large",
  12874. type: "primary",
  12875. text: "提交批次",
  12876. onClick: $setup.handleSubmitBatch
  12877. },
  12878. null,
  12879. 512
  12880. /* NEED_PATCH */
  12881. ), [
  12882. [_directive_permission, "app:express:quickCheck:confirm"]
  12883. ])
  12884. ])
  12885. ]),
  12886. vue.createCommentVNode(" 批次选择弹窗 "),
  12887. vue.createVNode(_component_u_popup, {
  12888. show: $setup.showBatchSelector,
  12889. mode: "bottom",
  12890. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
  12891. }, {
  12892. default: vue.withCtx(() => [
  12893. vue.createElementVNode("view", {
  12894. class: "batch-popup",
  12895. style: { "min-height": "300px" }
  12896. }, [
  12897. vue.createElementVNode("view", { class: "popup-header" }, [
  12898. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次"),
  12899. vue.createElementVNode("view", {
  12900. style: { "font-size": "32rpx", "color": "#007AFF" },
  12901. onClick: $setup.createNewBatch
  12902. }, [
  12903. vue.createElementVNode("text", null, "新建批次")
  12904. ])
  12905. ]),
  12906. vue.createElementVNode("scroll-view", {
  12907. "scroll-y": "",
  12908. class: "batch-list"
  12909. }, [
  12910. (vue.openBlock(true), vue.createElementBlock(
  12911. vue.Fragment,
  12912. null,
  12913. vue.renderList($setup.batchList, (batch) => {
  12914. return vue.openBlock(), vue.createElementBlock("view", {
  12915. key: batch.id,
  12916. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
  12917. onClick: ($event) => $setup.selectBatch(batch)
  12918. }, [
  12919. vue.createElementVNode(
  12920. "text",
  12921. null,
  12922. vue.toDisplayString(batch.batchNum),
  12923. 1
  12924. /* TEXT */
  12925. ),
  12926. vue.createElementVNode(
  12927. "text",
  12928. null,
  12929. vue.toDisplayString(batch.num),
  12930. 1
  12931. /* TEXT */
  12932. )
  12933. ], 10, ["onClick"]);
  12934. }),
  12935. 128
  12936. /* KEYED_FRAGMENT */
  12937. ))
  12938. ])
  12939. ])
  12940. ]),
  12941. _: 1
  12942. /* STABLE */
  12943. }, 8, ["show"])
  12944. ]);
  12945. }
  12946. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-61cc11f4"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/quick-check.vue"]]);
  12947. const keymap = {
  12948. "7": "0",
  12949. "8": "1",
  12950. "9": "2",
  12951. "10": "3",
  12952. "11": "4",
  12953. "12": "5",
  12954. "13": "6",
  12955. "14": "7",
  12956. "15": "8",
  12957. "16": "9",
  12958. "29": "A",
  12959. "30": "B",
  12960. "31": "C",
  12961. "32": "D",
  12962. "33": "E",
  12963. "34": "F",
  12964. "35": "G",
  12965. "36": "H",
  12966. "37": "I",
  12967. "38": "J",
  12968. "39": "K",
  12969. "40": "L",
  12970. "41": "M",
  12971. "42": "N",
  12972. "43": "O",
  12973. "44": "P",
  12974. "45": "Q",
  12975. "46": "R",
  12976. "47": "S",
  12977. "48": "T",
  12978. "49": "U",
  12979. "50": "V",
  12980. "51": "W",
  12981. "52": "X",
  12982. "53": "Y",
  12983. "54": "Z",
  12984. "55": ",",
  12985. "56": ".",
  12986. "59": "",
  12987. "69": "-",
  12988. "70": "=",
  12989. "81": "+"
  12990. };
  12991. const _sfc_main$1w = {
  12992. __name: "quick-unpack",
  12993. setup(__props, { expose: __expose }) {
  12994. __expose();
  12995. function goScan() {
  12996. uni.redirectTo({
  12997. url: "/pages/index/express/scan"
  12998. });
  12999. }
  13000. const unpackCode = vue.ref("");
  13001. function confirmTrackingNumber(code2) {
  13002. uni.$u.http.post("/app/ordersign/unpackingSign", {
  13003. packageCode: code2
  13004. }).then((res2) => {
  13005. if (res2.code == 200) {
  13006. let text = code2 + "拆包成功";
  13007. uni.$u.ttsModule.speak(text);
  13008. } else {
  13009. let text = code2 + res2.msg;
  13010. uni.$u.ttsModule.speak(text);
  13011. }
  13012. });
  13013. }
  13014. function scanCode() {
  13015. uni.scanCode({
  13016. success: (res2) => {
  13017. unpackCode.value = res2.result;
  13018. confirmTrackingNumber(res2.result);
  13019. formatAppLog("log", "at pages/index/express/quick-unpack.vue:68", "扫码结果:", res2.result);
  13020. },
  13021. fail: (err) => {
  13022. formatAppLog("error", "at pages/index/express/quick-unpack.vue:71", "扫码失败:", err);
  13023. }
  13024. });
  13025. }
  13026. const inputCache = vue.ref("");
  13027. const keypress = (e) => {
  13028. if (e.keyCode === 66 || e.key == "Enter") {
  13029. unpackCode.value = inputCache.value;
  13030. confirmTrackingNumber(unpackCode.value);
  13031. inputCache.value = "";
  13032. } else {
  13033. inputCache.value += keymap[e.keyCode] || "";
  13034. }
  13035. };
  13036. onLoad(() => {
  13037. uni.$u.useGlobalEvent((e) => {
  13038. unpackCode.value = e.barcode;
  13039. confirmTrackingNumber(e.barcode);
  13040. });
  13041. plus.key.addEventListener("keyup", keypress);
  13042. });
  13043. onUnload(() => {
  13044. plus.key.removeEventListener("keyup", keypress);
  13045. });
  13046. onShow(() => {
  13047. uni.$u.updateActivePageOnShow();
  13048. });
  13049. onUnload(() => {
  13050. uni.$u.cleanupOnPageUnload();
  13051. });
  13052. const __returned__ = { goScan, unpackCode, confirmTrackingNumber, scanCode, inputCache, keypress, ref: vue.ref, get onLoad() {
  13053. return onLoad;
  13054. }, get onUnload() {
  13055. return onUnload;
  13056. }, get onShow() {
  13057. return onShow;
  13058. }, get keymap() {
  13059. return keymap;
  13060. } };
  13061. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13062. return __returned__;
  13063. }
  13064. };
  13065. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  13066. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  13067. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  13068. const _directive_permission = vue.resolveDirective("permission");
  13069. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  13070. vue.createCommentVNode(' <view class="container">\n <button @click="initBluetooth" :disabled="isInitializing">初始化蓝牙</button>\n <button @click="startDiscovery" :disabled="isDiscovering || !isBluetoothOpened">开始搜索设备</button>\n <button @click="connectDevice" :disabled="!selectedDevice || isConnecting">连接设备</button>\n <button @click="startDataMonitor" :disabled="!isConnected">开始监听数据</button>\n <view v-if="scanData">扫描结果: {{ scanData }}</view>\n </view> '),
  13071. vue.createCommentVNode(' <u-button type="primary" @click="goScan" text="扫码" /> '),
  13072. vue.createElementVNode("view", { class: "main-content" }, [
  13073. vue.createElementVNode("view", { class: "input-group" }, [
  13074. vue.createVNode(_component_u_input, {
  13075. "placeholder-style": "font-size:32rpx",
  13076. modelValue: $setup.unpackCode,
  13077. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.unpackCode = $event),
  13078. placeholder: "扫描/输入物流单号",
  13079. border: "surround"
  13080. }, null, 8, ["modelValue"]),
  13081. vue.withDirectives(vue.createVNode(
  13082. _component_u_button,
  13083. {
  13084. type: "primary",
  13085. onClick: _cache[1] || (_cache[1] = ($event) => $setup.confirmTrackingNumber($setup.unpackCode)),
  13086. text: "确定"
  13087. },
  13088. null,
  13089. 512
  13090. /* NEED_PATCH */
  13091. ), [
  13092. [_directive_permission, "app:express:quickUnpack:confirm"]
  13093. ])
  13094. ])
  13095. ]),
  13096. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  13097. vue.createVNode(_component_u_button, {
  13098. size: "large",
  13099. type: "success",
  13100. onClick: $setup.scanCode,
  13101. text: "扫码",
  13102. class: "scan-button"
  13103. })
  13104. ])
  13105. ]);
  13106. }
  13107. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/quick-unpack.vue"]]);
  13108. const props$i = {
  13109. props: {
  13110. // tab的数据
  13111. list: {
  13112. type: Array,
  13113. default: props$G.subsection.list
  13114. },
  13115. // 当前活动的tab的index
  13116. current: {
  13117. type: [String, Number],
  13118. default: props$G.subsection.current
  13119. },
  13120. // 激活的颜色
  13121. activeColor: {
  13122. type: String,
  13123. default: props$G.subsection.activeColor
  13124. },
  13125. // 未激活的颜色
  13126. inactiveColor: {
  13127. type: String,
  13128. default: props$G.subsection.inactiveColor
  13129. },
  13130. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  13131. mode: {
  13132. type: String,
  13133. default: props$G.subsection.mode
  13134. },
  13135. // 字体大小
  13136. fontSize: {
  13137. type: [String, Number],
  13138. default: props$G.subsection.fontSize
  13139. },
  13140. // 激活tab的字体是否加粗
  13141. bold: {
  13142. type: Boolean,
  13143. default: props$G.subsection.bold
  13144. },
  13145. // mode = button时,组件背景颜色
  13146. bgColor: {
  13147. type: String,
  13148. default: props$G.subsection.bgColor
  13149. },
  13150. // 从list元素对象中读取的键名
  13151. keyName: {
  13152. type: String,
  13153. default: props$G.subsection.keyName
  13154. }
  13155. }
  13156. };
  13157. const _sfc_main$1v = {
  13158. name: "u-subsection",
  13159. mixins: [mpMixin, mixin, props$i],
  13160. data() {
  13161. return {
  13162. // 组件尺寸
  13163. itemRect: {
  13164. width: 0,
  13165. height: 0
  13166. }
  13167. };
  13168. },
  13169. watch: {
  13170. list(newValue, oldValue) {
  13171. this.init();
  13172. },
  13173. current: {
  13174. immediate: true,
  13175. handler(n) {
  13176. }
  13177. }
  13178. },
  13179. computed: {
  13180. wrapperStyle() {
  13181. const style = {};
  13182. if (this.mode === "button") {
  13183. style.backgroundColor = this.bgColor;
  13184. }
  13185. return style;
  13186. },
  13187. // 滑块的样式
  13188. barStyle() {
  13189. const style = {};
  13190. style.width = `${this.itemRect.width}px`;
  13191. style.height = `${this.itemRect.height}px`;
  13192. style.transform = `translateX(${this.current * this.itemRect.width}px)`;
  13193. if (this.mode === "subsection") {
  13194. style.backgroundColor = this.activeColor;
  13195. }
  13196. return style;
  13197. },
  13198. // 分段器item的样式
  13199. itemStyle(index2) {
  13200. return (index3) => {
  13201. const style = {};
  13202. if (this.mode === "subsection") {
  13203. style.borderColor = this.activeColor;
  13204. style.borderWidth = "1px";
  13205. style.borderStyle = "solid";
  13206. }
  13207. return style;
  13208. };
  13209. },
  13210. // 分段器文字颜色
  13211. textStyle(index2) {
  13212. return (index3) => {
  13213. const style = {};
  13214. style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
  13215. style.fontSize = uni.$u.addUnit(this.fontSize);
  13216. if (this.mode === "subsection") {
  13217. style.color = this.current === index3 ? "#fff" : this.inactiveColor;
  13218. } else {
  13219. style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
  13220. }
  13221. return style;
  13222. };
  13223. }
  13224. },
  13225. mounted() {
  13226. this.init();
  13227. },
  13228. methods: {
  13229. init() {
  13230. uni.$u.sleep().then(() => this.getRect());
  13231. },
  13232. // 判断展示文本
  13233. getText(item) {
  13234. return typeof item === "object" ? item[this.keyName] : item;
  13235. },
  13236. // 获取组件的尺寸
  13237. getRect() {
  13238. this.$uGetRect(".u-subsection__item--0").then((size) => {
  13239. this.itemRect = size;
  13240. });
  13241. },
  13242. clickHandler(index2) {
  13243. this.$emit("change", index2);
  13244. }
  13245. }
  13246. };
  13247. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  13248. return vue.openBlock(), vue.createElementBlock(
  13249. "view",
  13250. {
  13251. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  13252. ref: "u-subsection",
  13253. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
  13254. },
  13255. [
  13256. vue.createElementVNode(
  13257. "view",
  13258. {
  13259. class: vue.normalizeClass(["u-subsection__bar", [
  13260. _ctx.mode === "button" && "u-subsection--button__bar",
  13261. _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  13262. _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  13263. _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  13264. ]]),
  13265. ref: "u-subsection__bar",
  13266. style: vue.normalizeStyle([$options.barStyle])
  13267. },
  13268. null,
  13269. 6
  13270. /* CLASS, STYLE */
  13271. ),
  13272. (vue.openBlock(true), vue.createElementBlock(
  13273. vue.Fragment,
  13274. null,
  13275. vue.renderList(_ctx.list, (item, index2) => {
  13276. return vue.openBlock(), vue.createElementBlock("view", {
  13277. class: vue.normalizeClass(["u-subsection__item", [
  13278. `u-subsection__item--${index2}`,
  13279. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  13280. index2 === 0 && "u-subsection__item--first",
  13281. index2 === _ctx.list.length - 1 && "u-subsection__item--last"
  13282. ]]),
  13283. ref_for: true,
  13284. ref: `u-subsection__item--${index2}`,
  13285. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  13286. onClick: ($event) => $options.clickHandler(index2),
  13287. key: index2
  13288. }, [
  13289. vue.createElementVNode(
  13290. "text",
  13291. {
  13292. class: "u-subsection__item__text",
  13293. style: vue.normalizeStyle([$options.textStyle(index2)])
  13294. },
  13295. vue.toDisplayString($options.getText(item)),
  13296. 5
  13297. /* TEXT, STYLE */
  13298. )
  13299. ], 14, ["onClick"]);
  13300. }),
  13301. 128
  13302. /* KEYED_FRAGMENT */
  13303. ))
  13304. ],
  13305. 6
  13306. /* CLASS, STYLE */
  13307. );
  13308. }
  13309. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-b5ccb67e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  13310. const props$h = {
  13311. props: {
  13312. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  13313. offsetTop: {
  13314. type: [String, Number],
  13315. default: props$G.sticky.offsetTop
  13316. },
  13317. // 自定义导航栏的高度
  13318. customNavHeight: {
  13319. type: [String, Number],
  13320. default: props$G.sticky.customNavHeight
  13321. },
  13322. // 是否开启吸顶功能
  13323. disabled: {
  13324. type: Boolean,
  13325. default: props$G.sticky.disabled
  13326. },
  13327. // 吸顶区域的背景颜色
  13328. bgColor: {
  13329. type: String,
  13330. default: props$G.sticky.bgColor
  13331. },
  13332. // z-index值
  13333. zIndex: {
  13334. type: [String, Number],
  13335. default: props$G.sticky.zIndex
  13336. },
  13337. // 列表中的索引值
  13338. index: {
  13339. type: [String, Number],
  13340. default: props$G.sticky.index
  13341. }
  13342. }
  13343. };
  13344. const _sfc_main$1u = {
  13345. name: "u-sticky",
  13346. mixins: [mpMixin, mixin, props$h],
  13347. data() {
  13348. return {
  13349. cssSticky: false,
  13350. // 是否使用css的sticky实现
  13351. stickyTop: 0,
  13352. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  13353. elId: uni.$u.guid(),
  13354. left: 0,
  13355. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  13356. width: "auto",
  13357. height: "auto",
  13358. fixed: false
  13359. // js模式时,是否处于吸顶模式
  13360. };
  13361. },
  13362. computed: {
  13363. style() {
  13364. const style = {};
  13365. if (!this.disabled) {
  13366. if (this.cssSticky) {
  13367. style.position = "sticky";
  13368. style.zIndex = this.uZindex;
  13369. style.top = uni.$u.addUnit(this.stickyTop);
  13370. } else {
  13371. style.height = this.fixed ? this.height + "px" : "auto";
  13372. }
  13373. } else {
  13374. style.position = "static";
  13375. }
  13376. style.backgroundColor = this.bgColor;
  13377. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  13378. },
  13379. // 吸顶内容的样式
  13380. stickyContent() {
  13381. const style = {};
  13382. if (!this.cssSticky) {
  13383. style.position = this.fixed ? "fixed" : "static";
  13384. style.top = this.stickyTop + "px";
  13385. style.left = this.left + "px";
  13386. style.width = this.width == "auto" ? "auto" : this.width + "px";
  13387. style.zIndex = this.uZindex;
  13388. }
  13389. return style;
  13390. },
  13391. uZindex() {
  13392. return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
  13393. }
  13394. },
  13395. mounted() {
  13396. this.init();
  13397. },
  13398. methods: {
  13399. init() {
  13400. this.getStickyTop();
  13401. this.checkSupportCssSticky();
  13402. if (!this.cssSticky) {
  13403. !this.disabled && this.initObserveContent();
  13404. }
  13405. },
  13406. initObserveContent() {
  13407. this.$uGetRect("#" + this.elId).then((res2) => {
  13408. this.height = res2.height;
  13409. this.left = res2.left;
  13410. this.width = res2.width;
  13411. this.$nextTick(() => {
  13412. this.observeContent();
  13413. });
  13414. });
  13415. },
  13416. observeContent() {
  13417. this.disconnectObserver("contentObserver");
  13418. const contentObserver = uni.createIntersectionObserver({
  13419. // 检测的区间范围
  13420. thresholds: [0.95, 0.98, 1]
  13421. });
  13422. contentObserver.relativeToViewport({
  13423. top: -this.stickyTop
  13424. });
  13425. contentObserver.observe(`#${this.elId}`, (res2) => {
  13426. this.setFixed(res2.boundingClientRect.top);
  13427. });
  13428. this.contentObserver = contentObserver;
  13429. },
  13430. setFixed(top) {
  13431. const fixed = top <= this.stickyTop;
  13432. this.fixed = fixed;
  13433. },
  13434. disconnectObserver(observerName) {
  13435. const observer = this[observerName];
  13436. observer && observer.disconnect();
  13437. },
  13438. getStickyTop() {
  13439. this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
  13440. },
  13441. async checkSupportCssSticky() {
  13442. if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
  13443. this.cssSticky = true;
  13444. }
  13445. this.cssSticky = await this.checkComputedStyle();
  13446. if (uni.$u.os() === "ios") {
  13447. this.cssSticky = true;
  13448. }
  13449. },
  13450. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  13451. checkComputedStyle() {
  13452. return new Promise((resolve) => {
  13453. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  13454. computedStyle: ["position"]
  13455. }).exec((e) => {
  13456. resolve("sticky" === e[0].position);
  13457. });
  13458. });
  13459. },
  13460. // H5通过创建元素的形式嗅探是否支持css sticky
  13461. // 判断浏览器是否支持sticky属性
  13462. checkCssStickyForH5() {
  13463. }
  13464. },
  13465. beforeDestroy() {
  13466. this.disconnectObserver("contentObserver");
  13467. }
  13468. };
  13469. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  13470. return vue.openBlock(), vue.createElementBlock("view", {
  13471. class: "u-sticky",
  13472. id: $data.elId,
  13473. style: vue.normalizeStyle([$options.style])
  13474. }, [
  13475. vue.createElementVNode(
  13476. "view",
  13477. {
  13478. style: vue.normalizeStyle([$options.stickyContent]),
  13479. class: "u-sticky__content"
  13480. },
  13481. [
  13482. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  13483. ],
  13484. 4
  13485. /* STYLE */
  13486. )
  13487. ], 12, ["id"]);
  13488. }
  13489. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-8b303089"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  13490. const props$g = {
  13491. props: {
  13492. // 是否展示modal
  13493. show: {
  13494. type: Boolean,
  13495. default: props$G.modal.show
  13496. },
  13497. // 标题
  13498. title: {
  13499. type: [String],
  13500. default: props$G.modal.title
  13501. },
  13502. // 弹窗内容
  13503. content: {
  13504. type: String,
  13505. default: props$G.modal.content
  13506. },
  13507. // 确认文案
  13508. confirmText: {
  13509. type: String,
  13510. default: props$G.modal.confirmText
  13511. },
  13512. // 取消文案
  13513. cancelText: {
  13514. type: String,
  13515. default: props$G.modal.cancelText
  13516. },
  13517. // 是否显示确认按钮
  13518. showConfirmButton: {
  13519. type: Boolean,
  13520. default: props$G.modal.showConfirmButton
  13521. },
  13522. // 是否显示取消按钮
  13523. showCancelButton: {
  13524. type: Boolean,
  13525. default: props$G.modal.showCancelButton
  13526. },
  13527. // 确认按钮颜色
  13528. confirmColor: {
  13529. type: String,
  13530. default: props$G.modal.confirmColor
  13531. },
  13532. // 取消文字颜色
  13533. cancelColor: {
  13534. type: String,
  13535. default: props$G.modal.cancelColor
  13536. },
  13537. // 对调确认和取消的位置
  13538. buttonReverse: {
  13539. type: Boolean,
  13540. default: props$G.modal.buttonReverse
  13541. },
  13542. // 是否开启缩放效果
  13543. zoom: {
  13544. type: Boolean,
  13545. default: props$G.modal.zoom
  13546. },
  13547. // 是否异步关闭,只对确定按钮有效
  13548. asyncClose: {
  13549. type: Boolean,
  13550. default: props$G.modal.asyncClose
  13551. },
  13552. // 是否允许点击遮罩关闭modal
  13553. closeOnClickOverlay: {
  13554. type: Boolean,
  13555. default: props$G.modal.closeOnClickOverlay
  13556. },
  13557. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  13558. negativeTop: {
  13559. type: [String, Number],
  13560. default: props$G.modal.negativeTop
  13561. },
  13562. // modal宽度,不支持百分比,可以数值,px,rpx单位
  13563. width: {
  13564. type: [String, Number],
  13565. default: props$G.modal.width
  13566. },
  13567. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  13568. confirmButtonShape: {
  13569. type: String,
  13570. default: props$G.modal.confirmButtonShape
  13571. }
  13572. }
  13573. };
  13574. const _sfc_main$1t = {
  13575. name: "u-modal",
  13576. mixins: [mpMixin, mixin, props$g],
  13577. data() {
  13578. return {
  13579. loading: false
  13580. };
  13581. },
  13582. watch: {
  13583. show(n) {
  13584. if (n && this.loading)
  13585. this.loading = false;
  13586. }
  13587. },
  13588. methods: {
  13589. // 点击确定按钮
  13590. confirmHandler() {
  13591. if (this.asyncClose) {
  13592. this.loading = true;
  13593. }
  13594. this.$emit("confirm");
  13595. },
  13596. // 点击取消按钮
  13597. cancelHandler() {
  13598. this.$emit("cancel");
  13599. },
  13600. // 点击遮罩
  13601. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  13602. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  13603. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  13604. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  13605. clickHandler() {
  13606. if (this.closeOnClickOverlay) {
  13607. this.$emit("close");
  13608. }
  13609. }
  13610. }
  13611. };
  13612. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  13613. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
  13614. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  13615. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  13616. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13617. mode: "center",
  13618. zoom: _ctx.zoom,
  13619. show: _ctx.show,
  13620. customStyle: {
  13621. borderRadius: "6px",
  13622. overflow: "hidden",
  13623. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  13624. },
  13625. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  13626. safeAreaInsetBottom: false,
  13627. duration: 400,
  13628. onClick: $options.clickHandler
  13629. }, {
  13630. default: vue.withCtx(() => [
  13631. vue.createElementVNode(
  13632. "view",
  13633. {
  13634. class: "u-modal",
  13635. style: vue.normalizeStyle({
  13636. width: _ctx.$u.addUnit(_ctx.width)
  13637. })
  13638. },
  13639. [
  13640. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13641. "text",
  13642. {
  13643. key: 0,
  13644. class: "u-modal__title"
  13645. },
  13646. vue.toDisplayString(_ctx.title),
  13647. 1
  13648. /* TEXT */
  13649. )) : vue.createCommentVNode("v-if", true),
  13650. vue.createElementVNode(
  13651. "view",
  13652. {
  13653. class: "u-modal__content",
  13654. style: vue.normalizeStyle({
  13655. paddingTop: `${_ctx.title ? 12 : 25}px`
  13656. })
  13657. },
  13658. [
  13659. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  13660. vue.createElementVNode(
  13661. "text",
  13662. { class: "u-modal__content__text" },
  13663. vue.toDisplayString(_ctx.content),
  13664. 1
  13665. /* TEXT */
  13666. )
  13667. ], true)
  13668. ],
  13669. 4
  13670. /* STYLE */
  13671. ),
  13672. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  13673. key: 1,
  13674. class: "u-modal__button-group--confirm-button"
  13675. }, [
  13676. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  13677. ])) : (vue.openBlock(), vue.createElementBlock(
  13678. vue.Fragment,
  13679. { key: 2 },
  13680. [
  13681. vue.createVNode(_component_u_line),
  13682. vue.createElementVNode(
  13683. "view",
  13684. {
  13685. class: "u-modal__button-group",
  13686. style: vue.normalizeStyle({
  13687. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  13688. })
  13689. },
  13690. [
  13691. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  13692. "view",
  13693. {
  13694. key: 0,
  13695. class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel", [_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"]]),
  13696. "hover-stay-time": 150,
  13697. "hover-class": "u-modal__button-group__wrapper--hover",
  13698. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  13699. },
  13700. [
  13701. vue.createElementVNode(
  13702. "text",
  13703. {
  13704. class: "u-modal__button-group__wrapper__text",
  13705. style: vue.normalizeStyle({
  13706. color: _ctx.cancelColor
  13707. })
  13708. },
  13709. vue.toDisplayString(_ctx.cancelText),
  13710. 5
  13711. /* TEXT, STYLE */
  13712. )
  13713. ],
  13714. 2
  13715. /* CLASS */
  13716. )) : vue.createCommentVNode("v-if", true),
  13717. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  13718. key: 1,
  13719. direction: "column"
  13720. })) : vue.createCommentVNode("v-if", true),
  13721. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  13722. "view",
  13723. {
  13724. key: 2,
  13725. class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm", [!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"]]),
  13726. "hover-stay-time": 150,
  13727. "hover-class": "u-modal__button-group__wrapper--hover",
  13728. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  13729. },
  13730. [
  13731. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  13732. "text",
  13733. {
  13734. key: 1,
  13735. class: "u-modal__button-group__wrapper__text",
  13736. style: vue.normalizeStyle({
  13737. color: _ctx.confirmColor
  13738. })
  13739. },
  13740. vue.toDisplayString(_ctx.confirmText),
  13741. 5
  13742. /* TEXT, STYLE */
  13743. ))
  13744. ],
  13745. 2
  13746. /* CLASS */
  13747. )) : vue.createCommentVNode("v-if", true)
  13748. ],
  13749. 4
  13750. /* STYLE */
  13751. )
  13752. ],
  13753. 64
  13754. /* STABLE_FRAGMENT */
  13755. ))
  13756. ],
  13757. 4
  13758. /* STYLE */
  13759. )
  13760. ]),
  13761. _: 3
  13762. /* FORWARDED */
  13763. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  13764. }
  13765. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-f667648f"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  13766. const _sfc_main$1s = {
  13767. __name: "ApproveButton",
  13768. emits: ["approve"],
  13769. setup(__props, { expose: __expose, emit: __emit }) {
  13770. __expose();
  13771. const emit2 = __emit;
  13772. const showConfirmModal = vue.ref(false);
  13773. const handleApprove = () => {
  13774. showConfirmModal.value = true;
  13775. };
  13776. const confirmApprove = () => {
  13777. emit2("approve");
  13778. showConfirmModal.value = false;
  13779. };
  13780. const __returned__ = { emit: emit2, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
  13781. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13782. return __returned__;
  13783. }
  13784. };
  13785. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  13786. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  13787. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  13788. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  13789. vue.createVNode(
  13790. _component_u_button,
  13791. vue.mergeProps({
  13792. type: "success",
  13793. text: "同意",
  13794. size: "small",
  13795. onClick: $setup.handleApprove
  13796. }, _ctx.$attrs),
  13797. null,
  13798. 16
  13799. /* FULL_PROPS */
  13800. ),
  13801. vue.createCommentVNode(" 确认弹窗 "),
  13802. vue.createVNode(_component_u_modal, {
  13803. show: $setup.showConfirmModal,
  13804. title: "确认",
  13805. content: "确认收到货了吗?",
  13806. onConfirm: $setup.confirmApprove,
  13807. showCancelButton: "",
  13808. "content-style": { textAlign: "center" },
  13809. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
  13810. }, null, 8, ["show"])
  13811. ]);
  13812. }
  13813. const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/ApproveButton.vue"]]);
  13814. const props$f = {
  13815. props: {
  13816. // 是否展示工具条
  13817. show: {
  13818. type: Boolean,
  13819. default: props$G.toolbar.show
  13820. },
  13821. // 取消按钮的文字
  13822. cancelText: {
  13823. type: String,
  13824. default: props$G.toolbar.cancelText
  13825. },
  13826. // 确认按钮的文字
  13827. confirmText: {
  13828. type: String,
  13829. default: props$G.toolbar.confirmText
  13830. },
  13831. // 取消按钮的颜色
  13832. cancelColor: {
  13833. type: String,
  13834. default: props$G.toolbar.cancelColor
  13835. },
  13836. // 确认按钮的颜色
  13837. confirmColor: {
  13838. type: String,
  13839. default: props$G.toolbar.confirmColor
  13840. },
  13841. // 标题文字
  13842. title: {
  13843. type: String,
  13844. default: props$G.toolbar.title
  13845. }
  13846. }
  13847. };
  13848. const _sfc_main$1r = {
  13849. name: "u-toolbar",
  13850. mixins: [mpMixin, mixin, props$f],
  13851. methods: {
  13852. // 点击取消按钮
  13853. cancel() {
  13854. this.$emit("cancel");
  13855. },
  13856. // 点击确定按钮
  13857. confirm() {
  13858. this.$emit("confirm");
  13859. }
  13860. }
  13861. };
  13862. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  13863. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  13864. "view",
  13865. {
  13866. key: 0,
  13867. class: "u-toolbar",
  13868. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  13869. },
  13870. [
  13871. vue.createElementVNode("view", {
  13872. class: "u-toolbar__cancel__wrapper",
  13873. "hover-class": "u-hover-class"
  13874. }, [
  13875. vue.createElementVNode(
  13876. "text",
  13877. {
  13878. class: "u-toolbar__wrapper__cancel",
  13879. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  13880. style: vue.normalizeStyle({
  13881. color: _ctx.cancelColor
  13882. })
  13883. },
  13884. vue.toDisplayString(_ctx.cancelText),
  13885. 5
  13886. /* TEXT, STYLE */
  13887. )
  13888. ]),
  13889. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13890. "text",
  13891. {
  13892. key: 0,
  13893. class: "u-toolbar__title u-line-1"
  13894. },
  13895. vue.toDisplayString(_ctx.title),
  13896. 1
  13897. /* TEXT */
  13898. )) : vue.createCommentVNode("v-if", true),
  13899. vue.createElementVNode("view", {
  13900. class: "u-toolbar__confirm__wrapper",
  13901. "hover-class": "u-hover-class"
  13902. }, [
  13903. vue.createElementVNode(
  13904. "text",
  13905. {
  13906. class: "u-toolbar__wrapper__confirm",
  13907. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  13908. style: vue.normalizeStyle({
  13909. color: _ctx.confirmColor
  13910. })
  13911. },
  13912. vue.toDisplayString(_ctx.confirmText),
  13913. 5
  13914. /* TEXT, STYLE */
  13915. )
  13916. ])
  13917. ],
  13918. 32
  13919. /* NEED_HYDRATION */
  13920. )) : vue.createCommentVNode("v-if", true);
  13921. }
  13922. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-eadae74e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  13923. const props$e = {
  13924. props: {
  13925. // 是否展示picker弹窗
  13926. show: {
  13927. type: Boolean,
  13928. default: props$G.picker.show
  13929. },
  13930. // 是否展示顶部的操作栏
  13931. showToolbar: {
  13932. type: Boolean,
  13933. default: props$G.picker.showToolbar
  13934. },
  13935. // 顶部标题
  13936. title: {
  13937. type: String,
  13938. default: props$G.picker.title
  13939. },
  13940. // 对象数组,设置每一列的数据
  13941. columns: {
  13942. type: Array,
  13943. default: props$G.picker.columns
  13944. },
  13945. // 是否显示加载中状态
  13946. loading: {
  13947. type: Boolean,
  13948. default: props$G.picker.loading
  13949. },
  13950. // 各列中,单个选项的高度
  13951. itemHeight: {
  13952. type: [String, Number],
  13953. default: props$G.picker.itemHeight
  13954. },
  13955. // 取消按钮的文字
  13956. cancelText: {
  13957. type: String,
  13958. default: props$G.picker.cancelText
  13959. },
  13960. // 确认按钮的文字
  13961. confirmText: {
  13962. type: String,
  13963. default: props$G.picker.confirmText
  13964. },
  13965. // 取消按钮的颜色
  13966. cancelColor: {
  13967. type: String,
  13968. default: props$G.picker.cancelColor
  13969. },
  13970. // 确认按钮的颜色
  13971. confirmColor: {
  13972. type: String,
  13973. default: props$G.picker.confirmColor
  13974. },
  13975. // 每列中可见选项的数量
  13976. visibleItemCount: {
  13977. type: [String, Number],
  13978. default: props$G.picker.visibleItemCount
  13979. },
  13980. // 选项对象中,需要展示的属性键名
  13981. keyName: {
  13982. type: String,
  13983. default: props$G.picker.keyName
  13984. },
  13985. // 是否允许点击遮罩关闭选择器
  13986. closeOnClickOverlay: {
  13987. type: Boolean,
  13988. default: props$G.picker.closeOnClickOverlay
  13989. },
  13990. // 各列的默认索引
  13991. defaultIndex: {
  13992. type: Array,
  13993. default: props$G.picker.defaultIndex
  13994. },
  13995. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  13996. immediateChange: {
  13997. type: Boolean,
  13998. default: props$G.picker.immediateChange
  13999. }
  14000. }
  14001. };
  14002. const _sfc_main$1q = {
  14003. name: "u-picker",
  14004. mixins: [mpMixin, mixin, props$e],
  14005. data() {
  14006. return {
  14007. // 上一次选择的列索引
  14008. lastIndex: [],
  14009. // 索引值 ,对应picker-view的value
  14010. innerIndex: [],
  14011. // 各列的值
  14012. innerColumns: [],
  14013. // 上一次的变化列索引
  14014. columnIndex: 0
  14015. };
  14016. },
  14017. watch: {
  14018. // 监听默认索引的变化,重新设置对应的值
  14019. defaultIndex: {
  14020. immediate: true,
  14021. handler(n) {
  14022. this.setIndexs(n, true);
  14023. }
  14024. },
  14025. // 监听columns参数的变化
  14026. columns: {
  14027. immediate: true,
  14028. deep: true,
  14029. handler(n) {
  14030. this.setColumns(n);
  14031. }
  14032. }
  14033. },
  14034. emits: ["close", "cancel", "confirm", "change"],
  14035. methods: {
  14036. // 获取item需要显示的文字,判别为对象还是文本
  14037. getItemText(item) {
  14038. if (uni.$u.test.object(item)) {
  14039. return item[this.keyName];
  14040. } else {
  14041. return item;
  14042. }
  14043. },
  14044. // 关闭选择器
  14045. closeHandler() {
  14046. if (this.closeOnClickOverlay) {
  14047. this.$emit("close");
  14048. }
  14049. },
  14050. // 点击工具栏的取消按钮
  14051. cancel() {
  14052. this.$emit("cancel");
  14053. },
  14054. // 点击工具栏的确定按钮
  14055. confirm() {
  14056. this.$emit("confirm", {
  14057. indexs: this.innerIndex,
  14058. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  14059. values: this.innerColumns
  14060. });
  14061. },
  14062. // 选择器某一列的数据发生变化时触发
  14063. changeHandler(e) {
  14064. const {
  14065. value: value2
  14066. } = e.detail;
  14067. let index2 = 0, columnIndex = 0;
  14068. for (let i = 0; i < value2.length; i++) {
  14069. let item = value2[i];
  14070. if (item !== (this.lastIndex[i] || 0)) {
  14071. columnIndex = i;
  14072. index2 = item;
  14073. break;
  14074. }
  14075. }
  14076. this.columnIndex = columnIndex;
  14077. const values = this.innerColumns;
  14078. this.setLastIndex(value2);
  14079. this.setIndexs(value2);
  14080. this.$emit("change", {
  14081. // 微信小程序不能传递this,会因为循环引用而报错
  14082. picker: this,
  14083. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  14084. index: index2,
  14085. indexs: value2,
  14086. // values为当前变化列的数组内容
  14087. values,
  14088. columnIndex
  14089. });
  14090. },
  14091. // 设置index索引,此方法可被外部调用设置
  14092. setIndexs(index2, setLastIndex) {
  14093. this.innerIndex = uni.$u.deepClone(index2);
  14094. if (setLastIndex) {
  14095. this.setLastIndex(index2);
  14096. }
  14097. },
  14098. // 记录上一次的各列索引位置
  14099. setLastIndex(index2) {
  14100. this.lastIndex = uni.$u.deepClone(index2);
  14101. },
  14102. // 设置对应列选项的所有值
  14103. setColumnValues(columnIndex, values) {
  14104. this.innerColumns.splice(columnIndex, 1, values);
  14105. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  14106. for (let i = 0; i < this.innerColumns.length; i++) {
  14107. if (i > this.columnIndex) {
  14108. tmpIndex[i] = 0;
  14109. }
  14110. }
  14111. this.setIndexs(tmpIndex);
  14112. },
  14113. // 获取对应列的所有选项
  14114. getColumnValues(columnIndex) {
  14115. (async () => {
  14116. await uni.$u.sleep();
  14117. })();
  14118. return this.innerColumns[columnIndex];
  14119. },
  14120. // 设置整体各列的columns的值
  14121. setColumns(columns) {
  14122. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  14123. this.innerColumns = uni.$u.deepClone(columns);
  14124. if (this.innerIndex.length === 0) {
  14125. this.innerIndex = new Array(columns.length).fill(0);
  14126. }
  14127. },
  14128. // 获取各列选中值对应的索引
  14129. getIndexs() {
  14130. return this.innerIndex;
  14131. },
  14132. // 获取各列选中的值
  14133. getValues() {
  14134. (async () => {
  14135. await uni.$u.sleep();
  14136. })();
  14137. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  14138. }
  14139. }
  14140. };
  14141. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  14142. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$4);
  14143. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  14144. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  14145. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  14146. show: _ctx.show,
  14147. onClose: $options.closeHandler
  14148. }, {
  14149. default: vue.withCtx(() => [
  14150. vue.createElementVNode("view", { class: "u-picker" }, [
  14151. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  14152. key: 0,
  14153. cancelColor: _ctx.cancelColor,
  14154. confirmColor: _ctx.confirmColor,
  14155. cancelText: _ctx.cancelText,
  14156. confirmText: _ctx.confirmText,
  14157. title: _ctx.title,
  14158. onCancel: $options.cancel,
  14159. onConfirm: $options.confirm
  14160. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  14161. vue.createElementVNode("picker-view", {
  14162. class: "u-picker__view",
  14163. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  14164. value: $data.innerIndex,
  14165. immediateChange: _ctx.immediateChange,
  14166. style: vue.normalizeStyle({
  14167. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  14168. }),
  14169. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  14170. }, [
  14171. (vue.openBlock(true), vue.createElementBlock(
  14172. vue.Fragment,
  14173. null,
  14174. vue.renderList($data.innerColumns, (item, index2) => {
  14175. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  14176. key: index2,
  14177. class: "u-picker__view__column"
  14178. }, [
  14179. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  14180. vue.Fragment,
  14181. { key: 0 },
  14182. vue.renderList(item, (item1, index1) => {
  14183. return vue.openBlock(), vue.createElementBlock(
  14184. "text",
  14185. {
  14186. class: "u-picker__view__column__item u-line-1",
  14187. key: index1,
  14188. style: vue.normalizeStyle({
  14189. height: _ctx.$u.addUnit(_ctx.itemHeight),
  14190. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  14191. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  14192. })
  14193. },
  14194. vue.toDisplayString($options.getItemText(item1)),
  14195. 5
  14196. /* TEXT, STYLE */
  14197. );
  14198. }),
  14199. 128
  14200. /* KEYED_FRAGMENT */
  14201. )) : vue.createCommentVNode("v-if", true)
  14202. ]);
  14203. }),
  14204. 128
  14205. /* KEYED_FRAGMENT */
  14206. ))
  14207. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  14208. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  14209. key: 1,
  14210. class: "u-picker--loading"
  14211. }, [
  14212. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  14213. ])) : vue.createCommentVNode("v-if", true)
  14214. ])
  14215. ]),
  14216. _: 1
  14217. /* STABLE */
  14218. }, 8, ["show", "onClose"]);
  14219. }
  14220. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-91b05052"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  14221. const _sfc_main$1p = {
  14222. __name: "RejectButton",
  14223. emits: ["reject"],
  14224. setup(__props, { expose: __expose, emit: __emit }) {
  14225. __expose();
  14226. const emit2 = __emit;
  14227. const showRejectPicker = vue.ref(false);
  14228. const rejectReasons = vue.ref([]);
  14229. const getRejectReason = async () => {
  14230. const res2 = await uni.$u.http.get("/app/sysDict/getDict?key=route_exception_reason ");
  14231. if (res2.code == 200) {
  14232. rejectReasons.value = res2.data.map((item) => item.dictValue);
  14233. }
  14234. };
  14235. getRejectReason();
  14236. const handleReject = () => {
  14237. showRejectPicker.value = true;
  14238. };
  14239. const confirmReject = (e) => {
  14240. const reason = e.value[0];
  14241. emit2("reject", reason);
  14242. showRejectPicker.value = false;
  14243. };
  14244. const __returned__ = { emit: emit2, showRejectPicker, rejectReasons, getRejectReason, handleReject, confirmReject, ref: vue.ref };
  14245. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14246. return __returned__;
  14247. }
  14248. };
  14249. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  14250. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14251. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  14252. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  14253. vue.createVNode(
  14254. _component_u_button,
  14255. vue.mergeProps({
  14256. type: "warning",
  14257. text: "驳回",
  14258. size: "small",
  14259. onClick: $setup.handleReject
  14260. }, _ctx.$attrs),
  14261. null,
  14262. 16
  14263. /* FULL_PROPS */
  14264. ),
  14265. vue.createCommentVNode(" 驳回原因选择器 "),
  14266. vue.createVNode(_component_u_picker, {
  14267. show: $setup.showRejectPicker,
  14268. columns: [$setup.rejectReasons],
  14269. onConfirm: $setup.confirmReject,
  14270. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
  14271. }, null, 8, ["show", "columns"])
  14272. ]);
  14273. }
  14274. const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/RejectButton.vue"]]);
  14275. const _sfc_main$1o = {
  14276. __name: "ExceptionItem",
  14277. props: {
  14278. order: {
  14279. type: Object,
  14280. default: () => ({
  14281. orderNo: "",
  14282. expressNo: "",
  14283. estimatedPrice: "",
  14284. pusher: "",
  14285. pushTime: ""
  14286. })
  14287. }
  14288. },
  14289. emits: ["refresh"],
  14290. setup(__props, { expose: __expose, emit: __emit }) {
  14291. __expose();
  14292. const props2 = __props;
  14293. const emit2 = __emit;
  14294. const handleCheckLogistics = () => {
  14295. uni.redirectTo({
  14296. url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
  14297. });
  14298. };
  14299. function handleButtonClick(checkStatus, reason) {
  14300. uni.$u.http.post("/app/orderexception/update", {
  14301. id: props2.order.id,
  14302. checkStatus,
  14303. refusalReason: reason
  14304. }).then((res2) => {
  14305. if (res2.code == 200) {
  14306. if (checkStatus == 2) {
  14307. let text = props2.order.waybillCode + "签收成功";
  14308. uni.$u.ttsModule.speak(text);
  14309. }
  14310. uni.$u.toast("操作成功");
  14311. emit2("refresh");
  14312. } else {
  14313. uni.$u.toast(res2.msg);
  14314. }
  14315. });
  14316. }
  14317. const __returned__ = { props: props2, emit: emit2, handleCheckLogistics, handleButtonClick, ref: vue.ref, ApproveButton, RejectButton };
  14318. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14319. return __returned__;
  14320. }
  14321. };
  14322. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  14323. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14324. const _directive_permission = vue.resolveDirective("permission");
  14325. return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
  14326. vue.createCommentVNode(" 订单信息 "),
  14327. vue.createElementVNode("view", { class: "info-section flex-1" }, [
  14328. vue.createElementVNode("view", { class: "info-row" }, [
  14329. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  14330. vue.createElementVNode(
  14331. "text",
  14332. { class: "value" },
  14333. vue.toDisplayString($props.order.orderId),
  14334. 1
  14335. /* TEXT */
  14336. )
  14337. ]),
  14338. vue.createElementVNode("view", { class: "info-row" }, [
  14339. vue.createElementVNode("text", { class: "label" }, "快递单号:"),
  14340. vue.createElementVNode(
  14341. "text",
  14342. { class: "value" },
  14343. vue.toDisplayString($props.order.waybillCode),
  14344. 1
  14345. /* TEXT */
  14346. )
  14347. ]),
  14348. vue.createElementVNode("view", { class: "info-row" }, [
  14349. vue.createElementVNode("text", { class: "label" }, "预估单价:"),
  14350. vue.createElementVNode(
  14351. "text",
  14352. { class: "value" },
  14353. vue.toDisplayString($props.order.expectMoney) + "元",
  14354. 1
  14355. /* TEXT */
  14356. )
  14357. ]),
  14358. vue.createElementVNode("view", { class: "info-row" }, [
  14359. vue.createElementVNode("text", { class: "label" }, "推送人:"),
  14360. vue.createElementVNode(
  14361. "text",
  14362. { class: "value" },
  14363. vue.toDisplayString($props.order.createName),
  14364. 1
  14365. /* TEXT */
  14366. )
  14367. ]),
  14368. vue.createElementVNode("view", {
  14369. class: "info-row",
  14370. style: { "margin-bottom": "0" }
  14371. }, [
  14372. vue.createElementVNode("text", { class: "label" }, "推送时间:"),
  14373. vue.createElementVNode(
  14374. "text",
  14375. { class: "value" },
  14376. vue.toDisplayString($props.order.createTime),
  14377. 1
  14378. /* TEXT */
  14379. )
  14380. ])
  14381. ]),
  14382. vue.createCommentVNode(" 操作按钮 "),
  14383. vue.createElementVNode("view", { class: "action-section" }, [
  14384. vue.createVNode(_component_u_button, {
  14385. type: "primary",
  14386. text: "查看物流",
  14387. size: "small",
  14388. onClick: $setup.handleCheckLogistics
  14389. }),
  14390. $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
  14391. $setup["ApproveButton"],
  14392. {
  14393. key: 0,
  14394. onApprove: _cache[0] || (_cache[0] = ($event) => $setup.handleButtonClick(2))
  14395. },
  14396. null,
  14397. 512
  14398. /* NEED_PATCH */
  14399. )), [
  14400. [_directive_permission, "app:express:exception:approve"]
  14401. ]) : vue.createCommentVNode("v-if", true),
  14402. $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
  14403. $setup["RejectButton"],
  14404. {
  14405. key: 1,
  14406. onReject: _cache[1] || (_cache[1] = (reason) => $setup.handleButtonClick(3, reason))
  14407. },
  14408. null,
  14409. 512
  14410. /* NEED_PATCH */
  14411. )), [
  14412. [_directive_permission, "app:express:exception:reject"]
  14413. ]) : vue.createCommentVNode("v-if", true),
  14414. $props.order.checkStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  14415. key: 2,
  14416. style: { "color": "#19be6b" }
  14417. }, "[已签收]")) : vue.createCommentVNode("v-if", true),
  14418. $props.order.checkStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  14419. key: 3,
  14420. style: { "color": "#f00" }
  14421. }, "[已驳回]")) : vue.createCommentVNode("v-if", true)
  14422. ])
  14423. ]);
  14424. }
  14425. const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-e0527396"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/ExceptionItem.vue"]]);
  14426. const _sfc_main$1n = {
  14427. __name: "route-exception",
  14428. setup(__props, { expose: __expose }) {
  14429. __expose();
  14430. const tabList = ["待处理订单", "历史异常签收"];
  14431. const curNow = vue.ref(0);
  14432. const exceptionList = vue.ref([]);
  14433. let urlList = ["/app/orderexception/pagelist", "/app/orderexception/getPageLoglist"];
  14434. const requestStr = vue.ref(urlList[0]);
  14435. function sectionChange(index2) {
  14436. curNow.value = index2;
  14437. requestStr.value = urlList[index2];
  14438. handleSearch();
  14439. }
  14440. const pageScrollRef = vue.ref(null);
  14441. const otherParams = vue.ref({ search: "" });
  14442. const updateList = (list) => {
  14443. exceptionList.value = list;
  14444. };
  14445. const handleSearch = () => {
  14446. var _a;
  14447. (_a = pageScrollRef.value) == null ? void 0 : _a.resetUpScroll();
  14448. };
  14449. const handleScan = () => {
  14450. uni.scanCode({
  14451. success: (res2) => {
  14452. otherParams.value.search = res2.result;
  14453. handleSearch();
  14454. }
  14455. });
  14456. };
  14457. onLoad(() => {
  14458. uni.$u.useGlobalEvent((e) => {
  14459. otherParams.value.search = e.barcode;
  14460. handleSearch();
  14461. });
  14462. });
  14463. onShow(() => {
  14464. uni.$u.updateActivePageOnShow();
  14465. });
  14466. onUnload(() => {
  14467. uni.$u.cleanupOnPageUnload();
  14468. });
  14469. const __returned__ = { tabList, curNow, exceptionList, get urlList() {
  14470. return urlList;
  14471. }, set urlList(v) {
  14472. urlList = v;
  14473. }, requestStr, sectionChange, pageScrollRef, otherParams, updateList, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  14474. return onLoad;
  14475. }, get onShow() {
  14476. return onShow;
  14477. }, get onUnload() {
  14478. return onUnload;
  14479. }, ExceptionItem, PageScroll: pageScroll };
  14480. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14481. return __returned__;
  14482. }
  14483. };
  14484. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  14485. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  14486. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  14487. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  14488. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  14489. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14490. vue.createCommentVNode(" 列表区域 "),
  14491. vue.createVNode($setup["PageScroll"], {
  14492. ref: "pageScrollRef",
  14493. height: "100vh",
  14494. requestStr: $setup.requestStr,
  14495. onUpdateList: $setup.updateList,
  14496. otherParams: $setup.otherParams
  14497. }, {
  14498. default: vue.withCtx(() => [
  14499. vue.createVNode(_component_u_sticky, { "offset-top": 0 }, {
  14500. default: vue.withCtx(() => [
  14501. vue.createCommentVNode(" 顶部标签页 "),
  14502. vue.createVNode(_component_u_subsection, {
  14503. fontSize: "16",
  14504. list: $setup.tabList,
  14505. current: $setup.curNow,
  14506. onChange: $setup.sectionChange,
  14507. mode: "subsection",
  14508. class: "tabs-list"
  14509. }, null, 8, ["current"])
  14510. ]),
  14511. _: 1
  14512. /* STABLE */
  14513. }),
  14514. vue.createElementVNode("view", { class: "list-container" }, [
  14515. (vue.openBlock(true), vue.createElementBlock(
  14516. vue.Fragment,
  14517. null,
  14518. vue.renderList($setup.exceptionList, (item) => {
  14519. return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
  14520. key: item.orderNo,
  14521. order: item,
  14522. onRefresh: $setup.handleSearch
  14523. }, null, 8, ["order"]);
  14524. }),
  14525. 128
  14526. /* KEYED_FRAGMENT */
  14527. ))
  14528. ])
  14529. ]),
  14530. _: 1
  14531. /* STABLE */
  14532. }, 8, ["requestStr", "otherParams"]),
  14533. vue.createCommentVNode(" 底部搜索框 "),
  14534. vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
  14535. vue.createVNode(_component_u_search, {
  14536. modelValue: $setup.otherParams.search,
  14537. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  14538. placeholder: "请输入物流单号/订单编号",
  14539. "show-action": false,
  14540. inputStyle: { fontSize: "32rpx" },
  14541. onSearch: $setup.handleSearch,
  14542. height: "80rpx",
  14543. shape: "round"
  14544. }, null, 8, ["modelValue"]),
  14545. vue.createVNode(_component_u_icon, {
  14546. name: "scan",
  14547. size: "28",
  14548. color: "#19be6b",
  14549. onClick: $setup.handleScan
  14550. })
  14551. ])
  14552. ]);
  14553. }
  14554. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-388e5b84"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/route-exception.vue"]]);
  14555. const placeholderStyle$2 = "font-size:32rpx";
  14556. const _sfc_main$1m = {
  14557. __name: "warehouse-sign",
  14558. setup(__props, { expose: __expose }) {
  14559. __expose();
  14560. const customStyle = vue.reactive({
  14561. height: "90rpx"
  14562. });
  14563. const selectedWarehouse = vue.ref("");
  14564. const form = vue.ref({
  14565. "packageCode": "",
  14566. "godownId": ""
  14567. });
  14568. const showSelector = vue.ref(false);
  14569. function openWarehouseSelector() {
  14570. showSelector.value = true;
  14571. }
  14572. function handleWarehouseSelected(item) {
  14573. selectedWarehouse.value = item.godownName;
  14574. form.value.godownId = item.id;
  14575. }
  14576. function scanCode() {
  14577. uni.scanCode({
  14578. success: (res2) => {
  14579. form.value.packageCode = res2.result;
  14580. handleBarcode(res2.result);
  14581. },
  14582. fail: (err) => {
  14583. uni.$u.toast("扫码失败");
  14584. }
  14585. });
  14586. }
  14587. function handleBarcode(code2) {
  14588. if (!code2)
  14589. return uni.$u.toast("请输入物流单号");
  14590. uni.$u.http.post("/app/ordersign/toGodownSign", form.value).then((res2) => {
  14591. if (res2.code == 200) {
  14592. let text = code2 + "到仓签收成功";
  14593. uni.$u.ttsModule.speak(text);
  14594. } else {
  14595. let text = code2 + "订单不存在";
  14596. uni.$u.ttsModule.speak(text);
  14597. }
  14598. });
  14599. }
  14600. function getUserBindWarehouse() {
  14601. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  14602. var _a, _b;
  14603. if (res2.code == 200) {
  14604. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  14605. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  14606. }
  14607. });
  14608. }
  14609. onLoad(() => {
  14610. getUserBindWarehouse();
  14611. uni.$u.useGlobalEvent((e) => {
  14612. form.value.packageCode = e.barcode;
  14613. handleBarcode(e.barcode);
  14614. });
  14615. });
  14616. onShow(() => {
  14617. uni.$u.updateActivePageOnShow();
  14618. });
  14619. onUnload(() => {
  14620. uni.$u.cleanupOnPageUnload();
  14621. });
  14622. const __returned__ = { placeholderStyle: placeholderStyle$2, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  14623. return onLoad;
  14624. }, get onShow() {
  14625. return onShow;
  14626. }, get onUnload() {
  14627. return onUnload;
  14628. }, WarehouseSelector };
  14629. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14630. return __returned__;
  14631. }
  14632. };
  14633. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  14634. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  14635. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14636. const _directive_permission = vue.resolveDirective("permission");
  14637. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14638. vue.createElementVNode("view", { class: "main-content" }, [
  14639. vue.createElementVNode("view", { class: "input-group" }, [
  14640. vue.createVNode(_component_u_input, {
  14641. customStyle: $setup.customStyle,
  14642. "placeholder-style": $setup.placeholderStyle,
  14643. modelValue: $setup.selectedWarehouse,
  14644. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  14645. placeholder: "请选择仓库",
  14646. readonly: "",
  14647. border: "surround"
  14648. }, null, 8, ["customStyle", "modelValue"]),
  14649. vue.createVNode(_component_u_button, {
  14650. customStyle: $setup.customStyle,
  14651. type: "info",
  14652. color: "#a4adb3",
  14653. onClick: $setup.openWarehouseSelector,
  14654. text: "选择"
  14655. }, null, 8, ["customStyle"])
  14656. ]),
  14657. vue.createElementVNode("view", { class: "input-group" }, [
  14658. vue.createVNode(_component_u_input, {
  14659. customStyle: $setup.customStyle,
  14660. "placeholder-style": $setup.placeholderStyle,
  14661. modelValue: $setup.form.packageCode,
  14662. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  14663. placeholder: "扫描/输入物流单号",
  14664. border: "surround"
  14665. }, null, 8, ["customStyle", "modelValue"]),
  14666. vue.withDirectives(vue.createVNode(_component_u_button, {
  14667. customStyle: $setup.customStyle,
  14668. type: "info",
  14669. color: "#a4adb3",
  14670. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  14671. text: "确定"
  14672. }, null, 8, ["customStyle"]), [
  14673. [_directive_permission, "app:express:warehouseSign:confirm"]
  14674. ])
  14675. ])
  14676. ]),
  14677. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14678. vue.createVNode(_component_u_button, {
  14679. size: "large",
  14680. type: "success",
  14681. onClick: $setup.scanCode,
  14682. text: "扫码",
  14683. class: "scan-button"
  14684. })
  14685. ]),
  14686. vue.createVNode($setup["WarehouseSelector"], {
  14687. show: $setup.showSelector,
  14688. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  14689. onWarehouseSelected: $setup.handleWarehouseSelected
  14690. }, null, 8, ["show"])
  14691. ]);
  14692. }
  14693. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-7473f06e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/warehouse-sign.vue"]]);
  14694. const placeholderStyle$1 = "font-size:32rpx";
  14695. const _sfc_main$1l = {
  14696. __name: "weight-modify",
  14697. setup(__props, { expose: __expose }) {
  14698. __expose();
  14699. const customStyle = vue.reactive({
  14700. height: "90rpx"
  14701. });
  14702. const formRef = vue.ref(null);
  14703. const form = vue.ref({
  14704. "packageCode": "",
  14705. "batchNum": "",
  14706. "godownId": "",
  14707. "otherInfo": "",
  14708. "actualWeight": "",
  14709. "imgUrlList": []
  14710. });
  14711. const rules2 = {
  14712. packageCode: [{
  14713. required: true,
  14714. message: "请输入物流单号",
  14715. trigger: "blur"
  14716. }],
  14717. actualWeight: [{
  14718. required: true,
  14719. message: "请输入重量",
  14720. trigger: "blur"
  14721. }]
  14722. };
  14723. function scanCode() {
  14724. uni.scanCode({
  14725. success: (res2) => {
  14726. form.value.packageCode = res2.result;
  14727. },
  14728. fail: (err) => {
  14729. uni.$u.toast("扫码失败");
  14730. }
  14731. });
  14732. }
  14733. function submitForm() {
  14734. formRef.value.validate().then((valid) => {
  14735. if (valid) {
  14736. uni.$u.http.post("/app/ordersign/changeWeight", form.value).then((res2) => {
  14737. if (res2.code == 200) {
  14738. uni.$u.toast("重量修改成功");
  14739. let text = code + "已提交审核";
  14740. uni.$u.ttsModule.speak(text);
  14741. } else {
  14742. let text = code + "订单不存在";
  14743. uni.$u.ttsModule.speak(text);
  14744. }
  14745. });
  14746. }
  14747. });
  14748. }
  14749. onLoad(() => {
  14750. uni.$u.useGlobalEvent((e) => {
  14751. form.value.packageCode = e.barcode;
  14752. });
  14753. });
  14754. onShow(() => {
  14755. uni.$u.updateActivePageOnShow();
  14756. });
  14757. onUnload(() => {
  14758. uni.$u.cleanupOnPageUnload();
  14759. });
  14760. const __returned__ = { placeholderStyle: placeholderStyle$1, customStyle, formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  14761. return onLoad;
  14762. }, get onShow() {
  14763. return onShow;
  14764. }, get onUnload() {
  14765. return onUnload;
  14766. }, cyUpload };
  14767. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14768. return __returned__;
  14769. }
  14770. };
  14771. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  14772. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  14773. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  14774. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
  14775. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14776. const _directive_permission = vue.resolveDirective("permission");
  14777. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14778. vue.createVNode(_component_u__form, {
  14779. ref: "formRef",
  14780. model: $setup.form,
  14781. rules: $setup.rules,
  14782. "label-width": "165px",
  14783. "label-position": "top",
  14784. labelStyle: { fontSize: "32rpx" },
  14785. errorType: "toast"
  14786. }, {
  14787. default: vue.withCtx(() => [
  14788. vue.createCommentVNode(" 物流单号输入 "),
  14789. vue.createVNode(_component_u_form_item, {
  14790. label: "",
  14791. prop: "packageCode"
  14792. }, {
  14793. default: vue.withCtx(() => [
  14794. vue.createVNode(_component_u_input, {
  14795. placeholderStyle: $setup.placeholderStyle,
  14796. customStyle: $setup.customStyle,
  14797. modelValue: $setup.form.packageCode,
  14798. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.packageCode = $event),
  14799. placeholder: "扫描/输入物流单号",
  14800. border: "surround",
  14801. name: "packageCode"
  14802. }, null, 8, ["customStyle", "modelValue"])
  14803. ]),
  14804. _: 1
  14805. /* STABLE */
  14806. }),
  14807. vue.createCommentVNode(" 重量输入 "),
  14808. vue.createVNode(_component_u_form_item, {
  14809. label: "重量(kg)",
  14810. prop: "actualWeight"
  14811. }, {
  14812. default: vue.withCtx(() => [
  14813. vue.createVNode(_component_u_input, {
  14814. placeholderStyle: $setup.placeholderStyle,
  14815. customStyle: $setup.customStyle,
  14816. modelValue: $setup.form.actualWeight,
  14817. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.actualWeight = $event),
  14818. placeholder: "请输入重量",
  14819. border: "surround",
  14820. name: "actualWeight",
  14821. type: "number"
  14822. }, null, 8, ["customStyle", "modelValue"])
  14823. ]),
  14824. _: 1
  14825. /* STABLE */
  14826. }),
  14827. vue.createCommentVNode(" 图片上传 "),
  14828. vue.createVNode(_component_u_form_item, {
  14829. label: "上传图片",
  14830. prop: "imgUrlList"
  14831. }, {
  14832. default: vue.withCtx(() => [
  14833. vue.createVNode($setup["cyUpload"], {
  14834. filename: $setup.form.imgUrlList,
  14835. "onUpdate:filename": _cache[2] || (_cache[2] = ($event) => $setup.form.imgUrlList = $event),
  14836. name: "imgUrlList",
  14837. limit: 10,
  14838. "max-size": 1024 * 1024
  14839. }, null, 8, ["filename"])
  14840. ]),
  14841. _: 1
  14842. /* STABLE */
  14843. })
  14844. ]),
  14845. _: 1
  14846. /* STABLE */
  14847. }, 8, ["model"]),
  14848. vue.createCommentVNode(" 底部按钮 "),
  14849. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14850. vue.createVNode(_component_u_button, {
  14851. size: "large",
  14852. type: "warning",
  14853. onClick: $setup.scanCode,
  14854. text: "扫码",
  14855. class: "scan-button"
  14856. }),
  14857. vue.withDirectives(vue.createVNode(
  14858. _component_u_button,
  14859. {
  14860. size: "large",
  14861. type: "success",
  14862. onClick: $setup.submitForm,
  14863. text: "提交",
  14864. class: "submit-button"
  14865. },
  14866. null,
  14867. 512
  14868. /* NEED_PATCH */
  14869. ), [
  14870. [_directive_permission, "app:express:changeWeight:confirm"]
  14871. ])
  14872. ])
  14873. ]);
  14874. }
  14875. const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-e6126507"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/weight-modify.vue"]]);
  14876. const _sfc_main$1k = {
  14877. __name: "confirm-receipt",
  14878. setup(__props, { expose: __expose }) {
  14879. __expose();
  14880. const formData = vue.ref({
  14881. searchType: "2",
  14882. search: ""
  14883. });
  14884. const handleSubmit = () => {
  14885. if (!formData.value.search) {
  14886. uni.$u.toast("请扫描/输入物流单号");
  14887. return;
  14888. }
  14889. uni.$u.http.post("/app/orderinfo/confirmOrder", formData.value).then((res2) => {
  14890. if (res2.code == 200) {
  14891. let text = formData.value.search + "收货成功";
  14892. uni.$u.ttsModule.speak(text);
  14893. } else {
  14894. let text = formData.value.search + "订单不存在";
  14895. uni.$u.ttsModule.speak(text);
  14896. }
  14897. });
  14898. };
  14899. const handleScan = () => {
  14900. uni.scanCode({
  14901. success: (res2) => {
  14902. formData.value.search = res2.result;
  14903. handleSubmit();
  14904. }
  14905. });
  14906. };
  14907. onLoad(() => {
  14908. uni.$u.useGlobalEvent((e) => {
  14909. formData.value.search = e.barcode;
  14910. handleSubmit();
  14911. });
  14912. });
  14913. onShow(() => {
  14914. uni.$u.updateActivePageOnShow();
  14915. });
  14916. onUnload(() => {
  14917. uni.$u.cleanupOnPageUnload();
  14918. });
  14919. const __returned__ = { formData, handleSubmit, handleScan, ref: vue.ref, get onLoad() {
  14920. return onLoad;
  14921. }, get onShow() {
  14922. return onShow;
  14923. }, get onUnload() {
  14924. return onUnload;
  14925. } };
  14926. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14927. return __returned__;
  14928. }
  14929. };
  14930. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  14931. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  14932. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  14933. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  14934. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14935. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  14936. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14937. vue.createCommentVNode(" 底部按钮 "),
  14938. vue.createElementVNode("view", { class: "footer" }, [
  14939. vue.createCommentVNode(" 查询区域 "),
  14940. vue.createElementVNode("view", { class: "query-section" }, [
  14941. vue.createVNode(_component_u_radio_group, {
  14942. modelValue: $setup.formData.searchType,
  14943. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.searchType = $event)
  14944. }, {
  14945. default: vue.withCtx(() => [
  14946. vue.createVNode(_component_u_radio, {
  14947. label: "查订单",
  14948. name: "1",
  14949. labelSize: "16px",
  14950. iconSize: "16px"
  14951. }),
  14952. vue.createVNode(_component_u_radio, {
  14953. label: "查物流",
  14954. "custom-style": "margin-left:20px",
  14955. name: "2",
  14956. labelSize: "16px",
  14957. iconSize: "16px"
  14958. })
  14959. ]),
  14960. _: 1
  14961. /* STABLE */
  14962. }, 8, ["modelValue"]),
  14963. vue.createElementVNode("view", { class: "search-box" }, [
  14964. vue.createVNode(_component_u_input, {
  14965. "custom-style": "font-size:32rpx",
  14966. "placeholder-style": "fong-size:32rpx",
  14967. modelValue: $setup.formData.search,
  14968. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.search = $event),
  14969. placeholder: $setup.formData.searchType == "1" ? "扫描/输入订单号" : "扫描/输入物流单号",
  14970. border: "surround",
  14971. clearable: ""
  14972. }, null, 8, ["modelValue", "placeholder"]),
  14973. vue.createVNode(_component_u_button, {
  14974. color: "#c8c8c8",
  14975. text: "查询",
  14976. onClick: $setup.handleSubmit
  14977. })
  14978. ])
  14979. ]),
  14980. vue.createVNode(_component_u_divider),
  14981. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  14982. vue.createVNode(_component_u_button, {
  14983. size: "large",
  14984. type: "success",
  14985. text: "确认收货扫码",
  14986. onClick: $setup.handleScan
  14987. })
  14988. ])
  14989. ])
  14990. ]);
  14991. }
  14992. const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-fec7d541"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/confirm-receipt.vue"]]);
  14993. const props$d = {
  14994. props: {
  14995. // 是否开启顶部安全区适配
  14996. safeAreaInsetTop: {
  14997. type: Boolean,
  14998. default: props$G.navbar.safeAreaInsetTop
  14999. },
  15000. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  15001. placeholder: {
  15002. type: Boolean,
  15003. default: props$G.navbar.placeholder
  15004. },
  15005. // 是否固定在顶部
  15006. fixed: {
  15007. type: Boolean,
  15008. default: props$G.navbar.fixed
  15009. },
  15010. // 是否显示下边框
  15011. border: {
  15012. type: Boolean,
  15013. default: props$G.navbar.border
  15014. },
  15015. // 左边的图标
  15016. leftIcon: {
  15017. type: String,
  15018. default: props$G.navbar.leftIcon
  15019. },
  15020. // 左边的提示文字
  15021. leftText: {
  15022. type: String,
  15023. default: props$G.navbar.leftText
  15024. },
  15025. // 左右的提示文字
  15026. rightText: {
  15027. type: String,
  15028. default: props$G.navbar.rightText
  15029. },
  15030. // 右边的图标
  15031. rightIcon: {
  15032. type: String,
  15033. default: props$G.navbar.rightIcon
  15034. },
  15035. // 标题
  15036. title: {
  15037. type: [String, Number],
  15038. default: props$G.navbar.title
  15039. },
  15040. // 背景颜色
  15041. bgColor: {
  15042. type: String,
  15043. default: props$G.navbar.bgColor
  15044. },
  15045. // 标题的宽度
  15046. titleWidth: {
  15047. type: [String, Number],
  15048. default: props$G.navbar.titleWidth
  15049. },
  15050. // 导航栏高度
  15051. height: {
  15052. type: [String, Number],
  15053. default: props$G.navbar.height
  15054. },
  15055. // 左侧返回图标的大小
  15056. leftIconSize: {
  15057. type: [String, Number],
  15058. default: props$G.navbar.leftIconSize
  15059. },
  15060. // 左侧返回图标的颜色
  15061. leftIconColor: {
  15062. type: String,
  15063. default: props$G.navbar.leftIconColor
  15064. },
  15065. // 点击左侧区域(返回图标),是否自动返回上一页
  15066. autoBack: {
  15067. type: Boolean,
  15068. default: props$G.navbar.autoBack
  15069. },
  15070. // 标题的样式,对象或字符串
  15071. titleStyle: {
  15072. type: [String, Object],
  15073. default: props$G.navbar.titleStyle
  15074. }
  15075. }
  15076. };
  15077. const _sfc_main$1j = {
  15078. name: "u-navbar",
  15079. mixins: [mpMixin, mixin, props$d],
  15080. data() {
  15081. return {};
  15082. },
  15083. methods: {
  15084. // 点击左侧区域
  15085. leftClick() {
  15086. this.$emit("leftClick");
  15087. if (this.autoBack) {
  15088. uni.navigateBack();
  15089. }
  15090. },
  15091. // 点击右侧区域
  15092. rightClick() {
  15093. this.$emit("rightClick");
  15094. }
  15095. }
  15096. };
  15097. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  15098. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  15099. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  15100. return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
  15101. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  15102. "view",
  15103. {
  15104. key: 0,
  15105. class: "u-navbar__placeholder",
  15106. style: vue.normalizeStyle({
  15107. height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  15108. })
  15109. },
  15110. null,
  15111. 4
  15112. /* STYLE */
  15113. )) : vue.createCommentVNode("v-if", true),
  15114. vue.createElementVNode(
  15115. "view",
  15116. {
  15117. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  15118. },
  15119. [
  15120. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  15121. key: 0,
  15122. bgColor: _ctx.bgColor
  15123. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  15124. vue.createElementVNode(
  15125. "view",
  15126. {
  15127. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  15128. style: vue.normalizeStyle({
  15129. height: _ctx.$u.addUnit(_ctx.height),
  15130. backgroundColor: _ctx.bgColor
  15131. })
  15132. },
  15133. [
  15134. vue.createElementVNode("view", {
  15135. class: "u-navbar__content__left",
  15136. "hover-class": "u-navbar__content__left--hover",
  15137. "hover-start-time": "150",
  15138. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  15139. }, [
  15140. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  15141. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  15142. key: 0,
  15143. name: _ctx.leftIcon,
  15144. size: _ctx.leftIconSize,
  15145. color: _ctx.leftIconColor
  15146. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  15147. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  15148. "text",
  15149. {
  15150. key: 1,
  15151. style: vue.normalizeStyle({
  15152. color: _ctx.leftIconColor
  15153. }),
  15154. class: "u-navbar__content__left__text"
  15155. },
  15156. vue.toDisplayString(_ctx.leftText),
  15157. 5
  15158. /* TEXT, STYLE */
  15159. )) : vue.createCommentVNode("v-if", true)
  15160. ], true)
  15161. ]),
  15162. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  15163. vue.createElementVNode(
  15164. "text",
  15165. {
  15166. class: "u-line-1 u-navbar__content__title",
  15167. style: vue.normalizeStyle([{
  15168. width: _ctx.$u.addUnit(_ctx.titleWidth)
  15169. }, _ctx.$u.addStyle(_ctx.titleStyle)])
  15170. },
  15171. vue.toDisplayString(_ctx.title),
  15172. 5
  15173. /* TEXT, STYLE */
  15174. )
  15175. ], true),
  15176. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  15177. key: 0,
  15178. class: "u-navbar__content__right",
  15179. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  15180. }, [
  15181. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  15182. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  15183. key: 0,
  15184. name: _ctx.rightIcon,
  15185. size: "20"
  15186. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  15187. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  15188. "text",
  15189. {
  15190. key: 1,
  15191. class: "u-navbar__content__right__text"
  15192. },
  15193. vue.toDisplayString(_ctx.rightText),
  15194. 1
  15195. /* TEXT */
  15196. )) : vue.createCommentVNode("v-if", true)
  15197. ], true)
  15198. ])) : vue.createCommentVNode("v-if", true)
  15199. ],
  15200. 6
  15201. /* CLASS, STYLE */
  15202. )
  15203. ],
  15204. 2
  15205. /* CLASS */
  15206. )
  15207. ]);
  15208. }
  15209. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-f631659b"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  15210. const props$c = {
  15211. props: {
  15212. // 步进器标识符,在change回调返回
  15213. name: {
  15214. type: [String, Number],
  15215. default: props$G.numberBox.name
  15216. },
  15217. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  15218. modelValue: {
  15219. type: [String, Number],
  15220. default: props$G.numberBox.value
  15221. },
  15222. // 最小值
  15223. min: {
  15224. type: [String, Number],
  15225. default: props$G.numberBox.min
  15226. },
  15227. // 最大值
  15228. max: {
  15229. type: [String, Number],
  15230. default: props$G.numberBox.max
  15231. },
  15232. // 加减的步长,可为小数
  15233. step: {
  15234. type: [String, Number],
  15235. default: props$G.numberBox.step
  15236. },
  15237. // 是否只允许输入整数
  15238. integer: {
  15239. type: Boolean,
  15240. default: props$G.numberBox.integer
  15241. },
  15242. // 是否禁用,包括输入框,加减按钮
  15243. disabled: {
  15244. type: Boolean,
  15245. default: props$G.numberBox.disabled
  15246. },
  15247. // 是否禁用输入框
  15248. disabledInput: {
  15249. type: Boolean,
  15250. default: props$G.numberBox.disabledInput
  15251. },
  15252. // 是否开启异步变更,开启后需要手动控制输入值
  15253. asyncChange: {
  15254. type: Boolean,
  15255. default: props$G.numberBox.asyncChange
  15256. },
  15257. // 输入框宽度,单位为px
  15258. inputWidth: {
  15259. type: [String, Number],
  15260. default: props$G.numberBox.inputWidth
  15261. },
  15262. // 是否显示减少按钮
  15263. showMinus: {
  15264. type: Boolean,
  15265. default: props$G.numberBox.showMinus
  15266. },
  15267. // 是否显示增加按钮
  15268. showPlus: {
  15269. type: Boolean,
  15270. default: props$G.numberBox.showPlus
  15271. },
  15272. // 显示的小数位数
  15273. decimalLength: {
  15274. type: [String, Number, null],
  15275. default: props$G.numberBox.decimalLength
  15276. },
  15277. // 是否开启长按加减手势
  15278. longPress: {
  15279. type: Boolean,
  15280. default: props$G.numberBox.longPress
  15281. },
  15282. // 输入框文字和加减按钮图标的颜色
  15283. color: {
  15284. type: String,
  15285. default: props$G.numberBox.color
  15286. },
  15287. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  15288. buttonSize: {
  15289. type: [String, Number],
  15290. default: props$G.numberBox.buttonSize
  15291. },
  15292. // 输入框和按钮的背景颜色
  15293. bgColor: {
  15294. type: String,
  15295. default: props$G.numberBox.bgColor
  15296. },
  15297. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  15298. cursorSpacing: {
  15299. type: [String, Number],
  15300. default: props$G.numberBox.cursorSpacing
  15301. },
  15302. // 是否禁用增加按钮
  15303. disablePlus: {
  15304. type: Boolean,
  15305. default: props$G.numberBox.disablePlus
  15306. },
  15307. // 是否禁用减少按钮
  15308. disableMinus: {
  15309. type: Boolean,
  15310. default: props$G.numberBox.disableMinus
  15311. },
  15312. // 加减按钮图标的样式
  15313. iconStyle: {
  15314. type: [Object, String],
  15315. default: props$G.numberBox.iconStyle
  15316. }
  15317. }
  15318. };
  15319. const _sfc_main$1i = {
  15320. name: "u-number-box",
  15321. mixins: [mpMixin, mixin, props$c],
  15322. data() {
  15323. return {
  15324. // 输入框实际操作的值
  15325. currentValue: "",
  15326. // 定时器
  15327. longPressTimer: null
  15328. };
  15329. },
  15330. watch: {
  15331. // 多个值之间,只要一个值发生变化,都要重新检查check()函数
  15332. watchChange(n) {
  15333. this.check();
  15334. },
  15335. // 监听v-mode的变化,重新初始化内部的值
  15336. modelValue(n) {
  15337. if (n !== this.currentValue) {
  15338. this.currentValue = this.format(this.modelValue);
  15339. }
  15340. }
  15341. },
  15342. computed: {
  15343. getCursorSpacing() {
  15344. return uni.$u.getPx(this.cursorSpacing);
  15345. },
  15346. // 按钮的样式
  15347. buttonStyle() {
  15348. return (type2) => {
  15349. const style = {
  15350. backgroundColor: this.bgColor,
  15351. height: uni.$u.addUnit(this.buttonSize),
  15352. color: this.color
  15353. };
  15354. if (this.isDisabled(type2)) {
  15355. style.backgroundColor = "#f7f8fa";
  15356. }
  15357. return style;
  15358. };
  15359. },
  15360. // 输入框的样式
  15361. inputStyle() {
  15362. this.disabled || this.disabledInput;
  15363. const style = {
  15364. color: this.color,
  15365. backgroundColor: this.bgColor,
  15366. height: uni.$u.addUnit(this.buttonSize),
  15367. width: uni.$u.addUnit(this.inputWidth)
  15368. };
  15369. return style;
  15370. },
  15371. // 用于监听多个值发生变化
  15372. watchChange() {
  15373. return [this.integer, this.decimalLength, this.min, this.max];
  15374. },
  15375. isDisabled() {
  15376. return (type2) => {
  15377. if (type2 === "plus") {
  15378. return this.disabled || this.disablePlus || this.currentValue >= this.max;
  15379. }
  15380. return this.disabled || this.disableMinus || this.currentValue <= this.min;
  15381. };
  15382. }
  15383. },
  15384. mounted() {
  15385. this.init();
  15386. },
  15387. emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
  15388. methods: {
  15389. init() {
  15390. this.currentValue = this.format(this.modelValue);
  15391. },
  15392. // 格式化整理数据,限制范围
  15393. format(value2) {
  15394. value2 = this.filter(value2);
  15395. value2 = value2 === "" ? 0 : +value2;
  15396. value2 = Math.max(Math.min(this.max, value2), this.min);
  15397. if (this.decimalLength !== null) {
  15398. value2 = value2.toFixed(this.decimalLength);
  15399. }
  15400. return value2;
  15401. },
  15402. // 过滤非法的字符
  15403. filter(value2) {
  15404. value2 = String(value2).replace(/[^0-9.-]/g, "");
  15405. if (this.integer && value2.indexOf(".") !== -1) {
  15406. value2 = value2.split(".")[0];
  15407. }
  15408. return value2;
  15409. },
  15410. check() {
  15411. const val = this.format(this.currentValue);
  15412. if (val !== this.currentValue) {
  15413. this.currentValue = val;
  15414. }
  15415. },
  15416. // 判断是否出于禁止操作状态
  15417. // isDisabled(type) {
  15418. // if (type === 'plus') {
  15419. // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
  15420. // return (
  15421. // this.disabled ||
  15422. // this.disablePlus ||
  15423. // this.currentValue >= this.max
  15424. // )
  15425. // }
  15426. // // 点击减少按钮同理
  15427. // return (
  15428. // this.disabled ||
  15429. // this.disableMinus ||
  15430. // this.currentValue <= this.min
  15431. // )
  15432. // },
  15433. // 输入框活动焦点
  15434. onFocus(event) {
  15435. this.$emit("focus", {
  15436. ...event.detail,
  15437. name: this.name
  15438. });
  15439. },
  15440. // 输入框失去焦点
  15441. onBlur(event) {
  15442. this.format(event.detail.value);
  15443. this.$emit(
  15444. "blur",
  15445. {
  15446. ...event.detail,
  15447. name: this.name
  15448. }
  15449. );
  15450. },
  15451. // 输入框值发生变化
  15452. onInput(e) {
  15453. const {
  15454. value: value2 = ""
  15455. } = e.detail || {};
  15456. if (value2 === "")
  15457. return;
  15458. let formatted = this.filter(value2);
  15459. if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
  15460. const pair = formatted.split(".");
  15461. formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
  15462. }
  15463. formatted = this.format(formatted);
  15464. this.emitChange(formatted);
  15465. },
  15466. // 发出change事件
  15467. emitChange(value2) {
  15468. if (!this.asyncChange) {
  15469. this.$nextTick(() => {
  15470. this.$emit("update:modelValue", value2);
  15471. this.currentValue = value2;
  15472. this.$forceUpdate();
  15473. });
  15474. }
  15475. this.$emit("change", {
  15476. value: value2,
  15477. name: this.name
  15478. });
  15479. },
  15480. onChange() {
  15481. const {
  15482. type: type2
  15483. } = this;
  15484. if (this.isDisabled(type2)) {
  15485. return this.$emit("overlimit", type2);
  15486. }
  15487. const diff = type2 === "minus" ? -this.step : +this.step;
  15488. const value2 = this.format(this.add(+this.currentValue, diff));
  15489. this.emitChange(value2);
  15490. this.$emit(type2);
  15491. },
  15492. // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
  15493. add(num1, num2) {
  15494. const cardinal = Math.pow(10, 10);
  15495. return Math.round((num1 + num2) * cardinal) / cardinal;
  15496. },
  15497. // 点击加减按钮
  15498. clickHandler(type2) {
  15499. this.type = type2;
  15500. this.onChange();
  15501. },
  15502. longPressStep() {
  15503. this.clearTimeout();
  15504. this.longPressTimer = setTimeout(() => {
  15505. this.onChange();
  15506. this.longPressStep();
  15507. }, 250);
  15508. },
  15509. onTouchStart(type2) {
  15510. if (!this.longPress)
  15511. return;
  15512. this.clearTimeout();
  15513. this.type = type2;
  15514. this.longPressTimer = setTimeout(() => {
  15515. this.onChange();
  15516. this.longPressStep();
  15517. }, 600);
  15518. },
  15519. // 触摸结束,清除定时器,停止长按加减
  15520. onTouchEnd() {
  15521. if (!this.longPress)
  15522. return;
  15523. this.clearTimeout();
  15524. },
  15525. // 清除定时器
  15526. clearTimeout() {
  15527. clearTimeout(this.longPressTimer);
  15528. this.longPressTimer = null;
  15529. }
  15530. }
  15531. };
  15532. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  15533. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  15534. return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
  15535. _ctx.showMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
  15536. "view",
  15537. {
  15538. key: 0,
  15539. class: "u-number-box__slot",
  15540. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15541. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
  15542. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15543. },
  15544. [
  15545. vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
  15546. ],
  15547. 32
  15548. /* NEED_HYDRATION */
  15549. )) : _ctx.showMinus ? (vue.openBlock(), vue.createElementBlock(
  15550. "view",
  15551. {
  15552. key: 1,
  15553. class: vue.normalizeClass(["u-number-box__minus", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
  15554. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15555. onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
  15556. onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15557. "hover-class": "u-number-box__minus--hover",
  15558. "hover-stay-time": "150",
  15559. style: vue.normalizeStyle([$options.buttonStyle("minus")])
  15560. },
  15561. [
  15562. vue.createVNode(_component_u_icon, {
  15563. name: "minus",
  15564. color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
  15565. size: "15",
  15566. bold: "",
  15567. customStyle: _ctx.iconStyle
  15568. }, null, 8, ["color", "customStyle"])
  15569. ],
  15570. 38
  15571. /* CLASS, STYLE, NEED_HYDRATION */
  15572. )) : vue.createCommentVNode("v-if", true),
  15573. vue.renderSlot(_ctx.$slots, "input", {}, () => [
  15574. vue.withDirectives(vue.createElementVNode("input", {
  15575. disabled: _ctx.disabledInput || _ctx.disabled,
  15576. "cursor-spacing": $options.getCursorSpacing,
  15577. class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
  15578. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
  15579. onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
  15580. onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
  15581. onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
  15582. type: "number",
  15583. style: vue.normalizeStyle([$options.inputStyle])
  15584. }, null, 46, ["disabled", "cursor-spacing"]), [
  15585. [vue.vModelText, $data.currentValue]
  15586. ])
  15587. ], true),
  15588. _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
  15589. "view",
  15590. {
  15591. key: 2,
  15592. class: "u-number-box__slot",
  15593. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15594. onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
  15595. onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15596. },
  15597. [
  15598. vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
  15599. ],
  15600. 32
  15601. /* NEED_HYDRATION */
  15602. )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
  15603. "view",
  15604. {
  15605. key: 3,
  15606. class: vue.normalizeClass(["u-number-box__plus", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
  15607. onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15608. onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
  15609. onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15610. "hover-class": "u-number-box__plus--hover",
  15611. "hover-stay-time": "150",
  15612. style: vue.normalizeStyle([$options.buttonStyle("plus")])
  15613. },
  15614. [
  15615. vue.createVNode(_component_u_icon, {
  15616. name: "plus",
  15617. color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
  15618. size: "15",
  15619. bold: "",
  15620. customStyle: _ctx.iconStyle
  15621. }, null, 8, ["color", "customStyle"])
  15622. ],
  15623. 38
  15624. /* CLASS, STYLE, NEED_HYDRATION */
  15625. )) : vue.createCommentVNode("v-if", true)
  15626. ]);
  15627. }
  15628. const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-eb6f6237"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]);
  15629. const _sfc_main$1h = {
  15630. __name: "scan-order",
  15631. setup(__props, { expose: __expose }) {
  15632. __expose();
  15633. function playGlobalSound() {
  15634. uni.$u.playClickSound();
  15635. }
  15636. const isbnList = vue.ref([]);
  15637. const showModal = vue.ref(false);
  15638. const newIsbn = vue.ref("");
  15639. const removeItem = (index2) => {
  15640. isbnList.value.splice(index2, 1);
  15641. };
  15642. const goBack = () => {
  15643. uni.navigateBack();
  15644. };
  15645. function clearAll() {
  15646. isbnList.value.length = 0;
  15647. }
  15648. const addOrUpdateIsbn = (isbn) => {
  15649. const existingItem = isbnList.value.find((item) => item.isbn === isbn);
  15650. if (existingItem) {
  15651. existingItem.quantity += 1;
  15652. } else {
  15653. isbnList.value.push({
  15654. isbn,
  15655. quantity: 1
  15656. });
  15657. }
  15658. };
  15659. function handleIsbn(isbn) {
  15660. if (isValidISBN(isbn)) {
  15661. addOrUpdateIsbn(isbn);
  15662. } else {
  15663. uni.$u.ttsModule.speak("不正确的ISBN码");
  15664. }
  15665. }
  15666. const handleScan = () => {
  15667. uni.scanCode({
  15668. success: (res2) => {
  15669. handleIsbn(res2.result);
  15670. }
  15671. });
  15672. };
  15673. const isValidISBN = (isbn) => {
  15674. return /^97[89]\d{10}$/.test(isbn);
  15675. };
  15676. const handleQuery = () => {
  15677. if (isbnList.value.length === 0) {
  15678. uni.showToast({
  15679. title: "请先添加ISBN",
  15680. icon: "none"
  15681. });
  15682. return;
  15683. }
  15684. uni.setStorageSync("isbnList", isbnList.value);
  15685. uni.redirectTo({
  15686. url: "/pages/index/audit/isbn-order"
  15687. });
  15688. };
  15689. const addIsbn = () => {
  15690. if (isValidISBN(newIsbn.value)) {
  15691. addOrUpdateIsbn(newIsbn.value);
  15692. showModal.value = false;
  15693. newIsbn.value = "";
  15694. } else {
  15695. uni.$u.ttsModule.speak("不正确的ISBN码");
  15696. }
  15697. };
  15698. onLoad(() => {
  15699. uni.$u.useGlobalEvent((e) => {
  15700. addOrUpdateIsbn(e.barcode);
  15701. });
  15702. });
  15703. onShow(() => {
  15704. uni.$u.updateActivePageOnShow();
  15705. });
  15706. onUnload(() => {
  15707. uni.$u.cleanupOnPageUnload();
  15708. });
  15709. const __returned__ = { playGlobalSound, isbnList, showModal, newIsbn, removeItem, goBack, clearAll, addOrUpdateIsbn, handleIsbn, handleScan, isValidISBN, handleQuery, addIsbn, ref: vue.ref, get onLoad() {
  15710. return onLoad;
  15711. }, get onShow() {
  15712. return onShow;
  15713. }, get onUnload() {
  15714. return onUnload;
  15715. } };
  15716. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15717. return __returned__;
  15718. }
  15719. };
  15720. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  15721. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  15722. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  15723. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  15724. const _component_u_number_box = resolveEasycom(vue.resolveDynamicComponent("u-number-box"), __easycom_3$4);
  15725. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15726. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  15727. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  15728. return vue.openBlock(), vue.createElementBlock("view", {
  15729. class: "container",
  15730. onClick: $setup.playGlobalSound
  15731. }, [
  15732. vue.createVNode(_component_u_navbar, {
  15733. title: "扫书查单",
  15734. border: false,
  15735. fixed: "",
  15736. bgColor: "#22ac38",
  15737. leftIconColor: "#fff",
  15738. titleStyle: "font-size:36rpx;color:#fff"
  15739. }, {
  15740. left: vue.withCtx(() => [
  15741. vue.createVNode(_component_u_icon, {
  15742. name: "arrow-left",
  15743. color: "#fff",
  15744. size: "20",
  15745. onClick: $setup.goBack
  15746. })
  15747. ]),
  15748. right: vue.withCtx(() => [
  15749. vue.createElementVNode("text", {
  15750. style: { "color": "#fff", "font-size": "32rpx" },
  15751. type: "primary",
  15752. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true)
  15753. }, "新增")
  15754. ]),
  15755. _: 1
  15756. /* STABLE */
  15757. }),
  15758. vue.createCommentVNode(" 顶部操作栏 "),
  15759. vue.createVNode(_component_u_sticky, null, {
  15760. default: vue.withCtx(() => [
  15761. vue.createElementVNode("view", {
  15762. class: "header",
  15763. onClick: $setup.clearAll
  15764. }, "清除全部"),
  15765. vue.createCommentVNode(" 提示信息 "),
  15766. vue.createElementVNode("view", { class: "tips" }, [
  15767. vue.createElementVNode("text", null, "请勿录入审核为不良的书籍ISBN!"),
  15768. vue.createElementVNode("text", { class: "sub-tips" }, "不良书籍的ISBN可能是错误的!")
  15769. ])
  15770. ]),
  15771. _: 1
  15772. /* STABLE */
  15773. }),
  15774. vue.createCommentVNode(" ISBN列表 "),
  15775. vue.createElementVNode("scroll-view", {
  15776. "scroll-y": "",
  15777. class: "isbn-list"
  15778. }, [
  15779. (vue.openBlock(true), vue.createElementBlock(
  15780. vue.Fragment,
  15781. null,
  15782. vue.renderList($setup.isbnList, (item, index2) => {
  15783. return vue.openBlock(), vue.createElementBlock("view", {
  15784. key: index2,
  15785. class: "isbn-item"
  15786. }, [
  15787. vue.createElementVNode("view", { class: "item-left" }, [
  15788. vue.createVNode(_component_u_icon, {
  15789. name: "minus-circle-fill",
  15790. color: "#dd524d",
  15791. size: "24",
  15792. onClick: ($event) => $setup.removeItem(index2)
  15793. }, null, 8, ["onClick"]),
  15794. vue.createElementVNode(
  15795. "text",
  15796. { class: "index" },
  15797. vue.toDisplayString(index2 + 1) + "、",
  15798. 1
  15799. /* TEXT */
  15800. ),
  15801. vue.createElementVNode(
  15802. "text",
  15803. { class: "isbn" },
  15804. vue.toDisplayString(item.isbn),
  15805. 1
  15806. /* TEXT */
  15807. )
  15808. ]),
  15809. vue.createVNode(_component_u_number_box, {
  15810. modelValue: item.quantity,
  15811. "onUpdate:modelValue": ($event) => item.quantity = $event,
  15812. disableMinus: item.quantity <= 1
  15813. }, null, 8, ["modelValue", "onUpdate:modelValue", "disableMinus"])
  15814. ]);
  15815. }),
  15816. 128
  15817. /* KEYED_FRAGMENT */
  15818. ))
  15819. ]),
  15820. vue.createCommentVNode(" 底部按钮 "),
  15821. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  15822. vue.createVNode(_component_u_button, {
  15823. size: "large",
  15824. type: "warning",
  15825. text: "扫码加书",
  15826. onClick: $setup.handleScan
  15827. }),
  15828. vue.createVNode(_component_u_button, {
  15829. size: "large",
  15830. type: "primary",
  15831. text: "查询",
  15832. onClick: $setup.handleQuery
  15833. })
  15834. ]),
  15835. vue.createCommentVNode(" ISBN Input Modal "),
  15836. vue.createVNode(_component_u_popup, {
  15837. show: $setup.showModal,
  15838. mode: "center",
  15839. customStyle: "width: 84%;border-radius:10px"
  15840. }, {
  15841. default: vue.withCtx(() => [
  15842. vue.createElementVNode("view", { class: "modal-content" }, [
  15843. vue.createElementVNode("text", null, "输入ISBN码"),
  15844. vue.createVNode(_component_u_input, {
  15845. modelValue: $setup.newIsbn,
  15846. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.newIsbn = $event),
  15847. placeholder: "请输入ISBN码",
  15848. "custom-style": "margin:60rpx 0"
  15849. }, null, 8, ["modelValue"]),
  15850. vue.createElementVNode("view", { class: "modal-buttons" }, [
  15851. vue.createVNode(_component_u_button, {
  15852. text: "取消",
  15853. onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false)
  15854. }),
  15855. vue.createVNode(_component_u_button, {
  15856. type: "primary",
  15857. text: "确定",
  15858. onClick: $setup.addIsbn
  15859. })
  15860. ])
  15861. ])
  15862. ]),
  15863. _: 1
  15864. /* STABLE */
  15865. }, 8, ["show"])
  15866. ]);
  15867. }
  15868. const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-1af411ea"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/scan-order.vue"]]);
  15869. const _sfc_main$1g = {
  15870. __name: "orderItem",
  15871. props: {
  15872. item: {
  15873. type: Object,
  15874. default: () => {
  15875. }
  15876. }
  15877. },
  15878. setup(__props, { expose: __expose }) {
  15879. __expose();
  15880. const props2 = __props;
  15881. const statusEnum = {
  15882. 0: "创建",
  15883. 1: "用户删除",
  15884. 2: "下单(待初审)",
  15885. 3: "初审(待取书)",
  15886. 4: "初审未通过",
  15887. 5: "快递取书(待签收)",
  15888. 6: "快递签收(待收货)",
  15889. 7: "物流签收(路由异常)",
  15890. 8: "仓库收货(待审核)",
  15891. 9: "审核中(审核未提交)",
  15892. 10: "已审核(待付款)",
  15893. 11: "已完成"
  15894. };
  15895. const maskedNickName = vue.computed(() => {
  15896. let nickName = props2.item.userNick || props2.item.nickName;
  15897. if (!nickName)
  15898. return "";
  15899. return nickName.charAt(0) + "*".repeat(nickName.length - 1);
  15900. });
  15901. let statusText = vue.computed(() => {
  15902. return props2.item.status ? statusEnum[props2.item.status] : "-";
  15903. });
  15904. const statusColor = vue.ref("#FF4D4F");
  15905. const copyToClipboard = (text) => {
  15906. uni.setClipboardData({
  15907. data: text,
  15908. success: () => {
  15909. uni.showToast({
  15910. title: "复制成功",
  15911. icon: "success"
  15912. });
  15913. }
  15914. });
  15915. };
  15916. const handleAudit = () => {
  15917. uni.redirectTo({
  15918. url: `/pages/index/detail/index?id=${props2.item.orderId}`
  15919. });
  15920. };
  15921. const handleView = () => {
  15922. uni.redirectTo({
  15923. url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
  15924. });
  15925. };
  15926. const __returned__ = { props: props2, statusEnum, maskedNickName, get statusText() {
  15927. return statusText;
  15928. }, set statusText(v) {
  15929. statusText = v;
  15930. }, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref, computed: vue.computed };
  15931. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15932. return __returned__;
  15933. }
  15934. };
  15935. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  15936. var _a, _b, _c;
  15937. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15938. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  15939. vue.createCommentVNode(" 用户信息 "),
  15940. vue.createElementVNode("view", { class: "user-info" }, [
  15941. vue.createElementVNode("image", {
  15942. class: "avatar",
  15943. src: $props.item.imgPath,
  15944. mode: "aspectFill"
  15945. }, null, 8, ["src"]),
  15946. vue.createElementVNode("view", { class: "user-details" }, [
  15947. vue.createElementVNode(
  15948. "text",
  15949. { class: "username" },
  15950. vue.toDisplayString($props.item.plat == 1 ? "微信用户" : "支付宝用户") + " (" + vue.toDisplayString($setup.maskedNickName) + ")",
  15951. 1
  15952. /* TEXT */
  15953. ),
  15954. vue.createElementVNode(
  15955. "text",
  15956. { class: "date" },
  15957. "共卖出" + vue.toDisplayString($props.item.totalNum) + "本书",
  15958. 1
  15959. /* TEXT */
  15960. ),
  15961. vue.createElementVNode(
  15962. "text",
  15963. { class: "date" },
  15964. "来自" + vue.toDisplayString($props.item.sendSsq),
  15965. 1
  15966. /* TEXT */
  15967. )
  15968. ]),
  15969. vue.createElementVNode("view", { class: "user-details right-items" }, [
  15970. vue.createElementVNode(
  15971. "text",
  15972. { class: "date" },
  15973. vue.toDisplayString($props.item.schedulePickupStartTime),
  15974. 1
  15975. /* TEXT */
  15976. ),
  15977. vue.createElementVNode(
  15978. "text",
  15979. {
  15980. class: "status",
  15981. style: vue.normalizeStyle({ color: $setup.statusColor })
  15982. },
  15983. "[" + vue.toDisplayString($setup.statusText) + "]",
  15984. 5
  15985. /* TEXT, STYLE */
  15986. )
  15987. ])
  15988. ]),
  15989. vue.createCommentVNode(" 订单详情 "),
  15990. vue.createElementVNode("view", { class: "order-details" }, [
  15991. vue.createElementVNode("view", { class: "detail-row flex flex-col" }, [
  15992. vue.createElementVNode("view", { class: "flex-1" }, [
  15993. vue.createElementVNode("text", null, "订单ID:"),
  15994. vue.createElementVNode(
  15995. "text",
  15996. {
  15997. class: "link",
  15998. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.item.orderId))
  15999. },
  16000. vue.toDisplayString($props.item.orderId),
  16001. 1
  16002. /* TEXT */
  16003. )
  16004. ]),
  16005. vue.createElementVNode("view", {
  16006. class: "flex-1",
  16007. style: { "flex": "1.5" }
  16008. }, [
  16009. vue.createElementVNode("text", null, "运单号:"),
  16010. vue.createElementVNode(
  16011. "text",
  16012. {
  16013. class: "link",
  16014. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.item.waybillCode))
  16015. },
  16016. vue.toDisplayString($props.item.waybillCode),
  16017. 1
  16018. /* TEXT */
  16019. )
  16020. ])
  16021. ]),
  16022. vue.createElementVNode("view", { class: "detail-row" }, [
  16023. vue.createElementVNode(
  16024. "text",
  16025. { class: "flex-1" },
  16026. "预估金额:" + vue.toDisplayString($props.item.expectMoney || 0),
  16027. 1
  16028. /* TEXT */
  16029. ),
  16030. vue.createElementVNode(
  16031. "text",
  16032. { class: "flex-1" },
  16033. "审核金额:" + vue.toDisplayString($props.item.finalMoney || "待核算"),
  16034. 1
  16035. /* TEXT */
  16036. )
  16037. ]),
  16038. vue.createElementVNode("view", { class: "detail-row" }, [
  16039. vue.createElementVNode(
  16040. "text",
  16041. null,
  16042. "内部备注:" + vue.toDisplayString(((_a = $props.item) == null ? void 0 : _a.manageRemark) ? (_c = (_b = $props.item) == null ? void 0 : _b.manageRemark[0]) == null ? void 0 : _c.remark : "-"),
  16043. 1
  16044. /* TEXT */
  16045. )
  16046. ])
  16047. ]),
  16048. vue.createCommentVNode(" 操作按钮 "),
  16049. vue.createElementVNode("view", { class: "action-buttons" }, [
  16050. vue.createVNode(_component_u_button, {
  16051. size: "small",
  16052. type: "primary",
  16053. onClick: $setup.handleAudit,
  16054. disabled: $props.item.status != 8 || $props.item.status != 9
  16055. }, {
  16056. default: vue.withCtx(() => [
  16057. vue.createTextVNode("到货审核")
  16058. ]),
  16059. _: 1
  16060. /* STABLE */
  16061. }, 8, ["disabled"]),
  16062. vue.createVNode(_component_u_button, {
  16063. size: "small",
  16064. onClick: $setup.handleView
  16065. }, {
  16066. default: vue.withCtx(() => [
  16067. vue.createTextVNode("查看")
  16068. ]),
  16069. _: 1
  16070. /* STABLE */
  16071. })
  16072. ])
  16073. ]);
  16074. }
  16075. const orderItem = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-12bc2a79"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/components/orderItem.vue"]]);
  16076. const _sfc_main$1f = {
  16077. __name: "isbn-order",
  16078. setup(__props, { expose: __expose }) {
  16079. __expose();
  16080. const otherParams = vue.ref({
  16081. isbnList: ""
  16082. });
  16083. const scrollRef = vue.ref(null);
  16084. const refreshList = () => {
  16085. var _a;
  16086. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  16087. };
  16088. function playGlobalSound() {
  16089. uni.$u.playClickSound();
  16090. }
  16091. let dataList = vue.ref([]);
  16092. const updateList = (data, page2) => {
  16093. dataList.value = data;
  16094. if (data.length > 0 && page2 == 1) {
  16095. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  16096. }
  16097. if (data.length == 0 && page2 == 1) {
  16098. uni.$u.ttsModule.speak("未查询到数据");
  16099. }
  16100. };
  16101. onLoad(() => {
  16102. const storedList = uni.getStorageSync("isbnList");
  16103. if (storedList) {
  16104. otherParams.value.isbnList = storedList.map((v) => v.isbn);
  16105. refreshList();
  16106. }
  16107. });
  16108. const __returned__ = { otherParams, scrollRef, refreshList, playGlobalSound, get dataList() {
  16109. return dataList;
  16110. }, set dataList(v) {
  16111. dataList = v;
  16112. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  16113. return onLoad;
  16114. } };
  16115. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16116. return __returned__;
  16117. }
  16118. };
  16119. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  16120. return vue.openBlock(), vue.createElementBlock("view", {
  16121. class: "common-page",
  16122. style: { "padding": "0" },
  16123. onClick: $setup.playGlobalSound
  16124. }, [
  16125. vue.createVNode($setup["PageScroll"], {
  16126. requestStr: "/app/orderinfo/getOrderListByIsbn",
  16127. onUpdateList: $setup.updateList,
  16128. ref: "scrollRef",
  16129. otherParams: $setup.otherParams,
  16130. method: "post"
  16131. }, {
  16132. default: vue.withCtx(() => [
  16133. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  16134. key: 0,
  16135. class: "list-con"
  16136. }, [
  16137. (vue.openBlock(true), vue.createElementBlock(
  16138. vue.Fragment,
  16139. null,
  16140. vue.renderList($setup.dataList, (cell) => {
  16141. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  16142. key: cell.id,
  16143. item: cell,
  16144. class: "mt-20"
  16145. }, null, 8, ["item"]);
  16146. }),
  16147. 128
  16148. /* KEYED_FRAGMENT */
  16149. ))
  16150. ])) : vue.createCommentVNode("v-if", true)
  16151. ]),
  16152. _: 1
  16153. /* STABLE */
  16154. }, 8, ["otherParams"])
  16155. ]);
  16156. }
  16157. const PagesIndexAuditIsbnOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/isbn-order.vue"]]);
  16158. const _sfc_main$1e = {
  16159. __name: "express-order",
  16160. setup(__props, { expose: __expose }) {
  16161. __expose();
  16162. const form = vue.ref({
  16163. searchType: "2",
  16164. search: ""
  16165. });
  16166. function playGlobalSound() {
  16167. formatAppLog("log", "at pages/index/audit/express-order.vue:48", "playGlobalSound");
  16168. uni.$u.playClickSound();
  16169. }
  16170. const handleSearch = () => {
  16171. playGlobalSound();
  16172. if (!form.value.search) {
  16173. let text = form.value.searchType == "1" ? "请输入订单编号" : "请输入物流单号";
  16174. uni.$u.ttsModule.speak(text);
  16175. return;
  16176. }
  16177. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  16178. params: {
  16179. ...form.value
  16180. }
  16181. }).then((res2) => {
  16182. if (res2.code == 200) {
  16183. uni.setStorageSync("orderDetail", res2.data);
  16184. uni.redirectTo({
  16185. url: `/pages/index/detail/index?id=${res2.data.orderId}`
  16186. });
  16187. } else {
  16188. let text = form.value.search + res2.msg;
  16189. uni.$u.ttsModule.speak(text);
  16190. }
  16191. });
  16192. };
  16193. const handleScan = () => {
  16194. playGlobalSound();
  16195. uni.scanCode({
  16196. success: (res2) => {
  16197. form.value.search = res2.result;
  16198. handleSearch();
  16199. }
  16200. });
  16201. };
  16202. onLoad(() => {
  16203. uni.$u.useGlobalEvent((e) => {
  16204. form.value.search = e.barcode;
  16205. handleSearch();
  16206. });
  16207. });
  16208. onShow(() => {
  16209. uni.$u.updateActivePageOnShow();
  16210. });
  16211. onUnload(() => {
  16212. uni.$u.cleanupOnPageUnload();
  16213. });
  16214. const __returned__ = { form, playGlobalSound, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  16215. return onLoad;
  16216. }, get onShow() {
  16217. return onShow;
  16218. }, get onUnload() {
  16219. return onUnload;
  16220. } };
  16221. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16222. return __returned__;
  16223. }
  16224. };
  16225. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  16226. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  16227. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  16228. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  16229. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  16230. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  16231. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  16232. vue.createCommentVNode(" 底部按钮 "),
  16233. vue.createElementVNode("view", { class: "footer" }, [
  16234. vue.createCommentVNode(" 查询区域 "),
  16235. vue.createElementVNode("view", { class: "query-section" }, [
  16236. vue.createVNode(_component_u_radio_group, {
  16237. modelValue: $setup.form.searchType,
  16238. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.searchType = $event),
  16239. onChange: $setup.playGlobalSound
  16240. }, {
  16241. default: vue.withCtx(() => [
  16242. vue.createVNode(_component_u_radio, {
  16243. label: "查订单",
  16244. name: "1",
  16245. "label-size": "17"
  16246. }),
  16247. vue.createVNode(_component_u_radio, {
  16248. label: "查物流",
  16249. "custom-style": "margin-left:20px",
  16250. name: "2",
  16251. "label-size": "17"
  16252. })
  16253. ]),
  16254. _: 1
  16255. /* STABLE */
  16256. }, 8, ["modelValue"]),
  16257. vue.createElementVNode("view", { class: "search-box" }, [
  16258. vue.createVNode(_component_u_input, {
  16259. "custom-style": "width:100rpx",
  16260. modelValue: $setup.form.search,
  16261. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.search = $event),
  16262. placeholder: $setup.form.searchType == "1" ? "扫描/输入订单编号" : "扫描/输入物流单号",
  16263. border: "surround",
  16264. clearable: "",
  16265. onFocus: $setup.playGlobalSound,
  16266. "placeholder-style": "font-size:32rpx",
  16267. customStyle: { "fontSize": "32rpx" }
  16268. }, null, 8, ["modelValue", "placeholder"]),
  16269. vue.createVNode(_component_u_button, {
  16270. color: "#c8c8c8",
  16271. text: "查询",
  16272. onClick: $setup.handleSearch
  16273. })
  16274. ])
  16275. ]),
  16276. vue.createVNode(_component_u_divider),
  16277. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  16278. vue.createVNode(_component_u_button, {
  16279. size: "large",
  16280. type: "success",
  16281. text: "扫码",
  16282. onClick: $setup.handleScan
  16283. })
  16284. ])
  16285. ])
  16286. ]);
  16287. }
  16288. const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-b27ee25f"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/express-order.vue"]]);
  16289. const _sfc_main$1d = {
  16290. __name: "user-orders",
  16291. setup(__props, { expose: __expose }) {
  16292. __expose();
  16293. const otherParams = vue.ref({
  16294. userId: ""
  16295. });
  16296. const scrollRef = vue.ref(null);
  16297. const refreshList = () => {
  16298. var _a;
  16299. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  16300. };
  16301. let dataList = vue.ref([]);
  16302. const updateList = (data, page2) => {
  16303. dataList.value = data;
  16304. if (data.length > 0 && page2 == 1) {
  16305. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  16306. }
  16307. if (data.length == 0 && page2 == 1) {
  16308. uni.$u.ttsModule.speak("未查询到数据");
  16309. }
  16310. };
  16311. onLoad((options) => {
  16312. otherParams.value.userId = options.userId;
  16313. refreshList();
  16314. });
  16315. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  16316. return dataList;
  16317. }, set dataList(v) {
  16318. dataList = v;
  16319. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  16320. return onLoad;
  16321. } };
  16322. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16323. return __returned__;
  16324. }
  16325. };
  16326. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  16327. return vue.openBlock(), vue.createElementBlock("view", {
  16328. class: "common-page",
  16329. style: { "padding": "0" }
  16330. }, [
  16331. vue.createVNode($setup["PageScroll"], {
  16332. requestStr: "/app/orderinfo/getOrderListByUserId",
  16333. onUpdateList: $setup.updateList,
  16334. ref: "scrollRef",
  16335. otherParams: $setup.otherParams,
  16336. method: "get"
  16337. }, {
  16338. default: vue.withCtx(() => [
  16339. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  16340. key: 0,
  16341. class: "list-con"
  16342. }, [
  16343. (vue.openBlock(true), vue.createElementBlock(
  16344. vue.Fragment,
  16345. null,
  16346. vue.renderList($setup.dataList, (cell) => {
  16347. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  16348. key: cell.id,
  16349. item: cell,
  16350. class: "mt-20"
  16351. }, null, 8, ["item"]);
  16352. }),
  16353. 128
  16354. /* KEYED_FRAGMENT */
  16355. ))
  16356. ])) : vue.createCommentVNode("v-if", true)
  16357. ]),
  16358. _: 1
  16359. /* STABLE */
  16360. }, 8, ["otherParams"])
  16361. ]);
  16362. }
  16363. const PagesIndexDetailUserOrders = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/user-orders.vue"]]);
  16364. const _sfc_main$1c = {
  16365. __name: "AuditorSelector",
  16366. props: {
  16367. show: {
  16368. type: Boolean,
  16369. default: false
  16370. }
  16371. },
  16372. emits: ["update:show", "auditor-selected"],
  16373. setup(__props, { expose: __expose, emit: __emit }) {
  16374. __expose();
  16375. const props2 = __props;
  16376. const emit2 = __emit;
  16377. const searchKeyword = vue.ref("");
  16378. const searchResults = vue.ref([]);
  16379. const historyAuditors = vue.ref(uni.getStorageSync("historyAuditors") || []);
  16380. const checkUserId = vue.ref("");
  16381. const auditorSearch = (name) => {
  16382. formatAppLog("log", "at pages/index/detail/components/AuditorSelector.vue:66", name);
  16383. uni.$u.http.get("/app/appUser/getCheckUser?name=" + name).then((res2) => {
  16384. if (res2.code == 200) {
  16385. searchResults.value = res2.data;
  16386. }
  16387. });
  16388. };
  16389. const handleSearch = () => {
  16390. auditorSearch(searchKeyword.value);
  16391. };
  16392. const selectItem = vue.ref({});
  16393. const selectAuditor = (item) => {
  16394. checkUserId.value = item.userId;
  16395. selectItem.value = item;
  16396. };
  16397. const handleClose = () => {
  16398. emit2("update:show", false);
  16399. searchKeyword.value = "";
  16400. };
  16401. const handleConfirm = () => {
  16402. if (checkUserId.value) {
  16403. emit2("auditor-selected", selectItem.value);
  16404. uni.setStorageSync("checkUserInfo", selectItem.value);
  16405. addToHistory(selectItem.value);
  16406. handleClose();
  16407. }
  16408. };
  16409. const addToHistory = (item) => {
  16410. const existingIndex = historyAuditors.value.findIndex((auditor) => auditor.userId === item.userId);
  16411. if (existingIndex !== -1) {
  16412. historyAuditors.value.splice(existingIndex, 1);
  16413. }
  16414. historyAuditors.value.unshift(item);
  16415. if (historyAuditors.value.length > 10) {
  16416. historyAuditors.value.pop();
  16417. }
  16418. uni.setStorageSync("historyAuditors", historyAuditors.value);
  16419. };
  16420. vue.onMounted(() => {
  16421. const storedHistory = uni.getStorageSync("historyAuditors") || [];
  16422. historyAuditors.value = storedHistory;
  16423. });
  16424. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyAuditors, checkUserId, auditorSearch, handleSearch, selectItem, selectAuditor, handleClose, handleConfirm, addToHistory, ref: vue.ref, onMounted: vue.onMounted };
  16425. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16426. return __returned__;
  16427. }
  16428. };
  16429. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  16430. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  16431. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  16432. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  16433. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  16434. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16435. show: $props.show,
  16436. onClose: $setup.handleClose,
  16437. mode: "bottom",
  16438. round: "10"
  16439. }, {
  16440. default: vue.withCtx(() => [
  16441. vue.createElementVNode("view", { class: "auditor-selector" }, [
  16442. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  16443. vue.createCommentVNode(" Title "),
  16444. vue.createElementVNode("view", { class: "header" }, [
  16445. vue.createElementVNode("text", { class: "title" }, "绑定审核员")
  16446. ]),
  16447. vue.createCommentVNode(" Search Box "),
  16448. vue.createElementVNode("view", { class: "search-box" }, [
  16449. vue.createVNode(_component_u_search, {
  16450. inputStyle: { "height": "80rpx", "font-size": "16px" },
  16451. actionStyle: { "font-size": "16px", color: "#22ac38" },
  16452. modelValue: $setup.searchKeyword,
  16453. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  16454. placeholder: "搜索审核员",
  16455. "show-action": true,
  16456. "action-text": "搜索",
  16457. onSearch: $setup.handleSearch,
  16458. onCustom: $setup.handleSearch
  16459. }, null, 8, ["modelValue"])
  16460. ]),
  16461. vue.createCommentVNode(" Search Results "),
  16462. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16463. key: 0,
  16464. class: "search-result"
  16465. }, [
  16466. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  16467. vue.createElementVNode("view", { class: "tag-group" }, [
  16468. (vue.openBlock(true), vue.createElementBlock(
  16469. vue.Fragment,
  16470. null,
  16471. vue.renderList($setup.searchResults, (item) => {
  16472. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16473. key: item,
  16474. text: item.userName,
  16475. plain: $setup.checkUserId !== item.userId,
  16476. shape: "circle",
  16477. onClick: ($event) => $setup.selectAuditor(item),
  16478. size: "large"
  16479. }, null, 8, ["text", "plain", "onClick"]);
  16480. }),
  16481. 128
  16482. /* KEYED_FRAGMENT */
  16483. ))
  16484. ])
  16485. ])) : vue.createCommentVNode("v-if", true),
  16486. vue.createCommentVNode(" History "),
  16487. $setup.historyAuditors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16488. key: 1,
  16489. class: "history-section"
  16490. }, [
  16491. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  16492. vue.createElementVNode("view", { class: "tag-group" }, [
  16493. (vue.openBlock(true), vue.createElementBlock(
  16494. vue.Fragment,
  16495. null,
  16496. vue.renderList($setup.historyAuditors, (item) => {
  16497. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16498. key: item,
  16499. text: item.userName,
  16500. plain: $setup.checkUserId !== item.userId,
  16501. shape: "circle",
  16502. onClick: ($event) => $setup.selectAuditor(item),
  16503. size: "large"
  16504. }, null, 8, ["text", "plain", "onClick"]);
  16505. }),
  16506. 128
  16507. /* KEYED_FRAGMENT */
  16508. ))
  16509. ])
  16510. ])) : vue.createCommentVNode("v-if", true)
  16511. ]),
  16512. vue.createCommentVNode(" Footer Buttons "),
  16513. vue.createElementVNode("view", { class: "footer" }, [
  16514. vue.createVNode(_component_u_button, {
  16515. onClick: $setup.handleClose,
  16516. text: "取消",
  16517. plain: "",
  16518. shape: "circle"
  16519. }),
  16520. vue.createVNode(_component_u_button, {
  16521. type: "primary",
  16522. onClick: $setup.handleConfirm,
  16523. text: "确定",
  16524. shape: "circle"
  16525. })
  16526. ])
  16527. ])
  16528. ]),
  16529. _: 1
  16530. /* STABLE */
  16531. }, 8, ["show"]);
  16532. }
  16533. const AuditorSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-8d9417b9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/AuditorSelector.vue"]]);
  16534. const props$b = {
  16535. props: {
  16536. // 输入框的内容
  16537. value: {
  16538. type: [String, Number],
  16539. default: props$G.textarea.value
  16540. },
  16541. // 输入框的内容
  16542. modelValue: {
  16543. type: [String, Number],
  16544. default: props$G.textarea.value
  16545. },
  16546. // 输入框为空时占位符
  16547. placeholder: {
  16548. type: [String, Number],
  16549. default: props$G.textarea.placeholder
  16550. },
  16551. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  16552. placeholderClass: {
  16553. type: String,
  16554. default: props$G.input.placeholderClass
  16555. },
  16556. // 指定placeholder的样式
  16557. placeholderStyle: {
  16558. type: [String, Object],
  16559. default: props$G.input.placeholderStyle
  16560. },
  16561. // 输入框高度
  16562. height: {
  16563. type: [String, Number],
  16564. default: props$G.textarea.height
  16565. },
  16566. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  16567. confirmType: {
  16568. type: String,
  16569. default: props$G.textarea.confirmType
  16570. },
  16571. // 是否禁用
  16572. disabled: {
  16573. type: Boolean,
  16574. default: props$G.textarea.disabled
  16575. },
  16576. // 是否显示统计字数
  16577. count: {
  16578. type: Boolean,
  16579. default: props$G.textarea.count
  16580. },
  16581. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  16582. focus: {
  16583. type: Boolean,
  16584. default: props$G.textarea.focus
  16585. },
  16586. // 是否自动增加高度
  16587. autoHeight: {
  16588. type: Boolean,
  16589. default: props$G.textarea.autoHeight
  16590. },
  16591. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  16592. fixed: {
  16593. type: Boolean,
  16594. default: props$G.textarea.fixed
  16595. },
  16596. // 指定光标与键盘的距离
  16597. cursorSpacing: {
  16598. type: Number,
  16599. default: props$G.textarea.cursorSpacing
  16600. },
  16601. // 指定focus时的光标位置
  16602. cursor: {
  16603. type: [String, Number],
  16604. default: props$G.textarea.cursor
  16605. },
  16606. // 是否显示键盘上方带有”完成“按钮那一栏,
  16607. showConfirmBar: {
  16608. type: Boolean,
  16609. default: props$G.textarea.showConfirmBar
  16610. },
  16611. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  16612. selectionStart: {
  16613. type: Number,
  16614. default: props$G.textarea.selectionStart
  16615. },
  16616. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  16617. selectionEnd: {
  16618. type: Number,
  16619. default: props$G.textarea.selectionEnd
  16620. },
  16621. // 键盘弹起时,是否自动上推页面
  16622. adjustPosition: {
  16623. type: Boolean,
  16624. default: props$G.textarea.adjustPosition
  16625. },
  16626. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  16627. disableDefaultPadding: {
  16628. type: Boolean,
  16629. default: props$G.textarea.disableDefaultPadding
  16630. },
  16631. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  16632. holdKeyboard: {
  16633. type: Boolean,
  16634. default: props$G.textarea.holdKeyboard
  16635. },
  16636. // 最大输入长度,设置为 -1 的时候不限制最大长度
  16637. maxlength: {
  16638. type: [String, Number],
  16639. default: props$G.textarea.maxlength
  16640. },
  16641. // 边框类型,surround-四周边框,bottom-底部边框
  16642. border: {
  16643. type: String,
  16644. default: props$G.textarea.border
  16645. },
  16646. // 用于处理或者过滤输入框内容的方法
  16647. formatter: {
  16648. type: [Function, null],
  16649. default: props$G.textarea.formatter
  16650. },
  16651. // 是否忽略组件内对文本合成系统事件的处理
  16652. ignoreCompositionEvent: {
  16653. type: Boolean,
  16654. default: true
  16655. }
  16656. }
  16657. };
  16658. const _sfc_main$1b = {
  16659. name: "u-textarea",
  16660. mixins: [mpMixin, mixin, props$b],
  16661. data() {
  16662. return {
  16663. // 输入框的值
  16664. innerValue: "",
  16665. // 是否处于获得焦点状态
  16666. focused: false,
  16667. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  16668. firstChange: true,
  16669. // value绑定值的变化是由内部还是外部引起的
  16670. changeFromInner: false,
  16671. // 过滤处理方法
  16672. innerFormatter: (value2) => value2
  16673. };
  16674. },
  16675. created() {
  16676. },
  16677. watch: {
  16678. modelValue: {
  16679. immediate: true,
  16680. handler(newVal, oldVal) {
  16681. this.innerValue = newVal;
  16682. this.firstChange = false;
  16683. this.changeFromInner = false;
  16684. }
  16685. }
  16686. },
  16687. computed: {
  16688. // 组件的类名
  16689. textareaClass() {
  16690. let classes = [], { border, disabled } = this;
  16691. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  16692. border === "bottom" && (classes = classes.concat([
  16693. "u-border-bottom",
  16694. "u-textarea--no-radius"
  16695. ]));
  16696. disabled && classes.push("u-textarea--disabled");
  16697. return classes.join(" ");
  16698. },
  16699. // 组件的样式
  16700. textareaStyle() {
  16701. const style = {};
  16702. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16703. }
  16704. },
  16705. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  16706. methods: {
  16707. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  16708. setFormatter(e) {
  16709. this.innerFormatter = e;
  16710. },
  16711. onFocus(e) {
  16712. this.$emit("focus", e);
  16713. },
  16714. onBlur(e) {
  16715. this.$emit("blur", e);
  16716. uni.$u.formValidate(this, "blur");
  16717. },
  16718. onLinechange(e) {
  16719. this.$emit("linechange", e);
  16720. },
  16721. onInput(e) {
  16722. let { value: value2 = "" } = e.detail || {};
  16723. const formatter = this.formatter || this.innerFormatter;
  16724. const formatValue = formatter(value2);
  16725. this.innerValue = value2;
  16726. this.$nextTick(() => {
  16727. this.innerValue = formatValue;
  16728. this.valueChange();
  16729. });
  16730. },
  16731. // 内容发生变化,进行处理
  16732. valueChange() {
  16733. const value2 = this.innerValue;
  16734. this.$nextTick(() => {
  16735. this.$emit("update:modelValue", value2);
  16736. this.changeFromInner = true;
  16737. this.$emit("change", value2);
  16738. uni.$u.formValidate(this, "change");
  16739. });
  16740. },
  16741. onConfirm(e) {
  16742. this.$emit("confirm", e);
  16743. },
  16744. onKeyboardheightchange(e) {
  16745. this.$emit("keyboardheightchange", e);
  16746. }
  16747. }
  16748. };
  16749. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  16750. return vue.openBlock(), vue.createElementBlock(
  16751. "view",
  16752. {
  16753. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  16754. style: vue.normalizeStyle([$options.textareaStyle])
  16755. },
  16756. [
  16757. vue.createElementVNode("textarea", {
  16758. class: "u-textarea__field",
  16759. value: $data.innerValue,
  16760. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  16761. placeholder: _ctx.placeholder,
  16762. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  16763. "placeholder-class": _ctx.placeholderClass,
  16764. disabled: _ctx.disabled,
  16765. focus: _ctx.focus,
  16766. autoHeight: _ctx.autoHeight,
  16767. fixed: _ctx.fixed,
  16768. cursorSpacing: _ctx.cursorSpacing,
  16769. cursor: _ctx.cursor,
  16770. showConfirmBar: _ctx.showConfirmBar,
  16771. selectionStart: _ctx.selectionStart,
  16772. selectionEnd: _ctx.selectionEnd,
  16773. adjustPosition: _ctx.adjustPosition,
  16774. disableDefaultPadding: _ctx.disableDefaultPadding,
  16775. holdKeyboard: _ctx.holdKeyboard,
  16776. maxlength: _ctx.maxlength,
  16777. "confirm-type": _ctx.confirmType,
  16778. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  16779. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  16780. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  16781. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  16782. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  16783. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  16784. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  16785. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  16786. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  16787. "text",
  16788. {
  16789. key: 0,
  16790. class: "u-textarea__count",
  16791. style: vue.normalizeStyle({
  16792. "background-color": _ctx.disabled ? "transparent" : "#fff"
  16793. })
  16794. },
  16795. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  16796. 5
  16797. /* TEXT, STYLE */
  16798. )) : vue.createCommentVNode("v-if", true)
  16799. ],
  16800. 6
  16801. /* CLASS, STYLE */
  16802. );
  16803. }
  16804. const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-b6c174a6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
  16805. const props$a = {
  16806. props: {
  16807. // 背景颜色(默认transparent)
  16808. bgColor: {
  16809. type: String,
  16810. default: props$G.gap.bgColor
  16811. },
  16812. // 分割槽高度,单位px(默认30)
  16813. height: {
  16814. type: [String, Number],
  16815. default: props$G.gap.height
  16816. },
  16817. // 与上一个组件的距离
  16818. marginTop: {
  16819. type: [String, Number],
  16820. default: props$G.gap.marginTop
  16821. },
  16822. // 与下一个组件的距离
  16823. marginBottom: {
  16824. type: [String, Number],
  16825. default: props$G.gap.marginBottom
  16826. }
  16827. }
  16828. };
  16829. const _sfc_main$1a = {
  16830. name: "u-gap",
  16831. mixins: [mpMixin, mixin, props$a],
  16832. computed: {
  16833. gapStyle() {
  16834. const style = {
  16835. backgroundColor: this.bgColor,
  16836. height: uni.$u.addUnit(this.height),
  16837. marginTop: uni.$u.addUnit(this.marginTop),
  16838. marginBottom: uni.$u.addUnit(this.marginBottom)
  16839. };
  16840. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16841. }
  16842. }
  16843. };
  16844. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  16845. return vue.openBlock(), vue.createElementBlock(
  16846. "view",
  16847. {
  16848. class: "u-gap",
  16849. style: vue.normalizeStyle([$options.gapStyle])
  16850. },
  16851. null,
  16852. 4
  16853. /* STYLE */
  16854. );
  16855. }
  16856. const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-6fe44ee6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-gap/u-gap.vue"]]);
  16857. const props$9 = {
  16858. props: {
  16859. // 操作菜单是否展示 (默认false)
  16860. show: {
  16861. type: Boolean,
  16862. default: props$G.actionSheet.show
  16863. },
  16864. // 标题
  16865. title: {
  16866. type: String,
  16867. default: props$G.actionSheet.title
  16868. },
  16869. // 选项上方的描述信息
  16870. description: {
  16871. type: String,
  16872. default: props$G.actionSheet.description
  16873. },
  16874. // 数据
  16875. actions: {
  16876. type: Array,
  16877. default: props$G.actionSheet.actions
  16878. },
  16879. // 取消按钮的文字,不为空时显示按钮
  16880. cancelText: {
  16881. type: String,
  16882. default: props$G.actionSheet.cancelText
  16883. },
  16884. // 点击某个菜单项时是否关闭弹窗
  16885. closeOnClickAction: {
  16886. type: Boolean,
  16887. default: props$G.actionSheet.closeOnClickAction
  16888. },
  16889. // 处理底部安全区(默认true)
  16890. safeAreaInsetBottom: {
  16891. type: Boolean,
  16892. default: props$G.actionSheet.safeAreaInsetBottom
  16893. },
  16894. // 小程序的打开方式
  16895. openType: {
  16896. type: String,
  16897. default: props$G.actionSheet.openType
  16898. },
  16899. // 点击遮罩是否允许关闭 (默认true)
  16900. closeOnClickOverlay: {
  16901. type: Boolean,
  16902. default: props$G.actionSheet.closeOnClickOverlay
  16903. },
  16904. // 圆角值
  16905. round: {
  16906. type: [Boolean, String, Number],
  16907. default: props$G.actionSheet.round
  16908. }
  16909. }
  16910. };
  16911. const _sfc_main$19 = {
  16912. name: "u-action-sheet",
  16913. // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
  16914. mixins: [openType, button, mixin, props$9],
  16915. data() {
  16916. return {};
  16917. },
  16918. computed: {
  16919. // 操作项目的样式
  16920. itemStyle() {
  16921. return (index2) => {
  16922. let style = {};
  16923. if (this.actions[index2].color)
  16924. style.color = this.actions[index2].color;
  16925. if (this.actions[index2].fontSize)
  16926. style.fontSize = uni.$u.addUnit(this.actions[index2].fontSize);
  16927. if (this.actions[index2].disabled)
  16928. style.color = "#c0c4cc";
  16929. return style;
  16930. };
  16931. }
  16932. },
  16933. methods: {
  16934. closeHandler() {
  16935. if (this.closeOnClickOverlay) {
  16936. this.$emit("close");
  16937. }
  16938. },
  16939. // 点击取消按钮
  16940. cancel() {
  16941. this.$emit("close");
  16942. },
  16943. selectHandler(index2) {
  16944. const item = this.actions[index2];
  16945. if (item && !item.disabled && !item.loading) {
  16946. this.$emit("select", item);
  16947. if (this.closeOnClickAction) {
  16948. this.$emit("close");
  16949. }
  16950. }
  16951. }
  16952. }
  16953. };
  16954. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  16955. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  16956. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
  16957. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  16958. const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_3$2);
  16959. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  16960. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16961. show: _ctx.show,
  16962. mode: "bottom",
  16963. onClose: $options.closeHandler,
  16964. safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
  16965. round: _ctx.round
  16966. }, {
  16967. default: vue.withCtx(() => [
  16968. vue.createElementVNode("view", { class: "u-action-sheet" }, [
  16969. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  16970. key: 0,
  16971. class: "u-action-sheet__header"
  16972. }, [
  16973. vue.createElementVNode(
  16974. "text",
  16975. { class: "u-action-sheet__header__title u-line-1" },
  16976. vue.toDisplayString(_ctx.title),
  16977. 1
  16978. /* TEXT */
  16979. ),
  16980. vue.createElementVNode("view", {
  16981. class: "u-action-sheet__header__icon-wrap",
  16982. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.cancel && $options.cancel(...args), ["stop"]))
  16983. }, [
  16984. vue.createVNode(_component_u_icon, {
  16985. name: "close",
  16986. size: "17",
  16987. color: "#c8c9cc",
  16988. bold: ""
  16989. })
  16990. ])
  16991. ])) : vue.createCommentVNode("v-if", true),
  16992. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  16993. "text",
  16994. {
  16995. key: 1,
  16996. class: "u-action-sheet__description",
  16997. style: vue.normalizeStyle([{
  16998. marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}`
  16999. }])
  17000. },
  17001. vue.toDisplayString(_ctx.description),
  17002. 5
  17003. /* TEXT, STYLE */
  17004. )) : vue.createCommentVNode("v-if", true),
  17005. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  17006. _ctx.description ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  17007. vue.createElementVNode("view", { class: "u-action-sheet__item-wrap" }, [
  17008. (vue.openBlock(true), vue.createElementBlock(
  17009. vue.Fragment,
  17010. null,
  17011. vue.renderList(_ctx.actions, (item, index2) => {
  17012. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  17013. vue.createElementVNode("view", {
  17014. class: "u-action-sheet__item-wrap__item",
  17015. onClick: vue.withModifiers(($event) => $options.selectHandler(index2), ["stop"]),
  17016. "hover-class": !item.disabled && !item.loading ? "u-action-sheet--hover" : "",
  17017. "hover-stay-time": 150
  17018. }, [
  17019. !item.loading ? (vue.openBlock(), vue.createElementBlock(
  17020. vue.Fragment,
  17021. { key: 0 },
  17022. [
  17023. vue.createElementVNode(
  17024. "text",
  17025. {
  17026. class: "u-action-sheet__item-wrap__item__name",
  17027. style: vue.normalizeStyle([$options.itemStyle(index2)])
  17028. },
  17029. vue.toDisplayString(item.name),
  17030. 5
  17031. /* TEXT, STYLE */
  17032. ),
  17033. item.subname ? (vue.openBlock(), vue.createElementBlock(
  17034. "text",
  17035. {
  17036. key: 0,
  17037. class: "u-action-sheet__item-wrap__item__subname"
  17038. },
  17039. vue.toDisplayString(item.subname),
  17040. 1
  17041. /* TEXT */
  17042. )) : vue.createCommentVNode("v-if", true)
  17043. ],
  17044. 64
  17045. /* STABLE_FRAGMENT */
  17046. )) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  17047. key: 1,
  17048. "custom-class": "van-action-sheet__loading",
  17049. size: "18",
  17050. mode: "circle"
  17051. }))
  17052. ], 8, ["onClick", "hover-class"]),
  17053. index2 !== _ctx.actions.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  17054. ]);
  17055. }),
  17056. 128
  17057. /* KEYED_FRAGMENT */
  17058. ))
  17059. ])
  17060. ], true),
  17061. _ctx.cancelText ? (vue.openBlock(), vue.createBlock(_component_u_gap, {
  17062. key: 2,
  17063. bgColor: "#eaeaec",
  17064. height: "6"
  17065. })) : vue.createCommentVNode("v-if", true),
  17066. vue.createElementVNode("view", { "hover-class": "u-action-sheet--hover" }, [
  17067. _ctx.cancelText ? (vue.openBlock(), vue.createElementBlock(
  17068. "text",
  17069. {
  17070. key: 0,
  17071. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
  17072. }, ["stop", "prevent"])),
  17073. "hover-stay-time": 150,
  17074. class: "u-action-sheet__cancel-text",
  17075. onClick: _cache[2] || (_cache[2] = (...args) => $options.cancel && $options.cancel(...args))
  17076. },
  17077. vue.toDisplayString(_ctx.cancelText),
  17078. 33
  17079. /* TEXT, NEED_HYDRATION */
  17080. )) : vue.createCommentVNode("v-if", true)
  17081. ])
  17082. ])
  17083. ]),
  17084. _: 3
  17085. /* FORWARDED */
  17086. }, 8, ["show", "onClose", "safeAreaInsetBottom", "round"]);
  17087. }
  17088. const __easycom_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-69669810"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue"]]);
  17089. const _sfc_main$18 = {
  17090. __name: "SmsModal",
  17091. props: {
  17092. "modelValue": { type: Boolean },
  17093. "modelModifiers": {}
  17094. },
  17095. emits: /* @__PURE__ */ vue.mergeModels(["success"], ["update:modelValue"]),
  17096. setup(__props, { expose: __expose, emit: __emit }) {
  17097. const { proxy } = vue.getCurrentInstance();
  17098. const emit2 = __emit;
  17099. const visible = vue.useModel(__props, "modelValue");
  17100. const formRef = vue.ref();
  17101. const smsRecords = vue.ref([]);
  17102. const form = vue.reactive({
  17103. orderId: null,
  17104. type: "",
  17105. remark: ""
  17106. });
  17107. const smsContentList = vue.ref([]);
  17108. const handleChangeType = (val) => {
  17109. const selectedItem = smsContentList.value.find((item) => item.type === val);
  17110. if (selectedItem) {
  17111. form.remark = selectedItem.smsContent;
  17112. }
  17113. };
  17114. const rules2 = vue.reactive({
  17115. type: [
  17116. {
  17117. required: true,
  17118. message: "请选择短信类型",
  17119. trigger: "change"
  17120. }
  17121. ],
  17122. remark: [
  17123. {
  17124. required: true,
  17125. message: "请输入短信预览",
  17126. trigger: "blur"
  17127. }
  17128. ]
  17129. });
  17130. const handleCancel = () => {
  17131. visible.value = false;
  17132. resetForm();
  17133. };
  17134. const resetForm = () => {
  17135. var _a;
  17136. form.orderId = null;
  17137. form.type = "";
  17138. form.remark = "";
  17139. smsRecords.value = [];
  17140. smsContentList.value = [];
  17141. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  17142. };
  17143. const handleOpen = (orderId) => {
  17144. resetForm();
  17145. if (orderId) {
  17146. formatAppLog("log", "at pages/index/detail/components/SmsModal.vue:152", "打开短信弹窗,订单ID:", orderId);
  17147. visible.value = true;
  17148. getSmsLogInfo(orderId);
  17149. }
  17150. };
  17151. const getSmsLogInfo = (orderId) => {
  17152. uni.$u.http.get(`/app/orderinfo/orderSmsLog/${orderId}`).then((res2) => {
  17153. if (res2.code === 200) {
  17154. let data = res2.data || {};
  17155. form.orderId = data.orderId;
  17156. smsRecords.value = data.smsLogList || [];
  17157. smsContentList.value = data.smsContentList || [];
  17158. } else {
  17159. uni.$u.toast(res2.msg || "获取短信记录失败");
  17160. }
  17161. }).catch((err) => {
  17162. formatAppLog("error", "at pages/index/detail/components/SmsModal.vue:170", "获取短信记录失败:", err);
  17163. uni.$u.toast("获取短信记录失败");
  17164. });
  17165. };
  17166. const handleSubmit = () => {
  17167. var _a;
  17168. (_a = formRef.value) == null ? void 0 : _a.validate().then((valid) => {
  17169. if (!valid)
  17170. return;
  17171. uni.$u.http.post("/app/orderinfo/orderSmsLogSend", {
  17172. orderId: form.orderId,
  17173. type: form.type
  17174. }).then((res2) => {
  17175. if (res2.code == 200) {
  17176. uni.$u.toast("短信发送成功");
  17177. emit2("success");
  17178. handleCancel();
  17179. } else {
  17180. uni.$u.toast(res2.msg || "短信发送失败");
  17181. }
  17182. }).catch((err) => {
  17183. formatAppLog("error", "at pages/index/detail/components/SmsModal.vue:192", "短信发送失败:", err);
  17184. uni.$u.toast("短信发送失败");
  17185. });
  17186. }).catch((err) => {
  17187. formatAppLog("log", "at pages/index/detail/components/SmsModal.vue:196", "表单验证失败:", err);
  17188. });
  17189. };
  17190. __expose({
  17191. handleOpen
  17192. });
  17193. const __returned__ = { proxy, emit: emit2, visible, formRef, smsRecords, form, smsContentList, handleChangeType, rules: rules2, handleCancel, resetForm, handleOpen, getSmsLogInfo, handleSubmit, ref: vue.ref, reactive: vue.reactive, nextTick: vue.nextTick, getCurrentInstance: vue.getCurrentInstance };
  17194. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17195. return __returned__;
  17196. }
  17197. };
  17198. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  17199. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  17200. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  17201. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  17202. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  17203. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  17204. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  17205. return vue.openBlock(), vue.createBlock(_component_u_modal, {
  17206. show: $setup.visible,
  17207. title: "推送短信",
  17208. "show-cancel-button": true,
  17209. showCancelButton: true,
  17210. "show-confirm-button": true,
  17211. showConfirmButton: true,
  17212. confirmText: "确定",
  17213. cancelText: "关闭",
  17214. onConfirm: $setup.handleSubmit,
  17215. onCancel: $setup.handleCancel,
  17216. onClose: $setup.handleCancel,
  17217. width: "650rpx"
  17218. }, {
  17219. default: vue.withCtx(() => [
  17220. vue.createElementVNode("view", { class: "modal-content" }, [
  17221. vue.createVNode(_component_u_form, {
  17222. ref: "formRef",
  17223. model: $setup.form,
  17224. rules: $setup.rules,
  17225. labelWidth: "120",
  17226. labelPosition: "top"
  17227. }, {
  17228. default: vue.withCtx(() => [
  17229. vue.createVNode(_component_u_form_item, {
  17230. label: "短信类型",
  17231. prop: "type",
  17232. required: ""
  17233. }, {
  17234. default: vue.withCtx(() => [
  17235. vue.createVNode(_component_u_radio_group, {
  17236. modelValue: $setup.form.type,
  17237. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.type = $event),
  17238. placement: "column",
  17239. onChange: $setup.handleChangeType
  17240. }, {
  17241. default: vue.withCtx(() => [
  17242. (vue.openBlock(true), vue.createElementBlock(
  17243. vue.Fragment,
  17244. null,
  17245. vue.renderList($setup.smsContentList, (item) => {
  17246. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  17247. key: item.type,
  17248. name: item.type,
  17249. label: item.typeName
  17250. }, null, 8, ["name", "label"]);
  17251. }),
  17252. 128
  17253. /* KEYED_FRAGMENT */
  17254. ))
  17255. ]),
  17256. _: 1
  17257. /* STABLE */
  17258. }, 8, ["modelValue"])
  17259. ]),
  17260. _: 1
  17261. /* STABLE */
  17262. }),
  17263. vue.createVNode(_component_u_form_item, {
  17264. label: "短信预览",
  17265. prop: "remark",
  17266. required: ""
  17267. }, {
  17268. default: vue.withCtx(() => [
  17269. vue.createVNode(_component_u_textarea, {
  17270. modelValue: $setup.form.remark,
  17271. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  17272. placeholder: "请输入短信预览",
  17273. disabled: true,
  17274. rows: 4,
  17275. count: ""
  17276. }, null, 8, ["modelValue"])
  17277. ]),
  17278. _: 1
  17279. /* STABLE */
  17280. }),
  17281. vue.createVNode(_component_u_form_item, { label: "推送历史" }, {
  17282. default: vue.withCtx(() => [
  17283. vue.createElementVNode("view", { class: "sms-history" }, [
  17284. $setup.smsRecords.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  17285. key: 0,
  17286. class: "no-data"
  17287. }, [
  17288. vue.createElementVNode("text", null, "暂无推送记录")
  17289. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  17290. key: 1,
  17291. class: "history-list"
  17292. }, [
  17293. (vue.openBlock(true), vue.createElementBlock(
  17294. vue.Fragment,
  17295. null,
  17296. vue.renderList($setup.smsRecords, (record, index2) => {
  17297. return vue.openBlock(), vue.createElementBlock("view", {
  17298. key: record.id || index2,
  17299. class: "history-item"
  17300. }, [
  17301. vue.createElementVNode("view", { class: "history-header" }, [
  17302. vue.createElementVNode(
  17303. "text",
  17304. { class: "sender" },
  17305. vue.toDisplayString(record.createName),
  17306. 1
  17307. /* TEXT */
  17308. ),
  17309. vue.createElementVNode(
  17310. "text",
  17311. { class: "time" },
  17312. vue.toDisplayString(record.createTime),
  17313. 1
  17314. /* TEXT */
  17315. ),
  17316. vue.createElementVNode(
  17317. "text",
  17318. {
  17319. class: vue.normalizeClass(["status", record.status == 1 ? "success" : "fail"])
  17320. },
  17321. vue.toDisplayString(record.status == 1 ? "成功" : "失败"),
  17322. 3
  17323. /* TEXT, CLASS */
  17324. )
  17325. ]),
  17326. vue.createElementVNode("view", { class: "history-content" }, [
  17327. vue.createElementVNode(
  17328. "text",
  17329. null,
  17330. vue.toDisplayString(record.smsContent),
  17331. 1
  17332. /* TEXT */
  17333. )
  17334. ])
  17335. ]);
  17336. }),
  17337. 128
  17338. /* KEYED_FRAGMENT */
  17339. ))
  17340. ]))
  17341. ])
  17342. ]),
  17343. _: 1
  17344. /* STABLE */
  17345. })
  17346. ]),
  17347. _: 1
  17348. /* STABLE */
  17349. }, 8, ["model", "rules"])
  17350. ])
  17351. ]),
  17352. _: 1
  17353. /* STABLE */
  17354. }, 8, ["show"]);
  17355. }
  17356. const SmsModal = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-3cc29a87"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/SmsModal.vue"]]);
  17357. const _sfc_main$17 = {
  17358. __name: "OrderInfo",
  17359. props: {
  17360. orderId: String,
  17361. estimatedAmount: Number,
  17362. userNote: String,
  17363. detail: Object
  17364. // Add more props as needed
  17365. },
  17366. emits: ["refresh"],
  17367. setup(__props, { expose: __expose, emit: __emit }) {
  17368. __expose();
  17369. const props2 = __props;
  17370. let finalExpressList = { 1: "顺丰快递", 2: "京东快递", 3: "德邦快递" };
  17371. let finalExpressText = vue.computed(() => {
  17372. return props2.detail.finalExpress ? finalExpressList[props2.detail.finalExpress] : "";
  17373. });
  17374. function playGlobalSound() {
  17375. uni.$u.playClickSound();
  17376. }
  17377. const statusEnum = {
  17378. 0: "创建",
  17379. 1: "用户删除",
  17380. 2: "下单(待初审)",
  17381. 3: "初审(待取书)",
  17382. 4: "初审未通过",
  17383. 5: "快递取书(待签收)",
  17384. 6: "快递签收(待收货)",
  17385. 7: "物流签收(路由异常)",
  17386. 8: "仓库收货(待审核)",
  17387. 9: "审核中(审核未提交)",
  17388. 10: "已审核(待付款)",
  17389. 11: "已完成"
  17390. };
  17391. let statusText = vue.computed(() => {
  17392. return statusEnum[props2.detail.status] || "未知状态";
  17393. });
  17394. const maskedSendMobile = vue.computed(() => {
  17395. if (props2.detail.sendMobile && props2.detail.sendMobile.length === 11) {
  17396. return props2.detail.sendMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  17397. }
  17398. return props2.detail.sendMobile;
  17399. });
  17400. function copyToClipboard(text) {
  17401. uni.setClipboardData({
  17402. data: text,
  17403. success: function() {
  17404. uni.showToast({
  17405. title: "复制成功",
  17406. icon: "success"
  17407. });
  17408. },
  17409. fail: function(err) {
  17410. formatAppLog("error", "at pages/index/detail/components/OrderInfo.vue:148", "Could not copy text: ", err);
  17411. }
  17412. });
  17413. }
  17414. const showModal = vue.ref(false);
  17415. const internalRemark = vue.ref("");
  17416. function fillRemark(text) {
  17417. internalRemark.value = text;
  17418. }
  17419. const remarkInfo = vue.ref({});
  17420. function handleRemark() {
  17421. var _a;
  17422. showModal.value = true;
  17423. remarkInfo.value = ((_a = props2.detail.manageRemark) == null ? void 0 : _a[0]) || {};
  17424. internalRemark.value = remarkInfo.value.remark || "";
  17425. }
  17426. function handleCancel() {
  17427. showModal.value = false;
  17428. playGlobalSound();
  17429. }
  17430. const emit2 = __emit;
  17431. function confirmRemark() {
  17432. playGlobalSound();
  17433. uni.$u.http.post("/app/orderinfo/setManageRemark", {
  17434. orderId: props2.detail.orderId,
  17435. remark: internalRemark.value,
  17436. id: remarkInfo.value.id
  17437. }).then((res2) => {
  17438. if (res2.code == 200) {
  17439. uni.$u.toast("保存成功");
  17440. uni.$u.ttsModule.speak("保存成功");
  17441. showModal.value = false;
  17442. emit2("refresh");
  17443. } else {
  17444. uni.$u.toast(res2.msg);
  17445. }
  17446. });
  17447. }
  17448. const showActionSheet = vue.ref(false);
  17449. const actionSheetActions = vue.ref([
  17450. {
  17451. name: "发送短信(手机发送)",
  17452. value: "sms"
  17453. },
  17454. {
  17455. name: "一键发送短信(服务器发送)",
  17456. value: "server_sms"
  17457. },
  17458. {
  17459. name: "QQ",
  17460. value: "qq"
  17461. },
  17462. {
  17463. name: "微信",
  17464. value: "wechat"
  17465. },
  17466. {
  17467. name: "取消",
  17468. value: "cancel"
  17469. }
  17470. ]);
  17471. function handleWeixin() {
  17472. playGlobalSound();
  17473. showActionSheet.value = true;
  17474. }
  17475. function closeActionSheet() {
  17476. showActionSheet.value = false;
  17477. }
  17478. function selectAction(item) {
  17479. playGlobalSound();
  17480. showActionSheet.value = false;
  17481. if (item.value === "server_sms") {
  17482. handleSendSMS();
  17483. } else if (item.value == "cancel") {
  17484. closeActionSheet();
  17485. } else {
  17486. uni.showToast({
  17487. title: "此功能暂无开放",
  17488. icon: "none"
  17489. });
  17490. }
  17491. }
  17492. const showSmsModal = vue.ref(false);
  17493. const smsModalRef = vue.ref();
  17494. function handleSendSMS() {
  17495. playGlobalSound();
  17496. if (smsModalRef.value && props2.detail.orderId) {
  17497. smsModalRef.value.handleOpen(props2.detail.orderId);
  17498. } else {
  17499. uni.showToast({
  17500. title: "订单信息异常",
  17501. icon: "none"
  17502. });
  17503. }
  17504. }
  17505. function handleSmsSuccess() {
  17506. uni.showToast({
  17507. title: "短信发送成功",
  17508. icon: "success"
  17509. });
  17510. uni.$u.ttsModule.speak("短信发送成功");
  17511. }
  17512. const __returned__ = { props: props2, get finalExpressList() {
  17513. return finalExpressList;
  17514. }, set finalExpressList(v) {
  17515. finalExpressList = v;
  17516. }, get finalExpressText() {
  17517. return finalExpressText;
  17518. }, set finalExpressText(v) {
  17519. finalExpressText = v;
  17520. }, playGlobalSound, statusEnum, get statusText() {
  17521. return statusText;
  17522. }, set statusText(v) {
  17523. statusText = v;
  17524. }, maskedSendMobile, copyToClipboard, showModal, internalRemark, fillRemark, remarkInfo, handleRemark, handleCancel, emit: emit2, confirmRemark, showActionSheet, actionSheetActions, handleWeixin, closeActionSheet, selectAction, showSmsModal, smsModalRef, handleSendSMS, handleSmsSuccess, computed: vue.computed, ref: vue.ref, watch: vue.watch, SmsModal };
  17525. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17526. return __returned__;
  17527. }
  17528. };
  17529. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  17530. var _a, _b, _c, _d;
  17531. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  17532. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  17533. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  17534. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  17535. const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_4$2);
  17536. return vue.openBlock(), vue.createElementBlock("view", null, [
  17537. vue.createElementVNode("view", { class: "order-info bg-white" }, [
  17538. vue.createElementVNode("view", { class: "info-item flex" }, [
  17539. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  17540. vue.createElementVNode(
  17541. "text",
  17542. {
  17543. style: { "color": "#22ac38" },
  17544. class: "flex-1 text-center content",
  17545. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.detail.orderId))
  17546. },
  17547. vue.toDisplayString($props.detail.orderId),
  17548. 1
  17549. /* TEXT */
  17550. )
  17551. ]),
  17552. vue.createElementVNode("view", { class: "info-item" }, [
  17553. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  17554. vue.createElementVNode(
  17555. "text",
  17556. { class: "content" },
  17557. vue.toDisplayString($props.detail.expectMoney),
  17558. 1
  17559. /* TEXT */
  17560. ),
  17561. vue.createElementVNode("text", { class: "label border-left" }, "审核金额"),
  17562. vue.createElementVNode(
  17563. "text",
  17564. { class: "content" },
  17565. vue.toDisplayString($props.detail.finalMoney),
  17566. 1
  17567. /* TEXT */
  17568. )
  17569. ]),
  17570. vue.createElementVNode("view", { class: "info-item" }, [
  17571. vue.createElementVNode("text", { class: "label" }, "用户备注"),
  17572. vue.createElementVNode(
  17573. "text",
  17574. { class: "content" },
  17575. vue.toDisplayString($props.detail.userRemark),
  17576. 1
  17577. /* TEXT */
  17578. )
  17579. ]),
  17580. vue.createElementVNode("view", {
  17581. class: "info-item",
  17582. onClick: $setup.handleRemark
  17583. }, [
  17584. vue.createElementVNode("text", { class: "label" }, "内部备注"),
  17585. vue.createElementVNode(
  17586. "text",
  17587. { class: "content" },
  17588. vue.toDisplayString(((_a = $props.detail) == null ? void 0 : _a.manageRemark) ? ((_b = $props.detail) == null ? void 0 : _b.manageRemark.length) > 0 ? (_d = (_c = $props.detail) == null ? void 0 : _c.manageRemark[0]) == null ? void 0 : _d.remark : " " : " "),
  17589. 1
  17590. /* TEXT */
  17591. )
  17592. ]),
  17593. vue.createElementVNode("view", { class: "info-item" }, [
  17594. vue.createElementVNode("text", { class: "label" }, "订单状态"),
  17595. vue.createElementVNode(
  17596. "text",
  17597. {
  17598. class: "content",
  17599. style: { "color": "#c5493e" }
  17600. },
  17601. "[" + vue.toDisplayString($setup.statusText) + "]",
  17602. 1
  17603. /* TEXT */
  17604. )
  17605. ]),
  17606. vue.createElementVNode("view", { class: "info-item" }, [
  17607. vue.createElementVNode("text", { class: "label" }, "快递"),
  17608. vue.createElementVNode("text", { class: "content" }, [
  17609. vue.createTextVNode(
  17610. vue.toDisplayString($setup.finalExpressText),
  17611. 1
  17612. /* TEXT */
  17613. ),
  17614. vue.createElementVNode(
  17615. "text",
  17616. {
  17617. style: { "color": "#409eef" },
  17618. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.detail.waybillCode))
  17619. },
  17620. "(单号:" + vue.toDisplayString($props.detail.waybillCode) + ")",
  17621. 1
  17622. /* TEXT */
  17623. )
  17624. ])
  17625. ]),
  17626. vue.createElementVNode("view", { class: "info-item" }, [
  17627. vue.createElementVNode("text", { class: "label" }, [
  17628. vue.createTextVNode("发件人"),
  17629. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  17630. ]),
  17631. vue.createElementVNode("view", { class: "content flex flex-a-c flex-j-c" }, [
  17632. vue.createElementVNode("text", {
  17633. class: "content-text",
  17634. onClick: _cache[2] || (_cache[2] = ($event) => $setup.copyToClipboard($props.detail.sendMobile))
  17635. }, "复制"),
  17636. vue.createElementVNode(
  17637. "text",
  17638. { class: "content-text ml-10 mr-10" },
  17639. vue.toDisplayString($setup.maskedSendMobile),
  17640. 1
  17641. /* TEXT */
  17642. ),
  17643. $props.detail.orderFrom == 1 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  17644. key: 0,
  17645. name: "weixin-circle-fill",
  17646. size: "18",
  17647. color: "#22ac38",
  17648. onClick: $setup.handleWeixin
  17649. })) : vue.createCommentVNode("v-if", true),
  17650. $props.detail.orderFrom == 2 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  17651. key: 1,
  17652. name: "zhifubao-circle-fill",
  17653. size: "18",
  17654. color: "#999",
  17655. onClick: $setup.handleWeixin
  17656. })) : vue.createCommentVNode("v-if", true)
  17657. ])
  17658. ]),
  17659. vue.createElementVNode("view", { class: "info-item" }, [
  17660. vue.createElementVNode("text", { class: "label" }, "发货地址"),
  17661. vue.createElementVNode(
  17662. "text",
  17663. { class: "content" },
  17664. vue.toDisplayString($props.detail.sendAddress),
  17665. 1
  17666. /* TEXT */
  17667. )
  17668. ]),
  17669. vue.createElementVNode("view", { class: "info-item" }, [
  17670. vue.createElementVNode("text", { class: "label" }, "收货仓库"),
  17671. vue.createElementVNode(
  17672. "text",
  17673. { class: "content" },
  17674. vue.toDisplayString($props.detail.recipientAddress) + "-" + vue.toDisplayString($props.detail.recipientGodown) + "-" + vue.toDisplayString($props.detail.recipientName),
  17675. 1
  17676. /* TEXT */
  17677. )
  17678. ])
  17679. ]),
  17680. vue.createVNode(_component_u_modal, {
  17681. show: $setup.showModal,
  17682. title: "编辑内部备注",
  17683. showCancelButton: true,
  17684. onConfirm: $setup.confirmRemark,
  17685. onCancel: $setup.handleCancel
  17686. }, {
  17687. default: vue.withCtx(() => [
  17688. vue.createElementVNode("view", {
  17689. class: "modal-content w100",
  17690. onClick: $setup.playGlobalSound
  17691. }, [
  17692. vue.createVNode(_component_u_textarea, {
  17693. modelValue: $setup.internalRemark,
  17694. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.internalRemark = $event),
  17695. placeholder: "编辑内部备注",
  17696. autoHeight: "",
  17697. style: { "min-height": "100px" }
  17698. }, null, 8, ["modelValue"]),
  17699. vue.createElementVNode("view", { class: "mt-20 common-title" }, "快速填入"),
  17700. vue.createElementVNode("view", { class: "quick-fill mt-16" }, [
  17701. vue.createVNode(_component_u_tag, {
  17702. class: "mr-10 mb-10",
  17703. onClick: _cache[4] || (_cache[4] = ($event) => $setup.fillRemark("少书给客服")),
  17704. text: "少书给客服"
  17705. }),
  17706. vue.createVNode(_component_u_tag, {
  17707. class: "mr-10 mb-10",
  17708. onClick: _cache[5] || (_cache[5] = ($event) => $setup.fillRemark("多书给客服")),
  17709. text: "多书给客服"
  17710. }),
  17711. vue.createVNode(_component_u_tag, {
  17712. class: "mr-10 mb-10",
  17713. onClick: _cache[6] || (_cache[6] = ($event) => $setup.fillRemark("子母件")),
  17714. text: "子母件"
  17715. }),
  17716. vue.createVNode(_component_u_tag, {
  17717. class: "mr-10 mb-10",
  17718. onClick: _cache[7] || (_cache[7] = ($event) => $setup.fillRemark("书单不符给客服")),
  17719. text: "书单不符给客服"
  17720. }),
  17721. vue.createVNode(_component_u_tag, {
  17722. class: "mr-10 mb-10",
  17723. onClick: _cache[8] || (_cache[8] = ($event) => $setup.fillRemark("需理赔给客服")),
  17724. text: "需理赔给客服"
  17725. })
  17726. ])
  17727. ])
  17728. ]),
  17729. _: 1
  17730. /* STABLE */
  17731. }, 8, ["show"]),
  17732. vue.createVNode(_component_u_action_sheet, {
  17733. show: $setup.showActionSheet,
  17734. "show-cancel": true,
  17735. actions: $setup.actionSheetActions,
  17736. title: "发送短信",
  17737. onClose: $setup.closeActionSheet,
  17738. onSelect: $setup.selectAction
  17739. }, null, 8, ["show", "actions"]),
  17740. vue.createCommentVNode(" 短信推送弹窗 "),
  17741. vue.createVNode($setup["SmsModal"], {
  17742. ref: "smsModalRef",
  17743. modelValue: $setup.showSmsModal,
  17744. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.showSmsModal = $event),
  17745. onSuccess: $setup.handleSmsSuccess
  17746. }, null, 8, ["modelValue"])
  17747. ]);
  17748. }
  17749. const OrderInfo = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-034ad4bc"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/OrderInfo.vue"]]);
  17750. const _sfc_main$16 = {
  17751. __name: "UserInfoCard",
  17752. props: {
  17753. detail: {
  17754. type: Object,
  17755. default: () => ({})
  17756. }
  17757. },
  17758. setup(__props, { expose: __expose }) {
  17759. __expose();
  17760. const props2 = __props;
  17761. const handleUserOrders = () => {
  17762. uni.redirectTo({
  17763. url: `/pages/index/detail/user-orders?userId=${props2.detail.userId}`
  17764. });
  17765. };
  17766. const formattedName = vue.computed(() => {
  17767. var _a, _b;
  17768. return ((_b = (_a = props2.detail) == null ? void 0 : _a.userNick) == null ? void 0 : _b.charAt(0)) + "**";
  17769. });
  17770. const statusClass = vue.computed(() => {
  17771. return props2.detail.userStatus == 1 ? "color-green" : "color-red";
  17772. });
  17773. const blacklistAction = vue.computed(() => {
  17774. return props2.detail.userStatus == 1 ? "加入黑名单" : "移除黑名单";
  17775. });
  17776. const showModal = vue.ref(false);
  17777. const showBlacklistModal = vue.ref(false);
  17778. const reason = vue.ref("");
  17779. const toggleBlacklist = () => {
  17780. showBlacklistModal.value = true;
  17781. };
  17782. const confirmBlacklist = () => {
  17783. let apiStr = props2.detail.userStatus == 1 ? "/app/appUser/setUserBlack" : "app/appUser/removeUserBlack";
  17784. uni.$u.http.post(apiStr, {
  17785. userId: props2.detail.userId,
  17786. reason: reason.value
  17787. }).then((res2) => {
  17788. if (res2.code == 200) {
  17789. uni.$u.toast("操作成功");
  17790. showBlacklistModal.value = false;
  17791. props2.detail.userStatus = props2.detail.userStatus == 1 ? 2 : 1;
  17792. } else {
  17793. uni.$u.toast(res2.msg);
  17794. }
  17795. });
  17796. };
  17797. const __returned__ = { props: props2, handleUserOrders, formattedName, statusClass, blacklistAction, showModal, showBlacklistModal, reason, toggleBlacklist, confirmBlacklist, ref: vue.ref, computed: vue.computed };
  17798. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17799. return __returned__;
  17800. }
  17801. };
  17802. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  17803. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  17804. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-card bg-white mt-16" }, [
  17805. vue.createElementVNode("view", { class: "header" }, [
  17806. vue.createElementVNode(
  17807. "text",
  17808. { style: { "color": "#666" } },
  17809. vue.toDisplayString($props.detail.orderTime),
  17810. 1
  17811. /* TEXT */
  17812. ),
  17813. vue.createElementVNode("text", {
  17814. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true),
  17815. class: "color-green"
  17816. }, "[查看订单日志]")
  17817. ]),
  17818. vue.createElementVNode("view", { class: "content flex flex-j-b" }, [
  17819. vue.createElementVNode("image", {
  17820. src: $props.detail.imgPath,
  17821. class: "user-image"
  17822. }, null, 8, ["src"]),
  17823. vue.createElementVNode("view", { class: "flex flex-a-e flex-1 ml-12" }, [
  17824. vue.createElementVNode("view", { class: "flex flex-d flex-1" }, [
  17825. vue.createElementVNode("text", {
  17826. class: "color-green",
  17827. onClick: $setup.handleUserOrders
  17828. }, [
  17829. vue.createTextVNode(
  17830. vue.toDisplayString($setup.formattedName),
  17831. 1
  17832. /* TEXT */
  17833. ),
  17834. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  17835. ]),
  17836. vue.createElementVNode(
  17837. "text",
  17838. {
  17839. class: "common-text",
  17840. style: { "margin-top": "10rpx" }
  17841. },
  17842. "共卖出" + vue.toDisplayString($props.detail.totalNum) + "本书",
  17843. 1
  17844. /* TEXT */
  17845. ),
  17846. vue.createElementVNode(
  17847. "text",
  17848. { class: "common-text" },
  17849. "来自" + vue.toDisplayString($props.detail.sendSsq),
  17850. 1
  17851. /* TEXT */
  17852. ),
  17853. vue.createElementVNode("text", {
  17854. class: "common-text",
  17855. style: { "margin-top": "10rpx" }
  17856. }, [
  17857. vue.createTextVNode("用户状态: "),
  17858. vue.createElementVNode(
  17859. "text",
  17860. {
  17861. class: vue.normalizeClass($setup.statusClass)
  17862. },
  17863. vue.toDisplayString($props.detail.userStatus == 1 ? "正常" : $props.detail.userStatus == 2 ? "黑名单" : "-"),
  17864. 3
  17865. /* TEXT, CLASS */
  17866. )
  17867. ])
  17868. ]),
  17869. vue.createElementVNode(
  17870. "text",
  17871. {
  17872. style: { "min-width": "160rpx" },
  17873. onClick: $setup.toggleBlacklist,
  17874. class: "color-red"
  17875. },
  17876. "[" + vue.toDisplayString($setup.blacklistAction) + "]",
  17877. 1
  17878. /* TEXT */
  17879. )
  17880. ])
  17881. ]),
  17882. vue.createVNode(_component_u_modal, {
  17883. show: $setup.showModal,
  17884. "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showModal = $event),
  17885. title: "订单日志",
  17886. showCancelButton: false,
  17887. confirmText: "关闭",
  17888. onConfirm: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false),
  17889. class: "log-modal"
  17890. }, {
  17891. default: vue.withCtx(() => [
  17892. vue.createElementVNode("view", { class: "log-container" }, [
  17893. vue.createElementVNode("view", { class: "log-header" }, [
  17894. vue.createElementVNode("text", null, "描述"),
  17895. vue.createElementVNode("text", null, "操作人"),
  17896. vue.createElementVNode("text", null, "时间")
  17897. ]),
  17898. (vue.openBlock(true), vue.createElementBlock(
  17899. vue.Fragment,
  17900. null,
  17901. vue.renderList($props.detail.logVoList, (log, index2) => {
  17902. return vue.openBlock(), vue.createElementBlock("view", {
  17903. class: "log-item",
  17904. key: index2
  17905. }, [
  17906. vue.createElementVNode(
  17907. "text",
  17908. { class: "log-item-content" },
  17909. vue.toDisplayString(log.statusName),
  17910. 1
  17911. /* TEXT */
  17912. ),
  17913. vue.createElementVNode(
  17914. "text",
  17915. { class: "log-item-name" },
  17916. vue.toDisplayString(log.createName),
  17917. 1
  17918. /* TEXT */
  17919. ),
  17920. vue.createElementVNode(
  17921. "text",
  17922. { class: "log-item-time" },
  17923. vue.toDisplayString(log.createTime),
  17924. 1
  17925. /* TEXT */
  17926. )
  17927. ]);
  17928. }),
  17929. 128
  17930. /* KEYED_FRAGMENT */
  17931. ))
  17932. ])
  17933. ]),
  17934. _: 1
  17935. /* STABLE */
  17936. }, 8, ["show"]),
  17937. vue.createVNode(_component_u_modal, {
  17938. show: $setup.showBlacklistModal,
  17939. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showBlacklistModal = $event),
  17940. title: "拉黑用户",
  17941. showCancelButton: true,
  17942. confirmText: "提交",
  17943. cancelText: "取消",
  17944. onConfirm: $setup.confirmBlacklist,
  17945. onCancel: _cache[5] || (_cache[5] = ($event) => $setup.showBlacklistModal = false)
  17946. }, {
  17947. default: vue.withCtx(() => [
  17948. vue.withDirectives(vue.createElementVNode(
  17949. "textarea",
  17950. {
  17951. class: "reason-textarea",
  17952. placeholder: "请输入拉黑原因...",
  17953. autoHeight: "",
  17954. "bg-color": "#f8f8f8",
  17955. "border-radius": "10rpx",
  17956. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.reason = $event),
  17957. height: "100px"
  17958. },
  17959. null,
  17960. 512
  17961. /* NEED_PATCH */
  17962. ), [
  17963. [vue.vModelText, $setup.reason]
  17964. ])
  17965. ]),
  17966. _: 1
  17967. /* STABLE */
  17968. }, 8, ["show"])
  17969. ]);
  17970. }
  17971. const UserInfoCard = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-42a1a738"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/UserInfoCard.vue"]]);
  17972. const _sfc_main$15 = {
  17973. __name: "LogisticsTimeline",
  17974. props: {
  17975. list: {
  17976. type: Array,
  17977. default: []
  17978. }
  17979. },
  17980. setup(__props, { expose: __expose }) {
  17981. __expose();
  17982. const props2 = __props;
  17983. const __returned__ = { props: props2 };
  17984. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17985. return __returned__;
  17986. }
  17987. };
  17988. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  17989. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  17990. return vue.openBlock(), vue.createElementBlock("view", {
  17991. "scroll-y": "",
  17992. class: "timeline-container"
  17993. }, [
  17994. (vue.openBlock(true), vue.createElementBlock(
  17995. vue.Fragment,
  17996. null,
  17997. vue.renderList($props.list, (item, index2) => {
  17998. return vue.openBlock(), vue.createElementBlock("view", {
  17999. key: index2,
  18000. class: "timeline-item"
  18001. }, [
  18002. vue.createElementVNode("view", { class: "timeline-icon" }, [
  18003. vue.createVNode(_component_u_icon, {
  18004. name: "map-fill",
  18005. color: "#19be6b",
  18006. size: "16"
  18007. })
  18008. ]),
  18009. vue.createElementVNode("view", { class: "timeline-content" }, [
  18010. vue.createElementVNode(
  18011. "text",
  18012. { class: "title" },
  18013. vue.toDisplayString(item.title),
  18014. 1
  18015. /* TEXT */
  18016. ),
  18017. vue.createElementVNode(
  18018. "text",
  18019. { class: "desc" },
  18020. vue.toDisplayString(item.description),
  18021. 1
  18022. /* TEXT */
  18023. ),
  18024. vue.createElementVNode(
  18025. "text",
  18026. { class: "time" },
  18027. vue.toDisplayString(item.time),
  18028. 1
  18029. /* TEXT */
  18030. )
  18031. ]),
  18032. index2 < $props.list.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  18033. key: 0,
  18034. class: "timeline-line"
  18035. })) : vue.createCommentVNode("v-if", true)
  18036. ]);
  18037. }),
  18038. 128
  18039. /* KEYED_FRAGMENT */
  18040. ))
  18041. ]);
  18042. }
  18043. const LogisticsTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-140e9488"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/LogisticsTimeline.vue"]]);
  18044. const _sfc_main$14 = {
  18045. __name: "BookItem",
  18046. props: {
  18047. item: Object,
  18048. showClose: {
  18049. type: Boolean,
  18050. default: false
  18051. }
  18052. },
  18053. setup(__props, { expose: __expose }) {
  18054. __expose();
  18055. const props2 = __props;
  18056. const goodNum = vue.computed(() => {
  18057. var _a;
  18058. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  18059. });
  18060. const badNum = vue.computed(() => {
  18061. var _a;
  18062. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 3).length) || 0;
  18063. });
  18064. const reasons = vue.computed(() => {
  18065. let list = props2.item.auditCommentList;
  18066. if (!list)
  18067. return "";
  18068. if (list.length > 0) {
  18069. let poorList = list.filter((v) => v.sts == 3);
  18070. if (poorList.length == 0)
  18071. return "";
  18072. return poorList.map((v) => v.com).join(";");
  18073. }
  18074. });
  18075. const __returned__ = { props: props2, goodNum, badNum, reasons, computed: vue.computed };
  18076. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18077. return __returned__;
  18078. }
  18079. };
  18080. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  18081. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  18082. vue.createElementVNode("view", { class: "flex w100" }, [
  18083. vue.createElementVNode("view", { class: "flex-d" }, [
  18084. vue.createElementVNode("image", {
  18085. style: { "width": "70px", "height": "90px" },
  18086. src: $props.item.cover,
  18087. mode: "aspectFill"
  18088. }, null, 8, ["src"]),
  18089. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  18090. "view",
  18091. {
  18092. key: 0,
  18093. class: "quantity mt-24"
  18094. },
  18095. "数量: " + vue.toDisplayString($props.item.num),
  18096. 1
  18097. /* TEXT */
  18098. )) : vue.createCommentVNode("v-if", true)
  18099. ]),
  18100. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  18101. vue.createElementVNode(
  18102. "view",
  18103. { class: "common-title mb-20" },
  18104. vue.toDisplayString($props.item.bookName),
  18105. 1
  18106. /* TEXT */
  18107. ),
  18108. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  18109. vue.createElementVNode(
  18110. "view",
  18111. { class: "isbn" },
  18112. "ISBN: " + vue.toDisplayString($props.item.isbn),
  18113. 1
  18114. /* TEXT */
  18115. ),
  18116. vue.createElementVNode(
  18117. "view",
  18118. { class: "set" },
  18119. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  18120. 1
  18121. /* TEXT */
  18122. )
  18123. ]),
  18124. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  18125. vue.createElementVNode(
  18126. "view",
  18127. { class: "price" },
  18128. "定价: " + vue.toDisplayString($props.item.bookPrice),
  18129. 1
  18130. /* TEXT */
  18131. ),
  18132. vue.createElementVNode(
  18133. "view",
  18134. { class: "estimate" },
  18135. "预估单价: " + vue.toDisplayString(($props.item.recycleDiscount * $props.item.bookPrice * 0.1).toFixed(2)),
  18136. 1
  18137. /* TEXT */
  18138. )
  18139. ]),
  18140. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  18141. vue.createElementVNode(
  18142. "view",
  18143. { class: "discount" },
  18144. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  18145. 1
  18146. /* TEXT */
  18147. ),
  18148. vue.createElementVNode("view", { class: "review" }, [
  18149. vue.createTextVNode("审核金额: "),
  18150. vue.createElementVNode(
  18151. "text",
  18152. { class: "color-red" },
  18153. vue.toDisplayString($props.item.finalMoney || 0),
  18154. 1
  18155. /* TEXT */
  18156. )
  18157. ])
  18158. ]),
  18159. vue.createElementVNode("view", { class: "quality mb-10" }, [
  18160. vue.createTextVNode(
  18161. " 品相: 良好(" + vue.toDisplayString($setup.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.averageNum || 0) + ") 、 ",
  18162. 1
  18163. /* TEXT */
  18164. ),
  18165. vue.createElementVNode(
  18166. "text",
  18167. {
  18168. class: vue.normalizeClass($props.item.badNum > 0 ? "color-red" : "")
  18169. },
  18170. "极差(" + vue.toDisplayString($setup.badNum) + ")",
  18171. 3
  18172. /* TEXT, CLASS */
  18173. )
  18174. ]),
  18175. $setup.reasons ? (vue.openBlock(), vue.createElementBlock(
  18176. "view",
  18177. {
  18178. key: 0,
  18179. class: "color-red"
  18180. },
  18181. "原因:" + vue.toDisplayString($setup.reasons),
  18182. 1
  18183. /* TEXT */
  18184. )) : vue.createCommentVNode("v-if", true)
  18185. ])
  18186. ])
  18187. ]);
  18188. }
  18189. const BookItem$2 = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-a629889e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/BookItem.vue"]]);
  18190. const pinyin = {
  18191. "a": "啊阿锕",
  18192. "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭",
  18193. "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯",
  18194. "ang": "肮昂盎",
  18195. "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖",
  18196. "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃",
  18197. "bai": "白柏百摆佰败拜稗薜掰鞴",
  18198. "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨",
  18199. "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃",
  18200. "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅",
  18201. "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛",
  18202. "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾",
  18203. "ben": "奔苯本笨畚坌锛",
  18204. "beng": "崩绷甭泵蹦迸唪嘣甏",
  18205. "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀",
  18206. "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊",
  18207. "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔",
  18208. "bie": "鳖憋别瘪蹩鳘",
  18209. "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓",
  18210. "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹",
  18211. "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭",
  18212. "ca": "擦嚓礤",
  18213. "cai": "猜裁材才财睬踩采彩菜蔡",
  18214. "can": "餐参蚕残惭惨灿骖璨粲黪",
  18215. "cang": "苍舱仓沧藏伧",
  18216. "cao": "操糙槽曹草艹嘈漕螬艚",
  18217. "ce": "厕策侧册测刂帻恻",
  18218. "ceng": "层蹭噌",
  18219. "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩",
  18220. "chai": "拆柴豺侪茈瘥虿龇",
  18221. "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔",
  18222. "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳",
  18223. "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖",
  18224. "che": "车扯撤掣彻澈坼屮砗",
  18225. "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀",
  18226. "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲",
  18227. "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑",
  18228. "chong": "充冲虫崇宠茺忡憧铳艟",
  18229. "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋",
  18230. "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜",
  18231. "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡",
  18232. "chuang": "疮窗幢床闯创怆",
  18233. "chui": "吹炊捶锤垂陲棰槌",
  18234. "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽",
  18235. "chuo": "戳绰蔟辶辍镞踔龊",
  18236. "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑",
  18237. "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞",
  18238. "cu": "凑粗醋簇猝殂蹙",
  18239. "cuan": "蹿篡窜汆撺昕爨",
  18240. "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹",
  18241. "cun": "村存寸磋忖皴",
  18242. "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜",
  18243. "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑",
  18244. "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛",
  18245. "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪",
  18246. "dang": "当挡党荡档谠凼菪宕砀铛裆",
  18247. "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛",
  18248. "de": "德得的锝",
  18249. "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦",
  18250. "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶",
  18251. "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮",
  18252. "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂",
  18253. "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎",
  18254. "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊",
  18255. "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫",
  18256. "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡",
  18257. "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩",
  18258. "duan": "端短锻段断缎彖椴煅簖",
  18259. "dui": "堆兑队对怼憝碓",
  18260. "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸",
  18261. "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱",
  18262. "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄",
  18263. "en": "恩蒽摁唔嗯",
  18264. "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕",
  18265. "fa": "发罚筏伐乏阀法珐垡砝",
  18266. "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯",
  18267. "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂",
  18268. "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱",
  18269. "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢",
  18270. "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜",
  18271. "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆",
  18272. "ga": "噶嘎蛤尬呷尕尜旮钆",
  18273. "gai": "该改概钙盖溉丐陔垓戤赅胲",
  18274. "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐",
  18275. "gang": "冈刚钢缸肛纲岗港戆罡颃筻",
  18276. "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥",
  18277. "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆",
  18278. "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂",
  18279. "gei": "给",
  18280. "gen": "根跟亘茛哏艮",
  18281. "geng": "耕更庚羹埂耿梗哽赓鲠",
  18282. "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲",
  18283. "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘",
  18284. "gua": "刮瓜剐寡挂褂卦诖呱栝鸹",
  18285. "guai": "乖拐怪哙",
  18286. "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏",
  18287. "guang": "光广逛犷桄胱疒",
  18288. "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜",
  18289. "gun": "辊滚棍丨衮绲磙鲧",
  18290. "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈",
  18291. "ha": "哈",
  18292. "hai": "骸孩海氦亥害骇咴嗨颏醢",
  18293. "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾",
  18294. "hen": "夯痕很狠恨",
  18295. "hang": "杭航沆绗珩桁",
  18296. "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝",
  18297. "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮",
  18298. "hei": "嘿黑",
  18299. "heng": "哼亨横衡恒訇蘅",
  18300. "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓",
  18301. "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺",
  18302. "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛",
  18303. "hua": "花哗华猾滑画划化话劐浍骅桦铧稞",
  18304. "huai": "槐徊怀淮坏还踝",
  18305. "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟",
  18306. "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇",
  18307. "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾",
  18308. "hun": "荤昏婚魂浑混诨馄阍溷缗",
  18309. "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖",
  18310. "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂",
  18311. "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏",
  18312. "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯",
  18313. "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇",
  18314. "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛",
  18315. "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫",
  18316. "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜",
  18317. "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌",
  18318. "jiong": "炯窘冂迥扃",
  18319. "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏",
  18320. "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫",
  18321. "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽",
  18322. "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖",
  18323. "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇",
  18324. "ka": "喀咖卡佧咔胩",
  18325. "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁",
  18326. "kai": "开揩楷凯慨剀垲蒈忾恺铠锎",
  18327. "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰",
  18328. "kang": "康慷糠扛抗亢炕坑伉闶钪",
  18329. "kao": "考拷烤靠尻栲犒铐",
  18330. "ken": "肯啃垦恳垠裉颀",
  18331. "keng": "吭忐铿",
  18332. "kong": "空恐孔控倥崆箜",
  18333. "kou": "抠口扣寇芤蔻叩眍筘",
  18334. "ku": "枯哭窟苦酷库裤刳堀喾绔骷",
  18335. "kua": "夸垮挎跨胯侉",
  18336. "kuai": "块筷侩快蒯郐蒉狯脍",
  18337. "kuan": "宽款髋",
  18338. "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶",
  18339. "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬",
  18340. "kun": "坤昆捆困悃阃琨锟醌鲲髡",
  18341. "kuo": "括扩廓阔蛞",
  18342. "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌",
  18343. "lai": "莱来赖崃徕涞濑赉睐铼癞籁",
  18344. "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴",
  18345. "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂",
  18346. "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪",
  18347. "le": "勒乐肋仂叻嘞泐鳓",
  18348. "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹",
  18349. "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮",
  18350. "leng": "楞愣",
  18351. "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧",
  18352. "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢",
  18353. "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉",
  18354. "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢",
  18355. "lie": "列裂烈劣猎冽埒洌趔躐鬣",
  18356. "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟",
  18357. "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏",
  18358. "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃",
  18359. "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅",
  18360. "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈",
  18361. "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛",
  18362. "luan": "峦孪滦卵乱栾鸾銮",
  18363. "lue": "掠略锊",
  18364. "lun": "轮伦仑沦纶论囵",
  18365. "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒",
  18366. "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽",
  18367. "mai": "埋买麦卖迈脉劢荬咪霾",
  18368. "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔",
  18369. "mang": "芒茫盲忙莽邙漭朦硭蟒",
  18370. "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾",
  18371. "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱",
  18372. "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦",
  18373. "me": "么",
  18374. "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅",
  18375. "men": "门闷们扪玟焖懑钔",
  18376. "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋",
  18377. "mian": "棉眠绵冕免勉娩缅面沔湎腼眄",
  18378. "mie": "蔑灭咩蠛篾",
  18379. "min": "民抿皿敏悯闽苠岷闵泯珉",
  18380. "ming": "明螟鸣铭名命冥茗溟暝瞑酩",
  18381. "miu": "谬",
  18382. "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘",
  18383. "mou": "谋牟某厶哞婺眸鍪",
  18384. "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼",
  18385. "na": "拿哪呐钠那娜纳内捺肭镎衲箬",
  18386. "nai": "氖乃奶耐奈鼐艿萘柰",
  18387. "nan": "南男难囊喃囡楠腩蝻赧",
  18388. "nao": "挠脑恼闹孬垴猱瑙硇铙蛲",
  18389. "ne": "淖呢讷",
  18390. "nei": "馁",
  18391. "nen": "嫩能枘恁",
  18392. "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵",
  18393. "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶",
  18394. "niang": "娘酿",
  18395. "niao": "鸟尿茑嬲脲袅",
  18396. "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑",
  18397. "nin": "您柠",
  18398. "ning": "狞凝宁拧泞佞蓥咛甯聍",
  18399. "niu": "牛扭钮纽狃忸妞蚴",
  18400. "nong": "脓浓农侬",
  18401. "nu": "奴努怒呶帑弩胬孥驽",
  18402. "nv": "女恧钕衄",
  18403. "nuan": "暖",
  18404. "nuenue": "虐",
  18405. "nue": "疟谑",
  18406. "nuo": "挪懦糯诺傩搦喏锘",
  18407. "ou": "哦欧鸥殴藕呕偶沤怄瓯耦",
  18408. "pa": "啪趴爬帕怕琶葩筢",
  18409. "pai": "拍排牌徘湃派俳蒎",
  18410. "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒",
  18411. "pang": "乓庞旁耪胖滂逄",
  18412. "pao": "抛咆刨炮袍跑泡匏狍庖脬疱",
  18413. "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈",
  18414. "pen": "喷盆湓",
  18415. "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛",
  18416. "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔",
  18417. "pian": "篇偏片骗谝骈犏胼褊翩蹁",
  18418. "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵",
  18419. "pie": "撇瞥丿苤氕",
  18420. "pin": "拼频贫品聘拚姘嫔榀牝颦",
  18421. "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆",
  18422. "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸",
  18423. "pou": "剖裒踣",
  18424. "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼",
  18425. "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒",
  18426. "qia": "掐恰洽葜",
  18427. "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝",
  18428. "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄",
  18429. "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒",
  18430. "qie": "切茄且怯窃郄唼惬妾挈锲箧",
  18431. "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾",
  18432. "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥",
  18433. "qiong": "琼穷邛茕穹筇銎",
  18434. "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽",
  18435. "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢",
  18436. "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈",
  18437. "que": "缺炔瘸却鹊榷确雀阙悫",
  18438. "qun": "裙群逡",
  18439. "ran": "然燃冉染苒髯",
  18440. "rang": "瓤壤攘嚷让禳穰",
  18441. "rao": "饶扰绕荛娆桡",
  18442. "ruo": "惹若弱",
  18443. "re": "热偌",
  18444. "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽",
  18445. "reng": "扔仍",
  18446. "ri": "日",
  18447. "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾",
  18448. "rou": "揉柔肉糅蹂鞣",
  18449. "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥",
  18450. "ruan": "软阮朊",
  18451. "rui": "蕊瑞锐芮蕤睿蚋",
  18452. "run": "闰润",
  18453. "sa": "撒洒萨卅仨挲飒",
  18454. "sai": "腮鳃塞赛噻",
  18455. "san": "三叁伞散彡馓氵毵糁霰",
  18456. "sang": "桑嗓丧搡磉颡",
  18457. "sao": "搔骚扫嫂埽臊瘙鳋",
  18458. "se": "瑟色涩啬铩铯穑",
  18459. "sen": "森",
  18460. "seng": "僧",
  18461. "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨",
  18462. "shai": "筛晒酾",
  18463. "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝",
  18464. "shang": "墒伤商赏晌上尚裳垧绱殇熵觞",
  18465. "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄",
  18466. "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝",
  18467. "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃",
  18468. "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙",
  18469. "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺",
  18470. "shou": "收手首守寿授售受瘦兽扌狩绶艏",
  18471. "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬",
  18472. "shua": "刷耍唰涮",
  18473. "shuai": "摔衰甩帅蟀",
  18474. "shuan": "栓拴闩",
  18475. "shuang": "霜双爽孀",
  18476. "shui": "谁水睡税",
  18477. "shun": "吮瞬顺舜恂",
  18478. "shuo": "说硕朔烁蒴搠嗍濯妁槊铄",
  18479. "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥",
  18480. "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦",
  18481. "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋",
  18482. "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣",
  18483. "suan": "酸蒜算",
  18484. "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢",
  18485. "sun": "孙损笋荪狲飧榫跣隼",
  18486. "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧",
  18487. "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓",
  18488. "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐",
  18489. "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃",
  18490. "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣",
  18491. "thang": "倘躺淌",
  18492. "theng": "趟烫",
  18493. "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕",
  18494. "te": "特",
  18495. "teng": "藤腾疼誊滕",
  18496. "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍",
  18497. "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺",
  18498. "tiao": "条迢眺跳佻祧铫窕龆鲦",
  18499. "tie": "贴铁帖萜餮",
  18500. "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆",
  18501. "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼",
  18502. "tou": "偷投头透亠",
  18503. "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴",
  18504. "tuan": "湍团疃",
  18505. "tui": "推颓腿蜕褪退忒煺",
  18506. "tun": "吞屯臀饨暾豚窀",
  18507. "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍",
  18508. "wa": "挖哇蛙洼娃瓦袜佤娲腽",
  18509. "wai": "歪外",
  18510. "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢",
  18511. "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍",
  18512. "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔",
  18513. "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯",
  18514. "weng": "嗡翁瓮蓊蕹",
  18515. "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌",
  18516. "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯",
  18517. "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷",
  18518. "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠",
  18519. "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹",
  18520. "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨",
  18521. "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈",
  18522. "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞",
  18523. "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫",
  18524. "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎",
  18525. "xiong": "兄凶胸匈汹雄熊芎",
  18526. "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹",
  18527. "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑",
  18528. "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃",
  18529. "xue": "靴薛学穴雪血噱泶鳕",
  18530. "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟",
  18531. "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖",
  18532. "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹",
  18533. "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅",
  18534. "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐",
  18535. "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘",
  18536. "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟",
  18537. "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈",
  18538. "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂",
  18539. "yo": "哟唷",
  18540. "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔",
  18541. "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬",
  18542. "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉",
  18543. "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋",
  18544. "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺",
  18545. "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲",
  18546. "za": "匝砸杂拶咂",
  18547. "zai": "栽哉灾宰载再在咱崽甾",
  18548. "zan": "攒暂赞瓒昝簪糌趱錾",
  18549. "zang": "赃脏葬奘戕臧",
  18550. "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫",
  18551. "ze": "责择则泽仄赜啧迮昃笮箦舴",
  18552. "zei": "贼",
  18553. "zen": "怎谮",
  18554. "zeng": "增憎曾赠缯甑罾锃",
  18555. "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄",
  18556. "zhai": "摘斋宅窄债寨砦",
  18557. "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃",
  18558. "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑",
  18559. "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊",
  18560. "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭",
  18561. "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩",
  18562. "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝",
  18563. "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯",
  18564. "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵",
  18565. "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷",
  18566. "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈",
  18567. "zhua": "抓",
  18568. "zhuai": "拽",
  18569. "zhuan": "专砖转撰赚篆抟啭颛",
  18570. "zhuang": "桩庄装妆撞壮状丬",
  18571. "zhui": "椎锥追赘坠缀萑骓缒",
  18572. "zhun": "谆准",
  18573. "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫",
  18574. "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭",
  18575. "zong": "鬃棕踪宗综总纵腙粽",
  18576. "zou": "邹走奏揍鄹鲰",
  18577. "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴",
  18578. "zuan": "钻纂攥缵",
  18579. "zui": "嘴醉最罪",
  18580. "zun": "尊遵撙樽鳟",
  18581. "zuo": "昨左佐柞做作坐座阝阼胙祚酢",
  18582. "cou": "薮楱辏腠",
  18583. "nang": "攮哝囔馕曩",
  18584. "o": "喔",
  18585. "dia": "嗲",
  18586. "chuai": "嘬膪踹",
  18587. "cen": "岑涔",
  18588. "diu": "铥",
  18589. "nou": "耨",
  18590. "fou": "缶",
  18591. "bia": "髟"
  18592. };
  18593. const _ToPinyin = class _ToPinyin {
  18594. constructor() {
  18595. }
  18596. static getInstance() {
  18597. if (!this.instance) {
  18598. this.instance = new _ToPinyin();
  18599. }
  18600. return this.instance;
  18601. }
  18602. // 转首字母 this.chineseToInitials(this.chineseToPinYin('你好')) this.chineseToInitials('NiHao')
  18603. chineseToInitials(word) {
  18604. let SX = "";
  18605. for (var i = 0; i < word.length; i++) {
  18606. var c = word.charAt(i);
  18607. if (/^[A-Z]+$/.test(c)) {
  18608. SX += c;
  18609. }
  18610. }
  18611. return SX;
  18612. }
  18613. // 转拼音
  18614. chineseToPinYin(l1) {
  18615. var l2 = l1.length;
  18616. var I1 = "";
  18617. var reg = new RegExp("[a-zA-Z0-9]");
  18618. for (var i = 0; i < l2; i++) {
  18619. var val = l1.substr(i, 1);
  18620. var name = this.arraySearch(val, pinyin);
  18621. if (reg.test(val)) {
  18622. I1 += val.toLocaleUpperCase();
  18623. } else if (name !== false) {
  18624. I1 += name;
  18625. }
  18626. }
  18627. I1 = I1.replace(/ /g, "-");
  18628. while (I1.indexOf("--") > 0) {
  18629. I1 = I1.replace("--", "-");
  18630. }
  18631. return I1;
  18632. }
  18633. arraySearch(l1, l2) {
  18634. for (var name in pinyin) {
  18635. if (pinyin[name].indexOf(l1) !== -1) {
  18636. return this.ucfirst(name);
  18637. }
  18638. }
  18639. return false;
  18640. }
  18641. ucfirst(l1) {
  18642. if (l1.length > 0) {
  18643. var first = l1.substr(0, 1).toUpperCase();
  18644. var spare = l1.substr(1, l1.length);
  18645. return first + spare;
  18646. }
  18647. }
  18648. };
  18649. __publicField(_ToPinyin, "instance");
  18650. let ToPinyin = _ToPinyin;
  18651. const toPinyin = ToPinyin.getInstance();
  18652. const _sfc_main$13 = {
  18653. __name: "BookInfo",
  18654. props: {
  18655. bookList: {
  18656. type: Array,
  18657. default: () => []
  18658. },
  18659. detail: {
  18660. type: Object,
  18661. default: () => ({})
  18662. },
  18663. isShow: {
  18664. type: Boolean,
  18665. default: true
  18666. }
  18667. },
  18668. emits: ["get-all-firstLetter"],
  18669. setup(__props, { expose: __expose, emit: __emit }) {
  18670. __expose();
  18671. const props2 = __props;
  18672. const emit2 = __emit;
  18673. const auditNum = vue.computed(() => {
  18674. return props2.bookList.reduce((total, item) => {
  18675. var _a;
  18676. let num = ((_a = item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts != 0).length) || 0;
  18677. return total + num;
  18678. }, 0);
  18679. });
  18680. function handleBookClick(book) {
  18681. if (props2.detail.status >= 10) {
  18682. uni.$u.ttsModule.speak("订单已审核完成");
  18683. return;
  18684. }
  18685. uni.redirectTo({
  18686. url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
  18687. });
  18688. uni.setStorageSync("auditBook", book);
  18689. }
  18690. function getAuditCateNum(cate) {
  18691. let auditList = [];
  18692. props2.bookList.forEach((v) => {
  18693. auditList.push(...v.auditCommentList || []);
  18694. });
  18695. return auditList.filter((v) => v.sts == cate).length;
  18696. }
  18697. const formatBookList = (list) => {
  18698. const poorBooks = { title: "极差", list: [], backgroundColor: "#de868f", id: "poor" };
  18699. const goodBooks = { title: "良好", list: [], backgroundColor: "#81b337", id: "good" };
  18700. const otherBooks = [];
  18701. const allFirstLetter = [];
  18702. const handleBookCategorization = (book) => {
  18703. let firstLetter;
  18704. let firstChineseChar = null;
  18705. for (let i = 0; i < book.bookName.length; i++) {
  18706. const char = book.bookName.charAt(i);
  18707. if (/^[\u4E00-\u9FA5]$/.test(char)) {
  18708. firstChineseChar = char;
  18709. break;
  18710. }
  18711. }
  18712. if (firstChineseChar) {
  18713. firstLetter = toPinyin.chineseToInitials(toPinyin.chineseToPinYin(firstChineseChar));
  18714. } else {
  18715. const char = book.bookName.charAt(0);
  18716. if (/^[A-Za-z]$/.test(char)) {
  18717. firstLetter = char.toUpperCase();
  18718. } else {
  18719. firstLetter = char;
  18720. }
  18721. }
  18722. let bool = otherBooks.some((item) => item.title == firstLetter);
  18723. if (!bool) {
  18724. otherBooks.push({ id: firstLetter, title: firstLetter, list: [{ ...book }] });
  18725. allFirstLetter.push(firstLetter);
  18726. emit2("get-all-firstLetter", allFirstLetter);
  18727. } else {
  18728. otherBooks.find((item) => item.title == firstLetter).list.push(book);
  18729. }
  18730. };
  18731. list.forEach((book) => {
  18732. var _a, _b, _c;
  18733. book.goodNum = ((_a = book.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  18734. book.badNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((v) => v.sts == 3).length) || 0;
  18735. const totalAudited = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((v) => v.sts !== 0).length) || 0;
  18736. const isFullyAudited = totalAudited === book.num;
  18737. if (isFullyAudited) {
  18738. if (book.auditCommentList.some((v) => v.sts === 3)) {
  18739. poorBooks.list.push(book);
  18740. } else if (book.auditCommentList.every((v) => v.sts === 1)) {
  18741. goodBooks.list.push(book);
  18742. } else {
  18743. handleBookCategorization(book);
  18744. }
  18745. } else {
  18746. handleBookCategorization(book);
  18747. }
  18748. });
  18749. return { poorBooks, goodBooks, otherBooks };
  18750. };
  18751. const formatList = vue.ref([]);
  18752. vue.watch(
  18753. () => props2.bookList,
  18754. (newVal) => {
  18755. let { poorBooks, goodBooks, otherBooks } = formatBookList(newVal);
  18756. otherBooks.sort((a, b) => a.id.localeCompare(b.id));
  18757. let poor = poorBooks.list.length > 0 ? poorBooks : {};
  18758. let good = goodBooks.list.length > 0 ? goodBooks : {};
  18759. formatList.value = [...otherBooks, poor, good];
  18760. },
  18761. { immediate: true, deep: true }
  18762. );
  18763. const __returned__ = { props: props2, emit: emit2, auditNum, handleBookClick, getAuditCateNum, formatBookList, formatList, ref: vue.ref, watch: vue.watch, computed: vue.computed, BookItem: BookItem$2, get toPinyin() {
  18764. return toPinyin;
  18765. } };
  18766. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18767. return __returned__;
  18768. }
  18769. };
  18770. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  18771. return vue.openBlock(), vue.createElementBlock("view", { class: "book-info" }, [
  18772. $props.isShow ? (vue.openBlock(), vue.createElementBlock(
  18773. vue.Fragment,
  18774. { key: 0 },
  18775. [
  18776. vue.createElementVNode(
  18777. "view",
  18778. {
  18779. class: "font-bold mt-12 mb-10",
  18780. style: { "padding": "0 20rpx" }
  18781. },
  18782. vue.toDisplayString($props.bookList.length) + "条记录,共" + vue.toDisplayString($props.detail.totalNum) + "本,已审" + vue.toDisplayString($setup.auditNum || 0) + "本 ",
  18783. 1
  18784. /* TEXT */
  18785. ),
  18786. vue.createElementVNode(
  18787. "view",
  18788. {
  18789. class: "font-light",
  18790. style: { "padding": "0 20rpx" }
  18791. },
  18792. " 其中已审:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般0本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  18793. 1
  18794. /* TEXT */
  18795. )
  18796. ],
  18797. 64
  18798. /* STABLE_FRAGMENT */
  18799. )) : vue.createCommentVNode("v-if", true),
  18800. (vue.openBlock(true), vue.createElementBlock(
  18801. vue.Fragment,
  18802. null,
  18803. vue.renderList($setup.formatList, (item) => {
  18804. return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
  18805. class: "book-info-item bg-white mt-12",
  18806. style: vue.normalizeStyle({ backgroundColor: item.backgroundColor }),
  18807. key: item.title,
  18808. id: item.id
  18809. }, [
  18810. vue.createElementVNode(
  18811. "view",
  18812. { class: "book-info-item-title" },
  18813. vue.toDisplayString(item.title),
  18814. 1
  18815. /* TEXT */
  18816. ),
  18817. vue.createElementVNode("view", { class: "book-info-item-list" }, [
  18818. (vue.openBlock(true), vue.createElementBlock(
  18819. vue.Fragment,
  18820. null,
  18821. vue.renderList(item.list, (book) => {
  18822. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  18823. key: book.bookId,
  18824. item: book,
  18825. onClick: ($event) => $setup.handleBookClick(book)
  18826. }, null, 8, ["item", "onClick"]);
  18827. }),
  18828. 128
  18829. /* KEYED_FRAGMENT */
  18830. ))
  18831. ])
  18832. ], 12, ["id"])), [
  18833. [vue.vShow, item == null ? void 0 : item.title]
  18834. ]);
  18835. }),
  18836. 128
  18837. /* KEYED_FRAGMENT */
  18838. ))
  18839. ]);
  18840. }
  18841. const BookInfo = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-8c7d14f9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/BookInfo.vue"]]);
  18842. const props$8 = {
  18843. props: {
  18844. // 图片地址
  18845. src: {
  18846. type: String,
  18847. default: props$G.image.src
  18848. },
  18849. // 裁剪模式
  18850. mode: {
  18851. type: String,
  18852. default: props$G.image.mode
  18853. },
  18854. // 宽度,单位任意
  18855. width: {
  18856. type: [String, Number],
  18857. default: props$G.image.width
  18858. },
  18859. // 高度,单位任意
  18860. height: {
  18861. type: [String, Number],
  18862. default: props$G.image.height
  18863. },
  18864. // 图片形状,circle-圆形,square-方形
  18865. shape: {
  18866. type: String,
  18867. default: props$G.image.shape
  18868. },
  18869. // 圆角,单位任意
  18870. radius: {
  18871. type: [String, Number],
  18872. default: props$G.image.radius
  18873. },
  18874. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  18875. lazyLoad: {
  18876. type: Boolean,
  18877. default: props$G.image.lazyLoad
  18878. },
  18879. // 开启长按图片显示识别微信小程序码菜单
  18880. showMenuByLongpress: {
  18881. type: Boolean,
  18882. default: props$G.image.showMenuByLongpress
  18883. },
  18884. // 加载中的图标,或者小图片
  18885. loadingIcon: {
  18886. type: String,
  18887. default: props$G.image.loadingIcon
  18888. },
  18889. // 加载失败的图标,或者小图片
  18890. errorIcon: {
  18891. type: String,
  18892. default: props$G.image.errorIcon
  18893. },
  18894. // 是否显示加载中的图标或者自定义的slot
  18895. showLoading: {
  18896. type: Boolean,
  18897. default: props$G.image.showLoading
  18898. },
  18899. // 是否显示加载错误的图标或者自定义的slot
  18900. showError: {
  18901. type: Boolean,
  18902. default: props$G.image.showError
  18903. },
  18904. // 是否需要淡入效果
  18905. fade: {
  18906. type: Boolean,
  18907. default: props$G.image.fade
  18908. },
  18909. // 只支持网络资源,只对微信小程序有效
  18910. webp: {
  18911. type: Boolean,
  18912. default: props$G.image.webp
  18913. },
  18914. // 过渡时间,单位ms
  18915. duration: {
  18916. type: [String, Number],
  18917. default: props$G.image.duration
  18918. },
  18919. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  18920. bgColor: {
  18921. type: String,
  18922. default: props$G.image.bgColor
  18923. }
  18924. }
  18925. };
  18926. const _sfc_main$12 = {
  18927. name: "u-image",
  18928. mixins: [mpMixin, mixin, props$8],
  18929. data() {
  18930. return {
  18931. // 图片是否加载错误,如果是,则显示错误占位图
  18932. isError: false,
  18933. // 初始化组件时,默认为加载中状态
  18934. loading: true,
  18935. // 不透明度,为了实现淡入淡出的效果
  18936. opacity: 1,
  18937. // 过渡时间,因为props的值无法修改,故需要一个中间值
  18938. durationTime: this.duration,
  18939. // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
  18940. backgroundStyle: {},
  18941. // 用于fade模式的控制组件显示与否
  18942. show: false
  18943. };
  18944. },
  18945. watch: {
  18946. src: {
  18947. immediate: true,
  18948. handler(n) {
  18949. if (!n) {
  18950. this.isError = true;
  18951. } else {
  18952. this.isError = false;
  18953. this.loading = true;
  18954. }
  18955. }
  18956. }
  18957. },
  18958. computed: {
  18959. wrapStyle() {
  18960. let style = {};
  18961. style.width = this.$u.addUnit(this.width);
  18962. style.height = this.$u.addUnit(this.height);
  18963. style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius);
  18964. style.overflow = this.radius > 0 ? "hidden" : "visible";
  18965. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  18966. }
  18967. },
  18968. mounted() {
  18969. this.show = true;
  18970. },
  18971. emits: ["click", "error", "load"],
  18972. methods: {
  18973. // 点击图片
  18974. onClick() {
  18975. this.$emit("click");
  18976. },
  18977. // 图片加载失败
  18978. onErrorHandler(err) {
  18979. this.loading = false;
  18980. this.isError = true;
  18981. this.$emit("error", err);
  18982. },
  18983. // 图片加载完成,标记loading结束
  18984. onLoadHandler(event) {
  18985. this.loading = false;
  18986. this.isError = false;
  18987. this.$emit("load", event);
  18988. this.removeBgColor();
  18989. },
  18990. // 移除图片的背景色
  18991. removeBgColor() {
  18992. this.backgroundStyle = {
  18993. backgroundColor: "transparent"
  18994. };
  18995. }
  18996. }
  18997. };
  18998. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  18999. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  19000. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  19001. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  19002. mode: "fade",
  19003. show: $data.show,
  19004. duration: _ctx.fade ? 1e3 : 0
  19005. }, {
  19006. default: vue.withCtx(() => [
  19007. vue.createElementVNode(
  19008. "view",
  19009. {
  19010. class: "u-image",
  19011. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
  19012. style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
  19013. },
  19014. [
  19015. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  19016. key: 0,
  19017. src: _ctx.src,
  19018. mode: _ctx.mode,
  19019. onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
  19020. onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
  19021. "show-menu-by-longpress": _ctx.showMenuByLongpress,
  19022. "lazy-load": _ctx.lazyLoad,
  19023. class: "u-image__image",
  19024. style: vue.normalizeStyle({
  19025. borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius),
  19026. width: _ctx.$u.addUnit(_ctx.width),
  19027. height: _ctx.$u.addUnit(_ctx.height)
  19028. })
  19029. }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
  19030. _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  19031. "view",
  19032. {
  19033. key: 1,
  19034. class: "u-image__loading",
  19035. style: vue.normalizeStyle({
  19036. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  19037. backgroundColor: this.bgColor,
  19038. width: _ctx.$u.addUnit(_ctx.width),
  19039. height: _ctx.$u.addUnit(_ctx.height)
  19040. })
  19041. },
  19042. [
  19043. vue.renderSlot(_ctx.$slots, "loading", {}, () => [
  19044. vue.createVNode(_component_u_icon, {
  19045. name: _ctx.loadingIcon,
  19046. width: _ctx.width,
  19047. height: _ctx.height
  19048. }, null, 8, ["name", "width", "height"])
  19049. ], true)
  19050. ],
  19051. 4
  19052. /* STYLE */
  19053. )) : vue.createCommentVNode("v-if", true),
  19054. _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
  19055. "view",
  19056. {
  19057. key: 2,
  19058. class: "u-image__error",
  19059. style: vue.normalizeStyle({
  19060. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  19061. width: _ctx.$u.addUnit(_ctx.width),
  19062. height: _ctx.$u.addUnit(_ctx.height)
  19063. })
  19064. },
  19065. [
  19066. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  19067. vue.createVNode(_component_u_icon, {
  19068. name: _ctx.errorIcon,
  19069. width: _ctx.width,
  19070. height: _ctx.height
  19071. }, null, 8, ["name", "width", "height"])
  19072. ], true)
  19073. ],
  19074. 4
  19075. /* STYLE */
  19076. )) : vue.createCommentVNode("v-if", true)
  19077. ],
  19078. 4
  19079. /* STYLE */
  19080. )
  19081. ]),
  19082. _: 3
  19083. /* FORWARDED */
  19084. }, 8, ["show", "duration"]);
  19085. }
  19086. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-abebd402"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-image/u-image.vue"]]);
  19087. const _sfc_main$11 = {
  19088. __name: "FileInfo",
  19089. props: {
  19090. orderId: {
  19091. type: String,
  19092. default: ""
  19093. },
  19094. annexType: {
  19095. type: Number,
  19096. default: 1
  19097. },
  19098. isbn: {
  19099. type: String,
  19100. default: ""
  19101. }
  19102. },
  19103. setup(__props, { expose: __expose }) {
  19104. __expose();
  19105. const form = vue.ref({
  19106. imgInfo: [],
  19107. remark: ""
  19108. });
  19109. const props2 = __props;
  19110. const fileList = vue.ref([]);
  19111. function getFileList() {
  19112. uni.$u.http.get("/app/orderinfo/getOrderAnnexList", {
  19113. params: {
  19114. orderId: props2.orderId,
  19115. annexType: props2.annexType,
  19116. isbn: props2.isbn
  19117. }
  19118. }).then((res2) => {
  19119. if (res2.code == 200) {
  19120. fileList.value = res2.data;
  19121. }
  19122. });
  19123. }
  19124. getFileList();
  19125. const handleUpload = () => {
  19126. formatAppLog("log", "at pages/index/detail/components/FileInfo.vue:73", form.value);
  19127. let data = {
  19128. orderId: props2.orderId,
  19129. annexType: props2.annexType,
  19130. isbn: props2.isbn,
  19131. ...form.value
  19132. };
  19133. uni.$u.http.post("/app/orderinfo/setOrderAnnex", data).then((res2) => {
  19134. if (res2.code == 200) {
  19135. uni.$u.toast("上传成功");
  19136. form.value.imgInfo = [];
  19137. form.value.remark = "";
  19138. getFileList();
  19139. } else {
  19140. uni.$u.toast(res2.msg);
  19141. }
  19142. });
  19143. };
  19144. const __returned__ = { form, props: props2, fileList, getFileList, handleUpload, ref: vue.ref, cyUpload };
  19145. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19146. return __returned__;
  19147. }
  19148. };
  19149. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  19150. var _a;
  19151. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  19152. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  19153. const _component_u_image = resolveEasycom(vue.resolveDynamicComponent("u-image"), __easycom_2$1);
  19154. return vue.openBlock(), vue.createElementBlock("view", { class: "file-info bg-white" }, [
  19155. vue.createElementVNode("view", { class: "file-info-container" }, [
  19156. vue.createVNode($setup["cyUpload"], {
  19157. filename: $setup.form.imgInfo,
  19158. "onUpdate:filename": _cache[0] || (_cache[0] = ($event) => $setup.form.imgInfo = $event),
  19159. limit: 3
  19160. }, null, 8, ["filename"]),
  19161. vue.createVNode(_component_u_textarea, {
  19162. modelValue: $setup.form.remark,
  19163. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  19164. placeholder: "上传说明...",
  19165. autoHeight: "",
  19166. style: { "min-height": "60px" }
  19167. }, null, 8, ["modelValue"]),
  19168. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-c" }, [
  19169. vue.createVNode(_component_u_button, {
  19170. class: "mt-24",
  19171. type: "primary",
  19172. onClick: $setup.handleUpload
  19173. }, {
  19174. default: vue.withCtx(() => [
  19175. vue.createTextVNode("上传(最多上传3张)")
  19176. ]),
  19177. _: 1
  19178. /* STABLE */
  19179. })
  19180. ])
  19181. ]),
  19182. vue.createElementVNode("view", { class: "file-info-list" }, [
  19183. vue.createElementVNode("view", { class: "file-info-list-title text-center" }, "已上传记录"),
  19184. !((_a = $setup.fileList) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  19185. key: 0,
  19186. class: "file-info-list-content mt-24 mb-24 text-center"
  19187. }, "还没有上传记录")) : (vue.openBlock(true), vue.createElementBlock(
  19188. vue.Fragment,
  19189. { key: 1 },
  19190. vue.renderList($setup.fileList, (item) => {
  19191. return vue.openBlock(), vue.createElementBlock("view", {
  19192. class: "file-info-item",
  19193. key: item.id
  19194. }, [
  19195. vue.createElementVNode("view", { class: "file-info-item-img flex flex-a-c" }, [
  19196. (vue.openBlock(true), vue.createElementBlock(
  19197. vue.Fragment,
  19198. null,
  19199. vue.renderList(item.imgInfo, (img) => {
  19200. return vue.openBlock(), vue.createBlock(_component_u_image, {
  19201. src: img,
  19202. width: "90",
  19203. height: "90",
  19204. style: { "margin-right": "10px" }
  19205. }, null, 8, ["src"]);
  19206. }),
  19207. 256
  19208. /* UNKEYED_FRAGMENT */
  19209. ))
  19210. ]),
  19211. vue.createElementVNode("view", { class: "file-info-item-info mt-10 font-14" }, [
  19212. vue.createElementVNode(
  19213. "view",
  19214. { class: "file-info-item-info-name" },
  19215. "上传说明:" + vue.toDisplayString(item.remark),
  19216. 1
  19217. /* TEXT */
  19218. ),
  19219. vue.createElementVNode("view", { class: "file-info-item-info-name mt-10" }, [
  19220. vue.createElementVNode(
  19221. "text",
  19222. null,
  19223. vue.toDisplayString(item.createTime),
  19224. 1
  19225. /* TEXT */
  19226. ),
  19227. vue.createElementVNode(
  19228. "text",
  19229. { class: "ml-20" },
  19230. vue.toDisplayString(item.createName),
  19231. 1
  19232. /* TEXT */
  19233. )
  19234. ])
  19235. ])
  19236. ]);
  19237. }),
  19238. 128
  19239. /* KEYED_FRAGMENT */
  19240. ))
  19241. ])
  19242. ]);
  19243. }
  19244. const FileInfo = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-b4cf7c83"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/FileInfo.vue"]]);
  19245. const _sfc_main$10 = {
  19246. __name: "index",
  19247. setup(__props, { expose: __expose }) {
  19248. __expose();
  19249. const showAuditorSelector = vue.ref(false);
  19250. const selectedAuditor = vue.ref({});
  19251. const handleAuditorSelected = (auditor) => {
  19252. selectedAuditor.value = auditor;
  19253. orderDetail.value.auditUserId = auditor.userId;
  19254. orderDetail.value.auditUserName = auditor.userName;
  19255. uni.setStorageSync("checkUserInfo", {
  19256. userName: auditor.userName,
  19257. userId: auditor.userId
  19258. });
  19259. };
  19260. function playGlobalSound() {
  19261. uni.$u.playClickSound();
  19262. }
  19263. const toView = vue.ref("");
  19264. function scrollToView(to) {
  19265. toView.value = to;
  19266. uni.pageScrollTo({
  19267. selector: "#" + to,
  19268. duration: 200
  19269. });
  19270. }
  19271. function scrollToTop() {
  19272. uni.pageScrollTo({
  19273. top: 0,
  19274. duration: 200
  19275. });
  19276. }
  19277. function handleBindCode() {
  19278. uni.$u.toast("暂无开发");
  19279. }
  19280. const list = vue.ref(["图书清单", "物流信息", "上传附件"]);
  19281. const current = vue.ref(0);
  19282. const handleSectionChange = (index2) => {
  19283. current.value = index2;
  19284. };
  19285. const allLetters = vue.ref([]);
  19286. function onGetAllFirstLetter(data) {
  19287. allLetters.value = data;
  19288. }
  19289. function handleLogisticsConfirm() {
  19290. uni.showModal({
  19291. title: "提示",
  19292. content: "是否确认物流签收?",
  19293. success: (res2) => {
  19294. if (res2.confirm) {
  19295. uni.showLoading({ title: "加载中...", mask: true });
  19296. uni.$u.http.post("/app/orderinfo/signLogistics", {
  19297. searchType: 1,
  19298. search: orderDetail.value.orderId
  19299. }).then((res3) => {
  19300. if (res3.code == 200) {
  19301. uni.showToast({ title: "签收成功", icon: "none" });
  19302. uni.$u.ttsModule.speak("签收成功");
  19303. uni.navigateBack();
  19304. }
  19305. }).finally(() => {
  19306. uni.hideLoading();
  19307. });
  19308. }
  19309. }
  19310. });
  19311. }
  19312. function handleConfirm() {
  19313. uni.showLoading({ title: "加载中...", mask: true });
  19314. uni.$u.http.post("/app/orderinfo/confirmOrder", {
  19315. searchType: 1,
  19316. search: orderDetail.value.orderId
  19317. }).then((res2) => {
  19318. if (res2.code == 200) {
  19319. uni.showToast({ title: "确认收货成功", icon: "none" });
  19320. uni.$u.ttsModule.speak("确认收货成功");
  19321. getOrderDetail();
  19322. }
  19323. }).finally(() => {
  19324. uni.hideLoading();
  19325. });
  19326. }
  19327. function handleComplete() {
  19328. let bookList = orderDetail.value.detailVoList;
  19329. let bool = bookList.some((item) => {
  19330. var _a;
  19331. return ((_a = item.auditCommentList) == null ? void 0 : _a.length) < item.num;
  19332. });
  19333. if (bool) {
  19334. let text = "还有未审核的书";
  19335. uni.$u.toast(text);
  19336. uni.$u.ttsModule.speak(text);
  19337. return;
  19338. } else {
  19339. uni.$u.http.post("/app/orderinfo/checkOrderFinish", {
  19340. checkUserId: orderDetail.value.auditUserId,
  19341. orderId: orderDetail.value.orderId
  19342. }).then((res2) => {
  19343. if (res2.code == 200) {
  19344. uni.showToast({ title: "审核完成", icon: "none" });
  19345. uni.$u.ttsModule.speak("审核完成");
  19346. uni.navigateBack();
  19347. }
  19348. });
  19349. }
  19350. }
  19351. const orderDetail = vue.ref({ status: 0 });
  19352. function getOrderDetail() {
  19353. if (!orderId.value)
  19354. return;
  19355. uni.showLoading({
  19356. title: "加载中...",
  19357. mask: true
  19358. });
  19359. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  19360. params: {
  19361. searchType: 1,
  19362. search: orderId.value
  19363. }
  19364. }).then((res2) => {
  19365. if (res2.code == 200) {
  19366. orderDetail.value = res2.data;
  19367. getCheckUserInfo();
  19368. if (res2.data.auditUserId) {
  19369. let auditUserInfo = {
  19370. userName: res2.data.auditUserName,
  19371. userId: res2.data.auditUserId
  19372. };
  19373. uni.setStorageSync("checkUserInfo", auditUserInfo);
  19374. } else {
  19375. let userInfo = uni.getStorageSync("checkUserInfo");
  19376. orderDetail.value.auditUserName = userInfo.userName;
  19377. orderDetail.value.auditUserId = userInfo.userId;
  19378. }
  19379. if (isOnLoad.value) {
  19380. if (res2.data.manageRemark.length > 0 && res2.data.status < 10) {
  19381. uni.$u.ttsModule.speak("此订单有备注信息,请注意查看");
  19382. }
  19383. if (res2.data.warnArea && res2.data.warnArea.length > 0) {
  19384. let text = `此订单来源于${res2.data.warnArea}`;
  19385. uni.$u.ttsModule.speak(text);
  19386. }
  19387. isOnLoad.value = false;
  19388. }
  19389. } else {
  19390. uni.$u.toast(res2.msg);
  19391. }
  19392. }).finally(() => {
  19393. uni.hideLoading();
  19394. });
  19395. }
  19396. function getCheckUserInfo() {
  19397. uni.$u.http.get("/app/orderinfo/getCheckUser").then((res2) => {
  19398. if (res2.code == 200) {
  19399. let userInfo = res2.data;
  19400. orderDetail.value.auditUserName = userInfo.userName;
  19401. orderDetail.value.auditUserId = userInfo.userId;
  19402. uni.setStorageSync("checkUserInfo", {
  19403. userName: userInfo.userName,
  19404. userId: userInfo.userId
  19405. });
  19406. }
  19407. });
  19408. }
  19409. function checkIsbn(isbn) {
  19410. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19411. if (isbn13Regex.test(isbn)) {
  19412. return true;
  19413. }
  19414. return false;
  19415. }
  19416. function handleScan(isbn) {
  19417. if (!checkIsbn(isbn)) {
  19418. let text = `不是正确的ISBN码`;
  19419. uni.$u.ttsModule.speak(text);
  19420. return;
  19421. }
  19422. if (orderDetail.value.status >= 10) {
  19423. uni.$u.ttsModule.speak("订单已审核完成");
  19424. return;
  19425. }
  19426. let isbnStr = `${isbn.slice(-4)}`;
  19427. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19428. if (isbns.includes(isbn)) {
  19429. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19430. if (book.suit == 1) {
  19431. let text = `${isbnStr}请注意套装书是否齐全`;
  19432. uni.$u.ttsModule.speak(text);
  19433. }
  19434. if (book.bookWarn == 1) {
  19435. let text = `请注意${isbnStr}需要取出`;
  19436. uni.$u.ttsModule.speak(text);
  19437. }
  19438. uni.redirectTo({
  19439. url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
  19440. });
  19441. uni.setStorageSync("auditBook", book);
  19442. uni.setStorageSync("orderDetail", orderDetail.value);
  19443. } else {
  19444. let text = `此订单中不存在${isbnStr}这本书 `;
  19445. uni.$u.ttsModule.speak(text);
  19446. }
  19447. }
  19448. function handleScanCode() {
  19449. uni.scanCode({
  19450. success: (res2) => {
  19451. res2.result && handleScan(res2.result);
  19452. }
  19453. });
  19454. }
  19455. const orderId = vue.ref("");
  19456. const isOnLoad = vue.ref(false);
  19457. const type2 = vue.ref(1);
  19458. onLoad((option) => {
  19459. orderId.value = option.id;
  19460. getOrderDetail();
  19461. isOnLoad.value = true;
  19462. type2.value = option.type || 1;
  19463. uni.removeStorageSync("scannedBooks");
  19464. uni.$u.useGlobalEvent((e) => {
  19465. if (e.barcode) {
  19466. handleScan(e.barcode);
  19467. }
  19468. });
  19469. });
  19470. onShow(() => {
  19471. uni.$u.updateActivePageOnShow();
  19472. getOrderDetail();
  19473. });
  19474. onUnload(() => {
  19475. uni.$u.cleanupOnPageUnload();
  19476. });
  19477. const __returned__ = { showAuditorSelector, selectedAuditor, handleAuditorSelected, playGlobalSound, toView, scrollToView, scrollToTop, handleBindCode, list, current, handleSectionChange, allLetters, onGetAllFirstLetter, handleLogisticsConfirm, handleConfirm, handleComplete, orderDetail, getOrderDetail, getCheckUserInfo, checkIsbn, handleScan, handleScanCode, orderId, isOnLoad, type: type2, ref: vue.ref, get onLoad() {
  19478. return onLoad;
  19479. }, get onShow() {
  19480. return onShow;
  19481. }, get onUnload() {
  19482. return onUnload;
  19483. }, AuditorSelector, OrderInfo, UserInfoCard, LogisticsTimeline, BookInfo, FileInfo };
  19484. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19485. return __returned__;
  19486. }
  19487. };
  19488. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  19489. var _a;
  19490. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  19491. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  19492. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  19493. return vue.openBlock(), vue.createElementBlock(
  19494. "view",
  19495. {
  19496. class: vue.normalizeClass(["order-detail", { "fixed-bottom-2": $setup.type == 2 }]),
  19497. onClick: $setup.playGlobalSound
  19498. },
  19499. [
  19500. vue.createElementVNode("scroll-view", {
  19501. class: "scroller",
  19502. "scroll-into-view": $setup.toView,
  19503. "scroll-y": "true",
  19504. "scroll-with-animation": "true"
  19505. }, [
  19506. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-b bg-white bind-audit mb-16" }, [
  19507. vue.createElementVNode("text", null, "绑定审核员"),
  19508. vue.createElementVNode(
  19509. "text",
  19510. { class: "text-center flex-1" },
  19511. vue.toDisplayString($setup.orderDetail.auditUserName || ((_a = $setup.selectedAuditor) == null ? void 0 : _a.userName) || ""),
  19512. 1
  19513. /* TEXT */
  19514. ),
  19515. vue.createElementVNode("text", {
  19516. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showAuditorSelector = true),
  19517. class: "color-primary"
  19518. }, "绑定")
  19519. ]),
  19520. vue.createVNode($setup["OrderInfo"], {
  19521. detail: $setup.orderDetail,
  19522. onRefresh: $setup.getOrderDetail
  19523. }, null, 8, ["detail"]),
  19524. vue.createVNode($setup["UserInfoCard"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  19525. vue.createElementVNode("view", {
  19526. class: "mt-16",
  19527. style: { "padding": "0 6rpx" }
  19528. }, [
  19529. vue.createVNode(_component_u_subsection, {
  19530. list: $setup.list,
  19531. mode: "subsection",
  19532. current: $setup.current,
  19533. onChange: $setup.handleSectionChange
  19534. }, null, 8, ["list", "current"]),
  19535. $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["BookInfo"], {
  19536. key: 0,
  19537. bookList: $setup.orderDetail.detailVoList,
  19538. detail: $setup.orderDetail,
  19539. onGetAllFirstLetter: $setup.onGetAllFirstLetter
  19540. }, null, 8, ["bookList", "detail"])) : vue.createCommentVNode("v-if", true),
  19541. $setup.current == 1 ? (vue.openBlock(), vue.createBlock($setup["LogisticsTimeline"], {
  19542. key: 1,
  19543. list: $setup.orderDetail.trackingVoList
  19544. }, null, 8, ["list"])) : vue.createCommentVNode("v-if", true),
  19545. $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
  19546. key: 2,
  19547. orderId: $setup.orderDetail.orderId
  19548. }, null, 8, ["orderId"])) : vue.createCommentVNode("v-if", true)
  19549. ])
  19550. ], 8, ["scroll-into-view"]),
  19551. vue.createElementVNode("view", { class: "fixed-left" }, [
  19552. vue.createElementVNode("view", {
  19553. class: "bind-code common-bg",
  19554. style: { "margin-bottom": "30px", "padding": "20rpx" },
  19555. onClick: $setup.handleBindCode
  19556. }, "绑码 "),
  19557. vue.createElementVNode("view", { class: "common-bg flex flex-a-c flex-j-c flex-d" }, [
  19558. vue.createElementVNode("view", {
  19559. class: "book-status-item",
  19560. onClick: _cache[1] || (_cache[1] = ($event) => $setup.scrollToView("good"))
  19561. }, "良好"),
  19562. vue.createElementVNode("view", {
  19563. class: "book-status-item item-center",
  19564. onClick: _cache[2] || (_cache[2] = ($event) => $setup.scrollToView("average"))
  19565. }, "一般"),
  19566. vue.createElementVNode("view", {
  19567. class: "book-status-item",
  19568. onClick: _cache[3] || (_cache[3] = ($event) => $setup.scrollToView("poor"))
  19569. }, "极差")
  19570. ])
  19571. ]),
  19572. vue.createElementVNode("view", { class: "fixed-right" }, [
  19573. vue.createElementVNode("view", { class: "letter-bg flex flex-a-c flex-j-c flex-d" }, [
  19574. vue.createElementVNode("view", { class: "letter-item" }, [
  19575. vue.createVNode(_component_u_icon, {
  19576. name: "arrow-up-fill",
  19577. size: "20",
  19578. color: "#ffffff",
  19579. onClick: $setup.scrollToTop
  19580. })
  19581. ]),
  19582. (vue.openBlock(true), vue.createElementBlock(
  19583. vue.Fragment,
  19584. null,
  19585. vue.renderList($setup.allLetters, (item) => {
  19586. return vue.openBlock(), vue.createElementBlock("view", {
  19587. class: "letter-item",
  19588. onClick: ($event) => $setup.scrollToView(item)
  19589. }, vue.toDisplayString(item), 9, ["onClick"]);
  19590. }),
  19591. 256
  19592. /* UNKEYED_FRAGMENT */
  19593. ))
  19594. ])
  19595. ]),
  19596. $setup.type != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  19597. key: 0,
  19598. class: "common-bg fixed-bottom"
  19599. }, [
  19600. $setup.orderDetail.status == 5 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  19601. key: 0,
  19602. type: "warning",
  19603. size: "large",
  19604. onClick: $setup.handleLogisticsConfirm
  19605. }, {
  19606. default: vue.withCtx(() => [
  19607. vue.createTextVNode("物流签收")
  19608. ]),
  19609. _: 1
  19610. /* STABLE */
  19611. })) : vue.createCommentVNode("v-if", true),
  19612. $setup.orderDetail.status == 6 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  19613. key: 1,
  19614. type: "primary",
  19615. size: "large",
  19616. onClick: $setup.handleConfirm
  19617. }, {
  19618. default: vue.withCtx(() => [
  19619. vue.createTextVNode("确认收货")
  19620. ]),
  19621. _: 1
  19622. /* STABLE */
  19623. })) : vue.createCommentVNode("v-if", true),
  19624. $setup.orderDetail.status == 8 || $setup.orderDetail.status == 9 || $setup.orderDetail.status == 10 ? (vue.openBlock(), vue.createElementBlock(
  19625. vue.Fragment,
  19626. { key: 2 },
  19627. [
  19628. vue.createVNode(_component_u_button, {
  19629. type: "warning",
  19630. size: "large",
  19631. onClick: $setup.handleScanCode
  19632. }, {
  19633. default: vue.withCtx(() => [
  19634. vue.createTextVNode("扫码")
  19635. ]),
  19636. _: 1
  19637. /* STABLE */
  19638. }),
  19639. vue.createVNode(_component_u_button, {
  19640. type: "primary",
  19641. size: "large",
  19642. onClick: $setup.handleComplete
  19643. }, {
  19644. default: vue.withCtx(() => [
  19645. vue.createTextVNode("完成")
  19646. ]),
  19647. _: 1
  19648. /* STABLE */
  19649. })
  19650. ],
  19651. 64
  19652. /* STABLE_FRAGMENT */
  19653. )) : vue.createCommentVNode("v-if", true)
  19654. ])) : vue.createCommentVNode("v-if", true),
  19655. vue.createVNode($setup["AuditorSelector"], {
  19656. show: $setup.showAuditorSelector,
  19657. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showAuditorSelector = $event),
  19658. onAuditorSelected: $setup.handleAuditorSelected
  19659. }, null, 8, ["show"])
  19660. ],
  19661. 2
  19662. /* CLASS */
  19663. );
  19664. }
  19665. const PagesIndexDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-8b10f148"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/index.vue"]]);
  19666. const _sfc_main$$ = {
  19667. __name: "AuditInfo",
  19668. props: {
  19669. detail: {
  19670. type: Object,
  19671. default: () => ({})
  19672. },
  19673. auditList: {
  19674. type: Array,
  19675. default: () => []
  19676. }
  19677. },
  19678. emits: ["selected"],
  19679. setup(__props, { expose: __expose, emit: __emit }) {
  19680. const props2 = __props;
  19681. const auditCommentList = vue.ref([]);
  19682. const initAuditList = (detail) => {
  19683. if (!(detail == null ? void 0 : detail.auditCommentList))
  19684. return;
  19685. auditCommentList.value = detail.auditCommentList.map((item, index2) => ({
  19686. ...item,
  19687. idx: index2,
  19688. isbn: detail.isbn,
  19689. comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
  19690. }));
  19691. sortByAuditStatus();
  19692. };
  19693. vue.watch(
  19694. () => props2.detail,
  19695. () => {
  19696. initAuditList(props2.detail);
  19697. },
  19698. { deep: true, immediate: true }
  19699. );
  19700. const auditList = vue.ref([
  19701. { sts: 1, label: "品相良好" },
  19702. { sts: 2, label: "品相一般", disabled: true },
  19703. { sts: 3, label: "品相极差" }
  19704. ]);
  19705. const emit2 = __emit;
  19706. const radioClick = (audit, index2, sts) => {
  19707. if (sts == 2)
  19708. return;
  19709. audit.sts = sts;
  19710. if (sts == 1) {
  19711. audit.comList = [];
  19712. }
  19713. auditCommentList.value[index2] = audit;
  19714. formatReason();
  19715. };
  19716. const getAuditCateNum = (cate) => {
  19717. var _a, _b;
  19718. return ((_b = (_a = props2.detail.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == cate)) == null ? void 0 : _b.length) || 0;
  19719. };
  19720. let reasonList = vue.ref([
  19721. { sts: 3, label: "明显泛黄水印/发霉/明显异味" },
  19722. { sts: 3, label: "老化泛黄褪色/污渍" },
  19723. { sts: 3, label: "明显破损/脱胶缺页/书籍变型" },
  19724. { sts: 3, label: "无此书" },
  19725. { sts: 3, label: "印刷不清晰" },
  19726. { sts: 3, label: "无防伪" },
  19727. { sts: 3, label: "无外护封/无ISBN" },
  19728. { sts: 3, label: "无此书多其他书" },
  19729. { sts: 3, label: "笔记杂乱/习题做完" },
  19730. { sts: 3, label: "有笔记贴" },
  19731. { sts: 3, label: "套装缺册" },
  19732. { sts: 3, label: "听力无光盘" },
  19733. { sts: 3, label: "图书馆/藏书印章" }
  19734. ]);
  19735. const formatReason = () => {
  19736. let list = auditCommentList.value.map((item, index2) => ({
  19737. ...item,
  19738. idx: index2,
  19739. com: item.comList.join(",")
  19740. }));
  19741. return list;
  19742. };
  19743. const toggleReason = (audit, index2, item) => {
  19744. const idx = audit.comList.indexOf(item.label);
  19745. if (idx > -1) {
  19746. audit.comList.splice(idx, 1);
  19747. } else {
  19748. audit.comList.push(item.label);
  19749. }
  19750. auditCommentList.value[index2] = audit;
  19751. };
  19752. const sortByAuditStatus = () => {
  19753. const sortedList = [...auditCommentList.value];
  19754. sortedList.sort((a, b) => {
  19755. if (a.sts === 0 && (b.sts === 1 || b.sts === 3)) {
  19756. return -1;
  19757. }
  19758. if (b.sts === 0 && (a.sts === 1 || a.sts === 3)) {
  19759. return 1;
  19760. }
  19761. return 0;
  19762. });
  19763. auditCommentList.value = sortedList;
  19764. return sortedList;
  19765. };
  19766. __expose({
  19767. formatReason,
  19768. initAuditList,
  19769. sortByAuditStatus
  19770. });
  19771. const __returned__ = { props: props2, auditCommentList, initAuditList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
  19772. return reasonList;
  19773. }, set reasonList(v) {
  19774. reasonList = v;
  19775. }, formatReason, toggleReason, sortByAuditStatus, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, onMounted: vue.onMounted };
  19776. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19777. return __returned__;
  19778. }
  19779. };
  19780. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  19781. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  19782. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  19783. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-info" }, [
  19784. vue.createElementVNode(
  19785. "view",
  19786. {
  19787. class: "font-bold mt-16",
  19788. style: { "padding": "0 20rpx" }
  19789. },
  19790. " 该书共" + vue.toDisplayString($props.detail.num) + "本,其中:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般" + vue.toDisplayString($setup.getAuditCateNum(2)) + "本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  19791. 1
  19792. /* TEXT */
  19793. ),
  19794. $setup.auditCommentList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  19795. vue.Fragment,
  19796. { key: 0 },
  19797. vue.renderList($setup.auditCommentList, (audit, index2) => {
  19798. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  19799. vue.createElementVNode(
  19800. "view",
  19801. {
  19802. class: "mt-10 bind-code",
  19803. style: { "padding": "10rpx 20rpx" }
  19804. },
  19805. " 第" + vue.toDisplayString(index2 + 1) + "本的审核意见 ",
  19806. 1
  19807. /* TEXT */
  19808. ),
  19809. vue.createElementVNode("view", {
  19810. class: "mt-20 bg-white flex flex-j-a flex-a-c",
  19811. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19812. }, [
  19813. (vue.openBlock(true), vue.createElementBlock(
  19814. vue.Fragment,
  19815. null,
  19816. vue.renderList($setup.auditList, (item, idx) => {
  19817. return vue.openBlock(), vue.createElementBlock("view", {
  19818. class: "u-page__tag-item",
  19819. key: idx
  19820. }, [
  19821. vue.createVNode(_component_u_tag, {
  19822. size: "large",
  19823. text: item.label,
  19824. plain: audit.sts != item.sts,
  19825. type: "primary",
  19826. name: item.sts,
  19827. class: vue.normalizeClass({ disabled: item.sts == 2 }),
  19828. onClick: ($event) => $setup.radioClick(audit, index2, item.sts)
  19829. }, null, 8, ["text", "plain", "name", "class", "onClick"])
  19830. ]);
  19831. }),
  19832. 128
  19833. /* KEYED_FRAGMENT */
  19834. ))
  19835. ]),
  19836. audit.sts == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  19837. key: 0,
  19838. class: "mt-20 bg-white",
  19839. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19840. }, [
  19841. vue.createElementVNode("view", { class: "flex flex-a-c flex-wrap" }, [
  19842. (vue.openBlock(true), vue.createElementBlock(
  19843. vue.Fragment,
  19844. null,
  19845. vue.renderList($setup.reasonList, (item, idx) => {
  19846. return vue.openBlock(), vue.createElementBlock("view", {
  19847. class: vue.normalizeClass(["mr-10 reason-item", { selected: audit.comList.includes(item.label) }]),
  19848. key: idx,
  19849. onClick: ($event) => $setup.toggleReason(audit, index2, item)
  19850. }, vue.toDisplayString(item.label), 11, ["onClick"]);
  19851. }),
  19852. 128
  19853. /* KEYED_FRAGMENT */
  19854. ))
  19855. ])
  19856. ])) : vue.createCommentVNode("v-if", true)
  19857. ]);
  19858. }),
  19859. 128
  19860. /* KEYED_FRAGMENT */
  19861. )) : vue.createCommentVNode("v-if", true),
  19862. vue.createCommentVNode(" 悬浮排序按钮 "),
  19863. vue.createElementVNode("view", {
  19864. class: "floating-sort-btn",
  19865. onClick: $setup.sortByAuditStatus
  19866. }, [
  19867. vue.createVNode(_component_u_icon, {
  19868. name: "list",
  19869. color: "#FFFFFF",
  19870. size: "22"
  19871. }),
  19872. vue.createElementVNode("text", { class: "btn-text" }, "排序")
  19873. ])
  19874. ]);
  19875. }
  19876. const AuditInfo = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-9873c737"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/AuditInfo.vue"]]);
  19877. const _sfc_main$_ = {
  19878. __name: "book-audit",
  19879. setup(__props, { expose: __expose }) {
  19880. __expose();
  19881. const detail = vue.ref({});
  19882. function playGlobalSound() {
  19883. uni.$u.playClickSound();
  19884. }
  19885. const getBookInfo = (isbn) => {
  19886. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  19887. if (res2.code == 200) {
  19888. detail.value = res2.data;
  19889. }
  19890. });
  19891. };
  19892. const auditBook = vue.ref({});
  19893. const getBookInfoAndAuditInfo = (isbn, orderId2) => {
  19894. uni.$u.http.get(`/app/orderinfo/getBookCheckInfo?isbn=${isbn}&&orderId=${orderId2}`).then((res2) => {
  19895. if (res2.code == 200) {
  19896. auditBook.value = res2.data;
  19897. vue.nextTick(() => {
  19898. var _a;
  19899. (_a = auditInfoRef.value) == null ? void 0 : _a.initAuditList(auditBook.value);
  19900. });
  19901. }
  19902. });
  19903. };
  19904. const list = vue.ref(["图书审核", "绑码", "附件信息"]);
  19905. const current = vue.ref(0);
  19906. const handleSectionChange = (index2) => {
  19907. current.value = index2;
  19908. };
  19909. const auditData = vue.ref([]);
  19910. const handleAuditSelected = (data) => {
  19911. auditData.value = data.map((item, index2) => {
  19912. item.idx = index2;
  19913. item.com = Array.isArray(item.com) ? item.com.join(",") : item.com;
  19914. return item;
  19915. });
  19916. };
  19917. const scannedBooks = vue.ref([]);
  19918. function checkIsbn(isbn) {
  19919. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19920. if (isbn13Regex.test(isbn)) {
  19921. return true;
  19922. }
  19923. return false;
  19924. }
  19925. function handleScan(isbn) {
  19926. var _a;
  19927. if (!checkIsbn(isbn)) {
  19928. let text = `不是正确的ISBN码`;
  19929. uni.$u.ttsModule.speak(text);
  19930. return;
  19931. }
  19932. let isbnStr = `${isbn.slice(-4)}`;
  19933. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19934. if (isbns.includes(isbn)) {
  19935. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19936. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  19937. let noAuditNum = book.auditCommentList.filter((item) => item.sts == 0).length;
  19938. formatAppLog("log", "at pages/index/detail/book-audit.vue:142", noAuditNum, "noAuditNum");
  19939. if (noAuditNum == 0) {
  19940. let text = `${isbnStr}已超出订单中的数量`;
  19941. uni.$u.ttsModule.speak(text);
  19942. return;
  19943. }
  19944. if (book.suit == 1) {
  19945. let text = `${isbnStr}请注意套装书是否齐全`;
  19946. uni.$u.ttsModule.speak(text);
  19947. }
  19948. if (book.bookWarn == 1) {
  19949. let text = `请注意${isbnStr}需要取出`;
  19950. uni.$u.ttsModule.speak(text);
  19951. }
  19952. scannedBooks.value.push(isbn);
  19953. uni.setStorageSync("scannedBooks", scannedBooks.value);
  19954. uni.redirectTo({
  19955. url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
  19956. });
  19957. }
  19958. } else {
  19959. let text = `此订单中不存在${isbnStr}这本书 `;
  19960. uni.$u.ttsModule.speak(text);
  19961. }
  19962. }
  19963. function handleScanCode() {
  19964. uni.scanCode({
  19965. success: (res2) => {
  19966. handleScan(res2.result);
  19967. }
  19968. });
  19969. }
  19970. const auditInfoRef = vue.ref();
  19971. const handleAudit = () => {
  19972. var _a;
  19973. let checkList = (_a = auditInfoRef.value) == null ? void 0 : _a.formatReason(auditData.value);
  19974. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19975. if (checkUserInfo.userId) {
  19976. checkUserId.value = checkUserInfo.userId;
  19977. } else {
  19978. uni.$u.toast("请先选择审核人");
  19979. }
  19980. let poorList = checkList.filter((item) => item.sts == 3);
  19981. if (poorList.length > 0 && !poorList.every((item) => item.com)) {
  19982. uni.$u.ttsModule.speak("请选择品相");
  19983. return;
  19984. }
  19985. uni.$u.http.post("/app/orderinfo/checkOrder", {
  19986. checkUserId: checkUserId.value,
  19987. orderId: orderId.value,
  19988. checkList
  19989. }).then((res2) => {
  19990. if (res2.code == 200) {
  19991. uni.showToast({ title: "审核成功", icon: "none" });
  19992. uni.$u.ttsModule.speak("审核成功");
  19993. uni.navigateBack();
  19994. } else {
  19995. uni.$u.toast(res2.msg);
  19996. }
  19997. });
  19998. };
  19999. const checkUserId = vue.ref();
  20000. const orderId = vue.ref();
  20001. const orderDetail = vue.ref({});
  20002. let isbnScan = vue.ref("");
  20003. onLoad((options) => {
  20004. options.isbn && getBookInfo(options.isbn);
  20005. scannedBooks.value = [options.isbn];
  20006. isbnScan.value = options.isbn;
  20007. orderId.value = options.orderId;
  20008. getBookInfoAndAuditInfo(options.isbn, options.orderId);
  20009. orderDetail.value = uni.getStorageSync("orderDetail");
  20010. uni.$u.useGlobalEvent((e) => {
  20011. if (e.barcode) {
  20012. handleScan(e.barcode);
  20013. }
  20014. });
  20015. });
  20016. onShow(() => {
  20017. var _a;
  20018. if (isbnScan.value) {
  20019. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  20020. orderDetail.value = uni.getStorageSync("orderDetail");
  20021. }
  20022. uni.$u.updateActivePageOnShow();
  20023. });
  20024. onUnload(() => {
  20025. uni.$u.cleanupOnPageUnload();
  20026. });
  20027. const __returned__ = { detail, playGlobalSound, getBookInfo, auditBook, getBookInfoAndAuditInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, checkUserId, orderId, orderDetail, get isbnScan() {
  20028. return isbnScan;
  20029. }, set isbnScan(v) {
  20030. isbnScan = v;
  20031. }, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
  20032. return onLoad;
  20033. }, get onShow() {
  20034. return onShow;
  20035. }, get onUnload() {
  20036. return onUnload;
  20037. }, AuditInfo, FileInfo };
  20038. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20039. return __returned__;
  20040. }
  20041. };
  20042. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  20043. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  20044. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  20045. return vue.openBlock(), vue.createElementBlock("view", {
  20046. class: "book-audit",
  20047. onClick: $setup.playGlobalSound
  20048. }, [
  20049. vue.createElementVNode("view", {
  20050. class: "bg-white flex flex-a-c",
  20051. style: { "padding": "20rpx", "border-radius": "10rpx" }
  20052. }, [
  20053. vue.createElementVNode("image", {
  20054. src: $setup.detail.cover,
  20055. mode: "aspectFill",
  20056. style: { "width": "80px", "height": "100px" }
  20057. }, null, 8, ["src"]),
  20058. vue.createElementVNode("view", { class: "flex flex-d flex-1 ml-20" }, [
  20059. vue.createElementVNode(
  20060. "text",
  20061. { class: "common-title mb-20" },
  20062. vue.toDisplayString($setup.detail.bookName),
  20063. 1
  20064. /* TEXT */
  20065. ),
  20066. vue.createElementVNode("text", { class: "text-sm" }, [
  20067. vue.createTextVNode("ISBN: "),
  20068. vue.createElementVNode(
  20069. "text",
  20070. { class: "color-primary" },
  20071. vue.toDisplayString($setup.detail.isbn),
  20072. 1
  20073. /* TEXT */
  20074. )
  20075. ]),
  20076. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  20077. vue.createTextVNode("作者: "),
  20078. vue.createElementVNode(
  20079. "text",
  20080. null,
  20081. vue.toDisplayString($setup.detail.author),
  20082. 1
  20083. /* TEXT */
  20084. )
  20085. ]),
  20086. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  20087. vue.createTextVNode("出版社: "),
  20088. vue.createElementVNode(
  20089. "text",
  20090. null,
  20091. vue.toDisplayString($setup.detail.publish),
  20092. 1
  20093. /* TEXT */
  20094. )
  20095. ])
  20096. ])
  20097. ]),
  20098. vue.createElementVNode("view", {
  20099. class: "mt-20 bg-white price-info",
  20100. style: { "border-radius": "10rpx" }
  20101. }, [
  20102. vue.createElementVNode("view", { class: "flex" }, [
  20103. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  20104. vue.createElementVNode("text", { class: "label" }, "定价"),
  20105. vue.createElementVNode(
  20106. "text",
  20107. { class: "content" },
  20108. "¥" + vue.toDisplayString($setup.detail.price),
  20109. 1
  20110. /* TEXT */
  20111. )
  20112. ]),
  20113. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  20114. vue.createElementVNode("text", { class: "label" }, "回收折扣"),
  20115. vue.createElementVNode(
  20116. "text",
  20117. { class: "content" },
  20118. vue.toDisplayString($setup.detail.recycleDiscount) + "折",
  20119. 1
  20120. /* TEXT */
  20121. )
  20122. ])
  20123. ]),
  20124. vue.createElementVNode("view", { class: "flex flex-a-c" }, [
  20125. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  20126. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  20127. vue.createElementVNode(
  20128. "text",
  20129. { class: "content" },
  20130. "¥" + vue.toDisplayString($setup.auditBook.expectMoney),
  20131. 1
  20132. /* TEXT */
  20133. )
  20134. ]),
  20135. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  20136. vue.createElementVNode("text", { class: "label" }, "审核金额"),
  20137. vue.createElementVNode(
  20138. "text",
  20139. { class: "content" },
  20140. "¥" + vue.toDisplayString($setup.auditBook.finalMoney || 0),
  20141. 1
  20142. /* TEXT */
  20143. )
  20144. ])
  20145. ])
  20146. ]),
  20147. vue.createElementVNode("view", { class: "mt-20" }, [
  20148. vue.createVNode(_component_u_subsection, {
  20149. list: $setup.list,
  20150. mode: "subsection",
  20151. current: $setup.current,
  20152. onChange: $setup.handleSectionChange
  20153. }, null, 8, ["list", "current"]),
  20154. vue.withDirectives(vue.createVNode($setup["AuditInfo"], {
  20155. detail: $setup.auditBook,
  20156. auditList: $setup.auditBook.auditCommentList,
  20157. ref: "auditInfoRef"
  20158. }, null, 8, ["detail", "auditList"]), [
  20159. [vue.vShow, $setup.current == 0]
  20160. ]),
  20161. vue.withDirectives(vue.createVNode($setup["FileInfo"], {
  20162. orderId: $setup.orderId,
  20163. annexType: 2,
  20164. isbn: $setup.isbnScan
  20165. }, null, 8, ["orderId", "isbn"]), [
  20166. [vue.vShow, $setup.current == 2]
  20167. ])
  20168. ]),
  20169. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  20170. vue.createVNode(_component_u_button, {
  20171. type: "warning",
  20172. size: "large",
  20173. onClick: $setup.handleScanCode
  20174. }, {
  20175. default: vue.withCtx(() => [
  20176. vue.createTextVNode("扫码")
  20177. ]),
  20178. _: 1
  20179. /* STABLE */
  20180. }),
  20181. vue.createVNode(_component_u_button, {
  20182. type: "primary",
  20183. size: "large",
  20184. onClick: $setup.handleAudit
  20185. }, {
  20186. default: vue.withCtx(() => [
  20187. vue.createTextVNode("确定")
  20188. ]),
  20189. _: 1
  20190. /* STABLE */
  20191. })
  20192. ])
  20193. ]);
  20194. }
  20195. const PagesIndexDetailBookAudit = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-376f8a68"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/book-audit.vue"]]);
  20196. const _sfc_main$Z = {
  20197. __name: "BookItem2",
  20198. props: {
  20199. item: Object,
  20200. showClose: {
  20201. type: Boolean,
  20202. default: false
  20203. }
  20204. },
  20205. emits: ["close"],
  20206. setup(__props, { expose: __expose, emit: __emit }) {
  20207. __expose();
  20208. const props2 = __props;
  20209. const emit2 = __emit;
  20210. const handleClose = () => {
  20211. emit2("close", props2.item.isbn);
  20212. };
  20213. const __returned__ = { props: props2, emit: emit2, handleClose, computed: vue.computed };
  20214. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20215. return __returned__;
  20216. }
  20217. };
  20218. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  20219. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  20220. return vue.openBlock(), vue.createElementBlock(
  20221. "view",
  20222. {
  20223. class: vue.normalizeClass(["card", { "card-close": $props.showClose }])
  20224. },
  20225. [
  20226. vue.createElementVNode("view", { class: "flex w100" }, [
  20227. vue.createElementVNode("view", { class: "flex-d" }, [
  20228. vue.createElementVNode("image", {
  20229. style: { "width": "70px", "height": "90px" },
  20230. src: $props.item.cover,
  20231. mode: "aspectFill"
  20232. }, null, 8, ["src"]),
  20233. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  20234. "view",
  20235. {
  20236. key: 0,
  20237. class: "quantity mt-24"
  20238. },
  20239. "数量: " + vue.toDisplayString($props.item.num),
  20240. 1
  20241. /* TEXT */
  20242. )) : vue.createCommentVNode("v-if", true)
  20243. ]),
  20244. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  20245. vue.createElementVNode(
  20246. "view",
  20247. { class: "common-title mb-20" },
  20248. vue.toDisplayString($props.item.bookName),
  20249. 1
  20250. /* TEXT */
  20251. ),
  20252. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  20253. vue.createElementVNode(
  20254. "view",
  20255. { class: "isbn" },
  20256. "ISBN: " + vue.toDisplayString($props.item.isbn),
  20257. 1
  20258. /* TEXT */
  20259. ),
  20260. vue.createElementVNode(
  20261. "view",
  20262. { class: "set" },
  20263. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  20264. 1
  20265. /* TEXT */
  20266. )
  20267. ]),
  20268. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  20269. vue.createElementVNode(
  20270. "view",
  20271. { class: "price" },
  20272. "定价: " + vue.toDisplayString($props.item.price),
  20273. 1
  20274. /* TEXT */
  20275. ),
  20276. vue.createElementVNode(
  20277. "view",
  20278. { class: "estimate" },
  20279. "预估单价: " + vue.toDisplayString($props.item.expectMoney || 0),
  20280. 1
  20281. /* TEXT */
  20282. )
  20283. ]),
  20284. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  20285. vue.createElementVNode(
  20286. "view",
  20287. { class: "discount" },
  20288. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  20289. 1
  20290. /* TEXT */
  20291. ),
  20292. vue.createElementVNode("view", { class: "review" }, [
  20293. vue.createTextVNode("审核金额: "),
  20294. vue.createElementVNode(
  20295. "text",
  20296. { class: "color-red" },
  20297. vue.toDisplayString($props.item.review || 0),
  20298. 1
  20299. /* TEXT */
  20300. )
  20301. ])
  20302. ])
  20303. ])
  20304. ]),
  20305. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  20306. key: 0,
  20307. class: "quantity-icon mt-24"
  20308. }, [
  20309. vue.createVNode(_component_u_icon, {
  20310. name: "close-circle-fill",
  20311. size: "18",
  20312. color: "#999",
  20313. onClick: $setup.handleClose
  20314. })
  20315. ])) : vue.createCommentVNode("v-if", true)
  20316. ],
  20317. 2
  20318. /* CLASS */
  20319. );
  20320. }
  20321. const BookItem$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-469f67ea"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/BookItem2.vue"]]);
  20322. const _sfc_main$Y = {
  20323. __name: "batch-audit",
  20324. setup(__props, { expose: __expose }) {
  20325. __expose();
  20326. const detailMap = vue.ref({});
  20327. const scannedBooksDetail = vue.ref([]);
  20328. const getBookInfo = (isbn) => {
  20329. if (detailMap.value[isbn]) {
  20330. scannedBooksDetail.value.push(detailMap.value[isbn]);
  20331. return;
  20332. }
  20333. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  20334. if (res2.code == 200) {
  20335. detailMap.value[isbn] = res2.data;
  20336. scannedBooksDetail.value.push(res2.data);
  20337. }
  20338. });
  20339. };
  20340. const handleClose = (index2, isbn) => {
  20341. scannedBooksDetail.value.splice(index2, 1);
  20342. scannedBooks.value = scannedBooks.value.filter((item) => item != isbn);
  20343. };
  20344. function checkIsbn(isbn) {
  20345. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  20346. if (isbn13Regex.test(isbn)) {
  20347. return true;
  20348. }
  20349. return false;
  20350. }
  20351. const scannedBooks = vue.ref([]);
  20352. function handleScan(isbn) {
  20353. var _a;
  20354. if (!checkIsbn(isbn)) {
  20355. let text = `不是正确的ISBN码`;
  20356. uni.$u.ttsModule.speak(text);
  20357. return;
  20358. }
  20359. let isbnStr = `${isbn.slice(-4)}`;
  20360. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  20361. if (isbns.includes(isbn)) {
  20362. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  20363. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  20364. let notAuditNum = book.auditCommentList.filter((item) => item.sts === 0).length || 0;
  20365. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  20366. if (scannedNum >= notAuditNum) {
  20367. let text = `${isbnStr}已超出订单中的数量`;
  20368. return uni.$u.ttsModule.speak(text);
  20369. } else {
  20370. if (book.suit == 1) {
  20371. let text = `${isbnStr}请注意套装书是否齐全`;
  20372. uni.$u.ttsModule.speak(text);
  20373. }
  20374. if (book.bookWarn == 1) {
  20375. let text = `请注意${isbnStr}需要取出`;
  20376. uni.$u.ttsModule.speak(text);
  20377. }
  20378. scannedBooks.value.push(isbn);
  20379. getBookInfo(isbn);
  20380. }
  20381. }
  20382. } else {
  20383. let text = `此订单中不存在${isbnStr}这本书 `;
  20384. uni.$u.ttsModule.speak(text);
  20385. }
  20386. }
  20387. function handleScanCode() {
  20388. uni.scanCode({
  20389. success: (res2) => {
  20390. handleScan(res2.result);
  20391. }
  20392. });
  20393. }
  20394. const checkUserId = vue.ref();
  20395. const orderId = vue.ref();
  20396. const orderDetail = vue.ref({});
  20397. const showModal = vue.ref(false);
  20398. const isQualitySelected = vue.ref(false);
  20399. const showQualityModal = () => {
  20400. showModal.value = true;
  20401. };
  20402. const closeModal = () => {
  20403. showModal.value = false;
  20404. playGlobalSound();
  20405. };
  20406. function playGlobalSound() {
  20407. uni.$u.playClickSound();
  20408. }
  20409. const toggleQuality = () => {
  20410. isQualitySelected.value = !isQualitySelected.value;
  20411. };
  20412. const handleAudit = () => {
  20413. playGlobalSound();
  20414. if (!isQualitySelected.value) {
  20415. uni.$u.toast("请选择品相");
  20416. uni.$u.ttsModule.speak("请选择品相");
  20417. return;
  20418. }
  20419. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  20420. if (checkUserInfo.userId) {
  20421. checkUserId.value = checkUserInfo.userId;
  20422. }
  20423. uni.$u.http.post("/app/orderinfo/checkOrderBatch", {
  20424. checkUserId: checkUserId.value,
  20425. orderId: orderId.value,
  20426. checkList: scannedBooks.value.map((isbn) => ({ sts: 1, com: "", isbn }))
  20427. }).then((res2) => {
  20428. if (res2.code == 200) {
  20429. uni.showToast({ title: "审核成功", icon: "none" });
  20430. uni.$u.ttsModule.speak("审核成功");
  20431. uni.navigateBack({ delta: 2 });
  20432. } else {
  20433. uni.$u.toast(res2.msg);
  20434. }
  20435. });
  20436. };
  20437. onLoad((options) => {
  20438. orderId.value = options.orderId;
  20439. orderDetail.value = uni.getStorageSync("orderDetail");
  20440. scannedBooks.value = uni.getStorageSync("scannedBooks");
  20441. scannedBooks.value.forEach((isbn) => {
  20442. getBookInfo(isbn);
  20443. });
  20444. uni.$u.useGlobalEvent((e) => {
  20445. if (e.barcode) {
  20446. handleScan(e.barcode);
  20447. }
  20448. });
  20449. });
  20450. onShow(() => {
  20451. var _a;
  20452. uni.$u.updateActivePageOnShow();
  20453. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  20454. orderDetail.value = uni.getStorageSync("orderDetail");
  20455. });
  20456. onUnload(() => {
  20457. uni.$u.cleanupOnPageUnload();
  20458. });
  20459. const __returned__ = { detailMap, scannedBooksDetail, getBookInfo, handleClose, checkIsbn, scannedBooks, handleScan, handleScanCode, checkUserId, orderId, orderDetail, showModal, isQualitySelected, showQualityModal, closeModal, playGlobalSound, toggleQuality, handleAudit, ref: vue.ref, get onLoad() {
  20460. return onLoad;
  20461. }, get onShow() {
  20462. return onShow;
  20463. }, get onUnload() {
  20464. return onUnload;
  20465. }, BookItem: BookItem$1 };
  20466. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20467. return __returned__;
  20468. }
  20469. };
  20470. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  20471. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  20472. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  20473. return vue.openBlock(), vue.createElementBlock("view", { class: "batch-audit" }, [
  20474. (vue.openBlock(true), vue.createElementBlock(
  20475. vue.Fragment,
  20476. null,
  20477. vue.renderList($setup.scannedBooksDetail, (item, index2) => {
  20478. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  20479. key: item.isbn,
  20480. item,
  20481. showClose: "",
  20482. onClose: (isbn) => $setup.handleClose(index2, isbn)
  20483. }, null, 8, ["item", "onClose"]);
  20484. }),
  20485. 128
  20486. /* KEYED_FRAGMENT */
  20487. )),
  20488. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  20489. vue.createVNode(_component_u_button, {
  20490. type: "warning",
  20491. size: "large",
  20492. onClick: $setup.handleScanCode
  20493. }, {
  20494. default: vue.withCtx(() => [
  20495. vue.createTextVNode("扫码")
  20496. ]),
  20497. _: 1
  20498. /* STABLE */
  20499. }),
  20500. vue.createVNode(_component_u_button, {
  20501. type: "primary",
  20502. size: "large",
  20503. onClick: $setup.showQualityModal
  20504. }, {
  20505. default: vue.withCtx(() => [
  20506. vue.createTextVNode("确定")
  20507. ]),
  20508. _: 1
  20509. /* STABLE */
  20510. })
  20511. ]),
  20512. vue.createVNode(_component_u_modal, {
  20513. show: $setup.showModal,
  20514. title: "品相选择",
  20515. onCancel: $setup.closeModal,
  20516. showCancelButton: true,
  20517. closeOnClickOverlay: true,
  20518. onConfirm: $setup.handleAudit
  20519. }, {
  20520. default: vue.withCtx(() => [
  20521. vue.createElementVNode("view", {
  20522. class: "quality-selector",
  20523. onClick: $setup.playGlobalSound
  20524. }, [
  20525. vue.createElementVNode(
  20526. "view",
  20527. {
  20528. class: vue.normalizeClass(["quality-circle", { selected: $setup.isQualitySelected }]),
  20529. onClick: $setup.toggleQuality
  20530. },
  20531. [
  20532. vue.createElementVNode("text", null, "良好")
  20533. ],
  20534. 2
  20535. /* CLASS */
  20536. )
  20537. ])
  20538. ]),
  20539. _: 1
  20540. /* STABLE */
  20541. }, 8, ["show"])
  20542. ]);
  20543. }
  20544. const PagesIndexDetailBatchAudit = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-bc156c69"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/batch-audit.vue"]]);
  20545. const _sfc_main$X = {
  20546. __name: "sender",
  20547. setup(__props, { expose: __expose }) {
  20548. __expose();
  20549. function playGlobalSound() {
  20550. uni.$u.playClickSound();
  20551. }
  20552. const otherParams = vue.ref({
  20553. search: ""
  20554. });
  20555. const scrollRef = vue.ref(null);
  20556. const refreshList = () => {
  20557. var _a;
  20558. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  20559. };
  20560. let dataList = vue.ref([]);
  20561. const updateList = (data, page2) => {
  20562. dataList.value = data;
  20563. if (!isSearch.value)
  20564. return;
  20565. if (data.length > 0) {
  20566. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  20567. } else {
  20568. uni.$u.ttsModule.speak("未查询到数据");
  20569. }
  20570. isSearch.value = false;
  20571. };
  20572. const isSearch = vue.ref(false);
  20573. const handleSearch = () => {
  20574. isSearch.value = true;
  20575. refreshList();
  20576. };
  20577. const __returned__ = { playGlobalSound, otherParams, scrollRef, refreshList, get dataList() {
  20578. return dataList;
  20579. }, set dataList(v) {
  20580. dataList = v;
  20581. }, updateList, isSearch, handleSearch, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  20582. return onLoad;
  20583. } };
  20584. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20585. return __returned__;
  20586. }
  20587. };
  20588. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  20589. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  20590. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  20591. return vue.openBlock(), vue.createElementBlock("view", {
  20592. class: "common-page",
  20593. style: { "padding": "0" },
  20594. onClick: $setup.playGlobalSound
  20595. }, [
  20596. vue.createVNode($setup["PageScroll"], {
  20597. requestStr: "/app/orderinfo/getOrderListByUserInfo",
  20598. onUpdateList: $setup.updateList,
  20599. ref: "scrollRef",
  20600. otherParams: $setup.otherParams,
  20601. immediate: false
  20602. }, {
  20603. default: vue.withCtx(() => [
  20604. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  20605. default: vue.withCtx(() => [
  20606. vue.createElementVNode("view", { class: "search-area" }, [
  20607. vue.createVNode(_component_u_search, {
  20608. placeholder: "请输入发件人姓名或电话",
  20609. searchIconSize: 18,
  20610. bgColor: "#f6f7f6",
  20611. onSearch: $setup.handleSearch,
  20612. modelValue: $setup.otherParams.search,
  20613. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  20614. "custom-style": "font-size:32rpx",
  20615. "placeholder-style": "font-size:32rpx",
  20616. clearabled: true,
  20617. focus: false,
  20618. showAction: false,
  20619. height: 36
  20620. }, null, 8, ["modelValue"])
  20621. ])
  20622. ]),
  20623. _: 1
  20624. /* STABLE */
  20625. }),
  20626. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  20627. key: 0,
  20628. class: "list-con"
  20629. }, [
  20630. (vue.openBlock(true), vue.createElementBlock(
  20631. vue.Fragment,
  20632. null,
  20633. vue.renderList($setup.dataList, (cell) => {
  20634. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  20635. key: cell.id,
  20636. item: cell,
  20637. class: "mt-20"
  20638. }, null, 8, ["item"]);
  20639. }),
  20640. 128
  20641. /* KEYED_FRAGMENT */
  20642. ))
  20643. ])) : vue.createCommentVNode("v-if", true)
  20644. ]),
  20645. _: 1
  20646. /* STABLE */
  20647. }, 8, ["otherParams"])
  20648. ]);
  20649. }
  20650. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/sender.vue"]]);
  20651. const _sfc_main$W = {
  20652. __name: "audit",
  20653. setup(__props, { expose: __expose }) {
  20654. __expose();
  20655. const otherParams = vue.ref({
  20656. sender: ""
  20657. });
  20658. const scrollRef = vue.ref(null);
  20659. const refreshList = () => {
  20660. var _a;
  20661. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  20662. };
  20663. let dataList = vue.ref([{
  20664. date: "2024-10-24",
  20665. orderNum: 423,
  20666. auditNum: 293,
  20667. trueNum: 323
  20668. }, {
  20669. date: "2024-10-24",
  20670. orderNum: 423,
  20671. auditNum: 293,
  20672. trueNum: 323
  20673. }, {
  20674. date: "2024-10-24",
  20675. orderNum: 423,
  20676. auditNum: 293,
  20677. trueNum: 323
  20678. }]);
  20679. const updateList = (data) => {
  20680. dataList.value = data;
  20681. };
  20682. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  20683. return dataList;
  20684. }, set dataList(v) {
  20685. dataList = v;
  20686. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  20687. return onLoad;
  20688. } };
  20689. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20690. return __returned__;
  20691. }
  20692. };
  20693. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  20694. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  20695. return vue.openBlock(), vue.createElementBlock("view", {
  20696. class: "common-page",
  20697. style: { "padding": "0" }
  20698. }, [
  20699. vue.createVNode($setup["PageScroll"], {
  20700. requestStr: "/team/token/shop/invite/page",
  20701. onUpdateList: $setup.updateList,
  20702. ref: "scrollRef",
  20703. otherParams: $setup.otherParams
  20704. }, {
  20705. default: vue.withCtx(() => [
  20706. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  20707. default: vue.withCtx(() => [
  20708. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  20709. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  20710. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  20711. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  20712. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  20713. ])
  20714. ]),
  20715. _: 1
  20716. /* STABLE */
  20717. }),
  20718. vue.createElementVNode("view", { class: "list-con" }, [
  20719. (vue.openBlock(true), vue.createElementBlock(
  20720. vue.Fragment,
  20721. null,
  20722. vue.renderList($setup.dataList, (item, index2) => {
  20723. return vue.openBlock(), vue.createElementBlock("view", {
  20724. key: index2,
  20725. class: "flex-a"
  20726. }, [
  20727. vue.createElementVNode(
  20728. "view",
  20729. { class: "text-item flex-1" },
  20730. vue.toDisplayString(item.date),
  20731. 1
  20732. /* TEXT */
  20733. ),
  20734. vue.createElementVNode(
  20735. "view",
  20736. { class: "text-item flex-1" },
  20737. vue.toDisplayString(item.orderNum),
  20738. 1
  20739. /* TEXT */
  20740. ),
  20741. vue.createElementVNode(
  20742. "view",
  20743. { class: "text-item flex-1" },
  20744. vue.toDisplayString(item.auditNum),
  20745. 1
  20746. /* TEXT */
  20747. ),
  20748. vue.createElementVNode(
  20749. "view",
  20750. { class: "text-item flex-1" },
  20751. vue.toDisplayString(item.trueNum),
  20752. 1
  20753. /* TEXT */
  20754. )
  20755. ]);
  20756. }),
  20757. 128
  20758. /* KEYED_FRAGMENT */
  20759. ))
  20760. ])
  20761. ]),
  20762. _: 1
  20763. /* STABLE */
  20764. }, 8, ["otherParams"])
  20765. ]);
  20766. }
  20767. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/statistic/audit.vue"]]);
  20768. const icons = {
  20769. "id": "2852637",
  20770. "name": "uniui图标库",
  20771. "font_family": "uniicons",
  20772. "css_prefix_text": "uniui-",
  20773. "description": "",
  20774. "glyphs": [
  20775. {
  20776. "icon_id": "25027049",
  20777. "name": "yanse",
  20778. "font_class": "color",
  20779. "unicode": "e6cf",
  20780. "unicode_decimal": 59087
  20781. },
  20782. {
  20783. "icon_id": "25027048",
  20784. "name": "wallet",
  20785. "font_class": "wallet",
  20786. "unicode": "e6b1",
  20787. "unicode_decimal": 59057
  20788. },
  20789. {
  20790. "icon_id": "25015720",
  20791. "name": "settings-filled",
  20792. "font_class": "settings-filled",
  20793. "unicode": "e6ce",
  20794. "unicode_decimal": 59086
  20795. },
  20796. {
  20797. "icon_id": "25015434",
  20798. "name": "shimingrenzheng-filled",
  20799. "font_class": "auth-filled",
  20800. "unicode": "e6cc",
  20801. "unicode_decimal": 59084
  20802. },
  20803. {
  20804. "icon_id": "24934246",
  20805. "name": "shop-filled",
  20806. "font_class": "shop-filled",
  20807. "unicode": "e6cd",
  20808. "unicode_decimal": 59085
  20809. },
  20810. {
  20811. "icon_id": "24934159",
  20812. "name": "staff-filled-01",
  20813. "font_class": "staff-filled",
  20814. "unicode": "e6cb",
  20815. "unicode_decimal": 59083
  20816. },
  20817. {
  20818. "icon_id": "24932461",
  20819. "name": "VIP-filled",
  20820. "font_class": "vip-filled",
  20821. "unicode": "e6c6",
  20822. "unicode_decimal": 59078
  20823. },
  20824. {
  20825. "icon_id": "24932462",
  20826. "name": "plus_circle_fill",
  20827. "font_class": "plus-filled",
  20828. "unicode": "e6c7",
  20829. "unicode_decimal": 59079
  20830. },
  20831. {
  20832. "icon_id": "24932463",
  20833. "name": "folder_add-filled",
  20834. "font_class": "folder-add-filled",
  20835. "unicode": "e6c8",
  20836. "unicode_decimal": 59080
  20837. },
  20838. {
  20839. "icon_id": "24932464",
  20840. "name": "yanse-filled",
  20841. "font_class": "color-filled",
  20842. "unicode": "e6c9",
  20843. "unicode_decimal": 59081
  20844. },
  20845. {
  20846. "icon_id": "24932465",
  20847. "name": "tune-filled",
  20848. "font_class": "tune-filled",
  20849. "unicode": "e6ca",
  20850. "unicode_decimal": 59082
  20851. },
  20852. {
  20853. "icon_id": "24932455",
  20854. "name": "a-rilidaka-filled",
  20855. "font_class": "calendar-filled",
  20856. "unicode": "e6c0",
  20857. "unicode_decimal": 59072
  20858. },
  20859. {
  20860. "icon_id": "24932456",
  20861. "name": "notification-filled",
  20862. "font_class": "notification-filled",
  20863. "unicode": "e6c1",
  20864. "unicode_decimal": 59073
  20865. },
  20866. {
  20867. "icon_id": "24932457",
  20868. "name": "wallet-filled",
  20869. "font_class": "wallet-filled",
  20870. "unicode": "e6c2",
  20871. "unicode_decimal": 59074
  20872. },
  20873. {
  20874. "icon_id": "24932458",
  20875. "name": "paihangbang-filled",
  20876. "font_class": "medal-filled",
  20877. "unicode": "e6c3",
  20878. "unicode_decimal": 59075
  20879. },
  20880. {
  20881. "icon_id": "24932459",
  20882. "name": "gift-filled",
  20883. "font_class": "gift-filled",
  20884. "unicode": "e6c4",
  20885. "unicode_decimal": 59076
  20886. },
  20887. {
  20888. "icon_id": "24932460",
  20889. "name": "fire-filled",
  20890. "font_class": "fire-filled",
  20891. "unicode": "e6c5",
  20892. "unicode_decimal": 59077
  20893. },
  20894. {
  20895. "icon_id": "24928001",
  20896. "name": "refreshempty",
  20897. "font_class": "refreshempty",
  20898. "unicode": "e6bf",
  20899. "unicode_decimal": 59071
  20900. },
  20901. {
  20902. "icon_id": "24926853",
  20903. "name": "location-ellipse",
  20904. "font_class": "location-filled",
  20905. "unicode": "e6af",
  20906. "unicode_decimal": 59055
  20907. },
  20908. {
  20909. "icon_id": "24926735",
  20910. "name": "person-filled",
  20911. "font_class": "person-filled",
  20912. "unicode": "e69d",
  20913. "unicode_decimal": 59037
  20914. },
  20915. {
  20916. "icon_id": "24926703",
  20917. "name": "personadd-filled",
  20918. "font_class": "personadd-filled",
  20919. "unicode": "e698",
  20920. "unicode_decimal": 59032
  20921. },
  20922. {
  20923. "icon_id": "24923351",
  20924. "name": "back",
  20925. "font_class": "back",
  20926. "unicode": "e6b9",
  20927. "unicode_decimal": 59065
  20928. },
  20929. {
  20930. "icon_id": "24923352",
  20931. "name": "forward",
  20932. "font_class": "forward",
  20933. "unicode": "e6ba",
  20934. "unicode_decimal": 59066
  20935. },
  20936. {
  20937. "icon_id": "24923353",
  20938. "name": "arrowthinright",
  20939. "font_class": "arrow-right",
  20940. "unicode": "e6bb",
  20941. "unicode_decimal": 59067
  20942. },
  20943. {
  20944. "icon_id": "24923353",
  20945. "name": "arrowthinright",
  20946. "font_class": "arrowthinright",
  20947. "unicode": "e6bb",
  20948. "unicode_decimal": 59067
  20949. },
  20950. {
  20951. "icon_id": "24923354",
  20952. "name": "arrowthinleft",
  20953. "font_class": "arrow-left",
  20954. "unicode": "e6bc",
  20955. "unicode_decimal": 59068
  20956. },
  20957. {
  20958. "icon_id": "24923354",
  20959. "name": "arrowthinleft",
  20960. "font_class": "arrowthinleft",
  20961. "unicode": "e6bc",
  20962. "unicode_decimal": 59068
  20963. },
  20964. {
  20965. "icon_id": "24923355",
  20966. "name": "arrowthinup",
  20967. "font_class": "arrow-up",
  20968. "unicode": "e6bd",
  20969. "unicode_decimal": 59069
  20970. },
  20971. {
  20972. "icon_id": "24923355",
  20973. "name": "arrowthinup",
  20974. "font_class": "arrowthinup",
  20975. "unicode": "e6bd",
  20976. "unicode_decimal": 59069
  20977. },
  20978. {
  20979. "icon_id": "24923356",
  20980. "name": "arrowthindown",
  20981. "font_class": "arrow-down",
  20982. "unicode": "e6be",
  20983. "unicode_decimal": 59070
  20984. },
  20985. {
  20986. "icon_id": "24923356",
  20987. "name": "arrowthindown",
  20988. "font_class": "arrowthindown",
  20989. "unicode": "e6be",
  20990. "unicode_decimal": 59070
  20991. },
  20992. {
  20993. "icon_id": "24923349",
  20994. "name": "arrowdown",
  20995. "font_class": "bottom",
  20996. "unicode": "e6b8",
  20997. "unicode_decimal": 59064
  20998. },
  20999. {
  21000. "icon_id": "24923349",
  21001. "name": "arrowdown",
  21002. "font_class": "arrowdown",
  21003. "unicode": "e6b8",
  21004. "unicode_decimal": 59064
  21005. },
  21006. {
  21007. "icon_id": "24923346",
  21008. "name": "arrowright",
  21009. "font_class": "right",
  21010. "unicode": "e6b5",
  21011. "unicode_decimal": 59061
  21012. },
  21013. {
  21014. "icon_id": "24923346",
  21015. "name": "arrowright",
  21016. "font_class": "arrowright",
  21017. "unicode": "e6b5",
  21018. "unicode_decimal": 59061
  21019. },
  21020. {
  21021. "icon_id": "24923347",
  21022. "name": "arrowup",
  21023. "font_class": "top",
  21024. "unicode": "e6b6",
  21025. "unicode_decimal": 59062
  21026. },
  21027. {
  21028. "icon_id": "24923347",
  21029. "name": "arrowup",
  21030. "font_class": "arrowup",
  21031. "unicode": "e6b6",
  21032. "unicode_decimal": 59062
  21033. },
  21034. {
  21035. "icon_id": "24923348",
  21036. "name": "arrowleft",
  21037. "font_class": "left",
  21038. "unicode": "e6b7",
  21039. "unicode_decimal": 59063
  21040. },
  21041. {
  21042. "icon_id": "24923348",
  21043. "name": "arrowleft",
  21044. "font_class": "arrowleft",
  21045. "unicode": "e6b7",
  21046. "unicode_decimal": 59063
  21047. },
  21048. {
  21049. "icon_id": "24923334",
  21050. "name": "eye",
  21051. "font_class": "eye",
  21052. "unicode": "e651",
  21053. "unicode_decimal": 58961
  21054. },
  21055. {
  21056. "icon_id": "24923335",
  21057. "name": "eye-filled",
  21058. "font_class": "eye-filled",
  21059. "unicode": "e66a",
  21060. "unicode_decimal": 58986
  21061. },
  21062. {
  21063. "icon_id": "24923336",
  21064. "name": "eye-slash",
  21065. "font_class": "eye-slash",
  21066. "unicode": "e6b3",
  21067. "unicode_decimal": 59059
  21068. },
  21069. {
  21070. "icon_id": "24923337",
  21071. "name": "eye-slash-filled",
  21072. "font_class": "eye-slash-filled",
  21073. "unicode": "e6b4",
  21074. "unicode_decimal": 59060
  21075. },
  21076. {
  21077. "icon_id": "24923305",
  21078. "name": "info-filled",
  21079. "font_class": "info-filled",
  21080. "unicode": "e649",
  21081. "unicode_decimal": 58953
  21082. },
  21083. {
  21084. "icon_id": "24923299",
  21085. "name": "reload-01",
  21086. "font_class": "reload",
  21087. "unicode": "e6b2",
  21088. "unicode_decimal": 59058
  21089. },
  21090. {
  21091. "icon_id": "24923195",
  21092. "name": "mic_slash_fill",
  21093. "font_class": "micoff-filled",
  21094. "unicode": "e6b0",
  21095. "unicode_decimal": 59056
  21096. },
  21097. {
  21098. "icon_id": "24923165",
  21099. "name": "map-pin-ellipse",
  21100. "font_class": "map-pin-ellipse",
  21101. "unicode": "e6ac",
  21102. "unicode_decimal": 59052
  21103. },
  21104. {
  21105. "icon_id": "24923166",
  21106. "name": "map-pin",
  21107. "font_class": "map-pin",
  21108. "unicode": "e6ad",
  21109. "unicode_decimal": 59053
  21110. },
  21111. {
  21112. "icon_id": "24923167",
  21113. "name": "location",
  21114. "font_class": "location",
  21115. "unicode": "e6ae",
  21116. "unicode_decimal": 59054
  21117. },
  21118. {
  21119. "icon_id": "24923064",
  21120. "name": "starhalf",
  21121. "font_class": "starhalf",
  21122. "unicode": "e683",
  21123. "unicode_decimal": 59011
  21124. },
  21125. {
  21126. "icon_id": "24923065",
  21127. "name": "star",
  21128. "font_class": "star",
  21129. "unicode": "e688",
  21130. "unicode_decimal": 59016
  21131. },
  21132. {
  21133. "icon_id": "24923066",
  21134. "name": "star-filled",
  21135. "font_class": "star-filled",
  21136. "unicode": "e68f",
  21137. "unicode_decimal": 59023
  21138. },
  21139. {
  21140. "icon_id": "24899646",
  21141. "name": "a-rilidaka",
  21142. "font_class": "calendar",
  21143. "unicode": "e6a0",
  21144. "unicode_decimal": 59040
  21145. },
  21146. {
  21147. "icon_id": "24899647",
  21148. "name": "fire",
  21149. "font_class": "fire",
  21150. "unicode": "e6a1",
  21151. "unicode_decimal": 59041
  21152. },
  21153. {
  21154. "icon_id": "24899648",
  21155. "name": "paihangbang",
  21156. "font_class": "medal",
  21157. "unicode": "e6a2",
  21158. "unicode_decimal": 59042
  21159. },
  21160. {
  21161. "icon_id": "24899649",
  21162. "name": "font",
  21163. "font_class": "font",
  21164. "unicode": "e6a3",
  21165. "unicode_decimal": 59043
  21166. },
  21167. {
  21168. "icon_id": "24899650",
  21169. "name": "gift",
  21170. "font_class": "gift",
  21171. "unicode": "e6a4",
  21172. "unicode_decimal": 59044
  21173. },
  21174. {
  21175. "icon_id": "24899651",
  21176. "name": "link",
  21177. "font_class": "link",
  21178. "unicode": "e6a5",
  21179. "unicode_decimal": 59045
  21180. },
  21181. {
  21182. "icon_id": "24899652",
  21183. "name": "notification",
  21184. "font_class": "notification",
  21185. "unicode": "e6a6",
  21186. "unicode_decimal": 59046
  21187. },
  21188. {
  21189. "icon_id": "24899653",
  21190. "name": "staff",
  21191. "font_class": "staff",
  21192. "unicode": "e6a7",
  21193. "unicode_decimal": 59047
  21194. },
  21195. {
  21196. "icon_id": "24899654",
  21197. "name": "VIP",
  21198. "font_class": "vip",
  21199. "unicode": "e6a8",
  21200. "unicode_decimal": 59048
  21201. },
  21202. {
  21203. "icon_id": "24899655",
  21204. "name": "folder_add",
  21205. "font_class": "folder-add",
  21206. "unicode": "e6a9",
  21207. "unicode_decimal": 59049
  21208. },
  21209. {
  21210. "icon_id": "24899656",
  21211. "name": "tune",
  21212. "font_class": "tune",
  21213. "unicode": "e6aa",
  21214. "unicode_decimal": 59050
  21215. },
  21216. {
  21217. "icon_id": "24899657",
  21218. "name": "shimingrenzheng",
  21219. "font_class": "auth",
  21220. "unicode": "e6ab",
  21221. "unicode_decimal": 59051
  21222. },
  21223. {
  21224. "icon_id": "24899565",
  21225. "name": "person",
  21226. "font_class": "person",
  21227. "unicode": "e699",
  21228. "unicode_decimal": 59033
  21229. },
  21230. {
  21231. "icon_id": "24899566",
  21232. "name": "email-filled",
  21233. "font_class": "email-filled",
  21234. "unicode": "e69a",
  21235. "unicode_decimal": 59034
  21236. },
  21237. {
  21238. "icon_id": "24899567",
  21239. "name": "phone-filled",
  21240. "font_class": "phone-filled",
  21241. "unicode": "e69b",
  21242. "unicode_decimal": 59035
  21243. },
  21244. {
  21245. "icon_id": "24899568",
  21246. "name": "phone",
  21247. "font_class": "phone",
  21248. "unicode": "e69c",
  21249. "unicode_decimal": 59036
  21250. },
  21251. {
  21252. "icon_id": "24899570",
  21253. "name": "email",
  21254. "font_class": "email",
  21255. "unicode": "e69e",
  21256. "unicode_decimal": 59038
  21257. },
  21258. {
  21259. "icon_id": "24899571",
  21260. "name": "personadd",
  21261. "font_class": "personadd",
  21262. "unicode": "e69f",
  21263. "unicode_decimal": 59039
  21264. },
  21265. {
  21266. "icon_id": "24899558",
  21267. "name": "chatboxes-filled",
  21268. "font_class": "chatboxes-filled",
  21269. "unicode": "e692",
  21270. "unicode_decimal": 59026
  21271. },
  21272. {
  21273. "icon_id": "24899559",
  21274. "name": "contact",
  21275. "font_class": "contact",
  21276. "unicode": "e693",
  21277. "unicode_decimal": 59027
  21278. },
  21279. {
  21280. "icon_id": "24899560",
  21281. "name": "chatbubble-filled",
  21282. "font_class": "chatbubble-filled",
  21283. "unicode": "e694",
  21284. "unicode_decimal": 59028
  21285. },
  21286. {
  21287. "icon_id": "24899561",
  21288. "name": "contact-filled",
  21289. "font_class": "contact-filled",
  21290. "unicode": "e695",
  21291. "unicode_decimal": 59029
  21292. },
  21293. {
  21294. "icon_id": "24899562",
  21295. "name": "chatboxes",
  21296. "font_class": "chatboxes",
  21297. "unicode": "e696",
  21298. "unicode_decimal": 59030
  21299. },
  21300. {
  21301. "icon_id": "24899563",
  21302. "name": "chatbubble",
  21303. "font_class": "chatbubble",
  21304. "unicode": "e697",
  21305. "unicode_decimal": 59031
  21306. },
  21307. {
  21308. "icon_id": "24881290",
  21309. "name": "upload-filled",
  21310. "font_class": "upload-filled",
  21311. "unicode": "e68e",
  21312. "unicode_decimal": 59022
  21313. },
  21314. {
  21315. "icon_id": "24881292",
  21316. "name": "upload",
  21317. "font_class": "upload",
  21318. "unicode": "e690",
  21319. "unicode_decimal": 59024
  21320. },
  21321. {
  21322. "icon_id": "24881293",
  21323. "name": "weixin",
  21324. "font_class": "weixin",
  21325. "unicode": "e691",
  21326. "unicode_decimal": 59025
  21327. },
  21328. {
  21329. "icon_id": "24881274",
  21330. "name": "compose",
  21331. "font_class": "compose",
  21332. "unicode": "e67f",
  21333. "unicode_decimal": 59007
  21334. },
  21335. {
  21336. "icon_id": "24881275",
  21337. "name": "qq",
  21338. "font_class": "qq",
  21339. "unicode": "e680",
  21340. "unicode_decimal": 59008
  21341. },
  21342. {
  21343. "icon_id": "24881276",
  21344. "name": "download-filled",
  21345. "font_class": "download-filled",
  21346. "unicode": "e681",
  21347. "unicode_decimal": 59009
  21348. },
  21349. {
  21350. "icon_id": "24881277",
  21351. "name": "pengyouquan",
  21352. "font_class": "pyq",
  21353. "unicode": "e682",
  21354. "unicode_decimal": 59010
  21355. },
  21356. {
  21357. "icon_id": "24881279",
  21358. "name": "sound",
  21359. "font_class": "sound",
  21360. "unicode": "e684",
  21361. "unicode_decimal": 59012
  21362. },
  21363. {
  21364. "icon_id": "24881280",
  21365. "name": "trash-filled",
  21366. "font_class": "trash-filled",
  21367. "unicode": "e685",
  21368. "unicode_decimal": 59013
  21369. },
  21370. {
  21371. "icon_id": "24881281",
  21372. "name": "sound-filled",
  21373. "font_class": "sound-filled",
  21374. "unicode": "e686",
  21375. "unicode_decimal": 59014
  21376. },
  21377. {
  21378. "icon_id": "24881282",
  21379. "name": "trash",
  21380. "font_class": "trash",
  21381. "unicode": "e687",
  21382. "unicode_decimal": 59015
  21383. },
  21384. {
  21385. "icon_id": "24881284",
  21386. "name": "videocam-filled",
  21387. "font_class": "videocam-filled",
  21388. "unicode": "e689",
  21389. "unicode_decimal": 59017
  21390. },
  21391. {
  21392. "icon_id": "24881285",
  21393. "name": "spinner-cycle",
  21394. "font_class": "spinner-cycle",
  21395. "unicode": "e68a",
  21396. "unicode_decimal": 59018
  21397. },
  21398. {
  21399. "icon_id": "24881286",
  21400. "name": "weibo",
  21401. "font_class": "weibo",
  21402. "unicode": "e68b",
  21403. "unicode_decimal": 59019
  21404. },
  21405. {
  21406. "icon_id": "24881288",
  21407. "name": "videocam",
  21408. "font_class": "videocam",
  21409. "unicode": "e68c",
  21410. "unicode_decimal": 59020
  21411. },
  21412. {
  21413. "icon_id": "24881289",
  21414. "name": "download",
  21415. "font_class": "download",
  21416. "unicode": "e68d",
  21417. "unicode_decimal": 59021
  21418. },
  21419. {
  21420. "icon_id": "24879601",
  21421. "name": "help",
  21422. "font_class": "help",
  21423. "unicode": "e679",
  21424. "unicode_decimal": 59001
  21425. },
  21426. {
  21427. "icon_id": "24879602",
  21428. "name": "navigate-filled",
  21429. "font_class": "navigate-filled",
  21430. "unicode": "e67a",
  21431. "unicode_decimal": 59002
  21432. },
  21433. {
  21434. "icon_id": "24879603",
  21435. "name": "plusempty",
  21436. "font_class": "plusempty",
  21437. "unicode": "e67b",
  21438. "unicode_decimal": 59003
  21439. },
  21440. {
  21441. "icon_id": "24879604",
  21442. "name": "smallcircle",
  21443. "font_class": "smallcircle",
  21444. "unicode": "e67c",
  21445. "unicode_decimal": 59004
  21446. },
  21447. {
  21448. "icon_id": "24879605",
  21449. "name": "minus-filled",
  21450. "font_class": "minus-filled",
  21451. "unicode": "e67d",
  21452. "unicode_decimal": 59005
  21453. },
  21454. {
  21455. "icon_id": "24879606",
  21456. "name": "micoff",
  21457. "font_class": "micoff",
  21458. "unicode": "e67e",
  21459. "unicode_decimal": 59006
  21460. },
  21461. {
  21462. "icon_id": "24879588",
  21463. "name": "closeempty",
  21464. "font_class": "closeempty",
  21465. "unicode": "e66c",
  21466. "unicode_decimal": 58988
  21467. },
  21468. {
  21469. "icon_id": "24879589",
  21470. "name": "clear",
  21471. "font_class": "clear",
  21472. "unicode": "e66d",
  21473. "unicode_decimal": 58989
  21474. },
  21475. {
  21476. "icon_id": "24879590",
  21477. "name": "navigate",
  21478. "font_class": "navigate",
  21479. "unicode": "e66e",
  21480. "unicode_decimal": 58990
  21481. },
  21482. {
  21483. "icon_id": "24879591",
  21484. "name": "minus",
  21485. "font_class": "minus",
  21486. "unicode": "e66f",
  21487. "unicode_decimal": 58991
  21488. },
  21489. {
  21490. "icon_id": "24879592",
  21491. "name": "image",
  21492. "font_class": "image",
  21493. "unicode": "e670",
  21494. "unicode_decimal": 58992
  21495. },
  21496. {
  21497. "icon_id": "24879593",
  21498. "name": "mic",
  21499. "font_class": "mic",
  21500. "unicode": "e671",
  21501. "unicode_decimal": 58993
  21502. },
  21503. {
  21504. "icon_id": "24879594",
  21505. "name": "paperplane",
  21506. "font_class": "paperplane",
  21507. "unicode": "e672",
  21508. "unicode_decimal": 58994
  21509. },
  21510. {
  21511. "icon_id": "24879595",
  21512. "name": "close",
  21513. "font_class": "close",
  21514. "unicode": "e673",
  21515. "unicode_decimal": 58995
  21516. },
  21517. {
  21518. "icon_id": "24879596",
  21519. "name": "help-filled",
  21520. "font_class": "help-filled",
  21521. "unicode": "e674",
  21522. "unicode_decimal": 58996
  21523. },
  21524. {
  21525. "icon_id": "24879597",
  21526. "name": "plus-filled",
  21527. "font_class": "paperplane-filled",
  21528. "unicode": "e675",
  21529. "unicode_decimal": 58997
  21530. },
  21531. {
  21532. "icon_id": "24879598",
  21533. "name": "plus",
  21534. "font_class": "plus",
  21535. "unicode": "e676",
  21536. "unicode_decimal": 58998
  21537. },
  21538. {
  21539. "icon_id": "24879599",
  21540. "name": "mic-filled",
  21541. "font_class": "mic-filled",
  21542. "unicode": "e677",
  21543. "unicode_decimal": 58999
  21544. },
  21545. {
  21546. "icon_id": "24879600",
  21547. "name": "image-filled",
  21548. "font_class": "image-filled",
  21549. "unicode": "e678",
  21550. "unicode_decimal": 59e3
  21551. },
  21552. {
  21553. "icon_id": "24855900",
  21554. "name": "locked-filled",
  21555. "font_class": "locked-filled",
  21556. "unicode": "e668",
  21557. "unicode_decimal": 58984
  21558. },
  21559. {
  21560. "icon_id": "24855901",
  21561. "name": "info",
  21562. "font_class": "info",
  21563. "unicode": "e669",
  21564. "unicode_decimal": 58985
  21565. },
  21566. {
  21567. "icon_id": "24855903",
  21568. "name": "locked",
  21569. "font_class": "locked",
  21570. "unicode": "e66b",
  21571. "unicode_decimal": 58987
  21572. },
  21573. {
  21574. "icon_id": "24855884",
  21575. "name": "camera-filled",
  21576. "font_class": "camera-filled",
  21577. "unicode": "e658",
  21578. "unicode_decimal": 58968
  21579. },
  21580. {
  21581. "icon_id": "24855885",
  21582. "name": "chat-filled",
  21583. "font_class": "chat-filled",
  21584. "unicode": "e659",
  21585. "unicode_decimal": 58969
  21586. },
  21587. {
  21588. "icon_id": "24855886",
  21589. "name": "camera",
  21590. "font_class": "camera",
  21591. "unicode": "e65a",
  21592. "unicode_decimal": 58970
  21593. },
  21594. {
  21595. "icon_id": "24855887",
  21596. "name": "circle",
  21597. "font_class": "circle",
  21598. "unicode": "e65b",
  21599. "unicode_decimal": 58971
  21600. },
  21601. {
  21602. "icon_id": "24855888",
  21603. "name": "checkmarkempty",
  21604. "font_class": "checkmarkempty",
  21605. "unicode": "e65c",
  21606. "unicode_decimal": 58972
  21607. },
  21608. {
  21609. "icon_id": "24855889",
  21610. "name": "chat",
  21611. "font_class": "chat",
  21612. "unicode": "e65d",
  21613. "unicode_decimal": 58973
  21614. },
  21615. {
  21616. "icon_id": "24855890",
  21617. "name": "circle-filled",
  21618. "font_class": "circle-filled",
  21619. "unicode": "e65e",
  21620. "unicode_decimal": 58974
  21621. },
  21622. {
  21623. "icon_id": "24855891",
  21624. "name": "flag",
  21625. "font_class": "flag",
  21626. "unicode": "e65f",
  21627. "unicode_decimal": 58975
  21628. },
  21629. {
  21630. "icon_id": "24855892",
  21631. "name": "flag-filled",
  21632. "font_class": "flag-filled",
  21633. "unicode": "e660",
  21634. "unicode_decimal": 58976
  21635. },
  21636. {
  21637. "icon_id": "24855893",
  21638. "name": "gear-filled",
  21639. "font_class": "gear-filled",
  21640. "unicode": "e661",
  21641. "unicode_decimal": 58977
  21642. },
  21643. {
  21644. "icon_id": "24855894",
  21645. "name": "home",
  21646. "font_class": "home",
  21647. "unicode": "e662",
  21648. "unicode_decimal": 58978
  21649. },
  21650. {
  21651. "icon_id": "24855895",
  21652. "name": "home-filled",
  21653. "font_class": "home-filled",
  21654. "unicode": "e663",
  21655. "unicode_decimal": 58979
  21656. },
  21657. {
  21658. "icon_id": "24855896",
  21659. "name": "gear",
  21660. "font_class": "gear",
  21661. "unicode": "e664",
  21662. "unicode_decimal": 58980
  21663. },
  21664. {
  21665. "icon_id": "24855897",
  21666. "name": "smallcircle-filled",
  21667. "font_class": "smallcircle-filled",
  21668. "unicode": "e665",
  21669. "unicode_decimal": 58981
  21670. },
  21671. {
  21672. "icon_id": "24855898",
  21673. "name": "map-filled",
  21674. "font_class": "map-filled",
  21675. "unicode": "e666",
  21676. "unicode_decimal": 58982
  21677. },
  21678. {
  21679. "icon_id": "24855899",
  21680. "name": "map",
  21681. "font_class": "map",
  21682. "unicode": "e667",
  21683. "unicode_decimal": 58983
  21684. },
  21685. {
  21686. "icon_id": "24855825",
  21687. "name": "refresh-filled",
  21688. "font_class": "refresh-filled",
  21689. "unicode": "e656",
  21690. "unicode_decimal": 58966
  21691. },
  21692. {
  21693. "icon_id": "24855826",
  21694. "name": "refresh",
  21695. "font_class": "refresh",
  21696. "unicode": "e657",
  21697. "unicode_decimal": 58967
  21698. },
  21699. {
  21700. "icon_id": "24855808",
  21701. "name": "cloud-upload",
  21702. "font_class": "cloud-upload",
  21703. "unicode": "e645",
  21704. "unicode_decimal": 58949
  21705. },
  21706. {
  21707. "icon_id": "24855809",
  21708. "name": "cloud-download-filled",
  21709. "font_class": "cloud-download-filled",
  21710. "unicode": "e646",
  21711. "unicode_decimal": 58950
  21712. },
  21713. {
  21714. "icon_id": "24855810",
  21715. "name": "cloud-download",
  21716. "font_class": "cloud-download",
  21717. "unicode": "e647",
  21718. "unicode_decimal": 58951
  21719. },
  21720. {
  21721. "icon_id": "24855811",
  21722. "name": "cloud-upload-filled",
  21723. "font_class": "cloud-upload-filled",
  21724. "unicode": "e648",
  21725. "unicode_decimal": 58952
  21726. },
  21727. {
  21728. "icon_id": "24855813",
  21729. "name": "redo",
  21730. "font_class": "redo",
  21731. "unicode": "e64a",
  21732. "unicode_decimal": 58954
  21733. },
  21734. {
  21735. "icon_id": "24855814",
  21736. "name": "images-filled",
  21737. "font_class": "images-filled",
  21738. "unicode": "e64b",
  21739. "unicode_decimal": 58955
  21740. },
  21741. {
  21742. "icon_id": "24855815",
  21743. "name": "undo-filled",
  21744. "font_class": "undo-filled",
  21745. "unicode": "e64c",
  21746. "unicode_decimal": 58956
  21747. },
  21748. {
  21749. "icon_id": "24855816",
  21750. "name": "more",
  21751. "font_class": "more",
  21752. "unicode": "e64d",
  21753. "unicode_decimal": 58957
  21754. },
  21755. {
  21756. "icon_id": "24855817",
  21757. "name": "more-filled",
  21758. "font_class": "more-filled",
  21759. "unicode": "e64e",
  21760. "unicode_decimal": 58958
  21761. },
  21762. {
  21763. "icon_id": "24855818",
  21764. "name": "undo",
  21765. "font_class": "undo",
  21766. "unicode": "e64f",
  21767. "unicode_decimal": 58959
  21768. },
  21769. {
  21770. "icon_id": "24855819",
  21771. "name": "images",
  21772. "font_class": "images",
  21773. "unicode": "e650",
  21774. "unicode_decimal": 58960
  21775. },
  21776. {
  21777. "icon_id": "24855821",
  21778. "name": "paperclip",
  21779. "font_class": "paperclip",
  21780. "unicode": "e652",
  21781. "unicode_decimal": 58962
  21782. },
  21783. {
  21784. "icon_id": "24855822",
  21785. "name": "settings",
  21786. "font_class": "settings",
  21787. "unicode": "e653",
  21788. "unicode_decimal": 58963
  21789. },
  21790. {
  21791. "icon_id": "24855823",
  21792. "name": "search",
  21793. "font_class": "search",
  21794. "unicode": "e654",
  21795. "unicode_decimal": 58964
  21796. },
  21797. {
  21798. "icon_id": "24855824",
  21799. "name": "redo-filled",
  21800. "font_class": "redo-filled",
  21801. "unicode": "e655",
  21802. "unicode_decimal": 58965
  21803. },
  21804. {
  21805. "icon_id": "24841702",
  21806. "name": "list",
  21807. "font_class": "list",
  21808. "unicode": "e644",
  21809. "unicode_decimal": 58948
  21810. },
  21811. {
  21812. "icon_id": "24841489",
  21813. "name": "mail-open-filled",
  21814. "font_class": "mail-open-filled",
  21815. "unicode": "e63a",
  21816. "unicode_decimal": 58938
  21817. },
  21818. {
  21819. "icon_id": "24841491",
  21820. "name": "hand-thumbsdown-filled",
  21821. "font_class": "hand-down-filled",
  21822. "unicode": "e63c",
  21823. "unicode_decimal": 58940
  21824. },
  21825. {
  21826. "icon_id": "24841492",
  21827. "name": "hand-thumbsdown",
  21828. "font_class": "hand-down",
  21829. "unicode": "e63d",
  21830. "unicode_decimal": 58941
  21831. },
  21832. {
  21833. "icon_id": "24841493",
  21834. "name": "hand-thumbsup-filled",
  21835. "font_class": "hand-up-filled",
  21836. "unicode": "e63e",
  21837. "unicode_decimal": 58942
  21838. },
  21839. {
  21840. "icon_id": "24841494",
  21841. "name": "hand-thumbsup",
  21842. "font_class": "hand-up",
  21843. "unicode": "e63f",
  21844. "unicode_decimal": 58943
  21845. },
  21846. {
  21847. "icon_id": "24841496",
  21848. "name": "heart-filled",
  21849. "font_class": "heart-filled",
  21850. "unicode": "e641",
  21851. "unicode_decimal": 58945
  21852. },
  21853. {
  21854. "icon_id": "24841498",
  21855. "name": "mail-open",
  21856. "font_class": "mail-open",
  21857. "unicode": "e643",
  21858. "unicode_decimal": 58947
  21859. },
  21860. {
  21861. "icon_id": "24841488",
  21862. "name": "heart",
  21863. "font_class": "heart",
  21864. "unicode": "e639",
  21865. "unicode_decimal": 58937
  21866. },
  21867. {
  21868. "icon_id": "24839963",
  21869. "name": "loop",
  21870. "font_class": "loop",
  21871. "unicode": "e633",
  21872. "unicode_decimal": 58931
  21873. },
  21874. {
  21875. "icon_id": "24839866",
  21876. "name": "pulldown",
  21877. "font_class": "pulldown",
  21878. "unicode": "e632",
  21879. "unicode_decimal": 58930
  21880. },
  21881. {
  21882. "icon_id": "24813798",
  21883. "name": "scan",
  21884. "font_class": "scan",
  21885. "unicode": "e62a",
  21886. "unicode_decimal": 58922
  21887. },
  21888. {
  21889. "icon_id": "24813786",
  21890. "name": "bars",
  21891. "font_class": "bars",
  21892. "unicode": "e627",
  21893. "unicode_decimal": 58919
  21894. },
  21895. {
  21896. "icon_id": "24813788",
  21897. "name": "cart-filled",
  21898. "font_class": "cart-filled",
  21899. "unicode": "e629",
  21900. "unicode_decimal": 58921
  21901. },
  21902. {
  21903. "icon_id": "24813790",
  21904. "name": "checkbox",
  21905. "font_class": "checkbox",
  21906. "unicode": "e62b",
  21907. "unicode_decimal": 58923
  21908. },
  21909. {
  21910. "icon_id": "24813791",
  21911. "name": "checkbox-filled",
  21912. "font_class": "checkbox-filled",
  21913. "unicode": "e62c",
  21914. "unicode_decimal": 58924
  21915. },
  21916. {
  21917. "icon_id": "24813794",
  21918. "name": "shop",
  21919. "font_class": "shop",
  21920. "unicode": "e62f",
  21921. "unicode_decimal": 58927
  21922. },
  21923. {
  21924. "icon_id": "24813795",
  21925. "name": "headphones",
  21926. "font_class": "headphones",
  21927. "unicode": "e630",
  21928. "unicode_decimal": 58928
  21929. },
  21930. {
  21931. "icon_id": "24813796",
  21932. "name": "cart",
  21933. "font_class": "cart",
  21934. "unicode": "e631",
  21935. "unicode_decimal": 58929
  21936. }
  21937. ]
  21938. };
  21939. const getVal = (val) => {
  21940. const reg = /^[0-9]*$/g;
  21941. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  21942. };
  21943. const _sfc_main$V = {
  21944. name: "UniIcons",
  21945. emits: ["click"],
  21946. props: {
  21947. type: {
  21948. type: String,
  21949. default: ""
  21950. },
  21951. color: {
  21952. type: String,
  21953. default: "#333333"
  21954. },
  21955. size: {
  21956. type: [Number, String],
  21957. default: 16
  21958. },
  21959. customPrefix: {
  21960. type: String,
  21961. default: ""
  21962. }
  21963. },
  21964. data() {
  21965. return {
  21966. icons: icons.glyphs
  21967. };
  21968. },
  21969. computed: {
  21970. unicode() {
  21971. let code2 = this.icons.find((v) => v.font_class === this.type);
  21972. if (code2) {
  21973. return unescape(`%u${code2.unicode}`);
  21974. }
  21975. return "";
  21976. },
  21977. iconSize() {
  21978. return getVal(this.size);
  21979. }
  21980. },
  21981. methods: {
  21982. _onClick() {
  21983. this.$emit("click");
  21984. }
  21985. }
  21986. };
  21987. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  21988. return vue.openBlock(), vue.createElementBlock(
  21989. "text",
  21990. {
  21991. style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
  21992. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  21993. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  21994. },
  21995. null,
  21996. 6
  21997. /* CLASS, STYLE */
  21998. );
  21999. }
  22000. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-d31e1c47"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  22001. let Calendar$1 = class Calendar {
  22002. constructor({
  22003. selected,
  22004. startDate,
  22005. endDate,
  22006. range: range2
  22007. } = {}) {
  22008. this.date = this.getDateObj(/* @__PURE__ */ new Date());
  22009. this.selected = selected || [];
  22010. this.startDate = startDate;
  22011. this.endDate = endDate;
  22012. this.range = range2;
  22013. this.cleanMultipleStatus();
  22014. this.weeks = {};
  22015. this.lastHover = false;
  22016. }
  22017. /**
  22018. * 设置日期
  22019. * @param {Object} date
  22020. */
  22021. setDate(date3) {
  22022. const selectDate = this.getDateObj(date3);
  22023. this.getWeeks(selectDate.fullDate);
  22024. }
  22025. /**
  22026. * 清理多选状态
  22027. */
  22028. cleanMultipleStatus() {
  22029. this.multipleStatus = {
  22030. before: "",
  22031. after: "",
  22032. data: []
  22033. };
  22034. }
  22035. setStartDate(startDate) {
  22036. this.startDate = startDate;
  22037. }
  22038. setEndDate(endDate) {
  22039. this.endDate = endDate;
  22040. }
  22041. getPreMonthObj(date3) {
  22042. date3 = fixIosDateFormat(date3);
  22043. date3 = new Date(date3);
  22044. const oldMonth = date3.getMonth();
  22045. date3.setMonth(oldMonth - 1);
  22046. const newMonth = date3.getMonth();
  22047. if (oldMonth !== 0 && newMonth - oldMonth === 0) {
  22048. date3.setMonth(newMonth - 1);
  22049. }
  22050. return this.getDateObj(date3);
  22051. }
  22052. getNextMonthObj(date3) {
  22053. date3 = fixIosDateFormat(date3);
  22054. date3 = new Date(date3);
  22055. const oldMonth = date3.getMonth();
  22056. date3.setMonth(oldMonth + 1);
  22057. const newMonth = date3.getMonth();
  22058. if (newMonth - oldMonth > 1) {
  22059. date3.setMonth(newMonth - 1);
  22060. }
  22061. return this.getDateObj(date3);
  22062. }
  22063. /**
  22064. * 获取指定格式Date对象
  22065. */
  22066. getDateObj(date3) {
  22067. date3 = fixIosDateFormat(date3);
  22068. date3 = new Date(date3);
  22069. return {
  22070. fullDate: getDate(date3),
  22071. year: date3.getFullYear(),
  22072. month: addZero(date3.getMonth() + 1),
  22073. date: addZero(date3.getDate()),
  22074. day: date3.getDay()
  22075. };
  22076. }
  22077. /**
  22078. * 获取上一个月日期集合
  22079. */
  22080. getPreMonthDays(amount2, dateObj) {
  22081. const result = [];
  22082. for (let i = amount2 - 1; i >= 0; i--) {
  22083. const month = dateObj.month > 1 ? dateObj.month - 1 : 12;
  22084. const year = month === 12 ? dateObj.year - 1 : dateObj.year;
  22085. const date3 = new Date(year, month, -i).getDate();
  22086. const fullDate = `${year}-${addZero(month)}-${addZero(date3)}`;
  22087. let multiples = this.multipleStatus.data;
  22088. let multiplesStatus = -1;
  22089. if (this.range && multiples) {
  22090. multiplesStatus = multiples.findIndex((item) => {
  22091. return this.dateEqual(item, fullDate);
  22092. });
  22093. }
  22094. const checked = multiplesStatus !== -1;
  22095. const extraInfo = this.selected && this.selected.find((item) => {
  22096. if (this.dateEqual(fullDate, item.date)) {
  22097. return item;
  22098. }
  22099. });
  22100. result.push({
  22101. fullDate,
  22102. year,
  22103. month,
  22104. date: date3,
  22105. multiple: this.range ? checked : false,
  22106. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  22107. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  22108. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  22109. isToday: fullDate === this.date.fullDate,
  22110. userChecked: false,
  22111. extraInfo
  22112. });
  22113. }
  22114. return result;
  22115. }
  22116. /**
  22117. * 获取本月日期集合
  22118. */
  22119. getCurrentMonthDays(amount2, dateObj) {
  22120. const result = [];
  22121. const fullDate = this.date.fullDate;
  22122. for (let i = 1; i <= amount2; i++) {
  22123. const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
  22124. const isToday = fullDate === currentDate;
  22125. const extraInfo = this.selected && this.selected.find((item) => {
  22126. if (this.dateEqual(currentDate, item.date)) {
  22127. return item;
  22128. }
  22129. });
  22130. if (this.startDate) {
  22131. dateCompare(this.startDate, currentDate);
  22132. }
  22133. if (this.endDate) {
  22134. dateCompare(currentDate, this.endDate);
  22135. }
  22136. let multiples = this.multipleStatus.data;
  22137. let multiplesStatus = -1;
  22138. if (this.range && multiples) {
  22139. multiplesStatus = multiples.findIndex((item) => {
  22140. return this.dateEqual(item, currentDate);
  22141. });
  22142. }
  22143. const checked = multiplesStatus !== -1;
  22144. result.push({
  22145. fullDate: currentDate,
  22146. year: dateObj.year,
  22147. month: dateObj.month,
  22148. date: i,
  22149. multiple: this.range ? checked : false,
  22150. beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  22151. afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  22152. disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
  22153. isToday,
  22154. userChecked: false,
  22155. extraInfo
  22156. });
  22157. }
  22158. return result;
  22159. }
  22160. /**
  22161. * 获取下一个月日期集合
  22162. */
  22163. _getNextMonthDays(amount2, dateObj) {
  22164. const result = [];
  22165. dateObj.month + 1;
  22166. for (let i = 1; i <= amount2; i++) {
  22167. const month = dateObj.month === 12 ? 1 : dateObj.month * 1 + 1;
  22168. const year = month === 1 ? dateObj.year + 1 : dateObj.year;
  22169. const fullDate = `${year}-${addZero(month)}-${addZero(i)}`;
  22170. let multiples = this.multipleStatus.data;
  22171. let multiplesStatus = -1;
  22172. if (this.range && multiples) {
  22173. multiplesStatus = multiples.findIndex((item) => {
  22174. return this.dateEqual(item, fullDate);
  22175. });
  22176. }
  22177. const checked = multiplesStatus !== -1;
  22178. const extraInfo = this.selected && this.selected.find((item) => {
  22179. if (this.dateEqual(fullDate, item.date)) {
  22180. return item;
  22181. }
  22182. });
  22183. result.push({
  22184. fullDate,
  22185. year,
  22186. date: i,
  22187. month,
  22188. multiple: this.range ? checked : false,
  22189. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  22190. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  22191. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  22192. isToday: fullDate === this.date.fullDate,
  22193. userChecked: false,
  22194. extraInfo
  22195. });
  22196. }
  22197. return result;
  22198. }
  22199. /**
  22200. * 获取当前日期详情
  22201. * @param {Object} date
  22202. */
  22203. getInfo(date3) {
  22204. if (!date3) {
  22205. date3 = /* @__PURE__ */ new Date();
  22206. }
  22207. return this.calendar.find((item) => item.fullDate === this.getDateObj(date3).fullDate);
  22208. }
  22209. /**
  22210. * 比较时间是否相等
  22211. */
  22212. dateEqual(before, after) {
  22213. before = new Date(fixIosDateFormat(before));
  22214. after = new Date(fixIosDateFormat(after));
  22215. return before.valueOf() === after.valueOf();
  22216. }
  22217. /**
  22218. * 比较真实起始日期
  22219. */
  22220. isLogicBefore(currentDate, before, after) {
  22221. let logicBefore = before;
  22222. if (before && after) {
  22223. logicBefore = dateCompare(before, after) ? before : after;
  22224. }
  22225. return this.dateEqual(logicBefore, currentDate);
  22226. }
  22227. isLogicAfter(currentDate, before, after) {
  22228. let logicAfter = after;
  22229. if (before && after) {
  22230. logicAfter = dateCompare(before, after) ? after : before;
  22231. }
  22232. return this.dateEqual(logicAfter, currentDate);
  22233. }
  22234. /**
  22235. * 获取日期范围内所有日期
  22236. * @param {Object} begin
  22237. * @param {Object} end
  22238. */
  22239. geDateAll(begin, end) {
  22240. var arr = [];
  22241. var ab = begin.split("-");
  22242. var ae = end.split("-");
  22243. var db = /* @__PURE__ */ new Date();
  22244. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  22245. var de = /* @__PURE__ */ new Date();
  22246. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  22247. var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
  22248. var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
  22249. for (var k = unixDb; k <= unixDe; ) {
  22250. k = k + 24 * 60 * 60 * 1e3;
  22251. arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
  22252. }
  22253. return arr;
  22254. }
  22255. /**
  22256. * 获取多选状态
  22257. */
  22258. setMultiple(fullDate) {
  22259. if (!this.range)
  22260. return;
  22261. let {
  22262. before,
  22263. after
  22264. } = this.multipleStatus;
  22265. if (before && after) {
  22266. if (!this.lastHover) {
  22267. this.lastHover = true;
  22268. return;
  22269. }
  22270. this.multipleStatus.before = fullDate;
  22271. this.multipleStatus.after = "";
  22272. this.multipleStatus.data = [];
  22273. this.multipleStatus.fulldate = "";
  22274. this.lastHover = false;
  22275. } else {
  22276. if (!before) {
  22277. this.multipleStatus.before = fullDate;
  22278. this.lastHover = false;
  22279. } else {
  22280. this.multipleStatus.after = fullDate;
  22281. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  22282. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  22283. } else {
  22284. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  22285. }
  22286. this.lastHover = true;
  22287. }
  22288. }
  22289. this.getWeeks(fullDate);
  22290. }
  22291. /**
  22292. * 鼠标 hover 更新多选状态
  22293. */
  22294. setHoverMultiple(fullDate) {
  22295. if (!this.range || this.lastHover)
  22296. return;
  22297. const { before } = this.multipleStatus;
  22298. if (!before) {
  22299. this.multipleStatus.before = fullDate;
  22300. } else {
  22301. this.multipleStatus.after = fullDate;
  22302. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  22303. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  22304. } else {
  22305. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  22306. }
  22307. }
  22308. this.getWeeks(fullDate);
  22309. }
  22310. /**
  22311. * 更新默认值多选状态
  22312. */
  22313. setDefaultMultiple(before, after) {
  22314. this.multipleStatus.before = before;
  22315. this.multipleStatus.after = after;
  22316. if (before && after) {
  22317. if (dateCompare(before, after)) {
  22318. this.multipleStatus.data = this.geDateAll(before, after);
  22319. this.getWeeks(after);
  22320. } else {
  22321. this.multipleStatus.data = this.geDateAll(after, before);
  22322. this.getWeeks(before);
  22323. }
  22324. }
  22325. }
  22326. /**
  22327. * 获取每周数据
  22328. * @param {Object} dateData
  22329. */
  22330. getWeeks(dateData) {
  22331. const {
  22332. year,
  22333. month
  22334. } = this.getDateObj(dateData);
  22335. const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
  22336. const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
  22337. const currentMonthDayAmount = new Date(year, month, 0).getDate();
  22338. const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
  22339. const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
  22340. const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
  22341. const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
  22342. const weeks = new Array(6);
  22343. for (let i = 0; i < calendarDays.length; i++) {
  22344. const index2 = Math.floor(i / 7);
  22345. if (!weeks[index2]) {
  22346. weeks[index2] = new Array(7);
  22347. }
  22348. weeks[index2][i % 7] = calendarDays[i];
  22349. }
  22350. this.calendar = calendarDays;
  22351. this.weeks = weeks;
  22352. }
  22353. };
  22354. function getDateTime(date3, hideSecond) {
  22355. return `${getDate(date3)} ${getTime(date3, hideSecond)}`;
  22356. }
  22357. function getDate(date3) {
  22358. date3 = fixIosDateFormat(date3);
  22359. date3 = new Date(date3);
  22360. const year = date3.getFullYear();
  22361. const month = date3.getMonth() + 1;
  22362. const day = date3.getDate();
  22363. return `${year}-${addZero(month)}-${addZero(day)}`;
  22364. }
  22365. function getTime(date3, hideSecond) {
  22366. date3 = fixIosDateFormat(date3);
  22367. date3 = new Date(date3);
  22368. const hour = date3.getHours();
  22369. const minute = date3.getMinutes();
  22370. const second = date3.getSeconds();
  22371. return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
  22372. }
  22373. function addZero(num) {
  22374. if (num < 10) {
  22375. num = `0${num}`;
  22376. }
  22377. return num;
  22378. }
  22379. function getDefaultSecond(hideSecond) {
  22380. return hideSecond ? "00:00" : "00:00:00";
  22381. }
  22382. function dateCompare(startDate, endDate) {
  22383. startDate = new Date(fixIosDateFormat(startDate));
  22384. endDate = new Date(fixIosDateFormat(endDate));
  22385. return startDate <= endDate;
  22386. }
  22387. function checkDate(date3) {
  22388. const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
  22389. return date3.match(dateReg);
  22390. }
  22391. const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9]:[0-5]?[0-9])?$/;
  22392. function fixIosDateFormat(value2) {
  22393. if (typeof value2 === "string" && dateTimeReg.test(value2)) {
  22394. value2 = value2.replace(/-/g, "/");
  22395. }
  22396. return value2;
  22397. }
  22398. const _sfc_main$U = {
  22399. props: {
  22400. weeks: {
  22401. type: Object,
  22402. default() {
  22403. return {};
  22404. }
  22405. },
  22406. calendar: {
  22407. type: Object,
  22408. default: () => {
  22409. return {};
  22410. }
  22411. },
  22412. selected: {
  22413. type: Array,
  22414. default: () => {
  22415. return [];
  22416. }
  22417. },
  22418. checkHover: {
  22419. type: Boolean,
  22420. default: false
  22421. }
  22422. },
  22423. methods: {
  22424. choiceDate(weeks) {
  22425. this.$emit("change", weeks);
  22426. },
  22427. handleMousemove(weeks) {
  22428. this.$emit("handleMouse", weeks);
  22429. }
  22430. }
  22431. };
  22432. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  22433. return vue.openBlock(), vue.createElementBlock(
  22434. "view",
  22435. {
  22436. class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
  22437. "uni-calendar-item--disable": $props.weeks.disable,
  22438. "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
  22439. "uni-calendar-item--multiple": $props.weeks.multiple,
  22440. "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
  22441. }]),
  22442. onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
  22443. onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
  22444. },
  22445. [
  22446. vue.createElementVNode(
  22447. "view",
  22448. {
  22449. class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
  22450. "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
  22451. "uni-calendar-item--checked-range-text": $props.checkHover,
  22452. "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
  22453. "uni-calendar-item--multiple": $props.weeks.multiple,
  22454. "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
  22455. "uni-calendar-item--disable": $props.weeks.disable
  22456. }])
  22457. },
  22458. [
  22459. $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  22460. key: 0,
  22461. class: "uni-calendar-item__weeks-box-circle"
  22462. })) : vue.createCommentVNode("v-if", true),
  22463. vue.createElementVNode(
  22464. "text",
  22465. { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
  22466. vue.toDisplayString($props.weeks.date),
  22467. 1
  22468. /* TEXT */
  22469. )
  22470. ],
  22471. 2
  22472. /* CLASS */
  22473. ),
  22474. vue.createElementVNode(
  22475. "view",
  22476. {
  22477. class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday })
  22478. },
  22479. null,
  22480. 2
  22481. /* CLASS */
  22482. )
  22483. ],
  22484. 34
  22485. /* CLASS, NEED_HYDRATION */
  22486. );
  22487. }
  22488. const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-3c762a01"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
  22489. const isObject$1 = (val) => val !== null && typeof val === "object";
  22490. const defaultDelimiters = ["{", "}"];
  22491. class BaseFormatter {
  22492. constructor() {
  22493. this._caches = /* @__PURE__ */ Object.create(null);
  22494. }
  22495. interpolate(message, values, delimiters = defaultDelimiters) {
  22496. if (!values) {
  22497. return [message];
  22498. }
  22499. let tokens = this._caches[message];
  22500. if (!tokens) {
  22501. tokens = parse(message, delimiters);
  22502. this._caches[message] = tokens;
  22503. }
  22504. return compile(tokens, values);
  22505. }
  22506. }
  22507. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  22508. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  22509. function parse(format2, [startDelimiter, endDelimiter]) {
  22510. const tokens = [];
  22511. let position = 0;
  22512. let text = "";
  22513. while (position < format2.length) {
  22514. let char = format2[position++];
  22515. if (char === startDelimiter) {
  22516. if (text) {
  22517. tokens.push({ type: "text", value: text });
  22518. }
  22519. text = "";
  22520. let sub = "";
  22521. char = format2[position++];
  22522. while (char !== void 0 && char !== endDelimiter) {
  22523. sub += char;
  22524. char = format2[position++];
  22525. }
  22526. const isClosed = char === endDelimiter;
  22527. const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  22528. tokens.push({ value: sub, type: type2 });
  22529. } else {
  22530. text += char;
  22531. }
  22532. }
  22533. text && tokens.push({ type: "text", value: text });
  22534. return tokens;
  22535. }
  22536. function compile(tokens, values) {
  22537. const compiled = [];
  22538. let index2 = 0;
  22539. const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
  22540. if (mode === "unknown") {
  22541. return compiled;
  22542. }
  22543. while (index2 < tokens.length) {
  22544. const token = tokens[index2];
  22545. switch (token.type) {
  22546. case "text":
  22547. compiled.push(token.value);
  22548. break;
  22549. case "list":
  22550. compiled.push(values[parseInt(token.value, 10)]);
  22551. break;
  22552. case "named":
  22553. if (mode === "named") {
  22554. compiled.push(values[token.value]);
  22555. } else {
  22556. {
  22557. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  22558. }
  22559. }
  22560. break;
  22561. case "unknown":
  22562. {
  22563. console.warn(`Detect 'unknown' type of token!`);
  22564. }
  22565. break;
  22566. }
  22567. index2++;
  22568. }
  22569. return compiled;
  22570. }
  22571. const LOCALE_ZH_HANS = "zh-Hans";
  22572. const LOCALE_ZH_HANT = "zh-Hant";
  22573. const LOCALE_EN = "en";
  22574. const LOCALE_FR = "fr";
  22575. const LOCALE_ES = "es";
  22576. const hasOwnProperty = Object.prototype.hasOwnProperty;
  22577. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  22578. const defaultFormatter = new BaseFormatter();
  22579. function include(str, parts) {
  22580. return !!parts.find((part) => str.indexOf(part) !== -1);
  22581. }
  22582. function startsWith(str, parts) {
  22583. return parts.find((part) => str.indexOf(part) === 0);
  22584. }
  22585. function normalizeLocale(locale, messages2) {
  22586. if (!locale) {
  22587. return;
  22588. }
  22589. locale = locale.trim().replace(/_/g, "-");
  22590. if (messages2 && messages2[locale]) {
  22591. return locale;
  22592. }
  22593. locale = locale.toLowerCase();
  22594. if (locale === "chinese") {
  22595. return LOCALE_ZH_HANS;
  22596. }
  22597. if (locale.indexOf("zh") === 0) {
  22598. if (locale.indexOf("-hans") > -1) {
  22599. return LOCALE_ZH_HANS;
  22600. }
  22601. if (locale.indexOf("-hant") > -1) {
  22602. return LOCALE_ZH_HANT;
  22603. }
  22604. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  22605. return LOCALE_ZH_HANT;
  22606. }
  22607. return LOCALE_ZH_HANS;
  22608. }
  22609. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  22610. if (messages2 && Object.keys(messages2).length > 0) {
  22611. locales = Object.keys(messages2);
  22612. }
  22613. const lang = startsWith(locale, locales);
  22614. if (lang) {
  22615. return lang;
  22616. }
  22617. }
  22618. class I18n {
  22619. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  22620. this.locale = LOCALE_EN;
  22621. this.fallbackLocale = LOCALE_EN;
  22622. this.message = {};
  22623. this.messages = {};
  22624. this.watchers = [];
  22625. if (fallbackLocale) {
  22626. this.fallbackLocale = fallbackLocale;
  22627. }
  22628. this.formater = formater2 || defaultFormatter;
  22629. this.messages = messages2 || {};
  22630. this.setLocale(locale || LOCALE_EN);
  22631. if (watcher) {
  22632. this.watchLocale(watcher);
  22633. }
  22634. }
  22635. setLocale(locale) {
  22636. const oldLocale = this.locale;
  22637. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  22638. if (!this.messages[this.locale]) {
  22639. this.messages[this.locale] = {};
  22640. }
  22641. this.message = this.messages[this.locale];
  22642. if (oldLocale !== this.locale) {
  22643. this.watchers.forEach((watcher) => {
  22644. watcher(this.locale, oldLocale);
  22645. });
  22646. }
  22647. }
  22648. getLocale() {
  22649. return this.locale;
  22650. }
  22651. watchLocale(fn) {
  22652. const index2 = this.watchers.push(fn) - 1;
  22653. return () => {
  22654. this.watchers.splice(index2, 1);
  22655. };
  22656. }
  22657. add(locale, message, override = true) {
  22658. const curMessages = this.messages[locale];
  22659. if (curMessages) {
  22660. if (override) {
  22661. Object.assign(curMessages, message);
  22662. } else {
  22663. Object.keys(message).forEach((key) => {
  22664. if (!hasOwn(curMessages, key)) {
  22665. curMessages[key] = message[key];
  22666. }
  22667. });
  22668. }
  22669. } else {
  22670. this.messages[locale] = message;
  22671. }
  22672. }
  22673. f(message, values, delimiters) {
  22674. return this.formater.interpolate(message, values, delimiters).join("");
  22675. }
  22676. t(key, locale, values) {
  22677. let message = this.message;
  22678. if (typeof locale === "string") {
  22679. locale = normalizeLocale(locale, this.messages);
  22680. locale && (message = this.messages[locale]);
  22681. } else {
  22682. values = locale;
  22683. }
  22684. if (!hasOwn(message, key)) {
  22685. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  22686. return key;
  22687. }
  22688. return this.formater.interpolate(message[key], values).join("");
  22689. }
  22690. }
  22691. function watchAppLocale(appVm, i18n) {
  22692. if (appVm.$watchLocale) {
  22693. appVm.$watchLocale((newLocale) => {
  22694. i18n.setLocale(newLocale);
  22695. });
  22696. } else {
  22697. appVm.$watch(() => appVm.$locale, (newLocale) => {
  22698. i18n.setLocale(newLocale);
  22699. });
  22700. }
  22701. }
  22702. function getDefaultLocale() {
  22703. if (typeof uni !== "undefined" && uni.getLocale) {
  22704. return uni.getLocale();
  22705. }
  22706. if (typeof global !== "undefined" && global.getLocale) {
  22707. return global.getLocale();
  22708. }
  22709. return LOCALE_EN;
  22710. }
  22711. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  22712. if (typeof locale !== "string") {
  22713. const options = [
  22714. messages2,
  22715. locale
  22716. ];
  22717. locale = options[0];
  22718. messages2 = options[1];
  22719. }
  22720. if (typeof locale !== "string") {
  22721. locale = getDefaultLocale();
  22722. }
  22723. if (typeof fallbackLocale !== "string") {
  22724. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  22725. }
  22726. const i18n = new I18n({
  22727. locale,
  22728. fallbackLocale,
  22729. messages: messages2,
  22730. watcher
  22731. });
  22732. let t2 = (key, values) => {
  22733. if (typeof getApp !== "function") {
  22734. t2 = function(key2, values2) {
  22735. return i18n.t(key2, values2);
  22736. };
  22737. } else {
  22738. let isWatchedAppLocale = false;
  22739. t2 = function(key2, values2) {
  22740. const appVm = getApp().$vm;
  22741. if (appVm) {
  22742. appVm.$locale;
  22743. if (!isWatchedAppLocale) {
  22744. isWatchedAppLocale = true;
  22745. watchAppLocale(appVm, i18n);
  22746. }
  22747. }
  22748. return i18n.t(key2, values2);
  22749. };
  22750. }
  22751. return t2(key, values);
  22752. };
  22753. return {
  22754. i18n,
  22755. f(message, values, delimiters) {
  22756. return i18n.f(message, values, delimiters);
  22757. },
  22758. t(key, values) {
  22759. return t2(key, values);
  22760. },
  22761. add(locale2, message, override = true) {
  22762. return i18n.add(locale2, message, override);
  22763. },
  22764. watch(fn) {
  22765. return i18n.watchLocale(fn);
  22766. },
  22767. getLocale() {
  22768. return i18n.getLocale();
  22769. },
  22770. setLocale(newLocale) {
  22771. return i18n.setLocale(newLocale);
  22772. }
  22773. };
  22774. }
  22775. const en = {
  22776. "uni-datetime-picker.selectDate": "select date",
  22777. "uni-datetime-picker.selectTime": "select time",
  22778. "uni-datetime-picker.selectDateTime": "select date and time",
  22779. "uni-datetime-picker.startDate": "start date",
  22780. "uni-datetime-picker.endDate": "end date",
  22781. "uni-datetime-picker.startTime": "start time",
  22782. "uni-datetime-picker.endTime": "end time",
  22783. "uni-datetime-picker.ok": "ok",
  22784. "uni-datetime-picker.clear": "clear",
  22785. "uni-datetime-picker.cancel": "cancel",
  22786. "uni-datetime-picker.year": "-",
  22787. "uni-datetime-picker.month": "",
  22788. "uni-calender.MON": "MON",
  22789. "uni-calender.TUE": "TUE",
  22790. "uni-calender.WED": "WED",
  22791. "uni-calender.THU": "THU",
  22792. "uni-calender.FRI": "FRI",
  22793. "uni-calender.SAT": "SAT",
  22794. "uni-calender.SUN": "SUN",
  22795. "uni-calender.confirm": "confirm"
  22796. };
  22797. const zhHans = {
  22798. "uni-datetime-picker.selectDate": "选择日期",
  22799. "uni-datetime-picker.selectTime": "选择时间",
  22800. "uni-datetime-picker.selectDateTime": "选择日期时间",
  22801. "uni-datetime-picker.startDate": "开始日期",
  22802. "uni-datetime-picker.endDate": "结束日期",
  22803. "uni-datetime-picker.startTime": "开始时间",
  22804. "uni-datetime-picker.endTime": "结束时间",
  22805. "uni-datetime-picker.ok": "确定",
  22806. "uni-datetime-picker.clear": "清除",
  22807. "uni-datetime-picker.cancel": "取消",
  22808. "uni-datetime-picker.year": "年",
  22809. "uni-datetime-picker.month": "月",
  22810. "uni-calender.SUN": "日",
  22811. "uni-calender.MON": "一",
  22812. "uni-calender.TUE": "二",
  22813. "uni-calender.WED": "三",
  22814. "uni-calender.THU": "四",
  22815. "uni-calender.FRI": "五",
  22816. "uni-calender.SAT": "六",
  22817. "uni-calender.confirm": "确认"
  22818. };
  22819. const zhHant = {
  22820. "uni-datetime-picker.selectDate": "選擇日期",
  22821. "uni-datetime-picker.selectTime": "選擇時間",
  22822. "uni-datetime-picker.selectDateTime": "選擇日期時間",
  22823. "uni-datetime-picker.startDate": "開始日期",
  22824. "uni-datetime-picker.endDate": "結束日期",
  22825. "uni-datetime-picker.startTime": "開始时间",
  22826. "uni-datetime-picker.endTime": "結束时间",
  22827. "uni-datetime-picker.ok": "確定",
  22828. "uni-datetime-picker.clear": "清除",
  22829. "uni-datetime-picker.cancel": "取消",
  22830. "uni-datetime-picker.year": "年",
  22831. "uni-datetime-picker.month": "月",
  22832. "uni-calender.SUN": "日",
  22833. "uni-calender.MON": "一",
  22834. "uni-calender.TUE": "二",
  22835. "uni-calender.WED": "三",
  22836. "uni-calender.THU": "四",
  22837. "uni-calender.FRI": "五",
  22838. "uni-calender.SAT": "六",
  22839. "uni-calender.confirm": "確認"
  22840. };
  22841. const i18nMessages = {
  22842. en,
  22843. "zh-Hans": zhHans,
  22844. "zh-Hant": zhHant
  22845. };
  22846. const { t: t$1 } = initVueI18n(i18nMessages);
  22847. const _sfc_main$T = {
  22848. name: "UniDatetimePicker",
  22849. data() {
  22850. return {
  22851. indicatorStyle: `height: 50px;`,
  22852. visible: false,
  22853. fixNvueBug: {},
  22854. dateShow: true,
  22855. timeShow: true,
  22856. title: "日期和时间",
  22857. // 输入框当前时间
  22858. time: "",
  22859. // 当前的年月日时分秒
  22860. year: 1920,
  22861. month: 0,
  22862. day: 0,
  22863. hour: 0,
  22864. minute: 0,
  22865. second: 0,
  22866. // 起始时间
  22867. startYear: 1920,
  22868. startMonth: 1,
  22869. startDay: 1,
  22870. startHour: 0,
  22871. startMinute: 0,
  22872. startSecond: 0,
  22873. // 结束时间
  22874. endYear: 2120,
  22875. endMonth: 12,
  22876. endDay: 31,
  22877. endHour: 23,
  22878. endMinute: 59,
  22879. endSecond: 59
  22880. };
  22881. },
  22882. props: {
  22883. type: {
  22884. type: String,
  22885. default: "datetime"
  22886. },
  22887. value: {
  22888. type: [String, Number],
  22889. default: ""
  22890. },
  22891. modelValue: {
  22892. type: [String, Number],
  22893. default: ""
  22894. },
  22895. start: {
  22896. type: [Number, String],
  22897. default: ""
  22898. },
  22899. end: {
  22900. type: [Number, String],
  22901. default: ""
  22902. },
  22903. returnType: {
  22904. type: String,
  22905. default: "string"
  22906. },
  22907. disabled: {
  22908. type: [Boolean, String],
  22909. default: false
  22910. },
  22911. border: {
  22912. type: [Boolean, String],
  22913. default: true
  22914. },
  22915. hideSecond: {
  22916. type: [Boolean, String],
  22917. default: false
  22918. }
  22919. },
  22920. watch: {
  22921. modelValue: {
  22922. handler(newVal) {
  22923. if (newVal) {
  22924. this.parseValue(fixIosDateFormat(newVal));
  22925. this.initTime(false);
  22926. } else {
  22927. this.time = "";
  22928. this.parseValue(Date.now());
  22929. }
  22930. },
  22931. immediate: true
  22932. },
  22933. type: {
  22934. handler(newValue) {
  22935. if (newValue === "date") {
  22936. this.dateShow = true;
  22937. this.timeShow = false;
  22938. this.title = "日期";
  22939. } else if (newValue === "time") {
  22940. this.dateShow = false;
  22941. this.timeShow = true;
  22942. this.title = "时间";
  22943. } else {
  22944. this.dateShow = true;
  22945. this.timeShow = true;
  22946. this.title = "日期和时间";
  22947. }
  22948. },
  22949. immediate: true
  22950. },
  22951. start: {
  22952. handler(newVal) {
  22953. this.parseDatetimeRange(fixIosDateFormat(newVal), "start");
  22954. },
  22955. immediate: true
  22956. },
  22957. end: {
  22958. handler(newVal) {
  22959. this.parseDatetimeRange(fixIosDateFormat(newVal), "end");
  22960. },
  22961. immediate: true
  22962. },
  22963. // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22964. months(newVal) {
  22965. this.checkValue("month", this.month, newVal);
  22966. },
  22967. days(newVal) {
  22968. this.checkValue("day", this.day, newVal);
  22969. },
  22970. hours(newVal) {
  22971. this.checkValue("hour", this.hour, newVal);
  22972. },
  22973. minutes(newVal) {
  22974. this.checkValue("minute", this.minute, newVal);
  22975. },
  22976. seconds(newVal) {
  22977. this.checkValue("second", this.second, newVal);
  22978. }
  22979. },
  22980. computed: {
  22981. // 当前年、月、日、时、分、秒选择范围
  22982. years() {
  22983. return this.getCurrentRange("year");
  22984. },
  22985. months() {
  22986. return this.getCurrentRange("month");
  22987. },
  22988. days() {
  22989. return this.getCurrentRange("day");
  22990. },
  22991. hours() {
  22992. return this.getCurrentRange("hour");
  22993. },
  22994. minutes() {
  22995. return this.getCurrentRange("minute");
  22996. },
  22997. seconds() {
  22998. return this.getCurrentRange("second");
  22999. },
  23000. // picker 当前值数组
  23001. ymd() {
  23002. return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
  23003. },
  23004. hms() {
  23005. return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
  23006. },
  23007. // 当前 date 是 start
  23008. currentDateIsStart() {
  23009. return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
  23010. },
  23011. // 当前 date 是 end
  23012. currentDateIsEnd() {
  23013. return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
  23014. },
  23015. // 当前年、月、日、时、分、秒的最小值和最大值
  23016. minYear() {
  23017. return this.startYear;
  23018. },
  23019. maxYear() {
  23020. return this.endYear;
  23021. },
  23022. minMonth() {
  23023. if (this.year === this.startYear) {
  23024. return this.startMonth;
  23025. } else {
  23026. return 1;
  23027. }
  23028. },
  23029. maxMonth() {
  23030. if (this.year === this.endYear) {
  23031. return this.endMonth;
  23032. } else {
  23033. return 12;
  23034. }
  23035. },
  23036. minDay() {
  23037. if (this.year === this.startYear && this.month === this.startMonth) {
  23038. return this.startDay;
  23039. } else {
  23040. return 1;
  23041. }
  23042. },
  23043. maxDay() {
  23044. if (this.year === this.endYear && this.month === this.endMonth) {
  23045. return this.endDay;
  23046. } else {
  23047. return this.daysInMonth(this.year, this.month);
  23048. }
  23049. },
  23050. minHour() {
  23051. if (this.type === "datetime") {
  23052. if (this.currentDateIsStart) {
  23053. return this.startHour;
  23054. } else {
  23055. return 0;
  23056. }
  23057. }
  23058. if (this.type === "time") {
  23059. return this.startHour;
  23060. }
  23061. },
  23062. maxHour() {
  23063. if (this.type === "datetime") {
  23064. if (this.currentDateIsEnd) {
  23065. return this.endHour;
  23066. } else {
  23067. return 23;
  23068. }
  23069. }
  23070. if (this.type === "time") {
  23071. return this.endHour;
  23072. }
  23073. },
  23074. minMinute() {
  23075. if (this.type === "datetime") {
  23076. if (this.currentDateIsStart && this.hour === this.startHour) {
  23077. return this.startMinute;
  23078. } else {
  23079. return 0;
  23080. }
  23081. }
  23082. if (this.type === "time") {
  23083. if (this.hour === this.startHour) {
  23084. return this.startMinute;
  23085. } else {
  23086. return 0;
  23087. }
  23088. }
  23089. },
  23090. maxMinute() {
  23091. if (this.type === "datetime") {
  23092. if (this.currentDateIsEnd && this.hour === this.endHour) {
  23093. return this.endMinute;
  23094. } else {
  23095. return 59;
  23096. }
  23097. }
  23098. if (this.type === "time") {
  23099. if (this.hour === this.endHour) {
  23100. return this.endMinute;
  23101. } else {
  23102. return 59;
  23103. }
  23104. }
  23105. },
  23106. minSecond() {
  23107. if (this.type === "datetime") {
  23108. if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
  23109. return this.startSecond;
  23110. } else {
  23111. return 0;
  23112. }
  23113. }
  23114. if (this.type === "time") {
  23115. if (this.hour === this.startHour && this.minute === this.startMinute) {
  23116. return this.startSecond;
  23117. } else {
  23118. return 0;
  23119. }
  23120. }
  23121. },
  23122. maxSecond() {
  23123. if (this.type === "datetime") {
  23124. if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
  23125. return this.endSecond;
  23126. } else {
  23127. return 59;
  23128. }
  23129. }
  23130. if (this.type === "time") {
  23131. if (this.hour === this.endHour && this.minute === this.endMinute) {
  23132. return this.endSecond;
  23133. } else {
  23134. return 59;
  23135. }
  23136. }
  23137. },
  23138. /**
  23139. * for i18n
  23140. */
  23141. selectTimeText() {
  23142. return t$1("uni-datetime-picker.selectTime");
  23143. },
  23144. okText() {
  23145. return t$1("uni-datetime-picker.ok");
  23146. },
  23147. clearText() {
  23148. return t$1("uni-datetime-picker.clear");
  23149. },
  23150. cancelText() {
  23151. return t$1("uni-datetime-picker.cancel");
  23152. }
  23153. },
  23154. mounted() {
  23155. },
  23156. methods: {
  23157. /**
  23158. * @param {Object} item
  23159. * 小于 10 在前面加个 0
  23160. */
  23161. lessThanTen(item) {
  23162. return item < 10 ? "0" + item : item;
  23163. },
  23164. /**
  23165. * 解析时分秒字符串,例如:00:00:00
  23166. * @param {String} timeString
  23167. */
  23168. parseTimeType(timeString) {
  23169. if (timeString) {
  23170. let timeArr = timeString.split(":");
  23171. this.hour = Number(timeArr[0]);
  23172. this.minute = Number(timeArr[1]);
  23173. this.second = Number(timeArr[2]);
  23174. }
  23175. },
  23176. /**
  23177. * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
  23178. * @param {String | Number} datetime
  23179. */
  23180. initPickerValue(datetime) {
  23181. let defaultValue = null;
  23182. if (datetime) {
  23183. defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
  23184. } else {
  23185. defaultValue = Date.now();
  23186. defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
  23187. }
  23188. this.parseValue(defaultValue);
  23189. },
  23190. /**
  23191. * 初始值规则:
  23192. * - 用户设置初始值 value
  23193. * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
  23194. * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
  23195. * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
  23196. * - 无起始终止时间,则初始值为 value
  23197. * - 无初始值 value,则初始值为当前本地时间 Date.now()
  23198. * @param {Object} value
  23199. * @param {Object} dateBase
  23200. */
  23201. compareValueWithStartAndEnd(value2, start, end) {
  23202. let winner = null;
  23203. value2 = this.superTimeStamp(value2);
  23204. start = this.superTimeStamp(start);
  23205. end = this.superTimeStamp(end);
  23206. if (start && end) {
  23207. if (value2 < start) {
  23208. winner = new Date(start);
  23209. } else if (value2 > end) {
  23210. winner = new Date(end);
  23211. } else {
  23212. winner = new Date(value2);
  23213. }
  23214. } else if (start && !end) {
  23215. winner = start <= value2 ? new Date(value2) : new Date(start);
  23216. } else if (!start && end) {
  23217. winner = value2 <= end ? new Date(value2) : new Date(end);
  23218. } else {
  23219. winner = new Date(value2);
  23220. }
  23221. return winner;
  23222. },
  23223. /**
  23224. * 转换为可比较的时间戳,接受日期、时分秒、时间戳
  23225. * @param {Object} value
  23226. */
  23227. superTimeStamp(value2) {
  23228. let dateBase = "";
  23229. if (this.type === "time" && value2 && typeof value2 === "string") {
  23230. const now2 = /* @__PURE__ */ new Date();
  23231. const year = now2.getFullYear();
  23232. const month = now2.getMonth() + 1;
  23233. const day = now2.getDate();
  23234. dateBase = year + "/" + month + "/" + day + " ";
  23235. }
  23236. if (Number(value2)) {
  23237. value2 = parseInt(value2);
  23238. dateBase = 0;
  23239. }
  23240. return this.createTimeStamp(dateBase + value2);
  23241. },
  23242. /**
  23243. * 解析默认值 value,字符串、时间戳
  23244. * @param {Object} defaultTime
  23245. */
  23246. parseValue(value2) {
  23247. if (!value2) {
  23248. return;
  23249. }
  23250. if (this.type === "time" && typeof value2 === "string") {
  23251. this.parseTimeType(value2);
  23252. } else {
  23253. let defaultDate = null;
  23254. defaultDate = new Date(value2);
  23255. if (this.type !== "time") {
  23256. this.year = defaultDate.getFullYear();
  23257. this.month = defaultDate.getMonth() + 1;
  23258. this.day = defaultDate.getDate();
  23259. }
  23260. if (this.type !== "date") {
  23261. this.hour = defaultDate.getHours();
  23262. this.minute = defaultDate.getMinutes();
  23263. this.second = defaultDate.getSeconds();
  23264. }
  23265. }
  23266. if (this.hideSecond) {
  23267. this.second = 0;
  23268. }
  23269. },
  23270. /**
  23271. * 解析可选择时间范围 start、end,年月日字符串、时间戳
  23272. * @param {Object} defaultTime
  23273. */
  23274. parseDatetimeRange(point, pointType) {
  23275. if (!point) {
  23276. if (pointType === "start") {
  23277. this.startYear = 1920;
  23278. this.startMonth = 1;
  23279. this.startDay = 1;
  23280. this.startHour = 0;
  23281. this.startMinute = 0;
  23282. this.startSecond = 0;
  23283. }
  23284. if (pointType === "end") {
  23285. this.endYear = 2120;
  23286. this.endMonth = 12;
  23287. this.endDay = 31;
  23288. this.endHour = 23;
  23289. this.endMinute = 59;
  23290. this.endSecond = 59;
  23291. }
  23292. return;
  23293. }
  23294. if (this.type === "time") {
  23295. const pointArr = point.split(":");
  23296. this[pointType + "Hour"] = Number(pointArr[0]);
  23297. this[pointType + "Minute"] = Number(pointArr[1]);
  23298. this[pointType + "Second"] = Number(pointArr[2]);
  23299. } else {
  23300. if (!point) {
  23301. pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
  23302. return;
  23303. }
  23304. if (Number(point)) {
  23305. point = parseInt(point);
  23306. }
  23307. const hasTime = /[0-9]:[0-9]/;
  23308. if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
  23309. point
  23310. )) {
  23311. point = point + " 23:59:59";
  23312. }
  23313. const pointDate = new Date(point);
  23314. this[pointType + "Year"] = pointDate.getFullYear();
  23315. this[pointType + "Month"] = pointDate.getMonth() + 1;
  23316. this[pointType + "Day"] = pointDate.getDate();
  23317. if (this.type === "datetime") {
  23318. this[pointType + "Hour"] = pointDate.getHours();
  23319. this[pointType + "Minute"] = pointDate.getMinutes();
  23320. this[pointType + "Second"] = pointDate.getSeconds();
  23321. }
  23322. }
  23323. },
  23324. // 获取 年、月、日、时、分、秒 当前可选范围
  23325. getCurrentRange(value2) {
  23326. const range2 = [];
  23327. for (let i = this["min" + this.capitalize(value2)]; i <= this["max" + this.capitalize(value2)]; i++) {
  23328. range2.push(i);
  23329. }
  23330. return range2;
  23331. },
  23332. // 字符串首字母大写
  23333. capitalize(str) {
  23334. return str.charAt(0).toUpperCase() + str.slice(1);
  23335. },
  23336. // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  23337. checkValue(name, value2, values) {
  23338. if (values.indexOf(value2) === -1) {
  23339. this[name] = values[0];
  23340. }
  23341. },
  23342. // 每个月的实际天数
  23343. daysInMonth(year, month) {
  23344. return new Date(year, month, 0).getDate();
  23345. },
  23346. //兼容 iOS、safari 日期格式
  23347. fixIosDateFormat(value2) {
  23348. if (typeof value2 === "string") {
  23349. value2 = value2.replace(/-/g, "/");
  23350. }
  23351. return value2;
  23352. },
  23353. /**
  23354. * 生成时间戳
  23355. * @param {Object} time
  23356. */
  23357. createTimeStamp(time) {
  23358. if (!time)
  23359. return;
  23360. if (typeof time === "number") {
  23361. return time;
  23362. } else {
  23363. time = time.replace(/-/g, "/");
  23364. if (this.type === "date") {
  23365. time = time + " 00:00:00";
  23366. }
  23367. return Date.parse(time);
  23368. }
  23369. },
  23370. /**
  23371. * 生成日期或时间的字符串
  23372. */
  23373. createDomSting() {
  23374. const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
  23375. let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
  23376. if (!this.hideSecond) {
  23377. hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
  23378. }
  23379. if (this.type === "date") {
  23380. return yymmdd;
  23381. } else if (this.type === "time") {
  23382. return hhmmss;
  23383. } else {
  23384. return yymmdd + " " + hhmmss;
  23385. }
  23386. },
  23387. /**
  23388. * 初始化返回值,并抛出 change 事件
  23389. */
  23390. initTime(emit2 = true) {
  23391. this.time = this.createDomSting();
  23392. if (!emit2)
  23393. return;
  23394. if (this.returnType === "timestamp" && this.type !== "time") {
  23395. this.$emit("change", this.createTimeStamp(this.time));
  23396. this.$emit("input", this.createTimeStamp(this.time));
  23397. this.$emit("update:modelValue", this.createTimeStamp(this.time));
  23398. } else {
  23399. this.$emit("change", this.time);
  23400. this.$emit("input", this.time);
  23401. this.$emit("update:modelValue", this.time);
  23402. }
  23403. },
  23404. /**
  23405. * 用户选择日期或时间更新 data
  23406. * @param {Object} e
  23407. */
  23408. bindDateChange(e) {
  23409. const val = e.detail.value;
  23410. this.year = this.years[val[0]];
  23411. this.month = this.months[val[1]];
  23412. this.day = this.days[val[2]];
  23413. },
  23414. bindTimeChange(e) {
  23415. const val = e.detail.value;
  23416. this.hour = this.hours[val[0]];
  23417. this.minute = this.minutes[val[1]];
  23418. this.second = this.seconds[val[2]];
  23419. },
  23420. /**
  23421. * 初始化弹出层
  23422. */
  23423. initTimePicker() {
  23424. if (this.disabled)
  23425. return;
  23426. const value2 = fixIosDateFormat(this.time);
  23427. this.initPickerValue(value2);
  23428. this.visible = !this.visible;
  23429. },
  23430. /**
  23431. * 触发或关闭弹框
  23432. */
  23433. tiggerTimePicker(e) {
  23434. this.visible = !this.visible;
  23435. },
  23436. /**
  23437. * 用户点击“清空”按钮,清空当前值
  23438. */
  23439. clearTime() {
  23440. this.time = "";
  23441. this.$emit("change", this.time);
  23442. this.$emit("input", this.time);
  23443. this.$emit("update:modelValue", this.time);
  23444. this.tiggerTimePicker();
  23445. },
  23446. /**
  23447. * 用户点击“确定”按钮
  23448. */
  23449. setTime() {
  23450. this.initTime();
  23451. this.tiggerTimePicker();
  23452. }
  23453. }
  23454. };
  23455. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  23456. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
  23457. vue.createElementVNode("view", {
  23458. onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
  23459. }, [
  23460. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  23461. vue.createElementVNode(
  23462. "view",
  23463. {
  23464. class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
  23465. },
  23466. [
  23467. vue.createElementVNode(
  23468. "text",
  23469. { class: "uni-datetime-picker-text" },
  23470. vue.toDisplayString($data.time),
  23471. 1
  23472. /* TEXT */
  23473. ),
  23474. !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
  23475. key: 0,
  23476. class: "uni-datetime-picker-time"
  23477. }, [
  23478. vue.createElementVNode(
  23479. "text",
  23480. { class: "uni-datetime-picker-text" },
  23481. vue.toDisplayString($options.selectTimeText),
  23482. 1
  23483. /* TEXT */
  23484. )
  23485. ])) : vue.createCommentVNode("v-if", true)
  23486. ],
  23487. 2
  23488. /* CLASS */
  23489. )
  23490. ], true)
  23491. ]),
  23492. $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  23493. key: 0,
  23494. id: "mask",
  23495. class: "uni-datetime-picker-mask",
  23496. onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  23497. })) : vue.createCommentVNode("v-if", true),
  23498. $data.visible ? (vue.openBlock(), vue.createElementBlock(
  23499. "view",
  23500. {
  23501. key: 1,
  23502. class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
  23503. style: vue.normalizeStyle($data.fixNvueBug)
  23504. },
  23505. [
  23506. vue.createElementVNode("view", { class: "uni-title" }, [
  23507. vue.createElementVNode(
  23508. "text",
  23509. { class: "uni-datetime-picker-text" },
  23510. vue.toDisplayString($options.selectTimeText),
  23511. 1
  23512. /* TEXT */
  23513. )
  23514. ]),
  23515. $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
  23516. key: 0,
  23517. class: "uni-datetime-picker__container-box"
  23518. }, [
  23519. vue.createElementVNode("picker-view", {
  23520. class: "uni-datetime-picker-view",
  23521. "indicator-style": $data.indicatorStyle,
  23522. value: $options.ymd,
  23523. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  23524. }, [
  23525. vue.createElementVNode("picker-view-column", null, [
  23526. (vue.openBlock(true), vue.createElementBlock(
  23527. vue.Fragment,
  23528. null,
  23529. vue.renderList($options.years, (item, index2) => {
  23530. return vue.openBlock(), vue.createElementBlock("view", {
  23531. class: "uni-datetime-picker-item",
  23532. key: index2
  23533. }, [
  23534. vue.createElementVNode(
  23535. "text",
  23536. { class: "uni-datetime-picker-item" },
  23537. vue.toDisplayString($options.lessThanTen(item)),
  23538. 1
  23539. /* TEXT */
  23540. )
  23541. ]);
  23542. }),
  23543. 128
  23544. /* KEYED_FRAGMENT */
  23545. ))
  23546. ]),
  23547. vue.createElementVNode("picker-view-column", null, [
  23548. (vue.openBlock(true), vue.createElementBlock(
  23549. vue.Fragment,
  23550. null,
  23551. vue.renderList($options.months, (item, index2) => {
  23552. return vue.openBlock(), vue.createElementBlock("view", {
  23553. class: "uni-datetime-picker-item",
  23554. key: index2
  23555. }, [
  23556. vue.createElementVNode(
  23557. "text",
  23558. { class: "uni-datetime-picker-item" },
  23559. vue.toDisplayString($options.lessThanTen(item)),
  23560. 1
  23561. /* TEXT */
  23562. )
  23563. ]);
  23564. }),
  23565. 128
  23566. /* KEYED_FRAGMENT */
  23567. ))
  23568. ]),
  23569. vue.createElementVNode("picker-view-column", null, [
  23570. (vue.openBlock(true), vue.createElementBlock(
  23571. vue.Fragment,
  23572. null,
  23573. vue.renderList($options.days, (item, index2) => {
  23574. return vue.openBlock(), vue.createElementBlock("view", {
  23575. class: "uni-datetime-picker-item",
  23576. key: index2
  23577. }, [
  23578. vue.createElementVNode(
  23579. "text",
  23580. { class: "uni-datetime-picker-item" },
  23581. vue.toDisplayString($options.lessThanTen(item)),
  23582. 1
  23583. /* TEXT */
  23584. )
  23585. ]);
  23586. }),
  23587. 128
  23588. /* KEYED_FRAGMENT */
  23589. ))
  23590. ])
  23591. ], 40, ["indicator-style", "value"]),
  23592. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  23593. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
  23594. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
  23595. ])) : vue.createCommentVNode("v-if", true),
  23596. $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
  23597. key: 1,
  23598. class: "uni-datetime-picker__container-box"
  23599. }, [
  23600. vue.createElementVNode("picker-view", {
  23601. class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
  23602. "indicator-style": $data.indicatorStyle,
  23603. value: $options.hms,
  23604. onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
  23605. }, [
  23606. vue.createElementVNode("picker-view-column", null, [
  23607. (vue.openBlock(true), vue.createElementBlock(
  23608. vue.Fragment,
  23609. null,
  23610. vue.renderList($options.hours, (item, index2) => {
  23611. return vue.openBlock(), vue.createElementBlock("view", {
  23612. class: "uni-datetime-picker-item",
  23613. key: index2
  23614. }, [
  23615. vue.createElementVNode(
  23616. "text",
  23617. { class: "uni-datetime-picker-item" },
  23618. vue.toDisplayString($options.lessThanTen(item)),
  23619. 1
  23620. /* TEXT */
  23621. )
  23622. ]);
  23623. }),
  23624. 128
  23625. /* KEYED_FRAGMENT */
  23626. ))
  23627. ]),
  23628. vue.createElementVNode("picker-view-column", null, [
  23629. (vue.openBlock(true), vue.createElementBlock(
  23630. vue.Fragment,
  23631. null,
  23632. vue.renderList($options.minutes, (item, index2) => {
  23633. return vue.openBlock(), vue.createElementBlock("view", {
  23634. class: "uni-datetime-picker-item",
  23635. key: index2
  23636. }, [
  23637. vue.createElementVNode(
  23638. "text",
  23639. { class: "uni-datetime-picker-item" },
  23640. vue.toDisplayString($options.lessThanTen(item)),
  23641. 1
  23642. /* TEXT */
  23643. )
  23644. ]);
  23645. }),
  23646. 128
  23647. /* KEYED_FRAGMENT */
  23648. ))
  23649. ]),
  23650. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
  23651. (vue.openBlock(true), vue.createElementBlock(
  23652. vue.Fragment,
  23653. null,
  23654. vue.renderList($options.seconds, (item, index2) => {
  23655. return vue.openBlock(), vue.createElementBlock("view", {
  23656. class: "uni-datetime-picker-item",
  23657. key: index2
  23658. }, [
  23659. vue.createElementVNode(
  23660. "text",
  23661. { class: "uni-datetime-picker-item" },
  23662. vue.toDisplayString($options.lessThanTen(item)),
  23663. 1
  23664. /* TEXT */
  23665. )
  23666. ]);
  23667. }),
  23668. 128
  23669. /* KEYED_FRAGMENT */
  23670. ))
  23671. ])) : vue.createCommentVNode("v-if", true)
  23672. ], 42, ["indicator-style", "value"]),
  23673. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  23674. vue.createElementVNode(
  23675. "text",
  23676. {
  23677. class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
  23678. },
  23679. ":",
  23680. 2
  23681. /* CLASS */
  23682. ),
  23683. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
  23684. key: 0,
  23685. class: "uni-datetime-picker-sign sign-right"
  23686. }, ":")) : vue.createCommentVNode("v-if", true)
  23687. ])) : vue.createCommentVNode("v-if", true),
  23688. vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
  23689. vue.createElementVNode("view", {
  23690. onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
  23691. }, [
  23692. vue.createElementVNode(
  23693. "text",
  23694. { class: "uni-datetime-picker-btn-text" },
  23695. vue.toDisplayString($options.clearText),
  23696. 1
  23697. /* TEXT */
  23698. )
  23699. ]),
  23700. vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
  23701. vue.createElementVNode("view", {
  23702. class: "uni-datetime-picker-cancel",
  23703. onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  23704. }, [
  23705. vue.createElementVNode(
  23706. "text",
  23707. { class: "uni-datetime-picker-btn-text" },
  23708. vue.toDisplayString($options.cancelText),
  23709. 1
  23710. /* TEXT */
  23711. )
  23712. ]),
  23713. vue.createElementVNode("view", {
  23714. onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
  23715. }, [
  23716. vue.createElementVNode(
  23717. "text",
  23718. { class: "uni-datetime-picker-btn-text" },
  23719. vue.toDisplayString($options.okText),
  23720. 1
  23721. /* TEXT */
  23722. )
  23723. ])
  23724. ])
  23725. ])
  23726. ],
  23727. 6
  23728. /* CLASS, STYLE */
  23729. )) : vue.createCommentVNode("v-if", true)
  23730. ]);
  23731. }
  23732. const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-1d532b70"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
  23733. const { t } = initVueI18n(i18nMessages);
  23734. const _sfc_main$S = {
  23735. components: {
  23736. calendarItem,
  23737. timePicker: TimePicker
  23738. },
  23739. props: {
  23740. date: {
  23741. type: String,
  23742. default: ""
  23743. },
  23744. defTime: {
  23745. type: [String, Object],
  23746. default: ""
  23747. },
  23748. selectableTimes: {
  23749. type: [Object],
  23750. default() {
  23751. return {};
  23752. }
  23753. },
  23754. selected: {
  23755. type: Array,
  23756. default() {
  23757. return [];
  23758. }
  23759. },
  23760. startDate: {
  23761. type: String,
  23762. default: ""
  23763. },
  23764. endDate: {
  23765. type: String,
  23766. default: ""
  23767. },
  23768. startPlaceholder: {
  23769. type: String,
  23770. default: ""
  23771. },
  23772. endPlaceholder: {
  23773. type: String,
  23774. default: ""
  23775. },
  23776. range: {
  23777. type: Boolean,
  23778. default: false
  23779. },
  23780. hasTime: {
  23781. type: Boolean,
  23782. default: false
  23783. },
  23784. insert: {
  23785. type: Boolean,
  23786. default: true
  23787. },
  23788. showMonth: {
  23789. type: Boolean,
  23790. default: true
  23791. },
  23792. clearDate: {
  23793. type: Boolean,
  23794. default: true
  23795. },
  23796. checkHover: {
  23797. type: Boolean,
  23798. default: true
  23799. },
  23800. hideSecond: {
  23801. type: [Boolean],
  23802. default: false
  23803. },
  23804. pleStatus: {
  23805. type: Object,
  23806. default() {
  23807. return {
  23808. before: "",
  23809. after: "",
  23810. data: [],
  23811. fulldate: ""
  23812. };
  23813. }
  23814. },
  23815. defaultValue: {
  23816. type: [String, Object, Array],
  23817. default: ""
  23818. }
  23819. },
  23820. data() {
  23821. return {
  23822. show: false,
  23823. weeks: [],
  23824. calendar: {},
  23825. nowDate: {},
  23826. aniMaskShow: false,
  23827. firstEnter: true,
  23828. time: "",
  23829. timeRange: {
  23830. startTime: "",
  23831. endTime: ""
  23832. },
  23833. tempSingleDate: "",
  23834. tempRange: {
  23835. before: "",
  23836. after: ""
  23837. }
  23838. };
  23839. },
  23840. watch: {
  23841. date: {
  23842. immediate: true,
  23843. handler(newVal) {
  23844. if (!this.range) {
  23845. this.tempSingleDate = newVal;
  23846. setTimeout(() => {
  23847. this.init(newVal);
  23848. }, 100);
  23849. }
  23850. }
  23851. },
  23852. defTime: {
  23853. immediate: true,
  23854. handler(newVal) {
  23855. if (!this.range) {
  23856. this.time = newVal;
  23857. } else {
  23858. this.timeRange.startTime = newVal.start;
  23859. this.timeRange.endTime = newVal.end;
  23860. }
  23861. }
  23862. },
  23863. startDate(val) {
  23864. if (!this.cale) {
  23865. return;
  23866. }
  23867. this.cale.setStartDate(val);
  23868. this.cale.setDate(this.nowDate.fullDate);
  23869. this.weeks = this.cale.weeks;
  23870. },
  23871. endDate(val) {
  23872. if (!this.cale) {
  23873. return;
  23874. }
  23875. this.cale.setEndDate(val);
  23876. this.cale.setDate(this.nowDate.fullDate);
  23877. this.weeks = this.cale.weeks;
  23878. },
  23879. selected(newVal) {
  23880. if (!this.cale) {
  23881. return;
  23882. }
  23883. this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
  23884. this.weeks = this.cale.weeks;
  23885. },
  23886. pleStatus: {
  23887. immediate: true,
  23888. handler(newVal) {
  23889. const {
  23890. before,
  23891. after,
  23892. fulldate,
  23893. which
  23894. } = newVal;
  23895. this.tempRange.before = before;
  23896. this.tempRange.after = after;
  23897. setTimeout(() => {
  23898. if (fulldate) {
  23899. this.cale.setHoverMultiple(fulldate);
  23900. if (before && after) {
  23901. this.cale.lastHover = true;
  23902. if (this.rangeWithinMonth(after, before))
  23903. return;
  23904. this.setDate(before);
  23905. } else {
  23906. this.cale.setMultiple(fulldate);
  23907. this.setDate(this.nowDate.fullDate);
  23908. this.calendar.fullDate = "";
  23909. this.cale.lastHover = false;
  23910. }
  23911. } else {
  23912. if (!this.cale) {
  23913. return;
  23914. }
  23915. this.cale.setDefaultMultiple(before, after);
  23916. if (which === "left" && before) {
  23917. this.setDate(before);
  23918. this.weeks = this.cale.weeks;
  23919. } else if (after) {
  23920. this.setDate(after);
  23921. this.weeks = this.cale.weeks;
  23922. }
  23923. this.cale.lastHover = true;
  23924. }
  23925. }, 16);
  23926. }
  23927. }
  23928. },
  23929. computed: {
  23930. timepickerStartTime() {
  23931. const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
  23932. return activeDate === this.startDate ? this.selectableTimes.start : "";
  23933. },
  23934. timepickerEndTime() {
  23935. const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
  23936. return activeDate === this.endDate ? this.selectableTimes.end : "";
  23937. },
  23938. /**
  23939. * for i18n
  23940. */
  23941. selectDateText() {
  23942. return t("uni-datetime-picker.selectDate");
  23943. },
  23944. startDateText() {
  23945. return this.startPlaceholder || t("uni-datetime-picker.startDate");
  23946. },
  23947. endDateText() {
  23948. return this.endPlaceholder || t("uni-datetime-picker.endDate");
  23949. },
  23950. okText() {
  23951. return t("uni-datetime-picker.ok");
  23952. },
  23953. yearText() {
  23954. return t("uni-datetime-picker.year");
  23955. },
  23956. monthText() {
  23957. return t("uni-datetime-picker.month");
  23958. },
  23959. MONText() {
  23960. return t("uni-calender.MON");
  23961. },
  23962. TUEText() {
  23963. return t("uni-calender.TUE");
  23964. },
  23965. WEDText() {
  23966. return t("uni-calender.WED");
  23967. },
  23968. THUText() {
  23969. return t("uni-calender.THU");
  23970. },
  23971. FRIText() {
  23972. return t("uni-calender.FRI");
  23973. },
  23974. SATText() {
  23975. return t("uni-calender.SAT");
  23976. },
  23977. SUNText() {
  23978. return t("uni-calender.SUN");
  23979. },
  23980. confirmText() {
  23981. return t("uni-calender.confirm");
  23982. }
  23983. },
  23984. created() {
  23985. this.cale = new Calendar$1({
  23986. selected: this.selected,
  23987. startDate: this.startDate,
  23988. endDate: this.endDate,
  23989. range: this.range
  23990. });
  23991. this.init(this.date);
  23992. },
  23993. methods: {
  23994. leaveCale() {
  23995. this.firstEnter = true;
  23996. },
  23997. handleMouse(weeks) {
  23998. if (weeks.disable)
  23999. return;
  24000. if (this.cale.lastHover)
  24001. return;
  24002. let {
  24003. before,
  24004. after
  24005. } = this.cale.multipleStatus;
  24006. if (!before)
  24007. return;
  24008. this.calendar = weeks;
  24009. this.cale.setHoverMultiple(this.calendar.fullDate);
  24010. this.weeks = this.cale.weeks;
  24011. if (this.firstEnter) {
  24012. this.$emit("firstEnterCale", this.cale.multipleStatus);
  24013. this.firstEnter = false;
  24014. }
  24015. },
  24016. rangeWithinMonth(A, B) {
  24017. const [yearA, monthA] = A.split("-");
  24018. const [yearB, monthB] = B.split("-");
  24019. return yearA === yearB && monthA === monthB;
  24020. },
  24021. // 蒙版点击事件
  24022. maskClick() {
  24023. this.close();
  24024. this.$emit("maskClose");
  24025. },
  24026. clearCalender() {
  24027. if (this.range) {
  24028. this.timeRange.startTime = "";
  24029. this.timeRange.endTime = "";
  24030. this.tempRange.before = "";
  24031. this.tempRange.after = "";
  24032. this.cale.multipleStatus.before = "";
  24033. this.cale.multipleStatus.after = "";
  24034. this.cale.multipleStatus.data = [];
  24035. this.cale.lastHover = false;
  24036. } else {
  24037. this.time = "";
  24038. this.tempSingleDate = "";
  24039. }
  24040. this.calendar.fullDate = "";
  24041. this.setDate(/* @__PURE__ */ new Date());
  24042. },
  24043. bindDateChange(e) {
  24044. const value2 = e.detail.value + "-1";
  24045. this.setDate(value2);
  24046. },
  24047. /**
  24048. * 初始化日期显示
  24049. * @param {Object} date
  24050. */
  24051. init(date3) {
  24052. if (!this.cale) {
  24053. return;
  24054. }
  24055. this.cale.setDate(date3 || /* @__PURE__ */ new Date());
  24056. this.weeks = this.cale.weeks;
  24057. this.nowDate = this.cale.getInfo(date3);
  24058. this.calendar = { ...this.nowDate };
  24059. if (!date3) {
  24060. this.calendar.fullDate = "";
  24061. if (this.defaultValue && !this.range) {
  24062. const defaultDate = new Date(this.defaultValue);
  24063. const fullDate = getDate(defaultDate);
  24064. const year = defaultDate.getFullYear();
  24065. const month = defaultDate.getMonth() + 1;
  24066. const date4 = defaultDate.getDate();
  24067. const day = defaultDate.getDay();
  24068. this.calendar = {
  24069. fullDate,
  24070. year,
  24071. month,
  24072. date: date4,
  24073. day
  24074. }, this.tempSingleDate = fullDate;
  24075. this.time = getTime(defaultDate, this.hideSecond);
  24076. }
  24077. }
  24078. },
  24079. /**
  24080. * 打开日历弹窗
  24081. */
  24082. open() {
  24083. if (this.clearDate && !this.insert) {
  24084. this.cale.cleanMultipleStatus();
  24085. this.init(this.date);
  24086. }
  24087. this.show = true;
  24088. this.$nextTick(() => {
  24089. setTimeout(() => {
  24090. this.aniMaskShow = true;
  24091. }, 50);
  24092. });
  24093. },
  24094. /**
  24095. * 关闭日历弹窗
  24096. */
  24097. close() {
  24098. this.aniMaskShow = false;
  24099. this.$nextTick(() => {
  24100. setTimeout(() => {
  24101. this.show = false;
  24102. this.$emit("close");
  24103. }, 300);
  24104. });
  24105. },
  24106. /**
  24107. * 确认按钮
  24108. */
  24109. confirm() {
  24110. this.setEmit("confirm");
  24111. this.close();
  24112. },
  24113. /**
  24114. * 变化触发
  24115. */
  24116. change() {
  24117. if (!this.insert)
  24118. return;
  24119. this.setEmit("change");
  24120. },
  24121. /**
  24122. * 选择月份触发
  24123. */
  24124. monthSwitch() {
  24125. let {
  24126. year,
  24127. month
  24128. } = this.nowDate;
  24129. this.$emit("monthSwitch", {
  24130. year,
  24131. month: Number(month)
  24132. });
  24133. },
  24134. /**
  24135. * 派发事件
  24136. * @param {Object} name
  24137. */
  24138. setEmit(name) {
  24139. if (!this.range) {
  24140. if (!this.calendar.fullDate) {
  24141. this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
  24142. this.tempSingleDate = this.calendar.fullDate;
  24143. }
  24144. if (this.hasTime && !this.time) {
  24145. this.time = getTime(/* @__PURE__ */ new Date(), this.hideSecond);
  24146. }
  24147. }
  24148. let {
  24149. year,
  24150. month,
  24151. date: date3,
  24152. fullDate,
  24153. extraInfo
  24154. } = this.calendar;
  24155. this.$emit(name, {
  24156. range: this.cale.multipleStatus,
  24157. year,
  24158. month,
  24159. date: date3,
  24160. time: this.time,
  24161. timeRange: this.timeRange,
  24162. fulldate: fullDate,
  24163. extraInfo: extraInfo || {}
  24164. });
  24165. },
  24166. /**
  24167. * 选择天触发
  24168. * @param {Object} weeks
  24169. */
  24170. choiceDate(weeks) {
  24171. if (weeks.disable)
  24172. return;
  24173. this.calendar = weeks;
  24174. this.calendar.userChecked = true;
  24175. this.cale.setMultiple(this.calendar.fullDate, true);
  24176. this.weeks = this.cale.weeks;
  24177. this.tempSingleDate = this.calendar.fullDate;
  24178. const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
  24179. const afterDate = new Date(this.cale.multipleStatus.after).getTime();
  24180. if (beforeDate > afterDate && afterDate) {
  24181. this.tempRange.before = this.cale.multipleStatus.after;
  24182. this.tempRange.after = this.cale.multipleStatus.before;
  24183. } else {
  24184. this.tempRange.before = this.cale.multipleStatus.before;
  24185. this.tempRange.after = this.cale.multipleStatus.after;
  24186. }
  24187. this.change();
  24188. },
  24189. changeMonth(type2) {
  24190. let newDate;
  24191. if (type2 === "pre") {
  24192. newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
  24193. } else if (type2 === "next") {
  24194. newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
  24195. }
  24196. this.setDate(newDate);
  24197. this.monthSwitch();
  24198. },
  24199. /**
  24200. * 设置日期
  24201. * @param {Object} date
  24202. */
  24203. setDate(date3) {
  24204. this.cale.setDate(date3);
  24205. this.weeks = this.cale.weeks;
  24206. this.nowDate = this.cale.getInfo(date3);
  24207. }
  24208. }
  24209. };
  24210. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  24211. const _component_calendar_item = vue.resolveComponent("calendar-item");
  24212. const _component_time_picker = vue.resolveComponent("time-picker");
  24213. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  24214. return vue.openBlock(), vue.createElementBlock(
  24215. "view",
  24216. {
  24217. class: "uni-calendar",
  24218. onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
  24219. },
  24220. [
  24221. !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
  24222. "view",
  24223. {
  24224. key: 0,
  24225. class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
  24226. onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args))
  24227. },
  24228. null,
  24229. 2
  24230. /* CLASS */
  24231. )) : vue.createCommentVNode("v-if", true),
  24232. $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
  24233. "view",
  24234. {
  24235. key: 1,
  24236. class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
  24237. },
  24238. [
  24239. vue.createElementVNode(
  24240. "view",
  24241. {
  24242. class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
  24243. },
  24244. [
  24245. vue.createElementVNode("view", {
  24246. class: "uni-calendar__header-btn-box",
  24247. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"]))
  24248. }, [
  24249. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
  24250. ]),
  24251. vue.createElementVNode("picker", {
  24252. mode: "date",
  24253. value: $props.date,
  24254. fields: "month",
  24255. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  24256. }, [
  24257. vue.createElementVNode(
  24258. "text",
  24259. { class: "uni-calendar__header-text" },
  24260. vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
  24261. 1
  24262. /* TEXT */
  24263. )
  24264. ], 40, ["value"]),
  24265. vue.createElementVNode("view", {
  24266. class: "uni-calendar__header-btn-box",
  24267. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"]))
  24268. }, [
  24269. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
  24270. ]),
  24271. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  24272. key: 0,
  24273. class: "dialog-close",
  24274. onClick: _cache[4] || (_cache[4] = (...args) => $options.close && $options.close(...args))
  24275. }, [
  24276. vue.createElementVNode("view", {
  24277. class: "dialog-close-plus",
  24278. "data-id": "close"
  24279. }),
  24280. vue.createElementVNode("view", {
  24281. class: "dialog-close-plus dialog-close-rotate",
  24282. "data-id": "close"
  24283. })
  24284. ])) : vue.createCommentVNode("v-if", true)
  24285. ],
  24286. 2
  24287. /* CLASS */
  24288. ),
  24289. vue.createElementVNode("view", { class: "uni-calendar__box" }, [
  24290. $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
  24291. key: 0,
  24292. class: "uni-calendar__box-bg"
  24293. }, [
  24294. vue.createElementVNode(
  24295. "text",
  24296. { class: "uni-calendar__box-bg-text" },
  24297. vue.toDisplayString($data.nowDate.month),
  24298. 1
  24299. /* TEXT */
  24300. )
  24301. ])) : vue.createCommentVNode("v-if", true),
  24302. vue.createElementVNode("view", {
  24303. class: "uni-calendar__weeks",
  24304. style: { "padding-bottom": "7px" }
  24305. }, [
  24306. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24307. vue.createElementVNode(
  24308. "text",
  24309. { class: "uni-calendar__weeks-day-text" },
  24310. vue.toDisplayString($options.SUNText),
  24311. 1
  24312. /* TEXT */
  24313. )
  24314. ]),
  24315. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24316. vue.createElementVNode(
  24317. "text",
  24318. { class: "uni-calendar__weeks-day-text" },
  24319. vue.toDisplayString($options.MONText),
  24320. 1
  24321. /* TEXT */
  24322. )
  24323. ]),
  24324. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24325. vue.createElementVNode(
  24326. "text",
  24327. { class: "uni-calendar__weeks-day-text" },
  24328. vue.toDisplayString($options.TUEText),
  24329. 1
  24330. /* TEXT */
  24331. )
  24332. ]),
  24333. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24334. vue.createElementVNode(
  24335. "text",
  24336. { class: "uni-calendar__weeks-day-text" },
  24337. vue.toDisplayString($options.WEDText),
  24338. 1
  24339. /* TEXT */
  24340. )
  24341. ]),
  24342. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24343. vue.createElementVNode(
  24344. "text",
  24345. { class: "uni-calendar__weeks-day-text" },
  24346. vue.toDisplayString($options.THUText),
  24347. 1
  24348. /* TEXT */
  24349. )
  24350. ]),
  24351. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24352. vue.createElementVNode(
  24353. "text",
  24354. { class: "uni-calendar__weeks-day-text" },
  24355. vue.toDisplayString($options.FRIText),
  24356. 1
  24357. /* TEXT */
  24358. )
  24359. ]),
  24360. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24361. vue.createElementVNode(
  24362. "text",
  24363. { class: "uni-calendar__weeks-day-text" },
  24364. vue.toDisplayString($options.SATText),
  24365. 1
  24366. /* TEXT */
  24367. )
  24368. ])
  24369. ]),
  24370. (vue.openBlock(true), vue.createElementBlock(
  24371. vue.Fragment,
  24372. null,
  24373. vue.renderList($data.weeks, (item, weekIndex) => {
  24374. return vue.openBlock(), vue.createElementBlock("view", {
  24375. class: "uni-calendar__weeks",
  24376. key: weekIndex
  24377. }, [
  24378. (vue.openBlock(true), vue.createElementBlock(
  24379. vue.Fragment,
  24380. null,
  24381. vue.renderList(item, (weeks, weeksIndex) => {
  24382. return vue.openBlock(), vue.createElementBlock("view", {
  24383. class: "uni-calendar__weeks-item",
  24384. key: weeksIndex
  24385. }, [
  24386. vue.createVNode(_component_calendar_item, {
  24387. class: "uni-calendar-item--hook",
  24388. weeks,
  24389. calendar: $data.calendar,
  24390. selected: $props.selected,
  24391. checkHover: $props.range,
  24392. onChange: $options.choiceDate,
  24393. onHandleMouse: $options.handleMouse
  24394. }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"])
  24395. ]);
  24396. }),
  24397. 128
  24398. /* KEYED_FRAGMENT */
  24399. ))
  24400. ]);
  24401. }),
  24402. 128
  24403. /* KEYED_FRAGMENT */
  24404. ))
  24405. ]),
  24406. !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24407. key: 0,
  24408. class: "uni-date-changed uni-calendar--fixed-top",
  24409. style: { "padding": "0 80px" }
  24410. }, [
  24411. vue.createElementVNode(
  24412. "view",
  24413. { class: "uni-date-changed--time-date" },
  24414. vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
  24415. 1
  24416. /* TEXT */
  24417. ),
  24418. vue.createVNode(_component_time_picker, {
  24419. type: "time",
  24420. start: $options.timepickerStartTime,
  24421. end: $options.timepickerEndTime,
  24422. modelValue: $data.time,
  24423. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
  24424. disabled: !$data.tempSingleDate,
  24425. border: false,
  24426. "hide-second": $props.hideSecond,
  24427. class: "time-picker-style"
  24428. }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
  24429. ])) : vue.createCommentVNode("v-if", true),
  24430. !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24431. key: 1,
  24432. class: "uni-date-changed uni-calendar--fixed-top"
  24433. }, [
  24434. vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
  24435. vue.createElementVNode(
  24436. "view",
  24437. { class: "uni-date-changed--time-date" },
  24438. vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
  24439. 1
  24440. /* TEXT */
  24441. ),
  24442. vue.createVNode(_component_time_picker, {
  24443. type: "time",
  24444. start: $options.timepickerStartTime,
  24445. modelValue: $data.timeRange.startTime,
  24446. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
  24447. border: false,
  24448. "hide-second": $props.hideSecond,
  24449. disabled: !$data.tempRange.before,
  24450. class: "time-picker-style"
  24451. }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
  24452. ]),
  24453. vue.createElementVNode("view", { style: { "line-height": "50px" } }, [
  24454. vue.createVNode(_component_uni_icons, {
  24455. type: "arrowthinright",
  24456. color: "#999"
  24457. })
  24458. ]),
  24459. vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
  24460. vue.createElementVNode(
  24461. "view",
  24462. { class: "uni-date-changed--time-date" },
  24463. vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
  24464. 1
  24465. /* TEXT */
  24466. ),
  24467. vue.createVNode(_component_time_picker, {
  24468. type: "time",
  24469. end: $options.timepickerEndTime,
  24470. modelValue: $data.timeRange.endTime,
  24471. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
  24472. border: false,
  24473. "hide-second": $props.hideSecond,
  24474. disabled: !$data.tempRange.after,
  24475. class: "time-picker-style"
  24476. }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
  24477. ])
  24478. ])) : vue.createCommentVNode("v-if", true),
  24479. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  24480. key: 2,
  24481. class: "uni-date-changed uni-date-btn--ok"
  24482. }, [
  24483. vue.createElementVNode(
  24484. "view",
  24485. {
  24486. class: "uni-datetime-picker--btn",
  24487. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
  24488. },
  24489. vue.toDisplayString($options.confirmText),
  24490. 1
  24491. /* TEXT */
  24492. )
  24493. ])) : vue.createCommentVNode("v-if", true)
  24494. ],
  24495. 2
  24496. /* CLASS */
  24497. )) : vue.createCommentVNode("v-if", true)
  24498. ],
  24499. 32
  24500. /* NEED_HYDRATION */
  24501. );
  24502. }
  24503. const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-1d379219"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
  24504. const _sfc_main$R = {
  24505. name: "UniDatetimePicker",
  24506. options: {
  24507. virtualHost: true
  24508. },
  24509. components: {
  24510. Calendar,
  24511. TimePicker
  24512. },
  24513. data() {
  24514. return {
  24515. isRange: false,
  24516. hasTime: false,
  24517. displayValue: "",
  24518. inputDate: "",
  24519. calendarDate: "",
  24520. pickerTime: "",
  24521. calendarRange: {
  24522. startDate: "",
  24523. startTime: "",
  24524. endDate: "",
  24525. endTime: ""
  24526. },
  24527. displayRangeValue: {
  24528. startDate: "",
  24529. endDate: ""
  24530. },
  24531. tempRange: {
  24532. startDate: "",
  24533. startTime: "",
  24534. endDate: "",
  24535. endTime: ""
  24536. },
  24537. // 左右日历同步数据
  24538. startMultipleStatus: {
  24539. before: "",
  24540. after: "",
  24541. data: [],
  24542. fulldate: ""
  24543. },
  24544. endMultipleStatus: {
  24545. before: "",
  24546. after: "",
  24547. data: [],
  24548. fulldate: ""
  24549. },
  24550. pickerVisible: false,
  24551. pickerPositionStyle: null,
  24552. isEmitValue: false,
  24553. isPhone: false,
  24554. isFirstShow: true,
  24555. i18nT: () => {
  24556. }
  24557. };
  24558. },
  24559. props: {
  24560. type: {
  24561. type: String,
  24562. default: "datetime"
  24563. },
  24564. value: {
  24565. type: [String, Number, Array, Date],
  24566. default: ""
  24567. },
  24568. modelValue: {
  24569. type: [String, Number, Array, Date],
  24570. default: ""
  24571. },
  24572. start: {
  24573. type: [Number, String],
  24574. default: ""
  24575. },
  24576. end: {
  24577. type: [Number, String],
  24578. default: ""
  24579. },
  24580. returnType: {
  24581. type: String,
  24582. default: "string"
  24583. },
  24584. placeholder: {
  24585. type: String,
  24586. default: ""
  24587. },
  24588. startPlaceholder: {
  24589. type: String,
  24590. default: ""
  24591. },
  24592. endPlaceholder: {
  24593. type: String,
  24594. default: ""
  24595. },
  24596. rangeSeparator: {
  24597. type: String,
  24598. default: "-"
  24599. },
  24600. border: {
  24601. type: [Boolean],
  24602. default: true
  24603. },
  24604. disabled: {
  24605. type: [Boolean],
  24606. default: false
  24607. },
  24608. clearIcon: {
  24609. type: [Boolean],
  24610. default: true
  24611. },
  24612. hideSecond: {
  24613. type: [Boolean],
  24614. default: false
  24615. },
  24616. defaultValue: {
  24617. type: [String, Object, Array],
  24618. default: ""
  24619. }
  24620. },
  24621. watch: {
  24622. type: {
  24623. immediate: true,
  24624. handler(newVal) {
  24625. this.hasTime = newVal.indexOf("time") !== -1;
  24626. this.isRange = newVal.indexOf("range") !== -1;
  24627. }
  24628. },
  24629. modelValue: {
  24630. immediate: true,
  24631. handler(newVal) {
  24632. if (this.isEmitValue) {
  24633. this.isEmitValue = false;
  24634. return;
  24635. }
  24636. this.initPicker(newVal);
  24637. }
  24638. },
  24639. start: {
  24640. immediate: true,
  24641. handler(newVal) {
  24642. if (!newVal)
  24643. return;
  24644. this.calendarRange.startDate = getDate(newVal);
  24645. if (this.hasTime) {
  24646. this.calendarRange.startTime = getTime(newVal);
  24647. }
  24648. }
  24649. },
  24650. end: {
  24651. immediate: true,
  24652. handler(newVal) {
  24653. if (!newVal)
  24654. return;
  24655. this.calendarRange.endDate = getDate(newVal);
  24656. if (this.hasTime) {
  24657. this.calendarRange.endTime = getTime(newVal, this.hideSecond);
  24658. }
  24659. }
  24660. }
  24661. },
  24662. computed: {
  24663. timepickerStartTime() {
  24664. const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
  24665. return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
  24666. },
  24667. timepickerEndTime() {
  24668. const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
  24669. return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
  24670. },
  24671. mobileCalendarTime() {
  24672. const timeRange = {
  24673. start: this.tempRange.startTime,
  24674. end: this.tempRange.endTime
  24675. };
  24676. return this.isRange ? timeRange : this.pickerTime;
  24677. },
  24678. mobSelectableTime() {
  24679. return {
  24680. start: this.calendarRange.startTime,
  24681. end: this.calendarRange.endTime
  24682. };
  24683. },
  24684. datePopupWidth() {
  24685. return this.isRange ? 653 : 301;
  24686. },
  24687. /**
  24688. * for i18n
  24689. */
  24690. singlePlaceholderText() {
  24691. return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
  24692. },
  24693. startPlaceholderText() {
  24694. return this.startPlaceholder || this.startDateText;
  24695. },
  24696. endPlaceholderText() {
  24697. return this.endPlaceholder || this.endDateText;
  24698. },
  24699. selectDateText() {
  24700. return this.i18nT("uni-datetime-picker.selectDate");
  24701. },
  24702. selectDateTimeText() {
  24703. return this.i18nT("uni-datetime-picker.selectDateTime");
  24704. },
  24705. selectTimeText() {
  24706. return this.i18nT("uni-datetime-picker.selectTime");
  24707. },
  24708. startDateText() {
  24709. return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
  24710. },
  24711. startTimeText() {
  24712. return this.i18nT("uni-datetime-picker.startTime");
  24713. },
  24714. endDateText() {
  24715. return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
  24716. },
  24717. endTimeText() {
  24718. return this.i18nT("uni-datetime-picker.endTime");
  24719. },
  24720. okText() {
  24721. return this.i18nT("uni-datetime-picker.ok");
  24722. },
  24723. clearText() {
  24724. return this.i18nT("uni-datetime-picker.clear");
  24725. },
  24726. showClearIcon() {
  24727. return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
  24728. }
  24729. },
  24730. created() {
  24731. this.initI18nT();
  24732. this.platform();
  24733. },
  24734. methods: {
  24735. initI18nT() {
  24736. const vueI18n = initVueI18n(i18nMessages);
  24737. this.i18nT = vueI18n.t;
  24738. },
  24739. initPicker(newVal) {
  24740. if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
  24741. this.$nextTick(() => {
  24742. this.clear(false);
  24743. });
  24744. return;
  24745. }
  24746. if (!Array.isArray(newVal) && !this.isRange) {
  24747. if (newVal) {
  24748. this.displayValue = this.inputDate = this.calendarDate = getDate(newVal);
  24749. if (this.hasTime) {
  24750. this.pickerTime = getTime(newVal, this.hideSecond);
  24751. this.displayValue = `${this.displayValue} ${this.pickerTime}`;
  24752. }
  24753. } else if (this.defaultValue) {
  24754. this.inputDate = this.calendarDate = getDate(this.defaultValue);
  24755. if (this.hasTime) {
  24756. this.pickerTime = getTime(this.defaultValue, this.hideSecond);
  24757. }
  24758. }
  24759. } else {
  24760. const [before, after] = newVal;
  24761. if (!before && !after)
  24762. return;
  24763. const beforeDate = getDate(before);
  24764. const beforeTime = getTime(before, this.hideSecond);
  24765. const afterDate = getDate(after);
  24766. const afterTime = getTime(after, this.hideSecond);
  24767. const startDate = beforeDate;
  24768. const endDate = afterDate;
  24769. this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
  24770. this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
  24771. if (this.hasTime) {
  24772. this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
  24773. this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
  24774. this.tempRange.startTime = beforeTime;
  24775. this.tempRange.endTime = afterTime;
  24776. }
  24777. const defaultRange = {
  24778. before: beforeDate,
  24779. after: afterDate
  24780. };
  24781. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
  24782. which: "right"
  24783. });
  24784. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
  24785. which: "left"
  24786. });
  24787. }
  24788. },
  24789. updateLeftCale(e) {
  24790. const left = this.$refs.left;
  24791. left.cale.setHoverMultiple(e.after);
  24792. left.setDate(this.$refs.left.nowDate.fullDate);
  24793. },
  24794. updateRightCale(e) {
  24795. const right = this.$refs.right;
  24796. right.cale.setHoverMultiple(e.after);
  24797. right.setDate(this.$refs.right.nowDate.fullDate);
  24798. },
  24799. platform() {
  24800. if (typeof navigator !== "undefined") {
  24801. this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1;
  24802. return;
  24803. }
  24804. const { windowWidth } = uni.getSystemInfoSync();
  24805. this.isPhone = windowWidth <= 500;
  24806. this.windowWidth = windowWidth;
  24807. },
  24808. show() {
  24809. if (this.disabled) {
  24810. return;
  24811. }
  24812. this.platform();
  24813. if (this.isPhone) {
  24814. setTimeout(() => {
  24815. this.$refs.mobile.open();
  24816. }, 0);
  24817. return;
  24818. }
  24819. this.pickerPositionStyle = {
  24820. top: "10px"
  24821. };
  24822. const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
  24823. dateEditor.boundingClientRect((rect) => {
  24824. if (this.windowWidth - rect.left < this.datePopupWidth) {
  24825. this.pickerPositionStyle.right = 0;
  24826. }
  24827. }).exec();
  24828. setTimeout(() => {
  24829. this.pickerVisible = !this.pickerVisible;
  24830. if (!this.isPhone && this.isRange && this.isFirstShow) {
  24831. this.isFirstShow = false;
  24832. const {
  24833. startDate,
  24834. endDate
  24835. } = this.calendarRange;
  24836. if (startDate && endDate) {
  24837. if (this.diffDate(startDate, endDate) < 30) {
  24838. this.$refs.right.changeMonth("pre");
  24839. }
  24840. } else {
  24841. this.$refs.right.changeMonth("next");
  24842. this.$refs.right.cale.lastHover = false;
  24843. }
  24844. }
  24845. }, 50);
  24846. },
  24847. close() {
  24848. setTimeout(() => {
  24849. this.pickerVisible = false;
  24850. this.$emit("maskClick", this.value);
  24851. this.$refs.mobile && this.$refs.mobile.close();
  24852. }, 20);
  24853. },
  24854. setEmit(value2) {
  24855. if (this.returnType === "timestamp" || this.returnType === "date") {
  24856. if (!Array.isArray(value2)) {
  24857. if (!this.hasTime) {
  24858. value2 = value2 + " 00:00:00";
  24859. }
  24860. value2 = this.createTimestamp(value2);
  24861. if (this.returnType === "date") {
  24862. value2 = new Date(value2);
  24863. }
  24864. } else {
  24865. if (!this.hasTime) {
  24866. value2[0] = value2[0] + " 00:00:00";
  24867. value2[1] = value2[1] + " 00:00:00";
  24868. }
  24869. value2[0] = this.createTimestamp(value2[0]);
  24870. value2[1] = this.createTimestamp(value2[1]);
  24871. if (this.returnType === "date") {
  24872. value2[0] = new Date(value2[0]);
  24873. value2[1] = new Date(value2[1]);
  24874. }
  24875. }
  24876. }
  24877. this.$emit("update:modelValue", value2);
  24878. this.$emit("input", value2);
  24879. this.$emit("change", value2);
  24880. this.isEmitValue = true;
  24881. },
  24882. createTimestamp(date3) {
  24883. date3 = fixIosDateFormat(date3);
  24884. return Date.parse(new Date(date3));
  24885. },
  24886. singleChange(e) {
  24887. this.calendarDate = this.inputDate = e.fulldate;
  24888. if (this.hasTime)
  24889. return;
  24890. this.confirmSingleChange();
  24891. },
  24892. confirmSingleChange() {
  24893. if (!checkDate(this.inputDate)) {
  24894. const now2 = /* @__PURE__ */ new Date();
  24895. this.calendarDate = this.inputDate = getDate(now2);
  24896. this.pickerTime = getTime(now2, this.hideSecond);
  24897. }
  24898. let startLaterInputDate = false;
  24899. let startDate, startTime;
  24900. if (this.start) {
  24901. let startString = this.start;
  24902. if (typeof this.start === "number") {
  24903. startString = getDateTime(this.start, this.hideSecond);
  24904. }
  24905. [startDate, startTime] = startString.split(" ");
  24906. if (this.start && !dateCompare(startDate, this.inputDate)) {
  24907. startLaterInputDate = true;
  24908. this.inputDate = startDate;
  24909. }
  24910. }
  24911. let endEarlierInputDate = false;
  24912. let endDate, endTime;
  24913. if (this.end) {
  24914. let endString = this.end;
  24915. if (typeof this.end === "number") {
  24916. endString = getDateTime(this.end, this.hideSecond);
  24917. }
  24918. [endDate, endTime] = endString.split(" ");
  24919. if (this.end && !dateCompare(this.inputDate, endDate)) {
  24920. endEarlierInputDate = true;
  24921. this.inputDate = endDate;
  24922. }
  24923. }
  24924. if (this.hasTime) {
  24925. if (startLaterInputDate) {
  24926. this.pickerTime = startTime || getDefaultSecond(this.hideSecond);
  24927. }
  24928. if (endEarlierInputDate) {
  24929. this.pickerTime = endTime || getDefaultSecond(this.hideSecond);
  24930. }
  24931. if (!this.pickerTime) {
  24932. this.pickerTime = getTime(Date.now(), this.hideSecond);
  24933. }
  24934. this.displayValue = `${this.inputDate} ${this.pickerTime}`;
  24935. } else {
  24936. this.displayValue = this.inputDate;
  24937. }
  24938. this.setEmit(this.displayValue);
  24939. this.pickerVisible = false;
  24940. },
  24941. leftChange(e) {
  24942. const {
  24943. before,
  24944. after
  24945. } = e.range;
  24946. this.rangeChange(before, after);
  24947. const obj = {
  24948. before: e.range.before,
  24949. after: e.range.after,
  24950. data: e.range.data,
  24951. fulldate: e.fulldate
  24952. };
  24953. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
  24954. },
  24955. rightChange(e) {
  24956. const {
  24957. before,
  24958. after
  24959. } = e.range;
  24960. this.rangeChange(before, after);
  24961. const obj = {
  24962. before: e.range.before,
  24963. after: e.range.after,
  24964. data: e.range.data,
  24965. fulldate: e.fulldate
  24966. };
  24967. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
  24968. },
  24969. mobileChange(e) {
  24970. if (this.isRange) {
  24971. const { before, after } = e.range;
  24972. if (!before || !after) {
  24973. return;
  24974. }
  24975. this.handleStartAndEnd(before, after, true);
  24976. if (this.hasTime) {
  24977. const {
  24978. startTime,
  24979. endTime
  24980. } = e.timeRange;
  24981. this.tempRange.startTime = startTime;
  24982. this.tempRange.endTime = endTime;
  24983. }
  24984. this.confirmRangeChange();
  24985. } else {
  24986. if (this.hasTime) {
  24987. this.displayValue = e.fulldate + " " + e.time;
  24988. } else {
  24989. this.displayValue = e.fulldate;
  24990. }
  24991. this.setEmit(this.displayValue);
  24992. }
  24993. this.$refs.mobile.close();
  24994. },
  24995. rangeChange(before, after) {
  24996. if (!(before && after))
  24997. return;
  24998. this.handleStartAndEnd(before, after, true);
  24999. if (this.hasTime)
  25000. return;
  25001. this.confirmRangeChange();
  25002. },
  25003. confirmRangeChange() {
  25004. if (!this.tempRange.startDate || !this.tempRange.endDate) {
  25005. this.pickerVisible = false;
  25006. return;
  25007. }
  25008. if (!checkDate(this.tempRange.startDate)) {
  25009. this.tempRange.startDate = getDate(Date.now());
  25010. }
  25011. if (!checkDate(this.tempRange.endDate)) {
  25012. this.tempRange.endDate = getDate(Date.now());
  25013. }
  25014. let start, end;
  25015. let startDateLaterRangeStartDate = false;
  25016. let startDateLaterRangeEndDate = false;
  25017. let startDate, startTime;
  25018. if (this.start) {
  25019. let startString = this.start;
  25020. if (typeof this.start === "number") {
  25021. startString = getDateTime(this.start, this.hideSecond);
  25022. }
  25023. [startDate, startTime] = startString.split(" ");
  25024. if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
  25025. startDateLaterRangeStartDate = true;
  25026. this.tempRange.startDate = startDate;
  25027. }
  25028. if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
  25029. startDateLaterRangeEndDate = true;
  25030. this.tempRange.endDate = startDate;
  25031. }
  25032. }
  25033. let endDateEarlierRangeStartDate = false;
  25034. let endDateEarlierRangeEndDate = false;
  25035. let endDate, endTime;
  25036. if (this.end) {
  25037. let endString = this.end;
  25038. if (typeof this.end === "number") {
  25039. endString = getDateTime(this.end, this.hideSecond);
  25040. }
  25041. [endDate, endTime] = endString.split(" ");
  25042. if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
  25043. endDateEarlierRangeStartDate = true;
  25044. this.tempRange.startDate = endDate;
  25045. }
  25046. if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
  25047. endDateEarlierRangeEndDate = true;
  25048. this.tempRange.endDate = endDate;
  25049. }
  25050. }
  25051. if (!this.hasTime) {
  25052. start = this.displayRangeValue.startDate = this.tempRange.startDate;
  25053. end = this.displayRangeValue.endDate = this.tempRange.endDate;
  25054. } else {
  25055. if (startDateLaterRangeStartDate) {
  25056. this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond);
  25057. } else if (endDateEarlierRangeStartDate) {
  25058. this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond);
  25059. }
  25060. if (!this.tempRange.startTime) {
  25061. this.tempRange.startTime = getTime(Date.now(), this.hideSecond);
  25062. }
  25063. if (startDateLaterRangeEndDate) {
  25064. this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond);
  25065. } else if (endDateEarlierRangeEndDate) {
  25066. this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond);
  25067. }
  25068. if (!this.tempRange.endTime) {
  25069. this.tempRange.endTime = getTime(Date.now(), this.hideSecond);
  25070. }
  25071. start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
  25072. end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
  25073. }
  25074. if (!dateCompare(start, end)) {
  25075. [start, end] = [end, start];
  25076. }
  25077. this.displayRangeValue.startDate = start;
  25078. this.displayRangeValue.endDate = end;
  25079. const displayRange = [start, end];
  25080. this.setEmit(displayRange);
  25081. this.pickerVisible = false;
  25082. },
  25083. handleStartAndEnd(before, after, temp = false) {
  25084. if (!(before && after))
  25085. return;
  25086. const type2 = temp ? "tempRange" : "range";
  25087. const isStartEarlierEnd = dateCompare(before, after);
  25088. this[type2].startDate = isStartEarlierEnd ? before : after;
  25089. this[type2].endDate = isStartEarlierEnd ? after : before;
  25090. },
  25091. /**
  25092. * 比较时间大小
  25093. */
  25094. dateCompare(startDate, endDate) {
  25095. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  25096. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  25097. return startDate <= endDate;
  25098. },
  25099. /**
  25100. * 比较时间差
  25101. */
  25102. diffDate(startDate, endDate) {
  25103. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  25104. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  25105. const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
  25106. return Math.abs(diff);
  25107. },
  25108. clear(needEmit = true) {
  25109. if (!this.isRange) {
  25110. this.displayValue = "";
  25111. this.inputDate = "";
  25112. this.pickerTime = "";
  25113. if (this.isPhone) {
  25114. this.$refs.mobile && this.$refs.mobile.clearCalender();
  25115. } else {
  25116. this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
  25117. }
  25118. if (needEmit) {
  25119. this.$emit("change", "");
  25120. this.$emit("input", "");
  25121. this.$emit("update:modelValue", "");
  25122. }
  25123. } else {
  25124. this.displayRangeValue.startDate = "";
  25125. this.displayRangeValue.endDate = "";
  25126. this.tempRange.startDate = "";
  25127. this.tempRange.startTime = "";
  25128. this.tempRange.endDate = "";
  25129. this.tempRange.endTime = "";
  25130. if (this.isPhone) {
  25131. this.$refs.mobile && this.$refs.mobile.clearCalender();
  25132. } else {
  25133. this.$refs.left && this.$refs.left.clearCalender();
  25134. this.$refs.right && this.$refs.right.clearCalender();
  25135. this.$refs.right && this.$refs.right.changeMonth("next");
  25136. }
  25137. if (needEmit) {
  25138. this.$emit("change", []);
  25139. this.$emit("input", []);
  25140. this.$emit("update:modelValue", []);
  25141. }
  25142. }
  25143. }
  25144. }
  25145. };
  25146. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  25147. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  25148. const _component_time_picker = vue.resolveComponent("time-picker");
  25149. const _component_Calendar = vue.resolveComponent("Calendar");
  25150. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
  25151. vue.createElementVNode("view", {
  25152. class: "uni-date-editor",
  25153. onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args))
  25154. }, [
  25155. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  25156. vue.createElementVNode(
  25157. "view",
  25158. {
  25159. class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }])
  25160. },
  25161. [
  25162. !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
  25163. key: 0,
  25164. class: "uni-date-x uni-date-single"
  25165. }, [
  25166. vue.createVNode(_component_uni_icons, {
  25167. class: "icon-calendar",
  25168. type: "calendar",
  25169. color: "#c0c4cc",
  25170. size: "22"
  25171. }),
  25172. vue.createElementVNode(
  25173. "view",
  25174. { class: "uni-date__x-input" },
  25175. vue.toDisplayString($data.displayValue || $options.singlePlaceholderText),
  25176. 1
  25177. /* TEXT */
  25178. )
  25179. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  25180. key: 1,
  25181. class: "uni-date-x uni-date-range"
  25182. }, [
  25183. vue.createVNode(_component_uni_icons, {
  25184. class: "icon-calendar",
  25185. type: "calendar",
  25186. color: "#c0c4cc",
  25187. size: "22"
  25188. }),
  25189. vue.createElementVNode(
  25190. "view",
  25191. { class: "uni-date__x-input text-center" },
  25192. vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText),
  25193. 1
  25194. /* TEXT */
  25195. ),
  25196. vue.createElementVNode(
  25197. "view",
  25198. { class: "range-separator" },
  25199. vue.toDisplayString($props.rangeSeparator),
  25200. 1
  25201. /* TEXT */
  25202. ),
  25203. vue.createElementVNode(
  25204. "view",
  25205. { class: "uni-date__x-input text-center" },
  25206. vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText),
  25207. 1
  25208. /* TEXT */
  25209. )
  25210. ])),
  25211. $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  25212. key: 2,
  25213. class: "uni-date__icon-clear",
  25214. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  25215. }, [
  25216. vue.createVNode(_component_uni_icons, {
  25217. type: "clear",
  25218. color: "#c0c4cc",
  25219. size: "22"
  25220. })
  25221. ])) : vue.createCommentVNode("v-if", true)
  25222. ],
  25223. 2
  25224. /* CLASS */
  25225. )
  25226. ], true)
  25227. ]),
  25228. vue.withDirectives(vue.createElementVNode(
  25229. "view",
  25230. {
  25231. class: "uni-date-mask--pc",
  25232. onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
  25233. },
  25234. null,
  25235. 512
  25236. /* NEED_PATCH */
  25237. ), [
  25238. [vue.vShow, $data.pickerVisible]
  25239. ]),
  25240. !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  25241. "view",
  25242. {
  25243. key: 0,
  25244. ref: "datePicker",
  25245. class: "uni-date-picker__container"
  25246. },
  25247. [
  25248. !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
  25249. "view",
  25250. {
  25251. key: 0,
  25252. class: "uni-date-single--x",
  25253. style: vue.normalizeStyle($data.pickerPositionStyle)
  25254. },
  25255. [
  25256. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  25257. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  25258. key: 0,
  25259. class: "uni-date-changed popup-x-header"
  25260. }, [
  25261. vue.withDirectives(vue.createElementVNode("input", {
  25262. class: "uni-date__input text-center",
  25263. type: "text",
  25264. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event),
  25265. placeholder: $options.selectDateText
  25266. }, null, 8, ["placeholder"]), [
  25267. [vue.vModelText, $data.inputDate]
  25268. ]),
  25269. vue.createVNode(_component_time_picker, {
  25270. type: "time",
  25271. modelValue: $data.pickerTime,
  25272. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event),
  25273. border: false,
  25274. disabled: !$data.inputDate,
  25275. start: $options.timepickerStartTime,
  25276. end: $options.timepickerEndTime,
  25277. hideSecond: $props.hideSecond,
  25278. style: { "width": "100%" }
  25279. }, {
  25280. default: vue.withCtx(() => [
  25281. vue.withDirectives(vue.createElementVNode("input", {
  25282. class: "uni-date__input text-center",
  25283. type: "text",
  25284. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event),
  25285. placeholder: $options.selectTimeText,
  25286. disabled: !$data.inputDate
  25287. }, null, 8, ["placeholder", "disabled"]), [
  25288. [vue.vModelText, $data.pickerTime]
  25289. ])
  25290. ]),
  25291. _: 1
  25292. /* STABLE */
  25293. }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
  25294. ])) : vue.createCommentVNode("v-if", true),
  25295. vue.createVNode(_component_Calendar, {
  25296. ref: "pcSingle",
  25297. showMonth: false,
  25298. "start-date": $data.calendarRange.startDate,
  25299. "end-date": $data.calendarRange.endDate,
  25300. date: $data.calendarDate,
  25301. onChange: $options.singleChange,
  25302. "default-value": $props.defaultValue,
  25303. style: { "padding": "0 8px" }
  25304. }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]),
  25305. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  25306. key: 1,
  25307. class: "popup-x-footer"
  25308. }, [
  25309. vue.createElementVNode(
  25310. "text",
  25311. {
  25312. class: "confirm-text",
  25313. onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
  25314. },
  25315. vue.toDisplayString($options.okText),
  25316. 1
  25317. /* TEXT */
  25318. )
  25319. ])) : vue.createCommentVNode("v-if", true)
  25320. ],
  25321. 4
  25322. /* STYLE */
  25323. )) : (vue.openBlock(), vue.createElementBlock(
  25324. "view",
  25325. {
  25326. key: 1,
  25327. class: "uni-date-range--x",
  25328. style: vue.normalizeStyle($data.pickerPositionStyle)
  25329. },
  25330. [
  25331. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  25332. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  25333. key: 0,
  25334. class: "popup-x-header uni-date-changed"
  25335. }, [
  25336. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  25337. vue.withDirectives(vue.createElementVNode("input", {
  25338. class: "uni-date__input uni-date-range__input",
  25339. type: "text",
  25340. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event),
  25341. placeholder: $options.startDateText
  25342. }, null, 8, ["placeholder"]), [
  25343. [vue.vModelText, $data.tempRange.startDate]
  25344. ]),
  25345. vue.createVNode(_component_time_picker, {
  25346. type: "time",
  25347. modelValue: $data.tempRange.startTime,
  25348. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event),
  25349. start: $options.timepickerStartTime,
  25350. border: false,
  25351. disabled: !$data.tempRange.startDate,
  25352. hideSecond: $props.hideSecond
  25353. }, {
  25354. default: vue.withCtx(() => [
  25355. vue.withDirectives(vue.createElementVNode("input", {
  25356. class: "uni-date__input uni-date-range__input",
  25357. type: "text",
  25358. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event),
  25359. placeholder: $options.startTimeText,
  25360. disabled: !$data.tempRange.startDate
  25361. }, null, 8, ["placeholder", "disabled"]), [
  25362. [vue.vModelText, $data.tempRange.startTime]
  25363. ])
  25364. ]),
  25365. _: 1
  25366. /* STABLE */
  25367. }, 8, ["modelValue", "start", "disabled", "hideSecond"])
  25368. ]),
  25369. vue.createVNode(_component_uni_icons, {
  25370. type: "arrowthinright",
  25371. color: "#999",
  25372. style: { "line-height": "40px" }
  25373. }),
  25374. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  25375. vue.withDirectives(vue.createElementVNode("input", {
  25376. class: "uni-date__input uni-date-range__input",
  25377. type: "text",
  25378. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event),
  25379. placeholder: $options.endDateText
  25380. }, null, 8, ["placeholder"]), [
  25381. [vue.vModelText, $data.tempRange.endDate]
  25382. ]),
  25383. vue.createVNode(_component_time_picker, {
  25384. type: "time",
  25385. modelValue: $data.tempRange.endTime,
  25386. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event),
  25387. end: $options.timepickerEndTime,
  25388. border: false,
  25389. disabled: !$data.tempRange.endDate,
  25390. hideSecond: $props.hideSecond
  25391. }, {
  25392. default: vue.withCtx(() => [
  25393. vue.withDirectives(vue.createElementVNode("input", {
  25394. class: "uni-date__input uni-date-range__input",
  25395. type: "text",
  25396. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event),
  25397. placeholder: $options.endTimeText,
  25398. disabled: !$data.tempRange.endDate
  25399. }, null, 8, ["placeholder", "disabled"]), [
  25400. [vue.vModelText, $data.tempRange.endTime]
  25401. ])
  25402. ]),
  25403. _: 1
  25404. /* STABLE */
  25405. }, 8, ["modelValue", "end", "disabled", "hideSecond"])
  25406. ])
  25407. ])) : vue.createCommentVNode("v-if", true),
  25408. vue.createElementVNode("view", { class: "popup-x-body" }, [
  25409. vue.createVNode(_component_Calendar, {
  25410. ref: "left",
  25411. showMonth: false,
  25412. "start-date": $data.calendarRange.startDate,
  25413. "end-date": $data.calendarRange.endDate,
  25414. range: true,
  25415. pleStatus: $data.endMultipleStatus,
  25416. onChange: $options.leftChange,
  25417. onFirstEnterCale: $options.updateRightCale,
  25418. style: { "padding": "0 8px" }
  25419. }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]),
  25420. vue.createVNode(_component_Calendar, {
  25421. ref: "right",
  25422. showMonth: false,
  25423. "start-date": $data.calendarRange.startDate,
  25424. "end-date": $data.calendarRange.endDate,
  25425. range: true,
  25426. onChange: $options.rightChange,
  25427. pleStatus: $data.startMultipleStatus,
  25428. onFirstEnterCale: $options.updateLeftCale,
  25429. style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
  25430. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"])
  25431. ]),
  25432. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  25433. key: 1,
  25434. class: "popup-x-footer"
  25435. }, [
  25436. vue.createElementVNode(
  25437. "text",
  25438. {
  25439. onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args))
  25440. },
  25441. vue.toDisplayString($options.clearText),
  25442. 1
  25443. /* TEXT */
  25444. ),
  25445. vue.createElementVNode(
  25446. "text",
  25447. {
  25448. class: "confirm-text",
  25449. onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
  25450. },
  25451. vue.toDisplayString($options.okText),
  25452. 1
  25453. /* TEXT */
  25454. )
  25455. ])) : vue.createCommentVNode("v-if", true)
  25456. ],
  25457. 4
  25458. /* STYLE */
  25459. ))
  25460. ],
  25461. 512
  25462. /* NEED_PATCH */
  25463. )), [
  25464. [vue.vShow, $data.pickerVisible]
  25465. ]) : vue.createCommentVNode("v-if", true),
  25466. $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, {
  25467. key: 1,
  25468. ref: "mobile",
  25469. clearDate: false,
  25470. date: $data.calendarDate,
  25471. defTime: $options.mobileCalendarTime,
  25472. "start-date": $data.calendarRange.startDate,
  25473. "end-date": $data.calendarRange.endDate,
  25474. selectableTimes: $options.mobSelectableTime,
  25475. startPlaceholder: $props.startPlaceholder,
  25476. endPlaceholder: $props.endPlaceholder,
  25477. "default-value": $props.defaultValue,
  25478. pleStatus: $data.endMultipleStatus,
  25479. showMonth: false,
  25480. range: $data.isRange,
  25481. hasTime: $data.hasTime,
  25482. insert: false,
  25483. hideSecond: $props.hideSecond,
  25484. onConfirm: $options.mobileChange,
  25485. onMaskClose: $options.close
  25486. }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose"])) : vue.createCommentVNode("v-if", true)
  25487. ]);
  25488. }
  25489. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-9802168a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
  25490. const _sfc_main$Q = {
  25491. __name: "after-sale",
  25492. setup(__props, { expose: __expose }) {
  25493. __expose();
  25494. const otherParams = vue.ref({
  25495. sender: ""
  25496. });
  25497. const scrollRef = vue.ref(null);
  25498. const refreshList = () => {
  25499. var _a;
  25500. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  25501. };
  25502. let dataList = vue.ref([{
  25503. date: "2024-10-24",
  25504. orderNum: 423,
  25505. auditNum: 293,
  25506. trueNum: 323
  25507. }, {
  25508. date: "2024-10-24",
  25509. orderNum: 423,
  25510. auditNum: 293,
  25511. trueNum: 323
  25512. }, {
  25513. date: "2024-10-24",
  25514. orderNum: 423,
  25515. auditNum: 293,
  25516. trueNum: 323
  25517. }]);
  25518. const updateList = (data) => {
  25519. dataList.value = data;
  25520. };
  25521. const form = vue.reactive({
  25522. startTime: "",
  25523. endTime: ""
  25524. });
  25525. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  25526. return dataList;
  25527. }, set dataList(v) {
  25528. dataList = v;
  25529. }, updateList, form, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  25530. return onLoad;
  25531. } };
  25532. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25533. return __returned__;
  25534. }
  25535. };
  25536. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  25537. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$2);
  25538. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  25539. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  25540. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  25541. return vue.openBlock(), vue.createElementBlock("view", {
  25542. class: "common-page",
  25543. style: { "padding": "0" }
  25544. }, [
  25545. vue.createVNode($setup["PageScroll"], {
  25546. requestStr: "/team/token/shop/invite/page",
  25547. onUpdateList: $setup.updateList,
  25548. ref: "scrollRef",
  25549. otherParams: $setup.otherParams
  25550. }, {
  25551. default: vue.withCtx(() => [
  25552. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  25553. default: vue.withCtx(() => [
  25554. vue.createElementVNode("view", { class: "search-area flex-d" }, [
  25555. vue.createElementVNode("view", { class: "flex-a mb-12" }, [
  25556. vue.createElementVNode("text", { class: "font-13 mr-10" }, "开始时间:"),
  25557. vue.createVNode(_component_uni_datetime_picker, {
  25558. type: "datetime",
  25559. modelValue: $setup.form.startTime,
  25560. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.startTime = $event)
  25561. }, null, 8, ["modelValue"])
  25562. ]),
  25563. vue.createElementVNode("view", { class: "flex-a" }, [
  25564. vue.createElementVNode("text", { class: "font-13 mr-10" }, "结束时间:"),
  25565. vue.createVNode(_component_uni_datetime_picker, {
  25566. type: "datetime",
  25567. modelValue: $setup.form.endTime,
  25568. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.endTime = $event)
  25569. }, null, 8, ["modelValue"]),
  25570. vue.createVNode(_component_u_button, {
  25571. type: "primary",
  25572. "custom-style": "width:160rpx;height:72rpx;margin-left:10px"
  25573. }, {
  25574. default: vue.withCtx(() => [
  25575. vue.createTextVNode("查询")
  25576. ]),
  25577. _: 1
  25578. /* STABLE */
  25579. })
  25580. ]),
  25581. vue.createVNode(_component_u_divider),
  25582. vue.createElementVNode("view", { class: "flex-a" }, [
  25583. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  25584. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  25585. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  25586. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  25587. ])
  25588. ])
  25589. ]),
  25590. _: 1
  25591. /* STABLE */
  25592. }),
  25593. vue.createElementVNode("view", { class: "list-con" }, [
  25594. (vue.openBlock(true), vue.createElementBlock(
  25595. vue.Fragment,
  25596. null,
  25597. vue.renderList($setup.dataList, (item, index2) => {
  25598. return vue.openBlock(), vue.createElementBlock("view", {
  25599. key: index2,
  25600. class: "flex-a"
  25601. }, [
  25602. vue.createElementVNode(
  25603. "view",
  25604. { class: "text-item flex-1" },
  25605. vue.toDisplayString(item.date),
  25606. 1
  25607. /* TEXT */
  25608. ),
  25609. vue.createElementVNode(
  25610. "view",
  25611. { class: "text-item flex-1" },
  25612. vue.toDisplayString(item.orderNum),
  25613. 1
  25614. /* TEXT */
  25615. ),
  25616. vue.createElementVNode(
  25617. "view",
  25618. { class: "text-item flex-1" },
  25619. vue.toDisplayString(item.auditNum),
  25620. 1
  25621. /* TEXT */
  25622. ),
  25623. vue.createElementVNode(
  25624. "view",
  25625. { class: "text-item flex-1" },
  25626. vue.toDisplayString(item.trueNum),
  25627. 1
  25628. /* TEXT */
  25629. )
  25630. ]);
  25631. }),
  25632. 128
  25633. /* KEYED_FRAGMENT */
  25634. ))
  25635. ])
  25636. ]),
  25637. _: 1
  25638. /* STABLE */
  25639. }, 8, ["otherParams"])
  25640. ]);
  25641. }
  25642. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/statistic/after-sale.vue"]]);
  25643. const _sfc_main$P = {
  25644. __name: "package",
  25645. setup(__props, { expose: __expose }) {
  25646. __expose();
  25647. const otherParams = vue.ref({
  25648. sender: ""
  25649. });
  25650. const scrollRef = vue.ref(null);
  25651. const refreshList = () => {
  25652. var _a;
  25653. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  25654. };
  25655. let dataList = vue.ref([{
  25656. date: "2024-10-24",
  25657. orderNum: 423
  25658. }, {
  25659. date: "2024-10-24",
  25660. orderNum: 423
  25661. }, {
  25662. date: "2024-10-24",
  25663. orderNum: 423
  25664. }]);
  25665. const updateList = (data) => {
  25666. dataList.value = data;
  25667. };
  25668. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  25669. return dataList;
  25670. }, set dataList(v) {
  25671. dataList = v;
  25672. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  25673. return onLoad;
  25674. } };
  25675. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25676. return __returned__;
  25677. }
  25678. };
  25679. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  25680. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  25681. return vue.openBlock(), vue.createElementBlock("view", {
  25682. class: "common-page",
  25683. style: { "padding": "0" }
  25684. }, [
  25685. vue.createVNode($setup["PageScroll"], {
  25686. requestStr: "/team/token/shop/invite/page",
  25687. onUpdateList: $setup.updateList,
  25688. ref: "scrollRef",
  25689. otherParams: $setup.otherParams
  25690. }, {
  25691. default: vue.withCtx(() => [
  25692. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  25693. default: vue.withCtx(() => [
  25694. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  25695. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  25696. vue.createElementVNode("view", { class: "text-item flex-1" }, "数量")
  25697. ])
  25698. ]),
  25699. _: 1
  25700. /* STABLE */
  25701. }),
  25702. vue.createElementVNode("view", { class: "list-con" }, [
  25703. (vue.openBlock(true), vue.createElementBlock(
  25704. vue.Fragment,
  25705. null,
  25706. vue.renderList($setup.dataList, (item, index2) => {
  25707. return vue.openBlock(), vue.createElementBlock("view", {
  25708. key: index2,
  25709. class: "flex-a"
  25710. }, [
  25711. vue.createElementVNode(
  25712. "view",
  25713. { class: "text-item flex-1" },
  25714. vue.toDisplayString(item.date),
  25715. 1
  25716. /* TEXT */
  25717. ),
  25718. vue.createElementVNode(
  25719. "view",
  25720. { class: "text-item flex-1" },
  25721. vue.toDisplayString(item.orderNum),
  25722. 1
  25723. /* TEXT */
  25724. )
  25725. ]);
  25726. }),
  25727. 128
  25728. /* KEYED_FRAGMENT */
  25729. ))
  25730. ])
  25731. ]),
  25732. _: 1
  25733. /* STABLE */
  25734. }, 8, ["otherParams"])
  25735. ]);
  25736. }
  25737. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/statistic/package.vue"]]);
  25738. const _sfc_main$O = {
  25739. name: "GoodIn"
  25740. };
  25741. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  25742. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25743. vue.createCommentVNode(" 开发中提示 "),
  25744. vue.createElementVNode("view", { class: "developing" }, [
  25745. vue.createElementVNode("text", null, "开发中")
  25746. ])
  25747. ]);
  25748. }
  25749. const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-04e21b6f"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/medium-in.vue"]]);
  25750. const _sfc_main$N = {
  25751. name: "GoodIn"
  25752. };
  25753. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  25754. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25755. vue.createCommentVNode(" 开发中提示 "),
  25756. vue.createElementVNode("view", { class: "developing" }, [
  25757. vue.createElementVNode("text", null, "开发中")
  25758. ])
  25759. ]);
  25760. }
  25761. const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-701c6544"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/good-in.vue"]]);
  25762. const _sfc_main$M = {
  25763. name: "GoodIn"
  25764. };
  25765. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  25766. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25767. vue.createCommentVNode(" 开发中提示 "),
  25768. vue.createElementVNode("view", { class: "developing" }, [
  25769. vue.createElementVNode("text", null, "开发中")
  25770. ])
  25771. ]);
  25772. }
  25773. const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-52deef37"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/secondary-in.vue"]]);
  25774. const MIN_DISTANCE = 10;
  25775. function getDirection(x, y) {
  25776. if (x > y && x > MIN_DISTANCE) {
  25777. return "horizontal";
  25778. }
  25779. if (y > x && y > MIN_DISTANCE) {
  25780. return "vertical";
  25781. }
  25782. return "";
  25783. }
  25784. const touch = {
  25785. methods: {
  25786. getTouchPoint(e) {
  25787. if (!e) {
  25788. return {
  25789. x: 0,
  25790. y: 0
  25791. };
  25792. }
  25793. if (e.touches && e.touches[0]) {
  25794. return {
  25795. x: e.touches[0].pageX,
  25796. y: e.touches[0].pageY
  25797. };
  25798. }
  25799. if (e.changedTouches && e.changedTouches[0]) {
  25800. return {
  25801. x: e.changedTouches[0].pageX,
  25802. y: e.changedTouches[0].pageY
  25803. };
  25804. }
  25805. return {
  25806. x: e.clientX || 0,
  25807. y: e.clientY || 0
  25808. };
  25809. },
  25810. resetTouchStatus() {
  25811. this.direction = "";
  25812. this.deltaX = 0;
  25813. this.deltaY = 0;
  25814. this.offsetX = 0;
  25815. this.offsetY = 0;
  25816. },
  25817. touchStart(event) {
  25818. this.resetTouchStatus();
  25819. const touch2 = this.getTouchPoint(event);
  25820. this.startX = touch2.x;
  25821. this.startY = touch2.y;
  25822. },
  25823. touchMove(event) {
  25824. const touch2 = this.getTouchPoint(event);
  25825. this.deltaX = touch2.x - this.startX;
  25826. this.deltaY = touch2.y - this.startY;
  25827. this.offsetX = Math.abs(this.deltaX);
  25828. this.offsetY = Math.abs(this.deltaY);
  25829. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  25830. }
  25831. }
  25832. };
  25833. const props$7 = {
  25834. props: {
  25835. // 控制打开或者关闭
  25836. show: {
  25837. type: Boolean,
  25838. default: props$G.swipeActionItem.show
  25839. },
  25840. // 标识符,如果是v-for,可用index索引值
  25841. name: {
  25842. type: [String, Number],
  25843. default: props$G.swipeActionItem.name
  25844. },
  25845. // 是否禁用
  25846. disabled: {
  25847. type: Boolean,
  25848. default: props$G.swipeActionItem.disabled
  25849. },
  25850. // 是否自动关闭其他swipe按钮组
  25851. autoClose: {
  25852. type: Boolean,
  25853. default: props$G.swipeActionItem.autoClose
  25854. },
  25855. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  25856. threshold: {
  25857. type: Number,
  25858. default: props$G.swipeActionItem.threshold
  25859. },
  25860. // 右侧按钮内容
  25861. options: {
  25862. type: Array,
  25863. default() {
  25864. return uni.$u.props.swipeActionItem.rightOptions;
  25865. }
  25866. },
  25867. // 动画过渡时间,单位ms
  25868. duration: {
  25869. type: [String, Number],
  25870. default: props$G.swipeActionItem.duration
  25871. }
  25872. }
  25873. };
  25874. const wxs = {
  25875. methods: {
  25876. // 关闭时执行
  25877. closeHandler() {
  25878. this.status = "close";
  25879. },
  25880. setState(status) {
  25881. this.status = status;
  25882. },
  25883. closeOther() {
  25884. this.parent && this.parent.closeOther(this);
  25885. }
  25886. }
  25887. };
  25888. const block0 = (Comp) => {
  25889. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  25890. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
  25891. };
  25892. const _sfc_main$L = {
  25893. name: "u-swipe-action-item",
  25894. emits: ["click"],
  25895. mixins: [mpMixin, mixin, props$7, touch],
  25896. mixins: [mpMixin, mixin, props$7, touch, wxs],
  25897. data() {
  25898. return {
  25899. // 按钮的尺寸信息
  25900. size: {},
  25901. // 父组件u-swipe-action的参数
  25902. parentData: {
  25903. autoClose: true
  25904. },
  25905. // 当前状态,open-打开,close-关闭
  25906. status: "close"
  25907. };
  25908. },
  25909. watch: {
  25910. // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
  25911. wxsInit(newValue, oldValue) {
  25912. this.queryRect();
  25913. }
  25914. },
  25915. computed: {
  25916. wxsInit() {
  25917. return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
  25918. }
  25919. },
  25920. mounted() {
  25921. this.init();
  25922. },
  25923. methods: {
  25924. init() {
  25925. this.updateParentData();
  25926. uni.$u.sleep().then(() => {
  25927. this.queryRect();
  25928. });
  25929. },
  25930. updateParentData() {
  25931. this.getParentData("u-swipe-action");
  25932. },
  25933. // 查询节点
  25934. queryRect() {
  25935. this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
  25936. this.size = {
  25937. buttons,
  25938. show: this.show,
  25939. disabled: this.disabled,
  25940. threshold: this.threshold,
  25941. duration: this.duration
  25942. };
  25943. });
  25944. },
  25945. // 按钮被点击
  25946. buttonClickHandler(item, index2) {
  25947. this.$emit("click", {
  25948. index: index2,
  25949. name: this.name
  25950. });
  25951. }
  25952. }
  25953. };
  25954. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  25955. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  25956. return vue.openBlock(), vue.createElementBlock(
  25957. "view",
  25958. {
  25959. class: "u-swipe-action-item",
  25960. ref: "u-swipe-action-item"
  25961. },
  25962. [
  25963. vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
  25964. vue.renderSlot(_ctx.$slots, "button", {}, () => [
  25965. (vue.openBlock(true), vue.createElementBlock(
  25966. vue.Fragment,
  25967. null,
  25968. vue.renderList(_ctx.options, (item, index2) => {
  25969. return vue.openBlock(), vue.createElementBlock("view", {
  25970. key: index2,
  25971. class: "u-swipe-action-item__right__button",
  25972. ref_for: true,
  25973. ref: `u-swipe-action-item__right__button-${index2}`,
  25974. style: vue.normalizeStyle([{
  25975. alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
  25976. }]),
  25977. onClick: ($event) => $options.buttonClickHandler(item, index2)
  25978. }, [
  25979. vue.createElementVNode(
  25980. "view",
  25981. {
  25982. class: "u-swipe-action-item__right__button__wrapper",
  25983. style: vue.normalizeStyle([{
  25984. backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
  25985. borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
  25986. padding: item.style && item.style.borderRadius ? "0" : "0 15px"
  25987. }, item.style])
  25988. },
  25989. [
  25990. item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  25991. key: 0,
  25992. name: item.icon,
  25993. color: item.style && item.style.color ? item.style.color : "#ffffff",
  25994. size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17,
  25995. customStyle: {
  25996. marginRight: item.text ? "2px" : 0
  25997. }
  25998. }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
  25999. item.text ? (vue.openBlock(), vue.createElementBlock(
  26000. "text",
  26001. {
  26002. key: 1,
  26003. class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
  26004. style: vue.normalizeStyle([{
  26005. color: item.style && item.style.color ? item.style.color : "#ffffff",
  26006. fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
  26007. lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
  26008. }])
  26009. },
  26010. vue.toDisplayString(item.text),
  26011. 5
  26012. /* TEXT, STYLE */
  26013. )) : vue.createCommentVNode("v-if", true)
  26014. ],
  26015. 4
  26016. /* STYLE */
  26017. )
  26018. ], 12, ["onClick"]);
  26019. }),
  26020. 128
  26021. /* KEYED_FRAGMENT */
  26022. ))
  26023. ], true)
  26024. ]),
  26025. vue.createElementVNode("view", {
  26026. class: "u-swipe-action-item__content",
  26027. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
  26028. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
  26029. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
  26030. status: vue.wp($data.status),
  26031. "change:status": _ctx.wxs.statusChange,
  26032. size: vue.wp($data.size),
  26033. "change:size": _ctx.wxs.sizeChange
  26034. }, [
  26035. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  26036. ], 40, ["status", "change:status", "size", "change:size"])
  26037. ],
  26038. 512
  26039. /* NEED_PATCH */
  26040. );
  26041. }
  26042. if (typeof block0 === "function")
  26043. block0(_sfc_main$L);
  26044. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-ed3ce04a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]);
  26045. const props$6 = {
  26046. props: {
  26047. // 是否自动关闭其他swipe按钮组
  26048. autoClose: {
  26049. type: Boolean,
  26050. default: props$G.swipeAction.autoClose
  26051. }
  26052. }
  26053. };
  26054. const _sfc_main$K = {
  26055. name: "u-swipe-action",
  26056. mixins: [mpMixin, mixin, props$6],
  26057. data() {
  26058. return {};
  26059. },
  26060. provide() {
  26061. return {
  26062. swipeAction: this
  26063. };
  26064. },
  26065. computed: {
  26066. // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  26067. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
  26068. // 拉取父组件新的变化后的参数
  26069. parentData() {
  26070. return [this.autoClose];
  26071. }
  26072. },
  26073. watch: {
  26074. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  26075. parentData() {
  26076. if (this.children.length) {
  26077. this.children.map((child) => {
  26078. typeof child.updateParentData === "function" && child.updateParentData();
  26079. });
  26080. }
  26081. }
  26082. },
  26083. created() {
  26084. this.children = [];
  26085. },
  26086. methods: {
  26087. closeOther(child) {
  26088. if (this.autoClose) {
  26089. this.children.map((item, index2) => {
  26090. if (child !== item) {
  26091. item.closeHandler();
  26092. }
  26093. });
  26094. }
  26095. }
  26096. }
  26097. };
  26098. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  26099. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
  26100. vue.renderSlot(_ctx.$slots, "default")
  26101. ]);
  26102. }
  26103. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]);
  26104. const _sfc_main$J = {
  26105. __name: "BadItem",
  26106. props: {
  26107. data: {
  26108. type: Object,
  26109. required: true,
  26110. default: () => ({
  26111. orderNo: "",
  26112. badCount: "",
  26113. logisticsNo: "",
  26114. checkDate: "",
  26115. operator: ""
  26116. })
  26117. }
  26118. },
  26119. emits: ["delete", "edit"],
  26120. setup(__props, { expose: __expose, emit: __emit }) {
  26121. __expose();
  26122. const props2 = __props;
  26123. const emit2 = __emit;
  26124. const options = vue.ref([
  26125. {
  26126. text: "删除",
  26127. style: {
  26128. backgroundColor: "#ff4444"
  26129. }
  26130. }
  26131. ]);
  26132. const handleAction = (e) => {
  26133. if (e.index === 0) {
  26134. uni.showModal({
  26135. title: "提示",
  26136. content: "确定要删除该订单吗?",
  26137. success: (res2) => {
  26138. if (res2.confirm) {
  26139. emit2("delete");
  26140. }
  26141. }
  26142. });
  26143. }
  26144. };
  26145. const __returned__ = { props: props2, emit: emit2, options, handleAction, ref: vue.ref };
  26146. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26147. return __returned__;
  26148. }
  26149. };
  26150. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  26151. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  26152. const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1);
  26153. const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2);
  26154. return vue.openBlock(), vue.createElementBlock("view", { class: "bad-item" }, [
  26155. vue.createVNode(_component_u_swipe_action, null, {
  26156. default: vue.withCtx(() => [
  26157. vue.createVNode(_component_u_swipe_action_item, {
  26158. options: $setup.options,
  26159. onClick: $setup.handleAction
  26160. }, {
  26161. default: vue.withCtx(() => [
  26162. vue.createElementVNode("view", { class: "item-content" }, [
  26163. vue.createElementVNode("view", { class: "item-row" }, [
  26164. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  26165. vue.createElementVNode(
  26166. "text",
  26167. { class: "value" },
  26168. vue.toDisplayString($props.data.orderId),
  26169. 1
  26170. /* TEXT */
  26171. ),
  26172. vue.createVNode(_component_u_icon, {
  26173. name: "edit-pen",
  26174. color: "#4CAF50",
  26175. size: "20",
  26176. class: "edit-icon",
  26177. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
  26178. })
  26179. ]),
  26180. vue.createElementVNode("view", { class: "item-row" }, [
  26181. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  26182. vue.createElementVNode(
  26183. "text",
  26184. { class: "value" },
  26185. vue.toDisplayString($props.data.badNum),
  26186. 1
  26187. /* TEXT */
  26188. )
  26189. ]),
  26190. vue.createElementVNode("view", { class: "item-row" }, [
  26191. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  26192. vue.createElementVNode(
  26193. "text",
  26194. { class: "value" },
  26195. vue.toDisplayString($props.data.waybillCode),
  26196. 1
  26197. /* TEXT */
  26198. )
  26199. ]),
  26200. vue.createElementVNode("view", { class: "item-row" }, [
  26201. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  26202. vue.createElementVNode(
  26203. "text",
  26204. { class: "value" },
  26205. vue.toDisplayString($props.data.auditFinishTime),
  26206. 1
  26207. /* TEXT */
  26208. )
  26209. ]),
  26210. vue.createElementVNode("view", { class: "item-row" }, [
  26211. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  26212. vue.createElementVNode(
  26213. "text",
  26214. { class: "value" },
  26215. vue.toDisplayString($props.data.auditUserName),
  26216. 1
  26217. /* TEXT */
  26218. )
  26219. ])
  26220. ])
  26221. ]),
  26222. _: 1
  26223. /* STABLE */
  26224. }, 8, ["options"])
  26225. ]),
  26226. _: 1
  26227. /* STABLE */
  26228. })
  26229. ]);
  26230. }
  26231. const BadItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-93494456"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/BadItem.vue"]]);
  26232. const _sfc_main$I = {
  26233. __name: "RemarkDialog",
  26234. props: {
  26235. visible: {
  26236. type: Boolean,
  26237. default: false
  26238. },
  26239. initialValue: {
  26240. type: String,
  26241. default: ""
  26242. }
  26243. },
  26244. emits: ["update:visible", "confirm"],
  26245. setup(__props, { expose: __expose, emit: __emit }) {
  26246. __expose();
  26247. const props2 = __props;
  26248. function playGlobalSound() {
  26249. uni.$u.playClickSound();
  26250. }
  26251. const emit2 = __emit;
  26252. const remarkText = vue.ref("");
  26253. const quickTags = vue.ref(["少书", "多书", "子母件", "书单不符"]);
  26254. vue.watch(() => props2.visible, (newVal) => {
  26255. if (newVal) {
  26256. remarkText.value = props2.initialValue;
  26257. }
  26258. });
  26259. const appendTag = (tag) => {
  26260. remarkText.value += remarkText.value ? " " + tag : tag;
  26261. };
  26262. const onClose = () => {
  26263. emit2("update:visible", false);
  26264. };
  26265. const onConfirm = () => {
  26266. emit2("confirm", remarkText.value);
  26267. onClose();
  26268. };
  26269. const __returned__ = { props: props2, playGlobalSound, emit: emit2, remarkText, quickTags, appendTag, onClose, onConfirm, ref: vue.ref, watch: vue.watch };
  26270. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26271. return __returned__;
  26272. }
  26273. };
  26274. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  26275. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  26276. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  26277. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  26278. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  26279. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  26280. show: $props.visible,
  26281. onClose: $setup.onClose,
  26282. mode: "center",
  26283. round: "10",
  26284. closeOnClickOverlay: false
  26285. }, {
  26286. default: vue.withCtx(() => [
  26287. vue.createElementVNode("view", {
  26288. class: "remark-dialog",
  26289. onClick: $setup.playGlobalSound
  26290. }, [
  26291. vue.createElementVNode("view", { class: "dialog-title" }, "编辑备注"),
  26292. vue.createCommentVNode(" 备注输入框 "),
  26293. vue.createElementVNode("view", { class: "dialog-content mb-30" }, [
  26294. vue.createVNode(_component_u_textarea, {
  26295. modelValue: $setup.remarkText,
  26296. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.remarkText = $event),
  26297. placeholder: "请输入",
  26298. maxlength: 200,
  26299. height: "100",
  26300. count: ""
  26301. }, null, 8, ["modelValue"]),
  26302. vue.createCommentVNode(" 快速输入标签 "),
  26303. vue.createElementVNode("view", { class: "quick-tags mt-10" }, [
  26304. vue.createElementVNode("text", { class: "common-title" }, "快速填入"),
  26305. vue.createElementVNode("view", { class: "tags-container flex-w mt-20" }, [
  26306. (vue.openBlock(true), vue.createElementBlock(
  26307. vue.Fragment,
  26308. null,
  26309. vue.renderList($setup.quickTags, (tag, index2) => {
  26310. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  26311. key: index2,
  26312. text: tag,
  26313. plain: "",
  26314. size: "mini",
  26315. type: "primary",
  26316. onClick: ($event) => $setup.appendTag(tag),
  26317. class: "tag-item"
  26318. }, null, 8, ["text", "onClick"]);
  26319. }),
  26320. 128
  26321. /* KEYED_FRAGMENT */
  26322. ))
  26323. ])
  26324. ])
  26325. ]),
  26326. vue.createCommentVNode(" 底部按钮 "),
  26327. vue.createElementVNode("view", { class: "dialog-footer" }, [
  26328. vue.createVNode(_component_u_button, {
  26329. plain: "",
  26330. onClick: $setup.onClose,
  26331. class: "footer-btn"
  26332. }, {
  26333. default: vue.withCtx(() => [
  26334. vue.createTextVNode("取消")
  26335. ]),
  26336. _: 1
  26337. /* STABLE */
  26338. }),
  26339. vue.createVNode(_component_u_button, {
  26340. type: "primary",
  26341. onClick: $setup.onConfirm,
  26342. class: "footer-btn"
  26343. }, {
  26344. default: vue.withCtx(() => [
  26345. vue.createTextVNode("确定")
  26346. ]),
  26347. _: 1
  26348. /* STABLE */
  26349. })
  26350. ])
  26351. ])
  26352. ]),
  26353. _: 1
  26354. /* STABLE */
  26355. }, 8, ["show"]);
  26356. }
  26357. const RemarkDialog = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-73050f50"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/RemarkDialog.vue"]]);
  26358. const _sfc_main$H = {
  26359. __name: "bad-in",
  26360. setup(__props, { expose: __expose }) {
  26361. __expose();
  26362. const waybillCode = vue.ref();
  26363. const formData = vue.reactive({
  26364. godownName: "",
  26365. godownId: "",
  26366. positionCode: ""
  26367. });
  26368. function playGlobalSound() {
  26369. uni.$u.playClickSound();
  26370. }
  26371. const ordersMap = vue.ref([]);
  26372. const codeMap = vue.ref([]);
  26373. function getDetailByCode2(code2) {
  26374. if (codeMap.value.includes(code2)) {
  26375. uni.$u.ttsModule.speak("重复扫描");
  26376. return;
  26377. }
  26378. uni.$u.http.get("/app/stock/searchOrder?waybillCode=" + code2).then((res2) => {
  26379. if (res2.code == 200) {
  26380. ordersMap.value.unshift(res2.data);
  26381. codeMap.value.push(code2);
  26382. } else if (res2.code == 601) {
  26383. uni.$u.ttsModule.speak(res2.msg);
  26384. uni.showModal({
  26385. title: "提示",
  26386. content: res2.msg,
  26387. showCancel: false,
  26388. success: () => {
  26389. playGlobalSound();
  26390. }
  26391. });
  26392. } else {
  26393. uni.$u.toast(res2.msg);
  26394. }
  26395. });
  26396. }
  26397. const remarkVisible = vue.ref(false);
  26398. const currentRemark = vue.ref("");
  26399. const currentEditIndex = vue.ref(-1);
  26400. const goBack = () => {
  26401. if (ordersMap.value.length > 0) {
  26402. uni.showModal({
  26403. title: "退出确认",
  26404. content: "是否确认放弃本次入库?",
  26405. success: (res2) => {
  26406. playGlobalSound();
  26407. if (res2.confirm) {
  26408. uni.navigateBack();
  26409. }
  26410. }
  26411. });
  26412. } else {
  26413. uni.navigateBack();
  26414. }
  26415. };
  26416. const onSubmit = () => {
  26417. if (!formData.godownId || !formData.positionCode) {
  26418. uni.$u.toast("请先选择仓库和库位");
  26419. uni.$u.ttsModule.speak("请先选择仓库和库位");
  26420. return;
  26421. }
  26422. uni.showModal({
  26423. title: "提交确认",
  26424. content: "是否确认提交本次入库?",
  26425. success: (res2) => {
  26426. playGlobalSound();
  26427. if (res2.confirm) {
  26428. handleSubmitConfirm();
  26429. }
  26430. }
  26431. });
  26432. };
  26433. const handleSubmitConfirm = async () => {
  26434. uni.showLoading({
  26435. title: "提交中..."
  26436. });
  26437. let orderInfo = ordersMap.value.map((item) => {
  26438. return {
  26439. orderId: item.orderId,
  26440. waybillCode: item.waybillCode,
  26441. bookNum: item.badNum,
  26442. remark: item.remark
  26443. };
  26444. });
  26445. if (orderInfo.length == 0) {
  26446. uni.hideLoading();
  26447. uni.$u.ttsModule.speak("请添加订单数据");
  26448. return;
  26449. }
  26450. uni.$u.http.post("/app/stock/addBatch", {
  26451. godownId: formData.godownId,
  26452. positionCode: formData.positionCode,
  26453. orderInfo
  26454. }).then((res2) => {
  26455. if (res2.code == 200) {
  26456. uni.$u.toast("入库成功");
  26457. uni.$u.ttsModule.speak("入库成功");
  26458. clearData();
  26459. } else {
  26460. uni.$u.toast(res2.msg);
  26461. }
  26462. }).finally(() => {
  26463. uni.hideLoading();
  26464. });
  26465. };
  26466. const clearData = () => {
  26467. ordersMap.value.length = 0;
  26468. waybillCode.value = "";
  26469. formData.godownName = "";
  26470. formData.positionCode = "";
  26471. formData.godownId = "";
  26472. };
  26473. const editOrder = (index2) => {
  26474. openRemarkDialog(index2);
  26475. };
  26476. const openScan = () => {
  26477. uni.scanCode({
  26478. success: (res2) => {
  26479. waybillCode.value = res2.result;
  26480. getDetailByCode2(res2.result);
  26481. },
  26482. fail: (err) => {
  26483. uni.showToast({
  26484. title: "扫码失败",
  26485. icon: "error"
  26486. });
  26487. }
  26488. });
  26489. };
  26490. function selectLocation() {
  26491. if (!formData.godownId) {
  26492. uni.$u.toast("请先选择仓库");
  26493. uni.$u.ttsModule.speak("请先选择仓库");
  26494. return;
  26495. }
  26496. uni.redirectTo({
  26497. url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
  26498. });
  26499. }
  26500. const deleteOrder = (index2) => {
  26501. ordersMap.value.splice(index2, 1);
  26502. };
  26503. vue.onMounted(() => {
  26504. uni.$u.useGlobalEvent((e) => {
  26505. if (e.barcode) {
  26506. waybillCode.value = e.barcode;
  26507. getDetailByCode2(e.barcode);
  26508. }
  26509. });
  26510. uni.$on("updateLocation", (locationCode) => {
  26511. formData.positionCode = locationCode;
  26512. });
  26513. uni.$on("updateWarehouse", (data) => {
  26514. formData.godownName = data.godownName;
  26515. formData.godownId = data.id;
  26516. });
  26517. });
  26518. onShow(() => {
  26519. uni.$u.updateActivePageOnShow();
  26520. });
  26521. onUnload(() => {
  26522. uni.$u.cleanupOnPageUnload();
  26523. uni.$off("updateLocation");
  26524. uni.$off("updateWarehouse");
  26525. });
  26526. const openRemarkDialog = (index2, remark = "") => {
  26527. currentEditIndex.value = index2;
  26528. currentRemark.value = remark;
  26529. remarkVisible.value = true;
  26530. };
  26531. const handleRemarkConfirm = (remark) => {
  26532. if (currentEditIndex.value >= 0) {
  26533. ordersMap.value[currentEditIndex.value].remark = remark;
  26534. }
  26535. currentEditIndex.value = -1;
  26536. currentRemark.value = "";
  26537. };
  26538. const selectWarehouse = () => {
  26539. uni.redirectTo({
  26540. url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
  26541. });
  26542. };
  26543. const __returned__ = { waybillCode, formData, playGlobalSound, ordersMap, codeMap, getDetailByCode: getDetailByCode2, remarkVisible, currentRemark, currentEditIndex, goBack, onSubmit, handleSubmitConfirm, clearData, editOrder, openScan, selectLocation, deleteOrder, openRemarkDialog, handleRemarkConfirm, selectWarehouse, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, get onShow() {
  26544. return onShow;
  26545. }, get onUnload() {
  26546. return onUnload;
  26547. }, BadItem, RemarkDialog };
  26548. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26549. return __returned__;
  26550. }
  26551. };
  26552. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  26553. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  26554. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  26555. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  26556. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  26557. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  26558. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  26559. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  26560. const _directive_permission = vue.resolveDirective("permission");
  26561. return vue.openBlock(), vue.createElementBlock("view", {
  26562. class: "common-page",
  26563. style: { "padding": "0" },
  26564. onClick: $setup.playGlobalSound
  26565. }, [
  26566. vue.createCommentVNode(" 顶部导航栏 "),
  26567. vue.createElementVNode("view", { class: "header" }, [
  26568. vue.createVNode(_component_u_navbar, {
  26569. title: "不良入库",
  26570. border: false,
  26571. fixed: "",
  26572. "safe-area-inset-top": ""
  26573. }, {
  26574. left: vue.withCtx(() => [
  26575. vue.createVNode(_component_u_icon, {
  26576. name: "arrow-left",
  26577. color: "#333333",
  26578. size: "20",
  26579. onClick: $setup.goBack
  26580. })
  26581. ]),
  26582. right: vue.withCtx(() => [
  26583. vue.withDirectives(vue.createVNode(
  26584. _component_u_text,
  26585. {
  26586. type: "primary",
  26587. text: "提交",
  26588. onClick: $setup.onSubmit
  26589. },
  26590. null,
  26591. 512
  26592. /* NEED_PATCH */
  26593. ), [
  26594. [_directive_permission, "app:wms:badIn:submit"]
  26595. ])
  26596. ]),
  26597. _: 1
  26598. /* STABLE */
  26599. })
  26600. ]),
  26601. vue.createCommentVNode(" 主要内容区域 "),
  26602. vue.createElementVNode("view", { class: "content" }, [
  26603. vue.createCommentVNode(" 订单基本信息 "),
  26604. vue.createElementVNode("view", { class: "info-section" }, [
  26605. vue.createVNode(_component_u_form, {
  26606. model: $setup.formData,
  26607. ref: "formRef",
  26608. "label-width": "80px",
  26609. "label-position": "left"
  26610. }, {
  26611. default: vue.withCtx(() => [
  26612. vue.createVNode(_component_u_form_item, {
  26613. label: "订单总数",
  26614. required: ""
  26615. }, {
  26616. default: vue.withCtx(() => [
  26617. vue.createElementVNode(
  26618. "span",
  26619. null,
  26620. vue.toDisplayString($setup.ordersMap.length),
  26621. 1
  26622. /* TEXT */
  26623. )
  26624. ]),
  26625. _: 1
  26626. /* STABLE */
  26627. }),
  26628. vue.createVNode(_component_u_form_item, {
  26629. label: "仓库",
  26630. required: ""
  26631. }, {
  26632. default: vue.withCtx(() => [
  26633. vue.createElementVNode("view", {
  26634. onClick: $setup.selectWarehouse,
  26635. style: { "width": "100%" }
  26636. }, [
  26637. vue.createVNode(_component_u_input, {
  26638. modelValue: $setup.formData.godownName,
  26639. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.godownName = $event),
  26640. readonly: "",
  26641. "custom-style": "font-size:32rpx",
  26642. placeholder: "请选择仓库",
  26643. suffixIcon: "arrow-right"
  26644. }, null, 8, ["modelValue"])
  26645. ])
  26646. ]),
  26647. _: 1
  26648. /* STABLE */
  26649. }),
  26650. vue.createVNode(_component_u_form_item, {
  26651. label: "库位",
  26652. required: ""
  26653. }, {
  26654. default: vue.withCtx(() => [
  26655. vue.createElementVNode("view", {
  26656. onClick: $setup.selectLocation,
  26657. style: { "width": "100%" }
  26658. }, [
  26659. vue.createVNode(_component_u_input, {
  26660. modelValue: $setup.formData.positionCode,
  26661. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.positionCode = $event),
  26662. readonly: "",
  26663. "custom-style": "font-size:32rpx",
  26664. placeholder: "请选择库位",
  26665. suffixIcon: "arrow-right"
  26666. }, null, 8, ["modelValue"])
  26667. ])
  26668. ]),
  26669. _: 1
  26670. /* STABLE */
  26671. })
  26672. ]),
  26673. _: 1
  26674. /* STABLE */
  26675. }, 8, ["model"])
  26676. ]),
  26677. vue.createCommentVNode(" 订单列表 "),
  26678. vue.createElementVNode("view", { class: "order-list" }, [
  26679. (vue.openBlock(true), vue.createElementBlock(
  26680. vue.Fragment,
  26681. null,
  26682. vue.renderList($setup.ordersMap, (order, index2) => {
  26683. return vue.openBlock(), vue.createBlock($setup["BadItem"], {
  26684. key: index2,
  26685. data: order,
  26686. onDelete: ($event) => $setup.deleteOrder(index2),
  26687. onEdit: ($event) => $setup.editOrder(index2)
  26688. }, null, 8, ["data", "onDelete", "onEdit"]);
  26689. }),
  26690. 128
  26691. /* KEYED_FRAGMENT */
  26692. ))
  26693. ]),
  26694. vue.createCommentVNode(" 底部扫码输入框 "),
  26695. vue.createElementVNode("view", {
  26696. class: "fixed-bottom pad-20",
  26697. style: { "background": "#ffffff" }
  26698. }, [
  26699. vue.createVNode(_component_u_search, {
  26700. placeholder: "请输入物流单号",
  26701. searchIconSize: 24,
  26702. bgColor: "#f6f7f6",
  26703. onSearch: _cache[2] || (_cache[2] = ($event) => $setup.getDetailByCode($setup.waybillCode)),
  26704. modelValue: $setup.waybillCode,
  26705. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.waybillCode = $event),
  26706. "custom-style": "font-size:32rpx",
  26707. "placeholder-style": "font-size:32rpx",
  26708. clearabled: true,
  26709. focus: false,
  26710. showAction: false,
  26711. height: 42
  26712. }, null, 8, ["modelValue"]),
  26713. vue.createVNode(_component_u_icon, {
  26714. name: "scan",
  26715. size: "32",
  26716. color: "#19be6b",
  26717. onClick: $setup.openScan
  26718. })
  26719. ])
  26720. ]),
  26721. vue.createCommentVNode(" 备注弹窗 "),
  26722. vue.createVNode($setup["RemarkDialog"], {
  26723. visible: $setup.remarkVisible,
  26724. "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => $setup.remarkVisible = $event),
  26725. "initial-value": $setup.currentRemark,
  26726. onConfirm: $setup.handleRemarkConfirm
  26727. }, null, 8, ["visible", "initial-value"])
  26728. ]);
  26729. }
  26730. const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-04095d32"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/bad-in.vue"]]);
  26731. const _sfc_main$G = {
  26732. __name: "bad-out",
  26733. setup(__props, { expose: __expose }) {
  26734. __expose();
  26735. const searchText = vue.ref("");
  26736. const searchType = vue.ref("1");
  26737. function playGlobalSound() {
  26738. uni.$u.playClickSound();
  26739. }
  26740. const onSearch = () => {
  26741. uni.redirectTo({
  26742. url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}&searchType=${searchType.value}`
  26743. });
  26744. };
  26745. const openScan = () => {
  26746. uni.scanCode({
  26747. success: (res2) => {
  26748. searchText.value = res2.result;
  26749. onSearch();
  26750. },
  26751. fail: (err) => {
  26752. uni.showToast({
  26753. title: "扫码失败",
  26754. icon: "error"
  26755. });
  26756. }
  26757. });
  26758. };
  26759. onLoad(() => {
  26760. uni.$u.useGlobalEvent((e) => {
  26761. if (e.barcode) {
  26762. searchText.value = e.barcode;
  26763. onSearch();
  26764. }
  26765. });
  26766. });
  26767. onShow(() => {
  26768. uni.$u.updateActivePageOnShow();
  26769. });
  26770. onUnload(() => {
  26771. uni.$u.cleanupOnPageUnload();
  26772. });
  26773. const __returned__ = { searchText, searchType, playGlobalSound, onSearch, openScan, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  26774. return onLoad;
  26775. }, get onShow() {
  26776. return onShow;
  26777. }, get onUnload() {
  26778. return onUnload;
  26779. } };
  26780. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26781. return __returned__;
  26782. }
  26783. };
  26784. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  26785. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  26786. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  26787. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  26788. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  26789. return vue.openBlock(), vue.createElementBlock("view", {
  26790. class: "container flex-d h100",
  26791. onClick: $setup.playGlobalSound
  26792. }, [
  26793. vue.createCommentVNode(" 库位列表 "),
  26794. vue.createElementVNode("view", { class: "location-list flex-1" }, [
  26795. vue.createElementVNode("view", { class: "no-data flex-c mt-60" }, "请输入快递单号/订单编号")
  26796. ]),
  26797. vue.createCommentVNode(" 底部搜索框 "),
  26798. vue.createElementVNode("view", {
  26799. class: "pad-20 flex flex-column",
  26800. style: { "background": "#ffffff" }
  26801. }, [
  26802. vue.createVNode(_component_u_radio_group, {
  26803. modelValue: $setup.searchType,
  26804. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchType = $event),
  26805. class: "mb-20 ml-20"
  26806. }, {
  26807. default: vue.withCtx(() => [
  26808. vue.createVNode(_component_u_radio, {
  26809. label: "查订单",
  26810. name: "1",
  26811. "label-size": "17"
  26812. }),
  26813. vue.createVNode(_component_u_radio, {
  26814. label: "查物流",
  26815. "custom-style": "margin-left:20px",
  26816. name: "2",
  26817. "label-size": "17"
  26818. })
  26819. ]),
  26820. _: 1
  26821. /* STABLE */
  26822. }, 8, ["modelValue"]),
  26823. vue.createElementVNode("view", { class: "flex-a" }, [
  26824. vue.createVNode(_component_u_search, {
  26825. modelValue: $setup.searchText,
  26826. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchText = $event),
  26827. placeholder: "请输入快递单号/订单编号",
  26828. "show-action": false,
  26829. clearabled: true,
  26830. onSearch: $setup.onSearch,
  26831. height: "40"
  26832. }, null, 8, ["modelValue"]),
  26833. vue.createVNode(_component_u_icon, {
  26834. name: "scan",
  26835. size: "28",
  26836. color: "#19be6b",
  26837. onClick: $setup.openScan
  26838. })
  26839. ])
  26840. ])
  26841. ]);
  26842. }
  26843. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/bad-out.vue"]]);
  26844. const _sfc_main$F = {
  26845. __name: "BadOutCard",
  26846. props: {
  26847. item: Object
  26848. },
  26849. setup(__props, { expose: __expose }) {
  26850. __expose();
  26851. const props2 = __props;
  26852. const __returned__ = { props: props2 };
  26853. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26854. return __returned__;
  26855. }
  26856. };
  26857. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  26858. var _a;
  26859. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  26860. vue.createElementVNode("view", { class: "flex w100" }, [
  26861. vue.createElementVNode("view", { class: "flex-d" }, [
  26862. vue.createElementVNode("image", {
  26863. style: { "width": "80px", "height": "100px" },
  26864. src: $props.item.cover,
  26865. mode: "aspectFill"
  26866. }, null, 8, ["src"]),
  26867. vue.createElementVNode(
  26868. "view",
  26869. { class: "quantity mt-20" },
  26870. "数量: " + vue.toDisplayString($props.item.num),
  26871. 1
  26872. /* TEXT */
  26873. )
  26874. ]),
  26875. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  26876. vue.createElementVNode(
  26877. "view",
  26878. { class: "common-title mb-20" },
  26879. vue.toDisplayString($props.item.bookName),
  26880. 1
  26881. /* TEXT */
  26882. ),
  26883. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26884. vue.createElementVNode(
  26885. "view",
  26886. { class: "isbn" },
  26887. "ISBN: " + vue.toDisplayString($props.item.isbn),
  26888. 1
  26889. /* TEXT */
  26890. ),
  26891. vue.createElementVNode(
  26892. "view",
  26893. { class: "set" },
  26894. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "否"),
  26895. 1
  26896. /* TEXT */
  26897. )
  26898. ]),
  26899. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26900. vue.createElementVNode(
  26901. "view",
  26902. { class: "discount" },
  26903. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  26904. 1
  26905. /* TEXT */
  26906. ),
  26907. vue.createElementVNode(
  26908. "view",
  26909. { class: "review" },
  26910. "审核金额: " + vue.toDisplayString($props.item.finalMoney),
  26911. 1
  26912. /* TEXT */
  26913. )
  26914. ]),
  26915. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26916. vue.createElementVNode(
  26917. "view",
  26918. { class: "price" },
  26919. "定价: " + vue.toDisplayString($props.item.bookPrice),
  26920. 1
  26921. /* TEXT */
  26922. ),
  26923. vue.createElementVNode(
  26924. "view",
  26925. { class: "estimate" },
  26926. "预估单价: " + vue.toDisplayString($props.item.expectMoney),
  26927. 1
  26928. /* TEXT */
  26929. )
  26930. ]),
  26931. vue.createElementVNode(
  26932. "view",
  26933. { class: "quality mb-10" },
  26934. " 品相: 良好(" + vue.toDisplayString($props.item.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.generalNum) + ") 、 极差(" + vue.toDisplayString($props.item.badNum) + ") ",
  26935. 1
  26936. /* TEXT */
  26937. ),
  26938. vue.createElementVNode(
  26939. "view",
  26940. { class: "reason color-red" },
  26941. "原因: " + vue.toDisplayString((_a = $props.item.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == 3).map((item) => item.com).join(";")),
  26942. 1
  26943. /* TEXT */
  26944. )
  26945. ])
  26946. ])
  26947. ]);
  26948. }
  26949. const BadOutCard = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-e52c1f77"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/BadOutCard.vue"]]);
  26950. const _sfc_main$E = {
  26951. __name: "bad-out-order",
  26952. setup(__props, { expose: __expose }) {
  26953. __expose();
  26954. const searchText = vue.ref("");
  26955. const searchType = vue.ref("1");
  26956. const errorMsg = vue.ref("");
  26957. const hasData = vue.ref(false);
  26958. function playGlobalSound() {
  26959. uni.$u.playClickSound();
  26960. }
  26961. const locationInfo = vue.ref({
  26962. positionCode: "",
  26963. waybillCode: "",
  26964. orderId: "",
  26965. badNum: "",
  26966. remark: "",
  26967. refundWaybillCode: ""
  26968. });
  26969. const badList = vue.ref([]);
  26970. onLoad((options) => {
  26971. searchType.value = options.searchType || "1";
  26972. if (options.searchText) {
  26973. searchText.value = options.searchText;
  26974. onSearch();
  26975. }
  26976. uni.$u.useGlobalEvent((e) => {
  26977. if (e.barcode) {
  26978. searchText.value = e.barcode;
  26979. onSearch();
  26980. }
  26981. });
  26982. });
  26983. const getSearchType = (text) => {
  26984. return /^[0-9]+$/.test(text) ? 1 : 2;
  26985. };
  26986. const onSearch = async () => {
  26987. if (!searchText.value) {
  26988. errorMsg.value = "请输入运单号或订单编号";
  26989. hasData.value = false;
  26990. return;
  26991. }
  26992. try {
  26993. const res2 = await uni.$u.http.post("/app/stock/findOrderOutStock", {
  26994. search: searchText.value,
  26995. searchType: searchType.value
  26996. });
  26997. if (res2.code == 200) {
  26998. const data = res2.data;
  26999. errorMsg.value = "";
  27000. hasData.value = true;
  27001. locationInfo.value = {
  27002. positionCode: data.positionCode || "",
  27003. waybillCode: data.waybillCode || "",
  27004. orderId: data.orderId || "",
  27005. badNum: data.badNum || "",
  27006. remark: data.remark || "",
  27007. refundWaybillCode: data.refundWaybillCode || ""
  27008. };
  27009. badList.value = data.detailVoList || [];
  27010. } else {
  27011. errorMsg.value = res2.msg || "未找到相关数据";
  27012. hasData.value = false;
  27013. return;
  27014. }
  27015. } catch (error2) {
  27016. errorMsg.value = error2.message || "获取数据失败";
  27017. hasData.value = false;
  27018. uni.showToast({
  27019. title: "获取数据失败",
  27020. icon: "none"
  27021. });
  27022. }
  27023. };
  27024. const openScan = () => {
  27025. uni.scanCode({
  27026. success: (res2) => {
  27027. searchText.value = res2.result;
  27028. onSearch();
  27029. },
  27030. fail: (err) => {
  27031. uni.showToast({
  27032. title: "扫码失败",
  27033. icon: "error"
  27034. });
  27035. }
  27036. });
  27037. };
  27038. onShow(() => {
  27039. uni.$u.updateActivePageOnShow();
  27040. });
  27041. onUnload(() => {
  27042. uni.$u.cleanupOnPageUnload();
  27043. });
  27044. const onConfirm = () => {
  27045. uni.showModal({
  27046. title: "确认提示",
  27047. content: "是否确认出库?",
  27048. success: async (res2) => {
  27049. if (res2.confirm) {
  27050. uni.$u.http.post("/app/stock/outStock", {
  27051. orderId: locationInfo.value.orderId,
  27052. positionCode: locationInfo.value.positionCode,
  27053. outputRemark: locationInfo.value.remark
  27054. }).then((res3) => {
  27055. if (res3.code == 200) {
  27056. uni.showToast({
  27057. title: "出库成功",
  27058. icon: "success"
  27059. });
  27060. uni.$u.ttsModule.speak("出库成功");
  27061. searchText.value = "";
  27062. locationInfo.value = {
  27063. positionCode: "",
  27064. waybillCode: "",
  27065. orderId: "",
  27066. badNum: "",
  27067. remark: ""
  27068. };
  27069. badList.value = [];
  27070. } else {
  27071. uni.showToast({
  27072. title: res3.msg,
  27073. icon: "none"
  27074. });
  27075. uni.$u.ttsModule.speak(res3.msg);
  27076. }
  27077. });
  27078. }
  27079. }
  27080. });
  27081. };
  27082. const remarkVisible = vue.ref(false);
  27083. const currentRemark = vue.ref("");
  27084. const currentEditIndex = vue.ref(-1);
  27085. const openRemarkDialog = (index2, remark = "") => {
  27086. currentEditIndex.value = index2;
  27087. currentRemark.value = remark;
  27088. remarkVisible.value = true;
  27089. };
  27090. const handleRemarkConfirm = (remark) => {
  27091. if (currentEditIndex.value >= 0) {
  27092. orders.value[currentEditIndex.value].remark = remark;
  27093. }
  27094. currentEditIndex.value = -1;
  27095. currentRemark.value = "";
  27096. };
  27097. const __returned__ = { searchText, searchType, errorMsg, hasData, playGlobalSound, locationInfo, badList, getSearchType, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, RemarkDialog, get onLoad() {
  27098. return onLoad;
  27099. }, get onShow() {
  27100. return onShow;
  27101. }, get onUnload() {
  27102. return onUnload;
  27103. } };
  27104. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27105. return __returned__;
  27106. }
  27107. };
  27108. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  27109. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  27110. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  27111. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  27112. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  27113. return vue.openBlock(), vue.createElementBlock("view", {
  27114. class: "container",
  27115. onClick: $setup.playGlobalSound
  27116. }, [
  27117. vue.createCommentVNode(" 搜索框 "),
  27118. vue.createVNode(_component_u_sticky, null, {
  27119. default: vue.withCtx(() => [
  27120. vue.createElementVNode("view", { class: "search-area flex-c mb-20" }, [
  27121. vue.createVNode(_component_u_search, {
  27122. modelValue: $setup.searchText,
  27123. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27124. placeholder: $setup.searchType == "1" ? "请输入订单编号" : "请输入运单号",
  27125. "show-action": false,
  27126. clearabled: true,
  27127. onSearch: $setup.onSearch,
  27128. height: "40"
  27129. }, null, 8, ["modelValue", "placeholder"]),
  27130. vue.createVNode(_component_u_icon, {
  27131. name: "scan",
  27132. size: "28",
  27133. color: "#19be6b",
  27134. onClick: $setup.openScan
  27135. })
  27136. ])
  27137. ]),
  27138. _: 1
  27139. /* STABLE */
  27140. }),
  27141. vue.createElementVNode("view", { class: "content" }, [
  27142. vue.createCommentVNode(" 错误提示 "),
  27143. $setup.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", {
  27144. key: 0,
  27145. class: "error-section"
  27146. }, [
  27147. vue.createVNode(_component_u_icon, {
  27148. name: "info-circle",
  27149. color: "#fa3534",
  27150. size: "20"
  27151. }),
  27152. vue.createElementVNode(
  27153. "text",
  27154. { class: "error-text" },
  27155. vue.toDisplayString($setup.errorMsg),
  27156. 1
  27157. /* TEXT */
  27158. )
  27159. ])) : vue.createCommentVNode("v-if", true),
  27160. vue.createCommentVNode(" 基本信息 "),
  27161. $setup.hasData ? (vue.openBlock(), vue.createElementBlock(
  27162. vue.Fragment,
  27163. { key: 1 },
  27164. [
  27165. vue.createElementVNode("view", { class: "info-section" }, [
  27166. vue.createElementVNode(
  27167. "view",
  27168. { class: "info-item" },
  27169. "库位:" + vue.toDisplayString($setup.locationInfo.positionCode),
  27170. 1
  27171. /* TEXT */
  27172. ),
  27173. vue.createElementVNode(
  27174. "view",
  27175. { class: "info-item" },
  27176. "物流单号:" + vue.toDisplayString($setup.locationInfo.waybillCode || "-"),
  27177. 1
  27178. /* TEXT */
  27179. ),
  27180. vue.createElementVNode(
  27181. "view",
  27182. { class: "info-item" },
  27183. "退回物流:" + vue.toDisplayString($setup.locationInfo.refundWaybillCode || "-"),
  27184. 1
  27185. /* TEXT */
  27186. ),
  27187. vue.createElementVNode(
  27188. "view",
  27189. { class: "info-item" },
  27190. "订单编号:" + vue.toDisplayString($setup.locationInfo.orderId),
  27191. 1
  27192. /* TEXT */
  27193. ),
  27194. vue.createElementVNode(
  27195. "view",
  27196. { class: "info-item" },
  27197. "订单商品:" + vue.toDisplayString($setup.locationInfo.badNum),
  27198. 1
  27199. /* TEXT */
  27200. ),
  27201. vue.createElementVNode(
  27202. "view",
  27203. { class: "info-item" },
  27204. "备注信息:" + vue.toDisplayString($setup.locationInfo.remark || "-"),
  27205. 1
  27206. /* TEXT */
  27207. )
  27208. ]),
  27209. vue.createCommentVNode(" 极差商品列表 "),
  27210. vue.createElementVNode("view", { class: "bad-list" }, [
  27211. vue.createElementVNode("view", { class: "list-title mb-6" }, "极差"),
  27212. (vue.openBlock(true), vue.createElementBlock(
  27213. vue.Fragment,
  27214. null,
  27215. vue.renderList($setup.badList, (item, index2) => {
  27216. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  27217. vue.createVNode($setup["BadOutCard"], {
  27218. item,
  27219. index: index2
  27220. }, null, 8, ["item", "index"])
  27221. ]);
  27222. }),
  27223. 128
  27224. /* KEYED_FRAGMENT */
  27225. ))
  27226. ])
  27227. ],
  27228. 64
  27229. /* STABLE_FRAGMENT */
  27230. )) : vue.createCommentVNode("v-if", true)
  27231. ]),
  27232. vue.createCommentVNode(" 底部按钮 "),
  27233. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  27234. vue.createVNode(_component_u_button, {
  27235. size: "large",
  27236. type: "warning",
  27237. text: "反馈",
  27238. onClick: $setup.openRemarkDialog
  27239. }),
  27240. vue.createVNode(_component_u_button, {
  27241. size: "large",
  27242. type: "primary",
  27243. text: "确定出库",
  27244. onClick: $setup.onConfirm
  27245. })
  27246. ]),
  27247. vue.createCommentVNode(" 备注弹窗 "),
  27248. vue.createVNode($setup["RemarkDialog"], {
  27249. visible: $setup.remarkVisible,
  27250. "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $setup.remarkVisible = $event),
  27251. "initial-value": $setup.currentRemark,
  27252. onConfirm: $setup.handleRemarkConfirm
  27253. }, null, 8, ["visible", "initial-value"])
  27254. ]);
  27255. }
  27256. const PagesIndexWmsBadOutOrder = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-43bc1c65"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/bad-out-order.vue"]]);
  27257. const _sfc_main$D = {
  27258. __name: "bad-off",
  27259. setup(__props, { expose: __expose }) {
  27260. __expose();
  27261. const searchText = vue.ref("");
  27262. function playGlobalSound() {
  27263. uni.$u.playClickSound();
  27264. }
  27265. const taskList = vue.ref([]);
  27266. const loading = vue.ref(false);
  27267. const taskStatusEnum = {
  27268. 1: "待作业",
  27269. 2: "作业中",
  27270. 3: "已完成",
  27271. 4: "已关闭"
  27272. };
  27273. const getTaskStatusText = (status) => {
  27274. return taskStatusEnum[status] || "未知状态";
  27275. };
  27276. const fetchTaskList = async () => {
  27277. loading.value = true;
  27278. try {
  27279. const response = await uni.$u.http.post("/app/appstock/getNeedStockList");
  27280. formatAppLog("log", "at pages/index/wms/bad-off.vue:82", response);
  27281. taskList.value = response;
  27282. if (response.code === 200) {
  27283. taskList.value = response.data || [];
  27284. } else {
  27285. uni.showToast({
  27286. title: response.msg || "获取任务列表失败",
  27287. icon: "none"
  27288. });
  27289. }
  27290. } catch (error2) {
  27291. uni.showToast({
  27292. title: "获取任务列表失败",
  27293. icon: "none"
  27294. });
  27295. } finally {
  27296. loading.value = false;
  27297. }
  27298. };
  27299. const onSearch = () => {
  27300. fetchTaskList();
  27301. };
  27302. const openScan = () => {
  27303. uni.scanCode({
  27304. success: (res2) => {
  27305. searchText.value = res2.result;
  27306. onSearch();
  27307. },
  27308. fail: (err) => {
  27309. uni.showToast({
  27310. title: "扫码失败",
  27311. icon: "error"
  27312. });
  27313. }
  27314. });
  27315. };
  27316. const handleTaskClick = (task) => {
  27317. uni.showModal({
  27318. title: "领取确认",
  27319. content: "是否确认领取下架任务?",
  27320. cancelText: "取消",
  27321. confirmText: "确认",
  27322. success: async (res2) => {
  27323. playGlobalSound();
  27324. if (res2.confirm) {
  27325. try {
  27326. const response = await uni.$u.http.post(`/app/appstock/lockStockTask?taskCode=${task.taskCode}`);
  27327. if (response.code === 200) {
  27328. uni.redirectTo({
  27329. url: `/pages/index/wms/task-detail?taskCode=${task.taskCode}`
  27330. });
  27331. } else {
  27332. uni.showToast({
  27333. title: response.msg || "任务锁定失败",
  27334. icon: "none"
  27335. });
  27336. }
  27337. } catch (error2) {
  27338. uni.showToast({
  27339. title: error2,
  27340. icon: "none"
  27341. });
  27342. }
  27343. }
  27344. }
  27345. });
  27346. };
  27347. vue.onMounted(() => {
  27348. fetchTaskList();
  27349. });
  27350. const __returned__ = { searchText, playGlobalSound, taskList, loading, taskStatusEnum, getTaskStatusText, fetchTaskList, onSearch, openScan, handleTaskClick, ref: vue.ref, onMounted: vue.onMounted };
  27351. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27352. return __returned__;
  27353. }
  27354. };
  27355. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  27356. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  27357. return vue.openBlock(), vue.createElementBlock("view", {
  27358. class: "container",
  27359. onClick: $setup.playGlobalSound
  27360. }, [
  27361. vue.createCommentVNode(" 任务列表 "),
  27362. vue.createElementVNode("view", { class: "task-list" }, [
  27363. !$setup.loading ? (vue.openBlock(), vue.createElementBlock(
  27364. vue.Fragment,
  27365. { key: 0 },
  27366. [
  27367. $setup.taskList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  27368. vue.Fragment,
  27369. { key: 0 },
  27370. vue.renderList($setup.taskList, (item, index2) => {
  27371. return vue.openBlock(), vue.createElementBlock("view", {
  27372. key: index2,
  27373. class: "task-card",
  27374. onClick: ($event) => $setup.handleTaskClick(item)
  27375. }, [
  27376. vue.createElementVNode("view", { class: "task-header" }, [
  27377. vue.createElementVNode(
  27378. "text",
  27379. { class: "task-no" },
  27380. "作业单号:" + vue.toDisplayString(item.taskCode),
  27381. 1
  27382. /* TEXT */
  27383. )
  27384. ]),
  27385. vue.createElementVNode("view", { class: "task-content" }, [
  27386. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  27387. vue.createElementVNode("text", { class: "label" }, "仓库:"),
  27388. vue.createElementVNode(
  27389. "text",
  27390. { class: "value" },
  27391. vue.toDisplayString(item.godownName),
  27392. 1
  27393. /* TEXT */
  27394. )
  27395. ]),
  27396. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  27397. vue.createElementVNode("text", { class: "label" }, "订单数量:"),
  27398. vue.createElementVNode(
  27399. "text",
  27400. { class: "value" },
  27401. vue.toDisplayString(item.orderNum),
  27402. 1
  27403. /* TEXT */
  27404. )
  27405. ]),
  27406. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  27407. vue.createElementVNode("text", { class: "label" }, "创建时间:"),
  27408. vue.createElementVNode(
  27409. "text",
  27410. { class: "value" },
  27411. vue.toDisplayString(item.createTime),
  27412. 1
  27413. /* TEXT */
  27414. )
  27415. ]),
  27416. vue.createElementVNode("view", { class: "flex-a" }, [
  27417. vue.createElementVNode("text", { class: "label" }, "作业状态:"),
  27418. vue.createElementVNode(
  27419. "text",
  27420. { class: "value" },
  27421. vue.toDisplayString($setup.getTaskStatusText(item.taskStatus)),
  27422. 1
  27423. /* TEXT */
  27424. )
  27425. ])
  27426. ])
  27427. ], 8, ["onClick"]);
  27428. }),
  27429. 128
  27430. /* KEYED_FRAGMENT */
  27431. )) : (vue.openBlock(), vue.createElementBlock("view", {
  27432. key: 1,
  27433. class: "empty-state"
  27434. }, [
  27435. vue.createElementVNode("text", null, "暂无任务数据")
  27436. ]))
  27437. ],
  27438. 64
  27439. /* STABLE_FRAGMENT */
  27440. )) : (vue.openBlock(), vue.createElementBlock("view", {
  27441. key: 1,
  27442. class: "loading-state"
  27443. }, [
  27444. vue.createVNode(_component_u_loading_icon),
  27445. vue.createElementVNode("text", null, "加载中...")
  27446. ]))
  27447. ])
  27448. ]);
  27449. }
  27450. const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-58677b56"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/bad-off.vue"]]);
  27451. const _sfc_main$C = {
  27452. __name: "order-query",
  27453. setup(__props, { expose: __expose }) {
  27454. __expose();
  27455. const query = vue.reactive({
  27456. searchType: 2,
  27457. search: ""
  27458. });
  27459. const orderQuery = () => {
  27460. if (!query.search) {
  27461. uni.$u.toast("请输入快递单号/订单编号");
  27462. return;
  27463. }
  27464. uni.redirectTo({
  27465. url: `/pages/index/wms/order-query-list?id=${query.search}`
  27466. });
  27467. };
  27468. function openScan() {
  27469. uni.scanCode({
  27470. success: (res2) => {
  27471. query.search = res2.result;
  27472. orderQuery();
  27473. }
  27474. });
  27475. }
  27476. onLoad(() => {
  27477. uni.$u.useGlobalEvent((e) => {
  27478. if (e.barcode) {
  27479. query.search = e.barcode;
  27480. orderQuery();
  27481. }
  27482. });
  27483. });
  27484. onShow(() => {
  27485. uni.$u.updateActivePageOnShow();
  27486. });
  27487. onUnload(() => {
  27488. uni.$u.cleanupOnPageUnload();
  27489. });
  27490. const __returned__ = { query, orderQuery, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27491. return onLoad;
  27492. }, get onShow() {
  27493. return onShow;
  27494. }, get onUnload() {
  27495. return onUnload;
  27496. } };
  27497. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27498. return __returned__;
  27499. }
  27500. };
  27501. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  27502. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  27503. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  27504. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27505. vue.createCommentVNode(" 底部扫码输入框 "),
  27506. vue.createElementVNode("view", {
  27507. class: "fixed-bottom pad-20",
  27508. style: { "background": "#ffffff" }
  27509. }, [
  27510. vue.createVNode(_component_u_search, {
  27511. placeholder: "请输入快递单号/订单编号",
  27512. searchIconSize: 24,
  27513. bgColor: "#f6f7f6",
  27514. onSearch: $setup.orderQuery,
  27515. modelValue: $setup.query.search,
  27516. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.query.search = $event),
  27517. "custom-style": "font-size:32rpx",
  27518. "placeholder-style": "font-size:32rpx",
  27519. clearabled: true,
  27520. focus: false,
  27521. showAction: false,
  27522. height: 42
  27523. }, null, 8, ["modelValue"]),
  27524. vue.createVNode(_component_u_icon, {
  27525. name: "scan",
  27526. size: "34",
  27527. color: "#19be6b",
  27528. onClick: $setup.openScan
  27529. })
  27530. ])
  27531. ]);
  27532. }
  27533. const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-c65e1cc0"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/order-query.vue"]]);
  27534. const props$5 = {
  27535. props: {
  27536. // 是否显示圆点
  27537. isDot: {
  27538. type: Boolean,
  27539. default: props$G.badge.isDot
  27540. },
  27541. // 显示的内容
  27542. value: {
  27543. type: [Number, String],
  27544. default: props$G.badge.value
  27545. },
  27546. // 显示的内容
  27547. modelValue: {
  27548. type: [Number, String],
  27549. default: props$G.badge.modelValue
  27550. },
  27551. // 是否显示
  27552. show: {
  27553. type: Boolean,
  27554. default: props$G.badge.show
  27555. },
  27556. // 最大值,超过最大值会显示 '{max}+'
  27557. max: {
  27558. type: [Number, String],
  27559. default: props$G.badge.max
  27560. },
  27561. // 主题类型,error|warning|success|primary
  27562. type: {
  27563. type: String,
  27564. default: props$G.badge.type
  27565. },
  27566. // 当数值为 0 时,是否展示 Badge
  27567. showZero: {
  27568. type: Boolean,
  27569. default: props$G.badge.showZero
  27570. },
  27571. // 背景颜色,优先级比type高,如设置,type参数会失效
  27572. bgColor: {
  27573. type: [String, null],
  27574. default: props$G.badge.bgColor
  27575. },
  27576. // 字体颜色
  27577. color: {
  27578. type: [String, null],
  27579. default: props$G.badge.color
  27580. },
  27581. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  27582. shape: {
  27583. type: String,
  27584. default: props$G.badge.shape
  27585. },
  27586. // 设置数字的显示方式,overflow|ellipsis|limit
  27587. // overflow会根据max字段判断,超出显示`${max}+`
  27588. // ellipsis会根据max判断,超出显示`${max}...`
  27589. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  27590. numberType: {
  27591. type: String,
  27592. default: props$G.badge.numberType
  27593. },
  27594. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  27595. offset: {
  27596. type: Array,
  27597. default: props$G.badge.offset
  27598. },
  27599. // 是否反转背景和字体颜色
  27600. inverted: {
  27601. type: Boolean,
  27602. default: props$G.badge.inverted
  27603. },
  27604. // 是否绝对定位
  27605. absolute: {
  27606. type: Boolean,
  27607. default: props$G.badge.absolute
  27608. }
  27609. }
  27610. };
  27611. const _sfc_main$B = {
  27612. name: "u-badge",
  27613. mixins: [mpMixin, props$5, mixin],
  27614. computed: {
  27615. // 是否将badge中心与父组件右上角重合
  27616. boxStyle() {
  27617. let style = {};
  27618. return style;
  27619. },
  27620. // 整个组件的样式
  27621. badgeStyle() {
  27622. const style = {};
  27623. if (this.color) {
  27624. style.color = this.color;
  27625. }
  27626. if (this.bgColor && !this.inverted) {
  27627. style.backgroundColor = this.bgColor;
  27628. }
  27629. if (this.absolute) {
  27630. style.position = "absolute";
  27631. if (this.offset.length) {
  27632. const top = this.offset[0];
  27633. const right = this.offset[1] || top;
  27634. style.top = uni.$u.addUnit(top);
  27635. style.right = uni.$u.addUnit(right);
  27636. }
  27637. }
  27638. return style;
  27639. },
  27640. showValue() {
  27641. switch (this.numberType) {
  27642. case "overflow":
  27643. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  27644. case "ellipsis":
  27645. return Number(this.value) > Number(this.max) ? "..." : this.value;
  27646. case "limit":
  27647. return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value;
  27648. default:
  27649. return Number(this.value);
  27650. }
  27651. }
  27652. }
  27653. };
  27654. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  27655. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  27656. "text",
  27657. {
  27658. key: 0,
  27659. class: vue.normalizeClass([[_ctx.isDot ? "u-badge--dot" : "u-badge--not-dot", _ctx.inverted && "u-badge--inverted", _ctx.shape === "horn" && "u-badge--horn", `u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`], "u-badge"]),
  27660. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
  27661. },
  27662. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  27663. 7
  27664. /* TEXT, CLASS, STYLE */
  27665. )) : vue.createCommentVNode("v-if", true);
  27666. }
  27667. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-06cca9b7"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]);
  27668. const props$4 = {
  27669. props: {
  27670. // 滑块的移动过渡时间,单位ms
  27671. duration: {
  27672. type: Number,
  27673. default: props$G.tabs.duration
  27674. },
  27675. // tabs标签数组
  27676. list: {
  27677. type: Array,
  27678. default: props$G.tabs.list
  27679. },
  27680. // 滑块颜色
  27681. lineColor: {
  27682. type: String,
  27683. default: props$G.tabs.lineColor
  27684. },
  27685. // 菜单选择中时的样式
  27686. activeStyle: {
  27687. type: [String, Object],
  27688. default: props$G.tabs.activeStyle
  27689. },
  27690. // 菜单非选中时的样式
  27691. inactiveStyle: {
  27692. type: [String, Object],
  27693. default: props$G.tabs.inactiveStyle
  27694. },
  27695. // 滑块长度
  27696. lineWidth: {
  27697. type: [String, Number],
  27698. default: props$G.tabs.lineWidth
  27699. },
  27700. // 滑块高度
  27701. lineHeight: {
  27702. type: [String, Number],
  27703. default: props$G.tabs.lineHeight
  27704. },
  27705. // 滑块背景显示大小,当滑块背景设置为图片时使用
  27706. lineBgSize: {
  27707. type: String,
  27708. default: props$G.tabs.lineBgSize
  27709. },
  27710. // 菜单item的样式
  27711. itemStyle: {
  27712. type: [String, Object],
  27713. default: props$G.tabs.itemStyle
  27714. },
  27715. // 菜单是否可滚动
  27716. scrollable: {
  27717. type: Boolean,
  27718. default: props$G.tabs.scrollable
  27719. },
  27720. // 当前选中标签的索引
  27721. current: {
  27722. type: [Number, String],
  27723. default: props$G.tabs.current
  27724. },
  27725. // 默认读取的键名
  27726. keyName: {
  27727. type: String,
  27728. default: props$G.tabs.keyName
  27729. }
  27730. }
  27731. };
  27732. const _sfc_main$A = {
  27733. name: "u-tabs",
  27734. mixins: [mpMixin, mixin, props$4],
  27735. data() {
  27736. return {
  27737. firstTime: true,
  27738. scrollLeft: 0,
  27739. scrollViewWidth: 0,
  27740. lineOffsetLeft: 0,
  27741. tabsRect: {
  27742. left: 0
  27743. },
  27744. innerCurrent: 0,
  27745. moving: false
  27746. };
  27747. },
  27748. watch: {
  27749. current: {
  27750. immediate: true,
  27751. handler(newValue, oldValue) {
  27752. if (newValue !== this.innerCurrent) {
  27753. this.innerCurrent = newValue;
  27754. this.$nextTick(() => {
  27755. this.resize();
  27756. });
  27757. }
  27758. }
  27759. },
  27760. // list变化时,重新渲染list各项信息
  27761. list() {
  27762. this.$nextTick(() => {
  27763. this.resize();
  27764. });
  27765. }
  27766. },
  27767. computed: {
  27768. textStyle() {
  27769. return (index2) => {
  27770. const style = {};
  27771. const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
  27772. this.inactiveStyle
  27773. );
  27774. if (this.list[index2].disabled) {
  27775. style.color = "#c8c9cc";
  27776. }
  27777. return uni.$u.deepMerge(customeStyle, style);
  27778. };
  27779. },
  27780. propsBadge() {
  27781. return uni.$u.props.badge;
  27782. }
  27783. },
  27784. async mounted() {
  27785. this.init();
  27786. },
  27787. emits: ["click", "change"],
  27788. methods: {
  27789. setLineLeft() {
  27790. const tabItem = this.list[this.innerCurrent];
  27791. if (!tabItem) {
  27792. return;
  27793. }
  27794. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  27795. const lineWidth = uni.$u.getPx(this.lineWidth);
  27796. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  27797. if (this.firstTime) {
  27798. setTimeout(() => {
  27799. this.firstTime = false;
  27800. }, 10);
  27801. }
  27802. },
  27803. // nvue下设置滑块的位置
  27804. animation(x, duration = 0) {
  27805. },
  27806. // 点击某一个标签
  27807. clickHandler(item, index2) {
  27808. this.$emit("click", {
  27809. ...item,
  27810. index: index2
  27811. });
  27812. if (item.disabled)
  27813. return;
  27814. this.innerCurrent = index2;
  27815. this.resize();
  27816. this.$emit("change", {
  27817. ...item,
  27818. index: index2
  27819. });
  27820. },
  27821. init() {
  27822. uni.$u.sleep().then(() => {
  27823. this.resize();
  27824. });
  27825. },
  27826. setScrollLeft() {
  27827. const tabRect = this.list[this.innerCurrent];
  27828. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  27829. return total + curr.rect.width;
  27830. }, 0);
  27831. const windowWidth = uni.$u.sys().windowWidth;
  27832. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  27833. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  27834. this.scrollLeft = Math.max(0, scrollLeft);
  27835. },
  27836. // 获取所有标签的尺寸
  27837. resize() {
  27838. if (this.list.length === 0) {
  27839. return;
  27840. }
  27841. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  27842. this.tabsRect = tabsRect;
  27843. this.scrollViewWidth = 0;
  27844. itemRect.map((item, index2) => {
  27845. this.scrollViewWidth += item.width;
  27846. this.list[index2].rect = item;
  27847. });
  27848. this.setLineLeft();
  27849. this.setScrollLeft();
  27850. });
  27851. },
  27852. // 获取导航菜单的尺寸
  27853. getTabsRect() {
  27854. return new Promise((resolve) => {
  27855. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  27856. });
  27857. },
  27858. // 获取所有标签的尺寸
  27859. getAllItemRect() {
  27860. return new Promise((resolve) => {
  27861. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  27862. `u-tabs__wrapper__nav__item-${index2}`,
  27863. true
  27864. ));
  27865. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  27866. });
  27867. },
  27868. // 获取各个标签的尺寸
  27869. queryRect(el, item) {
  27870. return new Promise((resolve) => {
  27871. this.$uGetRect(`.${el}`).then((size) => {
  27872. resolve(size);
  27873. });
  27874. });
  27875. }
  27876. }
  27877. };
  27878. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  27879. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$1);
  27880. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  27881. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  27882. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  27883. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  27884. vue.createElementVNode("scroll-view", {
  27885. "scroll-x": _ctx.scrollable,
  27886. "scroll-left": $data.scrollLeft,
  27887. "scroll-with-animation": "",
  27888. class: "u-tabs__wrapper__scroll-view",
  27889. "show-scrollbar": false,
  27890. ref: "u-tabs__wrapper__scroll-view"
  27891. }, [
  27892. vue.createElementVNode(
  27893. "view",
  27894. {
  27895. class: "u-tabs__wrapper__nav",
  27896. ref: "u-tabs__wrapper__nav"
  27897. },
  27898. [
  27899. (vue.openBlock(true), vue.createElementBlock(
  27900. vue.Fragment,
  27901. null,
  27902. vue.renderList(_ctx.list, (item, index2) => {
  27903. return vue.openBlock(), vue.createElementBlock("view", {
  27904. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
  27905. key: index2,
  27906. onClick: ($event) => $options.clickHandler(item, index2),
  27907. ref_for: true,
  27908. ref: `u-tabs__wrapper__nav__item-${index2}`,
  27909. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  27910. }, [
  27911. vue.createElementVNode(
  27912. "text",
  27913. {
  27914. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  27915. style: vue.normalizeStyle([$options.textStyle(index2)])
  27916. },
  27917. vue.toDisplayString(item[_ctx.keyName]),
  27918. 7
  27919. /* TEXT, CLASS, STYLE */
  27920. ),
  27921. vue.createVNode(_component_u_badge, {
  27922. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  27923. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  27924. value: item.badge && item.badge.value || $options.propsBadge.value,
  27925. max: item.badge && item.badge.max || $options.propsBadge.max,
  27926. type: item.badge && item.badge.type || $options.propsBadge.type,
  27927. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  27928. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  27929. color: item.badge && item.badge.color || $options.propsBadge.color,
  27930. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  27931. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  27932. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  27933. customStyle: "margin-left: 4px;"
  27934. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  27935. ], 14, ["onClick"]);
  27936. }),
  27937. 128
  27938. /* KEYED_FRAGMENT */
  27939. )),
  27940. vue.createElementVNode(
  27941. "view",
  27942. {
  27943. class: "u-tabs__wrapper__nav__line",
  27944. ref: "u-tabs__wrapper__nav__line",
  27945. style: vue.normalizeStyle([{
  27946. width: _ctx.$u.addUnit(_ctx.lineWidth),
  27947. transform: `translate(${$data.lineOffsetLeft}px)`,
  27948. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  27949. height: _ctx.$u.addUnit(_ctx.lineHeight),
  27950. background: _ctx.lineColor,
  27951. backgroundSize: _ctx.lineBgSize
  27952. }])
  27953. },
  27954. null,
  27955. 4
  27956. /* STYLE */
  27957. )
  27958. ],
  27959. 512
  27960. /* NEED_PATCH */
  27961. )
  27962. ], 8, ["scroll-x", "scroll-left"])
  27963. ]),
  27964. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  27965. ])
  27966. ]);
  27967. }
  27968. const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-02b0c54f"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]);
  27969. const _sfc_main$z = {
  27970. __name: "order-query-list",
  27971. setup(__props, { expose: __expose }) {
  27972. __expose();
  27973. const list1 = vue.reactive([{
  27974. name: "商品明细"
  27975. }, {
  27976. name: "操作记录"
  27977. }]);
  27978. const activeTab = vue.ref(0);
  27979. const query = vue.reactive({
  27980. searchType: 2,
  27981. search: ""
  27982. });
  27983. const determineSearchType = (search) => {
  27984. const isNumberString = /^\d+$/.test(search.toString());
  27985. return isNumberString ? 1 : 2;
  27986. };
  27987. const detail = vue.ref({});
  27988. const orderQuery = () => {
  27989. if (!query.search) {
  27990. uni.$u.toast("请输入快递单号/订单编号");
  27991. uni.$u.ttsModule.speak("请输入快递单号/订单编号");
  27992. return;
  27993. }
  27994. query.searchType = determineSearchType(query.search);
  27995. uni.$u.http.get("/app/stock/findOrder", { params: query }).then((res2) => {
  27996. if (res2.code == 200) {
  27997. detail.value = res2.data;
  27998. uni.$u.ttsModule.speak("查询成功");
  27999. getOperationLogs(res2.data.orderId);
  28000. } else {
  28001. uni.$u.toast(res2.msg);
  28002. uni.$u.ttsModule.speak(res2.msg);
  28003. }
  28004. });
  28005. };
  28006. const operationLogs = vue.ref([]);
  28007. const getOperationLogs = (orderId) => {
  28008. uni.$u.http.get("/app/stock/getGodownStocklog", { params: { orderId } }).then((res2) => {
  28009. if (res2.code == 200) {
  28010. operationLogs.value = res2.data;
  28011. }
  28012. });
  28013. };
  28014. function handleTabChange(tab) {
  28015. activeTab.value = tab.index;
  28016. }
  28017. function openScan() {
  28018. uni.scanCode({
  28019. success: (res2) => {
  28020. query.search = res2.result;
  28021. orderQuery();
  28022. }
  28023. });
  28024. }
  28025. onLoad((options) => {
  28026. if (options.id) {
  28027. query.search = options.id;
  28028. orderQuery();
  28029. }
  28030. uni.$u.useGlobalEvent((e) => {
  28031. if (e.barcode) {
  28032. getDetailByCode(e.barcode);
  28033. }
  28034. });
  28035. });
  28036. onShow(() => {
  28037. uni.$u.updateActivePageOnShow();
  28038. });
  28039. onUnload(() => {
  28040. uni.$u.cleanupOnPageUnload();
  28041. });
  28042. const __returned__ = { list1, activeTab, query, determineSearchType, detail, orderQuery, operationLogs, getOperationLogs, handleTabChange, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  28043. return onLoad;
  28044. }, get onShow() {
  28045. return onShow;
  28046. }, get onUnload() {
  28047. return onUnload;
  28048. }, BookInfo };
  28049. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28050. return __returned__;
  28051. }
  28052. };
  28053. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  28054. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  28055. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  28056. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  28057. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28058. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  28059. key: 0,
  28060. class: "header"
  28061. }, [
  28062. vue.createElementVNode("view", { class: "flex-d" }, [
  28063. vue.createElementVNode(
  28064. "text",
  28065. null,
  28066. "订单编号: " + vue.toDisplayString($setup.detail.orderId),
  28067. 1
  28068. /* TEXT */
  28069. ),
  28070. vue.createElementVNode(
  28071. "text",
  28072. { class: "mt-16" },
  28073. "库位: " + vue.toDisplayString($setup.detail.positionCode),
  28074. 1
  28075. /* TEXT */
  28076. )
  28077. ]),
  28078. vue.createElementVNode("view", { class: "status" }, [
  28079. vue.createElementVNode(
  28080. "text",
  28081. null,
  28082. vue.toDisplayString($setup.detail.stockStatus == 1 ? "已入库" : "已出库"),
  28083. 1
  28084. /* TEXT */
  28085. )
  28086. ])
  28087. ])) : vue.createCommentVNode("v-if", true),
  28088. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  28089. key: 1,
  28090. style: { "background-color": "#ffffff" },
  28091. class: "pad-5 mt-20 content-info"
  28092. }, [
  28093. vue.createVNode(_component_u_tabs, {
  28094. list: $setup.list1,
  28095. modelValue: $setup.activeTab,
  28096. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.activeTab = $event),
  28097. itemStyle: { height: "44px", width: "48%" },
  28098. onChange: $setup.handleTabChange
  28099. }, null, 8, ["list", "modelValue"]),
  28100. $setup.activeTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  28101. key: 0,
  28102. class: "product-details"
  28103. }, [
  28104. vue.createVNode($setup["BookInfo"], {
  28105. bookList: $setup.detail.detailVoList,
  28106. detail: $setup.detail,
  28107. isShow: false
  28108. }, null, 8, ["bookList", "detail"])
  28109. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  28110. key: 1,
  28111. class: "operation-logs mt-20"
  28112. }, [
  28113. (vue.openBlock(true), vue.createElementBlock(
  28114. vue.Fragment,
  28115. null,
  28116. vue.renderList($setup.operationLogs, (log, index2) => {
  28117. return vue.openBlock(), vue.createElementBlock("view", {
  28118. key: index2,
  28119. class: "log-item"
  28120. }, [
  28121. vue.createElementVNode(
  28122. "text",
  28123. null,
  28124. vue.toDisplayString(log.createTime),
  28125. 1
  28126. /* TEXT */
  28127. ),
  28128. vue.createElementVNode(
  28129. "text",
  28130. null,
  28131. vue.toDisplayString(log.createName),
  28132. 1
  28133. /* TEXT */
  28134. ),
  28135. vue.createElementVNode(
  28136. "text",
  28137. null,
  28138. vue.toDisplayString(log.content),
  28139. 1
  28140. /* TEXT */
  28141. )
  28142. ]);
  28143. }),
  28144. 128
  28145. /* KEYED_FRAGMENT */
  28146. ))
  28147. ]))
  28148. ])) : vue.createCommentVNode("v-if", true),
  28149. vue.createCommentVNode(" 底部扫码输入框 "),
  28150. vue.createElementVNode("view", {
  28151. class: "fixed-bottom pad-20",
  28152. style: { "background": "#ffffff" }
  28153. }, [
  28154. vue.createVNode(_component_u_search, {
  28155. placeholder: "请输入快递单号/订单编号",
  28156. searchIconSize: 24,
  28157. bgColor: "#f6f7f6",
  28158. onSearch: $setup.orderQuery,
  28159. modelValue: $setup.query.search,
  28160. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.query.search = $event),
  28161. "custom-style": "font-size:32rpx",
  28162. "placeholder-style": "font-size:32rpx",
  28163. clearabled: true,
  28164. focus: false,
  28165. showAction: false,
  28166. height: 42
  28167. }, null, 8, ["modelValue"]),
  28168. vue.createVNode(_component_u_icon, {
  28169. name: "scan",
  28170. size: "34",
  28171. color: "#19be6b",
  28172. onClick: $setup.openScan
  28173. })
  28174. ])
  28175. ]);
  28176. }
  28177. const PagesIndexWmsOrderQueryList = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-13461b03"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/order-query-list.vue"]]);
  28178. const _sfc_main$y = {
  28179. __name: "location-order",
  28180. setup(__props, { expose: __expose }) {
  28181. __expose();
  28182. const positionCode = vue.ref("");
  28183. const onSearch = () => {
  28184. if (positionCode.value) {
  28185. uni.redirectTo({
  28186. url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
  28187. });
  28188. } else {
  28189. uni.$u.toast("请输入库位编号");
  28190. }
  28191. };
  28192. function openScan() {
  28193. uni.scanCode({
  28194. success: (res2) => {
  28195. positionCode.value = res2.result;
  28196. onSearch();
  28197. }
  28198. });
  28199. }
  28200. onLoad(() => {
  28201. uni.$u.useGlobalEvent((e) => {
  28202. if (e.barcode) {
  28203. positionCode.value = e.barcode;
  28204. onSearch();
  28205. }
  28206. });
  28207. });
  28208. onShow(() => {
  28209. uni.$u.updateActivePageOnShow();
  28210. });
  28211. onUnload(() => {
  28212. uni.$u.cleanupOnPageUnload();
  28213. });
  28214. const __returned__ = { positionCode, onSearch, openScan, ref: vue.ref, get onLoad() {
  28215. return onLoad;
  28216. }, get onShow() {
  28217. return onShow;
  28218. }, get onUnload() {
  28219. return onUnload;
  28220. } };
  28221. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28222. return __returned__;
  28223. }
  28224. };
  28225. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  28226. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  28227. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  28228. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28229. vue.createCommentVNode(" 底部扫码输入框 "),
  28230. vue.createElementVNode("view", {
  28231. class: "fixed-bottom pad-20",
  28232. style: { "background": "#ffffff" }
  28233. }, [
  28234. vue.createVNode(_component_u_search, {
  28235. placeholder: "请输入库位编号",
  28236. searchIconSize: 24,
  28237. bgColor: "#f6f7f6",
  28238. onSearch: $setup.onSearch,
  28239. modelValue: $setup.positionCode,
  28240. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.positionCode = $event),
  28241. clearabled: true,
  28242. focus: false,
  28243. showAction: false,
  28244. height: 42
  28245. }, null, 8, ["modelValue"]),
  28246. vue.createVNode(_component_u_icon, {
  28247. name: "scan",
  28248. size: "32",
  28249. color: "#19be6b",
  28250. onClick: $setup.openScan
  28251. })
  28252. ])
  28253. ]);
  28254. }
  28255. const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-38a6ed3a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/location-order.vue"]]);
  28256. const _imports_0$1 = "/static/img/share.png";
  28257. const _sfc_main$x = {
  28258. __name: "LocationOrderItem",
  28259. props: {
  28260. item: {
  28261. type: Object,
  28262. required: true
  28263. },
  28264. isCheck: {
  28265. type: Boolean,
  28266. default: false
  28267. },
  28268. isLink: {
  28269. type: Boolean,
  28270. default: true
  28271. }
  28272. },
  28273. emits: ["select"],
  28274. setup(__props, { expose: __expose, emit: __emit }) {
  28275. __expose();
  28276. const props2 = __props;
  28277. const emit2 = __emit;
  28278. const toggleSelect = () => {
  28279. emit2("select", props2.item);
  28280. };
  28281. const handleQuickJump = () => {
  28282. uni.redirectTo({
  28283. url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
  28284. });
  28285. };
  28286. const __returned__ = { props: props2, emit: emit2, toggleSelect, handleQuickJump };
  28287. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28288. return __returned__;
  28289. }
  28290. };
  28291. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  28292. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  28293. return vue.openBlock(), vue.createElementBlock("view", { class: "order-item" }, [
  28294. vue.createElementVNode("view", { class: "order-header" }, [
  28295. vue.createElementVNode("view", { class: "order-info" }, [
  28296. vue.createElementVNode("view", { class: "info-row" }, [
  28297. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  28298. vue.createElementVNode(
  28299. "text",
  28300. { class: "value" },
  28301. vue.toDisplayString($props.item.orderId),
  28302. 1
  28303. /* TEXT */
  28304. )
  28305. ]),
  28306. vue.createElementVNode("view", { class: "info-row" }, [
  28307. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  28308. vue.createElementVNode(
  28309. "text",
  28310. { class: "value" },
  28311. vue.toDisplayString($props.item.badNum),
  28312. 1
  28313. /* TEXT */
  28314. )
  28315. ]),
  28316. vue.createElementVNode("view", { class: "info-row" }, [
  28317. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  28318. vue.createElementVNode(
  28319. "text",
  28320. { class: "value" },
  28321. vue.toDisplayString($props.item.waybillCode),
  28322. 1
  28323. /* TEXT */
  28324. )
  28325. ]),
  28326. vue.createElementVNode("view", { class: "info-row" }, [
  28327. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  28328. vue.createElementVNode(
  28329. "text",
  28330. { class: "value" },
  28331. vue.toDisplayString($props.item.auditFinishTime),
  28332. 1
  28333. /* TEXT */
  28334. )
  28335. ]),
  28336. vue.createElementVNode("view", { class: "info-row" }, [
  28337. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  28338. vue.createElementVNode(
  28339. "text",
  28340. { class: "value" },
  28341. vue.toDisplayString($props.item.auditUserName),
  28342. 1
  28343. /* TEXT */
  28344. )
  28345. ])
  28346. ]),
  28347. $props.isCheck ? (vue.openBlock(), vue.createElementBlock("view", {
  28348. key: 0,
  28349. class: "check-icon"
  28350. }, [
  28351. vue.createVNode(_component_u_icon, {
  28352. name: $props.item.checked ? "checkmark-circle-fill" : "checkmark-circle",
  28353. color: $props.item.checked ? "#19be6b" : "#c8c9cc",
  28354. size: "28",
  28355. onClick: $setup.toggleSelect
  28356. }, null, 8, ["name", "color"])
  28357. ])) : vue.createCommentVNode("v-if", true),
  28358. $props.isLink ? (vue.openBlock(), vue.createElementBlock("view", {
  28359. key: 1,
  28360. class: "flex flex-d flex-a-c flex-j-c quick-jump",
  28361. onClick: $setup.handleQuickJump
  28362. }, [
  28363. vue.createElementVNode("image", {
  28364. src: _imports_0$1,
  28365. mode: "widthFix",
  28366. style: { "width": "30px" }
  28367. }),
  28368. vue.createElementVNode("text", { style: { "font-size": "28rpx", "color": "#19be6b" } }, "快速跳转")
  28369. ])) : vue.createCommentVNode("v-if", true)
  28370. ])
  28371. ]);
  28372. }
  28373. const LocationOrderItem = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-b4edd1b0"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/LocationOrderItem.vue"]]);
  28374. const _sfc_main$w = {
  28375. __name: "location-order-list",
  28376. setup(__props, { expose: __expose }) {
  28377. __expose();
  28378. const orderCode = vue.ref("");
  28379. const originList = vue.ref([]);
  28380. const orderList = vue.ref([]);
  28381. const detail = vue.ref({});
  28382. const getOrderListByPositionCode = (positionCode) => {
  28383. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  28384. if (res2.code == 200) {
  28385. detail.value = res2.data;
  28386. orderList.value = res2.data.godownStockLogResults;
  28387. originList.value = res2.data.godownStockLogResults;
  28388. if (originList.value.length > 0) {
  28389. uni.$u.ttsModule.speak("查询到" + originList.value.length + "条订单");
  28390. } else {
  28391. uni.$u.toast("暂无订单");
  28392. uni.$u.ttsModule.speak("暂无订单");
  28393. }
  28394. } else {
  28395. uni.$u.toast(res2.msg);
  28396. uni.$u.ttsModule.speak(res2.msg);
  28397. }
  28398. });
  28399. };
  28400. const onSearch = () => {
  28401. if (!orderCode.value) {
  28402. orderList.value = originList.value;
  28403. uni.$u.toast("请输入订单号或物流单号");
  28404. return;
  28405. }
  28406. const searchValue = String(orderCode.value).trim();
  28407. const isNumeric = /^[0-9]+$/.test(searchValue);
  28408. const result = originList.value.filter((item) => {
  28409. if (isNumeric) {
  28410. return item.orderId === orderCode.value;
  28411. } else {
  28412. return item.waybillCode === orderCode.value;
  28413. }
  28414. });
  28415. orderList.value = result;
  28416. };
  28417. function openScan() {
  28418. uni.scanCode({
  28419. success: (res2) => {
  28420. orderCode.value = res2.result;
  28421. onSearch();
  28422. }
  28423. });
  28424. }
  28425. onLoad((options) => {
  28426. if (options.positionCode) {
  28427. getOrderListByPositionCode(options.positionCode);
  28428. }
  28429. uni.$u.useGlobalEvent((e) => {
  28430. if (e.barcode) {
  28431. orderCode.value = res.result;
  28432. onSearch();
  28433. }
  28434. });
  28435. });
  28436. onShow(() => {
  28437. uni.$u.updateActivePageOnShow();
  28438. });
  28439. onUnload(() => {
  28440. uni.$u.cleanupOnPageUnload();
  28441. });
  28442. const __returned__ = { orderCode, originList, orderList, detail, getOrderListByPositionCode, onSearch, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  28443. return onLoad;
  28444. }, get onShow() {
  28445. return onShow;
  28446. }, get onUnload() {
  28447. return onUnload;
  28448. }, LocationOrderItem };
  28449. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28450. return __returned__;
  28451. }
  28452. };
  28453. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  28454. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  28455. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  28456. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28457. vue.createElementVNode("view", { class: "header" }, [
  28458. vue.createElementVNode("view", { class: "flex-d" }, [
  28459. vue.createElementVNode(
  28460. "text",
  28461. null,
  28462. "仓库: " + vue.toDisplayString($setup.detail.godownName),
  28463. 1
  28464. /* TEXT */
  28465. ),
  28466. vue.createElementVNode(
  28467. "text",
  28468. { class: "mt-16" },
  28469. "库位编号: " + vue.toDisplayString($setup.detail.positionCode),
  28470. 1
  28471. /* TEXT */
  28472. ),
  28473. vue.createElementVNode(
  28474. "text",
  28475. { class: "mt-16" },
  28476. "订单数量: " + vue.toDisplayString($setup.originList.length),
  28477. 1
  28478. /* TEXT */
  28479. )
  28480. ])
  28481. ]),
  28482. vue.createElementVNode("view", { class: "product-details" }, [
  28483. (vue.openBlock(true), vue.createElementBlock(
  28484. vue.Fragment,
  28485. null,
  28486. vue.renderList($setup.orderList, (item, index2) => {
  28487. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  28488. key: index2,
  28489. item
  28490. }, null, 8, ["item"]);
  28491. }),
  28492. 128
  28493. /* KEYED_FRAGMENT */
  28494. ))
  28495. ]),
  28496. vue.createCommentVNode(" 底部扫码输入框 "),
  28497. vue.createElementVNode("view", {
  28498. class: "fixed-bottom pad-20",
  28499. style: { "background": "#ffffff" }
  28500. }, [
  28501. vue.createVNode(_component_u_search, {
  28502. placeholder: "请输入快递单号/订单编号",
  28503. searchIconSize: 24,
  28504. bgColor: "#f6f7f6",
  28505. onSearch: $setup.onSearch,
  28506. modelValue: $setup.orderCode,
  28507. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.orderCode = $event),
  28508. clearabled: true,
  28509. focus: false,
  28510. showAction: false,
  28511. height: 42
  28512. }, null, 8, ["modelValue"]),
  28513. vue.createVNode(_component_u_icon, {
  28514. name: "scan",
  28515. size: "36",
  28516. color: "#19be6b",
  28517. onClick: $setup.openScan
  28518. })
  28519. ])
  28520. ]);
  28521. }
  28522. const PagesIndexWmsLocationOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-3e424560"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/location-order-list.vue"]]);
  28523. const _sfc_main$v = {
  28524. __name: "location-select",
  28525. setup(__props, { expose: __expose }) {
  28526. __expose();
  28527. const searchText = vue.ref("");
  28528. function playGlobalSound() {
  28529. uni.$u.playClickSound();
  28530. }
  28531. const locations = vue.ref([]);
  28532. function getLocationListByGodownId(godownId2, code2 = "", type2 = "") {
  28533. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + godownId2 + "&code=" + code2).then((res2) => {
  28534. if (res2.code == 200) {
  28535. locations.value = res2.data;
  28536. if (type2 == "select") {
  28537. setTimeout(() => {
  28538. locations.value.forEach((item) => {
  28539. if (item == code2) {
  28540. selectLocation(item);
  28541. }
  28542. });
  28543. }, 500);
  28544. }
  28545. }
  28546. });
  28547. }
  28548. const scrollHeight = vue.ref(0);
  28549. const onSearch = () => {
  28550. getLocationListByGodownId(godownId.value, searchText.value);
  28551. };
  28552. const openScan = () => {
  28553. uni.scanCode({
  28554. success: (res2) => {
  28555. searchText.value = res2.result;
  28556. onSearch();
  28557. },
  28558. fail: (err) => {
  28559. uni.showToast({
  28560. title: "扫码失败",
  28561. icon: "error"
  28562. });
  28563. }
  28564. });
  28565. };
  28566. const selectLocation = (item) => {
  28567. uni.$emit("updateLocation", item);
  28568. uni.navigateBack();
  28569. };
  28570. const godownId = vue.ref("");
  28571. const positionCode = vue.ref("");
  28572. onLoad((opts) => {
  28573. godownId.value = opts.godownId;
  28574. positionCode.value = opts.positionCode;
  28575. getLocationListByGodownId(godownId.value);
  28576. scrollHeight.value = uni.getSystemInfoSync().windowHeight - 44 - 60;
  28577. uni.$u.useGlobalEvent((e) => {
  28578. if (e.barcode) {
  28579. searchText.value = e.barcode;
  28580. getLocationListByGodownId(godownId.value, e.barcode, "select");
  28581. }
  28582. });
  28583. });
  28584. onShow(() => {
  28585. uni.$u.updateActivePageOnShow();
  28586. });
  28587. onUnload(() => {
  28588. uni.$u.cleanupOnPageUnload();
  28589. });
  28590. const __returned__ = { searchText, playGlobalSound, locations, getLocationListByGodownId, scrollHeight, onSearch, openScan, selectLocation, godownId, positionCode, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  28591. return onLoad;
  28592. }, get onShow() {
  28593. return onShow;
  28594. }, get onUnload() {
  28595. return onUnload;
  28596. } };
  28597. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28598. return __returned__;
  28599. }
  28600. };
  28601. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  28602. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  28603. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  28604. return vue.openBlock(), vue.createElementBlock("view", {
  28605. class: "container",
  28606. onClick: $setup.playGlobalSound
  28607. }, [
  28608. vue.createCommentVNode(" 库位列表 "),
  28609. vue.createElementVNode(
  28610. "scroll-view",
  28611. {
  28612. "scroll-y": "",
  28613. class: "location-list",
  28614. style: vue.normalizeStyle({ height: $setup.scrollHeight + "px" })
  28615. },
  28616. [
  28617. (vue.openBlock(true), vue.createElementBlock(
  28618. vue.Fragment,
  28619. null,
  28620. vue.renderList($setup.locations, (item, index2) => {
  28621. return vue.openBlock(), vue.createElementBlock("view", {
  28622. key: index2,
  28623. class: vue.normalizeClass(["location-item", item === $setup.positionCode ? "location-item-selected" : ""]),
  28624. "hover-class": "location-item-hover",
  28625. onClick: ($event) => $setup.selectLocation(item)
  28626. }, [
  28627. vue.createElementVNode(
  28628. "text",
  28629. null,
  28630. vue.toDisplayString(item),
  28631. 1
  28632. /* TEXT */
  28633. )
  28634. ], 10, ["onClick"]);
  28635. }),
  28636. 128
  28637. /* KEYED_FRAGMENT */
  28638. ))
  28639. ],
  28640. 4
  28641. /* STYLE */
  28642. ),
  28643. vue.createCommentVNode(" 底部搜索框 "),
  28644. vue.createElementVNode("view", {
  28645. class: "fixed-bottom pad-20",
  28646. style: { "background": "#ffffff" }
  28647. }, [
  28648. vue.createVNode(_component_u_search, {
  28649. modelValue: $setup.searchText,
  28650. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  28651. placeholder: "请输入库位条码",
  28652. "show-action": false,
  28653. clearabled: true,
  28654. onSearch: $setup.onSearch,
  28655. height: "40",
  28656. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  28657. }, null, 8, ["modelValue"]),
  28658. vue.createVNode(_component_u_icon, {
  28659. name: "scan",
  28660. size: "28",
  28661. color: "#19be6b",
  28662. onClick: $setup.openScan
  28663. })
  28664. ])
  28665. ]);
  28666. }
  28667. const PagesIndexWmsLocationSelect = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-b26ec186"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/location-select.vue"]]);
  28668. const _sfc_main$u = {
  28669. __name: "warehouse-select",
  28670. setup(__props, { expose: __expose }) {
  28671. __expose();
  28672. function playGlobalSound() {
  28673. uni.$u.playClickSound();
  28674. }
  28675. const searchText = vue.ref("");
  28676. const warehouses = vue.ref([]);
  28677. function getGodownListByName(name = "") {
  28678. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  28679. if (res2.code == 200) {
  28680. warehouses.value = res2.data;
  28681. }
  28682. });
  28683. }
  28684. getGodownListByName();
  28685. const onSearch = () => {
  28686. getGodownListByName(searchText.value);
  28687. };
  28688. const selectWarehouse = (item) => {
  28689. uni.$emit("updateWarehouse", item);
  28690. uni.navigateBack();
  28691. };
  28692. const selectedId = vue.ref();
  28693. onLoad((options) => {
  28694. if (options.godownId) {
  28695. selectedId.value = options.godownId;
  28696. }
  28697. });
  28698. const __returned__ = { playGlobalSound, searchText, warehouses, getGodownListByName, onSearch, selectWarehouse, selectedId, ref: vue.ref, computed: vue.computed, get onLoad() {
  28699. return onLoad;
  28700. } };
  28701. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28702. return __returned__;
  28703. }
  28704. };
  28705. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  28706. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  28707. return vue.openBlock(), vue.createElementBlock("view", {
  28708. class: "container",
  28709. onClick: $setup.playGlobalSound
  28710. }, [
  28711. vue.createCommentVNode(" 搜索框 "),
  28712. vue.createElementVNode("view", { class: "search-area" }, [
  28713. vue.createVNode(_component_u_search, {
  28714. modelValue: $setup.searchText,
  28715. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  28716. placeholder: "请输入仓库名称",
  28717. "show-action": false,
  28718. clearabled: true,
  28719. onChange: $setup.onSearch,
  28720. height: "40",
  28721. "placeholder-style": "font-size:16px"
  28722. }, null, 8, ["modelValue"])
  28723. ]),
  28724. vue.createCommentVNode(" 仓库列表 "),
  28725. vue.createElementVNode("view", { class: "warehouse-list" }, [
  28726. (vue.openBlock(true), vue.createElementBlock(
  28727. vue.Fragment,
  28728. null,
  28729. vue.renderList($setup.warehouses, (item, index2) => {
  28730. return vue.openBlock(), vue.createElementBlock("view", {
  28731. key: index2,
  28732. class: vue.normalizeClass(["warehouse-item", { "warehouse-item-active": item.id == $setup.selectedId }]),
  28733. "hover-class": "warehouse-item-hover",
  28734. onClick: ($event) => $setup.selectWarehouse(item)
  28735. }, [
  28736. vue.createElementVNode(
  28737. "text",
  28738. null,
  28739. vue.toDisplayString(index2 + 1) + "." + vue.toDisplayString(item.godownName),
  28740. 1
  28741. /* TEXT */
  28742. )
  28743. ], 10, ["onClick"]);
  28744. }),
  28745. 128
  28746. /* KEYED_FRAGMENT */
  28747. ))
  28748. ])
  28749. ]);
  28750. }
  28751. const PagesIndexWmsWarehouseSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-c3e02812"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/warehouse-select.vue"]]);
  28752. const _sfc_main$t = {
  28753. __name: "speedy-check",
  28754. setup(__props, { expose: __expose }) {
  28755. __expose();
  28756. const goBack = () => {
  28757. uni.navigateBack();
  28758. };
  28759. const showCheckMethodPicker = vue.ref(false);
  28760. const checkMethod = vue.ref("增加数量");
  28761. const resetType = vue.ref(0);
  28762. const checkMethodOptions = ["增加数量", "减少数量", "实际数量"];
  28763. const getUserDefaultWarehouse = () => {
  28764. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  28765. if (res2.code == 200) {
  28766. getWarehouseLocationList(res2.data.id);
  28767. }
  28768. });
  28769. };
  28770. const location2 = vue.ref("");
  28771. const showLocationPopup = vue.ref(false);
  28772. const locationList = vue.ref([]);
  28773. const selectedLocation = vue.ref("");
  28774. const godownId = vue.ref();
  28775. const getWarehouseLocationList = (id) => {
  28776. godownId.value = id;
  28777. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + id).then((res2) => {
  28778. if (res2.code == 200) {
  28779. locationList.value = res2.data;
  28780. }
  28781. });
  28782. };
  28783. const searchValue = vue.ref("");
  28784. const products = vue.ref([]);
  28785. const onCheckMethodConfirm = (e) => {
  28786. checkMethod.value = e.value[0];
  28787. showCheckMethodPicker.value = false;
  28788. resetType.value = e.indexs[0] + 1;
  28789. };
  28790. const handleLocationSelect = () => {
  28791. showLocationPopup.value = true;
  28792. selectedLocation.value = location2.value;
  28793. };
  28794. const onLocationConfirm = () => {
  28795. if (selectedLocation.value) {
  28796. location2.value = selectedLocation.value;
  28797. showLocationPopup.value = false;
  28798. selectedLocation.value = "";
  28799. } else {
  28800. uni.$u.toast("请选择库位");
  28801. }
  28802. };
  28803. const selectLocation = (item) => {
  28804. selectedLocation.value = item;
  28805. };
  28806. const onSubmit = () => {
  28807. if (products.value.length === 0) {
  28808. uni.$u.toast("请添加盘点订单");
  28809. return;
  28810. }
  28811. const params = {
  28812. godownId: godownId.value,
  28813. positionCode: location2.value,
  28814. orderInfo: products.value.map((item) => ({
  28815. orderId: item.orderId,
  28816. waybillCode: item.waybillCode,
  28817. bookNum: item.badNum,
  28818. remark: item.remark || ""
  28819. })),
  28820. resetType: resetType.value
  28821. };
  28822. uni.$u.http.post("/app/stock/resetStock", params).then((res2) => {
  28823. if (res2.code === 200) {
  28824. uni.$u.toast("盘点成功");
  28825. location2.value = "";
  28826. products.value = [];
  28827. searchValue.value = "";
  28828. } else {
  28829. uni.$u.toast(res2.msg || "提交失败");
  28830. }
  28831. }).catch((err) => {
  28832. uni.$u.toast("提交失败");
  28833. formatAppLog("error", "at pages/index/wms/speedy-check.vue:229", err);
  28834. });
  28835. };
  28836. const onSearch = () => {
  28837. if (!searchValue.value) {
  28838. uni.$u.toast("请输入快递单号或订单编号");
  28839. return;
  28840. }
  28841. const searchType = /^[0-9]+$/.test(searchValue.value) ? 1 : 2;
  28842. uni.$u.http.get("/app/stock/searchBadOrderForReset", {
  28843. params: {
  28844. searchType,
  28845. search: searchValue.value
  28846. }
  28847. }).then((res2) => {
  28848. if (res2.code === 200) {
  28849. const exists = products.value.some(
  28850. (item) => item.orderId === res2.data.orderId || item.waybillCode === res2.data.waybillCode
  28851. );
  28852. if (exists) {
  28853. uni.$u.toast("该订单已添加");
  28854. return;
  28855. }
  28856. products.value.push(res2.data);
  28857. searchValue.value = "";
  28858. } else {
  28859. uni.$u.toast(res2.msg || "查询失败");
  28860. }
  28861. }).catch((err) => {
  28862. uni.$u.toast("查询失败");
  28863. formatAppLog("error", "at pages/index/wms/speedy-check.vue:271", err);
  28864. });
  28865. };
  28866. const dealScanText = (scanText) => {
  28867. let isLocation = scanText.indexOf("-") > -1 && scanText.length == 9;
  28868. if (isLocation) {
  28869. if (locationList.value.includes(scanText)) {
  28870. location2.value = scanText;
  28871. } else {
  28872. uni.$u.toast("库位不存在");
  28873. }
  28874. } else {
  28875. searchValue.value = scanText;
  28876. onSearch();
  28877. }
  28878. };
  28879. const openScan = () => {
  28880. uni.scanCode({
  28881. success: (res2) => {
  28882. dealScanText(res2.result);
  28883. },
  28884. fail: (err) => {
  28885. uni.showToast({
  28886. title: "扫码失败",
  28887. icon: "error"
  28888. });
  28889. }
  28890. });
  28891. };
  28892. function handleAdd() {
  28893. if (!location2.value) {
  28894. uni.$u.toast("请选择库位");
  28895. return;
  28896. }
  28897. uni.redirectTo({
  28898. url: "/pages/index/wms/speedy-check-add?location=" + location2.value
  28899. });
  28900. }
  28901. const close = () => {
  28902. showLocationPopup.value = false;
  28903. };
  28904. const open2 = () => {
  28905. showLocationPopup.value = true;
  28906. };
  28907. onShow(() => {
  28908. uni.$u.updateActivePageOnShow();
  28909. });
  28910. onUnload(() => {
  28911. uni.$u.cleanupOnPageUnload();
  28912. });
  28913. onLoad(() => {
  28914. getUserDefaultWarehouse();
  28915. uni.$on("selectedProducts", (list) => {
  28916. products.value = list;
  28917. });
  28918. uni.$u.useGlobalEvent((e) => {
  28919. if (e.barcode) {
  28920. dealScanText(e.barcode);
  28921. }
  28922. });
  28923. });
  28924. const __returned__ = { goBack, showCheckMethodPicker, checkMethod, resetType, checkMethodOptions, getUserDefaultWarehouse, location: location2, showLocationPopup, locationList, selectedLocation, godownId, getWarehouseLocationList, searchValue, products, onCheckMethodConfirm, handleLocationSelect, onLocationConfirm, selectLocation, onSubmit, onSearch, dealScanText, openScan, handleAdd, close, open: open2, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  28925. return onLoad;
  28926. }, get onUnload() {
  28927. return onUnload;
  28928. }, get onShow() {
  28929. return onShow;
  28930. }, LocationOrderItem };
  28931. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28932. return __returned__;
  28933. }
  28934. };
  28935. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  28936. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  28937. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  28938. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  28939. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  28940. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  28941. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  28942. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  28943. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  28944. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  28945. const _directive_permission = vue.resolveDirective("permission");
  28946. return vue.openBlock(), vue.createElementBlock("view", {
  28947. class: "container",
  28948. style: { "padding-top": "44px", "padding-bottom": "10px" }
  28949. }, [
  28950. vue.createVNode(_component_u_navbar, {
  28951. title: "快速盘点",
  28952. border: false,
  28953. fixed: "",
  28954. "safe-area-inset-top": "",
  28955. bgColor: "#22ac38",
  28956. titleStyle: "font-size:36rpx;color:#fff"
  28957. }, {
  28958. left: vue.withCtx(() => [
  28959. vue.createVNode(_component_u_icon, {
  28960. name: "arrow-left",
  28961. color: "#fff",
  28962. size: "20",
  28963. onClick: $setup.goBack
  28964. })
  28965. ]),
  28966. right: vue.withCtx(() => [
  28967. vue.withDirectives((vue.openBlock(), vue.createElementBlock("text", {
  28968. style: { "color": "#ffffff" },
  28969. onClick: $setup.onSubmit
  28970. }, [
  28971. vue.createTextVNode("提交")
  28972. ])), [
  28973. [_directive_permission, "app:wms:speedyCheck:confirm"]
  28974. ])
  28975. ]),
  28976. _: 1
  28977. /* STABLE */
  28978. }),
  28979. vue.createCommentVNode(" 盘点信息选择区域 "),
  28980. vue.createElementVNode("view", {
  28981. class: "select-area",
  28982. style: { "margin-top": "44px" }
  28983. }, [
  28984. vue.createVNode(_component_u_cell_group, { border: true }, {
  28985. default: vue.withCtx(() => [
  28986. vue.createVNode(_component_u_cell, {
  28987. title: "盘点方式",
  28988. value: $setup.checkMethod,
  28989. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showCheckMethodPicker = true),
  28990. isLink: true,
  28991. border: true
  28992. }, null, 8, ["value"]),
  28993. vue.createVNode(_component_u_cell, {
  28994. title: "目标库位",
  28995. value: $setup.location,
  28996. onClick: $setup.handleLocationSelect,
  28997. isLink: true,
  28998. border: true
  28999. }, null, 8, ["value"])
  29000. ]),
  29001. _: 1
  29002. /* STABLE */
  29003. })
  29004. ]),
  29005. vue.createCommentVNode(" 盘点方式选择器 "),
  29006. vue.createVNode(_component_u_picker, {
  29007. show: $setup.showCheckMethodPicker,
  29008. columns: [$setup.checkMethodOptions],
  29009. onConfirm: $setup.onCheckMethodConfirm,
  29010. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showCheckMethodPicker = false),
  29011. showToolbar: true,
  29012. title: "选择盘点方式",
  29013. closeOnClickOverlay: true,
  29014. cancelText: "取消",
  29015. confirmText: "确定",
  29016. itemHeight: 44,
  29017. visibleItemCount: 5
  29018. }, null, 8, ["show", "columns"]),
  29019. vue.createCommentVNode(" 库位选择弹出层 "),
  29020. vue.createVNode(_component_u_popup, {
  29021. show: $setup.showLocationPopup,
  29022. mode: "bottom",
  29023. onClose: $setup.close,
  29024. onOpen: $setup.open,
  29025. closeOnClickOverlay: true,
  29026. round: 10,
  29027. safeAreaInsetBottom: true
  29028. }, {
  29029. default: vue.withCtx(() => [
  29030. vue.createElementVNode("view", { class: "location-popup" }, [
  29031. vue.createElementVNode("view", { class: "location-popup-header" }, [
  29032. vue.createElementVNode("text", { style: { "flex": "1" } }, "选择库位"),
  29033. vue.createVNode(_component_u_text, {
  29034. style: { "width": "40px", "flex": "none" },
  29035. type: "primary",
  29036. text: "确定",
  29037. onClick: $setup.onLocationConfirm
  29038. })
  29039. ]),
  29040. vue.createElementVNode("view", { class: "location-popup-content" }, [
  29041. vue.createVNode(_component_u_input, {
  29042. modelValue: $setup.selectedLocation,
  29043. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.selectedLocation = $event),
  29044. placeholder: "请输入库位",
  29045. customStyle: "background-color: #f6f6f6; border-radius: 4px;"
  29046. }, null, 8, ["modelValue"]),
  29047. vue.createElementVNode("view", { class: "location-list" }, [
  29048. (vue.openBlock(true), vue.createElementBlock(
  29049. vue.Fragment,
  29050. null,
  29051. vue.renderList($setup.locationList, (item, index2) => {
  29052. return vue.openBlock(), vue.createElementBlock("view", {
  29053. class: vue.normalizeClass(["location-item", { "location-item--selected": $setup.selectedLocation === item }]),
  29054. key: index2,
  29055. onClick: ($event) => $setup.selectLocation(item)
  29056. }, [
  29057. vue.createElementVNode(
  29058. "text",
  29059. null,
  29060. vue.toDisplayString(item),
  29061. 1
  29062. /* TEXT */
  29063. ),
  29064. $setup.selectedLocation === item ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  29065. key: 0,
  29066. name: "checkmark",
  29067. color: "#19be6b",
  29068. size: "16"
  29069. })) : vue.createCommentVNode("v-if", true)
  29070. ], 10, ["onClick"]);
  29071. }),
  29072. 128
  29073. /* KEYED_FRAGMENT */
  29074. ))
  29075. ])
  29076. ])
  29077. ])
  29078. ]),
  29079. _: 1
  29080. /* STABLE */
  29081. }, 8, ["show"]),
  29082. vue.createCommentVNode(" 订单列表 "),
  29083. vue.createElementVNode("view", { class: "product-details" }, [
  29084. (vue.openBlock(true), vue.createElementBlock(
  29085. vue.Fragment,
  29086. null,
  29087. vue.renderList($setup.products, (item, index2) => {
  29088. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  29089. isLink: _ctx.isLink,
  29090. key: index2,
  29091. item
  29092. }, null, 8, ["isLink", "item"]);
  29093. }),
  29094. 128
  29095. /* KEYED_FRAGMENT */
  29096. ))
  29097. ]),
  29098. vue.createElementVNode("view", {
  29099. class: "add-btn",
  29100. onClick: $setup.handleAdd
  29101. }, [
  29102. vue.createVNode(_component_u_icon, {
  29103. name: "plus-circle",
  29104. size: "40",
  29105. color: "#19be6b"
  29106. })
  29107. ]),
  29108. vue.createCommentVNode(" 底部扫码输入框 "),
  29109. vue.createElementVNode("view", {
  29110. class: "fixed-bottom pad-20",
  29111. style: { "background": "#ffffff" }
  29112. }, [
  29113. vue.createVNode(_component_u_search, {
  29114. placeholder: "请输入快递单号/订单编号",
  29115. modelValue: $setup.searchValue,
  29116. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.searchValue = $event),
  29117. onSearch: $setup.onSearch,
  29118. "show-action": false,
  29119. "custom-style": "margin-right:10px"
  29120. }, null, 8, ["modelValue"]),
  29121. vue.createVNode(_component_u_icon, {
  29122. name: "scan",
  29123. size: "28",
  29124. color: "#19be6b",
  29125. onClick: $setup.openScan
  29126. })
  29127. ])
  29128. ]);
  29129. }
  29130. const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-283ebe02"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/speedy-check.vue"]]);
  29131. const _sfc_main$s = {
  29132. __name: "BookItemOrder",
  29133. props: {
  29134. book: Object,
  29135. index: Number
  29136. },
  29137. emits: ["remove"],
  29138. setup(__props, { expose: __expose, emit: __emit }) {
  29139. __expose();
  29140. const props2 = __props;
  29141. const emit2 = __emit;
  29142. const removeBook = () => {
  29143. emit2("remove", { book: props2.book, index: props2.index });
  29144. };
  29145. const __returned__ = { props: props2, emit: emit2, removeBook };
  29146. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29147. return __returned__;
  29148. }
  29149. };
  29150. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  29151. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  29152. return vue.openBlock(), vue.createElementBlock("view", { class: "book-item" }, [
  29153. vue.createElementVNode("image", {
  29154. class: "book-image",
  29155. src: $props.book.cover,
  29156. mode: "aspectFill"
  29157. }, null, 8, ["src"]),
  29158. vue.createElementVNode("view", { class: "book-info" }, [
  29159. vue.createElementVNode("view", { class: "book-title" }, [
  29160. vue.createElementVNode(
  29161. "text",
  29162. null,
  29163. vue.toDisplayString($props.book.bookName),
  29164. 1
  29165. /* TEXT */
  29166. ),
  29167. vue.createVNode(_component_u_icon, {
  29168. name: "close",
  29169. size: "18",
  29170. onClick: $setup.removeBook
  29171. })
  29172. ]),
  29173. vue.createElementVNode("view", { class: "flex-a flex-1" }, [
  29174. vue.createElementVNode("view", { class: "book-details flex-d" }, [
  29175. vue.createElementVNode(
  29176. "text",
  29177. null,
  29178. "ISBN: " + vue.toDisplayString($props.book.isbn),
  29179. 1
  29180. /* TEXT */
  29181. ),
  29182. vue.createElementVNode(
  29183. "text",
  29184. null,
  29185. "定价: " + vue.toDisplayString($props.book.price),
  29186. 1
  29187. /* TEXT */
  29188. ),
  29189. vue.createElementVNode(
  29190. "text",
  29191. null,
  29192. "折扣: " + vue.toDisplayString($props.book.recycleDiscount),
  29193. 1
  29194. /* TEXT */
  29195. )
  29196. ]),
  29197. vue.createElementVNode("view", { class: "book-stats flex-d ml-20" }, [
  29198. vue.createElementVNode(
  29199. "text",
  29200. null,
  29201. "数量: " + vue.toDisplayString($props.book.quantity),
  29202. 1
  29203. /* TEXT */
  29204. ),
  29205. vue.createElementVNode(
  29206. "text",
  29207. null,
  29208. "预估单价: " + vue.toDisplayString($props.book.expectPrice),
  29209. 1
  29210. /* TEXT */
  29211. ),
  29212. vue.createElementVNode(
  29213. "text",
  29214. { style: { "color": "#ff0000" } },
  29215. "审核金额: " + vue.toDisplayString($props.book.auditPrice),
  29216. 1
  29217. /* TEXT */
  29218. )
  29219. ])
  29220. ])
  29221. ])
  29222. ]);
  29223. }
  29224. const BookItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-97928f7a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/components/BookItemOrder.vue"]]);
  29225. const _sfc_main$r = {
  29226. __name: "check-order",
  29227. setup(__props, { expose: __expose }) {
  29228. __expose();
  29229. const bookList = vue.ref([]);
  29230. const totalBooks = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.quantity), 0));
  29231. const totalPrice = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.auditPrice), 0).toFixed(2));
  29232. const removeBook = ({ book, index: index2 }) => {
  29233. bookList.value.splice(index2, 1);
  29234. };
  29235. const handleSubmit = () => {
  29236. if (bookList.value.length === 0) {
  29237. uni.$u.toast("请先添加书籍");
  29238. return;
  29239. }
  29240. uni.$u.http.post("/app/offlineorder/submitOfflineOrder", bookList.value).then((res2) => {
  29241. if (res2.code == 200) {
  29242. uni.$u.toast("提交成功");
  29243. bookList.value.length = 0;
  29244. }
  29245. });
  29246. };
  29247. const handleScan = () => {
  29248. uni.scanCode({
  29249. success: (res2) => {
  29250. handleBarcode(res2.result);
  29251. formatAppLog("log", "at pages/index/offline/check-order.vue:52", "扫码结果:", res2.result);
  29252. },
  29253. fail: (res2) => {
  29254. formatAppLog("log", "at pages/index/offline/check-order.vue:56", "扫码失败:", res2);
  29255. uni.$u.toast("扫码失败");
  29256. }
  29257. });
  29258. };
  29259. const handleBarcode = (barcode) => {
  29260. formatAppLog("log", "at pages/index/offline/check-order.vue:63", "扫码结果:", barcode);
  29261. uni.$u.http.get(`/app/offlineorder/getBookInfo/${barcode}`).then((res2) => {
  29262. if (res2.code == 200) {
  29263. res2.data.quantity = 1;
  29264. let item = bookList.value.find((item2) => item2.isbn === res2.data.isbn);
  29265. if (item) {
  29266. item.quantity += 1;
  29267. item.auditPrice = (item.expectPrice * item.quantity).toFixed(2);
  29268. return;
  29269. } else {
  29270. res2.data.auditPrice = (res2.data.expectPrice * res2.data.quantity).toFixed(2);
  29271. bookList.value.push(res2.data);
  29272. }
  29273. }
  29274. });
  29275. };
  29276. onLoad(() => {
  29277. uni.$u.useGlobalEvent((e) => {
  29278. handleBarcode(e.barcode);
  29279. });
  29280. });
  29281. onShow(() => {
  29282. uni.$u.updateActivePageOnShow();
  29283. });
  29284. onUnload(() => {
  29285. uni.$u.cleanupOnPageUnload();
  29286. });
  29287. const __returned__ = { bookList, totalBooks, totalPrice, removeBook, handleSubmit, handleScan, handleBarcode, ref: vue.ref, computed: vue.computed, get onLoad() {
  29288. return onLoad;
  29289. }, get onShow() {
  29290. return onShow;
  29291. }, get onUnload() {
  29292. return onUnload;
  29293. }, BookItem };
  29294. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29295. return __returned__;
  29296. }
  29297. };
  29298. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  29299. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29300. const _directive_permission = vue.resolveDirective("permission");
  29301. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29302. vue.createElementVNode("view", { class: "book-list" }, [
  29303. (vue.openBlock(true), vue.createElementBlock(
  29304. vue.Fragment,
  29305. null,
  29306. vue.renderList($setup.bookList, (book, index2) => {
  29307. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  29308. key: index2,
  29309. book,
  29310. onRemove: $setup.removeBook
  29311. }, null, 8, ["book"]);
  29312. }),
  29313. 128
  29314. /* KEYED_FRAGMENT */
  29315. ))
  29316. ]),
  29317. vue.createCommentVNode(" 底部信息和按钮 "),
  29318. vue.createElementVNode("view", {
  29319. class: "footer fixed-bottom flex-d",
  29320. style: { "padding-top": "10rpx" }
  29321. }, [
  29322. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  29323. key: 0,
  29324. class: "pad-10"
  29325. }, [
  29326. vue.createTextVNode("共 "),
  29327. vue.createElementVNode(
  29328. "text",
  29329. { style: { "color": "#ff0000" } },
  29330. vue.toDisplayString($setup.totalBooks),
  29331. 1
  29332. /* TEXT */
  29333. ),
  29334. vue.createTextVNode(" 本,预估回收价 "),
  29335. vue.createElementVNode(
  29336. "text",
  29337. { style: { "color": "#ff0000" } },
  29338. "¥" + vue.toDisplayString($setup.totalPrice),
  29339. 1
  29340. /* TEXT */
  29341. )
  29342. ])) : vue.createCommentVNode("v-if", true),
  29343. vue.createElementVNode("view", { class: "flex-a mt-12" }, [
  29344. vue.withDirectives(vue.createVNode(
  29345. _component_u_button,
  29346. {
  29347. size: "large",
  29348. type: "primary",
  29349. text: "提交",
  29350. onClick: $setup.handleSubmit
  29351. },
  29352. null,
  29353. 512
  29354. /* NEED_PATCH */
  29355. ), [
  29356. [_directive_permission, "app:offline:checkOrder:confirm"]
  29357. ]),
  29358. vue.createVNode(_component_u_button, {
  29359. size: "large",
  29360. type: "warning",
  29361. text: "扫码",
  29362. onClick: $setup.handleScan
  29363. })
  29364. ])
  29365. ])
  29366. ]);
  29367. }
  29368. const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-8fea8cdb"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/offline/check-order.vue"]]);
  29369. const _sfc_main$q = {
  29370. __name: "check-record",
  29371. setup(__props, { expose: __expose }) {
  29372. __expose();
  29373. const scrollRef = vue.ref(null);
  29374. const refreshList = () => {
  29375. var _a;
  29376. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  29377. };
  29378. let dataList = vue.ref([]);
  29379. const updateList = (data) => {
  29380. dataList.value = data;
  29381. };
  29382. const __returned__ = { scrollRef, refreshList, get dataList() {
  29383. return dataList;
  29384. }, set dataList(v) {
  29385. dataList = v;
  29386. }, updateList, PageScroll: pageScroll, ref: vue.ref };
  29387. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29388. return __returned__;
  29389. }
  29390. };
  29391. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  29392. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  29393. return vue.openBlock(), vue.createElementBlock("view", {
  29394. class: "common-page",
  29395. style: { "padding": "0" }
  29396. }, [
  29397. vue.createVNode(
  29398. $setup["PageScroll"],
  29399. {
  29400. requestStr: "/app/offlineorder/getUserStat",
  29401. onUpdateList: $setup.updateList,
  29402. ref: "scrollRef"
  29403. },
  29404. {
  29405. default: vue.withCtx(() => [
  29406. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  29407. default: vue.withCtx(() => [
  29408. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  29409. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单时间"),
  29410. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单数量"),
  29411. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单本数"),
  29412. vue.createElementVNode("view", { class: "text-item flex-1" }, "预估金额")
  29413. ])
  29414. ]),
  29415. _: 1
  29416. /* STABLE */
  29417. }),
  29418. vue.createElementVNode("view", { class: "list-con" }, [
  29419. (vue.openBlock(true), vue.createElementBlock(
  29420. vue.Fragment,
  29421. null,
  29422. vue.renderList($setup.dataList, (item, index2) => {
  29423. return vue.openBlock(), vue.createElementBlock("view", {
  29424. key: index2,
  29425. class: "flex-a"
  29426. }, [
  29427. vue.createElementVNode(
  29428. "view",
  29429. { class: "text-item flex-1" },
  29430. vue.toDisplayString(item.statDate),
  29431. 1
  29432. /* TEXT */
  29433. ),
  29434. vue.createElementVNode(
  29435. "view",
  29436. { class: "text-item flex-1" },
  29437. vue.toDisplayString(item.totalNum),
  29438. 1
  29439. /* TEXT */
  29440. ),
  29441. vue.createElementVNode(
  29442. "view",
  29443. { class: "text-item flex-1" },
  29444. vue.toDisplayString(item.bookNum),
  29445. 1
  29446. /* TEXT */
  29447. ),
  29448. vue.createElementVNode(
  29449. "view",
  29450. { class: "text-item flex-1" },
  29451. vue.toDisplayString(item.expectAmount),
  29452. 1
  29453. /* TEXT */
  29454. )
  29455. ]);
  29456. }),
  29457. 128
  29458. /* KEYED_FRAGMENT */
  29459. ))
  29460. ])
  29461. ]),
  29462. _: 1
  29463. /* STABLE */
  29464. },
  29465. 512
  29466. /* NEED_PATCH */
  29467. )
  29468. ]);
  29469. }
  29470. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/offline/check-record.vue"]]);
  29471. const props$3 = {
  29472. props: {
  29473. // 内置图标名称,或图片路径,建议绝对路径
  29474. icon: {
  29475. type: String,
  29476. default: props$G.empty.icon
  29477. },
  29478. // 提示文字
  29479. text: {
  29480. type: String,
  29481. default: props$G.empty.text
  29482. },
  29483. // 文字颜色
  29484. textColor: {
  29485. type: String,
  29486. default: props$G.empty.textColor
  29487. },
  29488. // 文字大小
  29489. textSize: {
  29490. type: [String, Number],
  29491. default: props$G.empty.textSize
  29492. },
  29493. // 图标的颜色
  29494. iconColor: {
  29495. type: String,
  29496. default: props$G.empty.iconColor
  29497. },
  29498. // 图标的大小
  29499. iconSize: {
  29500. type: [String, Number],
  29501. default: props$G.empty.iconSize
  29502. },
  29503. // 选择预置的图标类型
  29504. mode: {
  29505. type: String,
  29506. default: props$G.empty.mode
  29507. },
  29508. // 图标宽度,单位px
  29509. width: {
  29510. type: [String, Number],
  29511. default: props$G.empty.width
  29512. },
  29513. // 图标高度,单位px
  29514. height: {
  29515. type: [String, Number],
  29516. default: props$G.empty.height
  29517. },
  29518. // 是否显示组件
  29519. show: {
  29520. type: Boolean,
  29521. default: props$G.empty.show
  29522. },
  29523. // 组件距离上一个元素之间的距离,默认px单位
  29524. marginTop: {
  29525. type: [String, Number],
  29526. default: props$G.empty.marginTop
  29527. }
  29528. }
  29529. };
  29530. const _sfc_main$p = {
  29531. name: "u-empty",
  29532. mixins: [mpMixin, mixin, props$3],
  29533. data() {
  29534. return {
  29535. icons: {
  29536. car: "购物车为空",
  29537. page: "页面不存在",
  29538. search: "没有搜索结果",
  29539. address: "没有收货地址",
  29540. wifi: "没有WiFi",
  29541. order: "订单为空",
  29542. coupon: "没有优惠券",
  29543. favor: "暂无收藏",
  29544. permission: "无权限",
  29545. history: "无历史记录",
  29546. news: "无新闻列表",
  29547. message: "消息列表为空",
  29548. list: "列表为空",
  29549. data: "数据为空",
  29550. comment: "暂无评论"
  29551. }
  29552. };
  29553. },
  29554. computed: {
  29555. // 组件样式
  29556. emptyStyle() {
  29557. const style = {};
  29558. style.marginTop = uni.$u.addUnit(this.marginTop);
  29559. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  29560. },
  29561. // 文本样式
  29562. textStyle() {
  29563. const style = {};
  29564. style.color = this.textColor;
  29565. style.fontSize = uni.$u.addUnit(this.textSize);
  29566. return style;
  29567. },
  29568. // 判断icon是否图片路径
  29569. isSrc() {
  29570. return this.icon.indexOf("/") >= 0;
  29571. }
  29572. }
  29573. };
  29574. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  29575. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  29576. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  29577. "view",
  29578. {
  29579. key: 0,
  29580. class: "u-empty",
  29581. style: vue.normalizeStyle([$options.emptyStyle])
  29582. },
  29583. [
  29584. !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  29585. key: 0,
  29586. name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
  29587. size: _ctx.iconSize,
  29588. color: _ctx.iconColor,
  29589. "margin-top": "14"
  29590. }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  29591. key: 1,
  29592. style: vue.normalizeStyle({
  29593. width: _ctx.$u.addUnit(_ctx.width),
  29594. height: _ctx.$u.addUnit(_ctx.height)
  29595. }),
  29596. src: _ctx.icon,
  29597. mode: "widthFix"
  29598. }, null, 12, ["src"])),
  29599. vue.createElementVNode(
  29600. "text",
  29601. {
  29602. class: "u-empty__text",
  29603. style: vue.normalizeStyle([$options.textStyle])
  29604. },
  29605. vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
  29606. 5
  29607. /* TEXT, STYLE */
  29608. ),
  29609. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  29610. key: 2,
  29611. class: "u-empty__wrap"
  29612. }, [
  29613. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  29614. ])) : vue.createCommentVNode("v-if", true)
  29615. ],
  29616. 4
  29617. /* STYLE */
  29618. )) : vue.createCommentVNode("v-if", true);
  29619. }
  29620. const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-8dd5928e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-empty/u-empty.vue"]]);
  29621. const _sfc_main$o = {
  29622. __name: "scan-book",
  29623. setup(__props, { expose: __expose }) {
  29624. __expose();
  29625. const searchValue = vue.ref("");
  29626. const scannedISBN = vue.ref("");
  29627. const currentTab = vue.ref(0);
  29628. const tabsList = [
  29629. {
  29630. name: "简介"
  29631. },
  29632. {
  29633. name: "轨迹"
  29634. }
  29635. ];
  29636. const bookInfo = vue.ref(null);
  29637. const handleSearch = () => {
  29638. if (!searchValue.value)
  29639. return;
  29640. loadBookInfo(searchValue.value);
  29641. };
  29642. const handleScan = () => {
  29643. uni.scanCode({
  29644. success: (res2) => {
  29645. searchValue.value = res2.result;
  29646. scannedISBN.value = res2.result;
  29647. loadBookInfo(res2.result);
  29648. }
  29649. });
  29650. };
  29651. const loadBookInfo = (isbn) => {
  29652. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  29653. if (res2.code == 200) {
  29654. bookInfo.value = res2.data;
  29655. }
  29656. });
  29657. };
  29658. onLoad(() => {
  29659. uni.$u.useGlobalEvent((e) => {
  29660. searchValue.value = e.barcode;
  29661. scannedISBN.value = e.barcode;
  29662. loadBookInfo(e.barcode);
  29663. });
  29664. });
  29665. onShow(() => {
  29666. uni.$u.updateActivePageOnShow();
  29667. });
  29668. onUnload(() => {
  29669. uni.$u.cleanupOnPageUnload();
  29670. });
  29671. const __returned__ = { searchValue, scannedISBN, currentTab, tabsList, bookInfo, handleSearch, handleScan, loadBookInfo, ref: vue.ref, get onLoad() {
  29672. return onLoad;
  29673. }, get onShow() {
  29674. return onShow;
  29675. }, get onUnload() {
  29676. return onUnload;
  29677. } };
  29678. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29679. return __returned__;
  29680. }
  29681. };
  29682. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  29683. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  29684. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  29685. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  29686. const _component_u_empty = resolveEasycom(vue.resolveDynamicComponent("u-empty"), __easycom_3$1);
  29687. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  29688. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29689. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29690. vue.createCommentVNode(" 顶部搜索框 "),
  29691. vue.createVNode(_component_u_sticky, null, {
  29692. default: vue.withCtx(() => [
  29693. vue.createElementVNode("view", { class: "search-area" }, [
  29694. vue.createVNode(_component_u_search, {
  29695. modelValue: $setup.searchValue,
  29696. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchValue = $event),
  29697. placeholder: "扫描/输入ISBN或SH码",
  29698. "show-action": true,
  29699. actionText: "查询",
  29700. onSearch: $setup.handleSearch,
  29701. onCustom: $setup.handleSearch
  29702. }, {
  29703. suffixIcon: vue.withCtx(() => [
  29704. $setup.searchValue ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  29705. key: 0,
  29706. name: "close",
  29707. size: "20",
  29708. onClick: _cache[0] || (_cache[0] = ($event) => $setup.searchValue = "")
  29709. })) : vue.createCommentVNode("v-if", true)
  29710. ]),
  29711. _: 1
  29712. /* STABLE */
  29713. }, 8, ["modelValue"])
  29714. ])
  29715. ]),
  29716. _: 1
  29717. /* STABLE */
  29718. }),
  29719. vue.createCommentVNode(" 已扫描ISBN显示 "),
  29720. $setup.scannedISBN ? (vue.openBlock(), vue.createElementBlock("view", {
  29721. key: 0,
  29722. class: "isbn-display"
  29723. }, [
  29724. vue.createElementVNode(
  29725. "text",
  29726. null,
  29727. "已查询ISBN:" + vue.toDisplayString($setup.scannedISBN),
  29728. 1
  29729. /* TEXT */
  29730. )
  29731. ])) : vue.createCommentVNode("v-if", true),
  29732. vue.createCommentVNode(" 内容区域 "),
  29733. vue.createElementVNode("view", { class: "content" }, [
  29734. vue.createCommentVNode(" 空状态 "),
  29735. !$setup.bookInfo ? (vue.openBlock(), vue.createElementBlock("view", {
  29736. key: 0,
  29737. class: "empty-state"
  29738. }, [
  29739. vue.createVNode(_component_u_empty, {
  29740. mode: "data",
  29741. text: "暂无扫描数据",
  29742. "margin-top": "100"
  29743. })
  29744. ])) : (vue.openBlock(), vue.createElementBlock(
  29745. vue.Fragment,
  29746. { key: 1 },
  29747. [
  29748. vue.createCommentVNode(" 书籍详情 "),
  29749. vue.createElementVNode("view", { class: "book-detail" }, [
  29750. vue.createElementVNode("view", { class: "common-card mb-20" }, [
  29751. vue.createElementVNode("view", { class: "flex flex-d flex-a-c" }, [
  29752. vue.createElementVNode("image", {
  29753. class: "book-image",
  29754. src: $setup.bookInfo.cover,
  29755. mode: "heightFix"
  29756. }, null, 8, ["src"]),
  29757. vue.createElementVNode(
  29758. "text",
  29759. { class: "ml-20 font-15" },
  29760. vue.toDisplayString($setup.bookInfo.bookName),
  29761. 1
  29762. /* TEXT */
  29763. )
  29764. ]),
  29765. vue.createElementVNode("view", { class: "book-status" }, [
  29766. vue.createElementVNode(
  29767. "text",
  29768. { class: "status-text" },
  29769. "状态:" + vue.toDisplayString($setup.bookInfo.recycleStatus ? "已加入回收书单" : "未加入回收书单"),
  29770. 1
  29771. /* TEXT */
  29772. ),
  29773. $setup.bookInfo.recycleTime ? (vue.openBlock(), vue.createElementBlock(
  29774. "text",
  29775. {
  29776. key: 0,
  29777. class: "time-text"
  29778. },
  29779. "加入时间:" + vue.toDisplayString($setup.bookInfo.recycleTime),
  29780. 1
  29781. /* TEXT */
  29782. )) : vue.createCommentVNode("v-if", true)
  29783. ])
  29784. ]),
  29785. vue.createCommentVNode(" 基本信息 "),
  29786. vue.createElementVNode("view", { class: "common-card info-section mb-20" }, [
  29787. vue.createElementVNode("view", { class: "price-info" }, [
  29788. vue.createElementVNode("text", { class: "label" }, "定价:"),
  29789. vue.createElementVNode(
  29790. "text",
  29791. { class: "price" },
  29792. "¥" + vue.toDisplayString($setup.bookInfo.price),
  29793. 1
  29794. /* TEXT */
  29795. ),
  29796. vue.createElementVNode(
  29797. "text",
  29798. { class: "recycle-price" },
  29799. "回收价:¥" + vue.toDisplayString($setup.bookInfo.expectPrice),
  29800. 1
  29801. /* TEXT */
  29802. )
  29803. ]),
  29804. vue.createElementVNode("view", { class: "book-info" }, [
  29805. vue.createElementVNode("view", { class: "info-item" }, [
  29806. vue.createElementVNode("text", { class: "label" }, "ISBN:"),
  29807. vue.createElementVNode(
  29808. "text",
  29809. null,
  29810. vue.toDisplayString($setup.bookInfo.isbn),
  29811. 1
  29812. /* TEXT */
  29813. )
  29814. ]),
  29815. vue.createElementVNode("view", { class: "info-item" }, [
  29816. vue.createElementVNode("text", { class: "label" }, "语言:"),
  29817. vue.createElementVNode(
  29818. "text",
  29819. null,
  29820. vue.toDisplayString($setup.bookInfo.lang || "-"),
  29821. 1
  29822. /* TEXT */
  29823. )
  29824. ]),
  29825. vue.createElementVNode("view", { class: "info-item" }, [
  29826. vue.createElementVNode("text", { class: "label" }, "作者:"),
  29827. vue.createElementVNode(
  29828. "text",
  29829. null,
  29830. vue.toDisplayString($setup.bookInfo.author),
  29831. 1
  29832. /* TEXT */
  29833. )
  29834. ]),
  29835. vue.createElementVNode("view", { class: "info-item" }, [
  29836. vue.createElementVNode("text", { class: "label" }, "出版社:"),
  29837. vue.createElementVNode(
  29838. "text",
  29839. null,
  29840. vue.toDisplayString($setup.bookInfo.publish),
  29841. 1
  29842. /* TEXT */
  29843. )
  29844. ]),
  29845. vue.createElementVNode("view", { class: "info-item" }, [
  29846. vue.createElementVNode("text", { class: "label" }, "出版时间:"),
  29847. vue.createElementVNode(
  29848. "text",
  29849. null,
  29850. vue.toDisplayString($setup.bookInfo.pubDate),
  29851. 1
  29852. /* TEXT */
  29853. )
  29854. ])
  29855. ])
  29856. ]),
  29857. vue.createCommentVNode(" 简介和轨迹 "),
  29858. vue.createElementVNode("view", {
  29859. class: "common-card tabs-section",
  29860. style: { "padding": "0" }
  29861. }, [
  29862. vue.createVNode(_component_u_tabs, {
  29863. list: $setup.tabsList,
  29864. modelValue: $setup.currentTab,
  29865. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.currentTab = $event),
  29866. lineColor: "#19be6b"
  29867. }, null, 8, ["modelValue"]),
  29868. vue.createElementVNode("view", { class: "tab-content" }, [
  29869. $setup.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  29870. key: 0,
  29871. class: "intro-content"
  29872. }, [
  29873. vue.createElementVNode("text", { class: "section-title" }, "内容简介:"),
  29874. vue.createElementVNode(
  29875. "text",
  29876. { class: "content-text" },
  29877. vue.toDisplayString($setup.bookInfo.contentBlurb),
  29878. 1
  29879. /* TEXT */
  29880. ),
  29881. vue.createElementVNode("text", { class: "section-title" }, "作者简介:"),
  29882. vue.createElementVNode(
  29883. "text",
  29884. { class: "content-text" },
  29885. vue.toDisplayString($setup.bookInfo.anthorBlurb),
  29886. 1
  29887. /* TEXT */
  29888. ),
  29889. vue.createElementVNode(
  29890. "text",
  29891. { class: "content-text" },
  29892. vue.toDisplayString($setup.bookInfo.catalog),
  29893. 1
  29894. /* TEXT */
  29895. )
  29896. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  29897. key: 1,
  29898. class: "track-content"
  29899. }, [
  29900. vue.createElementVNode(
  29901. "text",
  29902. null,
  29903. vue.toDisplayString($setup.bookInfo.track),
  29904. 1
  29905. /* TEXT */
  29906. )
  29907. ]))
  29908. ])
  29909. ])
  29910. ])
  29911. ],
  29912. 2112
  29913. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  29914. ))
  29915. ]),
  29916. vue.createCommentVNode(" 底部扫描按钮 "),
  29917. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29918. vue.createVNode(_component_u_button, {
  29919. size: "large",
  29920. type: "primary",
  29921. text: "扫码(ISBN或SH码)",
  29922. onClick: $setup.handleScan
  29923. })
  29924. ])
  29925. ]);
  29926. }
  29927. const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-04d3117d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/entry/scan-book.vue"]]);
  29928. const _sfc_main$n = {
  29929. __name: "book-weight",
  29930. setup(__props, { expose: __expose }) {
  29931. __expose();
  29932. const customStyle = {
  29933. height: "100rpx",
  29934. fontSize: "32rpx"
  29935. };
  29936. const labelStyle = {
  29937. fontSize: "32rpx"
  29938. };
  29939. const placeholderStyle2 = vue.ref("fontSize: 32rpx");
  29940. const form = vue.ref({
  29941. weight: "",
  29942. isbn: ""
  29943. });
  29944. const rules2 = {
  29945. weight: [
  29946. {
  29947. required: true,
  29948. message: "请输入重量",
  29949. trigger: "blur"
  29950. },
  29951. {
  29952. type: "number",
  29953. message: "重量必须是数字",
  29954. trigger: "blur"
  29955. }
  29956. ],
  29957. isbn: [{
  29958. required: true,
  29959. message: "请输入ISBN",
  29960. trigger: "blur"
  29961. }]
  29962. };
  29963. function handleScan() {
  29964. uni.scanCode({
  29965. success: (res2) => {
  29966. form.value.isbn = res2.result;
  29967. }
  29968. });
  29969. }
  29970. const formRef = vue.ref(null);
  29971. const submitForm = () => {
  29972. formRef.value.validate().then((valid) => {
  29973. if (valid) {
  29974. uni.$u.http.post("/app/weighChangeLog/add", form.value).then((res2) => {
  29975. if (res2.code == 200) {
  29976. uni.$u.toast("修改成功");
  29977. form.value.isbn = "";
  29978. form.value.weight = "";
  29979. } else {
  29980. uni.$u.toast(res2.msg);
  29981. }
  29982. });
  29983. }
  29984. });
  29985. };
  29986. onLoad(() => {
  29987. uni.$u.useGlobalEvent((e) => {
  29988. form.value.isbn = e.barcode;
  29989. });
  29990. });
  29991. onShow(() => {
  29992. uni.$u.updateActivePageOnShow();
  29993. });
  29994. onUnload(() => {
  29995. uni.$u.cleanupOnPageUnload();
  29996. });
  29997. const __returned__ = { customStyle, labelStyle, placeholderStyle: placeholderStyle2, form, rules: rules2, handleScan, formRef, submitForm, ref: vue.ref, get onLoad() {
  29998. return onLoad;
  29999. }, get onShow() {
  30000. return onShow;
  30001. }, get onUnload() {
  30002. return onUnload;
  30003. } };
  30004. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30005. return __returned__;
  30006. }
  30007. };
  30008. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  30009. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  30010. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  30011. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  30012. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30013. const _directive_permission = vue.resolveDirective("permission");
  30014. return vue.openBlock(), vue.createElementBlock("view", { class: "common-page" }, [
  30015. vue.createVNode(_component_u_form, {
  30016. model: $setup.form,
  30017. rules: $setup.rules,
  30018. ref: "formRef",
  30019. labelWidth: "90px",
  30020. errorType: "toast",
  30021. labelStyle: $setup.labelStyle
  30022. }, {
  30023. default: vue.withCtx(() => [
  30024. vue.createVNode(_component_u_form_item, {
  30025. label: "重量(克)",
  30026. prop: "weight",
  30027. required: ""
  30028. }, {
  30029. default: vue.withCtx(() => [
  30030. vue.createVNode(_component_u_input, {
  30031. placeholderStyle: $setup.placeholderStyle,
  30032. customStyle: $setup.customStyle,
  30033. modelValue: $setup.form.weight,
  30034. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.weight = $event),
  30035. placeholder: "请输入数值",
  30036. clearable: ""
  30037. }, null, 8, ["placeholderStyle", "modelValue"])
  30038. ]),
  30039. _: 1
  30040. /* STABLE */
  30041. }),
  30042. vue.createVNode(_component_u_form_item, {
  30043. label: "ISBN",
  30044. prop: "isbn",
  30045. required: ""
  30046. }, {
  30047. default: vue.withCtx(() => [
  30048. vue.createVNode(_component_u_input, {
  30049. placeholderStyle: $setup.placeholderStyle,
  30050. customStyle: $setup.customStyle,
  30051. modelValue: $setup.form.isbn,
  30052. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.isbn = $event),
  30053. placeholder: "请输入编码",
  30054. clearable: ""
  30055. }, null, 8, ["placeholderStyle", "modelValue"])
  30056. ]),
  30057. _: 1
  30058. /* STABLE */
  30059. })
  30060. ]),
  30061. _: 1
  30062. /* STABLE */
  30063. }, 8, ["model"]),
  30064. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30065. vue.createVNode(_component_u_button, {
  30066. size: "large",
  30067. type: "warning",
  30068. text: "扫码",
  30069. onClick: $setup.handleScan
  30070. }),
  30071. vue.withDirectives(vue.createVNode(
  30072. _component_u_button,
  30073. {
  30074. size: "large",
  30075. type: "success",
  30076. text: "提交",
  30077. onClick: $setup.submitForm
  30078. },
  30079. null,
  30080. 512
  30081. /* NEED_PATCH */
  30082. ), [
  30083. [_directive_permission, "app:entry:bookWeight:confirm"]
  30084. ])
  30085. ])
  30086. ]);
  30087. }
  30088. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/entry/book-weight.vue"]]);
  30089. const placeholderStyle = "font-size:32rpx";
  30090. const _sfc_main$m = {
  30091. __name: "commodity-scan",
  30092. setup(__props, { expose: __expose }) {
  30093. __expose();
  30094. const customStyle = vue.reactive({
  30095. height: "90rpx"
  30096. });
  30097. const form = vue.ref({
  30098. "isbn": ""
  30099. });
  30100. function scanCode() {
  30101. uni.scanCode({
  30102. success: (res2) => {
  30103. form.value.isbn = res2.result;
  30104. handleSubmit();
  30105. },
  30106. fail: (err) => {
  30107. uni.$u.toast("扫码失败");
  30108. }
  30109. });
  30110. }
  30111. function handleSubmit() {
  30112. if (!form.value.isbn)
  30113. return uni.$u.toast("请输入ISBN");
  30114. uni.$u.http.post("/app/book/bookPushErp", form.value).then((res2) => {
  30115. formatAppLog("log", "at pages/index/entry/commodity-scan.vue:55", res2);
  30116. if (res2.code == 200) {
  30117. let text = form.value.isbn + res2.msg;
  30118. uni.$u.ttsModule.speak(text);
  30119. form.value.isbn = "";
  30120. } else {
  30121. uni.$u.ttsModule.speak(res2.msg);
  30122. }
  30123. }).catch((err) => {
  30124. uni.$u.toast("提交失败,请重试");
  30125. });
  30126. }
  30127. onLoad(() => {
  30128. uni.$u.useGlobalEvent((e) => {
  30129. if (e.barcode) {
  30130. form.value.isbn = e.barcode;
  30131. handleSubmit();
  30132. }
  30133. });
  30134. });
  30135. onShow(() => {
  30136. uni.$u.updateActivePageOnShow();
  30137. });
  30138. onUnload(() => {
  30139. uni.$u.cleanupOnPageUnload();
  30140. });
  30141. const __returned__ = { placeholderStyle, customStyle, form, scanCode, handleSubmit, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  30142. return onLoad;
  30143. }, get onShow() {
  30144. return onShow;
  30145. }, get onUnload() {
  30146. return onUnload;
  30147. } };
  30148. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30149. return __returned__;
  30150. }
  30151. };
  30152. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  30153. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  30154. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30155. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  30156. vue.createElementVNode("view", { class: "main-content" }, [
  30157. vue.createElementVNode("view", { class: "input-group" }, [
  30158. vue.createVNode(_component_u_input, {
  30159. customStyle: $setup.customStyle,
  30160. "placeholder-style": $setup.placeholderStyle,
  30161. modelValue: $setup.form.isbn,
  30162. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.isbn = $event),
  30163. placeholder: "扫描ISBN",
  30164. border: "surround"
  30165. }, null, 8, ["customStyle", "modelValue"]),
  30166. vue.createVNode(_component_u_button, {
  30167. customStyle: $setup.customStyle,
  30168. type: "info",
  30169. color: "#a4adb3",
  30170. onClick: $setup.handleSubmit,
  30171. text: "提交"
  30172. }, null, 8, ["customStyle"])
  30173. ])
  30174. ]),
  30175. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30176. vue.createVNode(_component_u_button, {
  30177. size: "large",
  30178. type: "success",
  30179. onClick: $setup.scanCode,
  30180. text: "扫码",
  30181. class: "scan-button"
  30182. })
  30183. ])
  30184. ]);
  30185. }
  30186. const PagesIndexEntryCommodityScan = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-9a4165f6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/entry/commodity-scan.vue"]]);
  30187. const props$2 = {
  30188. props: {
  30189. // 显示文字
  30190. title: {
  30191. type: String,
  30192. default: props$G.alert.title
  30193. },
  30194. // 主题,success/warning/info/error
  30195. type: {
  30196. type: String,
  30197. default: props$G.alert.type
  30198. },
  30199. // 辅助性文字
  30200. description: {
  30201. type: String,
  30202. default: props$G.alert.description
  30203. },
  30204. // 是否可关闭
  30205. closable: {
  30206. type: Boolean,
  30207. default: props$G.alert.closable
  30208. },
  30209. // 是否显示图标
  30210. showIcon: {
  30211. type: Boolean,
  30212. default: props$G.alert.showIcon
  30213. },
  30214. // 浅或深色调,light-浅色,dark-深色
  30215. effect: {
  30216. type: String,
  30217. default: props$G.alert.effect
  30218. },
  30219. // 文字是否居中
  30220. center: {
  30221. type: Boolean,
  30222. default: props$G.alert.center
  30223. },
  30224. // 字体大小
  30225. fontSize: {
  30226. type: [String, Number],
  30227. default: props$G.alert.fontSize
  30228. }
  30229. }
  30230. };
  30231. const _sfc_main$l = {
  30232. name: "u-alert",
  30233. mixins: [mpMixin, mixin, props$2],
  30234. data() {
  30235. return {
  30236. show: true
  30237. };
  30238. },
  30239. computed: {
  30240. iconColor() {
  30241. return this.effect === "light" ? this.type : "#fff";
  30242. },
  30243. // 不同主题对应不同的图标
  30244. iconName() {
  30245. switch (this.type) {
  30246. case "success":
  30247. return "checkmark-circle-fill";
  30248. case "error":
  30249. return "close-circle-fill";
  30250. case "warning":
  30251. return "error-circle-fill";
  30252. case "info":
  30253. return "info-circle-fill";
  30254. case "primary":
  30255. return "more-circle-fill";
  30256. default:
  30257. return "error-circle-fill";
  30258. }
  30259. }
  30260. },
  30261. methods: {
  30262. // 点击内容
  30263. clickHandler() {
  30264. this.$emit("click");
  30265. },
  30266. // 点击关闭按钮
  30267. closeHandler() {
  30268. this.show = false;
  30269. }
  30270. }
  30271. };
  30272. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  30273. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  30274. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  30275. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  30276. mode: "fade",
  30277. show: $data.show
  30278. }, {
  30279. default: vue.withCtx(() => [
  30280. vue.createElementVNode(
  30281. "view",
  30282. {
  30283. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  30284. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  30285. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  30286. },
  30287. [
  30288. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  30289. key: 0,
  30290. class: "u-alert__icon"
  30291. }, [
  30292. vue.createVNode(_component_u_icon, {
  30293. name: $options.iconName,
  30294. size: "18",
  30295. color: $options.iconColor
  30296. }, null, 8, ["name", "color"])
  30297. ])) : vue.createCommentVNode("v-if", true),
  30298. vue.createElementVNode(
  30299. "view",
  30300. {
  30301. class: "u-alert__content",
  30302. style: vue.normalizeStyle([{
  30303. paddingRight: _ctx.closable ? "20px" : 0
  30304. }])
  30305. },
  30306. [
  30307. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  30308. "text",
  30309. {
  30310. key: 0,
  30311. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  30312. style: vue.normalizeStyle([{
  30313. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  30314. textAlign: _ctx.center ? "center" : "left"
  30315. }])
  30316. },
  30317. vue.toDisplayString(_ctx.title),
  30318. 7
  30319. /* TEXT, CLASS, STYLE */
  30320. )) : vue.createCommentVNode("v-if", true),
  30321. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  30322. "text",
  30323. {
  30324. key: 1,
  30325. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  30326. style: vue.normalizeStyle([{
  30327. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  30328. textAlign: _ctx.center ? "center" : "left"
  30329. }])
  30330. },
  30331. vue.toDisplayString(_ctx.description),
  30332. 7
  30333. /* TEXT, CLASS, STYLE */
  30334. )) : vue.createCommentVNode("v-if", true)
  30335. ],
  30336. 4
  30337. /* STYLE */
  30338. ),
  30339. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  30340. key: 1,
  30341. class: "u-alert__close",
  30342. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  30343. }, [
  30344. vue.createVNode(_component_u_icon, {
  30345. name: "close",
  30346. color: $options.iconColor,
  30347. size: "15"
  30348. }, null, 8, ["color"])
  30349. ])) : vue.createCommentVNode("v-if", true)
  30350. ],
  30351. 6
  30352. /* CLASS, STYLE */
  30353. )
  30354. ]),
  30355. _: 1
  30356. /* STABLE */
  30357. }, 8, ["show"]);
  30358. }
  30359. const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-158e540a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
  30360. const _sfc_main$k = {
  30361. __name: "logistics-detail",
  30362. setup(__props, { expose: __expose }) {
  30363. __expose();
  30364. const logisticsInfo = vue.ref([]);
  30365. function getLogisticsDetail(orderId) {
  30366. uni.$u.http.get(`/app/orderinfo/getOrderExpressList?orderId=${orderId}`).then((res2) => {
  30367. if (res2.code == 200) {
  30368. logisticsInfo.value = res2.data;
  30369. }
  30370. });
  30371. }
  30372. function handleButtonClick(status, reason) {
  30373. uni.$u.http.post("/app/orderexception/update", {
  30374. id: id.value,
  30375. checkStatus: status,
  30376. refusalReason: reason
  30377. }).then((res2) => {
  30378. if (res2.code == 200) {
  30379. checkStatus.value = status;
  30380. uni.$u.toast("操作成功");
  30381. emit("refresh");
  30382. } else {
  30383. uni.$u.toast(res2.msg);
  30384. }
  30385. });
  30386. }
  30387. const checkStatus = vue.ref(0);
  30388. const id = vue.ref(0);
  30389. onLoad((e) => {
  30390. checkStatus.value = e.status;
  30391. id.value = e.id;
  30392. getLogisticsDetail(e.orderId);
  30393. });
  30394. const __returned__ = { logisticsInfo, getLogisticsDetail, handleButtonClick, checkStatus, id, ref: vue.ref, get onLoad() {
  30395. return onLoad;
  30396. }, ApproveButton, RejectButton };
  30397. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30398. return __returned__;
  30399. }
  30400. };
  30401. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  30402. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  30403. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  30404. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  30405. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  30406. vue.createCommentVNode(" 物流公司信息 "),
  30407. vue.createVNode(_component_u_sticky, null, {
  30408. default: vue.withCtx(() => [
  30409. vue.createVNode(_component_u_alert, {
  30410. title: `物流公司:京东快递`,
  30411. type: "warning"
  30412. })
  30413. ]),
  30414. _: 1
  30415. /* STABLE */
  30416. }),
  30417. vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
  30418. vue.createElementVNode("scroll-view", {
  30419. "scroll-y": "",
  30420. class: "timeline-container"
  30421. }, [
  30422. (vue.openBlock(true), vue.createElementBlock(
  30423. vue.Fragment,
  30424. null,
  30425. vue.renderList($setup.logisticsInfo, (item, index2) => {
  30426. return vue.openBlock(), vue.createElementBlock("view", {
  30427. key: index2,
  30428. class: "timeline-item"
  30429. }, [
  30430. vue.createElementVNode("view", { class: "timeline-icon" }, [
  30431. vue.createVNode(_component_u_icon, {
  30432. name: "map-fill",
  30433. color: "#19be6b",
  30434. size: "16"
  30435. })
  30436. ]),
  30437. vue.createElementVNode("view", { class: "timeline-content" }, [
  30438. vue.createElementVNode(
  30439. "text",
  30440. { class: "title" },
  30441. vue.toDisplayString(item.title),
  30442. 1
  30443. /* TEXT */
  30444. ),
  30445. vue.createElementVNode(
  30446. "text",
  30447. { class: "desc" },
  30448. vue.toDisplayString(item.description),
  30449. 1
  30450. /* TEXT */
  30451. ),
  30452. vue.createElementVNode(
  30453. "text",
  30454. { class: "time" },
  30455. vue.toDisplayString(item.time),
  30456. 1
  30457. /* TEXT */
  30458. )
  30459. ]),
  30460. index2 < $setup.logisticsInfo.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  30461. key: 0,
  30462. class: "timeline-line"
  30463. })) : vue.createCommentVNode("v-if", true)
  30464. ]);
  30465. }),
  30466. 128
  30467. /* KEYED_FRAGMENT */
  30468. ))
  30469. ]),
  30470. vue.createCommentVNode(" 底部操作按钮 "),
  30471. $setup.checkStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  30472. key: 0,
  30473. class: "fixed-bottom"
  30474. }, [
  30475. vue.createVNode($setup["RejectButton"], {
  30476. size: "large",
  30477. onReject: _cache[0] || (_cache[0] = (reason) => $setup.handleButtonClick(3, reason))
  30478. }),
  30479. vue.createVNode($setup["ApproveButton"], {
  30480. size: "large",
  30481. onApprove: _cache[1] || (_cache[1] = ($event) => $setup.handleButtonClick(2))
  30482. })
  30483. ])) : vue.createCommentVNode("v-if", true)
  30484. ]);
  30485. }
  30486. const PagesIndexExpressLogisticsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-8e52fe94"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/logistics-detail.vue"]]);
  30487. const _imports_0 = "/static/img/location.png";
  30488. const _imports_1 = "/static/img/location-active.png";
  30489. const _sfc_main$j = {
  30490. __name: "task-detail",
  30491. setup(__props, { expose: __expose }) {
  30492. __expose();
  30493. const currentTask = vue.ref(0);
  30494. const totalTasks = vue.ref(0);
  30495. const curTaskInfo = vue.ref({});
  30496. const nextLocation = vue.ref("");
  30497. const orderList = vue.ref([]);
  30498. const ttsModule2 = vue.ref(null);
  30499. const taskCode = vue.ref("");
  30500. onUnload(() => {
  30501. uni.$u.ttsModule.stop();
  30502. uni.$u.cleanupOnPageUnload();
  30503. });
  30504. function playGlobalSound() {
  30505. uni.$u.playClickSound();
  30506. }
  30507. const searchText = vue.ref("");
  30508. const badList = vue.ref([]);
  30509. const handleNextTask = () => {
  30510. if (currentTask.value < totalTasks.value) {
  30511. currentTask.value++;
  30512. if (currentTask.value == totalTasks.value) {
  30513. uni.$u.ttsModule.speak("任务完成");
  30514. } else {
  30515. curTaskInfo.value = orderList.value[currentTask.value];
  30516. badList.value = curTaskInfo.value.detailVoList || [];
  30517. let nextInfo = orderList.value[currentTask.value + 1];
  30518. nextLocation.value = nextInfo.positionCode;
  30519. }
  30520. }
  30521. };
  30522. const onSearch = () => {
  30523. uni.$u.http.get(`/app/appstock/getStockTaskDetail?taskCode=${taskCode.value}`).then((res2) => {
  30524. if (res2.code == 200) {
  30525. orderList.value = res2.data;
  30526. totalTasks.value = res2.data.length;
  30527. curTaskInfo.value = res2.data[currentTask.value];
  30528. badList.value = curTaskInfo.value.detailVoList || [];
  30529. }
  30530. });
  30531. };
  30532. const confirmStockTask = () => {
  30533. const params = {
  30534. positionCode: curTaskInfo.value.positionCode,
  30535. orderId: curTaskInfo.value.orderId,
  30536. taskCode: taskCode.value
  30537. };
  30538. uni.$u.http.post("/app/appstock/setStockTask", params).then((res2) => {
  30539. if (res2.code === 200) {
  30540. curTaskInfo.value.isCompleted = true;
  30541. orderList.value[currentTask.value] = curTaskInfo.value;
  30542. handleNextTask();
  30543. isFirstScan.value = false;
  30544. uni.$u.ttsModule.speak("下架成功");
  30545. } else {
  30546. uni.showToast({
  30547. title: res2.msg,
  30548. icon: "error"
  30549. });
  30550. }
  30551. });
  30552. };
  30553. const unlockTask = () => {
  30554. uni.$u.http.post("/app/appstock/unlockStockTask?taskCode=" + taskCode.value).then((res2) => {
  30555. if (res2.code == 200) {
  30556. uni.showToast({
  30557. title: "解锁成功",
  30558. icon: "success"
  30559. });
  30560. } else {
  30561. uni.showToast({
  30562. title: res2.msg || "解锁失败",
  30563. icon: "error"
  30564. });
  30565. }
  30566. });
  30567. };
  30568. const onSubmit = () => {
  30569. uni.showModal({
  30570. title: "确认提示",
  30571. content: "是否确认提交本次下架?",
  30572. success: (res2) => {
  30573. playGlobalSound();
  30574. if (res2.confirm) {
  30575. uni.navigateBack();
  30576. uni.$u.ttsModule.speak("任务已提交");
  30577. unlockTask();
  30578. }
  30579. }
  30580. });
  30581. };
  30582. function goBack() {
  30583. uni.showModal({
  30584. title: "确认提示",
  30585. content: "是否确认放弃本次下架?",
  30586. success: (res2) => {
  30587. playGlobalSound();
  30588. if (res2.confirm) {
  30589. uni.navigateBack();
  30590. uni.$u.ttsModule.speak("任务已放弃");
  30591. unlockTask();
  30592. }
  30593. }
  30594. });
  30595. }
  30596. let isFirstScan = vue.ref(false);
  30597. const checkScanText = (scanText) => {
  30598. formatAppLog("log", "at pages/index/wms/task-detail.vue:227", scanText, "scanText");
  30599. let length = scanText ? scanText.length : 0;
  30600. let isPositionCode = scanText.indexOf("-") > -1 && length == 9;
  30601. let isWaybillCode = /^(?=.*[A-Z])(?=.*\d)[A-Z0-9]+$/.test(scanText);
  30602. let isOrderId = /^\d+$/.test(scanText);
  30603. if (isPositionCode) {
  30604. let positionCode = curTaskInfo.value.positionCode;
  30605. if (positionCode != scanText) {
  30606. uni.showToast({
  30607. title: "库位号不正确",
  30608. icon: "error"
  30609. });
  30610. } else {
  30611. isFirstScan.value = true;
  30612. curTaskInfo.value.isValid = true;
  30613. }
  30614. }
  30615. if (!isFirstScan.value) {
  30616. uni.$u.ttsModule.speak("请先校验库位号");
  30617. return;
  30618. }
  30619. if (isWaybillCode || isOrderId) {
  30620. let waybillCode = curTaskInfo.value.waybillCode;
  30621. let orderId = curTaskInfo.value.orderId;
  30622. if (waybillCode == scanText || orderId == scanText) {
  30623. confirmStockTask();
  30624. } else {
  30625. uni.showToast({
  30626. title: "订单号或物流号不匹配",
  30627. icon: "error"
  30628. });
  30629. curTaskInfo.value.isValid = true;
  30630. }
  30631. }
  30632. };
  30633. const openScan = () => {
  30634. uni.scanCode({
  30635. success: (res2) => {
  30636. searchText.value = res2.result;
  30637. checkScanText(res2.result);
  30638. },
  30639. fail: (err) => {
  30640. uni.showToast({
  30641. title: "扫码失败",
  30642. icon: "error"
  30643. });
  30644. }
  30645. });
  30646. };
  30647. onLoad((opts) => {
  30648. taskCode.value = opts.taskCode;
  30649. onSearch();
  30650. uni.$u.useGlobalEvent((e) => {
  30651. if (e.barcode) {
  30652. searchText.value = e.barcode;
  30653. checkScanText(e.barcode);
  30654. }
  30655. });
  30656. });
  30657. onShow(() => {
  30658. uni.$u.updateActivePageOnShow();
  30659. });
  30660. const __returned__ = { currentTask, totalTasks, curTaskInfo, nextLocation, orderList, ttsModule: ttsModule2, taskCode, playGlobalSound, searchText, badList, handleNextTask, onSearch, confirmStockTask, unlockTask, onSubmit, goBack, get isFirstScan() {
  30661. return isFirstScan;
  30662. }, set isFirstScan(v) {
  30663. isFirstScan = v;
  30664. }, checkScanText, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get onLoad() {
  30665. return onLoad;
  30666. }, get onUnload() {
  30667. return onUnload;
  30668. }, get onShow() {
  30669. return onShow;
  30670. } };
  30671. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30672. return __returned__;
  30673. }
  30674. };
  30675. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  30676. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  30677. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  30678. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  30679. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  30680. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
  30681. return vue.openBlock(), vue.createElementBlock("view", {
  30682. class: "container",
  30683. onClick: $setup.playGlobalSound
  30684. }, [
  30685. vue.createCommentVNode(" 顶部导航栏 "),
  30686. vue.createVNode(_component_u_navbar, {
  30687. title: "下架任务",
  30688. border: false,
  30689. fixed: "",
  30690. "safe-area-inset-top": ""
  30691. }, {
  30692. left: vue.withCtx(() => [
  30693. vue.createVNode(_component_u_icon, {
  30694. name: "arrow-left",
  30695. color: "#333333",
  30696. size: "20",
  30697. onClick: $setup.goBack
  30698. })
  30699. ]),
  30700. right: vue.withCtx(() => [
  30701. vue.createVNode(_component_u_text, {
  30702. type: "primary",
  30703. text: "提交",
  30704. onClick: $setup.onSubmit
  30705. })
  30706. ]),
  30707. _: 1
  30708. /* STABLE */
  30709. }),
  30710. vue.createCommentVNode(" 任务进度 "),
  30711. vue.createElementVNode("view", { class: "progress-section" }, [
  30712. vue.createVNode(_component_u_alert, {
  30713. title: "当前任务",
  30714. type: "info",
  30715. center: ""
  30716. }),
  30717. vue.createElementVNode("view", {
  30718. class: "flex flex-j-c pad-10",
  30719. style: { "padding-right": "40rpx" }
  30720. }, [
  30721. vue.createCommentVNode(' <view class="next-task" @click="handleNextTask">\n <text>上一个</text>\n </view> '),
  30722. vue.createElementVNode("view", { class: "flex-c" }, [
  30723. vue.createElementVNode("text", null, [
  30724. vue.createTextVNode(
  30725. vue.toDisplayString($setup.currentTask),
  30726. 1
  30727. /* TEXT */
  30728. ),
  30729. vue.createElementVNode(
  30730. "text",
  30731. { class: "progress-text font-20 color-green" },
  30732. "/" + vue.toDisplayString($setup.totalTasks),
  30733. 1
  30734. /* TEXT */
  30735. )
  30736. ])
  30737. ]),
  30738. vue.createCommentVNode(' <view class="color-green" @click="handleNextTask">\n <text>下一个</text>\n </view> ')
  30739. ])
  30740. ]),
  30741. vue.createCommentVNode(" 库位信息 "),
  30742. vue.createElementVNode("view", {
  30743. class: "flex flex-j-b pad-10 next-location",
  30744. style: { "padding-right": "40rpx", "align-items": "center" }
  30745. }, [
  30746. vue.createElementVNode(
  30747. "view",
  30748. { class: "font-14 mb-20" },
  30749. vue.toDisplayString($setup.currentTask + 1) + "/" + vue.toDisplayString($setup.totalTasks),
  30750. 1
  30751. /* TEXT */
  30752. ),
  30753. vue.createElementVNode("view", { class: "flex-d" }, [
  30754. vue.createElementVNode(
  30755. "view",
  30756. { class: "font-20 text-center" },
  30757. vue.toDisplayString($setup.curTaskInfo.positionCode),
  30758. 1
  30759. /* TEXT */
  30760. ),
  30761. $setup.nextLocation ? (vue.openBlock(), vue.createElementBlock(
  30762. "view",
  30763. {
  30764. key: 0,
  30765. class: "location-detail font-13 mt-10"
  30766. },
  30767. "下一库位 " + vue.toDisplayString($setup.nextLocation || "无"),
  30768. 1
  30769. /* TEXT */
  30770. )) : vue.createCommentVNode("v-if", true)
  30771. ]),
  30772. !$setup.curTaskInfo.isValid ? (vue.openBlock(), vue.createElementBlock("image", {
  30773. key: 0,
  30774. src: _imports_0,
  30775. mode: "widthFix",
  30776. style: { "width": "70rpx", "height": "70rpx" }
  30777. })) : (vue.openBlock(), vue.createElementBlock("image", {
  30778. key: 1,
  30779. src: _imports_1,
  30780. mode: "widthFix",
  30781. style: { "width": "70rpx", "height": "70rpx" }
  30782. }))
  30783. ]),
  30784. vue.createCommentVNode(" 订单信息 "),
  30785. vue.createElementVNode("view", { class: "order-info" }, [
  30786. vue.createElementVNode(
  30787. "view",
  30788. { class: "info-item" },
  30789. "订单编号:" + vue.toDisplayString($setup.curTaskInfo.orderId),
  30790. 1
  30791. /* TEXT */
  30792. ),
  30793. vue.createElementVNode(
  30794. "view",
  30795. { class: "info-item" },
  30796. "物流单号:" + vue.toDisplayString($setup.curTaskInfo.waybillCode || "-"),
  30797. 1
  30798. /* TEXT */
  30799. ),
  30800. vue.createElementVNode(
  30801. "view",
  30802. { class: "info-item" },
  30803. "不良数量:" + vue.toDisplayString($setup.curTaskInfo.badNum),
  30804. 1
  30805. /* TEXT */
  30806. )
  30807. ]),
  30808. vue.createCommentVNode(" 极差商品列表 "),
  30809. vue.createElementVNode("view", { class: "bad-list" }, [
  30810. vue.createElementVNode("view", { class: "list-title mb-6 mt-20" }, "极差"),
  30811. (vue.openBlock(true), vue.createElementBlock(
  30812. vue.Fragment,
  30813. null,
  30814. vue.renderList($setup.badList, (item, index2) => {
  30815. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  30816. vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
  30817. ]);
  30818. }),
  30819. 128
  30820. /* KEYED_FRAGMENT */
  30821. ))
  30822. ]),
  30823. vue.createCommentVNode(" 底部搜索框 "),
  30824. vue.createElementVNode("view", {
  30825. class: "fixed-bottom pad-20",
  30826. style: { "background": "#ffffff" }
  30827. }, [
  30828. vue.createVNode(_component_u_search, {
  30829. modelValue: $setup.searchText,
  30830. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  30831. placeholder: "请输入订单编号/物流单号/库位号",
  30832. "show-action": false,
  30833. clearabled: true,
  30834. onSearch: _cache[1] || (_cache[1] = ($event) => $setup.checkScanText($setup.searchText)),
  30835. height: "40"
  30836. }, null, 8, ["modelValue"]),
  30837. vue.createVNode(_component_u_icon, {
  30838. name: "scan",
  30839. size: "28",
  30840. color: "#19be6b",
  30841. onClick: $setup.openScan
  30842. })
  30843. ])
  30844. ]);
  30845. }
  30846. const PagesIndexWmsTaskDetail = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-ca763ad9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/task-detail.vue"]]);
  30847. const _sfc_main$i = {
  30848. __name: "speedy-check-add",
  30849. setup(__props, { expose: __expose }) {
  30850. __expose();
  30851. const location2 = vue.ref("");
  30852. const products = vue.ref([]);
  30853. const orderNum = vue.ref("");
  30854. const godownName = vue.ref("");
  30855. const getOrderByPositionCode = (positionCode) => {
  30856. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  30857. if (res2.code === 200) {
  30858. const data = res2.data;
  30859. orderNum.value = data.orderNum;
  30860. godownName.value = data.godownName;
  30861. products.value = data.godownStockLogResults || [];
  30862. products.value.forEach((item) => {
  30863. item.checked = false;
  30864. });
  30865. } else {
  30866. uni.$u.toast(res2.msg);
  30867. }
  30868. });
  30869. };
  30870. onLoad((options) => {
  30871. if (options.location) {
  30872. location2.value = options.location;
  30873. getOrderByPositionCode(options.location);
  30874. }
  30875. });
  30876. const isAllSelected = vue.computed(() => {
  30877. return products.value.length > 0 && products.value.every((item) => item.checked);
  30878. });
  30879. const toggleItemSelect = (item) => {
  30880. item.checked = !item.checked;
  30881. };
  30882. const toggleSelectAll = () => {
  30883. const newState = !isAllSelected.value;
  30884. products.value.forEach((item) => {
  30885. item.checked = newState;
  30886. });
  30887. };
  30888. const onSubmit = () => {
  30889. const selectedItems = products.value.filter((item) => item.checked);
  30890. uni.$emit("selectedProducts", selectedItems);
  30891. goBack();
  30892. };
  30893. const goBack = () => {
  30894. uni.navigateBack({
  30895. delta: 1
  30896. });
  30897. };
  30898. const __returned__ = { location: location2, products, orderNum, godownName, getOrderByPositionCode, isAllSelected, toggleItemSelect, toggleSelectAll, onSubmit, goBack, ref: vue.ref, computed: vue.computed, get onLoad() {
  30899. return onLoad;
  30900. }, get onUnload() {
  30901. return onUnload;
  30902. }, LocationOrderItem };
  30903. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30904. return __returned__;
  30905. }
  30906. };
  30907. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  30908. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  30909. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  30910. return vue.openBlock(), vue.createElementBlock("view", {
  30911. class: "container",
  30912. style: { "padding-top": "84px", "padding-bottom": "10px" }
  30913. }, [
  30914. vue.createVNode(_component_u_navbar, {
  30915. title: "选择商品",
  30916. border: false,
  30917. fixed: "",
  30918. "safe-area-inset-top": "",
  30919. bgColor: "#22ac38",
  30920. titleStyle: "font-size:36rpx;color:#fff"
  30921. }, {
  30922. left: vue.withCtx(() => [
  30923. vue.createVNode(_component_u_icon, {
  30924. name: "arrow-left",
  30925. color: "#fff",
  30926. size: "20",
  30927. onClick: $setup.goBack
  30928. })
  30929. ]),
  30930. right: vue.withCtx(() => [
  30931. vue.createElementVNode("text", {
  30932. style: { "color": "#ffffff" },
  30933. onClick: $setup.onSubmit
  30934. }, "确定")
  30935. ]),
  30936. _: 1
  30937. /* STABLE */
  30938. }),
  30939. vue.createCommentVNode(" 库位显示 "),
  30940. vue.createElementVNode("view", { class: "location-info" }, [
  30941. vue.createElementVNode(
  30942. "text",
  30943. null,
  30944. "库位: " + vue.toDisplayString($setup.location),
  30945. 1
  30946. /* TEXT */
  30947. ),
  30948. $setup.godownName ? (vue.openBlock(), vue.createElementBlock(
  30949. "text",
  30950. { key: 0 },
  30951. "仓库: " + vue.toDisplayString($setup.godownName),
  30952. 1
  30953. /* TEXT */
  30954. )) : vue.createCommentVNode("v-if", true),
  30955. $setup.orderNum ? (vue.openBlock(), vue.createElementBlock(
  30956. "text",
  30957. { key: 1 },
  30958. "订单号: " + vue.toDisplayString($setup.orderNum),
  30959. 1
  30960. /* TEXT */
  30961. )) : vue.createCommentVNode("v-if", true)
  30962. ]),
  30963. vue.createCommentVNode(" 订单列表 "),
  30964. vue.createElementVNode("view", { class: "product-details" }, [
  30965. (vue.openBlock(true), vue.createElementBlock(
  30966. vue.Fragment,
  30967. null,
  30968. vue.renderList($setup.products, (item, index2) => {
  30969. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  30970. isCheck: "",
  30971. key: index2,
  30972. item,
  30973. onSelect: $setup.toggleItemSelect,
  30974. isLink: false
  30975. }, null, 8, ["item"]);
  30976. }),
  30977. 128
  30978. /* KEYED_FRAGMENT */
  30979. ))
  30980. ]),
  30981. vue.createCommentVNode(" 底部全选栏 "),
  30982. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30983. vue.createElementVNode("view", {
  30984. class: "select-all",
  30985. onClick: $setup.toggleSelectAll
  30986. }, [
  30987. vue.createVNode(_component_u_icon, {
  30988. name: $setup.isAllSelected ? "checkmark-circle-fill" : "checkmark-circle",
  30989. color: $setup.isAllSelected ? "#19be6b" : "#c8c9cc",
  30990. size: "28"
  30991. }, null, 8, ["name", "color"]),
  30992. vue.createElementVNode("text", { class: "select-text" }, "全选")
  30993. ]),
  30994. vue.createElementVNode(
  30995. "text",
  30996. { class: "order-count" },
  30997. "订单总数: " + vue.toDisplayString($setup.products.length),
  30998. 1
  30999. /* TEXT */
  31000. )
  31001. ])
  31002. ]);
  31003. }
  31004. const PagesIndexWmsSpeedyCheckAdd = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-dabb4347"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/speedy-check-add.vue"]]);
  31005. const _sfc_main$h = {
  31006. __name: "user-info",
  31007. setup(__props, { expose: __expose }) {
  31008. __expose();
  31009. const userInfo = vue.ref({
  31010. avatar: "/static/images/avatar.jpg",
  31011. name: "无",
  31012. gender: "无",
  31013. birthday: "无",
  31014. education: "无",
  31015. school: "无",
  31016. username: "用户账号",
  31017. account: "fxt",
  31018. createTime: "2024-06-12 12:00:00",
  31019. lastLogin: "",
  31020. company: "无",
  31021. employeeId: "无",
  31022. position: "无",
  31023. phone: "18888888888",
  31024. email: "无",
  31025. address: "无"
  31026. });
  31027. function getUserInfo() {
  31028. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  31029. if (res2.code == 200) {
  31030. userInfo.value = res2.data;
  31031. }
  31032. });
  31033. }
  31034. getUserInfo();
  31035. function setAvatar(avatarfile) {
  31036. uni.$u.http.post("/app/appUser/setAvatar?avatarfile=" + avatarfile).then((res2) => {
  31037. if (res2.code == 200) {
  31038. userInfo.value.avatar = avatarfile;
  31039. uni.showToast({
  31040. title: "头像设置成功",
  31041. icon: "success"
  31042. });
  31043. }
  31044. });
  31045. }
  31046. const handleEditAvatar = () => {
  31047. const token = uni.getStorageSync("token");
  31048. uni.chooseImage({
  31049. count: 1,
  31050. success: (res2) => {
  31051. const filePath = res2.tempFilePaths[0];
  31052. uni.uploadFile({
  31053. url: `${baseUrl}/common/upload`,
  31054. filePath,
  31055. name: "file",
  31056. header: {
  31057. "Authorization": token
  31058. },
  31059. success: (uploadRes) => {
  31060. const data = JSON.parse(uploadRes.data);
  31061. if (data.code === 200) {
  31062. setAvatar(data.url);
  31063. } else {
  31064. uni.showToast({
  31065. title: "上传失败",
  31066. icon: "none"
  31067. });
  31068. }
  31069. },
  31070. fail: () => {
  31071. uni.showToast({
  31072. title: "上传失败",
  31073. icon: "none"
  31074. });
  31075. }
  31076. });
  31077. }
  31078. });
  31079. };
  31080. const __returned__ = { userInfo, getUserInfo, setAvatar, handleEditAvatar, ref: vue.ref, get baseUrl() {
  31081. return baseUrl;
  31082. } };
  31083. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31084. return __returned__;
  31085. }
  31086. };
  31087. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  31088. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  31089. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  31090. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  31091. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  31092. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  31093. vue.createCommentVNode(" 头像区域 "),
  31094. vue.createElementVNode("view", { class: "avatar-section" }, [
  31095. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  31096. vue.createElementVNode("text", null, "头像:"),
  31097. vue.createVNode(_component_u_avatar, {
  31098. size: 50,
  31099. src: $setup.userInfo.avatar
  31100. }, null, 8, ["src"]),
  31101. vue.createVNode(_component_u_button, {
  31102. type: "success",
  31103. style: { "width": "200rpx" },
  31104. size: "small",
  31105. onClick: $setup.handleEditAvatar
  31106. }, {
  31107. default: vue.withCtx(() => [
  31108. vue.createTextVNode("去修改")
  31109. ]),
  31110. _: 1
  31111. /* STABLE */
  31112. })
  31113. ])
  31114. ]),
  31115. vue.createCommentVNode(" 基本信息区域 "),
  31116. vue.createElementVNode("view", { class: "info-section" }, [
  31117. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  31118. vue.createElementVNode("view", { class: "info-card" }, [
  31119. vue.createVNode(_component_u_cell_group, { border: false }, {
  31120. default: vue.withCtx(() => [
  31121. vue.createVNode(_component_u_cell, {
  31122. title: "姓名",
  31123. value: $setup.userInfo.nickName || "无"
  31124. }, null, 8, ["value"]),
  31125. vue.createVNode(_component_u_cell, {
  31126. title: "性别",
  31127. value: $setup.userInfo.sex == 0 ? "男" : $setup.userInfo.sex == 1 ? "女" : "未知"
  31128. }, null, 8, ["value"]),
  31129. vue.createVNode(_component_u_cell, {
  31130. title: "生日",
  31131. value: $setup.userInfo.birthday || "无"
  31132. }, null, 8, ["value"]),
  31133. vue.createVNode(_component_u_cell, {
  31134. title: "学历",
  31135. value: $setup.userInfo.education || "无"
  31136. }, null, 8, ["value"]),
  31137. vue.createVNode(_component_u_cell, {
  31138. title: "毕业学校",
  31139. value: $setup.userInfo.school || "无",
  31140. border: false
  31141. }, null, 8, ["value"])
  31142. ]),
  31143. _: 1
  31144. /* STABLE */
  31145. })
  31146. ])
  31147. ]),
  31148. vue.createCommentVNode(" 账号信息区域 "),
  31149. vue.createElementVNode("view", { class: "info-section" }, [
  31150. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  31151. vue.createElementVNode("view", { class: "info-card" }, [
  31152. vue.createVNode(_component_u_cell_group, { border: false }, {
  31153. default: vue.withCtx(() => [
  31154. vue.createVNode(_component_u_cell, {
  31155. title: "账号",
  31156. value: $setup.userInfo.userName
  31157. }, null, 8, ["value"]),
  31158. vue.createVNode(_component_u_cell, {
  31159. title: "创建日期",
  31160. value: $setup.userInfo.createTime
  31161. }, null, 8, ["value"]),
  31162. vue.createVNode(_component_u_cell, {
  31163. title: "最近登录",
  31164. value: $setup.userInfo.loginDate || "--",
  31165. border: false
  31166. }, null, 8, ["value"])
  31167. ]),
  31168. _: 1
  31169. /* STABLE */
  31170. })
  31171. ])
  31172. ]),
  31173. vue.createCommentVNode(" 员工资料区域 "),
  31174. vue.createElementVNode("view", { class: "info-section" }, [
  31175. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  31176. vue.createElementVNode("view", { class: "info-card" }, [
  31177. vue.createVNode(_component_u_cell_group, { border: false }, {
  31178. default: vue.withCtx(() => [
  31179. vue.createVNode(_component_u_cell, {
  31180. title: "公司",
  31181. value: $setup.userInfo.company || "无"
  31182. }, null, 8, ["value"]),
  31183. vue.createVNode(_component_u_cell, {
  31184. title: "员工编号",
  31185. value: $setup.userInfo.employeeId || "无"
  31186. }, null, 8, ["value"]),
  31187. vue.createVNode(_component_u_cell, {
  31188. title: "职位",
  31189. value: $setup.userInfo.position || "无",
  31190. border: false
  31191. }, null, 8, ["value"])
  31192. ]),
  31193. _: 1
  31194. /* STABLE */
  31195. })
  31196. ])
  31197. ]),
  31198. vue.createCommentVNode(" 联系方式区域 "),
  31199. vue.createElementVNode("view", { class: "info-section" }, [
  31200. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  31201. vue.createElementVNode("view", { class: "info-card" }, [
  31202. vue.createVNode(_component_u_cell_group, { border: false }, {
  31203. default: vue.withCtx(() => [
  31204. vue.createVNode(_component_u_cell, {
  31205. title: "电话",
  31206. value: $setup.userInfo.phonenumber
  31207. }, null, 8, ["value"]),
  31208. vue.createVNode(_component_u_cell, {
  31209. title: "邮箱",
  31210. value: $setup.userInfo.email || "无"
  31211. }, null, 8, ["value"]),
  31212. vue.createVNode(_component_u_cell, {
  31213. title: "住址",
  31214. value: $setup.userInfo.address || "无",
  31215. border: false
  31216. }, null, 8, ["value"])
  31217. ]),
  31218. _: 1
  31219. /* STABLE */
  31220. })
  31221. ])
  31222. ])
  31223. ]);
  31224. }
  31225. const PagesMyPageUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-804eca28"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/user-info.vue"]]);
  31226. const _sfc_main$g = {
  31227. __name: "warehouse",
  31228. setup(__props, { expose: __expose }) {
  31229. __expose();
  31230. const showPicker = vue.ref(false);
  31231. const selectedWarehouse = vue.ref("");
  31232. const warehouseList = vue.ref([]);
  31233. const getWarehouseList = () => {
  31234. uni.$u.http.post("/app/appUser/searchGodown?name=").then((res2) => {
  31235. if (res2.code == 200) {
  31236. warehouseList.value = res2.data.filter((v) => v.useStatus == 1).map((v) => ({
  31237. text: v.godownName,
  31238. value: v.id
  31239. }));
  31240. }
  31241. });
  31242. };
  31243. onLoad(() => {
  31244. getWarehouseList();
  31245. getWarehouse();
  31246. });
  31247. getWarehouseList();
  31248. const getWarehouse = () => {
  31249. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  31250. var _a;
  31251. if (res2.code == 200) {
  31252. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  31253. }
  31254. });
  31255. };
  31256. const saveWarehouse = (godownId) => {
  31257. uni.$u.http.post("/app/appUser/bingowGodown?godownId=" + godownId).then((res2) => {
  31258. if (res2.code == 200) {
  31259. uni.showToast({
  31260. title: "设置默认仓库成功",
  31261. icon: "success"
  31262. });
  31263. }
  31264. });
  31265. };
  31266. const onConfirm = (e) => {
  31267. const [{
  31268. value: value2,
  31269. text
  31270. }] = e.value;
  31271. selectedWarehouse.value = text;
  31272. showPicker.value = false;
  31273. formatAppLog("log", "at pages/my/page/warehouse.vue:81", e, "xxxxxx");
  31274. saveWarehouse(value2);
  31275. };
  31276. const __returned__ = { showPicker, selectedWarehouse, warehouseList, getWarehouseList, getWarehouse, saveWarehouse, onConfirm, ref: vue.ref, get onLoad() {
  31277. return onLoad;
  31278. } };
  31279. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31280. return __returned__;
  31281. }
  31282. };
  31283. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  31284. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  31285. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  31286. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  31287. vue.createElementVNode("view", {
  31288. class: "select-wrap",
  31289. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  31290. }, [
  31291. vue.createElementVNode("text", { class: "required-label" }, "*"),
  31292. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  31293. vue.createElementVNode("view", { class: "picker-value" }, [
  31294. vue.createElementVNode(
  31295. "text",
  31296. {
  31297. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  31298. },
  31299. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  31300. 3
  31301. /* TEXT, CLASS */
  31302. ),
  31303. vue.createVNode(_component_u_icon, {
  31304. name: "arrow-right",
  31305. color: "#999",
  31306. size: "16"
  31307. })
  31308. ])
  31309. ]),
  31310. vue.createCommentVNode(" 仓库选择器 "),
  31311. vue.createVNode(_component_u_picker, {
  31312. show: $setup.showPicker,
  31313. columns: [$setup.warehouseList],
  31314. onConfirm: $setup.onConfirm,
  31315. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  31316. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  31317. title: "选择仓库",
  31318. confirmText: "确定",
  31319. cancelText: "取消"
  31320. }, null, 8, ["show", "columns"])
  31321. ]);
  31322. }
  31323. const PagesMyPageWarehouse = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-972eecda"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/warehouse.vue"]]);
  31324. const _sfc_main$f = {
  31325. __name: "school",
  31326. setup(__props, { expose: __expose }) {
  31327. __expose();
  31328. const schoolName = vue.ref("");
  31329. const schoolList = vue.ref([]);
  31330. const getSchoolList = () => {
  31331. uni.$u.http.get("/app/appConf/getPadSchoolBroadcast").then((res2) => {
  31332. if (res2.code == 200) {
  31333. schoolList.value = res2.data;
  31334. }
  31335. });
  31336. };
  31337. getSchoolList();
  31338. const handleSubmit = () => {
  31339. if (schoolList.value.length === 0) {
  31340. uni.$u.toast("请至少添加一所学校");
  31341. return;
  31342. }
  31343. uni.$u.http.post("/app/appConf/setPadSchoolBroadcast", schoolList.value).then((res2) => {
  31344. if (res2.code == 200) {
  31345. uni.showToast({
  31346. title: "设置成功",
  31347. icon: "success"
  31348. });
  31349. }
  31350. });
  31351. };
  31352. const handleAddSchool = () => {
  31353. if (!schoolName.value.trim()) {
  31354. uni.$u.toast("请输入学校名称");
  31355. return;
  31356. }
  31357. schoolList.value.push({
  31358. schoolName: schoolName.value,
  31359. id: ""
  31360. });
  31361. schoolName.value = "";
  31362. };
  31363. const handleRemoveSchool = (index2) => {
  31364. schoolList.value.splice(index2, 1);
  31365. };
  31366. const __returned__ = { schoolName, schoolList, getSchoolList, handleSubmit, handleAddSchool, handleRemoveSchool, ref: vue.ref };
  31367. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31368. return __returned__;
  31369. }
  31370. };
  31371. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  31372. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
  31373. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  31374. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  31375. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  31376. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  31377. vue.createCommentVNode(" 输入区域 "),
  31378. vue.createElementVNode("view", { class: "input-section" }, [
  31379. vue.createElementVNode("view", { class: "input-header" }, [
  31380. vue.createElementVNode("text", { class: "required" }, "*"),
  31381. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  31382. vue.createVNode(_component_u_input, {
  31383. modelValue: $setup.schoolName,
  31384. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  31385. placeholder: "请输入一个学校名称",
  31386. border: "false",
  31387. class: "input"
  31388. }, {
  31389. suffix: vue.withCtx(() => [
  31390. vue.createVNode(_component_u_icon, {
  31391. name: "plus",
  31392. size: "24",
  31393. color: "#666",
  31394. onClick: $setup.handleAddSchool
  31395. })
  31396. ]),
  31397. _: 1
  31398. /* STABLE */
  31399. }, 8, ["modelValue"])
  31400. ])
  31401. ]),
  31402. vue.createCommentVNode(" 学校列表 "),
  31403. vue.createElementVNode("view", { class: "school-list" }, [
  31404. (vue.openBlock(true), vue.createElementBlock(
  31405. vue.Fragment,
  31406. null,
  31407. vue.renderList($setup.schoolList, (item, index2) => {
  31408. return vue.openBlock(), vue.createElementBlock("view", {
  31409. class: "school-item",
  31410. key: index2
  31411. }, [
  31412. vue.createVNode(_component_u_tag, {
  31413. text: item.schoolName,
  31414. closable: "",
  31415. size: "large"
  31416. }, null, 8, ["text"])
  31417. ]);
  31418. }),
  31419. 128
  31420. /* KEYED_FRAGMENT */
  31421. ))
  31422. ]),
  31423. vue.createCommentVNode(" 底部提交按钮 "),
  31424. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  31425. vue.createVNode(_component_u_button, {
  31426. size: "large",
  31427. type: "success",
  31428. block: "",
  31429. onClick: $setup.handleSubmit
  31430. }, {
  31431. default: vue.withCtx(() => [
  31432. vue.createTextVNode("提交")
  31433. ]),
  31434. _: 1
  31435. /* STABLE */
  31436. })
  31437. ])
  31438. ]);
  31439. }
  31440. const PagesMyPageSchool = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-6d6c87ab"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/school.vue"]]);
  31441. const _sfc_main$e = {
  31442. __name: "audit-unfinished",
  31443. setup(__props, { expose: __expose }) {
  31444. __expose();
  31445. const list = vue.ref([]);
  31446. const updateList = (newList) => {
  31447. list.value = newList;
  31448. };
  31449. const __returned__ = { list, updateList, orderItem, pageScroll, ref: vue.ref };
  31450. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31451. return __returned__;
  31452. }
  31453. };
  31454. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  31455. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  31456. vue.createVNode($setup["pageScroll"], {
  31457. requestStr: "/app/orderinfo/myNeedCheckOrder",
  31458. onUpdateList: $setup.updateList
  31459. }, {
  31460. default: vue.withCtx(() => [
  31461. (vue.openBlock(true), vue.createElementBlock(
  31462. vue.Fragment,
  31463. null,
  31464. vue.renderList($setup.list, (item, index2) => {
  31465. return vue.openBlock(), vue.createBlock($setup["orderItem"], {
  31466. key: index2,
  31467. item
  31468. }, null, 8, ["item"]);
  31469. }),
  31470. 128
  31471. /* KEYED_FRAGMENT */
  31472. ))
  31473. ]),
  31474. _: 1
  31475. /* STABLE */
  31476. })
  31477. ]);
  31478. }
  31479. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/audit-unfinished.vue"]]);
  31480. const _sfc_main$d = {
  31481. __name: "version",
  31482. setup(__props, { expose: __expose }) {
  31483. __expose();
  31484. const userInfo = vue.reactive({
  31485. version: "v_2024050400_1",
  31486. // Example version number
  31487. updateStatus: "已经是新版本"
  31488. // Example update status
  31489. });
  31490. function checkForUpdates() {
  31491. setTimeout(() => {
  31492. {
  31493. userInfo.updateStatus = "发现新版本,正在下载...";
  31494. downloadNewVersion();
  31495. }
  31496. }, 1e3);
  31497. }
  31498. function downloadNewVersion() {
  31499. setTimeout(() => {
  31500. userInfo.updateStatus = "下载完成,准备安装";
  31501. }, 2e3);
  31502. }
  31503. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  31504. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31505. return __returned__;
  31506. }
  31507. };
  31508. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  31509. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  31510. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  31511. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  31512. vue.createVNode(_component_u_cell_group, {
  31513. border: false,
  31514. customStyle: "background:#ffffff"
  31515. }, {
  31516. default: vue.withCtx(() => [
  31517. vue.createVNode(_component_u_cell, {
  31518. title: "当前版本号(正式版)",
  31519. value: $setup.userInfo.version || "无"
  31520. }, null, 8, ["value"]),
  31521. vue.createVNode(_component_u_cell, {
  31522. title: "检测更新",
  31523. value: $setup.userInfo.updateStatus || "无",
  31524. border: false,
  31525. onClick: $setup.checkForUpdates
  31526. }, null, 8, ["value"])
  31527. ]),
  31528. _: 1
  31529. /* STABLE */
  31530. })
  31531. ]);
  31532. }
  31533. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/version.vue"]]);
  31534. const props$1 = {
  31535. props: {
  31536. // 是否为加载中状态
  31537. loading: {
  31538. type: Boolean,
  31539. default: props$G.switch.loading
  31540. },
  31541. // 是否为禁用装填
  31542. disabled: {
  31543. type: Boolean,
  31544. default: props$G.switch.disabled
  31545. },
  31546. // 开关尺寸,单位px
  31547. size: {
  31548. type: [String, Number],
  31549. default: props$G.switch.size
  31550. },
  31551. // 打开时的背景颜色
  31552. activeColor: {
  31553. type: String,
  31554. default: props$G.switch.activeColor
  31555. },
  31556. // 关闭时的背景颜色
  31557. inactiveColor: {
  31558. type: String,
  31559. default: props$G.switch.inactiveColor
  31560. },
  31561. // 通过v-model双向绑定的值
  31562. modelValue: {
  31563. type: [Boolean, String, Number],
  31564. default: props$G.switch.value
  31565. },
  31566. // switch打开时的值
  31567. activeValue: {
  31568. type: [String, Number, Boolean],
  31569. default: props$G.switch.activeValue
  31570. },
  31571. // switch关闭时的值
  31572. inactiveValue: {
  31573. type: [String, Number, Boolean],
  31574. default: props$G.switch.inactiveValue
  31575. },
  31576. // 是否开启异步变更,开启后需要手动控制输入值
  31577. asyncChange: {
  31578. type: Boolean,
  31579. default: props$G.switch.asyncChange
  31580. },
  31581. // 圆点与外边框的距离
  31582. space: {
  31583. type: [String, Number],
  31584. default: props$G.switch.space
  31585. }
  31586. }
  31587. };
  31588. const _sfc_main$c = {
  31589. name: "u-switch",
  31590. mixins: [mpMixin, mixin, props$1],
  31591. watch: {
  31592. modelValue: {
  31593. immediate: true,
  31594. handler(n) {
  31595. if (n !== this.inactiveValue && n !== this.activeValue) {
  31596. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  31597. }
  31598. }
  31599. }
  31600. },
  31601. data() {
  31602. return {
  31603. bgColor: "#ffffff"
  31604. };
  31605. },
  31606. computed: {
  31607. isActive() {
  31608. return this.modelValue === this.activeValue;
  31609. },
  31610. switchStyle() {
  31611. let style = {};
  31612. style.width = uni.$u.addUnit(this.size * 2 + 2);
  31613. style.height = uni.$u.addUnit(Number(this.size) + 2);
  31614. if (this.customInactiveColor) {
  31615. style.borderColor = "rgba(0, 0, 0, 0)";
  31616. }
  31617. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  31618. return style;
  31619. },
  31620. nodeStyle() {
  31621. let style = {};
  31622. style.width = uni.$u.addUnit(this.size - this.space);
  31623. style.height = uni.$u.addUnit(this.size - this.space);
  31624. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  31625. style.transform = `translateX(-${translateX})`;
  31626. return style;
  31627. },
  31628. bgStyle() {
  31629. let style = {};
  31630. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  31631. style.height = uni.$u.addUnit(this.size);
  31632. style.backgroundColor = this.inactiveColor;
  31633. style.transform = `scale(${this.isActive ? 0 : 1})`;
  31634. return style;
  31635. },
  31636. customInactiveColor() {
  31637. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  31638. }
  31639. },
  31640. emits: ["update:modelValue", "change"],
  31641. methods: {
  31642. clickHandler() {
  31643. if (!this.disabled && !this.loading) {
  31644. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  31645. if (!this.asyncChange) {
  31646. this.$emit("update:modelValue", oldValue);
  31647. }
  31648. this.$nextTick(() => {
  31649. this.$emit("change", oldValue);
  31650. });
  31651. }
  31652. }
  31653. }
  31654. };
  31655. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  31656. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  31657. return vue.openBlock(), vue.createElementBlock(
  31658. "view",
  31659. {
  31660. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  31661. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  31662. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  31663. },
  31664. [
  31665. vue.createElementVNode(
  31666. "view",
  31667. {
  31668. class: "u-switch__bg",
  31669. style: vue.normalizeStyle([$options.bgStyle])
  31670. },
  31671. null,
  31672. 4
  31673. /* STYLE */
  31674. ),
  31675. vue.createElementVNode(
  31676. "view",
  31677. {
  31678. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  31679. style: vue.normalizeStyle([$options.nodeStyle]),
  31680. ref: "u-switch__node"
  31681. },
  31682. [
  31683. vue.createVNode(_component_u_loading_icon, {
  31684. show: _ctx.loading,
  31685. mode: "circle",
  31686. timingFunction: "linear",
  31687. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  31688. size: _ctx.size * 0.6
  31689. }, null, 8, ["show", "color", "size"])
  31690. ],
  31691. 6
  31692. /* CLASS, STYLE */
  31693. )
  31694. ],
  31695. 6
  31696. /* CLASS, STYLE */
  31697. );
  31698. }
  31699. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-6ab257b3"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]);
  31700. const props = {
  31701. props: {
  31702. // 最小可选值
  31703. min: {
  31704. type: [Number, String],
  31705. default: props$G.slider.min
  31706. },
  31707. // 最大可选值
  31708. max: {
  31709. type: [Number, String],
  31710. default: props$G.slider.max
  31711. },
  31712. // 步长,取值必须大于 0,并且可被(max - min)整除
  31713. step: {
  31714. type: [Number, String],
  31715. default: props$G.slider.step
  31716. },
  31717. // 当前取值
  31718. value: {
  31719. type: [Number, String],
  31720. default: props$G.slider.value
  31721. },
  31722. // 滑块右侧已选择部分的背景色
  31723. activeColor: {
  31724. type: String,
  31725. default: props$G.slider.activeColor
  31726. },
  31727. // 滑块左侧未选择部分的背景色
  31728. inactiveColor: {
  31729. type: String,
  31730. default: props$G.slider.inactiveColor
  31731. },
  31732. // 滑块的大小,取值范围为 12 - 28
  31733. blockSize: {
  31734. type: [Number, String],
  31735. default: props$G.slider.blockSize
  31736. },
  31737. // 滑块的颜色
  31738. blockColor: {
  31739. type: String,
  31740. default: props$G.slider.blockColor
  31741. },
  31742. // 禁用状态
  31743. disabled: {
  31744. type: Boolean,
  31745. default: props$G.slider.disabled
  31746. },
  31747. // 是否显示当前的选择值
  31748. showValue: {
  31749. type: Boolean,
  31750. default: props$G.slider.showValue
  31751. }
  31752. }
  31753. };
  31754. const _sfc_main$b = {
  31755. name: "u--slider",
  31756. mixins: [mpMixin, mixin, props],
  31757. methods: {
  31758. // 拖动过程中触发
  31759. changingHandler(e) {
  31760. const {
  31761. value: value2
  31762. } = e.detail;
  31763. this.$emit("input", value2);
  31764. this.$emit("changing", value2);
  31765. },
  31766. // 滑动结束时触发
  31767. changeHandler(e) {
  31768. const {
  31769. value: value2
  31770. } = e.detail;
  31771. this.$emit("input", value2);
  31772. this.$emit("change", value2);
  31773. }
  31774. }
  31775. };
  31776. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  31777. return vue.openBlock(), vue.createElementBlock(
  31778. "view",
  31779. {
  31780. class: "u-slider",
  31781. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  31782. },
  31783. [
  31784. vue.createElementVNode("slider", {
  31785. min: _ctx.min,
  31786. max: _ctx.max,
  31787. step: _ctx.step,
  31788. value: _ctx.value,
  31789. activeColor: _ctx.activeColor,
  31790. inactiveColor: _ctx.inactiveColor,
  31791. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  31792. blockColor: _ctx.blockColor,
  31793. showValue: _ctx.showValue,
  31794. disabled: _ctx.disabled,
  31795. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  31796. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  31797. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  31798. ],
  31799. 4
  31800. /* STYLE */
  31801. );
  31802. }
  31803. const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-7b84e269"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-slider/u-slider.vue"]]);
  31804. class VolumeTTS {
  31805. constructor(opts) {
  31806. __publicField(this, "ttsParams", {
  31807. lang: "zh-CN",
  31808. speed: 1,
  31809. // 将 0-10 转换为 0-1
  31810. pitch: 1,
  31811. // 将 0-10 转换为 0-1
  31812. volume: 1
  31813. });
  31814. __publicField(this, "TTSModule");
  31815. __publicField(this, "platform", uni.getSystemInfoSync().platform);
  31816. let audioConfig = uni.getStorageSync("audioConfig");
  31817. if (opts) {
  31818. this.ttsParams = opts;
  31819. } else if (audioConfig) {
  31820. this.ttsParams = {
  31821. lang: "zh-CN",
  31822. speed: audioConfig.audioSpeed / 10,
  31823. pitch: audioConfig.audioVolume,
  31824. volume: 1
  31825. };
  31826. }
  31827. this.init();
  31828. }
  31829. init() {
  31830. this.TTSModule = requireNativePlugin("nrb-tts-plugin");
  31831. this.TTSModule && this.TTSModule.init(
  31832. {
  31833. lang: "zh",
  31834. country: "CN"
  31835. },
  31836. (res2) => {
  31837. if (res2.success == 0) {
  31838. formatAppLog("log", "at utils/VolumeTTS.js:39", "TTS初始化成功");
  31839. }
  31840. }
  31841. );
  31842. }
  31843. //加一个text的预处理,将text中的数字替换成 零一二三四五六七八九十
  31844. preprocessText(text) {
  31845. const digitMap = {
  31846. 0: "零",
  31847. 1: "一",
  31848. 2: "二",
  31849. 3: "三",
  31850. 4: "四",
  31851. 5: "五",
  31852. 6: "六",
  31853. 7: "七",
  31854. 8: "八",
  31855. 9: "九"
  31856. };
  31857. return text.replace(/\d+/g, (match) => {
  31858. return match.split("").map((digit) => digitMap[digit] || digit).join("");
  31859. });
  31860. }
  31861. speak(text) {
  31862. text = this.preprocessText(text);
  31863. let opts = this.platform == "ios" ? {
  31864. rate: this.ttsParams.speed,
  31865. lang: "zh-CN",
  31866. volume: 1
  31867. } : {
  31868. pitch: this.ttsParams.pitch,
  31869. speechRate: this.ttsParams.speed,
  31870. queueMode: 1
  31871. };
  31872. this.TTSModule.speak(text, opts, (e) => {
  31873. formatAppLog("log", "at utils/VolumeTTS.js:98", e, "读取成功");
  31874. });
  31875. }
  31876. stop() {
  31877. if (this.TTSModule) {
  31878. this.TTSModule.stop();
  31879. }
  31880. }
  31881. destroy() {
  31882. this.stop();
  31883. this.TTSModule = null;
  31884. this.ttsParams = {
  31885. lang: "zh-CN",
  31886. speed: 1,
  31887. pitch: 1,
  31888. volume: 1
  31889. };
  31890. }
  31891. }
  31892. const _sfc_main$a = {
  31893. __name: "volume",
  31894. setup(__props, { expose: __expose }) {
  31895. __expose();
  31896. const settings = vue.ref({
  31897. audioStartSwitch: true,
  31898. audioStart: "书嗨,不辜负每一个爱书的人",
  31899. audioSpeed: 10,
  31900. audioVolume: 5,
  31901. audioPlay: false,
  31902. audioClick: false
  31903. });
  31904. function changeSpeed(value2) {
  31905. settings.value.audioSpeed = value2;
  31906. }
  31907. function changeVolume(value2) {
  31908. settings.value.audioVolume = value2;
  31909. }
  31910. const getVoiceBroadcast = () => {
  31911. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  31912. if (res2.code == 200) {
  31913. settings.value = res2.data;
  31914. }
  31915. });
  31916. };
  31917. getVoiceBroadcast();
  31918. const saveVoiceBroadcast = () => {
  31919. uni.$u.http.post("/app/appConf/setAudioConfig", settings.value).then((res2) => {
  31920. if (res2.code == 200) {
  31921. uni.showToast({
  31922. title: "设置成功",
  31923. icon: "success"
  31924. });
  31925. initTTS();
  31926. }
  31927. });
  31928. };
  31929. const tts = vue.ref(null);
  31930. const initTTS = () => {
  31931. let params = {
  31932. speed: settings.value.audioSpeed / 10,
  31933. // 将 0-10 转换为 0-1
  31934. pitch: settings.value.audioVolume,
  31935. // 将 0-10 转换为 0-1
  31936. volume: 1
  31937. };
  31938. tts.value = new VolumeTTS(params);
  31939. settings.value.audioStartSwitch && tts.value.speak(settings.value.audioStart);
  31940. };
  31941. function stopPlayback() {
  31942. tts.value && tts.value.stop();
  31943. uni.showToast({
  31944. title: "已停止播放",
  31945. icon: "none"
  31946. });
  31947. }
  31948. function restartApp() {
  31949. uni.showModal({
  31950. title: "提示",
  31951. content: "确定要重启应用吗?",
  31952. success: function(res2) {
  31953. if (res2.confirm) {
  31954. plus.runtime.restart();
  31955. }
  31956. }
  31957. });
  31958. }
  31959. function loadSettings() {
  31960. try {
  31961. const savedSettings = uni.getStorageSync("tts_settings");
  31962. if (savedSettings) {
  31963. Object.assign(settings, savedSettings);
  31964. }
  31965. } catch (error2) {
  31966. formatAppLog("error", "at pages/my/page/volume.vue:205", "加载设置失败:", error2);
  31967. }
  31968. }
  31969. function playClickSound2() {
  31970. if (!settings.audioClick)
  31971. return;
  31972. const audio = uni.createInnerAudioContext();
  31973. audio.src = "/static/audio/click.mp3";
  31974. audio.play();
  31975. }
  31976. vue.onMounted(async () => {
  31977. loadSettings();
  31978. });
  31979. onUnload(() => {
  31980. tts.value && tts.value.destroy();
  31981. });
  31982. const __returned__ = { settings, changeSpeed, changeVolume, getVoiceBroadcast, saveVoiceBroadcast, tts, initTTS, stopPlayback, restartApp, loadSettings, playClickSound: playClickSound2, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, get VolumeTTS() {
  31983. return VolumeTTS;
  31984. }, get onUnload() {
  31985. return onUnload;
  31986. } };
  31987. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31988. return __returned__;
  31989. }
  31990. };
  31991. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  31992. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  31993. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  31994. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  31995. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  31996. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  31997. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  31998. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  31999. vue.createCommentVNode(" 设置选项组 "),
  32000. vue.createElementVNode("view", { class: "settings-section" }, [
  32001. vue.createVNode(_component_u_cell_group, { border: false }, {
  32002. default: vue.withCtx(() => [
  32003. vue.createCommentVNode(" 语音播报设置 "),
  32004. vue.createVNode(_component_u_cell, {
  32005. title: "语音播报",
  32006. label: "控制除app启动提示外所有语音播报的开关",
  32007. "border-bottom": true
  32008. }, {
  32009. "right-icon": vue.withCtx(() => [
  32010. vue.createVNode(_component_u_switch, {
  32011. modelValue: $setup.settings.audioPlay,
  32012. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.audioPlay = $event),
  32013. activeColor: "#4cd964"
  32014. }, null, 8, ["modelValue"])
  32015. ]),
  32016. _: 1
  32017. /* STABLE */
  32018. }),
  32019. vue.createCommentVNode(" 点击音效设置 "),
  32020. vue.createVNode(_component_u_cell, {
  32021. title: "点击音效",
  32022. "border-bottom": true
  32023. }, {
  32024. "right-icon": vue.withCtx(() => [
  32025. vue.createVNode(_component_u_switch, {
  32026. modelValue: $setup.settings.audioClick,
  32027. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.audioClick = $event),
  32028. activeColor: "#4cd964"
  32029. }, null, 8, ["modelValue"])
  32030. ]),
  32031. _: 1
  32032. /* STABLE */
  32033. }),
  32034. vue.createCommentVNode(" 启动提示语设置 "),
  32035. vue.createVNode(_component_u_cell, {
  32036. title: "启动提示语",
  32037. "border-bottom": true
  32038. }, {
  32039. "right-icon": vue.withCtx(() => [
  32040. vue.createVNode(_component_u_switch, {
  32041. modelValue: $setup.settings.audioStartSwitch,
  32042. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.audioStartSwitch = $event),
  32043. activeColor: "#4cd964"
  32044. }, null, 8, ["modelValue"])
  32045. ]),
  32046. _: 1
  32047. /* STABLE */
  32048. })
  32049. ]),
  32050. _: 1
  32051. /* STABLE */
  32052. }),
  32053. vue.createCommentVNode(" 启动提示语输入框 "),
  32054. vue.createElementVNode("view", { class: "input-section" }, [
  32055. vue.createVNode(_component_u_textarea, {
  32056. modelValue: $setup.settings.audioStart,
  32057. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.audioStart = $event),
  32058. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  32059. height: "100"
  32060. }, null, 8, ["modelValue"])
  32061. ]),
  32062. vue.createCommentVNode(" 语速设置 "),
  32063. vue.createElementVNode("view", { class: "slider-section" }, [
  32064. vue.createElementVNode("view", { class: "slider-title" }, [
  32065. vue.createElementVNode("text", null, "设置语速"),
  32066. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  32067. ]),
  32068. vue.createVNode(_component_u_slider, {
  32069. value: $setup.settings.audioSpeed,
  32070. max: 20,
  32071. min: 5,
  32072. step: 1,
  32073. showValue: "",
  32074. onChange: $setup.changeSpeed
  32075. }, null, 8, ["value"])
  32076. ]),
  32077. vue.createCommentVNode(" 音调设置 "),
  32078. vue.createElementVNode("view", { class: "slider-section" }, [
  32079. vue.createElementVNode("view", { class: "slider-title" }, [
  32080. vue.createElementVNode("text", null, "设置音调"),
  32081. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  32082. ]),
  32083. vue.createVNode(_component_u_slider, {
  32084. value: $setup.settings.audioVolume,
  32085. max: 10,
  32086. min: 1,
  32087. step: 1,
  32088. showValue: "",
  32089. onChange: $setup.changeVolume
  32090. }, null, 8, ["value"])
  32091. ]),
  32092. vue.createCommentVNode(" 操作按钮 "),
  32093. vue.createElementVNode("view", { class: "button-group" }, [
  32094. vue.createVNode(_component_u_button, {
  32095. type: "primary",
  32096. text: "保存设置并试听",
  32097. onClick: $setup.saveVoiceBroadcast
  32098. }),
  32099. vue.createVNode(_component_u_button, {
  32100. type: "warning",
  32101. text: "停止播放",
  32102. onClick: $setup.stopPlayback,
  32103. plain: true
  32104. }),
  32105. vue.createVNode(_component_u_button, {
  32106. type: "error",
  32107. text: "重启app",
  32108. onClick: $setup.restartApp,
  32109. plain: true
  32110. })
  32111. ])
  32112. ])
  32113. ]);
  32114. }
  32115. const PagesMyPageVolume = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-983b50b6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/volume.vue"]]);
  32116. const _sfc_main$9 = {
  32117. __name: "book-display",
  32118. setup(__props, { expose: __expose }) {
  32119. __expose();
  32120. const settings = vue.reactive({
  32121. showRecyclePrice: false,
  32122. showRecycleStatus: false,
  32123. showStock: false,
  32124. showDetail: false
  32125. });
  32126. function loadSettings() {
  32127. uni.$u.http.get("/app/appConf/getBookShowConfig").then((res2) => {
  32128. if (res2.code == 200) {
  32129. Object.assign(settings, res2.data);
  32130. }
  32131. });
  32132. }
  32133. function saveSettings() {
  32134. uni.$u.http.post("/app/appConf/setBookShowConfig", settings).then((res2) => {
  32135. if (res2.code == 200) {
  32136. uni.showToast({
  32137. title: "设置已保存",
  32138. icon: "success"
  32139. });
  32140. } else {
  32141. uni.showToast({
  32142. title: "保存设置失败",
  32143. icon: "error"
  32144. });
  32145. }
  32146. });
  32147. }
  32148. vue.onMounted(() => {
  32149. loadSettings();
  32150. });
  32151. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  32152. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  32153. return __returned__;
  32154. }
  32155. };
  32156. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  32157. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  32158. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  32159. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  32160. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  32161. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  32162. vue.createCommentVNode(" 设置列表 "),
  32163. vue.createVNode(_component_u_cell_group, {
  32164. border: false,
  32165. class: "settings-group"
  32166. }, {
  32167. default: vue.withCtx(() => [
  32168. vue.createVNode(_component_u_cell, {
  32169. title: "是否展示回收价",
  32170. "border-bottom": true
  32171. }, {
  32172. "right-icon": vue.withCtx(() => [
  32173. vue.createVNode(_component_u_switch, {
  32174. modelValue: $setup.settings.showRecyclePrice,
  32175. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  32176. activeColor: "#4cd964"
  32177. }, null, 8, ["modelValue"])
  32178. ]),
  32179. _: 1
  32180. /* STABLE */
  32181. }),
  32182. vue.createVNode(_component_u_cell, {
  32183. title: "是否展示回收状态",
  32184. "border-bottom": true
  32185. }, {
  32186. "right-icon": vue.withCtx(() => [
  32187. vue.createVNode(_component_u_switch, {
  32188. modelValue: $setup.settings.showRecycleStatus,
  32189. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  32190. activeColor: "#4cd964"
  32191. }, null, 8, ["modelValue"])
  32192. ]),
  32193. _: 1
  32194. /* STABLE */
  32195. }),
  32196. vue.createVNode(_component_u_cell, {
  32197. title: "是否展示库存信息",
  32198. "border-bottom": true
  32199. }, {
  32200. "right-icon": vue.withCtx(() => [
  32201. vue.createVNode(_component_u_switch, {
  32202. modelValue: $setup.settings.showStock,
  32203. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showStock = $event),
  32204. activeColor: "#4cd964"
  32205. }, null, 8, ["modelValue"])
  32206. ]),
  32207. _: 1
  32208. /* STABLE */
  32209. }),
  32210. vue.createVNode(_component_u_cell, {
  32211. title: "是否默认展开商品详情",
  32212. "border-bottom": false
  32213. }, {
  32214. "right-icon": vue.withCtx(() => [
  32215. vue.createVNode(_component_u_switch, {
  32216. modelValue: $setup.settings.showDetail,
  32217. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.showDetail = $event),
  32218. activeColor: "#4cd964"
  32219. }, null, 8, ["modelValue"])
  32220. ]),
  32221. _: 1
  32222. /* STABLE */
  32223. })
  32224. ]),
  32225. _: 1
  32226. /* STABLE */
  32227. }),
  32228. vue.createVNode(_component_u_button, {
  32229. class: "mt-40",
  32230. type: "primary",
  32231. onClick: $setup.saveSettings
  32232. }, {
  32233. default: vue.withCtx(() => [
  32234. vue.createTextVNode("保存")
  32235. ]),
  32236. _: 1
  32237. /* STABLE */
  32238. })
  32239. ]);
  32240. }
  32241. const PagesMyPageBookDisplay = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-30e61b0d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/book-display.vue"]]);
  32242. const _sfc_main$8 = {
  32243. __name: "password",
  32244. setup(__props, { expose: __expose }) {
  32245. __expose();
  32246. const formRef = vue.ref(null);
  32247. const loading = vue.ref(false);
  32248. const showPassword = vue.reactive({
  32249. old: false,
  32250. new: false,
  32251. confirm: false
  32252. });
  32253. const formData = vue.reactive({
  32254. oldPassword: "",
  32255. newPassword: "",
  32256. confirmPassword: ""
  32257. });
  32258. const rules2 = {
  32259. oldPassword: [{
  32260. required: true,
  32261. message: "请输入原密码",
  32262. trigger: ["blur", "change"]
  32263. }, {
  32264. min: 6,
  32265. message: "密码长度不能小于6位",
  32266. trigger: ["blur", "change"]
  32267. }],
  32268. newPassword: [{
  32269. required: true,
  32270. message: "请输入新密码",
  32271. trigger: ["blur", "change"]
  32272. }, {
  32273. min: 6,
  32274. message: "密码长度不能小于6位",
  32275. trigger: ["blur", "change"]
  32276. }, {
  32277. validator: (rule, value2, callback) => {
  32278. if (value2 === formData.oldPassword) {
  32279. callback(new Error("新密码不能与原密码相同"));
  32280. } else {
  32281. callback();
  32282. }
  32283. },
  32284. trigger: ["blur", "change"]
  32285. }],
  32286. confirmPassword: [{
  32287. required: true,
  32288. message: "请再次输入新密码",
  32289. trigger: ["blur", "change"]
  32290. }, {
  32291. validator: (rule, value2, callback) => {
  32292. if (value2 !== formData.newPassword) {
  32293. callback(new Error("两次输入的密码不一致"));
  32294. } else {
  32295. callback();
  32296. }
  32297. },
  32298. trigger: ["blur", "change"]
  32299. }]
  32300. };
  32301. function submitForm() {
  32302. if (!formRef.value)
  32303. return;
  32304. formRef.value.validate().then((valid) => {
  32305. if (valid) {
  32306. loading.value = true;
  32307. uni.$u.http.post("/app/appUser/updatePwd", formData).then((res2) => {
  32308. if (res2.code == 200) {
  32309. uni.showModal({
  32310. title: "提示",
  32311. content: "密码修改成功,是否确定要退出重新登录?",
  32312. success: (res3) => {
  32313. if (res3.confirm) {
  32314. uni.clearStorageSync();
  32315. uni.reLaunch({
  32316. url: "/pages/login/login"
  32317. });
  32318. } else {
  32319. uni.navigateBack({
  32320. delta: 1
  32321. });
  32322. }
  32323. }
  32324. });
  32325. }
  32326. }).finally(() => {
  32327. loading.value = false;
  32328. });
  32329. }
  32330. });
  32331. }
  32332. function resetForm() {
  32333. if (!formRef.value)
  32334. return;
  32335. formRef.value.resetFields();
  32336. }
  32337. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  32338. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  32339. return __returned__;
  32340. }
  32341. };
  32342. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  32343. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
  32344. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  32345. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  32346. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  32347. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  32348. vue.createVNode(_component_u_form, {
  32349. model: $setup.formData,
  32350. rules: $setup.rules,
  32351. ref: "formRef",
  32352. labelPosition: "top",
  32353. borderBottom: true,
  32354. labelWidth: "300px",
  32355. "error-type": "toast"
  32356. }, {
  32357. default: vue.withCtx(() => [
  32358. vue.createVNode(_component_u_form_item, {
  32359. label: "原密码",
  32360. prop: "oldPassword",
  32361. borderBottom: ""
  32362. }, {
  32363. default: vue.withCtx(() => [
  32364. vue.createVNode(_component_u_input, {
  32365. modelValue: $setup.formData.oldPassword,
  32366. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.oldPassword = $event),
  32367. type: "password",
  32368. placeholder: "请输入原密码",
  32369. border: false
  32370. }, null, 8, ["modelValue"])
  32371. ]),
  32372. _: 1
  32373. /* STABLE */
  32374. }),
  32375. vue.createVNode(_component_u_form_item, {
  32376. label: "新密码",
  32377. prop: "newPassword",
  32378. borderBottom: ""
  32379. }, {
  32380. default: vue.withCtx(() => [
  32381. vue.createVNode(_component_u_input, {
  32382. modelValue: $setup.formData.newPassword,
  32383. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.newPassword = $event),
  32384. type: "password",
  32385. placeholder: "请输入新密码",
  32386. border: false
  32387. }, null, 8, ["modelValue"])
  32388. ]),
  32389. _: 1
  32390. /* STABLE */
  32391. }),
  32392. vue.createVNode(_component_u_form_item, {
  32393. label: "确认新密码",
  32394. prop: "confirmPassword",
  32395. borderBottom: ""
  32396. }, {
  32397. default: vue.withCtx(() => [
  32398. vue.createVNode(_component_u_input, {
  32399. modelValue: $setup.formData.confirmPassword,
  32400. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.confirmPassword = $event),
  32401. type: "password",
  32402. placeholder: "请再次输入新密码",
  32403. border: false
  32404. }, null, 8, ["modelValue"])
  32405. ]),
  32406. _: 1
  32407. /* STABLE */
  32408. })
  32409. ]),
  32410. _: 1
  32411. /* STABLE */
  32412. }, 8, ["model"]),
  32413. vue.createElementVNode("view", { class: "submit-btn" }, [
  32414. vue.createVNode(_component_u_button, {
  32415. type: "primary",
  32416. text: "修改密码",
  32417. onClick: $setup.submitForm,
  32418. loading: $setup.loading
  32419. }, null, 8, ["loading"])
  32420. ])
  32421. ]);
  32422. }
  32423. const PagesMyPagePassword = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-b88a898e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/password.vue"]]);
  32424. const _sfc_main$7 = {};
  32425. function _sfc_render$6(_ctx, _cache) {
  32426. return vue.openBlock(), vue.createElementBlock("view");
  32427. }
  32428. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/stat/pending-review.vue"]]);
  32429. const _sfc_main$6 = {};
  32430. function _sfc_render$5(_ctx, _cache) {
  32431. return vue.openBlock(), vue.createElementBlock("view");
  32432. }
  32433. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/stat/pending-pick.vue"]]);
  32434. const _sfc_main$5 = {};
  32435. function _sfc_render$4(_ctx, _cache) {
  32436. return vue.openBlock(), vue.createElementBlock("view");
  32437. }
  32438. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/stat/pending-sign.vue"]]);
  32439. const _sfc_main$4 = {};
  32440. function _sfc_render$3(_ctx, _cache) {
  32441. return vue.openBlock(), vue.createElementBlock("view");
  32442. }
  32443. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/stat/pending-confirm.vue"]]);
  32444. const _sfc_main$3 = {};
  32445. function _sfc_render$2(_ctx, _cache) {
  32446. return vue.openBlock(), vue.createElementBlock("view");
  32447. }
  32448. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/stat/pending-audit.vue"]]);
  32449. const _sfc_main$2 = {};
  32450. function _sfc_render$1(_ctx, _cache) {
  32451. return vue.openBlock(), vue.createElementBlock("view");
  32452. }
  32453. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/stat/pending-payment.vue"]]);
  32454. const _sfc_main$1 = {};
  32455. function _sfc_render(_ctx, _cache) {
  32456. return vue.openBlock(), vue.createElementBlock("view");
  32457. }
  32458. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/stat/receive-stat.vue"]]);
  32459. __definePage("pages/login/login", PagesLoginLogin);
  32460. __definePage("pages/index/index", PagesIndexIndex);
  32461. __definePage("pages/my/my", PagesMyMy);
  32462. __definePage("pages/order/index", PagesOrderIndex);
  32463. __definePage("pages/book/index", PagesBookIndex);
  32464. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  32465. __definePage("pages/index/express/scan", PagesIndexExpressScan);
  32466. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  32467. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  32468. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  32469. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  32470. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  32471. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  32472. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  32473. __definePage("pages/index/audit/isbn-order", PagesIndexAuditIsbnOrder);
  32474. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  32475. __definePage("pages/index/detail/user-orders", PagesIndexDetailUserOrders);
  32476. __definePage("pages/index/detail/index", PagesIndexDetailIndex);
  32477. __definePage("pages/index/detail/book-audit", PagesIndexDetailBookAudit);
  32478. __definePage("pages/index/detail/batch-audit", PagesIndexDetailBatchAudit);
  32479. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  32480. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  32481. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  32482. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  32483. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  32484. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  32485. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  32486. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  32487. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  32488. __definePage("pages/index/wms/bad-out-order", PagesIndexWmsBadOutOrder);
  32489. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  32490. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  32491. __definePage("pages/index/wms/order-query-list", PagesIndexWmsOrderQueryList);
  32492. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  32493. __definePage("pages/index/wms/location-order-list", PagesIndexWmsLocationOrderList);
  32494. __definePage("pages/index/wms/location-select", PagesIndexWmsLocationSelect);
  32495. __definePage("pages/index/wms/warehouse-select", PagesIndexWmsWarehouseSelect);
  32496. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  32497. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  32498. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  32499. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  32500. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  32501. __definePage("pages/index/entry/commodity-scan", PagesIndexEntryCommodityScan);
  32502. __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
  32503. __definePage("pages/index/wms/task-detail", PagesIndexWmsTaskDetail);
  32504. __definePage("pages/index/wms/speedy-check-add", PagesIndexWmsSpeedyCheckAdd);
  32505. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  32506. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  32507. __definePage("pages/my/page/school", PagesMyPageSchool);
  32508. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  32509. __definePage("pages/my/page/version", PagesMyPageVersion);
  32510. __definePage("pages/my/page/volume", PagesMyPageVolume);
  32511. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  32512. __definePage("pages/my/page/password", PagesMyPagePassword);
  32513. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  32514. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  32515. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  32516. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  32517. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  32518. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  32519. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  32520. function useInit() {
  32521. var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
  32522. barcodeModel.initScan((ret) => {
  32523. formatAppLog("log", "at utils/useBarcodeModule.js:9", "初始化扫描", ret);
  32524. });
  32525. }
  32526. const isWeakRefSupported = typeof WeakRef !== "undefined";
  32527. const callbackRegistry = {
  32528. activePagePath: null,
  32529. callbacks: /* @__PURE__ */ new Map(),
  32530. // 使用Map存储每个页面路径对应的回调函数
  32531. pageInstances: /* @__PURE__ */ new Map()
  32532. // 存储页面实例,用于自动清理
  32533. };
  32534. const globalEventHandler = function(e) {
  32535. if (!callbackRegistry.activePagePath) {
  32536. formatAppLog("warn", "at utils/useBarcodeModule.js:29", "收到扫描事件,但没有活跃页面");
  32537. return;
  32538. }
  32539. const callback = callbackRegistry.callbacks.get(callbackRegistry.activePagePath);
  32540. if (callback) {
  32541. try {
  32542. callback(e);
  32543. } catch (error2) {
  32544. formatAppLog("error", "at utils/useBarcodeModule.js:39", `页面 ${callbackRegistry.activePagePath} 的扫描回调执行出错:`, error2);
  32545. }
  32546. } else {
  32547. formatAppLog("warn", "at utils/useBarcodeModule.js:42", `活跃页面 ${callbackRegistry.activePagePath} 没有注册扫描回调`);
  32548. }
  32549. };
  32550. let isGlobalListenerInitialized = false;
  32551. let globalEvent = null;
  32552. function initGlobalListener() {
  32553. if (isGlobalListenerInitialized)
  32554. return;
  32555. try {
  32556. globalEvent = requireNativePlugin("globalEvent");
  32557. globalEvent.removeEventListener("iDataBarcodeEvent", globalEventHandler);
  32558. globalEvent.addEventListener("iDataBarcodeEvent", globalEventHandler);
  32559. isGlobalListenerInitialized = true;
  32560. formatAppLog("log", "at utils/useBarcodeModule.js:61", "全局扫描监听器已初始化");
  32561. } catch (error2) {
  32562. formatAppLog("error", "at utils/useBarcodeModule.js:63", "初始化全局扫描监听器失败:", error2);
  32563. }
  32564. }
  32565. function getCurrentPagePath() {
  32566. try {
  32567. const pages2 = getCurrentPages();
  32568. if (!pages2 || pages2.length === 0) {
  32569. formatAppLog("warn", "at utils/useBarcodeModule.js:74", "getCurrentPages() 返回空数组");
  32570. return null;
  32571. }
  32572. const currentPage = pages2[pages2.length - 1];
  32573. if (!currentPage || !currentPage.route) {
  32574. formatAppLog("warn", "at utils/useBarcodeModule.js:80", "当前页面对象或路径无效");
  32575. return null;
  32576. }
  32577. return currentPage.route;
  32578. } catch (error2) {
  32579. formatAppLog("error", "at utils/useBarcodeModule.js:86", "获取当前页面路径失败:", error2);
  32580. return null;
  32581. }
  32582. }
  32583. function useGlobalEvent(onChange) {
  32584. if (typeof onChange !== "function") {
  32585. formatAppLog("error", "at utils/useBarcodeModule.js:98", "useGlobalEvent: onChange 必须是一个函数");
  32586. return () => {
  32587. };
  32588. }
  32589. initGlobalListener();
  32590. const pagePath = getCurrentPagePath();
  32591. if (!pagePath) {
  32592. formatAppLog("error", "at utils/useBarcodeModule.js:108", "useGlobalEvent: 无法获取当前页面路径");
  32593. return () => {
  32594. };
  32595. }
  32596. if (callbackRegistry.callbacks.has(pagePath)) {
  32597. formatAppLog("warn", "at utils/useBarcodeModule.js:114", `页面 ${pagePath} 已经注册过扫描回调,将覆盖之前的回调`);
  32598. }
  32599. callbackRegistry.activePagePath = pagePath;
  32600. callbackRegistry.callbacks.set(pagePath, onChange);
  32601. try {
  32602. const pages2 = getCurrentPages();
  32603. const currentPage = pages2[pages2.length - 1];
  32604. if (currentPage) {
  32605. if (isWeakRefSupported) {
  32606. callbackRegistry.pageInstances.set(pagePath, new WeakRef(currentPage));
  32607. } else {
  32608. callbackRegistry.pageInstances.set(pagePath, currentPage);
  32609. formatAppLog("warn", "at utils/useBarcodeModule.js:135", "WeakRef不支持,使用普通引用,请确保在页面卸载时手动清理");
  32610. }
  32611. }
  32612. } catch (error2) {
  32613. formatAppLog("warn", "at utils/useBarcodeModule.js:139", "无法存储页面实例引用:", error2);
  32614. }
  32615. formatAppLog("log", "at utils/useBarcodeModule.js:142", `页面 ${pagePath} 已注册扫描回调,当前注册页面数: ${callbackRegistry.callbacks.size}`);
  32616. return () => {
  32617. removePageCallback(pagePath);
  32618. };
  32619. }
  32620. function updateActivePageOnShow() {
  32621. const pagePath = getCurrentPagePath();
  32622. if (!pagePath) {
  32623. formatAppLog("error", "at utils/useBarcodeModule.js:158", "updateActivePageOnShow: 无法获取当前页面路径");
  32624. return;
  32625. }
  32626. callbackRegistry.activePagePath = pagePath;
  32627. formatAppLog("log", "at utils/useBarcodeModule.js:164", `当前活跃页面已更新为: ${pagePath}`);
  32628. cleanupInvalidPageReferences();
  32629. }
  32630. function cleanupInvalidPageReferences() {
  32631. const currentPages = getCurrentPages();
  32632. const currentPagePaths = new Set(currentPages.map((page2) => page2.route));
  32633. const pagesToRemove = [];
  32634. for (const [pagePath, pageRef] of callbackRegistry.pageInstances) {
  32635. let shouldRemove = false;
  32636. if (!currentPagePaths.has(pagePath)) {
  32637. shouldRemove = true;
  32638. } else if (isWeakRefSupported && pageRef) {
  32639. if (!pageRef.deref()) {
  32640. shouldRemove = true;
  32641. }
  32642. }
  32643. if (shouldRemove) {
  32644. pagesToRemove.push(pagePath);
  32645. }
  32646. }
  32647. pagesToRemove.forEach((pagePath) => {
  32648. callbackRegistry.callbacks.delete(pagePath);
  32649. callbackRegistry.pageInstances.delete(pagePath);
  32650. formatAppLog("log", "at utils/useBarcodeModule.js:204", `自动清理页面 ${pagePath} 的扫描回调`);
  32651. });
  32652. if (pagesToRemove.length > 0) {
  32653. formatAppLog("log", "at utils/useBarcodeModule.js:208", `自动清理了 ${pagesToRemove.length} 个无效页面的回调,当前注册页面数: ${callbackRegistry.callbacks.size}`);
  32654. }
  32655. }
  32656. function useGlobalEventRemove() {
  32657. try {
  32658. if (globalEvent && isGlobalListenerInitialized) {
  32659. globalEvent.removeEventListener("iDataBarcodeEvent", globalEventHandler);
  32660. }
  32661. isGlobalListenerInitialized = false;
  32662. globalEvent = null;
  32663. callbackRegistry.callbacks.clear();
  32664. callbackRegistry.pageInstances.clear();
  32665. callbackRegistry.activePagePath = null;
  32666. formatAppLog("log", "at utils/useBarcodeModule.js:228", "全局扫描监听器已完全移除,所有回调已清理");
  32667. } catch (error2) {
  32668. formatAppLog("error", "at utils/useBarcodeModule.js:230", "移除全局扫描监听器时出错:", error2);
  32669. }
  32670. }
  32671. function removePageCallback(pagePath) {
  32672. if (!pagePath) {
  32673. pagePath = getCurrentPagePath();
  32674. }
  32675. if (!pagePath) {
  32676. formatAppLog("error", "at utils/useBarcodeModule.js:244", "removePageCallback: 无法获取页面路径");
  32677. return;
  32678. }
  32679. const hasCallback = callbackRegistry.callbacks.has(pagePath);
  32680. callbackRegistry.callbacks.delete(pagePath);
  32681. callbackRegistry.pageInstances.delete(pagePath);
  32682. if (callbackRegistry.activePagePath === pagePath) {
  32683. callbackRegistry.activePagePath = null;
  32684. }
  32685. if (hasCallback) {
  32686. formatAppLog("log", "at utils/useBarcodeModule.js:259", `页面 ${pagePath} 的扫描回调已移除,当前注册页面数: ${callbackRegistry.callbacks.size}`);
  32687. } else {
  32688. formatAppLog("warn", "at utils/useBarcodeModule.js:261", `页面 ${pagePath} 没有注册过扫描回调`);
  32689. }
  32690. }
  32691. function cleanupOnPageUnload() {
  32692. const pagePath = getCurrentPagePath();
  32693. if (pagePath) {
  32694. removePageCallback(pagePath);
  32695. }
  32696. }
  32697. function useRouteMonitor(onChange) {
  32698. uni.addInterceptor("navigateTo", {
  32699. invoke(e) {
  32700. var _a;
  32701. const pages2 = getCurrentPages();
  32702. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  32703. onChange && onChange(e.url, from);
  32704. formatAppLog("log", "at utils/useRouteMonitor.js:18", "navigateTo", e.url, from);
  32705. return e;
  32706. }
  32707. });
  32708. uni.addInterceptor("redirectTo", {
  32709. invoke(e) {
  32710. var _a;
  32711. const pages2 = getCurrentPages();
  32712. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  32713. onChange && onChange(e.url, from);
  32714. formatAppLog("log", "at utils/useRouteMonitor.js:28", "redirectTo", e.url, from);
  32715. return e;
  32716. }
  32717. });
  32718. uni.addInterceptor("reLaunch", {
  32719. invoke(e) {
  32720. var _a;
  32721. const pages2 = getCurrentPages();
  32722. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  32723. onChange && onChange(e.url, from);
  32724. formatAppLog("log", "at utils/useRouteMonitor.js:38", "reLaunch", e.url, from);
  32725. return e;
  32726. }
  32727. });
  32728. uni.addInterceptor("switchTab", {
  32729. invoke(e) {
  32730. var _a;
  32731. const pages2 = getCurrentPages();
  32732. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  32733. onChange && onChange(e.url, from);
  32734. formatAppLog("log", "at utils/useRouteMonitor.js:48", "switchTab", e.url, from);
  32735. return e;
  32736. }
  32737. });
  32738. }
  32739. const audioContext = vue.ref(null);
  32740. const initClickSound = () => {
  32741. audioContext.value = uni.createInnerAudioContext();
  32742. audioContext.value.src = "/static/bap.mp3";
  32743. audioContext.value.volume = 0.8;
  32744. };
  32745. const playClickSound = () => {
  32746. if (audioContext.value) {
  32747. audioContext.value.play();
  32748. }
  32749. };
  32750. const _sfc_main = {
  32751. __name: "App",
  32752. setup(__props, { expose: __expose }) {
  32753. __expose();
  32754. onLaunch(() => {
  32755. let token = uni.getStorageSync("token");
  32756. if (token) {
  32757. let userInfo = uni.getStorageSync("userInfo");
  32758. if (userInfo) {
  32759. if (userInfo.userId) {
  32760. store.setUserInfo(userInfo);
  32761. }
  32762. }
  32763. }
  32764. });
  32765. onShow(() => {
  32766. });
  32767. const __returned__ = { get onLaunch() {
  32768. return onLaunch;
  32769. }, get onShow() {
  32770. return onShow;
  32771. }, get onHide() {
  32772. return onHide;
  32773. }, get onUnload() {
  32774. return onUnload;
  32775. }, get store() {
  32776. return store;
  32777. }, get useGlobalEventRemove() {
  32778. return useGlobalEventRemove;
  32779. }, get useInit() {
  32780. return useInit;
  32781. }, get updateActivePageOnShow() {
  32782. return updateActivePageOnShow;
  32783. }, get useRouteMonitor() {
  32784. return useRouteMonitor;
  32785. }, get playClickSound() {
  32786. return playClickSound;
  32787. } };
  32788. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  32789. return __returned__;
  32790. }
  32791. };
  32792. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/App.vue"]]);
  32793. const { toString } = Object.prototype;
  32794. function isArray(val) {
  32795. return toString.call(val) === "[object Array]";
  32796. }
  32797. function isObject(val) {
  32798. return val !== null && typeof val === "object";
  32799. }
  32800. function isDate(val) {
  32801. return toString.call(val) === "[object Date]";
  32802. }
  32803. function isURLSearchParams(val) {
  32804. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  32805. }
  32806. function forEach(obj, fn) {
  32807. if (obj === null || typeof obj === "undefined") {
  32808. return;
  32809. }
  32810. if (typeof obj !== "object") {
  32811. obj = [obj];
  32812. }
  32813. if (isArray(obj)) {
  32814. for (let i = 0, l = obj.length; i < l; i++) {
  32815. fn.call(null, obj[i], i, obj);
  32816. }
  32817. } else {
  32818. for (const key in obj) {
  32819. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  32820. fn.call(null, obj[key], key, obj);
  32821. }
  32822. }
  32823. }
  32824. }
  32825. function isPlainObject(obj) {
  32826. return Object.prototype.toString.call(obj) === "[object Object]";
  32827. }
  32828. function deepMerge$1() {
  32829. const result = {};
  32830. function assignValue(val, key) {
  32831. if (typeof result[key] === "object" && typeof val === "object") {
  32832. result[key] = deepMerge$1(result[key], val);
  32833. } else if (typeof val === "object") {
  32834. result[key] = deepMerge$1({}, val);
  32835. } else {
  32836. result[key] = val;
  32837. }
  32838. }
  32839. for (let i = 0, l = arguments.length; i < l; i++) {
  32840. forEach(arguments[i], assignValue);
  32841. }
  32842. return result;
  32843. }
  32844. function isUndefined(val) {
  32845. return typeof val === "undefined";
  32846. }
  32847. function encode(val) {
  32848. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  32849. }
  32850. function buildURL(url2, params) {
  32851. if (!params) {
  32852. return url2;
  32853. }
  32854. let serializedParams;
  32855. if (isURLSearchParams(params)) {
  32856. serializedParams = params.toString();
  32857. } else {
  32858. const parts = [];
  32859. forEach(params, (val, key) => {
  32860. if (val === null || typeof val === "undefined") {
  32861. return;
  32862. }
  32863. if (isArray(val)) {
  32864. key = `${key}[]`;
  32865. } else {
  32866. val = [val];
  32867. }
  32868. forEach(val, (v) => {
  32869. if (isDate(v)) {
  32870. v = v.toISOString();
  32871. } else if (isObject(v)) {
  32872. v = JSON.stringify(v);
  32873. }
  32874. parts.push(`${encode(key)}=${encode(v)}`);
  32875. });
  32876. });
  32877. serializedParams = parts.join("&");
  32878. }
  32879. if (serializedParams) {
  32880. const hashmarkIndex = url2.indexOf("#");
  32881. if (hashmarkIndex !== -1) {
  32882. url2 = url2.slice(0, hashmarkIndex);
  32883. }
  32884. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  32885. }
  32886. return url2;
  32887. }
  32888. function isAbsoluteURL(url2) {
  32889. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  32890. }
  32891. function combineURLs(baseURL, relativeURL) {
  32892. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  32893. }
  32894. function buildFullPath(baseURL, requestedURL) {
  32895. if (baseURL && !isAbsoluteURL(requestedURL)) {
  32896. return combineURLs(baseURL, requestedURL);
  32897. }
  32898. return requestedURL;
  32899. }
  32900. function settle(resolve, reject, response) {
  32901. const { validateStatus } = response.config;
  32902. const status = response.statusCode;
  32903. if (status && (!validateStatus || validateStatus(status))) {
  32904. resolve(response);
  32905. } else {
  32906. reject(response);
  32907. }
  32908. }
  32909. const mergeKeys$1 = (keys, config2) => {
  32910. const config3 = {};
  32911. keys.forEach((prop) => {
  32912. if (!isUndefined(config2[prop])) {
  32913. config3[prop] = config2[prop];
  32914. }
  32915. });
  32916. return config3;
  32917. };
  32918. const adapter = (config2) => new Promise((resolve, reject) => {
  32919. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  32920. const _config = {
  32921. url: fullPath,
  32922. header: config2.header,
  32923. complete: (response) => {
  32924. config2.fullPath = fullPath;
  32925. response.config = config2;
  32926. try {
  32927. if (typeof response.data === "string") {
  32928. response.data = JSON.parse(response.data);
  32929. }
  32930. } catch (e) {
  32931. }
  32932. settle(resolve, reject, response);
  32933. }
  32934. };
  32935. let requestTask;
  32936. if (config2.method === "UPLOAD") {
  32937. delete _config.header["content-type"];
  32938. delete _config.header["Content-Type"];
  32939. const otherConfig = {
  32940. filePath: config2.filePath,
  32941. name: config2.name
  32942. };
  32943. const optionalKeys = [
  32944. "files",
  32945. "timeout",
  32946. "formData"
  32947. ];
  32948. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  32949. } else if (config2.method === "DOWNLOAD") {
  32950. if (!isUndefined(config2.timeout)) {
  32951. _config.timeout = config2.timeout;
  32952. }
  32953. requestTask = uni.downloadFile(_config);
  32954. } else {
  32955. const optionalKeys = [
  32956. "data",
  32957. "method",
  32958. "timeout",
  32959. "dataType",
  32960. "responseType",
  32961. "sslVerify",
  32962. "firstIpv4"
  32963. ];
  32964. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  32965. }
  32966. if (config2.getTask) {
  32967. config2.getTask(requestTask, config2);
  32968. }
  32969. });
  32970. const dispatchRequest = (config2) => adapter(config2);
  32971. function InterceptorManager() {
  32972. this.handlers = [];
  32973. }
  32974. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  32975. this.handlers.push({
  32976. fulfilled,
  32977. rejected
  32978. });
  32979. return this.handlers.length - 1;
  32980. };
  32981. InterceptorManager.prototype.eject = function eject(id) {
  32982. if (this.handlers[id]) {
  32983. this.handlers[id] = null;
  32984. }
  32985. };
  32986. InterceptorManager.prototype.forEach = function forEach2(fn) {
  32987. this.handlers.forEach((h) => {
  32988. if (h !== null) {
  32989. fn(h);
  32990. }
  32991. });
  32992. };
  32993. const mergeKeys = (keys, globalsConfig, config2) => {
  32994. const config3 = {};
  32995. keys.forEach((prop) => {
  32996. if (!isUndefined(config2[prop])) {
  32997. config3[prop] = config2[prop];
  32998. } else if (!isUndefined(globalsConfig[prop])) {
  32999. config3[prop] = globalsConfig[prop];
  33000. }
  33001. });
  33002. return config3;
  33003. };
  33004. const mergeConfig = (globalsConfig, config2 = {}) => {
  33005. const method = config2.method || globalsConfig.method || "GET";
  33006. let config3 = {
  33007. baseURL: globalsConfig.baseURL || "",
  33008. method,
  33009. url: config2.url || "",
  33010. params: config2.params || {},
  33011. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  33012. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  33013. };
  33014. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  33015. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  33016. if (method === "DOWNLOAD") {
  33017. if (!isUndefined(config2.timeout)) {
  33018. config3.timeout = config2.timeout;
  33019. } else if (!isUndefined(globalsConfig.timeout)) {
  33020. config3.timeout = globalsConfig.timeout;
  33021. }
  33022. } else if (method === "UPLOAD") {
  33023. delete config3.header["content-type"];
  33024. delete config3.header["Content-Type"];
  33025. const uploadKeys = [
  33026. "files",
  33027. "filePath",
  33028. "name",
  33029. "timeout",
  33030. "formData"
  33031. ];
  33032. uploadKeys.forEach((prop) => {
  33033. if (!isUndefined(config2[prop])) {
  33034. config3[prop] = config2[prop];
  33035. }
  33036. });
  33037. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  33038. config3.timeout = globalsConfig.timeout;
  33039. }
  33040. } else {
  33041. const defaultsKeys = [
  33042. "data",
  33043. "timeout",
  33044. "dataType",
  33045. "responseType",
  33046. "sslVerify",
  33047. "firstIpv4"
  33048. ];
  33049. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  33050. }
  33051. return config3;
  33052. };
  33053. const defaults = {
  33054. baseURL: "",
  33055. header: {},
  33056. method: "GET",
  33057. dataType: "json",
  33058. responseType: "text",
  33059. custom: {},
  33060. timeout: 6e4,
  33061. sslVerify: true,
  33062. firstIpv4: false,
  33063. validateStatus: function validateStatus(status) {
  33064. return status >= 200 && status < 300;
  33065. }
  33066. };
  33067. var clone = function() {
  33068. function _instanceof(obj, type2) {
  33069. return type2 != null && obj instanceof type2;
  33070. }
  33071. var nativeMap;
  33072. try {
  33073. nativeMap = Map;
  33074. } catch (_) {
  33075. nativeMap = function() {
  33076. };
  33077. }
  33078. var nativeSet;
  33079. try {
  33080. nativeSet = Set;
  33081. } catch (_) {
  33082. nativeSet = function() {
  33083. };
  33084. }
  33085. var nativePromise;
  33086. try {
  33087. nativePromise = Promise;
  33088. } catch (_) {
  33089. nativePromise = function() {
  33090. };
  33091. }
  33092. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  33093. if (typeof circular === "object") {
  33094. depth = circular.depth;
  33095. prototype = circular.prototype;
  33096. includeNonEnumerable = circular.includeNonEnumerable;
  33097. circular = circular.circular;
  33098. }
  33099. var allParents = [];
  33100. var allChildren = [];
  33101. var useBuffer = typeof Buffer != "undefined";
  33102. if (typeof circular == "undefined")
  33103. circular = true;
  33104. if (typeof depth == "undefined")
  33105. depth = Infinity;
  33106. function _clone(parent2, depth2) {
  33107. if (parent2 === null)
  33108. return null;
  33109. if (depth2 === 0)
  33110. return parent2;
  33111. var child;
  33112. var proto;
  33113. if (typeof parent2 != "object") {
  33114. return parent2;
  33115. }
  33116. if (_instanceof(parent2, nativeMap)) {
  33117. child = new nativeMap();
  33118. } else if (_instanceof(parent2, nativeSet)) {
  33119. child = new nativeSet();
  33120. } else if (_instanceof(parent2, nativePromise)) {
  33121. child = new nativePromise(function(resolve, reject) {
  33122. parent2.then(function(value2) {
  33123. resolve(_clone(value2, depth2 - 1));
  33124. }, function(err) {
  33125. reject(_clone(err, depth2 - 1));
  33126. });
  33127. });
  33128. } else if (clone2.__isArray(parent2)) {
  33129. child = [];
  33130. } else if (clone2.__isRegExp(parent2)) {
  33131. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  33132. if (parent2.lastIndex)
  33133. child.lastIndex = parent2.lastIndex;
  33134. } else if (clone2.__isDate(parent2)) {
  33135. child = new Date(parent2.getTime());
  33136. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  33137. if (Buffer.from) {
  33138. child = Buffer.from(parent2);
  33139. } else {
  33140. child = new Buffer(parent2.length);
  33141. parent2.copy(child);
  33142. }
  33143. return child;
  33144. } else if (_instanceof(parent2, Error)) {
  33145. child = Object.create(parent2);
  33146. } else {
  33147. if (typeof prototype == "undefined") {
  33148. proto = Object.getPrototypeOf(parent2);
  33149. child = Object.create(proto);
  33150. } else {
  33151. child = Object.create(prototype);
  33152. proto = prototype;
  33153. }
  33154. }
  33155. if (circular) {
  33156. var index2 = allParents.indexOf(parent2);
  33157. if (index2 != -1) {
  33158. return allChildren[index2];
  33159. }
  33160. allParents.push(parent2);
  33161. allChildren.push(child);
  33162. }
  33163. if (_instanceof(parent2, nativeMap)) {
  33164. parent2.forEach(function(value2, key) {
  33165. var keyChild = _clone(key, depth2 - 1);
  33166. var valueChild = _clone(value2, depth2 - 1);
  33167. child.set(keyChild, valueChild);
  33168. });
  33169. }
  33170. if (_instanceof(parent2, nativeSet)) {
  33171. parent2.forEach(function(value2) {
  33172. var entryChild = _clone(value2, depth2 - 1);
  33173. child.add(entryChild);
  33174. });
  33175. }
  33176. for (var i in parent2) {
  33177. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  33178. if (attrs) {
  33179. child[i] = _clone(parent2[i], depth2 - 1);
  33180. }
  33181. try {
  33182. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  33183. if (objProperty.set === "undefined") {
  33184. continue;
  33185. }
  33186. child[i] = _clone(parent2[i], depth2 - 1);
  33187. } catch (e) {
  33188. if (e instanceof TypeError) {
  33189. continue;
  33190. } else if (e instanceof ReferenceError) {
  33191. continue;
  33192. }
  33193. }
  33194. }
  33195. if (Object.getOwnPropertySymbols) {
  33196. var symbols = Object.getOwnPropertySymbols(parent2);
  33197. for (var i = 0; i < symbols.length; i++) {
  33198. var symbol = symbols[i];
  33199. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  33200. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  33201. continue;
  33202. }
  33203. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  33204. Object.defineProperty(child, symbol, descriptor);
  33205. }
  33206. }
  33207. if (includeNonEnumerable) {
  33208. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  33209. for (var i = 0; i < allPropertyNames.length; i++) {
  33210. var propertyName = allPropertyNames[i];
  33211. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  33212. if (descriptor && descriptor.enumerable) {
  33213. continue;
  33214. }
  33215. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  33216. Object.defineProperty(child, propertyName, descriptor);
  33217. }
  33218. }
  33219. return child;
  33220. }
  33221. return _clone(parent, depth);
  33222. }
  33223. clone2.clonePrototype = function clonePrototype(parent) {
  33224. if (parent === null)
  33225. return null;
  33226. var c = function() {
  33227. };
  33228. c.prototype = parent;
  33229. return new c();
  33230. };
  33231. function __objToStr(o) {
  33232. return Object.prototype.toString.call(o);
  33233. }
  33234. clone2.__objToStr = __objToStr;
  33235. function __isDate(o) {
  33236. return typeof o === "object" && __objToStr(o) === "[object Date]";
  33237. }
  33238. clone2.__isDate = __isDate;
  33239. function __isArray(o) {
  33240. return typeof o === "object" && __objToStr(o) === "[object Array]";
  33241. }
  33242. clone2.__isArray = __isArray;
  33243. function __isRegExp(o) {
  33244. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  33245. }
  33246. clone2.__isRegExp = __isRegExp;
  33247. function __getRegExpFlags(re) {
  33248. var flags = "";
  33249. if (re.global)
  33250. flags += "g";
  33251. if (re.ignoreCase)
  33252. flags += "i";
  33253. if (re.multiline)
  33254. flags += "m";
  33255. return flags;
  33256. }
  33257. clone2.__getRegExpFlags = __getRegExpFlags;
  33258. return clone2;
  33259. }();
  33260. class Request {
  33261. /**
  33262. * @param {Object} arg - 全局配置
  33263. * @param {String} arg.baseURL - 全局根路径
  33264. * @param {Object} arg.header - 全局header
  33265. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  33266. * @param {String} arg.dataType = [json] - 全局默认的dataType
  33267. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  33268. * @param {Object} arg.custom - 全局默认的自定义参数
  33269. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  33270. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  33271. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  33272. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  33273. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  33274. */
  33275. constructor(arg = {}) {
  33276. if (!isPlainObject(arg)) {
  33277. arg = {};
  33278. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  33279. }
  33280. this.config = clone({ ...defaults, ...arg });
  33281. this.interceptors = {
  33282. request: new InterceptorManager(),
  33283. response: new InterceptorManager()
  33284. };
  33285. }
  33286. /**
  33287. * @Function
  33288. * @param {Request~setConfigCallback} f - 设置全局默认配置
  33289. */
  33290. setConfig(f) {
  33291. this.config = f(this.config);
  33292. }
  33293. middleware(config2) {
  33294. config2 = mergeConfig(this.config, config2);
  33295. const chain = [dispatchRequest, void 0];
  33296. let promise2 = Promise.resolve(config2);
  33297. this.interceptors.request.forEach((interceptor) => {
  33298. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  33299. });
  33300. this.interceptors.response.forEach((interceptor) => {
  33301. chain.push(interceptor.fulfilled, interceptor.rejected);
  33302. });
  33303. while (chain.length) {
  33304. promise2 = promise2.then(chain.shift(), chain.shift());
  33305. }
  33306. return promise2;
  33307. }
  33308. /**
  33309. * @Function
  33310. * @param {Object} config - 请求配置项
  33311. * @prop {String} options.url - 请求路径
  33312. * @prop {Object} options.data - 请求参数
  33313. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  33314. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  33315. * @prop {Object} [options.header = config.header] - 请求header
  33316. * @prop {Object} [options.method = config.method] - 请求方法
  33317. * @returns {Promise<unknown>}
  33318. */
  33319. request(config2 = {}) {
  33320. return this.middleware(config2);
  33321. }
  33322. get(url2, options = {}) {
  33323. return this.middleware({
  33324. url: url2,
  33325. method: "GET",
  33326. ...options
  33327. });
  33328. }
  33329. post(url2, data, options = {}) {
  33330. return this.middleware({
  33331. url: url2,
  33332. data,
  33333. method: "POST",
  33334. ...options
  33335. });
  33336. }
  33337. put(url2, data, options = {}) {
  33338. return this.middleware({
  33339. url: url2,
  33340. data,
  33341. method: "PUT",
  33342. ...options
  33343. });
  33344. }
  33345. delete(url2, data, options = {}) {
  33346. return this.middleware({
  33347. url: url2,
  33348. data,
  33349. method: "DELETE",
  33350. ...options
  33351. });
  33352. }
  33353. options(url2, data, options = {}) {
  33354. return this.middleware({
  33355. url: url2,
  33356. data,
  33357. method: "OPTIONS",
  33358. ...options
  33359. });
  33360. }
  33361. upload(url2, config2 = {}) {
  33362. config2.url = url2;
  33363. config2.method = "UPLOAD";
  33364. return this.middleware(config2);
  33365. }
  33366. download(url2, config2 = {}) {
  33367. config2.url = url2;
  33368. config2.method = "DOWNLOAD";
  33369. return this.middleware(config2);
  33370. }
  33371. }
  33372. class Router {
  33373. constructor() {
  33374. this.config = {
  33375. type: "navigateTo",
  33376. url: "",
  33377. delta: 1,
  33378. // navigateBack页面后退时,回退的层数
  33379. params: {},
  33380. // 传递的参数
  33381. animationType: "pop-in",
  33382. // 窗口动画,只在APP有效
  33383. animationDuration: 300,
  33384. // 窗口动画持续时间,单位毫秒,只在APP有效
  33385. intercept: false
  33386. // 是否需要拦截
  33387. };
  33388. this.route = this.route.bind(this);
  33389. }
  33390. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  33391. addRootPath(url2) {
  33392. return url2[0] === "/" ? url2 : `/${url2}`;
  33393. }
  33394. // 整合路由参数
  33395. mixinParam(url2, params) {
  33396. url2 = url2 && this.addRootPath(url2);
  33397. let query = "";
  33398. if (/.*\/.*\?.*=.*/.test(url2)) {
  33399. query = uni.$u.queryParams(params, false);
  33400. return url2 += `&${query}`;
  33401. }
  33402. query = uni.$u.queryParams(params);
  33403. return url2 += query;
  33404. }
  33405. // 对外的方法名称
  33406. async route(options = {}, params = {}) {
  33407. let mergeConfig2 = {};
  33408. if (typeof options === "string") {
  33409. mergeConfig2.url = this.mixinParam(options, params);
  33410. mergeConfig2.type = "navigateTo";
  33411. } else {
  33412. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  33413. mergeConfig2.url = this.mixinParam(options.url, options.params);
  33414. }
  33415. if (mergeConfig2.url === uni.$u.page())
  33416. return;
  33417. if (params.intercept) {
  33418. this.config.intercept = params.intercept;
  33419. }
  33420. mergeConfig2.params = params;
  33421. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  33422. if (typeof uni.$u.routeIntercept === "function") {
  33423. const isNext = await new Promise((resolve, reject) => {
  33424. uni.$u.routeIntercept(mergeConfig2, resolve);
  33425. });
  33426. isNext && this.openPage(mergeConfig2);
  33427. } else {
  33428. this.openPage(mergeConfig2);
  33429. }
  33430. }
  33431. // 执行路由跳转
  33432. openPage(config2) {
  33433. const {
  33434. url: url2,
  33435. type: type2,
  33436. delta,
  33437. animationType,
  33438. animationDuration
  33439. } = config2;
  33440. if (config2.type == "navigateTo" || config2.type == "to") {
  33441. uni.navigateTo({
  33442. url: url2,
  33443. animationType,
  33444. animationDuration
  33445. });
  33446. }
  33447. if (config2.type == "redirectTo" || config2.type == "redirect") {
  33448. uni.redirectTo({
  33449. url: url2
  33450. });
  33451. }
  33452. if (config2.type == "switchTab" || config2.type == "tab") {
  33453. uni.switchTab({
  33454. url: url2
  33455. });
  33456. }
  33457. if (config2.type == "reLaunch" || config2.type == "launch") {
  33458. uni.reLaunch({
  33459. url: url2
  33460. });
  33461. }
  33462. if (config2.type == "navigateBack" || config2.type == "back") {
  33463. uni.navigateBack({
  33464. delta
  33465. });
  33466. }
  33467. }
  33468. }
  33469. const route = new Router().route;
  33470. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  33471. const startRGB = hexToRgb(startColor, false);
  33472. const startR = startRGB[0];
  33473. const startG = startRGB[1];
  33474. const startB = startRGB[2];
  33475. const endRGB = hexToRgb(endColor, false);
  33476. const endR = endRGB[0];
  33477. const endG = endRGB[1];
  33478. const endB = endRGB[2];
  33479. const sR = (endR - startR) / step;
  33480. const sG = (endG - startG) / step;
  33481. const sB = (endB - startB) / step;
  33482. const colorArr = [];
  33483. for (let i = 0; i < step; i++) {
  33484. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  33485. if (i === 0)
  33486. hex = rgbToHex(startColor);
  33487. if (i === step - 1)
  33488. hex = rgbToHex(endColor);
  33489. colorArr.push(hex);
  33490. }
  33491. return colorArr;
  33492. }
  33493. function hexToRgb(sColor, str = true) {
  33494. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  33495. sColor = String(sColor).toLowerCase();
  33496. if (sColor && reg.test(sColor)) {
  33497. if (sColor.length === 4) {
  33498. let sColorNew = "#";
  33499. for (let i = 1; i < 4; i += 1) {
  33500. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  33501. }
  33502. sColor = sColorNew;
  33503. }
  33504. const sColorChange = [];
  33505. for (let i = 1; i < 7; i += 2) {
  33506. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  33507. }
  33508. if (!str) {
  33509. return sColorChange;
  33510. }
  33511. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  33512. }
  33513. if (/^(rgb|RGB)/.test(sColor)) {
  33514. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  33515. return arr.map((val) => Number(val));
  33516. }
  33517. return sColor;
  33518. }
  33519. function rgbToHex(rgb) {
  33520. const _this = rgb;
  33521. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  33522. if (/^(rgb|RGB)/.test(_this)) {
  33523. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  33524. let strHex = "#";
  33525. for (let i = 0; i < aColor.length; i++) {
  33526. let hex = Number(aColor[i]).toString(16);
  33527. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  33528. if (hex === "0") {
  33529. hex += hex;
  33530. }
  33531. strHex += hex;
  33532. }
  33533. if (strHex.length !== 7) {
  33534. strHex = _this;
  33535. }
  33536. return strHex;
  33537. }
  33538. if (reg.test(_this)) {
  33539. const aNum = _this.replace(/#/, "").split("");
  33540. if (aNum.length === 6) {
  33541. return _this;
  33542. }
  33543. if (aNum.length === 3) {
  33544. let numHex = "#";
  33545. for (let i = 0; i < aNum.length; i += 1) {
  33546. numHex += aNum[i] + aNum[i];
  33547. }
  33548. return numHex;
  33549. }
  33550. } else {
  33551. return _this;
  33552. }
  33553. }
  33554. function colorToRgba(color2, alpha) {
  33555. color2 = rgbToHex(color2);
  33556. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  33557. let sColor = String(color2).toLowerCase();
  33558. if (sColor && reg.test(sColor)) {
  33559. if (sColor.length === 4) {
  33560. let sColorNew = "#";
  33561. for (let i = 1; i < 4; i += 1) {
  33562. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  33563. }
  33564. sColor = sColorNew;
  33565. }
  33566. const sColorChange = [];
  33567. for (let i = 1; i < 7; i += 2) {
  33568. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  33569. }
  33570. return `rgba(${sColorChange.join(",")},${alpha})`;
  33571. }
  33572. return sColor;
  33573. }
  33574. const colorGradient$1 = {
  33575. colorGradient,
  33576. hexToRgb,
  33577. rgbToHex,
  33578. colorToRgba
  33579. };
  33580. function email(value2) {
  33581. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  33582. }
  33583. function mobile(value2) {
  33584. return /^1[23456789]\d{9}$/.test(value2);
  33585. }
  33586. function url(value2) {
  33587. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value2);
  33588. }
  33589. function date(value2) {
  33590. if (!value2)
  33591. return false;
  33592. if (number(value2))
  33593. value2 = +value2;
  33594. return !/Invalid|NaN/.test(new Date(value2).toString());
  33595. }
  33596. function dateISO(value2) {
  33597. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  33598. }
  33599. function number(value2) {
  33600. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  33601. }
  33602. function string(value2) {
  33603. return typeof value2 === "string";
  33604. }
  33605. function digits(value2) {
  33606. return /^\d+$/.test(value2);
  33607. }
  33608. function idCard(value2) {
  33609. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  33610. value2
  33611. );
  33612. }
  33613. function carNo(value2) {
  33614. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  33615. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  33616. if (value2.length === 7) {
  33617. return creg.test(value2);
  33618. }
  33619. if (value2.length === 8) {
  33620. return xreg.test(value2);
  33621. }
  33622. return false;
  33623. }
  33624. function amount(value2) {
  33625. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  33626. }
  33627. function chinese(value2) {
  33628. const reg = /^[\u4e00-\u9fa5]+$/gi;
  33629. return reg.test(value2);
  33630. }
  33631. function letter(value2) {
  33632. return /^[a-zA-Z]*$/.test(value2);
  33633. }
  33634. function enOrNum(value2) {
  33635. const reg = /^[0-9a-zA-Z]*$/g;
  33636. return reg.test(value2);
  33637. }
  33638. function contains(value2, param) {
  33639. return value2.indexOf(param) >= 0;
  33640. }
  33641. function range$1(value2, param) {
  33642. return value2 >= param[0] && value2 <= param[1];
  33643. }
  33644. function rangeLength(value2, param) {
  33645. return value2.length >= param[0] && value2.length <= param[1];
  33646. }
  33647. function landline(value2) {
  33648. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  33649. return reg.test(value2);
  33650. }
  33651. function empty(value2) {
  33652. switch (typeof value2) {
  33653. case "undefined":
  33654. return true;
  33655. case "string":
  33656. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  33657. return true;
  33658. break;
  33659. case "boolean":
  33660. if (!value2)
  33661. return true;
  33662. break;
  33663. case "number":
  33664. if (value2 === 0 || isNaN(value2))
  33665. return true;
  33666. break;
  33667. case "object":
  33668. if (value2 === null || value2.length === 0)
  33669. return true;
  33670. for (const i in value2) {
  33671. return false;
  33672. }
  33673. return true;
  33674. }
  33675. return false;
  33676. }
  33677. function jsonString(value2) {
  33678. if (typeof value2 === "string") {
  33679. try {
  33680. const obj = JSON.parse(value2);
  33681. if (typeof obj === "object" && obj) {
  33682. return true;
  33683. }
  33684. return false;
  33685. } catch (e) {
  33686. return false;
  33687. }
  33688. }
  33689. return false;
  33690. }
  33691. function array(value2) {
  33692. if (typeof Array.isArray === "function") {
  33693. return Array.isArray(value2);
  33694. }
  33695. return Object.prototype.toString.call(value2) === "[object Array]";
  33696. }
  33697. function object(value2) {
  33698. return Object.prototype.toString.call(value2) === "[object Object]";
  33699. }
  33700. function code$1(value2, len = 6) {
  33701. return new RegExp(`^\\d{${len}}$`).test(value2);
  33702. }
  33703. function func(value2) {
  33704. return typeof value2 === "function";
  33705. }
  33706. function promise(value2) {
  33707. return object(value2) && func(value2.then) && func(value2.catch);
  33708. }
  33709. function image(value2) {
  33710. const newValue = value2.split("?")[0];
  33711. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  33712. return IMAGE_REGEXP.test(newValue);
  33713. }
  33714. function video(value2) {
  33715. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  33716. return VIDEO_REGEXP.test(value2);
  33717. }
  33718. function regExp(o) {
  33719. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  33720. }
  33721. const test = {
  33722. email,
  33723. mobile,
  33724. url,
  33725. date,
  33726. dateISO,
  33727. number,
  33728. digits,
  33729. idCard,
  33730. carNo,
  33731. amount,
  33732. chinese,
  33733. letter,
  33734. enOrNum,
  33735. contains,
  33736. range: range$1,
  33737. rangeLength,
  33738. empty,
  33739. isEmpty: empty,
  33740. jsonString,
  33741. landline,
  33742. object,
  33743. array,
  33744. code: code$1,
  33745. func,
  33746. promise,
  33747. video,
  33748. image,
  33749. regExp,
  33750. string
  33751. };
  33752. let timeout = null;
  33753. function debounce(func2, wait = 500, immediate = false) {
  33754. if (timeout !== null)
  33755. clearTimeout(timeout);
  33756. if (immediate) {
  33757. const callNow = !timeout;
  33758. timeout = setTimeout(() => {
  33759. timeout = null;
  33760. }, wait);
  33761. if (callNow)
  33762. typeof func2 === "function" && func2();
  33763. } else {
  33764. timeout = setTimeout(() => {
  33765. typeof func2 === "function" && func2();
  33766. }, wait);
  33767. }
  33768. }
  33769. let flag;
  33770. function throttle(func2, wait = 500, immediate = true) {
  33771. if (immediate) {
  33772. if (!flag) {
  33773. flag = true;
  33774. typeof func2 === "function" && func2();
  33775. setTimeout(() => {
  33776. flag = false;
  33777. }, wait);
  33778. }
  33779. } else if (!flag) {
  33780. flag = true;
  33781. setTimeout(() => {
  33782. flag = false;
  33783. typeof func2 === "function" && func2();
  33784. }, wait);
  33785. }
  33786. }
  33787. function strip(num, precision = 15) {
  33788. return +parseFloat(Number(num).toPrecision(precision));
  33789. }
  33790. function digitLength(num) {
  33791. const eSplit = num.toString().split(/[eE]/);
  33792. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  33793. return len > 0 ? len : 0;
  33794. }
  33795. function float2Fixed(num) {
  33796. if (num.toString().indexOf("e") === -1) {
  33797. return Number(num.toString().replace(".", ""));
  33798. }
  33799. const dLen = digitLength(num);
  33800. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  33801. }
  33802. function checkBoundary(num) {
  33803. {
  33804. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  33805. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  33806. }
  33807. }
  33808. }
  33809. function iteratorOperation(arr, operation) {
  33810. const [num1, num2, ...others] = arr;
  33811. let res2 = operation(num1, num2);
  33812. others.forEach((num) => {
  33813. res2 = operation(res2, num);
  33814. });
  33815. return res2;
  33816. }
  33817. function times(...nums) {
  33818. if (nums.length > 2) {
  33819. return iteratorOperation(nums, times);
  33820. }
  33821. const [num1, num2] = nums;
  33822. const num1Changed = float2Fixed(num1);
  33823. const num2Changed = float2Fixed(num2);
  33824. const baseNum = digitLength(num1) + digitLength(num2);
  33825. const leftValue = num1Changed * num2Changed;
  33826. checkBoundary(leftValue);
  33827. return leftValue / Math.pow(10, baseNum);
  33828. }
  33829. function divide(...nums) {
  33830. if (nums.length > 2) {
  33831. return iteratorOperation(nums, divide);
  33832. }
  33833. const [num1, num2] = nums;
  33834. const num1Changed = float2Fixed(num1);
  33835. const num2Changed = float2Fixed(num2);
  33836. checkBoundary(num1Changed);
  33837. checkBoundary(num2Changed);
  33838. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  33839. }
  33840. function round(num, ratio) {
  33841. const base = Math.pow(10, ratio);
  33842. let result = divide(Math.round(Math.abs(times(num, base))), base);
  33843. if (num < 0 && result !== 0) {
  33844. result = times(result, -1);
  33845. }
  33846. return result;
  33847. }
  33848. function range(min = 0, max = 0, value2 = 0) {
  33849. return Math.max(min, Math.min(max, Number(value2)));
  33850. }
  33851. function getPx(value2, unit = false) {
  33852. if (test.number(value2)) {
  33853. return unit ? `${value2}px` : Number(value2);
  33854. }
  33855. if (/(rpx|upx)$/.test(value2)) {
  33856. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  33857. }
  33858. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  33859. }
  33860. function sleep(value2 = 30) {
  33861. return new Promise((resolve) => {
  33862. setTimeout(() => {
  33863. resolve();
  33864. }, value2);
  33865. });
  33866. }
  33867. function os() {
  33868. return uni.getSystemInfoSync().platform.toLowerCase();
  33869. }
  33870. function sys() {
  33871. return uni.getSystemInfoSync();
  33872. }
  33873. function random(min, max) {
  33874. if (min >= 0 && max > 0 && max >= min) {
  33875. const gab = max - min + 1;
  33876. return Math.floor(Math.random() * gab + min);
  33877. }
  33878. return 0;
  33879. }
  33880. function guid(len = 32, firstU = true, radix = null) {
  33881. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  33882. const uuid = [];
  33883. radix = radix || chars.length;
  33884. if (len) {
  33885. for (let i = 0; i < len; i++)
  33886. uuid[i] = chars[0 | Math.random() * radix];
  33887. } else {
  33888. let r;
  33889. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  33890. uuid[14] = "4";
  33891. for (let i = 0; i < 36; i++) {
  33892. if (!uuid[i]) {
  33893. r = 0 | Math.random() * 16;
  33894. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  33895. }
  33896. }
  33897. }
  33898. if (firstU) {
  33899. uuid.shift();
  33900. return `u${uuid.join("")}`;
  33901. }
  33902. return uuid.join("");
  33903. }
  33904. function $parent(name = void 0) {
  33905. let parent = this.$parent;
  33906. while (parent) {
  33907. if (parent.$options && parent.$options.name !== name) {
  33908. parent = parent.$parent;
  33909. } else {
  33910. return parent;
  33911. }
  33912. }
  33913. return false;
  33914. }
  33915. function addStyle(customStyle, target = "object") {
  33916. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  33917. return customStyle;
  33918. }
  33919. if (target === "object") {
  33920. customStyle = trim(customStyle);
  33921. const styleArray = customStyle.split(";");
  33922. const style = {};
  33923. for (let i = 0; i < styleArray.length; i++) {
  33924. if (styleArray[i]) {
  33925. const item = styleArray[i].split(":");
  33926. style[trim(item[0])] = trim(item[1]);
  33927. }
  33928. }
  33929. return style;
  33930. }
  33931. let string2 = "";
  33932. for (const i in customStyle) {
  33933. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  33934. string2 += `${key}:${customStyle[i]};`;
  33935. }
  33936. return trim(string2);
  33937. }
  33938. function addUnit(value2 = "auto", unit = "") {
  33939. if (!unit) {
  33940. unit = uni.$u.config.unit || "px";
  33941. }
  33942. value2 = String(value2);
  33943. return test.number(value2) ? `${value2}${unit}` : value2;
  33944. }
  33945. function deepClone(obj) {
  33946. if ([null, void 0, NaN, false].includes(obj))
  33947. return obj;
  33948. if (typeof obj !== "object" && typeof obj !== "function") {
  33949. return obj;
  33950. }
  33951. const o = test.array(obj) ? [] : {};
  33952. for (const i in obj) {
  33953. if (obj.hasOwnProperty(i)) {
  33954. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  33955. }
  33956. }
  33957. return o;
  33958. }
  33959. function deepMerge(target = {}, source = {}) {
  33960. target = deepClone(target);
  33961. if (typeof target !== "object" || typeof source !== "object")
  33962. return false;
  33963. for (const prop in source) {
  33964. if (!source.hasOwnProperty(prop))
  33965. continue;
  33966. if (prop in target) {
  33967. if (typeof target[prop] !== "object") {
  33968. target[prop] = source[prop];
  33969. } else if (typeof source[prop] !== "object") {
  33970. target[prop] = source[prop];
  33971. } else if (target[prop].concat && source[prop].concat) {
  33972. target[prop] = target[prop].concat(source[prop]);
  33973. } else {
  33974. target[prop] = deepMerge(target[prop], source[prop]);
  33975. }
  33976. } else {
  33977. target[prop] = source[prop];
  33978. }
  33979. }
  33980. return target;
  33981. }
  33982. function error(err) {
  33983. {
  33984. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  33985. }
  33986. }
  33987. function randomArray(array3 = []) {
  33988. return array3.sort(() => Math.random() - 0.5);
  33989. }
  33990. if (!String.prototype.padStart) {
  33991. String.prototype.padStart = function(maxLength, fillString = " ") {
  33992. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  33993. throw new TypeError(
  33994. "fillString must be String"
  33995. );
  33996. }
  33997. const str = this;
  33998. if (str.length >= maxLength)
  33999. return String(str);
  34000. const fillLength = maxLength - str.length;
  34001. let times2 = Math.ceil(fillLength / fillString.length);
  34002. while (times2 >>= 1) {
  34003. fillString += fillString;
  34004. if (times2 === 1) {
  34005. fillString += fillString;
  34006. }
  34007. }
  34008. return fillString.slice(0, fillLength) + str;
  34009. };
  34010. }
  34011. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  34012. let date3;
  34013. if (!dateTime) {
  34014. date3 = /* @__PURE__ */ new Date();
  34015. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  34016. date3 = new Date(dateTime * 1e3);
  34017. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  34018. date3 = new Date(Number(dateTime));
  34019. } else {
  34020. date3 = new Date(
  34021. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  34022. );
  34023. }
  34024. const timeSource = {
  34025. "y": date3.getFullYear().toString(),
  34026. // 年
  34027. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  34028. // 月
  34029. "d": date3.getDate().toString().padStart(2, "0"),
  34030. // 日
  34031. "h": date3.getHours().toString().padStart(2, "0"),
  34032. // 时
  34033. "M": date3.getMinutes().toString().padStart(2, "0"),
  34034. // 分
  34035. "s": date3.getSeconds().toString().padStart(2, "0")
  34036. // 秒
  34037. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  34038. };
  34039. for (const key in timeSource) {
  34040. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  34041. if (ret) {
  34042. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  34043. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  34044. }
  34045. }
  34046. return formatStr;
  34047. }
  34048. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  34049. if (timestamp == null)
  34050. timestamp = Number(/* @__PURE__ */ new Date());
  34051. timestamp = parseInt(timestamp);
  34052. if (timestamp.toString().length == 10)
  34053. timestamp *= 1e3;
  34054. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  34055. timer = parseInt(timer / 1e3);
  34056. let tips = "";
  34057. switch (true) {
  34058. case timer < 300:
  34059. tips = "刚刚";
  34060. break;
  34061. case (timer >= 300 && timer < 3600):
  34062. tips = `${parseInt(timer / 60)}分钟前`;
  34063. break;
  34064. case (timer >= 3600 && timer < 86400):
  34065. tips = `${parseInt(timer / 3600)}小时前`;
  34066. break;
  34067. case (timer >= 86400 && timer < 2592e3):
  34068. tips = `${parseInt(timer / 86400)}天前`;
  34069. break;
  34070. default:
  34071. if (format2 === false) {
  34072. if (timer >= 2592e3 && timer < 365 * 86400) {
  34073. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  34074. } else {
  34075. tips = `${parseInt(timer / (86400 * 365))}年前`;
  34076. }
  34077. } else {
  34078. tips = timeFormat(timestamp, format2);
  34079. }
  34080. }
  34081. return tips;
  34082. }
  34083. function trim(str, pos = "both") {
  34084. str = String(str);
  34085. if (pos == "both") {
  34086. return str.replace(/^\s+|\s+$/g, "");
  34087. }
  34088. if (pos == "left") {
  34089. return str.replace(/^\s*/, "");
  34090. }
  34091. if (pos == "right") {
  34092. return str.replace(/(\s*$)/g, "");
  34093. }
  34094. if (pos == "all") {
  34095. return str.replace(/\s+/g, "");
  34096. }
  34097. return str;
  34098. }
  34099. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  34100. const prefix = isPrefix ? "?" : "";
  34101. const _result = [];
  34102. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  34103. arrayFormat = "brackets";
  34104. for (const key in data) {
  34105. const value2 = data[key];
  34106. if (["", void 0, null].indexOf(value2) >= 0) {
  34107. continue;
  34108. }
  34109. if (value2.constructor === Array) {
  34110. switch (arrayFormat) {
  34111. case "indices":
  34112. for (let i = 0; i < value2.length; i++) {
  34113. _result.push(`${key}[${i}]=${value2[i]}`);
  34114. }
  34115. break;
  34116. case "brackets":
  34117. value2.forEach((_value) => {
  34118. _result.push(`${key}[]=${_value}`);
  34119. });
  34120. break;
  34121. case "repeat":
  34122. value2.forEach((_value) => {
  34123. _result.push(`${key}=${_value}`);
  34124. });
  34125. break;
  34126. case "comma":
  34127. let commaStr = "";
  34128. value2.forEach((_value) => {
  34129. commaStr += (commaStr ? "," : "") + _value;
  34130. });
  34131. _result.push(`${key}=${commaStr}`);
  34132. break;
  34133. default:
  34134. value2.forEach((_value) => {
  34135. _result.push(`${key}[]=${_value}`);
  34136. });
  34137. }
  34138. } else {
  34139. _result.push(`${key}=${value2}`);
  34140. }
  34141. }
  34142. return _result.length ? prefix + _result.join("&") : "";
  34143. }
  34144. function toast(title, duration = 2e3) {
  34145. uni.showToast({
  34146. title: String(title),
  34147. icon: "none",
  34148. duration
  34149. });
  34150. }
  34151. function type2icon(type2 = "success", fill = false) {
  34152. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  34153. type2 = "success";
  34154. let iconName = "";
  34155. switch (type2) {
  34156. case "primary":
  34157. iconName = "info-circle";
  34158. break;
  34159. case "info":
  34160. iconName = "info-circle";
  34161. break;
  34162. case "error":
  34163. iconName = "close-circle";
  34164. break;
  34165. case "warning":
  34166. iconName = "error-circle";
  34167. break;
  34168. case "success":
  34169. iconName = "checkmark-circle";
  34170. break;
  34171. default:
  34172. iconName = "checkmark-circle";
  34173. }
  34174. if (fill)
  34175. iconName += "-fill";
  34176. return iconName;
  34177. }
  34178. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  34179. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  34180. const n = !isFinite(+number3) ? 0 : +number3;
  34181. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  34182. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  34183. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  34184. let s = "";
  34185. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  34186. const re = /(-?\d+)(\d{3})/;
  34187. while (re.test(s[0])) {
  34188. s[0] = s[0].replace(re, `$1${sep}$2`);
  34189. }
  34190. if ((s[1] || "").length < prec) {
  34191. s[1] = s[1] || "";
  34192. s[1] += new Array(prec - s[1].length + 1).join("0");
  34193. }
  34194. return s.join(dec);
  34195. }
  34196. function getDuration(value2, unit = true) {
  34197. const valueNum = parseInt(value2);
  34198. if (unit) {
  34199. if (/s$/.test(value2))
  34200. return value2;
  34201. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  34202. }
  34203. if (/ms$/.test(value2))
  34204. return valueNum;
  34205. if (/s$/.test(value2))
  34206. return valueNum > 30 ? valueNum : valueNum * 1e3;
  34207. return valueNum;
  34208. }
  34209. function padZero(value2) {
  34210. return `00${value2}`.slice(-2);
  34211. }
  34212. function formValidate(instance, event) {
  34213. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  34214. const form = uni.$u.$parent.call(instance, "u-form");
  34215. if (formItem && form) {
  34216. form.validateField(formItem.prop, () => {
  34217. }, event);
  34218. }
  34219. }
  34220. function getProperty(obj, key) {
  34221. if (!obj) {
  34222. return;
  34223. }
  34224. if (typeof key !== "string" || key === "") {
  34225. return "";
  34226. }
  34227. if (key.indexOf(".") !== -1) {
  34228. const keys = key.split(".");
  34229. let firstObj = obj[keys[0]] || {};
  34230. for (let i = 1; i < keys.length; i++) {
  34231. if (firstObj) {
  34232. firstObj = firstObj[keys[i]];
  34233. }
  34234. }
  34235. return firstObj;
  34236. }
  34237. return obj[key];
  34238. }
  34239. function setProperty(obj, key, value2) {
  34240. if (!obj) {
  34241. return;
  34242. }
  34243. const inFn = function(_obj, keys, v) {
  34244. if (keys.length === 1) {
  34245. _obj[keys[0]] = v;
  34246. return;
  34247. }
  34248. while (keys.length > 1) {
  34249. const k = keys[0];
  34250. if (!_obj[k] || typeof _obj[k] !== "object") {
  34251. _obj[k] = {};
  34252. }
  34253. keys.shift();
  34254. inFn(_obj[k], keys, v);
  34255. }
  34256. };
  34257. if (typeof key !== "string" || key === "")
  34258. ;
  34259. else if (key.indexOf(".") !== -1) {
  34260. const keys = key.split(".");
  34261. inFn(obj, keys, value2);
  34262. } else {
  34263. obj[key] = value2;
  34264. }
  34265. }
  34266. function page() {
  34267. const pages2 = getCurrentPages();
  34268. return `/${pages2[pages2.length - 1].route || ""}`;
  34269. }
  34270. function pages() {
  34271. const pages2 = getCurrentPages();
  34272. return pages2;
  34273. }
  34274. function setConfig({
  34275. props: props2 = {},
  34276. config: config2 = {},
  34277. color: color2 = {},
  34278. zIndex: zIndex2 = {}
  34279. }) {
  34280. const {
  34281. deepMerge: deepMerge2
  34282. } = uni.$u;
  34283. uni.$u.config = deepMerge2(uni.$u.config, config2);
  34284. uni.$u.props = deepMerge2(uni.$u.props, props2);
  34285. uni.$u.color = deepMerge2(uni.$u.color, color2);
  34286. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  34287. }
  34288. const index = {
  34289. range,
  34290. getPx,
  34291. sleep,
  34292. os,
  34293. sys,
  34294. random,
  34295. guid,
  34296. $parent,
  34297. addStyle,
  34298. addUnit,
  34299. deepClone,
  34300. deepMerge,
  34301. error,
  34302. randomArray,
  34303. timeFormat,
  34304. timeFrom,
  34305. trim,
  34306. queryParams,
  34307. toast,
  34308. type2icon,
  34309. priceFormat,
  34310. getDuration,
  34311. padZero,
  34312. formValidate,
  34313. getProperty,
  34314. setProperty,
  34315. page,
  34316. pages,
  34317. setConfig
  34318. };
  34319. const zIndex = {
  34320. toast: 10090,
  34321. noNetwork: 10080,
  34322. // popup包含popup,actionsheet,keyboard,picker的值
  34323. popup: 10075,
  34324. mask: 10070,
  34325. navbar: 980,
  34326. topTips: 975,
  34327. sticky: 970,
  34328. indexListSticky: 965
  34329. };
  34330. let platform = "none";
  34331. platform = "vue3";
  34332. platform = "plus";
  34333. const platform$1 = platform;
  34334. const $u = {
  34335. route,
  34336. date: index.timeFormat,
  34337. // 另名date
  34338. colorGradient: colorGradient$1.colorGradient,
  34339. hexToRgb: colorGradient$1.hexToRgb,
  34340. rgbToHex: colorGradient$1.rgbToHex,
  34341. colorToRgba: colorGradient$1.colorToRgba,
  34342. test,
  34343. type: ["primary", "success", "error", "warning", "info"],
  34344. http: new Request(),
  34345. config,
  34346. // uView配置信息相关,比如版本号
  34347. zIndex,
  34348. debounce,
  34349. throttle,
  34350. mixin,
  34351. mpMixin,
  34352. props: props$G,
  34353. ...index,
  34354. color,
  34355. platform: platform$1
  34356. };
  34357. uni.$u = $u;
  34358. const install = (Vue2) => {
  34359. Vue2.config.globalProperties.$u = $u;
  34360. Vue2.config.globalProperties.$nextTick = (cb) => {
  34361. cb();
  34362. };
  34363. Vue2.mixin(mixin);
  34364. };
  34365. const uviewPlus = {
  34366. install
  34367. };
  34368. const share = {
  34369. data() {
  34370. return {
  34371. // 默认的全局分享内容
  34372. share: {
  34373. title: "标题",
  34374. path: "/pages/home/home",
  34375. // 这里是分享的页面
  34376. imageUrl: ""
  34377. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  34378. }
  34379. };
  34380. },
  34381. // 定义全局分享
  34382. // 1.发送给朋友
  34383. onShareAppMessage(res2) {
  34384. return {
  34385. title: this.share.title,
  34386. path: this.share.path,
  34387. imageUrl: this.share.imageUrl
  34388. };
  34389. },
  34390. //2.分享到朋友圈
  34391. onShareTimeline(res2) {
  34392. return {
  34393. title: this.share.title,
  34394. path: this.share.path,
  34395. imageUrl: this.share.imageUrl
  34396. };
  34397. }
  34398. };
  34399. const permission = {
  34400. // 在绑定元素的父组件挂载时调用
  34401. mounted(el, binding) {
  34402. const { value: value2 } = binding;
  34403. const buttonList = uni.getStorageSync("buttonList") || [];
  34404. const hasPermission = checkPermission(value2, buttonList);
  34405. if (!hasPermission) {
  34406. el.parentNode && el.parentNode.removeChild(el);
  34407. }
  34408. }
  34409. };
  34410. function checkPermission(permission2, buttonList) {
  34411. if (!permission2 || !buttonList || buttonList.length === 0) {
  34412. return false;
  34413. }
  34414. if (buttonList.includes("*:*:*")) {
  34415. return true;
  34416. }
  34417. return buttonList.includes(permission2);
  34418. }
  34419. const permissionDirective = {
  34420. install(app) {
  34421. app.directive("permission", permission);
  34422. }
  34423. };
  34424. initClickSound();
  34425. let ttsModule = new VolumeTTS();
  34426. useInit();
  34427. uni.$u.ttsModule = ttsModule;
  34428. uni.$u.useGlobalEvent = useGlobalEvent;
  34429. uni.$u.updateActivePageOnShow = updateActivePageOnShow;
  34430. uni.$u.cleanupOnPageUnload = cleanupOnPageUnload;
  34431. uni.$u.playClickSound = playClickSound;
  34432. function createApp() {
  34433. const app = vue.createVueApp(App);
  34434. initRequest();
  34435. const pinia2 = createPinia();
  34436. app.use(pinia2).use(uviewPlus).use(permissionDirective);
  34437. app.mixin(share);
  34438. return {
  34439. app,
  34440. pinia: pinia2
  34441. };
  34442. }
  34443. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  34444. uni.Vuex = __Vuex__;
  34445. uni.Pinia = __Pinia__;
  34446. __app__.provide("__globalStyles", __uniConfig.styles);
  34447. __app__._component.mpType = "app";
  34448. __app__._component.render = () => {
  34449. };
  34450. __app__.mount("#app");
  34451. })(Vue);