app-service.js 1.2 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075
  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$E = {
  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$D = {
  1839. props: {
  1840. // 图标类名
  1841. name: {
  1842. type: String,
  1843. default: props$E.icon.name
  1844. },
  1845. // 图标颜色,可接受主题色
  1846. color: {
  1847. type: String,
  1848. default: props$E.icon.color
  1849. },
  1850. // 字体大小,单位px
  1851. size: {
  1852. type: [String, Number],
  1853. default: props$E.icon.size
  1854. },
  1855. // 是否显示粗体
  1856. bold: {
  1857. type: Boolean,
  1858. default: props$E.icon.bold
  1859. },
  1860. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  1861. index: {
  1862. type: [String, Number],
  1863. default: props$E.icon.index
  1864. },
  1865. // 触摸图标时的类名
  1866. hoverClass: {
  1867. type: String,
  1868. default: props$E.icon.hoverClass
  1869. },
  1870. // 自定义扩展前缀,方便用户扩展自己的图标库
  1871. customPrefix: {
  1872. type: String,
  1873. default: props$E.icon.customPrefix
  1874. },
  1875. // 图标右边或者下面的文字
  1876. label: {
  1877. type: [String, Number],
  1878. default: props$E.icon.label
  1879. },
  1880. // label的位置,只能右边或者下边
  1881. labelPos: {
  1882. type: String,
  1883. default: props$E.icon.labelPos
  1884. },
  1885. // label的大小
  1886. labelSize: {
  1887. type: [String, Number],
  1888. default: props$E.icon.labelSize
  1889. },
  1890. // label的颜色
  1891. labelColor: {
  1892. type: String,
  1893. default: props$E.icon.labelColor
  1894. },
  1895. // label与图标的距离
  1896. space: {
  1897. type: [String, Number],
  1898. default: props$E.icon.space
  1899. },
  1900. // 图片的mode
  1901. imgMode: {
  1902. type: String,
  1903. default: props$E.icon.imgMode
  1904. },
  1905. // 用于显示图片小图标时,图片的宽度
  1906. width: {
  1907. type: [String, Number],
  1908. default: props$E.icon.width
  1909. },
  1910. // 用于显示图片小图标时,图片的高度
  1911. height: {
  1912. type: [String, Number],
  1913. default: props$E.icon.height
  1914. },
  1915. // 用于解决某些情况下,让图标垂直居中的用途
  1916. top: {
  1917. type: [String, Number],
  1918. default: props$E.icon.top
  1919. },
  1920. // 是否阻止事件传播
  1921. stop: {
  1922. type: Boolean,
  1923. default: props$E.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$23 = {
  2065. name: "u-icon",
  2066. data() {
  2067. return {};
  2068. },
  2069. emits: ["click"],
  2070. mixins: [mpMixin, mixin, props$D],
  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$22(_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$g = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__scopeId", "data-v-ac70166d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
  2159. const props$C = {
  2160. props: {
  2161. // 绑定的值
  2162. modelValue: {
  2163. type: [String, Number],
  2164. default: props$E.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$E.input.type
  2173. },
  2174. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  2175. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  2176. fixed: {
  2177. type: Boolean,
  2178. default: props$E.input.fixed
  2179. },
  2180. // 是否禁用输入框
  2181. disabled: {
  2182. type: Boolean,
  2183. default: props$E.input.disabled
  2184. },
  2185. // 禁用状态时的背景色
  2186. disabledColor: {
  2187. type: String,
  2188. default: props$E.input.disabledColor
  2189. },
  2190. // 是否显示清除控件
  2191. clearable: {
  2192. type: Boolean,
  2193. default: props$E.input.clearable
  2194. },
  2195. // 是否密码类型
  2196. password: {
  2197. type: Boolean,
  2198. default: props$E.input.password
  2199. },
  2200. // 最大输入长度,设置为 -1 的时候不限制最大长度
  2201. maxlength: {
  2202. type: [String, Number],
  2203. default: props$E.input.maxlength
  2204. },
  2205. // 输入框为空时的占位符
  2206. placeholder: {
  2207. type: String,
  2208. default: props$E.input.placeholder
  2209. },
  2210. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  2211. placeholderClass: {
  2212. type: String,
  2213. default: props$E.input.placeholderClass
  2214. },
  2215. // 指定placeholder的样式
  2216. placeholderStyle: {
  2217. type: [String, Object],
  2218. default: props$E.input.placeholderStyle
  2219. },
  2220. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  2221. showWordLimit: {
  2222. type: Boolean,
  2223. default: props$E.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$E.input.confirmType
  2231. },
  2232. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  2233. confirmHold: {
  2234. type: Boolean,
  2235. default: props$E.input.confirmHold
  2236. },
  2237. // focus时,点击页面的时候不收起键盘,微信小程序有效
  2238. holdKeyboard: {
  2239. type: Boolean,
  2240. default: props$E.input.holdKeyboard
  2241. },
  2242. // 自动获取焦点
  2243. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  2244. focus: {
  2245. type: Boolean,
  2246. default: props$E.input.focus
  2247. },
  2248. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  2249. autoBlur: {
  2250. type: Boolean,
  2251. default: props$E.input.autoBlur
  2252. },
  2253. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  2254. disableDefaultPadding: {
  2255. type: Boolean,
  2256. default: props$E.input.disableDefaultPadding
  2257. },
  2258. // 指定focus时光标的位置
  2259. cursor: {
  2260. type: [String, Number],
  2261. default: props$E.input.cursor
  2262. },
  2263. // 输入框聚焦时底部与键盘的距离
  2264. cursorSpacing: {
  2265. type: [String, Number],
  2266. default: props$E.input.cursorSpacing
  2267. },
  2268. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  2269. selectionStart: {
  2270. type: [String, Number],
  2271. default: props$E.input.selectionStart
  2272. },
  2273. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  2274. selectionEnd: {
  2275. type: [String, Number],
  2276. default: props$E.input.selectionEnd
  2277. },
  2278. // 键盘弹起时,是否自动上推页面
  2279. adjustPosition: {
  2280. type: Boolean,
  2281. default: props$E.input.adjustPosition
  2282. },
  2283. // 输入框内容对齐方式,可选值为:left|center|right
  2284. inputAlign: {
  2285. type: String,
  2286. default: props$E.input.inputAlign
  2287. },
  2288. // 输入框字体的大小
  2289. fontSize: {
  2290. type: [String, Number],
  2291. default: "34rpx"
  2292. },
  2293. // 输入框字体颜色
  2294. color: {
  2295. type: String,
  2296. default: props$E.input.color
  2297. },
  2298. // 输入框前置图标
  2299. prefixIcon: {
  2300. type: String,
  2301. default: props$E.input.prefixIcon
  2302. },
  2303. // 前置图标样式,对象或字符串
  2304. prefixIconStyle: {
  2305. type: [String, Object],
  2306. default: props$E.input.prefixIconStyle
  2307. },
  2308. // 输入框后置图标
  2309. suffixIcon: {
  2310. type: String,
  2311. default: props$E.input.suffixIcon
  2312. },
  2313. // 后置图标样式,对象或字符串
  2314. suffixIconStyle: {
  2315. type: [String, Object],
  2316. default: props$E.input.suffixIconStyle
  2317. },
  2318. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  2319. border: {
  2320. type: String,
  2321. default: props$E.input.border
  2322. },
  2323. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  2324. readonly: {
  2325. type: Boolean,
  2326. default: props$E.input.readonly
  2327. },
  2328. // 输入框形状,circle-圆形,square-方形
  2329. shape: {
  2330. type: String,
  2331. default: props$E.input.shape
  2332. },
  2333. // 用于处理或者过滤输入框内容的方法
  2334. formatter: {
  2335. type: [Function, null],
  2336. default: props$E.input.formatter
  2337. },
  2338. // 是否忽略组件内对文本合成系统事件的处理
  2339. ignoreCompositionEvent: {
  2340. type: Boolean,
  2341. default: true
  2342. }
  2343. }
  2344. };
  2345. const _sfc_main$22 = {
  2346. name: "u-input",
  2347. mixins: [mpMixin, mixin, props$C],
  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$21(_ctx, _cache, $props, $setup, $data, $options) {
  2482. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  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均失效,此时\r\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\r\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$f = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__scopeId", "data-v-df79975b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
  2568. const props$B = {
  2569. props: {
  2570. color: {
  2571. type: String,
  2572. default: props$E.line.color
  2573. },
  2574. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  2575. length: {
  2576. type: [String, Number],
  2577. default: props$E.line.length
  2578. },
  2579. // 线条方向,col-竖向,row-横向
  2580. direction: {
  2581. type: String,
  2582. default: props$E.line.direction
  2583. },
  2584. // 是否显示细边框
  2585. hairline: {
  2586. type: Boolean,
  2587. default: props$E.line.hairline
  2588. },
  2589. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  2590. margin: {
  2591. type: [String, Number],
  2592. default: props$E.line.margin
  2593. },
  2594. // 是否虚线,true-虚线,false-实线
  2595. dashed: {
  2596. type: Boolean,
  2597. default: props$E.line.dashed
  2598. }
  2599. }
  2600. };
  2601. const _sfc_main$21 = {
  2602. name: "u-line",
  2603. mixins: [mpMixin, mixin, props$B],
  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$20(_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_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__scopeId", "data-v-72791e59"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
  2639. const props$A = {
  2640. props: {
  2641. // input的label提示语
  2642. label: {
  2643. type: String,
  2644. default: props$E.formItem.label
  2645. },
  2646. // 绑定的值
  2647. prop: {
  2648. type: String,
  2649. default: props$E.formItem.prop
  2650. },
  2651. // 是否显示表单域的下划线边框
  2652. borderBottom: {
  2653. type: [String, Boolean],
  2654. default: props$E.formItem.borderBottom
  2655. },
  2656. // label的宽度,单位px
  2657. labelWidth: {
  2658. type: [String, Number],
  2659. default: props$E.formItem.labelWidth
  2660. },
  2661. // 右侧图标
  2662. rightIcon: {
  2663. type: String,
  2664. default: props$E.formItem.rightIcon
  2665. },
  2666. // 左侧图标
  2667. leftIcon: {
  2668. type: String,
  2669. default: props$E.formItem.leftIcon
  2670. },
  2671. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  2672. required: {
  2673. type: Boolean,
  2674. default: props$E.formItem.required
  2675. },
  2676. leftIconStyle: {
  2677. type: [String, Object],
  2678. default: props$E.formItem.leftIconStyle
  2679. }
  2680. }
  2681. };
  2682. const _sfc_main$20 = {
  2683. name: "u-form-item",
  2684. mixins: [mpMixin, mixin, props$A],
  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$1$(_ctx, _cache, $props, $setup, $data, $options) {
  2740. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  2741. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  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$20, [["render", _sfc_render$1$], ["__scopeId", "data-v-42bac3de"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
  2841. const props$z = {
  2842. props: {
  2843. // 是否显示组件
  2844. show: {
  2845. type: Boolean,
  2846. default: props$E.loadingIcon.show
  2847. },
  2848. // 颜色
  2849. color: {
  2850. type: String,
  2851. default: props$E.loadingIcon.color
  2852. },
  2853. // 提示文字颜色
  2854. textColor: {
  2855. type: String,
  2856. default: props$E.loadingIcon.textColor
  2857. },
  2858. // 文字和图标是否垂直排列
  2859. vertical: {
  2860. type: Boolean,
  2861. default: props$E.loadingIcon.vertical
  2862. },
  2863. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  2864. mode: {
  2865. type: String,
  2866. default: props$E.loadingIcon.mode
  2867. },
  2868. // 图标大小,单位默认px
  2869. size: {
  2870. type: [String, Number],
  2871. default: props$E.loadingIcon.size
  2872. },
  2873. // 文字大小
  2874. textSize: {
  2875. type: [String, Number],
  2876. default: props$E.loadingIcon.textSize
  2877. },
  2878. // 文字内容
  2879. text: {
  2880. type: [String, Number],
  2881. default: props$E.loadingIcon.text
  2882. },
  2883. // 动画模式
  2884. timingFunction: {
  2885. type: String,
  2886. default: props$E.loadingIcon.timingFunction
  2887. },
  2888. // 动画执行周期时间
  2889. duration: {
  2890. type: [String, Number],
  2891. default: props$E.loadingIcon.duration
  2892. },
  2893. // mode=circle时的暗边颜色
  2894. inactiveColor: {
  2895. type: String,
  2896. default: props$E.loadingIcon.inactiveColor
  2897. }
  2898. }
  2899. };
  2900. const _sfc_main$1$ = {
  2901. name: "u-loading-icon",
  2902. mixins: [mpMixin, mixin, props$z],
  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$1_(_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$1$, [["render", _sfc_render$1_], ["__scopeId", "data-v-2af81691"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
  3024. const props$y = {
  3025. props: {
  3026. // 是否细边框
  3027. hairline: {
  3028. type: Boolean,
  3029. default: props$E.button.hairline
  3030. },
  3031. // 按钮的预置样式,info,primary,error,warning,success
  3032. type: {
  3033. type: String,
  3034. default: props$E.button.type
  3035. },
  3036. // 按钮尺寸,large,normal,small,mini
  3037. size: {
  3038. type: String,
  3039. default: props$E.button.size
  3040. },
  3041. // 按钮形状,circle(两边为半圆),square(带圆角)
  3042. shape: {
  3043. type: String,
  3044. default: props$E.button.shape
  3045. },
  3046. // 按钮是否镂空
  3047. plain: {
  3048. type: Boolean,
  3049. default: props$E.button.plain
  3050. },
  3051. // 是否禁止状态
  3052. disabled: {
  3053. type: Boolean,
  3054. default: props$E.button.disabled
  3055. },
  3056. // 是否加载中
  3057. loading: {
  3058. type: Boolean,
  3059. default: props$E.button.loading
  3060. },
  3061. // 加载中提示文字
  3062. loadingText: {
  3063. type: [String, Number],
  3064. default: props$E.button.loadingText
  3065. },
  3066. // 加载状态图标类型
  3067. loadingMode: {
  3068. type: String,
  3069. default: props$E.button.loadingMode
  3070. },
  3071. // 加载图标大小
  3072. loadingSize: {
  3073. type: [String, Number],
  3074. default: props$E.button.loadingSize
  3075. },
  3076. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  3077. // https://uniapp.dcloud.io/component/button
  3078. openType: {
  3079. type: String,
  3080. default: props$E.button.openType
  3081. },
  3082. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  3083. // 取值为submit(提交表单),reset(重置表单)
  3084. formType: {
  3085. type: String,
  3086. default: props$E.button.formType
  3087. },
  3088. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  3089. // 只微信小程序、QQ小程序有效
  3090. appParameter: {
  3091. type: String,
  3092. default: props$E.button.appParameter
  3093. },
  3094. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  3095. hoverStopPropagation: {
  3096. type: Boolean,
  3097. default: props$E.button.hoverStopPropagation
  3098. },
  3099. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  3100. lang: {
  3101. type: String,
  3102. default: props$E.button.lang
  3103. },
  3104. // 会话来源,open-type="contact"时有效。只微信小程序有效
  3105. sessionFrom: {
  3106. type: String,
  3107. default: props$E.button.sessionFrom
  3108. },
  3109. // 会话内消息卡片标题,open-type="contact"时有效
  3110. // 默认当前标题,只微信小程序有效
  3111. sendMessageTitle: {
  3112. type: String,
  3113. default: props$E.button.sendMessageTitle
  3114. },
  3115. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  3116. // 默认当前分享路径,只微信小程序有效
  3117. sendMessagePath: {
  3118. type: String,
  3119. default: props$E.button.sendMessagePath
  3120. },
  3121. // 会话内消息卡片图片,open-type="contact"时有效
  3122. // 默认当前页面截图,只微信小程序有效
  3123. sendMessageImg: {
  3124. type: String,
  3125. default: props$E.button.sendMessageImg
  3126. },
  3127. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  3128. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  3129. showMessageCard: {
  3130. type: Boolean,
  3131. default: props$E.button.showMessageCard
  3132. },
  3133. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  3134. dataName: {
  3135. type: String,
  3136. default: props$E.button.dataName
  3137. },
  3138. // 节流,一定时间内只能触发一次
  3139. throttleTime: {
  3140. type: [String, Number],
  3141. default: props$E.button.throttleTime
  3142. },
  3143. // 按住后多久出现点击态,单位毫秒
  3144. hoverStartTime: {
  3145. type: [String, Number],
  3146. default: props$E.button.hoverStartTime
  3147. },
  3148. // 手指松开后点击态保留时间,单位毫秒
  3149. hoverStayTime: {
  3150. type: [String, Number],
  3151. default: props$E.button.hoverStayTime
  3152. },
  3153. // 按钮文字,之所以通过props传入,是因为slot传入的话
  3154. // nvue中无法控制文字的样式
  3155. text: {
  3156. type: [String, Number],
  3157. default: props$E.button.text
  3158. },
  3159. // 按钮图标
  3160. icon: {
  3161. type: String,
  3162. default: props$E.button.icon
  3163. },
  3164. // 按钮图标
  3165. iconColor: {
  3166. type: String,
  3167. default: props$E.button.icon
  3168. },
  3169. // 按钮颜色,支持传入linear-gradient渐变色
  3170. color: {
  3171. type: String,
  3172. default: props$E.button.color
  3173. }
  3174. }
  3175. };
  3176. const _sfc_main$1_ = {
  3177. name: "u-button",
  3178. mixins: [mpMixin, mixin, props$y],
  3179. data() {
  3180. return {};
  3181. },
  3182. computed: {
  3183. // 生成bem风格的类名
  3184. bemClass() {
  3185. if (!this.color) {
  3186. return this.bem(
  3187. "button",
  3188. ["type", "shape", "size"],
  3189. ["disabled", "plain", "hairline"]
  3190. );
  3191. } else {
  3192. return this.bem(
  3193. "button",
  3194. ["shape", "size"],
  3195. ["disabled", "plain", "hairline"]
  3196. );
  3197. }
  3198. },
  3199. loadingColor() {
  3200. if (this.plain) {
  3201. return this.color ? this.color : uni.$u.config.color[`u-${this.type}`];
  3202. }
  3203. if (this.type === "info") {
  3204. return "#c9c9c9";
  3205. }
  3206. return "rgb(200, 200, 200)";
  3207. },
  3208. iconColorCom() {
  3209. if (this.iconColor)
  3210. return this.iconColor;
  3211. if (this.plain) {
  3212. return this.color ? this.color : this.type;
  3213. } else {
  3214. return this.type === "info" ? "#000000" : "#ffffff";
  3215. }
  3216. },
  3217. baseColor() {
  3218. let style = {};
  3219. if (this.color) {
  3220. style.color = this.plain ? this.color : "white";
  3221. if (!this.plain) {
  3222. style["background-color"] = this.color;
  3223. }
  3224. if (this.color.indexOf("gradient") !== -1) {
  3225. style.borderTopWidth = 0;
  3226. style.borderRightWidth = 0;
  3227. style.borderBottomWidth = 0;
  3228. style.borderLeftWidth = 0;
  3229. if (!this.plain) {
  3230. style.backgroundImage = this.color;
  3231. }
  3232. } else {
  3233. style.borderColor = this.color;
  3234. style.borderWidth = "1px";
  3235. style.borderStyle = "solid";
  3236. }
  3237. }
  3238. return style;
  3239. },
  3240. // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
  3241. nvueTextStyle() {
  3242. let style = {};
  3243. if (this.type === "info") {
  3244. style.color = "#323233";
  3245. }
  3246. if (this.color) {
  3247. style.color = this.plain ? this.color : "white";
  3248. }
  3249. style.fontSize = this.textSize + "px";
  3250. return style;
  3251. },
  3252. // 字体大小
  3253. textSize() {
  3254. let fontSize = 16, { size } = this;
  3255. if (size === "large")
  3256. fontSize = 20;
  3257. if (size === "normal")
  3258. fontSize = 16;
  3259. if (size === "small")
  3260. fontSize = 14;
  3261. if (size === "mini")
  3262. fontSize = 12;
  3263. return fontSize;
  3264. }
  3265. },
  3266. emits: [
  3267. "click",
  3268. "getphonenumber",
  3269. "getuserinfo",
  3270. "error",
  3271. "opensetting",
  3272. "launchapp"
  3273. ],
  3274. methods: {
  3275. clickHandler() {
  3276. if (!this.disabled && !this.loading) {
  3277. uni.$u.throttle(() => {
  3278. this.$emit("click");
  3279. }, this.throttleTime);
  3280. }
  3281. },
  3282. // 下面为对接uniapp官方按钮开放能力事件回调的对接
  3283. getphonenumber(res2) {
  3284. this.$emit("getphonenumber", res2);
  3285. },
  3286. getuserinfo(res2) {
  3287. this.$emit("getuserinfo", res2);
  3288. },
  3289. error(res2) {
  3290. this.$emit("error", res2);
  3291. },
  3292. opensetting(res2) {
  3293. this.$emit("opensetting", res2);
  3294. },
  3295. launchapp(res2) {
  3296. this.$emit("launchapp", res2);
  3297. }
  3298. }
  3299. };
  3300. function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) {
  3301. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  3302. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  3303. return vue.openBlock(), vue.createElementBlock("button", {
  3304. "hover-start-time": Number(_ctx.hoverStartTime),
  3305. "hover-stay-time": Number(_ctx.hoverStayTime),
  3306. "form-type": _ctx.formType,
  3307. "open-type": _ctx.openType,
  3308. "app-parameter": _ctx.appParameter,
  3309. "hover-stop-propagation": _ctx.hoverStopPropagation,
  3310. "send-message-title": _ctx.sendMessageTitle,
  3311. "send-message-path": _ctx.sendMessagePath,
  3312. lang: _ctx.lang,
  3313. "data-name": _ctx.dataName,
  3314. "session-from": _ctx.sessionFrom,
  3315. "send-message-img": _ctx.sendMessageImg,
  3316. "show-message-card": _ctx.showMessageCard,
  3317. onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)),
  3318. onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)),
  3319. onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)),
  3320. onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)),
  3321. onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)),
  3322. "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "",
  3323. class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]),
  3324. style: vue.normalizeStyle([$options.baseColor, _ctx.$u.addStyle(_ctx.customStyle)]),
  3325. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  3326. }, [
  3327. _ctx.loading ? (vue.openBlock(), vue.createElementBlock(
  3328. vue.Fragment,
  3329. { key: 0 },
  3330. [
  3331. vue.createVNode(_component_u_loading_icon, {
  3332. mode: _ctx.loadingMode,
  3333. size: _ctx.loadingSize * 1.15,
  3334. color: $options.loadingColor
  3335. }, null, 8, ["mode", "size", "color"]),
  3336. vue.createElementVNode(
  3337. "text",
  3338. {
  3339. class: "u-button__loading-text",
  3340. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  3341. },
  3342. vue.toDisplayString(_ctx.loadingText || _ctx.text),
  3343. 5
  3344. /* TEXT, STYLE */
  3345. )
  3346. ],
  3347. 64
  3348. /* STABLE_FRAGMENT */
  3349. )) : (vue.openBlock(), vue.createElementBlock(
  3350. vue.Fragment,
  3351. { key: 1 },
  3352. [
  3353. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  3354. key: 0,
  3355. name: _ctx.icon,
  3356. color: $options.iconColorCom,
  3357. size: $options.textSize * 1.35,
  3358. customStyle: { marginRight: "2px" }
  3359. }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true),
  3360. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  3361. vue.createElementVNode(
  3362. "text",
  3363. {
  3364. class: "u-button__text",
  3365. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  3366. },
  3367. vue.toDisplayString(_ctx.text),
  3368. 5
  3369. /* TEXT, STYLE */
  3370. )
  3371. ], true)
  3372. ],
  3373. 64
  3374. /* STABLE_FRAGMENT */
  3375. ))
  3376. ], 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"]);
  3377. }
  3378. const __easycom_3$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__scopeId", "data-v-5ce41ee6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
  3379. const props$x = {
  3380. props: {
  3381. // 当前form的需要验证字段的集合
  3382. model: {
  3383. type: Object,
  3384. default: props$E.form.model
  3385. },
  3386. // 验证规则
  3387. rules: {
  3388. type: [Object, Function, Array],
  3389. default: props$E.form.rules
  3390. },
  3391. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  3392. // border-bottom-下边框呈现红色,none-无提示
  3393. errorType: {
  3394. type: String,
  3395. default: props$E.form.errorType
  3396. },
  3397. // 是否显示表单域的下划线边框
  3398. borderBottom: {
  3399. type: Boolean,
  3400. default: props$E.form.borderBottom
  3401. },
  3402. // label的位置,left-左边,top-上边
  3403. labelPosition: {
  3404. type: String,
  3405. default: props$E.form.labelPosition
  3406. },
  3407. // label的宽度,单位px
  3408. labelWidth: {
  3409. type: [String, Number],
  3410. default: props$E.form.labelWidth
  3411. },
  3412. // lable字体的对齐方式
  3413. labelAlign: {
  3414. type: String,
  3415. default: props$E.form.labelAlign
  3416. },
  3417. // lable的样式,对象形式
  3418. labelStyle: {
  3419. type: Object,
  3420. default: props$E.form.labelStyle
  3421. }
  3422. }
  3423. };
  3424. var define_process_env_default = {};
  3425. const formatRegExp = /%[sdj%]/g;
  3426. let warning = function warning2() {
  3427. };
  3428. if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
  3429. warning = function warning3(type2, errors) {
  3430. if (typeof console !== "undefined" && console.warn) {
  3431. if (errors.every((e) => typeof e === "string")) {
  3432. formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
  3433. }
  3434. }
  3435. };
  3436. }
  3437. function convertFieldsError(errors) {
  3438. if (!errors || !errors.length)
  3439. return null;
  3440. const fields = {};
  3441. errors.forEach((error2) => {
  3442. const { field } = error2;
  3443. fields[field] = fields[field] || [];
  3444. fields[field].push(error2);
  3445. });
  3446. return fields;
  3447. }
  3448. function format() {
  3449. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3450. args[_key] = arguments[_key];
  3451. }
  3452. let i = 1;
  3453. const f = args[0];
  3454. const len = args.length;
  3455. if (typeof f === "function") {
  3456. return f.apply(null, args.slice(1));
  3457. }
  3458. if (typeof f === "string") {
  3459. let str = String(f).replace(formatRegExp, (x) => {
  3460. if (x === "%%") {
  3461. return "%";
  3462. }
  3463. if (i >= len) {
  3464. return x;
  3465. }
  3466. switch (x) {
  3467. case "%s":
  3468. return String(args[i++]);
  3469. case "%d":
  3470. return Number(args[i++]);
  3471. case "%j":
  3472. try {
  3473. return JSON.stringify(args[i++]);
  3474. } catch (_) {
  3475. return "[Circular]";
  3476. }
  3477. break;
  3478. default:
  3479. return x;
  3480. }
  3481. });
  3482. for (let arg = args[i]; i < len; arg = args[++i]) {
  3483. str += ` ${arg}`;
  3484. }
  3485. return str;
  3486. }
  3487. return f;
  3488. }
  3489. function isNativeStringType(type2) {
  3490. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  3491. }
  3492. function isEmptyValue(value2, type2) {
  3493. if (value2 === void 0 || value2 === null) {
  3494. return true;
  3495. }
  3496. if (type2 === "array" && Array.isArray(value2) && !value2.length) {
  3497. return true;
  3498. }
  3499. if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
  3500. return true;
  3501. }
  3502. return false;
  3503. }
  3504. function asyncParallelArray(arr, func2, callback) {
  3505. const results = [];
  3506. let total = 0;
  3507. const arrLength = arr.length;
  3508. function count(errors) {
  3509. results.push.apply(results, errors);
  3510. total++;
  3511. if (total === arrLength) {
  3512. callback(results);
  3513. }
  3514. }
  3515. arr.forEach((a) => {
  3516. func2(a, count);
  3517. });
  3518. }
  3519. function asyncSerialArray(arr, func2, callback) {
  3520. let index2 = 0;
  3521. const arrLength = arr.length;
  3522. function next(errors) {
  3523. if (errors && errors.length) {
  3524. callback(errors);
  3525. return;
  3526. }
  3527. const original = index2;
  3528. index2 += 1;
  3529. if (original < arrLength) {
  3530. func2(arr[original], next);
  3531. } else {
  3532. callback([]);
  3533. }
  3534. }
  3535. next([]);
  3536. }
  3537. function flattenObjArr(objArr) {
  3538. const ret = [];
  3539. Object.keys(objArr).forEach((k) => {
  3540. ret.push.apply(ret, objArr[k]);
  3541. });
  3542. return ret;
  3543. }
  3544. function asyncMap(objArr, option, func2, callback) {
  3545. if (option.first) {
  3546. const _pending = new Promise((resolve, reject) => {
  3547. const next = function next2(errors) {
  3548. callback(errors);
  3549. return errors.length ? reject({
  3550. errors,
  3551. fields: convertFieldsError(errors)
  3552. }) : resolve();
  3553. };
  3554. const flattenArr = flattenObjArr(objArr);
  3555. asyncSerialArray(flattenArr, func2, next);
  3556. });
  3557. _pending.catch((e) => e);
  3558. return _pending;
  3559. }
  3560. let firstFields = option.firstFields || [];
  3561. if (firstFields === true) {
  3562. firstFields = Object.keys(objArr);
  3563. }
  3564. const objArrKeys = Object.keys(objArr);
  3565. const objArrLength = objArrKeys.length;
  3566. let total = 0;
  3567. const results = [];
  3568. const pending = new Promise((resolve, reject) => {
  3569. const next = function next2(errors) {
  3570. results.push.apply(results, errors);
  3571. total++;
  3572. if (total === objArrLength) {
  3573. callback(results);
  3574. return results.length ? reject({
  3575. errors: results,
  3576. fields: convertFieldsError(results)
  3577. }) : resolve();
  3578. }
  3579. };
  3580. if (!objArrKeys.length) {
  3581. callback(results);
  3582. resolve();
  3583. }
  3584. objArrKeys.forEach((key) => {
  3585. const arr = objArr[key];
  3586. if (firstFields.indexOf(key) !== -1) {
  3587. asyncSerialArray(arr, func2, next);
  3588. } else {
  3589. asyncParallelArray(arr, func2, next);
  3590. }
  3591. });
  3592. });
  3593. pending.catch((e) => e);
  3594. return pending;
  3595. }
  3596. function complementError(rule) {
  3597. return function(oe) {
  3598. if (oe && oe.message) {
  3599. oe.field = oe.field || rule.fullField;
  3600. return oe;
  3601. }
  3602. return {
  3603. message: typeof oe === "function" ? oe() : oe,
  3604. field: oe.field || rule.fullField
  3605. };
  3606. };
  3607. }
  3608. function deepMerge$2(target, source) {
  3609. if (source) {
  3610. for (const s in source) {
  3611. if (source.hasOwnProperty(s)) {
  3612. const value2 = source[s];
  3613. if (typeof value2 === "object" && typeof target[s] === "object") {
  3614. target[s] = { ...target[s], ...value2 };
  3615. } else {
  3616. target[s] = value2;
  3617. }
  3618. }
  3619. }
  3620. }
  3621. return target;
  3622. }
  3623. function required(rule, value2, source, errors, options, type2) {
  3624. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
  3625. errors.push(format(options.messages.required, rule.fullField));
  3626. }
  3627. }
  3628. function whitespace(rule, value2, source, errors, options) {
  3629. if (/^\s+$/.test(value2) || value2 === "") {
  3630. errors.push(format(options.messages.whitespace, rule.fullField));
  3631. }
  3632. }
  3633. const pattern = {
  3634. // http://emailregex.com/
  3635. 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,}))$/,
  3636. url: new RegExp(
  3637. "^(?!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]*)?$",
  3638. "i"
  3639. ),
  3640. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  3641. };
  3642. var types = {
  3643. integer: function integer(value2) {
  3644. return /^(-)?\d+$/.test(value2);
  3645. },
  3646. float: function float(value2) {
  3647. return /^(-)?\d+(\.\d+)?$/.test(value2);
  3648. },
  3649. array: function array3(value2) {
  3650. return Array.isArray(value2);
  3651. },
  3652. regexp: function regexp(value2) {
  3653. if (value2 instanceof RegExp) {
  3654. return true;
  3655. }
  3656. try {
  3657. return !!new RegExp(value2);
  3658. } catch (e) {
  3659. return false;
  3660. }
  3661. },
  3662. date: function date3(value2) {
  3663. return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
  3664. },
  3665. number: function number3(value2) {
  3666. if (isNaN(value2)) {
  3667. return false;
  3668. }
  3669. return typeof +value2 === "number";
  3670. },
  3671. object: function object3(value2) {
  3672. return typeof value2 === "object" && !types.array(value2);
  3673. },
  3674. method: function method(value2) {
  3675. return typeof value2 === "function";
  3676. },
  3677. email: function email2(value2) {
  3678. return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
  3679. },
  3680. url: function url2(value2) {
  3681. return typeof value2 === "string" && !!value2.match(pattern.url);
  3682. },
  3683. hex: function hex(value2) {
  3684. return typeof value2 === "string" && !!value2.match(pattern.hex);
  3685. }
  3686. };
  3687. function type(rule, value2, source, errors, options) {
  3688. if (rule.required && value2 === void 0) {
  3689. required(rule, value2, source, errors, options);
  3690. return;
  3691. }
  3692. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  3693. const ruleType = rule.type;
  3694. if (custom.indexOf(ruleType) > -1) {
  3695. if (!types[ruleType](value2)) {
  3696. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  3697. }
  3698. } else if (ruleType && typeof value2 !== rule.type) {
  3699. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  3700. }
  3701. }
  3702. function range$2(rule, value2, source, errors, options) {
  3703. const len = typeof rule.len === "number";
  3704. const min = typeof rule.min === "number";
  3705. const max = typeof rule.max === "number";
  3706. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  3707. let val = value2;
  3708. let key = null;
  3709. const num = typeof value2 === "number";
  3710. const str = typeof value2 === "string";
  3711. const arr = Array.isArray(value2);
  3712. if (num) {
  3713. key = "number";
  3714. } else if (str) {
  3715. key = "string";
  3716. } else if (arr) {
  3717. key = "array";
  3718. }
  3719. if (!key) {
  3720. return false;
  3721. }
  3722. if (arr) {
  3723. val = value2.length;
  3724. }
  3725. if (str) {
  3726. val = value2.replace(spRegexp, "_").length;
  3727. }
  3728. if (len) {
  3729. if (val !== rule.len) {
  3730. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  3731. }
  3732. } else if (min && !max && val < rule.min) {
  3733. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  3734. } else if (max && !min && val > rule.max) {
  3735. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  3736. } else if (min && max && (val < rule.min || val > rule.max)) {
  3737. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  3738. }
  3739. }
  3740. const ENUM = "enum";
  3741. function enumerable(rule, value2, source, errors, options) {
  3742. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  3743. if (rule[ENUM].indexOf(value2) === -1) {
  3744. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  3745. }
  3746. }
  3747. function pattern$1(rule, value2, source, errors, options) {
  3748. if (rule.pattern) {
  3749. if (rule.pattern instanceof RegExp) {
  3750. rule.pattern.lastIndex = 0;
  3751. if (!rule.pattern.test(value2)) {
  3752. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  3753. }
  3754. } else if (typeof rule.pattern === "string") {
  3755. const _pattern = new RegExp(rule.pattern);
  3756. if (!_pattern.test(value2)) {
  3757. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  3758. }
  3759. }
  3760. }
  3761. }
  3762. const rules = {
  3763. required,
  3764. whitespace,
  3765. type,
  3766. range: range$2,
  3767. enum: enumerable,
  3768. pattern: pattern$1
  3769. };
  3770. function string$1(rule, value2, callback, source, options) {
  3771. const errors = [];
  3772. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3773. if (validate2) {
  3774. if (isEmptyValue(value2, "string") && !rule.required) {
  3775. return callback();
  3776. }
  3777. rules.required(rule, value2, source, errors, options, "string");
  3778. if (!isEmptyValue(value2, "string")) {
  3779. rules.type(rule, value2, source, errors, options);
  3780. rules.range(rule, value2, source, errors, options);
  3781. rules.pattern(rule, value2, source, errors, options);
  3782. if (rule.whitespace === true) {
  3783. rules.whitespace(rule, value2, source, errors, options);
  3784. }
  3785. }
  3786. }
  3787. callback(errors);
  3788. }
  3789. function method2(rule, value2, callback, source, options) {
  3790. const errors = [];
  3791. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3792. if (validate2) {
  3793. if (isEmptyValue(value2) && !rule.required) {
  3794. return callback();
  3795. }
  3796. rules.required(rule, value2, source, errors, options);
  3797. if (value2 !== void 0) {
  3798. rules.type(rule, value2, source, errors, options);
  3799. }
  3800. }
  3801. callback(errors);
  3802. }
  3803. function number2(rule, value2, callback, source, options) {
  3804. const errors = [];
  3805. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3806. if (validate2) {
  3807. if (value2 === "") {
  3808. value2 = void 0;
  3809. }
  3810. if (isEmptyValue(value2) && !rule.required) {
  3811. return callback();
  3812. }
  3813. rules.required(rule, value2, source, errors, options);
  3814. if (value2 !== void 0) {
  3815. rules.type(rule, value2, source, errors, options);
  3816. rules.range(rule, value2, source, errors, options);
  3817. }
  3818. }
  3819. callback(errors);
  3820. }
  3821. function _boolean(rule, value2, callback, source, options) {
  3822. const errors = [];
  3823. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3824. if (validate2) {
  3825. if (isEmptyValue(value2) && !rule.required) {
  3826. return callback();
  3827. }
  3828. rules.required(rule, value2, source, errors, options);
  3829. if (value2 !== void 0) {
  3830. rules.type(rule, value2, source, errors, options);
  3831. }
  3832. }
  3833. callback(errors);
  3834. }
  3835. function regexp2(rule, value2, callback, source, options) {
  3836. const errors = [];
  3837. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3838. if (validate2) {
  3839. if (isEmptyValue(value2) && !rule.required) {
  3840. return callback();
  3841. }
  3842. rules.required(rule, value2, source, errors, options);
  3843. if (!isEmptyValue(value2)) {
  3844. rules.type(rule, value2, source, errors, options);
  3845. }
  3846. }
  3847. callback(errors);
  3848. }
  3849. function integer2(rule, value2, callback, source, options) {
  3850. const errors = [];
  3851. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3852. if (validate2) {
  3853. if (isEmptyValue(value2) && !rule.required) {
  3854. return callback();
  3855. }
  3856. rules.required(rule, value2, source, errors, options);
  3857. if (value2 !== void 0) {
  3858. rules.type(rule, value2, source, errors, options);
  3859. rules.range(rule, value2, source, errors, options);
  3860. }
  3861. }
  3862. callback(errors);
  3863. }
  3864. function floatFn(rule, value2, callback, source, options) {
  3865. const errors = [];
  3866. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3867. if (validate2) {
  3868. if (isEmptyValue(value2) && !rule.required) {
  3869. return callback();
  3870. }
  3871. rules.required(rule, value2, source, errors, options);
  3872. if (value2 !== void 0) {
  3873. rules.type(rule, value2, source, errors, options);
  3874. rules.range(rule, value2, source, errors, options);
  3875. }
  3876. }
  3877. callback(errors);
  3878. }
  3879. function array2(rule, value2, callback, source, options) {
  3880. const errors = [];
  3881. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3882. if (validate2) {
  3883. if (isEmptyValue(value2, "array") && !rule.required) {
  3884. return callback();
  3885. }
  3886. rules.required(rule, value2, source, errors, options, "array");
  3887. if (!isEmptyValue(value2, "array")) {
  3888. rules.type(rule, value2, source, errors, options);
  3889. rules.range(rule, value2, source, errors, options);
  3890. }
  3891. }
  3892. callback(errors);
  3893. }
  3894. function object2(rule, value2, callback, source, options) {
  3895. const errors = [];
  3896. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3897. if (validate2) {
  3898. if (isEmptyValue(value2) && !rule.required) {
  3899. return callback();
  3900. }
  3901. rules.required(rule, value2, source, errors, options);
  3902. if (value2 !== void 0) {
  3903. rules.type(rule, value2, source, errors, options);
  3904. }
  3905. }
  3906. callback(errors);
  3907. }
  3908. const ENUM$1 = "enum";
  3909. function enumerable$1(rule, value2, callback, source, options) {
  3910. const errors = [];
  3911. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3912. if (validate2) {
  3913. if (isEmptyValue(value2) && !rule.required) {
  3914. return callback();
  3915. }
  3916. rules.required(rule, value2, source, errors, options);
  3917. if (value2 !== void 0) {
  3918. rules[ENUM$1](rule, value2, source, errors, options);
  3919. }
  3920. }
  3921. callback(errors);
  3922. }
  3923. function pattern$2(rule, value2, callback, source, options) {
  3924. const errors = [];
  3925. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3926. if (validate2) {
  3927. if (isEmptyValue(value2, "string") && !rule.required) {
  3928. return callback();
  3929. }
  3930. rules.required(rule, value2, source, errors, options);
  3931. if (!isEmptyValue(value2, "string")) {
  3932. rules.pattern(rule, value2, source, errors, options);
  3933. }
  3934. }
  3935. callback(errors);
  3936. }
  3937. function date2(rule, value2, callback, source, options) {
  3938. const errors = [];
  3939. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3940. if (validate2) {
  3941. if (isEmptyValue(value2) && !rule.required) {
  3942. return callback();
  3943. }
  3944. rules.required(rule, value2, source, errors, options);
  3945. if (!isEmptyValue(value2)) {
  3946. let dateObject;
  3947. if (typeof value2 === "number") {
  3948. dateObject = new Date(value2);
  3949. } else {
  3950. dateObject = value2;
  3951. }
  3952. rules.type(rule, dateObject, source, errors, options);
  3953. if (dateObject) {
  3954. rules.range(rule, dateObject.getTime(), source, errors, options);
  3955. }
  3956. }
  3957. }
  3958. callback(errors);
  3959. }
  3960. function required$1(rule, value2, callback, source, options) {
  3961. const errors = [];
  3962. const type2 = Array.isArray(value2) ? "array" : typeof value2;
  3963. rules.required(rule, value2, source, errors, options, type2);
  3964. callback(errors);
  3965. }
  3966. function type$1(rule, value2, callback, source, options) {
  3967. const ruleType = rule.type;
  3968. const errors = [];
  3969. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3970. if (validate2) {
  3971. if (isEmptyValue(value2, ruleType) && !rule.required) {
  3972. return callback();
  3973. }
  3974. rules.required(rule, value2, source, errors, options, ruleType);
  3975. if (!isEmptyValue(value2, ruleType)) {
  3976. rules.type(rule, value2, source, errors, options);
  3977. }
  3978. }
  3979. callback(errors);
  3980. }
  3981. function any(rule, value2, callback, source, options) {
  3982. const errors = [];
  3983. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3984. if (validate2) {
  3985. if (isEmptyValue(value2) && !rule.required) {
  3986. return callback();
  3987. }
  3988. rules.required(rule, value2, source, errors, options);
  3989. }
  3990. callback(errors);
  3991. }
  3992. const validators = {
  3993. string: string$1,
  3994. method: method2,
  3995. number: number2,
  3996. boolean: _boolean,
  3997. regexp: regexp2,
  3998. integer: integer2,
  3999. float: floatFn,
  4000. array: array2,
  4001. object: object2,
  4002. enum: enumerable$1,
  4003. pattern: pattern$2,
  4004. date: date2,
  4005. url: type$1,
  4006. hex: type$1,
  4007. email: type$1,
  4008. required: required$1,
  4009. any
  4010. };
  4011. function newMessages() {
  4012. return {
  4013. default: "Validation error on field %s",
  4014. required: "%s is required",
  4015. enum: "%s must be one of %s",
  4016. whitespace: "%s cannot be empty",
  4017. date: {
  4018. format: "%s date %s is invalid for format %s",
  4019. parse: "%s date could not be parsed, %s is invalid ",
  4020. invalid: "%s date %s is invalid"
  4021. },
  4022. types: {
  4023. string: "%s is not a %s",
  4024. method: "%s is not a %s (function)",
  4025. array: "%s is not an %s",
  4026. object: "%s is not an %s",
  4027. number: "%s is not a %s",
  4028. date: "%s is not a %s",
  4029. boolean: "%s is not a %s",
  4030. integer: "%s is not an %s",
  4031. float: "%s is not a %s",
  4032. regexp: "%s is not a valid %s",
  4033. email: "%s is not a valid %s",
  4034. url: "%s is not a valid %s",
  4035. hex: "%s is not a valid %s"
  4036. },
  4037. string: {
  4038. len: "%s must be exactly %s characters",
  4039. min: "%s must be at least %s characters",
  4040. max: "%s cannot be longer than %s characters",
  4041. range: "%s must be between %s and %s characters"
  4042. },
  4043. number: {
  4044. len: "%s must equal %s",
  4045. min: "%s cannot be less than %s",
  4046. max: "%s cannot be greater than %s",
  4047. range: "%s must be between %s and %s"
  4048. },
  4049. array: {
  4050. len: "%s must be exactly %s in length",
  4051. min: "%s cannot be less than %s in length",
  4052. max: "%s cannot be greater than %s in length",
  4053. range: "%s must be between %s and %s in length"
  4054. },
  4055. pattern: {
  4056. mismatch: "%s value %s does not match pattern %s"
  4057. },
  4058. clone: function clone2() {
  4059. const cloned = JSON.parse(JSON.stringify(this));
  4060. cloned.clone = this.clone;
  4061. return cloned;
  4062. }
  4063. };
  4064. }
  4065. const messages = newMessages();
  4066. function Schema(descriptor) {
  4067. this.rules = null;
  4068. this._messages = messages;
  4069. this.define(descriptor);
  4070. }
  4071. Schema.prototype = {
  4072. messages: function messages2(_messages) {
  4073. if (_messages) {
  4074. this._messages = deepMerge$2(newMessages(), _messages);
  4075. }
  4076. return this._messages;
  4077. },
  4078. define: function define(rules2) {
  4079. if (!rules2) {
  4080. throw new Error("Cannot configure a schema with no rules");
  4081. }
  4082. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  4083. throw new Error("Rules must be an object");
  4084. }
  4085. this.rules = {};
  4086. let z;
  4087. let item;
  4088. for (z in rules2) {
  4089. if (rules2.hasOwnProperty(z)) {
  4090. item = rules2[z];
  4091. this.rules[z] = Array.isArray(item) ? item : [item];
  4092. }
  4093. }
  4094. },
  4095. validate: function validate(source_, o, oc) {
  4096. const _this = this;
  4097. if (o === void 0) {
  4098. o = {};
  4099. }
  4100. if (oc === void 0) {
  4101. oc = function oc2() {
  4102. };
  4103. }
  4104. let source = source_;
  4105. let options = o;
  4106. let callback = oc;
  4107. if (typeof options === "function") {
  4108. callback = options;
  4109. options = {};
  4110. }
  4111. if (!this.rules || Object.keys(this.rules).length === 0) {
  4112. if (callback) {
  4113. callback();
  4114. }
  4115. return Promise.resolve();
  4116. }
  4117. function complete(results) {
  4118. let i;
  4119. let errors = [];
  4120. let fields = {};
  4121. function add(e) {
  4122. if (Array.isArray(e)) {
  4123. let _errors;
  4124. errors = (_errors = errors).concat.apply(_errors, e);
  4125. } else {
  4126. errors.push(e);
  4127. }
  4128. }
  4129. for (i = 0; i < results.length; i++) {
  4130. add(results[i]);
  4131. }
  4132. if (!errors.length) {
  4133. errors = null;
  4134. fields = null;
  4135. } else {
  4136. fields = convertFieldsError(errors);
  4137. }
  4138. callback(errors, fields);
  4139. }
  4140. if (options.messages) {
  4141. let messages$1 = this.messages();
  4142. if (messages$1 === messages) {
  4143. messages$1 = newMessages();
  4144. }
  4145. deepMerge$2(messages$1, options.messages);
  4146. options.messages = messages$1;
  4147. } else {
  4148. options.messages = this.messages();
  4149. }
  4150. let arr;
  4151. let value2;
  4152. const series = {};
  4153. const keys = options.keys || Object.keys(this.rules);
  4154. keys.forEach((z) => {
  4155. arr = _this.rules[z];
  4156. value2 = source[z];
  4157. arr.forEach((r) => {
  4158. let rule = r;
  4159. if (typeof rule.transform === "function") {
  4160. if (source === source_) {
  4161. source = { ...source };
  4162. }
  4163. value2 = source[z] = rule.transform(value2);
  4164. }
  4165. if (typeof rule === "function") {
  4166. rule = {
  4167. validator: rule
  4168. };
  4169. } else {
  4170. rule = { ...rule };
  4171. }
  4172. rule.validator = _this.getValidationMethod(rule);
  4173. rule.field = z;
  4174. rule.fullField = rule.fullField || z;
  4175. rule.type = _this.getType(rule);
  4176. if (!rule.validator) {
  4177. return;
  4178. }
  4179. series[z] = series[z] || [];
  4180. series[z].push({
  4181. rule,
  4182. value: value2,
  4183. source,
  4184. field: z
  4185. });
  4186. });
  4187. });
  4188. const errorFields = {};
  4189. return asyncMap(series, options, (data, doIt) => {
  4190. const { rule } = data;
  4191. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  4192. deep = deep && (rule.required || !rule.required && data.value);
  4193. rule.field = data.field;
  4194. function addFullfield(key, schema) {
  4195. return { ...schema, fullField: `${rule.fullField}.${key}` };
  4196. }
  4197. function cb(e) {
  4198. if (e === void 0) {
  4199. e = [];
  4200. }
  4201. let errors = e;
  4202. if (!Array.isArray(errors)) {
  4203. errors = [errors];
  4204. }
  4205. if (!options.suppressWarning && errors.length) {
  4206. Schema.warning("async-validator:", errors);
  4207. }
  4208. if (errors.length && rule.message) {
  4209. errors = [].concat(rule.message);
  4210. }
  4211. errors = errors.map(complementError(rule));
  4212. if (options.first && errors.length) {
  4213. errorFields[rule.field] = 1;
  4214. return doIt(errors);
  4215. }
  4216. if (!deep) {
  4217. doIt(errors);
  4218. } else {
  4219. if (rule.required && !data.value) {
  4220. if (rule.message) {
  4221. errors = [].concat(rule.message).map(complementError(rule));
  4222. } else if (options.error) {
  4223. errors = [options.error(rule, format(options.messages.required, rule.field))];
  4224. } else {
  4225. errors = [];
  4226. }
  4227. return doIt(errors);
  4228. }
  4229. let fieldsSchema = {};
  4230. if (rule.defaultField) {
  4231. for (const k in data.value) {
  4232. if (data.value.hasOwnProperty(k)) {
  4233. fieldsSchema[k] = rule.defaultField;
  4234. }
  4235. }
  4236. }
  4237. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  4238. for (const f in fieldsSchema) {
  4239. if (fieldsSchema.hasOwnProperty(f)) {
  4240. const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  4241. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  4242. }
  4243. }
  4244. const schema = new Schema(fieldsSchema);
  4245. schema.messages(options.messages);
  4246. if (data.rule.options) {
  4247. data.rule.options.messages = options.messages;
  4248. data.rule.options.error = options.error;
  4249. }
  4250. schema.validate(data.value, data.rule.options || options, (errs) => {
  4251. const finalErrors = [];
  4252. if (errors && errors.length) {
  4253. finalErrors.push.apply(finalErrors, errors);
  4254. }
  4255. if (errs && errs.length) {
  4256. finalErrors.push.apply(finalErrors, errs);
  4257. }
  4258. doIt(finalErrors.length ? finalErrors : null);
  4259. });
  4260. }
  4261. }
  4262. let res2;
  4263. if (rule.asyncValidator) {
  4264. res2 = rule.asyncValidator(rule, data.value, cb, data.source, options);
  4265. } else if (rule.validator) {
  4266. res2 = rule.validator(rule, data.value, cb, data.source, options);
  4267. if (res2 === true) {
  4268. cb();
  4269. } else if (res2 === false) {
  4270. cb(rule.message || `${rule.field} fails`);
  4271. } else if (res2 instanceof Array) {
  4272. cb(res2);
  4273. } else if (res2 instanceof Error) {
  4274. cb(res2.message);
  4275. }
  4276. }
  4277. if (res2 && res2.then) {
  4278. res2.then(() => cb(), (e) => cb(e));
  4279. }
  4280. }, (results) => {
  4281. complete(results);
  4282. });
  4283. },
  4284. getType: function getType(rule) {
  4285. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  4286. rule.type = "pattern";
  4287. }
  4288. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  4289. throw new Error(format("Unknown rule type %s", rule.type));
  4290. }
  4291. return rule.type || "string";
  4292. },
  4293. getValidationMethod: function getValidationMethod(rule) {
  4294. if (typeof rule.validator === "function") {
  4295. return rule.validator;
  4296. }
  4297. const keys = Object.keys(rule);
  4298. const messageIndex = keys.indexOf("message");
  4299. if (messageIndex !== -1) {
  4300. keys.splice(messageIndex, 1);
  4301. }
  4302. if (keys.length === 1 && keys[0] === "required") {
  4303. return validators.required;
  4304. }
  4305. return validators[this.getType(rule)] || false;
  4306. }
  4307. };
  4308. Schema.register = function register(type2, validator) {
  4309. if (typeof validator !== "function") {
  4310. throw new Error("Cannot register a validator by type, validator is not a function");
  4311. }
  4312. validators[type2] = validator;
  4313. };
  4314. Schema.warning = warning;
  4315. Schema.messages = messages;
  4316. Schema.warning = function() {
  4317. };
  4318. const _sfc_main$1Z = {
  4319. name: "u-form",
  4320. mixins: [mpMixin, mixin, props$x],
  4321. provide() {
  4322. return {
  4323. uForm: this
  4324. };
  4325. },
  4326. data() {
  4327. return {
  4328. formRules: {},
  4329. // 规则校验器
  4330. validator: {},
  4331. // 原始的model快照,用于resetFields方法重置表单时使用
  4332. originalModel: null
  4333. };
  4334. },
  4335. watch: {
  4336. // 监听规则的变化
  4337. rules: {
  4338. immediate: true,
  4339. handler(n) {
  4340. this.setRules(n);
  4341. }
  4342. },
  4343. // 监听属性的变化,通知子组件u-form-item重新获取信息
  4344. propsChange(n) {
  4345. var _a;
  4346. if ((_a = this.children) == null ? void 0 : _a.length) {
  4347. this.children.map((child) => {
  4348. typeof child.updateParentData == "function" && child.updateParentData();
  4349. });
  4350. }
  4351. },
  4352. // 监听model的初始值作为重置表单的快照
  4353. model: {
  4354. immediate: true,
  4355. handler(n) {
  4356. if (!this.originalModel) {
  4357. this.originalModel = uni.$u.deepClone(n);
  4358. }
  4359. }
  4360. }
  4361. },
  4362. computed: {
  4363. propsChange() {
  4364. return [
  4365. this.errorType,
  4366. this.borderBottom,
  4367. this.labelPosition,
  4368. this.labelWidth,
  4369. this.labelAlign,
  4370. this.labelStyle
  4371. ];
  4372. }
  4373. },
  4374. created() {
  4375. this.children = [];
  4376. },
  4377. methods: {
  4378. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  4379. setRules(rules2) {
  4380. if (Object.keys(rules2).length === 0)
  4381. return;
  4382. if (Object.keys(this.model).length === 0) {
  4383. uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。");
  4384. return;
  4385. }
  4386. this.formRules = rules2;
  4387. this.validator = new Schema(rules2);
  4388. },
  4389. // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
  4390. resetFields() {
  4391. this.resetModel();
  4392. },
  4393. // 重置model为初始值的快照
  4394. resetModel(obj) {
  4395. this.children.map((child) => {
  4396. const prop = child == null ? void 0 : child.prop;
  4397. const value2 = uni.$u.getProperty(this.originalModel, prop);
  4398. uni.$u.setProperty(this.model, prop, value2);
  4399. });
  4400. },
  4401. // 清空校验结果
  4402. clearValidate(props2) {
  4403. props2 = [].concat(props2);
  4404. this.children.map((child) => {
  4405. if (props2[0] === void 0 || props2.includes(child.prop)) {
  4406. child.message = null;
  4407. }
  4408. });
  4409. },
  4410. // 对部分表单字段进行校验
  4411. async validateField(value2, callback, event = null) {
  4412. this.$nextTick(() => {
  4413. const errorsRes = [];
  4414. value2 = [].concat(value2);
  4415. this.children.map((child) => {
  4416. const childErrors = [];
  4417. if (value2.includes(child.prop)) {
  4418. const propertyVal = uni.$u.getProperty(
  4419. this.model,
  4420. child.prop
  4421. );
  4422. const propertyChain = child.prop.split(".");
  4423. const propertyName = propertyChain[propertyChain.length - 1];
  4424. const rule = this.formRules[child.prop];
  4425. if (!rule)
  4426. return;
  4427. const rules2 = [].concat(rule);
  4428. for (let i = 0; i < rules2.length; i++) {
  4429. const ruleItem = rules2[i];
  4430. const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
  4431. if (event && !trigger.includes(event))
  4432. continue;
  4433. const validator = new Schema({
  4434. [propertyName]: ruleItem
  4435. });
  4436. validator.validate(
  4437. {
  4438. [propertyName]: propertyVal
  4439. },
  4440. (errors, fields) => {
  4441. var _a;
  4442. if (uni.$u.test.array(errors)) {
  4443. errorsRes.push(...errors);
  4444. childErrors.push(...errors);
  4445. }
  4446. child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null;
  4447. }
  4448. );
  4449. }
  4450. }
  4451. });
  4452. typeof callback === "function" && callback(errorsRes);
  4453. });
  4454. },
  4455. // 校验全部数据
  4456. validate(callback) {
  4457. if (Object.keys(this.formRules).length === 0) {
  4458. uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
  4459. return;
  4460. }
  4461. return new Promise((resolve, reject) => {
  4462. this.$nextTick(() => {
  4463. const formItemProps = this.children.map(
  4464. (item) => item.prop
  4465. );
  4466. this.validateField(formItemProps, (errors) => {
  4467. if (errors.length) {
  4468. this.errorType === "toast" && uni.$u.toast(errors[0].message);
  4469. reject(errors);
  4470. } else {
  4471. resolve(true);
  4472. }
  4473. });
  4474. });
  4475. });
  4476. }
  4477. }
  4478. };
  4479. function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) {
  4480. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
  4481. vue.renderSlot(_ctx.$slots, "default")
  4482. ]);
  4483. }
  4484. const __easycom_2$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  4485. const _sfc_main$1Y = {
  4486. name: "u--form",
  4487. mixins: [mpMixin, props$x, mixin],
  4488. components: {
  4489. uvForm: __easycom_2$6
  4490. },
  4491. created() {
  4492. this.children = [];
  4493. },
  4494. methods: {
  4495. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  4496. setRules(rules2) {
  4497. this.$refs.uForm.setRules(rules2);
  4498. },
  4499. validate() {
  4500. return this.$refs.uForm.validate();
  4501. },
  4502. validateField(value2, callback) {
  4503. return this.$refs.uForm.validateField(value2, callback);
  4504. },
  4505. resetFields() {
  4506. return this.$refs.uForm.resetFields();
  4507. },
  4508. clearValidate(props2) {
  4509. return this.$refs.uForm.clearValidate(props2);
  4510. },
  4511. setMpData() {
  4512. this.$refs.uForm.children = this.children;
  4513. }
  4514. }
  4515. };
  4516. function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
  4517. const _component_uvForm = vue.resolveComponent("uvForm");
  4518. return vue.openBlock(), vue.createBlock(_component_uvForm, {
  4519. ref: "uForm",
  4520. model: _ctx.model,
  4521. rules: _ctx.rules,
  4522. errorType: _ctx.errorType,
  4523. borderBottom: _ctx.borderBottom,
  4524. labelPosition: _ctx.labelPosition,
  4525. labelWidth: _ctx.labelWidth,
  4526. labelAlign: _ctx.labelAlign,
  4527. labelStyle: _ctx.labelStyle,
  4528. customStyle: _ctx.customStyle
  4529. }, {
  4530. default: vue.withCtx(() => [
  4531. vue.renderSlot(_ctx.$slots, "default")
  4532. ]),
  4533. _: 3
  4534. /* FORWARDED */
  4535. }, 8, ["model", "rules", "errorType", "borderBottom", "labelPosition", "labelWidth", "labelAlign", "labelStyle", "customStyle"]);
  4536. }
  4537. const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--form/u--form.vue"]]);
  4538. const _imports_0$3 = "/static/img/logo.png";
  4539. const prefixIconStyle = "font-size:50rpx";
  4540. const placeholderStyle$3 = "font-size:32rpx";
  4541. const _sfc_main$1X = {
  4542. __name: "login",
  4543. setup(__props, { expose: __expose }) {
  4544. __expose();
  4545. const customStyle = vue.reactive({
  4546. "font-size": "40rpx",
  4547. height: "90rpx"
  4548. });
  4549. let {
  4550. proxy
  4551. } = vue.getCurrentInstance();
  4552. const formData = vue.reactive({
  4553. username: "",
  4554. password: "",
  4555. code: ""
  4556. });
  4557. const uForm = vue.ref(null);
  4558. const isCountingDown = vue.ref(false);
  4559. const countdown = vue.ref(60);
  4560. const countDownText = vue.ref("获取验证码");
  4561. const startCountDown = () => {
  4562. isCountingDown.value = true;
  4563. countdown.value = 60;
  4564. countDownText.value = `${countdown.value}秒重发`;
  4565. const timer = setInterval(() => {
  4566. countdown.value--;
  4567. countDownText.value = `${countdown.value}秒重发`;
  4568. if (countdown.value <= 0) {
  4569. clearInterval(timer);
  4570. isCountingDown.value = false;
  4571. countDownText.value = "重新发送";
  4572. }
  4573. }, 1e3);
  4574. };
  4575. const getVerifyCode = () => {
  4576. if (isCountingDown.value)
  4577. return;
  4578. if (!formData.username)
  4579. return uni.$u.toast("请输入用户名");
  4580. if (!formData.password)
  4581. return uni.$u.toast("请输入密码");
  4582. let data = {
  4583. username: formData.username,
  4584. password: formData.password
  4585. };
  4586. uni.showLoading({
  4587. mask: true,
  4588. title: "发送中..."
  4589. });
  4590. uni.$u.http.post("/app/appUser/sendMobileCode", data).then((res2) => {
  4591. if (res2.code == 200) {
  4592. uni.showToast({
  4593. title: "验证码发送成功,请注意查收",
  4594. icon: "none"
  4595. });
  4596. startCountDown();
  4597. } else {
  4598. uni.$u.toast(res2.msg);
  4599. }
  4600. }).finally(() => uni.hideLoading());
  4601. };
  4602. const handleLogin = () => {
  4603. if (!formData.username)
  4604. return uni.$u.toast("请输入用户名");
  4605. if (!formData.password)
  4606. return uni.$u.toast("请输入密码");
  4607. uni.showLoading({
  4608. mask: true,
  4609. title: "登录中..."
  4610. });
  4611. uni.$u.http.post("/actuator/debug/loginNotCode", formData).then((res2) => {
  4612. if (res2.code == 200) {
  4613. uni.$u.toast("登录成功");
  4614. uni.switchTab({
  4615. url: "/pages/index/index"
  4616. });
  4617. uni.setStorageSync("token", res2.data);
  4618. getUserInfo();
  4619. uni.$u.ttsModule.speak("书嗨,不辜负每一个爱书的人");
  4620. } else {
  4621. uni.$u.toast(res2.msg);
  4622. }
  4623. }).finally(() => uni.hideLoading());
  4624. };
  4625. function getUserInfo() {
  4626. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  4627. if (res2.code == 200) {
  4628. uni.setStorageSync("userInfo", res2.data);
  4629. }
  4630. });
  4631. }
  4632. function checkToken() {
  4633. uni.showLoading({
  4634. title: "检测登录状态..."
  4635. });
  4636. uni.$u.http.get("/app/appUser/checkToken").then((res2) => {
  4637. if (res2.code == 200) {
  4638. uni.$u.toast("登录成功");
  4639. uni.switchTab({
  4640. url: "/pages/index/index"
  4641. });
  4642. } else {
  4643. uni.$u.toast("请先登录");
  4644. }
  4645. }).finally(() => uni.hideLoading());
  4646. }
  4647. onLoad(() => {
  4648. let token = uni.getStorageSync("token");
  4649. if (token) {
  4650. checkToken();
  4651. }
  4652. });
  4653. const __returned__ = { prefixIconStyle, placeholderStyle: placeholderStyle$3, customStyle, get proxy() {
  4654. return proxy;
  4655. }, set proxy(v) {
  4656. proxy = v;
  4657. }, formData, uForm, isCountingDown, countdown, countDownText, startCountDown, getVerifyCode, handleLogin, getUserInfo, checkToken, ref: vue.ref, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, get onLoad() {
  4658. return onLoad;
  4659. } };
  4660. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  4661. return __returned__;
  4662. }
  4663. };
  4664. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  4665. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  4666. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  4667. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  4668. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
  4669. return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
  4670. vue.createCommentVNode(" Logo和标题区域 "),
  4671. vue.createElementVNode("view", { class: "logo-section" }, [
  4672. vue.createElementVNode("image", {
  4673. class: "logo",
  4674. src: _imports_0$3,
  4675. mode: "aspectFit"
  4676. })
  4677. ]),
  4678. vue.createCommentVNode(" 表单区域 "),
  4679. vue.createElementVNode("view", { class: "form-section" }, [
  4680. vue.createVNode(_component_u__form, {
  4681. model: $setup.formData,
  4682. ref: "uForm"
  4683. }, {
  4684. default: vue.withCtx(() => [
  4685. vue.createVNode(_component_u_form_item, null, {
  4686. default: vue.withCtx(() => [
  4687. vue.createVNode(_component_u_input, {
  4688. prefixIconStyle: $setup.prefixIconStyle,
  4689. "placeholder-style": $setup.placeholderStyle,
  4690. "custom-style": $setup.customStyle,
  4691. modelValue: $setup.formData.username,
  4692. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.username = $event),
  4693. placeholder: "请输入用户名",
  4694. prefixIcon: "account"
  4695. }, null, 8, ["custom-style", "modelValue"])
  4696. ]),
  4697. _: 1
  4698. /* STABLE */
  4699. }),
  4700. vue.createVNode(_component_u_form_item, null, {
  4701. default: vue.withCtx(() => [
  4702. vue.createVNode(_component_u_input, {
  4703. prefixIconStyle: $setup.prefixIconStyle,
  4704. "placeholder-style": $setup.placeholderStyle,
  4705. "custom-style": $setup.customStyle,
  4706. modelValue: $setup.formData.password,
  4707. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.password = $event),
  4708. type: "password",
  4709. placeholder: "请输入密码",
  4710. prefixIcon: "lock"
  4711. }, null, 8, ["custom-style", "modelValue"])
  4712. ]),
  4713. _: 1
  4714. /* STABLE */
  4715. }),
  4716. vue.createVNode(_component_u_form_item, null, {
  4717. default: vue.withCtx(() => [
  4718. vue.createVNode(_component_u_input, {
  4719. prefixIconStyle: $setup.prefixIconStyle,
  4720. "placeholder-style": $setup.placeholderStyle,
  4721. "custom-style": $setup.customStyle,
  4722. modelValue: $setup.formData.code,
  4723. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.code = $event),
  4724. placeholder: "请输入验证码",
  4725. prefixIcon: "chat"
  4726. }, {
  4727. suffix: vue.withCtx(() => [
  4728. vue.createVNode(_component_u_button, {
  4729. "custom-style": "width:200rpx",
  4730. color: "#22ac38",
  4731. size: "small",
  4732. onClick: $setup.getVerifyCode,
  4733. disabled: $setup.isCountingDown
  4734. }, {
  4735. default: vue.withCtx(() => [
  4736. vue.createTextVNode(
  4737. vue.toDisplayString($setup.countDownText),
  4738. 1
  4739. /* TEXT */
  4740. )
  4741. ]),
  4742. _: 1
  4743. /* STABLE */
  4744. }, 8, ["disabled"])
  4745. ]),
  4746. _: 1
  4747. /* STABLE */
  4748. }, 8, ["custom-style", "modelValue"])
  4749. ]),
  4750. _: 1
  4751. /* STABLE */
  4752. })
  4753. ]),
  4754. _: 1
  4755. /* STABLE */
  4756. }, 8, ["model"]),
  4757. vue.createVNode(_component_u_button, {
  4758. "custom-style": "margin-top:5%",
  4759. type: "primary",
  4760. block: "",
  4761. onClick: $setup.handleLogin,
  4762. color: "#22ac38",
  4763. shape: "circle"
  4764. }, {
  4765. default: vue.withCtx(() => [
  4766. vue.createTextVNode("登录")
  4767. ]),
  4768. _: 1
  4769. /* STABLE */
  4770. })
  4771. ])
  4772. ]);
  4773. }
  4774. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-e4e4508d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/login/login.vue"]]);
  4775. const _sfc_main$1W = {
  4776. __name: "index",
  4777. setup(__props, { expose: __expose }) {
  4778. __expose();
  4779. const expressOperations = vue.ref([
  4780. {
  4781. name: "中转\n\r签收",
  4782. path: "/pages/index/express/transfer-sign",
  4783. type: "primary"
  4784. },
  4785. {
  4786. name: "到仓\n\r签收",
  4787. path: "/pages/index/express/warehouse-sign",
  4788. type: "warning"
  4789. },
  4790. {
  4791. name: "重量\n\r修改",
  4792. path: "/pages/index/express/weight-modify",
  4793. type: "primary"
  4794. },
  4795. {
  4796. name: "快递\n\r验收",
  4797. path: "/pages/index/express/quick-check",
  4798. type: "warning"
  4799. },
  4800. {
  4801. name: "路由签收\n\r异常",
  4802. path: "/pages/index/express/route-exception",
  4803. type: "primary"
  4804. },
  4805. {
  4806. name: "快递\n\r拆包",
  4807. path: "/pages/index/express/quick-unpack",
  4808. type: "warning"
  4809. }
  4810. ]);
  4811. const auditOperations = vue.ref([
  4812. {
  4813. name: "确认\n\r收货",
  4814. path: "/pages/index/audit/confirm-receipt",
  4815. type: "primary"
  4816. },
  4817. {
  4818. name: "扫书\n\r查单",
  4819. path: "/pages/index/audit/scan-order",
  4820. type: "warning"
  4821. },
  4822. {
  4823. name: "根据快递单\n\r或订单",
  4824. path: "/pages/index/audit/express-order",
  4825. type: "warning"
  4826. },
  4827. {
  4828. name: "根据\n\r发件人",
  4829. path: "/pages/index/audit/sender",
  4830. type: "primary"
  4831. }
  4832. ]);
  4833. const wmsOperations = vue.ref([
  4834. {
  4835. name: "中等\n\r入库",
  4836. path: "/pages/index/wms/medium-in",
  4837. type: "primary"
  4838. },
  4839. {
  4840. name: "良品\n\r入库",
  4841. path: "/pages/index/wms/good-in",
  4842. type: "warning"
  4843. },
  4844. {
  4845. name: "次品\n\r入库",
  4846. path: "/pages/index/wms/secondary-in",
  4847. type: "primary"
  4848. },
  4849. {
  4850. name: "不良\n\r入库",
  4851. path: "/pages/index/wms/bad-in",
  4852. type: "warning"
  4853. },
  4854. {
  4855. name: "不良\n\r出库",
  4856. path: "/pages/index/wms/bad-out",
  4857. type: "primary"
  4858. },
  4859. {
  4860. name: "不良\n\r下架",
  4861. path: "/pages/index/wms/bad-off",
  4862. type: "warning"
  4863. },
  4864. {
  4865. name: "订单\n\r查询",
  4866. path: "/pages/index/wms/order-query",
  4867. type: "primary"
  4868. },
  4869. {
  4870. name: "库位\n\r订单",
  4871. path: "/pages/index/wms/location-order",
  4872. type: "warning"
  4873. },
  4874. {
  4875. name: "快速盘点",
  4876. path: "/pages/index/wms/speedy-check",
  4877. type: "primary",
  4878. span: 24
  4879. }
  4880. ]);
  4881. const statisticsOperations = vue.ref([
  4882. {
  4883. name: "审核统计",
  4884. path: "/pages/index/statistic/audit",
  4885. type: "warning",
  4886. span: 24
  4887. },
  4888. {
  4889. name: "售后\n\r统计",
  4890. path: "/pages/index/statistic/after-sale",
  4891. type: "primary"
  4892. },
  4893. {
  4894. name: "打包\n\r统计",
  4895. path: "/pages/index/statistic/package",
  4896. type: "warning"
  4897. }
  4898. ]);
  4899. const offlineOperations = vue.ref([
  4900. {
  4901. name: "线下\n\r核单",
  4902. path: "/pages/index/offline/check-order",
  4903. type: "primary"
  4904. },
  4905. {
  4906. name: "核单\n\r记录",
  4907. path: "/pages/index/offline/check-record",
  4908. type: "warning"
  4909. }
  4910. ]);
  4911. const entryOperations = vue.ref([
  4912. {
  4913. name: "扫码\n\r查书",
  4914. path: "/pages/index/entry/scan-book",
  4915. type: "primary"
  4916. },
  4917. {
  4918. name: "录入\n\r书籍重量",
  4919. path: "/pages/index/entry/book-weight",
  4920. type: "warning"
  4921. }
  4922. ]);
  4923. const handleNavigation = (path) => {
  4924. uni.navigateTo({
  4925. url: path,
  4926. fail: () => {
  4927. uni.showToast({
  4928. title: "页面跳转失败",
  4929. icon: "none"
  4930. });
  4931. }
  4932. });
  4933. };
  4934. const __returned__ = { expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref };
  4935. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  4936. return __returned__;
  4937. }
  4938. };
  4939. function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
  4940. return vue.openBlock(), vue.createElementBlock("view", { class: "operation-container" }, [
  4941. vue.createCommentVNode(" 快递操作区域 "),
  4942. vue.createElementVNode("view", { class: "section" }, [
  4943. vue.createElementVNode("view", { class: "section-title" }, "快递"),
  4944. vue.createElementVNode("view", { class: "grid-container" }, [
  4945. (vue.openBlock(true), vue.createElementBlock(
  4946. vue.Fragment,
  4947. null,
  4948. vue.renderList($setup.expressOperations, (item, index2) => {
  4949. return vue.openBlock(), vue.createElementBlock("view", {
  4950. key: index2,
  4951. class: vue.normalizeClass(["grid-item", item.type]),
  4952. onClick: ($event) => $setup.handleNavigation(item.path)
  4953. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  4954. }),
  4955. 128
  4956. /* KEYED_FRAGMENT */
  4957. ))
  4958. ])
  4959. ]),
  4960. vue.createCommentVNode(" 审核操作区域 "),
  4961. vue.createElementVNode("view", { class: "section" }, [
  4962. vue.createElementVNode("view", { class: "section-title" }, "审核"),
  4963. vue.createElementVNode("view", { class: "grid-container" }, [
  4964. (vue.openBlock(true), vue.createElementBlock(
  4965. vue.Fragment,
  4966. null,
  4967. vue.renderList($setup.auditOperations, (item, index2) => {
  4968. return vue.openBlock(), vue.createElementBlock("view", {
  4969. key: index2,
  4970. class: vue.normalizeClass(["grid-item", item.type]),
  4971. onClick: ($event) => $setup.handleNavigation(item.path)
  4972. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  4973. }),
  4974. 128
  4975. /* KEYED_FRAGMENT */
  4976. ))
  4977. ])
  4978. ]),
  4979. vue.createCommentVNode(" 统计操作区域 "),
  4980. vue.createElementVNode("view", { class: "section" }, [
  4981. vue.createElementVNode("view", { class: "section-title" }, "统计"),
  4982. vue.createElementVNode("view", { class: "grid-container" }, [
  4983. (vue.openBlock(true), vue.createElementBlock(
  4984. vue.Fragment,
  4985. null,
  4986. vue.renderList($setup.statisticsOperations, (item, index2) => {
  4987. return vue.openBlock(), vue.createElementBlock("view", {
  4988. key: index2,
  4989. class: vue.normalizeClass(["grid-item", item.type]),
  4990. style: vue.normalizeStyle({ gridColumn: item.span ? "span 2" : "span 1" }),
  4991. onClick: ($event) => $setup.handleNavigation(item.path)
  4992. }, vue.toDisplayString(item.name), 15, ["onClick"]);
  4993. }),
  4994. 128
  4995. /* KEYED_FRAGMENT */
  4996. ))
  4997. ])
  4998. ]),
  4999. vue.createCommentVNode(" WMS操作区域 "),
  5000. vue.createElementVNode("view", { class: "section" }, [
  5001. vue.createElementVNode("view", { class: "section-title" }, "WMS操作"),
  5002. vue.createElementVNode("view", { class: "grid-container" }, [
  5003. (vue.openBlock(true), vue.createElementBlock(
  5004. vue.Fragment,
  5005. null,
  5006. vue.renderList($setup.wmsOperations, (item, index2) => {
  5007. return vue.openBlock(), vue.createElementBlock("view", {
  5008. key: index2,
  5009. class: vue.normalizeClass(["grid-item", item.type]),
  5010. style: vue.normalizeStyle({ gridColumn: item.span ? "span 2" : "span 1" }),
  5011. onClick: ($event) => $setup.handleNavigation(item.path)
  5012. }, vue.toDisplayString(item.name), 15, ["onClick"]);
  5013. }),
  5014. 128
  5015. /* KEYED_FRAGMENT */
  5016. ))
  5017. ])
  5018. ]),
  5019. vue.createCommentVNode(" 线下核单 "),
  5020. vue.createElementVNode("view", { class: "section" }, [
  5021. vue.createElementVNode("view", { class: "section-title" }, "线下核单"),
  5022. vue.createElementVNode("view", { class: "grid-container" }, [
  5023. (vue.openBlock(true), vue.createElementBlock(
  5024. vue.Fragment,
  5025. null,
  5026. vue.renderList($setup.offlineOperations, (item, index2) => {
  5027. return vue.openBlock(), vue.createElementBlock("view", {
  5028. key: index2,
  5029. class: vue.normalizeClass(["grid-item", item.type]),
  5030. onClick: ($event) => $setup.handleNavigation(item.path)
  5031. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  5032. }),
  5033. 128
  5034. /* KEYED_FRAGMENT */
  5035. ))
  5036. ])
  5037. ]),
  5038. vue.createCommentVNode(" 录入信息 "),
  5039. vue.createElementVNode("view", { class: "section" }, [
  5040. vue.createElementVNode("view", { class: "section-title" }, "录入信息"),
  5041. vue.createElementVNode("view", { class: "grid-container" }, [
  5042. (vue.openBlock(true), vue.createElementBlock(
  5043. vue.Fragment,
  5044. null,
  5045. vue.renderList($setup.entryOperations, (item, index2) => {
  5046. return vue.openBlock(), vue.createElementBlock("view", {
  5047. key: index2,
  5048. class: vue.normalizeClass(["grid-item", item.type]),
  5049. onClick: ($event) => $setup.handleNavigation(item.path)
  5050. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  5051. }),
  5052. 128
  5053. /* KEYED_FRAGMENT */
  5054. ))
  5055. ])
  5056. ])
  5057. ]);
  5058. }
  5059. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/index.vue"]]);
  5060. const props$w = {
  5061. props: {
  5062. // 文字颜色
  5063. color: {
  5064. type: String,
  5065. default: props$E.link.color
  5066. },
  5067. // 字体大小,单位px
  5068. fontSize: {
  5069. type: [String, Number],
  5070. default: props$E.link.fontSize
  5071. },
  5072. // 是否显示下划线
  5073. underLine: {
  5074. type: Boolean,
  5075. default: props$E.link.underLine
  5076. },
  5077. // 要跳转的链接
  5078. href: {
  5079. type: String,
  5080. default: props$E.link.href
  5081. },
  5082. // 小程序中复制到粘贴板的提示语
  5083. mpTips: {
  5084. type: String,
  5085. default: props$E.link.mpTips
  5086. },
  5087. // 下划线颜色
  5088. lineColor: {
  5089. type: String,
  5090. default: props$E.link.lineColor
  5091. },
  5092. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  5093. text: {
  5094. type: String,
  5095. default: props$E.link.text
  5096. }
  5097. }
  5098. };
  5099. const _sfc_main$1V = {
  5100. name: "u-link",
  5101. mixins: [mpMixin, mixin, props$w],
  5102. computed: {
  5103. linkStyle() {
  5104. const style = {
  5105. color: this.color,
  5106. fontSize: uni.$u.addUnit(this.fontSize),
  5107. // line-height设置为比字体大小多2px
  5108. lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
  5109. textDecoration: this.underLine ? "underline" : "none"
  5110. };
  5111. return style;
  5112. }
  5113. },
  5114. methods: {
  5115. openLink() {
  5116. plus.runtime.openURL(this.href);
  5117. this.$emit("click");
  5118. }
  5119. }
  5120. };
  5121. function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
  5122. return vue.openBlock(), vue.createElementBlock(
  5123. "text",
  5124. {
  5125. class: "u-link",
  5126. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
  5127. style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  5128. },
  5129. vue.toDisplayString(_ctx.text),
  5130. 5
  5131. /* TEXT, STYLE */
  5132. );
  5133. }
  5134. const __easycom_1$a = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-12f6646d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
  5135. const value = {
  5136. computed: {
  5137. // 经处理后需要显示的值
  5138. value() {
  5139. const {
  5140. text,
  5141. mode,
  5142. format: format2,
  5143. href
  5144. } = this;
  5145. if (mode === "price") {
  5146. if (!/^\d+(\.\d+)?$/.test(text)) {
  5147. uni.$u.error("金额模式下,text参数需要为金额格式");
  5148. }
  5149. if (uni.$u.test.func(format2)) {
  5150. return format2(text);
  5151. }
  5152. return uni.$u.priceFormat(text, 2);
  5153. }
  5154. if (mode === "date") {
  5155. !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
  5156. if (uni.$u.test.func(format2)) {
  5157. return format2(text);
  5158. }
  5159. if (format2) {
  5160. return uni.$u.timeFormat(text, format2);
  5161. }
  5162. return uni.$u.timeFormat(text, "yyyy-mm-dd");
  5163. }
  5164. if (mode === "phone") {
  5165. if (uni.$u.test.func(format2)) {
  5166. return format2(text);
  5167. }
  5168. if (format2 === "encrypt") {
  5169. return `${text.substr(0, 3)}****${text.substr(7)}`;
  5170. }
  5171. return text;
  5172. }
  5173. if (mode === "name") {
  5174. !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
  5175. if (uni.$u.test.func(format2)) {
  5176. return format2(text);
  5177. }
  5178. if (format2 === "encrypt") {
  5179. return this.formatName(text);
  5180. }
  5181. return text;
  5182. }
  5183. if (mode === "link") {
  5184. !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
  5185. return text;
  5186. }
  5187. return text;
  5188. }
  5189. },
  5190. methods: {
  5191. // 默认的姓名脱敏规则
  5192. formatName(name) {
  5193. let value2 = "";
  5194. if (name.length === 2) {
  5195. value2 = name.substr(0, 1) + "*";
  5196. } else if (name.length > 2) {
  5197. let char = "";
  5198. for (let i = 0, len = name.length - 2; i < len; i++) {
  5199. char += "*";
  5200. }
  5201. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  5202. } else {
  5203. value2 = name;
  5204. }
  5205. return value2;
  5206. }
  5207. }
  5208. };
  5209. const props$v = {
  5210. props: {
  5211. // 主题颜色
  5212. type: {
  5213. type: String,
  5214. default: props$E.text.type
  5215. },
  5216. // 是否显示
  5217. show: {
  5218. type: Boolean,
  5219. default: props$E.text.show
  5220. },
  5221. // 显示的值
  5222. text: {
  5223. type: [String, Number],
  5224. default: props$E.text.text
  5225. },
  5226. // 前置图标
  5227. prefixIcon: {
  5228. type: String,
  5229. default: props$E.text.prefixIcon
  5230. },
  5231. // 后置图标
  5232. suffixIcon: {
  5233. type: String,
  5234. default: props$E.text.suffixIcon
  5235. },
  5236. // 文本处理的匹配模式
  5237. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  5238. mode: {
  5239. type: String,
  5240. default: props$E.text.mode
  5241. },
  5242. // mode=link下,配置的链接
  5243. href: {
  5244. type: String,
  5245. default: props$E.text.href
  5246. },
  5247. // 格式化规则
  5248. format: {
  5249. type: [String, Function],
  5250. default: props$E.text.format
  5251. },
  5252. // mode=phone时,点击文本是否拨打电话
  5253. call: {
  5254. type: Boolean,
  5255. default: props$E.text.call
  5256. },
  5257. // 小程序的打开方式
  5258. openType: {
  5259. type: String,
  5260. default: props$E.text.openType
  5261. },
  5262. // 是否粗体,默认normal
  5263. bold: {
  5264. type: Boolean,
  5265. default: props$E.text.bold
  5266. },
  5267. // 是否块状
  5268. block: {
  5269. type: Boolean,
  5270. default: props$E.text.block
  5271. },
  5272. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  5273. lines: {
  5274. type: [String, Number],
  5275. default: props$E.text.lines
  5276. },
  5277. // 文本颜色
  5278. color: {
  5279. type: String,
  5280. default: props$E.text.color
  5281. },
  5282. // 字体大小
  5283. size: {
  5284. type: [String, Number],
  5285. default: props$E.text.size
  5286. },
  5287. // 图标的样式
  5288. iconStyle: {
  5289. type: [Object, String],
  5290. default: props$E.text.iconStyle
  5291. },
  5292. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  5293. decoration: {
  5294. tepe: String,
  5295. default: props$E.text.decoration
  5296. },
  5297. // 外边距,对象、字符串,数值形式均可
  5298. margin: {
  5299. type: [Object, String, Number],
  5300. default: props$E.text.margin
  5301. },
  5302. // 文本行高
  5303. lineHeight: {
  5304. type: [String, Number],
  5305. default: props$E.text.lineHeight
  5306. },
  5307. // 文本对齐方式,可选值left|center|right
  5308. align: {
  5309. type: String,
  5310. default: props$E.text.align
  5311. },
  5312. // 文字换行,可选值break-word|normal|anywhere
  5313. wordWrap: {
  5314. type: String,
  5315. default: props$E.text.wordWrap
  5316. }
  5317. }
  5318. };
  5319. const _sfc_main$1U = {
  5320. name: "u--text",
  5321. mixins: [mpMixin, mixin, value, props$v],
  5322. emits: ["click"],
  5323. computed: {
  5324. valueStyle() {
  5325. const style = {
  5326. textDecoration: this.decoration,
  5327. fontWeight: this.bold ? "bold" : "normal",
  5328. wordWrap: this.wordWrap,
  5329. fontSize: uni.$u.addUnit(this.size)
  5330. };
  5331. !this.type && (style.color = this.color);
  5332. this.isNvue && this.lines && (style.lines = this.lines);
  5333. this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
  5334. !this.isNvue && this.block && (style.display = "block");
  5335. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  5336. },
  5337. isNvue() {
  5338. let nvue = false;
  5339. return nvue;
  5340. },
  5341. isMp() {
  5342. let mp = false;
  5343. return mp;
  5344. }
  5345. },
  5346. data() {
  5347. return {};
  5348. },
  5349. methods: {
  5350. clickHandler() {
  5351. if (this.call && this.mode === "phone") {
  5352. uni.makePhoneCall({
  5353. phoneNumber: this.text
  5354. });
  5355. }
  5356. this.$emit("click");
  5357. }
  5358. }
  5359. };
  5360. function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
  5361. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5362. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$a);
  5363. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  5364. "view",
  5365. {
  5366. key: 0,
  5367. class: vue.normalizeClass(["u-text", []]),
  5368. style: vue.normalizeStyle({
  5369. margin: _ctx.margin,
  5370. justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
  5371. }),
  5372. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5373. },
  5374. [
  5375. _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
  5376. "text",
  5377. {
  5378. key: 0,
  5379. class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
  5380. style: vue.normalizeStyle([$options.valueStyle])
  5381. },
  5382. "¥",
  5383. 6
  5384. /* CLASS, STYLE */
  5385. )) : vue.createCommentVNode("v-if", true),
  5386. _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5387. key: 1,
  5388. class: "u-text__prefix-icon"
  5389. }, [
  5390. vue.createVNode(_component_u_icon, {
  5391. name: _ctx.prefixIcon,
  5392. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5393. }, null, 8, ["name", "customStyle"])
  5394. ])) : vue.createCommentVNode("v-if", true),
  5395. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
  5396. key: 2,
  5397. text: _ctx.value,
  5398. href: _ctx.href,
  5399. underLine: ""
  5400. }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
  5401. key: 3,
  5402. class: "u-reset-button u-text__value",
  5403. style: vue.normalizeStyle([$options.valueStyle]),
  5404. "data-index": _ctx.index,
  5405. openType: _ctx.openType,
  5406. onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
  5407. onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
  5408. onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
  5409. onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
  5410. onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
  5411. onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
  5412. lang: _ctx.lang,
  5413. "session-from": _ctx.sessionFrom,
  5414. "send-message-title": _ctx.sendMessageTitle,
  5415. "send-message-path": _ctx.sendMessagePath,
  5416. "send-message-img": _ctx.sendMessageImg,
  5417. "show-message-card": _ctx.showMessageCard,
  5418. "app-parameter": _ctx.appParameter
  5419. }, 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(
  5420. "text",
  5421. {
  5422. key: 4,
  5423. class: vue.normalizeClass(["u-text__value", [
  5424. _ctx.type && `u-text__value--${_ctx.type}`,
  5425. _ctx.lines && `u-line-${_ctx.lines}`
  5426. ]]),
  5427. style: vue.normalizeStyle([$options.valueStyle])
  5428. },
  5429. vue.toDisplayString(_ctx.value),
  5430. 7
  5431. /* TEXT, CLASS, STYLE */
  5432. )),
  5433. _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5434. key: 5,
  5435. class: "u-text__suffix-icon"
  5436. }, [
  5437. vue.createVNode(_component_u_icon, {
  5438. name: _ctx.suffixIcon,
  5439. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5440. }, null, 8, ["name", "customStyle"])
  5441. ])) : vue.createCommentVNode("v-if", true)
  5442. ],
  5443. 4
  5444. /* STYLE */
  5445. )) : vue.createCommentVNode("v-if", true);
  5446. }
  5447. const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-0a574502"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  5448. const _sfc_main$1T = {
  5449. name: "u--text",
  5450. mixins: [mpMixin, mixin, props$v],
  5451. components: {
  5452. uvText: __easycom_1$9
  5453. }
  5454. };
  5455. function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
  5456. const _component_uvText = vue.resolveComponent("uvText");
  5457. return vue.openBlock(), vue.createBlock(_component_uvText, {
  5458. type: _ctx.type,
  5459. show: _ctx.show,
  5460. text: _ctx.text,
  5461. prefixIcon: _ctx.prefixIcon,
  5462. suffixIcon: _ctx.suffixIcon,
  5463. mode: _ctx.mode,
  5464. href: _ctx.href,
  5465. format: _ctx.format,
  5466. call: _ctx.call,
  5467. openType: _ctx.openType,
  5468. bold: _ctx.bold,
  5469. block: _ctx.block,
  5470. lines: _ctx.lines,
  5471. color: _ctx.color,
  5472. decoration: _ctx.decoration,
  5473. size: _ctx.size,
  5474. iconStyle: _ctx.iconStyle,
  5475. margin: _ctx.margin,
  5476. lineHeight: _ctx.lineHeight,
  5477. align: _ctx.align,
  5478. wordWrap: _ctx.wordWrap,
  5479. customStyle: _ctx.customStyle
  5480. }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
  5481. }
  5482. const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
  5483. const props$u = {
  5484. props: {
  5485. // 头像图片路径(不能为相对路径)
  5486. src: {
  5487. type: String,
  5488. default: props$E.avatar.src
  5489. },
  5490. // 头像形状,circle-圆形,square-方形
  5491. shape: {
  5492. type: String,
  5493. default: props$E.avatar.shape
  5494. },
  5495. // 头像尺寸
  5496. size: {
  5497. type: [String, Number],
  5498. default: props$E.avatar.size
  5499. },
  5500. // 裁剪模式
  5501. mode: {
  5502. type: String,
  5503. default: props$E.avatar.mode
  5504. },
  5505. // 显示的文字
  5506. text: {
  5507. type: String,
  5508. default: props$E.avatar.text
  5509. },
  5510. // 背景色
  5511. bgColor: {
  5512. type: String,
  5513. default: props$E.avatar.bgColor
  5514. },
  5515. // 文字颜色
  5516. color: {
  5517. type: String,
  5518. default: props$E.avatar.color
  5519. },
  5520. // 文字大小
  5521. fontSize: {
  5522. type: [String, Number],
  5523. default: props$E.avatar.fontSize
  5524. },
  5525. // 显示的图标
  5526. icon: {
  5527. type: String,
  5528. default: props$E.avatar.icon
  5529. },
  5530. // 显示小程序头像,只对百度,微信,QQ小程序有效
  5531. mpAvatar: {
  5532. type: Boolean,
  5533. default: props$E.avatar.mpAvatar
  5534. },
  5535. // 是否使用随机背景色
  5536. randomBgColor: {
  5537. type: Boolean,
  5538. default: props$E.avatar.randomBgColor
  5539. },
  5540. // 加载失败的默认头像(组件有内置默认图片)
  5541. defaultUrl: {
  5542. type: String,
  5543. default: props$E.avatar.defaultUrl
  5544. },
  5545. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  5546. colorIndex: {
  5547. type: [String, Number],
  5548. // 校验参数规则,索引在0-19之间
  5549. validator(n) {
  5550. return uni.$u.test.range(n, [0, 19]) || n === "";
  5551. },
  5552. default: props$E.avatar.colorIndex
  5553. },
  5554. // 组件标识符
  5555. name: {
  5556. type: String,
  5557. default: props$E.avatar.name
  5558. }
  5559. }
  5560. };
  5561. 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";
  5562. const _sfc_main$1S = {
  5563. name: "u-avatar",
  5564. mixins: [mpMixin, mixin, props$u],
  5565. data() {
  5566. return {
  5567. // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
  5568. colors: [
  5569. "#ffb34b",
  5570. "#f2bba9",
  5571. "#f7a196",
  5572. "#f18080",
  5573. "#88a867",
  5574. "#bfbf39",
  5575. "#89c152",
  5576. "#94d554",
  5577. "#f19ec2",
  5578. "#afaae4",
  5579. "#e1b0df",
  5580. "#c38cc1",
  5581. "#72dcdc",
  5582. "#9acdcb",
  5583. "#77b1cc",
  5584. "#448aca",
  5585. "#86cefa",
  5586. "#98d1ee",
  5587. "#73d1f1",
  5588. "#80a7dc"
  5589. ],
  5590. avatarUrl: this.src,
  5591. allowMp: false
  5592. };
  5593. },
  5594. watch: {
  5595. // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
  5596. // 而组件内部不能直接修改props的值,所以需要一个中间变量
  5597. src: {
  5598. immediate: true,
  5599. handler(newVal) {
  5600. this.avatarUrl = newVal;
  5601. if (!newVal) {
  5602. this.errorHandler();
  5603. }
  5604. }
  5605. }
  5606. },
  5607. computed: {
  5608. imageStyle() {
  5609. const style = {};
  5610. return style;
  5611. }
  5612. },
  5613. created() {
  5614. this.init();
  5615. },
  5616. methods: {
  5617. init() {
  5618. },
  5619. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  5620. isImg() {
  5621. return this.src.indexOf("/") !== -1;
  5622. },
  5623. // 图片加载时失败时触发
  5624. errorHandler() {
  5625. this.avatarUrl = this.defaultUrl || base64Avatar;
  5626. },
  5627. clickHandler() {
  5628. this.$emit("click", this.name);
  5629. }
  5630. }
  5631. };
  5632. function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
  5633. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5634. const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_1$8);
  5635. return vue.openBlock(), vue.createElementBlock(
  5636. "view",
  5637. {
  5638. class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]),
  5639. style: vue.normalizeStyle([{
  5640. backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : _ctx.$u.random(0, 19)] : _ctx.bgColor : "transparent",
  5641. width: _ctx.$u.addUnit(_ctx.size),
  5642. height: _ctx.$u.addUnit(_ctx.size)
  5643. }, _ctx.$u.addStyle(_ctx.customStyle)]),
  5644. onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5645. },
  5646. [
  5647. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  5648. _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock(
  5649. vue.Fragment,
  5650. { key: 0 },
  5651. [],
  5652. 64
  5653. /* STABLE_FRAGMENT */
  5654. )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5655. key: 1,
  5656. name: _ctx.icon,
  5657. size: _ctx.fontSize,
  5658. color: _ctx.color
  5659. }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_u__text, {
  5660. key: 2,
  5661. text: _ctx.text,
  5662. size: _ctx.fontSize,
  5663. color: _ctx.color,
  5664. align: "center",
  5665. customStyle: "justify-content: center"
  5666. }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  5667. key: 3,
  5668. class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]),
  5669. src: $data.avatarUrl || _ctx.defaultUrl,
  5670. mode: _ctx.mode,
  5671. onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)),
  5672. style: vue.normalizeStyle([{
  5673. width: _ctx.$u.addUnit(_ctx.size),
  5674. height: _ctx.$u.addUnit(_ctx.size)
  5675. }])
  5676. }, null, 46, ["src", "mode"]))
  5677. ], true)
  5678. ],
  5679. 6
  5680. /* CLASS, STYLE */
  5681. );
  5682. }
  5683. const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-34d954f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
  5684. const props$t = {
  5685. props: {
  5686. // 标题
  5687. title: {
  5688. type: [String, Number],
  5689. default: props$E.cell.title
  5690. },
  5691. // 标题下方的描述信息
  5692. label: {
  5693. type: [String, Number],
  5694. default: props$E.cell.label
  5695. },
  5696. // 右侧的内容
  5697. value: {
  5698. type: [String, Number],
  5699. default: props$E.cell.value
  5700. },
  5701. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  5702. icon: {
  5703. type: String,
  5704. default: props$E.cell.icon
  5705. },
  5706. // 是否禁用cell
  5707. disabled: {
  5708. type: Boolean,
  5709. default: props$E.cell.disabled
  5710. },
  5711. // 是否显示下边框
  5712. border: {
  5713. type: Boolean,
  5714. default: props$E.cell.border
  5715. },
  5716. // 内容是否垂直居中(主要是针对右侧的value部分)
  5717. center: {
  5718. type: Boolean,
  5719. default: props$E.cell.center
  5720. },
  5721. // 点击后跳转的URL地址
  5722. url: {
  5723. type: String,
  5724. default: props$E.cell.url
  5725. },
  5726. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  5727. linkType: {
  5728. type: String,
  5729. default: props$E.cell.linkType
  5730. },
  5731. // 是否开启点击反馈(表现为点击时加上灰色背景)
  5732. clickable: {
  5733. type: Boolean,
  5734. default: props$E.cell.clickable
  5735. },
  5736. // 是否展示右侧箭头并开启点击反馈
  5737. isLink: {
  5738. type: Boolean,
  5739. default: props$E.cell.isLink
  5740. },
  5741. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  5742. required: {
  5743. type: Boolean,
  5744. default: props$E.cell.required
  5745. },
  5746. // 右侧的图标箭头
  5747. rightIcon: {
  5748. type: String,
  5749. default: props$E.cell.rightIcon
  5750. },
  5751. // 右侧箭头的方向,可选值为:left,up,down
  5752. arrowDirection: {
  5753. type: String,
  5754. default: props$E.cell.arrowDirection
  5755. },
  5756. // 左侧图标样式
  5757. iconStyle: {
  5758. type: [Object, String],
  5759. default: () => {
  5760. return uni.$u.props.cell.iconStyle;
  5761. }
  5762. },
  5763. // 右侧箭头图标的样式
  5764. rightIconStyle: {
  5765. type: [Object, String],
  5766. default: () => {
  5767. return uni.$u.props.cell.rightIconStyle;
  5768. }
  5769. },
  5770. // 标题的样式
  5771. titleStyle: {
  5772. type: [Object, String],
  5773. default: () => {
  5774. return uni.$u.props.cell.titleStyle;
  5775. }
  5776. },
  5777. // 单位元的大小,可选值为large
  5778. size: {
  5779. type: String,
  5780. default: props$E.cell.size
  5781. },
  5782. // 点击cell是否阻止事件传播
  5783. stop: {
  5784. type: Boolean,
  5785. default: props$E.cell.stop
  5786. },
  5787. // 标识符,cell被点击时返回
  5788. name: {
  5789. type: [Number, String],
  5790. default: props$E.cell.name
  5791. }
  5792. }
  5793. };
  5794. const _sfc_main$1R = {
  5795. name: "u-cell",
  5796. data() {
  5797. return {};
  5798. },
  5799. mixins: [mpMixin, mixin, props$t],
  5800. computed: {
  5801. titleTextStyle() {
  5802. return uni.$u.addStyle(this.titleStyle);
  5803. }
  5804. },
  5805. emits: ["click"],
  5806. methods: {
  5807. // 点击cell
  5808. clickHandler(e) {
  5809. if (this.disabled)
  5810. return;
  5811. this.$emit("click", {
  5812. name: this.name
  5813. });
  5814. this.openPage();
  5815. this.stop && this.preventEvent(e);
  5816. }
  5817. }
  5818. };
  5819. function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
  5820. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5821. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  5822. return vue.openBlock(), vue.createElementBlock("view", {
  5823. class: vue.normalizeClass(["u-cell", [_ctx.customClass]]),
  5824. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5825. "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
  5826. "hover-stay-time": 250,
  5827. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5828. }, [
  5829. vue.createElementVNode(
  5830. "view",
  5831. {
  5832. class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]])
  5833. },
  5834. [
  5835. vue.createElementVNode("view", { class: "u-cell__body__content" }, [
  5836. vue.createElementVNode("view", { class: "u-cell__left-icon-wrap" }, [
  5837. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  5838. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5839. key: 0,
  5840. name: _ctx.icon,
  5841. "custom-style": _ctx.iconStyle,
  5842. size: _ctx.size === "large" ? 22 : 18
  5843. }, null, 8, ["name", "custom-style", "size"])) : vue.createCommentVNode("v-if", true)
  5844. ], true)
  5845. ]),
  5846. vue.createElementVNode("view", { class: "u-cell__title" }, [
  5847. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5848. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  5849. "text",
  5850. {
  5851. key: 0,
  5852. class: vue.normalizeClass(["u-cell__title-text", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]),
  5853. style: vue.normalizeStyle([$options.titleTextStyle])
  5854. },
  5855. vue.toDisplayString(_ctx.title),
  5856. 7
  5857. /* TEXT, CLASS, STYLE */
  5858. )) : vue.createCommentVNode("v-if", true)
  5859. ], true),
  5860. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  5861. _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  5862. "text",
  5863. {
  5864. key: 0,
  5865. class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]])
  5866. },
  5867. vue.toDisplayString(_ctx.label),
  5868. 3
  5869. /* TEXT, CLASS */
  5870. )) : vue.createCommentVNode("v-if", true)
  5871. ], true)
  5872. ])
  5873. ]),
  5874. vue.renderSlot(_ctx.$slots, "value", {}, () => [
  5875. !_ctx.$u.test.empty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock(
  5876. "text",
  5877. {
  5878. key: 0,
  5879. class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]])
  5880. },
  5881. vue.toDisplayString(_ctx.value),
  5882. 3
  5883. /* TEXT, CLASS */
  5884. )) : vue.createCommentVNode("v-if", true)
  5885. ], true),
  5886. vue.createElementVNode(
  5887. "view",
  5888. {
  5889. class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
  5890. },
  5891. [
  5892. vue.renderSlot(_ctx.$slots, "right-icon", {}, () => [
  5893. _ctx.isLink ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5894. key: 0,
  5895. name: _ctx.rightIcon,
  5896. "custom-style": _ctx.rightIconStyle,
  5897. color: _ctx.disabled ? "#c8c9cc" : "info",
  5898. size: _ctx.size === "large" ? 18 : 16
  5899. }, null, 8, ["name", "custom-style", "color", "size"])) : vue.createCommentVNode("v-if", true)
  5900. ], true)
  5901. ],
  5902. 2
  5903. /* CLASS */
  5904. )
  5905. ],
  5906. 2
  5907. /* CLASS */
  5908. ),
  5909. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  5910. ], 14, ["hover-class"]);
  5911. }
  5912. const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-3fd6feca"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
  5913. const props$s = {
  5914. props: {
  5915. // 分组标题
  5916. title: {
  5917. type: String,
  5918. default: props$E.cellGroup.title
  5919. },
  5920. // 是否显示外边框
  5921. border: {
  5922. type: Boolean,
  5923. default: props$E.cellGroup.border
  5924. }
  5925. }
  5926. };
  5927. const _sfc_main$1Q = {
  5928. name: "u-cell-group",
  5929. mixins: [mpMixin, mixin, props$s]
  5930. };
  5931. function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
  5932. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  5933. return vue.openBlock(), vue.createElementBlock(
  5934. "view",
  5935. {
  5936. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5937. class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"])
  5938. },
  5939. [
  5940. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  5941. key: 0,
  5942. class: "u-cell-group__title"
  5943. }, [
  5944. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5945. vue.createElementVNode(
  5946. "text",
  5947. { class: "u-cell-group__title__text" },
  5948. vue.toDisplayString(_ctx.title),
  5949. 1
  5950. /* TEXT */
  5951. )
  5952. ], true)
  5953. ])) : vue.createCommentVNode("v-if", true),
  5954. vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [
  5955. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  5956. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  5957. ])
  5958. ],
  5959. 6
  5960. /* CLASS, STYLE */
  5961. );
  5962. }
  5963. const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-014d39dc"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
  5964. const _sfc_main$1P = {
  5965. __name: "my",
  5966. setup(__props, { expose: __expose }) {
  5967. __expose();
  5968. let defaultAvatar = "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png";
  5969. const settingsList = vue.ref([
  5970. {
  5971. title: "用户信息",
  5972. path: "/pages/my/page/user-info"
  5973. },
  5974. {
  5975. title: "默认仓库",
  5976. path: "/pages/my/page/warehouse"
  5977. },
  5978. {
  5979. title: "学校设置",
  5980. path: "/pages/my/page/school"
  5981. },
  5982. {
  5983. title: "审核未完成",
  5984. path: "/pages/my/page/audit-unfinished"
  5985. },
  5986. {
  5987. title: "版本设置",
  5988. path: "/pages/my/page/version",
  5989. icon: "tags"
  5990. },
  5991. {
  5992. title: "音频设置",
  5993. path: "/pages/my/page/volume"
  5994. },
  5995. {
  5996. title: "图书显示设置",
  5997. path: "/pages/my/page/book-display"
  5998. },
  5999. {
  6000. title: "修改密码",
  6001. icon: "lock",
  6002. path: "/pages/my/page/password"
  6003. },
  6004. {
  6005. title: "退出账号",
  6006. path: "/pages/my/page/logout",
  6007. type: "logout"
  6008. }
  6009. ]);
  6010. const greeting = vue.ref("");
  6011. const updateGreeting = () => {
  6012. const hour = (/* @__PURE__ */ new Date()).getHours();
  6013. if (hour >= 5 && hour < 12) {
  6014. greeting.value = "早上好";
  6015. } else if (hour >= 12 && hour < 14) {
  6016. greeting.value = "中午好";
  6017. } else if (hour >= 14 && hour < 18) {
  6018. greeting.value = "下午好";
  6019. } else if (hour >= 18 && hour < 22) {
  6020. greeting.value = "晚上好";
  6021. } else {
  6022. greeting.value = "夜深了";
  6023. }
  6024. };
  6025. const userName = vue.ref("-");
  6026. const avatar = vue.ref("");
  6027. function getUserInfo() {
  6028. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  6029. if (res2.code == 200) {
  6030. userName.value = res2.data.userName;
  6031. avatar.value = res2.data.avatar;
  6032. }
  6033. });
  6034. }
  6035. onLoad(() => {
  6036. updateGreeting();
  6037. setInterval(updateGreeting, 60 * 60 * 1e3);
  6038. getUserInfo();
  6039. });
  6040. const handleClick = (item) => {
  6041. if (item.type === "logout") {
  6042. uni.showModal({
  6043. title: "提示",
  6044. content: "确定要退出登录吗?",
  6045. success: (res2) => {
  6046. if (res2.confirm) {
  6047. uni.clearStorageSync();
  6048. uni.reLaunch({
  6049. url: "/pages/login/login"
  6050. });
  6051. }
  6052. }
  6053. });
  6054. return;
  6055. }
  6056. uni.navigateTo({
  6057. url: item.path
  6058. });
  6059. };
  6060. const __returned__ = { get defaultAvatar() {
  6061. return defaultAvatar;
  6062. }, set defaultAvatar(v) {
  6063. defaultAvatar = v;
  6064. }, settingsList, greeting, updateGreeting, userName, avatar, getUserInfo, handleClick, ref: vue.ref, onMounted: vue.onMounted, get onLoad() {
  6065. return onLoad;
  6066. } };
  6067. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  6068. return __returned__;
  6069. }
  6070. };
  6071. function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
  6072. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  6073. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  6074. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  6075. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  6076. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-page" }, [
  6077. vue.createCommentVNode(" 顶部用户信息 "),
  6078. vue.createElementVNode("view", { class: "user-header" }, [
  6079. vue.createElementVNode("view", { class: "user-info" }, [
  6080. vue.createVNode(_component_u_avatar, {
  6081. size: 60,
  6082. src: $setup.avatar || $setup.defaultAvatar
  6083. }, null, 8, ["src"]),
  6084. vue.createElementVNode("view", { class: "greeting" }, [
  6085. vue.createElementVNode(
  6086. "text",
  6087. { class: "time" },
  6088. vue.toDisplayString($setup.greeting) + "!",
  6089. 1
  6090. /* TEXT */
  6091. ),
  6092. vue.createElementVNode(
  6093. "text",
  6094. { class: "name" },
  6095. vue.toDisplayString($setup.userName),
  6096. 1
  6097. /* TEXT */
  6098. )
  6099. ])
  6100. ])
  6101. ]),
  6102. vue.createCommentVNode(" 设置列表 "),
  6103. vue.createElementVNode("view", { class: "settings-list" }, [
  6104. vue.createVNode(_component_u_cell_group, { border: false }, {
  6105. default: vue.withCtx(() => [
  6106. (vue.openBlock(true), vue.createElementBlock(
  6107. vue.Fragment,
  6108. null,
  6109. vue.renderList($setup.settingsList, (item, index2) => {
  6110. return vue.openBlock(), vue.createBlock(_component_u_cell, {
  6111. key: index2,
  6112. title: item.title,
  6113. isLink: true,
  6114. onClick: ($event) => $setup.handleClick(item),
  6115. border: index2 == $setup.settingsList.length - 1 ? false : true
  6116. }, {
  6117. icon: vue.withCtx(() => [
  6118. vue.createElementVNode("view", { class: "cell-icon" }, [
  6119. vue.createVNode(_component_u_icon, {
  6120. name: item.icon || "setting",
  6121. size: "22",
  6122. color: "#333"
  6123. }, null, 8, ["name"])
  6124. ])
  6125. ]),
  6126. _: 2
  6127. /* DYNAMIC */
  6128. }, 1032, ["title", "onClick", "border"]);
  6129. }),
  6130. 128
  6131. /* KEYED_FRAGMENT */
  6132. ))
  6133. ]),
  6134. _: 1
  6135. /* STABLE */
  6136. })
  6137. ])
  6138. ]);
  6139. }
  6140. const PagesMyMy = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-2f1ef635"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/my.vue"]]);
  6141. const GlobalOption = {
  6142. down: {
  6143. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  6144. offset: 80,
  6145. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  6146. native: false
  6147. // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  6148. },
  6149. up: {
  6150. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  6151. offset: 150,
  6152. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  6153. toTop: {
  6154. // 回到顶部按钮,需配置src才显示
  6155. src: "https://www.mescroll.com/img/mescroll-totop.png",
  6156. // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  6157. offset: 1e3,
  6158. // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  6159. right: 20,
  6160. // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6161. bottom: 120,
  6162. // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6163. width: 72
  6164. // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6165. },
  6166. empty: {
  6167. use: true,
  6168. // 是否显示空布局
  6169. icon: "https://www.mescroll.com/img/mescroll-empty.png"
  6170. // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  6171. }
  6172. },
  6173. // 国际化配置
  6174. i18n: {
  6175. // 中文
  6176. zh: {
  6177. down: {
  6178. textInOffset: "下拉刷新",
  6179. // 下拉的距离在offset范围内的提示文本
  6180. textOutOffset: "释放更新",
  6181. // 下拉的距离大于offset范围的提示文本
  6182. textLoading: "加载中 ...",
  6183. // 加载中的提示文本
  6184. textSuccess: "加载成功",
  6185. // 加载成功的文本
  6186. textErr: "加载失败"
  6187. // 加载失败的文本
  6188. },
  6189. up: {
  6190. textLoading: "加载中 ...",
  6191. // 加载中的提示文本
  6192. textNoMore: "-- END --",
  6193. // 没有更多数据的提示文本
  6194. empty: {
  6195. tip: "暂无数据"
  6196. // 空提示
  6197. }
  6198. }
  6199. },
  6200. // 英文
  6201. en: {
  6202. down: {
  6203. textInOffset: "drop down refresh",
  6204. textOutOffset: "release updates",
  6205. textLoading: "loading ...",
  6206. textSuccess: "loaded successfully",
  6207. textErr: "loading failed"
  6208. },
  6209. up: {
  6210. textLoading: "loading ...",
  6211. textNoMore: "-- END --",
  6212. empty: {
  6213. tip: "~ absolutely empty ~"
  6214. }
  6215. }
  6216. }
  6217. }
  6218. };
  6219. const mescrollI18n = {
  6220. // 默认语言
  6221. def: "zh",
  6222. // 获取当前语言类型
  6223. getType() {
  6224. return uni.getStorageSync("mescroll-i18n") || this.def;
  6225. },
  6226. // 设置当前语言类型
  6227. setType(type2) {
  6228. uni.setStorageSync("mescroll-i18n", type2);
  6229. }
  6230. };
  6231. const _imports_0$2 = "/assets/no-result.6af066e5.png";
  6232. const _sfc_main$1O = {
  6233. props: {
  6234. // empty的配置项: 默认为GlobalOption.up.empty
  6235. option: {
  6236. type: Object,
  6237. default() {
  6238. return {};
  6239. }
  6240. }
  6241. },
  6242. // 使用computed获取配置,用于支持option的动态配置
  6243. computed: {
  6244. // 图标
  6245. icon() {
  6246. if (this.option.icon != null) {
  6247. return this.option.icon;
  6248. } else {
  6249. let i18nType = mescrollI18n.getType();
  6250. if (this.option.i18n) {
  6251. return this.option.i18n[i18nType].icon;
  6252. } else {
  6253. return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
  6254. }
  6255. }
  6256. },
  6257. // 文本提示
  6258. tip() {
  6259. if (this.option.tip != null) {
  6260. return this.option.tip;
  6261. } else {
  6262. let i18nType = mescrollI18n.getType();
  6263. if (this.option.i18n) {
  6264. return this.option.i18n[i18nType].tip;
  6265. } else {
  6266. return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
  6267. }
  6268. }
  6269. },
  6270. // 按钮文本
  6271. btnText() {
  6272. if (this.option.i18n) {
  6273. let i18nType = mescrollI18n.getType();
  6274. return this.option.i18n[i18nType].btnText;
  6275. } else {
  6276. return this.option.btnText;
  6277. }
  6278. }
  6279. },
  6280. methods: {
  6281. // 点击按钮
  6282. emptyClick() {
  6283. this.$emit("emptyclick");
  6284. }
  6285. }
  6286. };
  6287. function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
  6288. return vue.openBlock(), vue.createElementBlock(
  6289. "view",
  6290. {
  6291. class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
  6292. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
  6293. },
  6294. [
  6295. vue.createCommentVNode(' <view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view> '),
  6296. vue.createElementVNode("view", null, [
  6297. $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  6298. key: 0,
  6299. class: "empty-icon",
  6300. src: _imports_0$2,
  6301. mode: "widthFix"
  6302. })) : vue.createCommentVNode("v-if", true)
  6303. ]),
  6304. $options.tip ? (vue.openBlock(), vue.createElementBlock(
  6305. "view",
  6306. {
  6307. key: 0,
  6308. class: "empty-tip"
  6309. },
  6310. vue.toDisplayString($options.tip),
  6311. 1
  6312. /* TEXT */
  6313. )) : vue.createCommentVNode("v-if", true),
  6314. $options.btnText ? (vue.openBlock(), vue.createElementBlock(
  6315. "view",
  6316. {
  6317. key: 1,
  6318. class: "empty-btn",
  6319. onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
  6320. },
  6321. vue.toDisplayString($options.btnText),
  6322. 1
  6323. /* TEXT */
  6324. )) : vue.createCommentVNode("v-if", true)
  6325. ],
  6326. 6
  6327. /* CLASS, STYLE */
  6328. );
  6329. }
  6330. const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-7cefd855"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]);
  6331. function MeScroll(options, isScrollBody) {
  6332. let me = this;
  6333. me.version = "1.3.7";
  6334. me.options = options || {};
  6335. me.isScrollBody = isScrollBody || false;
  6336. me.isDownScrolling = false;
  6337. me.isUpScrolling = false;
  6338. let hasDownCallback = me.options.down && me.options.down.callback;
  6339. me.initDownScroll();
  6340. me.initUpScroll();
  6341. setTimeout(function() {
  6342. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  6343. if (me.optDown.autoShowLoading) {
  6344. me.triggerDownScroll();
  6345. } else {
  6346. me.optDown.callback && me.optDown.callback(me);
  6347. }
  6348. }
  6349. if (!me.isUpAutoLoad) {
  6350. setTimeout(function() {
  6351. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  6352. }, 100);
  6353. }
  6354. }, 30);
  6355. }
  6356. MeScroll.prototype.extendDownScroll = function(optDown) {
  6357. MeScroll.extend(optDown, {
  6358. use: true,
  6359. // 是否启用下拉刷新; 默认true
  6360. auto: true,
  6361. // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  6362. native: false,
  6363. // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  6364. autoShowLoading: false,
  6365. // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  6366. isLock: false,
  6367. // 是否锁定下拉刷新,默认false;
  6368. offset: 80,
  6369. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  6370. startTop: 100,
  6371. // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  6372. inOffsetRate: 1,
  6373. // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  6374. outOffsetRate: 0.2,
  6375. // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  6376. bottomOffset: 20,
  6377. // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  6378. minAngle: 45,
  6379. // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  6380. textInOffset: "下拉刷新",
  6381. // 下拉的距离在offset范围内的提示文本
  6382. textOutOffset: "释放更新",
  6383. // 下拉的距离大于offset范围的提示文本
  6384. textLoading: "加载中 ...",
  6385. // 加载中的提示文本
  6386. textSuccess: "加载成功",
  6387. // 加载成功的文本
  6388. textErr: "加载失败",
  6389. // 加载失败的文本
  6390. beforeEndDelay: 0,
  6391. // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
  6392. bgColor: "transparent",
  6393. // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  6394. textColor: "gray",
  6395. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  6396. inited: null,
  6397. // 下拉刷新初始化完毕的回调
  6398. inOffset: null,
  6399. // 下拉的距离进入offset范围内那一刻的回调
  6400. outOffset: null,
  6401. // 下拉的距离大于offset那一刻的回调
  6402. onMoving: null,
  6403. // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  6404. beforeLoading: null,
  6405. // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  6406. showLoading: null,
  6407. // 显示下拉刷新进度的回调
  6408. afterLoading: null,
  6409. // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  6410. beforeEndDownScroll: null,
  6411. // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  6412. endDownScroll: null,
  6413. // 结束下拉刷新的回调
  6414. afterEndDownScroll: null,
  6415. // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  6416. callback: function(mescroll) {
  6417. mescroll.resetUpScroll();
  6418. }
  6419. });
  6420. };
  6421. MeScroll.prototype.extendUpScroll = function(optUp) {
  6422. MeScroll.extend(optUp, {
  6423. use: true,
  6424. // 是否启用上拉加载; 默认true
  6425. auto: true,
  6426. // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  6427. isLock: false,
  6428. // 是否锁定上拉加载,默认false;
  6429. isBoth: true,
  6430. // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  6431. callback: null,
  6432. // 上拉加载的回调;function(page,mescroll){ }
  6433. page: {
  6434. num: 0,
  6435. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  6436. size: 10,
  6437. // 每页数据的数量
  6438. time: null
  6439. // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  6440. },
  6441. noMoreSize: 5,
  6442. // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  6443. offset: 150,
  6444. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  6445. textLoading: "加载中 ...",
  6446. // 加载中的提示文本
  6447. textNoMore: "-- END --",
  6448. // 没有更多数据的提示文本
  6449. bgColor: "transparent",
  6450. // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  6451. textColor: "gray",
  6452. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  6453. inited: null,
  6454. // 初始化完毕的回调
  6455. showLoading: null,
  6456. // 显示加载中的回调
  6457. showNoMore: null,
  6458. // 显示无更多数据的回调
  6459. hideUpScroll: null,
  6460. // 隐藏上拉加载的回调
  6461. errDistance: 60,
  6462. // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  6463. toTop: {
  6464. // 回到顶部按钮,需配置src才显示
  6465. src: null,
  6466. // 图片路径,默认null (绝对路径或网络图)
  6467. offset: 1e3,
  6468. // 列表滚动多少距离才显示回到顶部按钮,默认1000
  6469. duration: 300,
  6470. // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  6471. btnClick: null,
  6472. // 点击按钮的回调
  6473. onShow: null,
  6474. // 是否显示的回调
  6475. zIndex: 9990,
  6476. // fixed定位z-index值
  6477. left: null,
  6478. // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6479. right: 20,
  6480. // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6481. bottom: 120,
  6482. // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6483. safearea: false,
  6484. // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  6485. width: 72,
  6486. // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6487. radius: "50%"
  6488. // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6489. },
  6490. empty: {
  6491. use: true,
  6492. // 是否显示空布局
  6493. icon: null,
  6494. // 图标路径
  6495. tip: "~ 暂无相关数据 ~",
  6496. // 提示
  6497. btnText: "",
  6498. // 按钮
  6499. btnClick: null,
  6500. // 点击按钮的回调
  6501. onShow: null,
  6502. // 是否显示的回调
  6503. fixed: false,
  6504. // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  6505. top: "100rpx",
  6506. // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  6507. zIndex: 99
  6508. // fixed定位z-index值
  6509. },
  6510. onScroll: false
  6511. // 是否监听滚动事件
  6512. });
  6513. };
  6514. MeScroll.extend = function(userOption, defaultOption) {
  6515. if (!userOption)
  6516. return defaultOption;
  6517. for (let key in defaultOption) {
  6518. if (userOption[key] == null) {
  6519. let def = defaultOption[key];
  6520. if (def != null && typeof def === "object") {
  6521. userOption[key] = MeScroll.extend({}, def);
  6522. } else {
  6523. userOption[key] = def;
  6524. }
  6525. } else if (typeof userOption[key] === "object") {
  6526. MeScroll.extend(userOption[key], defaultOption[key]);
  6527. }
  6528. }
  6529. return userOption;
  6530. };
  6531. MeScroll.prototype.hasColor = function(color2) {
  6532. if (!color2)
  6533. return false;
  6534. let c = color2.toLowerCase();
  6535. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  6536. };
  6537. MeScroll.prototype.initDownScroll = function() {
  6538. let me = this;
  6539. me.optDown = me.options.down || {};
  6540. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
  6541. me.optDown.textColor = "#fff";
  6542. me.extendDownScroll(me.optDown);
  6543. if (me.isScrollBody && me.optDown.native) {
  6544. me.optDown.use = false;
  6545. } else {
  6546. me.optDown.native = false;
  6547. }
  6548. me.downHight = 0;
  6549. if (me.optDown.use && me.optDown.inited) {
  6550. setTimeout(function() {
  6551. me.optDown.inited(me);
  6552. }, 0);
  6553. }
  6554. };
  6555. MeScroll.prototype.touchstartEvent = function(e) {
  6556. if (!this.optDown.use)
  6557. return;
  6558. this.startPoint = this.getPoint(e);
  6559. this.startTop = this.getScrollTop();
  6560. this.startAngle = 0;
  6561. this.lastPoint = this.startPoint;
  6562. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
  6563. this.inTouchend = false;
  6564. };
  6565. MeScroll.prototype.touchmoveEvent = function(e) {
  6566. if (!this.optDown.use)
  6567. return;
  6568. let me = this;
  6569. let scrollTop = me.getScrollTop();
  6570. let curPoint = me.getPoint(e);
  6571. let moveY = curPoint.y - me.startPoint.y;
  6572. if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
  6573. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
  6574. if (!me.startAngle)
  6575. me.startAngle = me.getAngle(me.lastPoint, curPoint);
  6576. if (me.startAngle < me.optDown.minAngle)
  6577. return;
  6578. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  6579. me.inTouchend = true;
  6580. me.touchendEvent();
  6581. return;
  6582. }
  6583. me.preventDefault(e);
  6584. let diff = curPoint.y - me.lastPoint.y;
  6585. if (me.downHight < me.optDown.offset) {
  6586. if (me.movetype !== 1) {
  6587. me.movetype = 1;
  6588. me.isDownEndSuccess = null;
  6589. me.optDown.inOffset && me.optDown.inOffset(me);
  6590. me.isMoveDown = true;
  6591. }
  6592. me.downHight += diff * me.optDown.inOffsetRate;
  6593. } else {
  6594. if (me.movetype !== 2) {
  6595. me.movetype = 2;
  6596. me.optDown.outOffset && me.optDown.outOffset(me);
  6597. me.isMoveDown = true;
  6598. }
  6599. if (diff > 0) {
  6600. me.downHight += diff * me.optDown.outOffsetRate;
  6601. } else {
  6602. me.downHight += diff;
  6603. }
  6604. }
  6605. me.downHight = Math.round(me.downHight);
  6606. let rate = me.downHight / me.optDown.offset;
  6607. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
  6608. }
  6609. }
  6610. me.lastPoint = curPoint;
  6611. };
  6612. MeScroll.prototype.touchendEvent = function(e) {
  6613. if (!this.optDown.use)
  6614. return;
  6615. if (this.isMoveDown) {
  6616. if (this.downHight >= this.optDown.offset) {
  6617. this.triggerDownScroll();
  6618. } else {
  6619. this.downHight = 0;
  6620. this.endDownScrollCall(this);
  6621. }
  6622. this.movetype = 0;
  6623. this.isMoveDown = false;
  6624. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
  6625. let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
  6626. if (isScrollUp) {
  6627. let angle = this.getAngle(this.getPoint(e), this.startPoint);
  6628. if (angle > 80) {
  6629. this.triggerUpScroll(true);
  6630. }
  6631. }
  6632. }
  6633. };
  6634. MeScroll.prototype.getPoint = function(e) {
  6635. if (!e) {
  6636. return {
  6637. x: 0,
  6638. y: 0
  6639. };
  6640. }
  6641. if (e.touches && e.touches[0]) {
  6642. return {
  6643. x: e.touches[0].pageX,
  6644. y: e.touches[0].pageY
  6645. };
  6646. } else if (e.changedTouches && e.changedTouches[0]) {
  6647. return {
  6648. x: e.changedTouches[0].pageX,
  6649. y: e.changedTouches[0].pageY
  6650. };
  6651. } else {
  6652. return {
  6653. x: e.clientX,
  6654. y: e.clientY
  6655. };
  6656. }
  6657. };
  6658. MeScroll.prototype.getAngle = function(p1, p2) {
  6659. let x = Math.abs(p1.x - p2.x);
  6660. let y = Math.abs(p1.y - p2.y);
  6661. let z = Math.sqrt(x * x + y * y);
  6662. let angle = 0;
  6663. if (z !== 0) {
  6664. angle = Math.asin(y / z) / Math.PI * 180;
  6665. }
  6666. return angle;
  6667. };
  6668. MeScroll.prototype.triggerDownScroll = function() {
  6669. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
  6670. ;
  6671. else {
  6672. this.showDownScroll();
  6673. !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
  6674. }
  6675. };
  6676. MeScroll.prototype.showDownScroll = function() {
  6677. this.isDownScrolling = true;
  6678. if (this.optDown.native) {
  6679. uni.startPullDownRefresh();
  6680. this.showDownLoadingCall(0);
  6681. } else {
  6682. this.downHight = this.optDown.offset;
  6683. this.showDownLoadingCall(this.downHight);
  6684. }
  6685. };
  6686. MeScroll.prototype.showDownLoadingCall = function(downHight) {
  6687. this.optDown.showLoading && this.optDown.showLoading(this, downHight);
  6688. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
  6689. };
  6690. MeScroll.prototype.onPullDownRefresh = function() {
  6691. this.isDownScrolling = true;
  6692. this.showDownLoadingCall(0);
  6693. this.optDown.callback && this.optDown.callback(this);
  6694. };
  6695. MeScroll.prototype.endDownScroll = function() {
  6696. if (this.optDown.native) {
  6697. this.isDownScrolling = false;
  6698. this.endDownScrollCall(this);
  6699. uni.stopPullDownRefresh();
  6700. return;
  6701. }
  6702. let me = this;
  6703. let endScroll = function() {
  6704. me.downHight = 0;
  6705. me.isDownScrolling = false;
  6706. me.endDownScrollCall(me);
  6707. if (!me.isScrollBody) {
  6708. me.setScrollHeight(0);
  6709. me.scrollTo(0, 0);
  6710. }
  6711. };
  6712. let delay = 0;
  6713. if (me.optDown.beforeEndDownScroll) {
  6714. delay = me.optDown.beforeEndDownScroll(me);
  6715. if (me.isDownEndSuccess == null)
  6716. delay = 0;
  6717. }
  6718. if (typeof delay === "number" && delay > 0) {
  6719. setTimeout(endScroll, delay);
  6720. } else {
  6721. endScroll();
  6722. }
  6723. };
  6724. MeScroll.prototype.endDownScrollCall = function() {
  6725. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  6726. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  6727. };
  6728. MeScroll.prototype.lockDownScroll = function(isLock) {
  6729. if (isLock == null)
  6730. isLock = true;
  6731. this.optDown.isLock = isLock;
  6732. };
  6733. MeScroll.prototype.lockUpScroll = function(isLock) {
  6734. if (isLock == null)
  6735. isLock = true;
  6736. this.optUp.isLock = isLock;
  6737. };
  6738. MeScroll.prototype.initUpScroll = function() {
  6739. let me = this;
  6740. me.optUp = me.options.up || { use: false };
  6741. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
  6742. me.optUp.textColor = "#fff";
  6743. me.extendUpScroll(me.optUp);
  6744. if (me.optUp.use === false)
  6745. return;
  6746. me.optUp.hasNext = true;
  6747. me.startNum = me.optUp.page.num + 1;
  6748. if (me.optUp.inited) {
  6749. setTimeout(function() {
  6750. me.optUp.inited(me);
  6751. }, 0);
  6752. }
  6753. };
  6754. MeScroll.prototype.onReachBottom = function() {
  6755. if (this.isScrollBody && !this.isUpScrolling) {
  6756. if (!this.optUp.isLock && this.optUp.hasNext) {
  6757. this.triggerUpScroll();
  6758. }
  6759. }
  6760. };
  6761. MeScroll.prototype.onPageScroll = function(e) {
  6762. if (!this.isScrollBody)
  6763. return;
  6764. this.setScrollTop(e.scrollTop);
  6765. if (e.scrollTop >= this.optUp.toTop.offset) {
  6766. this.showTopBtn();
  6767. } else {
  6768. this.hideTopBtn();
  6769. }
  6770. };
  6771. MeScroll.prototype.scroll = function(e, onScroll) {
  6772. this.setScrollTop(e.scrollTop);
  6773. this.setScrollHeight(e.scrollHeight);
  6774. if (this.preScrollY == null)
  6775. this.preScrollY = 0;
  6776. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  6777. this.preScrollY = e.scrollTop;
  6778. this.isScrollUp && this.triggerUpScroll(true);
  6779. if (e.scrollTop >= this.optUp.toTop.offset) {
  6780. this.showTopBtn();
  6781. } else {
  6782. this.hideTopBtn();
  6783. }
  6784. this.optUp.onScroll && onScroll && onScroll();
  6785. };
  6786. MeScroll.prototype.triggerUpScroll = function(isCheck) {
  6787. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  6788. if (isCheck === true) {
  6789. let canUp = false;
  6790. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  6791. if (this.getScrollBottom() <= this.optUp.offset) {
  6792. canUp = true;
  6793. }
  6794. }
  6795. if (canUp === false)
  6796. return;
  6797. }
  6798. this.showUpScroll();
  6799. this.optUp.page.num++;
  6800. this.isUpAutoLoad = true;
  6801. this.num = this.optUp.page.num;
  6802. this.size = this.optUp.page.size;
  6803. this.time = this.optUp.page.time;
  6804. this.optUp.callback(this);
  6805. }
  6806. };
  6807. MeScroll.prototype.showUpScroll = function() {
  6808. this.isUpScrolling = true;
  6809. this.optUp.showLoading && this.optUp.showLoading(this);
  6810. };
  6811. MeScroll.prototype.showNoMore = function() {
  6812. this.optUp.hasNext = false;
  6813. this.optUp.showNoMore && this.optUp.showNoMore(this);
  6814. };
  6815. MeScroll.prototype.hideUpScroll = function() {
  6816. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
  6817. };
  6818. MeScroll.prototype.endUpScroll = function(isShowNoMore) {
  6819. if (isShowNoMore != null) {
  6820. if (isShowNoMore) {
  6821. this.showNoMore();
  6822. } else {
  6823. this.hideUpScroll();
  6824. }
  6825. }
  6826. this.isUpScrolling = false;
  6827. };
  6828. MeScroll.prototype.resetUpScroll = function(isShowLoading) {
  6829. if (this.optUp && this.optUp.use) {
  6830. let page2 = this.optUp.page;
  6831. this.prePageNum = page2.num;
  6832. this.prePageTime = page2.time;
  6833. page2.num = this.startNum;
  6834. page2.time = null;
  6835. if (!this.isDownScrolling && isShowLoading !== false) {
  6836. if (isShowLoading == null) {
  6837. this.removeEmpty();
  6838. this.showUpScroll();
  6839. } else {
  6840. this.showDownScroll();
  6841. }
  6842. }
  6843. this.isUpAutoLoad = true;
  6844. this.num = page2.num;
  6845. this.size = page2.size;
  6846. this.time = page2.time;
  6847. this.optUp.callback && this.optUp.callback(this);
  6848. }
  6849. };
  6850. MeScroll.prototype.setPageNum = function(num) {
  6851. this.optUp.page.num = num - 1;
  6852. };
  6853. MeScroll.prototype.setPageSize = function(size) {
  6854. this.optUp.page.size = size;
  6855. };
  6856. MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
  6857. let hasNext;
  6858. if (this.optUp.use && totalPage != null)
  6859. hasNext = this.optUp.page.num < totalPage;
  6860. this.endSuccess(dataSize, hasNext, systime);
  6861. };
  6862. MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
  6863. let hasNext;
  6864. if (this.optUp.use && totalSize != null) {
  6865. let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
  6866. hasNext = loadSize < totalSize;
  6867. }
  6868. this.endSuccess(dataSize, hasNext, systime);
  6869. };
  6870. MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
  6871. let me = this;
  6872. if (me.isDownScrolling) {
  6873. me.isDownEndSuccess = true;
  6874. me.endDownScroll();
  6875. }
  6876. if (me.optUp.use) {
  6877. let isShowNoMore;
  6878. if (dataSize != null) {
  6879. let pageNum = me.optUp.page.num;
  6880. let pageSize = me.optUp.page.size;
  6881. if (pageNum === 1) {
  6882. if (systime)
  6883. me.optUp.page.time = systime;
  6884. }
  6885. if (dataSize < pageSize || hasNext === false) {
  6886. me.optUp.hasNext = false;
  6887. if (dataSize === 0 && pageNum === 1) {
  6888. isShowNoMore = false;
  6889. me.showEmpty();
  6890. } else {
  6891. let allDataSize = (pageNum - 1) * pageSize + dataSize;
  6892. if (allDataSize < me.optUp.noMoreSize) {
  6893. isShowNoMore = false;
  6894. } else {
  6895. isShowNoMore = true;
  6896. }
  6897. me.removeEmpty();
  6898. }
  6899. } else {
  6900. isShowNoMore = false;
  6901. me.optUp.hasNext = true;
  6902. me.removeEmpty();
  6903. }
  6904. }
  6905. me.endUpScroll(isShowNoMore);
  6906. }
  6907. };
  6908. MeScroll.prototype.endErr = function(errDistance) {
  6909. if (this.isDownScrolling) {
  6910. this.isDownEndSuccess = false;
  6911. let page2 = this.optUp.page;
  6912. if (page2 && this.prePageNum) {
  6913. page2.num = this.prePageNum;
  6914. page2.time = this.prePageTime;
  6915. }
  6916. this.endDownScroll();
  6917. }
  6918. if (this.isUpScrolling) {
  6919. this.optUp.page.num--;
  6920. this.endUpScroll(false);
  6921. if (this.isScrollBody && errDistance !== 0) {
  6922. if (!errDistance)
  6923. errDistance = this.optUp.errDistance;
  6924. this.scrollTo(this.getScrollTop() - errDistance, 0);
  6925. }
  6926. }
  6927. };
  6928. MeScroll.prototype.showEmpty = function() {
  6929. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  6930. };
  6931. MeScroll.prototype.removeEmpty = function() {
  6932. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  6933. };
  6934. MeScroll.prototype.showTopBtn = function() {
  6935. if (!this.topBtnShow) {
  6936. this.topBtnShow = true;
  6937. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  6938. }
  6939. };
  6940. MeScroll.prototype.hideTopBtn = function() {
  6941. if (this.topBtnShow) {
  6942. this.topBtnShow = false;
  6943. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  6944. }
  6945. };
  6946. MeScroll.prototype.getScrollTop = function() {
  6947. return this.scrollTop || 0;
  6948. };
  6949. MeScroll.prototype.setScrollTop = function(y) {
  6950. this.scrollTop = y;
  6951. };
  6952. MeScroll.prototype.scrollTo = function(y, t2) {
  6953. this.myScrollTo && this.myScrollTo(y, t2);
  6954. };
  6955. MeScroll.prototype.resetScrollTo = function(myScrollTo) {
  6956. this.myScrollTo = myScrollTo;
  6957. };
  6958. MeScroll.prototype.getScrollBottom = function() {
  6959. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  6960. };
  6961. MeScroll.prototype.getStep = function(star, end, callback, t2, rate) {
  6962. let diff = end - star;
  6963. if (t2 === 0 || diff === 0) {
  6964. callback && callback(end);
  6965. return;
  6966. }
  6967. t2 = t2 || 300;
  6968. rate = rate || 30;
  6969. let count = t2 / rate;
  6970. let step = diff / count;
  6971. let i = 0;
  6972. let timer = setInterval(function() {
  6973. if (i < count - 1) {
  6974. star += step;
  6975. callback && callback(star, timer);
  6976. i++;
  6977. } else {
  6978. callback && callback(end, timer);
  6979. clearInterval(timer);
  6980. }
  6981. }, rate);
  6982. };
  6983. MeScroll.prototype.getClientHeight = function(isReal) {
  6984. let h = this.clientHeight || 0;
  6985. if (h === 0 && isReal !== true) {
  6986. h = this.getBodyHeight();
  6987. }
  6988. return h;
  6989. };
  6990. MeScroll.prototype.setClientHeight = function(h) {
  6991. this.clientHeight = h;
  6992. };
  6993. MeScroll.prototype.getScrollHeight = function() {
  6994. return this.scrollHeight || 0;
  6995. };
  6996. MeScroll.prototype.setScrollHeight = function(h) {
  6997. this.scrollHeight = h;
  6998. };
  6999. MeScroll.prototype.getBodyHeight = function() {
  7000. return this.bodyHeight || 0;
  7001. };
  7002. MeScroll.prototype.setBodyHeight = function(h) {
  7003. this.bodyHeight = h;
  7004. };
  7005. MeScroll.prototype.preventDefault = function(e) {
  7006. if (e && e.cancelable && !e.defaultPrevented)
  7007. e.preventDefault();
  7008. };
  7009. const _sfc_main$1N = {
  7010. props: {
  7011. // up.toTop的配置项
  7012. option: {
  7013. type: Object,
  7014. default() {
  7015. return {};
  7016. }
  7017. },
  7018. // 是否显示
  7019. value: false,
  7020. // vue2
  7021. modelValue: false
  7022. // vue3
  7023. },
  7024. computed: {
  7025. // 优先显示左边
  7026. left() {
  7027. return this.option.left ? this.addUnit(this.option.left) : "auto";
  7028. },
  7029. // 右边距离 (优先显示左边)
  7030. right() {
  7031. return this.option.left ? "auto" : this.addUnit(this.option.right);
  7032. },
  7033. // 是否显示
  7034. isShow() {
  7035. return this.modelValue;
  7036. }
  7037. },
  7038. methods: {
  7039. addUnit(num) {
  7040. if (!num)
  7041. return 0;
  7042. if (typeof num === "number")
  7043. return num + "rpx";
  7044. return num;
  7045. },
  7046. toTopClick() {
  7047. this.$emit("update:modelValue", false);
  7048. this.$emit("click");
  7049. }
  7050. }
  7051. };
  7052. function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
  7053. return $props.option.src ? (vue.openBlock(), vue.createElementBlock("image", {
  7054. key: 0,
  7055. class: vue.normalizeClass(["mescroll-totop", [$options.isShow ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $props.option.safearea }]]),
  7056. 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) }),
  7057. src: $props.option.src,
  7058. mode: "widthFix",
  7059. onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
  7060. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
  7061. }
  7062. const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-49fff3a8"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]);
  7063. const WxsMixin = {
  7064. data() {
  7065. return {
  7066. // 传入wxs视图层的数据 (响应式)
  7067. wxsProp: {
  7068. optDown: {},
  7069. // 下拉刷新的配置
  7070. scrollTop: 0,
  7071. // 滚动条的距离
  7072. bodyHeight: 0,
  7073. // body的高度
  7074. isDownScrolling: false,
  7075. // 是否正在下拉刷新中
  7076. isUpScrolling: false,
  7077. // 是否正在上拉加载中
  7078. isScrollBody: true,
  7079. // 是否为mescroll-body滚动
  7080. isUpBoth: true,
  7081. // 上拉加载时,是否同时可以下拉刷新
  7082. t: 0
  7083. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  7084. },
  7085. // 标记调用wxs视图层的方法
  7086. callProp: {
  7087. callType: "",
  7088. // 方法名
  7089. t: 0
  7090. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  7091. }
  7092. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  7093. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  7094. };
  7095. },
  7096. methods: {
  7097. // wxs视图层调用逻辑层的回调
  7098. wxsCall(msg) {
  7099. if (msg.type === "setWxsProp") {
  7100. this.wxsProp = {
  7101. optDown: this.mescroll.optDown,
  7102. scrollTop: this.mescroll.getScrollTop(),
  7103. bodyHeight: this.mescroll.getBodyHeight(),
  7104. isDownScrolling: this.mescroll.isDownScrolling,
  7105. isUpScrolling: this.mescroll.isUpScrolling,
  7106. isUpBoth: this.mescroll.optUp.isBoth,
  7107. isScrollBody: this.mescroll.isScrollBody,
  7108. t: Date.now()
  7109. };
  7110. } else if (msg.type === "setLoadType") {
  7111. this.downLoadType = msg.downLoadType;
  7112. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  7113. this.$set(this.mescroll, "isDownEndSuccess", null);
  7114. } else if (msg.type === "triggerDownScroll") {
  7115. this.mescroll.triggerDownScroll();
  7116. } else if (msg.type === "endDownScroll") {
  7117. this.mescroll.endDownScroll();
  7118. } else if (msg.type === "triggerUpScroll") {
  7119. this.mescroll.triggerUpScroll(true);
  7120. }
  7121. }
  7122. },
  7123. mounted() {
  7124. this.mescroll.optDown.afterLoading = () => {
  7125. this.callProp = { callType: "showLoading", t: Date.now() };
  7126. };
  7127. this.mescroll.optDown.afterEndDownScroll = () => {
  7128. this.callProp = { callType: "endDownScroll", t: Date.now() };
  7129. let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
  7130. setTimeout(() => {
  7131. if (this.downLoadType === 4 || this.downLoadType === 0) {
  7132. this.callProp = { callType: "clearTransform", t: Date.now() };
  7133. }
  7134. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  7135. }, delay);
  7136. };
  7137. this.wxsCall({ type: "setWxsProp" });
  7138. }
  7139. };
  7140. const block0$1 = (Comp) => {
  7141. (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
  7142. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
  7143. };
  7144. const block1 = (Comp) => {
  7145. (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
  7146. (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "5a9dc23f";
  7147. };
  7148. const _sfc_main$1M = {
  7149. name: "mescroll-uni",
  7150. mixins: [WxsMixin],
  7151. components: {
  7152. MescrollTop
  7153. },
  7154. props: {
  7155. down: Object,
  7156. up: Object,
  7157. i18n: Object,
  7158. top: [String, Number],
  7159. topbar: [Boolean, String],
  7160. bottom: [String, Number],
  7161. safearea: Boolean,
  7162. fixed: {
  7163. type: Boolean,
  7164. default: true
  7165. },
  7166. height: [String, Number],
  7167. bottombar: {
  7168. type: Boolean,
  7169. default: true
  7170. },
  7171. disableScroll: Boolean
  7172. },
  7173. data() {
  7174. return {
  7175. mescroll: { optDown: {}, optUp: {} },
  7176. // mescroll实例
  7177. viewId: "id_" + Math.random().toString(36).substr(2, 16),
  7178. // 随机生成mescroll的id(不能数字开头,否则找不到元素)
  7179. downHight: 0,
  7180. //下拉刷新: 容器高度
  7181. downRate: 0,
  7182. // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
  7183. downLoadType: 0,
  7184. // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
  7185. upLoadType: 0,
  7186. // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)
  7187. isShowEmpty: false,
  7188. // 是否显示空布局
  7189. isShowToTop: false,
  7190. // 是否显示回到顶部按钮
  7191. scrollTop: 0,
  7192. // 滚动条的位置
  7193. scrollAnim: false,
  7194. // 是否开启滚动动画
  7195. windowTop: 0,
  7196. // 可使用窗口的顶部位置
  7197. windowBottom: 0,
  7198. // 可使用窗口的底部位置
  7199. windowHeight: 0,
  7200. // 可使用窗口的高度
  7201. statusBarHeight: 0
  7202. // 状态栏高度
  7203. };
  7204. },
  7205. watch: {
  7206. height() {
  7207. this.setClientHeight();
  7208. }
  7209. },
  7210. computed: {
  7211. // 是否使用fixed定位 (当height有值,则不使用)
  7212. isFixed() {
  7213. return !this.height && this.fixed;
  7214. },
  7215. // mescroll的高度
  7216. scrollHeight() {
  7217. if (this.isFixed) {
  7218. return "auto";
  7219. } else if (this.height) {
  7220. return this.toPx(this.height) + "px";
  7221. } else {
  7222. return "100%";
  7223. }
  7224. },
  7225. // 下拉布局往下偏移的距离 (px)
  7226. numTop() {
  7227. return this.toPx(this.top);
  7228. },
  7229. fixedTop() {
  7230. return this.isFixed ? this.numTop + this.windowTop + "px" : 0;
  7231. },
  7232. padTop() {
  7233. return !this.isFixed ? this.numTop + "px" : 0;
  7234. },
  7235. // 上拉布局往上偏移 (px)
  7236. numBottom() {
  7237. return this.toPx(this.bottom);
  7238. },
  7239. fixedBottom() {
  7240. return this.isFixed ? this.numBottom + this.windowBottom + "px" : 0;
  7241. },
  7242. padBottom() {
  7243. return !this.isFixed ? this.numBottom + "px" : 0;
  7244. },
  7245. // 是否为重置下拉的状态
  7246. isDownReset() {
  7247. return this.downLoadType === 3 || this.downLoadType === 4;
  7248. },
  7249. // 过渡
  7250. transition() {
  7251. return this.isDownReset ? "transform 300ms" : "";
  7252. },
  7253. translateY() {
  7254. return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
  7255. },
  7256. // 列表是否可滑动
  7257. scrollable() {
  7258. if (this.disableScroll)
  7259. return false;
  7260. return this.downLoadType === 0 || this.isDownReset;
  7261. },
  7262. // 是否在加载中
  7263. isDownLoading() {
  7264. return this.downLoadType === 3;
  7265. },
  7266. // 旋转的角度
  7267. downRotate() {
  7268. return "rotate(" + 360 * this.downRate + "deg)";
  7269. },
  7270. // 文本提示
  7271. downText() {
  7272. if (!this.mescroll)
  7273. return "";
  7274. switch (this.downLoadType) {
  7275. case 1:
  7276. return this.mescroll.optDown.textInOffset;
  7277. case 2:
  7278. return this.mescroll.optDown.textOutOffset;
  7279. case 3:
  7280. return this.mescroll.optDown.textLoading;
  7281. case 4:
  7282. return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
  7283. default:
  7284. return this.mescroll.optDown.textInOffset;
  7285. }
  7286. }
  7287. },
  7288. methods: {
  7289. //number,rpx,upx,px,% --> px的数值
  7290. toPx(num) {
  7291. if (typeof num === "string") {
  7292. if (num.indexOf("px") !== -1) {
  7293. if (num.indexOf("rpx") !== -1) {
  7294. num = num.replace("rpx", "");
  7295. } else if (num.indexOf("upx") !== -1) {
  7296. num = num.replace("upx", "");
  7297. } else {
  7298. return Number(num.replace("px", ""));
  7299. }
  7300. } else if (num.indexOf("%") !== -1) {
  7301. let rate = Number(num.replace("%", "")) / 100;
  7302. return this.windowHeight * rate;
  7303. }
  7304. }
  7305. return num ? uni.upx2px(Number(num)) : 0;
  7306. },
  7307. //注册列表滚动事件,用于下拉刷新和上拉加载
  7308. scroll(e) {
  7309. this.mescroll.scroll(e.detail, () => {
  7310. this.$emit("scroll", this.mescroll);
  7311. });
  7312. },
  7313. // 点击空布局的按钮回调
  7314. emptyClick() {
  7315. this.$emit("emptyclick", this.mescroll);
  7316. },
  7317. // 点击回到顶部的按钮回调
  7318. toTopClick() {
  7319. this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
  7320. this.$emit("topclick", this.mescroll);
  7321. },
  7322. // 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)
  7323. setClientHeight() {
  7324. if (!this.isExec) {
  7325. this.isExec = true;
  7326. this.$nextTick(() => {
  7327. this.getClientInfo((data) => {
  7328. this.isExec = false;
  7329. if (data) {
  7330. this.mescroll.setClientHeight(data.height);
  7331. } else if (this.clientNum != 3) {
  7332. this.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;
  7333. setTimeout(() => {
  7334. this.setClientHeight();
  7335. }, this.clientNum * 100);
  7336. }
  7337. });
  7338. });
  7339. }
  7340. },
  7341. // 获取滚动区域的信息
  7342. getClientInfo(success) {
  7343. let query = uni.createSelectorQuery().in(this);
  7344. let view = query.select("#" + this.viewId);
  7345. view.boundingClientRect((data) => {
  7346. success(data);
  7347. }).exec();
  7348. }
  7349. },
  7350. // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
  7351. created() {
  7352. let vm = this;
  7353. let diyOption = {
  7354. // 下拉刷新的配置
  7355. down: {
  7356. inOffset() {
  7357. vm.downLoadType = 1;
  7358. },
  7359. outOffset() {
  7360. vm.downLoadType = 2;
  7361. },
  7362. onMoving(mescroll, rate, downHight) {
  7363. vm.downHight = downHight;
  7364. vm.downRate = rate;
  7365. },
  7366. showLoading(mescroll, downHight) {
  7367. vm.downLoadType = 3;
  7368. vm.downHight = downHight;
  7369. },
  7370. beforeEndDownScroll(mescroll) {
  7371. vm.downLoadType = 4;
  7372. return mescroll.optDown.beforeEndDelay;
  7373. },
  7374. endDownScroll() {
  7375. vm.downLoadType = 4;
  7376. vm.downHight = 0;
  7377. vm.downResetTimer && clearTimeout(vm.downResetTimer);
  7378. vm.downResetTimer = setTimeout(() => {
  7379. if (vm.downLoadType === 4)
  7380. vm.downLoadType = 0;
  7381. }, 300);
  7382. },
  7383. // 派发下拉刷新的回调
  7384. callback: function(mescroll) {
  7385. vm.$emit("down", mescroll);
  7386. }
  7387. },
  7388. // 上拉加载的配置
  7389. up: {
  7390. // 显示加载中的回调
  7391. showLoading() {
  7392. vm.upLoadType = 1;
  7393. },
  7394. // 显示无更多数据的回调
  7395. showNoMore() {
  7396. vm.upLoadType = 2;
  7397. },
  7398. // 隐藏上拉加载的回调
  7399. hideUpScroll(mescroll) {
  7400. vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
  7401. },
  7402. // 空布局
  7403. empty: {
  7404. onShow(isShow) {
  7405. vm.isShowEmpty = isShow;
  7406. }
  7407. },
  7408. // 回到顶部
  7409. toTop: {
  7410. onShow(isShow) {
  7411. vm.isShowToTop = isShow;
  7412. }
  7413. },
  7414. // 派发上拉加载的回调
  7415. callback: function(mescroll) {
  7416. vm.$emit("up", mescroll);
  7417. vm.setClientHeight();
  7418. }
  7419. }
  7420. };
  7421. let i18nType = mescrollI18n.getType();
  7422. let i18nOption = { type: i18nType };
  7423. MeScroll.extend(i18nOption, vm.i18n);
  7424. MeScroll.extend(i18nOption, GlobalOption.i18n);
  7425. MeScroll.extend(diyOption, i18nOption[i18nType]);
  7426. MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
  7427. let myOption = JSON.parse(JSON.stringify({ "down": vm.down, "up": vm.up }));
  7428. MeScroll.extend(myOption, diyOption);
  7429. vm.mescroll = new MeScroll(myOption);
  7430. vm.mescroll.viewId = vm.viewId;
  7431. vm.mescroll.i18n = i18nOption;
  7432. vm.$emit("init", vm.mescroll);
  7433. const sys2 = uni.getSystemInfoSync();
  7434. if (sys2.windowTop)
  7435. vm.windowTop = sys2.windowTop;
  7436. if (sys2.windowBottom)
  7437. vm.windowBottom = sys2.windowBottom;
  7438. if (sys2.windowHeight)
  7439. vm.windowHeight = sys2.windowHeight;
  7440. if (sys2.statusBarHeight)
  7441. vm.statusBarHeight = sys2.statusBarHeight;
  7442. vm.mescroll.setBodyHeight(sys2.windowHeight);
  7443. vm.mescroll.resetScrollTo((y, t2) => {
  7444. vm.scrollAnim = t2 !== 0;
  7445. if (typeof y === "string") {
  7446. vm.getClientInfo(function(rect) {
  7447. let mescrollTop = rect.top;
  7448. let selector;
  7449. if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
  7450. selector = "#" + y;
  7451. } else {
  7452. selector = y;
  7453. if (y.indexOf(">>>") != -1) {
  7454. selector = y.split(">>>")[1].trim();
  7455. }
  7456. }
  7457. uni.createSelectorQuery().select(selector).boundingClientRect(function(rect2) {
  7458. if (rect2) {
  7459. let curY2 = vm.mescroll.getScrollTop();
  7460. let top = rect2.top - mescrollTop;
  7461. top += curY2;
  7462. if (!vm.isFixed)
  7463. top -= vm.numTop;
  7464. vm.scrollTop = curY2;
  7465. vm.$nextTick(function() {
  7466. vm.scrollTop = top;
  7467. });
  7468. } else {
  7469. formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue:422", selector + " does not exist");
  7470. }
  7471. }).exec();
  7472. });
  7473. return;
  7474. }
  7475. let curY = vm.mescroll.getScrollTop();
  7476. if (t2 === 0 || t2 === 300) {
  7477. vm.scrollTop = curY;
  7478. vm.$nextTick(function() {
  7479. vm.scrollTop = y;
  7480. });
  7481. } else {
  7482. vm.mescroll.getStep(curY, y, (step) => {
  7483. vm.scrollTop = step;
  7484. }, t2);
  7485. }
  7486. });
  7487. if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
  7488. ;
  7489. else {
  7490. vm.mescroll.optUp.toTop.safearea = vm.safearea;
  7491. }
  7492. uni.$on("setMescrollGlobalOption", (options) => {
  7493. if (!options)
  7494. return;
  7495. let i18nType2 = options.i18n ? options.i18n.type : null;
  7496. if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
  7497. vm.mescroll.i18n.type = i18nType2;
  7498. mescrollI18n.setType(i18nType2);
  7499. MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
  7500. }
  7501. if (options.down) {
  7502. let down = MeScroll.extend({}, options.down);
  7503. vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
  7504. }
  7505. if (options.up) {
  7506. let up = MeScroll.extend({}, options.up);
  7507. vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
  7508. }
  7509. });
  7510. },
  7511. mounted() {
  7512. this.setClientHeight();
  7513. },
  7514. destroyed() {
  7515. uni.$off("setMescrollGlobalOption");
  7516. }
  7517. };
  7518. function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
  7519. const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$b);
  7520. const _component_mescroll_top = vue.resolveComponent("mescroll-top");
  7521. return vue.openBlock(), vue.createElementBlock("view", { class: "mescroll-uni-warp" }, [
  7522. vue.createElementVNode("scroll-view", {
  7523. id: $data.viewId,
  7524. class: vue.normalizeClass(["mescroll-uni", { "mescroll-uni-fixed": $options.isFixed }]),
  7525. style: vue.normalizeStyle({ "height": $options.scrollHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom, "top": $options.fixedTop, "bottom": $options.fixedBottom }),
  7526. "scroll-top": $data.scrollTop,
  7527. "scroll-with-animation": $data.scrollAnim,
  7528. onScroll: _cache[4] || (_cache[4] = (...args) => $options.scroll && $options.scroll(...args)),
  7529. "scroll-y": $options.scrollable,
  7530. "enable-back-to-top": true,
  7531. throttle: false
  7532. }, [
  7533. vue.createElementVNode("view", {
  7534. class: "mescroll-uni-content mescroll-render-touch",
  7535. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
  7536. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
  7537. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  7538. onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  7539. "change:prop": _ctx.wxsBiz.propObserver,
  7540. prop: vue.wp(_ctx.wxsProp)
  7541. }, [
  7542. vue.createCommentVNode(" 状态栏 "),
  7543. $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
  7544. "view",
  7545. {
  7546. key: 0,
  7547. class: "mescroll-topbar",
  7548. style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
  7549. },
  7550. null,
  7551. 4
  7552. /* STYLE */
  7553. )) : vue.createCommentVNode("v-if", true),
  7554. vue.createElementVNode("view", {
  7555. class: "mescroll-wxs-content",
  7556. style: vue.normalizeStyle({ "transform": $options.translateY, "transition": $options.transition }),
  7557. "change:prop": _ctx.wxsBiz.callObserver,
  7558. prop: vue.wp(_ctx.callProp)
  7559. }, [
  7560. vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
  7561. vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
  7562. $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
  7563. "view",
  7564. {
  7565. key: 0,
  7566. class: "mescroll-downwarp",
  7567. style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
  7568. },
  7569. [
  7570. vue.createElementVNode("view", { class: "downwarp-content" }, [
  7571. vue.createElementVNode(
  7572. "view",
  7573. {
  7574. class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
  7575. style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
  7576. },
  7577. null,
  7578. 6
  7579. /* CLASS, STYLE */
  7580. ),
  7581. vue.createElementVNode(
  7582. "view",
  7583. { class: "downwarp-tip" },
  7584. vue.toDisplayString($options.downText),
  7585. 1
  7586. /* TEXT */
  7587. )
  7588. ])
  7589. ],
  7590. 4
  7591. /* STYLE */
  7592. )) : vue.createCommentVNode("v-if", true),
  7593. vue.createCommentVNode(" 列表内容 "),
  7594. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  7595. vue.createCommentVNode(" 空布局 "),
  7596. $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
  7597. key: 1,
  7598. option: $data.mescroll.optUp.empty,
  7599. onEmptyclick: $options.emptyClick
  7600. }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
  7601. vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
  7602. vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
  7603. $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
  7604. "view",
  7605. {
  7606. key: 2,
  7607. class: "mescroll-upwarp",
  7608. style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
  7609. },
  7610. [
  7611. vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
  7612. vue.withDirectives(vue.createElementVNode(
  7613. "view",
  7614. null,
  7615. [
  7616. vue.createElementVNode(
  7617. "view",
  7618. {
  7619. class: "upwarp-progress mescroll-rotate",
  7620. style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
  7621. },
  7622. null,
  7623. 4
  7624. /* STYLE */
  7625. ),
  7626. vue.createElementVNode(
  7627. "view",
  7628. { class: "upwarp-tip" },
  7629. vue.toDisplayString($data.mescroll.optUp.textLoading),
  7630. 1
  7631. /* TEXT */
  7632. )
  7633. ],
  7634. 512
  7635. /* NEED_PATCH */
  7636. ), [
  7637. [vue.vShow, $data.upLoadType === 1]
  7638. ]),
  7639. vue.createCommentVNode(" 无数据 "),
  7640. $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
  7641. "view",
  7642. {
  7643. key: 0,
  7644. class: "upwarp-nodata"
  7645. },
  7646. vue.toDisplayString($data.mescroll.optUp.textNoMore),
  7647. 1
  7648. /* TEXT */
  7649. )) : vue.createCommentVNode("v-if", true)
  7650. ],
  7651. 4
  7652. /* STYLE */
  7653. )) : vue.createCommentVNode("v-if", true)
  7654. ], 12, ["change:prop", "prop"]),
  7655. vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
  7656. vue.createCommentVNode(" 适配iPhoneX "),
  7657. $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
  7658. key: 1,
  7659. class: "mescroll-safearea"
  7660. })) : vue.createCommentVNode("v-if", true)
  7661. ], 40, ["change:prop", "prop"])
  7662. ], 46, ["id", "scroll-top", "scroll-with-animation", "scroll-y"]),
  7663. vue.createCommentVNode(" 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)"),
  7664. vue.createVNode(_component_mescroll_top, {
  7665. modelValue: $data.isShowToTop,
  7666. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.isShowToTop = $event),
  7667. option: $data.mescroll.optUp.toTop,
  7668. onClick: $options.toTopClick
  7669. }, null, 8, ["modelValue", "option", "onClick"]),
  7670. vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
  7671. vue.createElementVNode("view", {
  7672. "change:prop": _ctx.renderBiz.propObserver,
  7673. prop: vue.wp(_ctx.wxsProp)
  7674. }, null, 8, ["change:prop", "prop"])
  7675. ]);
  7676. }
  7677. if (typeof block0$1 === "function")
  7678. block0$1(_sfc_main$1M);
  7679. if (typeof block1 === "function")
  7680. block1(_sfc_main$1M);
  7681. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-97b1664c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue"]]);
  7682. function useMescroll(onPageScroll, onReachBottom, onPullDownRefresh) {
  7683. let mescroll = null;
  7684. const mescrollInit = (e) => {
  7685. mescroll = e;
  7686. };
  7687. const getMescroll = () => {
  7688. return mescroll;
  7689. };
  7690. const downCallback = () => {
  7691. if (mescroll.optUp.use) {
  7692. mescroll.resetUpScroll();
  7693. } else {
  7694. setTimeout(() => {
  7695. mescroll.endSuccess();
  7696. }, 500);
  7697. }
  7698. };
  7699. const upCallback = () => {
  7700. setTimeout(() => {
  7701. mescroll.endErr();
  7702. }, 500);
  7703. };
  7704. onPullDownRefresh && onPullDownRefresh(() => {
  7705. mescroll && mescroll.onPullDownRefresh();
  7706. });
  7707. onPageScroll && onPageScroll((e) => {
  7708. mescroll && mescroll.onPageScroll(e);
  7709. });
  7710. onReachBottom && onReachBottom(() => {
  7711. mescroll && mescroll.onReachBottom();
  7712. });
  7713. return {
  7714. getMescroll,
  7715. mescrollInit,
  7716. downCallback,
  7717. upCallback
  7718. };
  7719. }
  7720. var isVue2 = false;
  7721. function set(target, key, val) {
  7722. if (Array.isArray(target)) {
  7723. target.length = Math.max(target.length, key);
  7724. target.splice(key, 1, val);
  7725. return val;
  7726. }
  7727. target[key] = val;
  7728. return val;
  7729. }
  7730. function del(target, key) {
  7731. if (Array.isArray(target)) {
  7732. target.splice(key, 1);
  7733. return;
  7734. }
  7735. delete target[key];
  7736. }
  7737. function getDevtoolsGlobalHook() {
  7738. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  7739. }
  7740. function getTarget() {
  7741. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  7742. }
  7743. const isProxyAvailable = typeof Proxy === "function";
  7744. const HOOK_SETUP = "devtools-plugin:setup";
  7745. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  7746. let supported;
  7747. let perf;
  7748. function isPerformanceSupported() {
  7749. var _a;
  7750. if (supported !== void 0) {
  7751. return supported;
  7752. }
  7753. if (typeof window !== "undefined" && window.performance) {
  7754. supported = true;
  7755. perf = window.performance;
  7756. } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
  7757. supported = true;
  7758. perf = global.perf_hooks.performance;
  7759. } else {
  7760. supported = false;
  7761. }
  7762. return supported;
  7763. }
  7764. function now() {
  7765. return isPerformanceSupported() ? perf.now() : Date.now();
  7766. }
  7767. class ApiProxy {
  7768. constructor(plugin, hook) {
  7769. this.target = null;
  7770. this.targetQueue = [];
  7771. this.onQueue = [];
  7772. this.plugin = plugin;
  7773. this.hook = hook;
  7774. const defaultSettings = {};
  7775. if (plugin.settings) {
  7776. for (const id in plugin.settings) {
  7777. const item = plugin.settings[id];
  7778. defaultSettings[id] = item.defaultValue;
  7779. }
  7780. }
  7781. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  7782. let currentSettings = Object.assign({}, defaultSettings);
  7783. try {
  7784. const raw = localStorage.getItem(localSettingsSaveId);
  7785. const data = JSON.parse(raw);
  7786. Object.assign(currentSettings, data);
  7787. } catch (e) {
  7788. }
  7789. this.fallbacks = {
  7790. getSettings() {
  7791. return currentSettings;
  7792. },
  7793. setSettings(value2) {
  7794. try {
  7795. localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
  7796. } catch (e) {
  7797. }
  7798. currentSettings = value2;
  7799. },
  7800. now() {
  7801. return now();
  7802. }
  7803. };
  7804. if (hook) {
  7805. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
  7806. if (pluginId === this.plugin.id) {
  7807. this.fallbacks.setSettings(value2);
  7808. }
  7809. });
  7810. }
  7811. this.proxiedOn = new Proxy({}, {
  7812. get: (_target, prop) => {
  7813. if (this.target) {
  7814. return this.target.on[prop];
  7815. } else {
  7816. return (...args) => {
  7817. this.onQueue.push({
  7818. method: prop,
  7819. args
  7820. });
  7821. };
  7822. }
  7823. }
  7824. });
  7825. this.proxiedTarget = new Proxy({}, {
  7826. get: (_target, prop) => {
  7827. if (this.target) {
  7828. return this.target[prop];
  7829. } else if (prop === "on") {
  7830. return this.proxiedOn;
  7831. } else if (Object.keys(this.fallbacks).includes(prop)) {
  7832. return (...args) => {
  7833. this.targetQueue.push({
  7834. method: prop,
  7835. args,
  7836. resolve: () => {
  7837. }
  7838. });
  7839. return this.fallbacks[prop](...args);
  7840. };
  7841. } else {
  7842. return (...args) => {
  7843. return new Promise((resolve) => {
  7844. this.targetQueue.push({
  7845. method: prop,
  7846. args,
  7847. resolve
  7848. });
  7849. });
  7850. };
  7851. }
  7852. }
  7853. });
  7854. }
  7855. async setRealTarget(target) {
  7856. this.target = target;
  7857. for (const item of this.onQueue) {
  7858. this.target.on[item.method](...item.args);
  7859. }
  7860. for (const item of this.targetQueue) {
  7861. item.resolve(await this.target[item.method](...item.args));
  7862. }
  7863. }
  7864. }
  7865. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  7866. const descriptor = pluginDescriptor;
  7867. const target = getTarget();
  7868. const hook = getDevtoolsGlobalHook();
  7869. const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;
  7870. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  7871. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  7872. } else {
  7873. const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;
  7874. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  7875. list.push({
  7876. pluginDescriptor: descriptor,
  7877. setupFn,
  7878. proxy
  7879. });
  7880. if (proxy)
  7881. setupFn(proxy.proxiedTarget);
  7882. }
  7883. }
  7884. /*!
  7885. * pinia v2.1.7
  7886. * (c) 2023 Eduardo San Martin Morote
  7887. * @license MIT
  7888. */
  7889. let activePinia;
  7890. const setActivePinia = (pinia2) => activePinia = pinia2;
  7891. const piniaSymbol = Symbol("pinia");
  7892. function isPlainObject$1(o) {
  7893. return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
  7894. }
  7895. var MutationType;
  7896. (function(MutationType2) {
  7897. MutationType2["direct"] = "direct";
  7898. MutationType2["patchObject"] = "patch object";
  7899. MutationType2["patchFunction"] = "patch function";
  7900. })(MutationType || (MutationType = {}));
  7901. const IS_CLIENT = typeof window !== "undefined";
  7902. const USE_DEVTOOLS = IS_CLIENT;
  7903. 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 })();
  7904. function bom(blob, { autoBom = false } = {}) {
  7905. if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
  7906. return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
  7907. }
  7908. return blob;
  7909. }
  7910. function download(url2, name, opts) {
  7911. const xhr = new XMLHttpRequest();
  7912. xhr.open("GET", url2);
  7913. xhr.responseType = "blob";
  7914. xhr.onload = function() {
  7915. saveAs(xhr.response, name, opts);
  7916. };
  7917. xhr.onerror = function() {
  7918. console.error("could not download file");
  7919. };
  7920. xhr.send();
  7921. }
  7922. function corsEnabled(url2) {
  7923. const xhr = new XMLHttpRequest();
  7924. xhr.open("HEAD", url2, false);
  7925. try {
  7926. xhr.send();
  7927. } catch (e) {
  7928. }
  7929. return xhr.status >= 200 && xhr.status <= 299;
  7930. }
  7931. function click(node) {
  7932. try {
  7933. node.dispatchEvent(new MouseEvent("click"));
  7934. } catch (e) {
  7935. const evt = document.createEvent("MouseEvents");
  7936. evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
  7937. node.dispatchEvent(evt);
  7938. }
  7939. }
  7940. const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
  7941. const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
  7942. const saveAs = !IS_CLIENT ? () => {
  7943. } : (
  7944. // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  7945. typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
  7946. // Use msSaveOrOpenBlob as a second approach
  7947. "msSaveOrOpenBlob" in _navigator ? msSaveAs : (
  7948. // Fallback to using FileReader and a popup
  7949. fileSaverSaveAs
  7950. )
  7951. )
  7952. );
  7953. function downloadSaveAs(blob, name = "download", opts) {
  7954. const a = document.createElement("a");
  7955. a.download = name;
  7956. a.rel = "noopener";
  7957. if (typeof blob === "string") {
  7958. a.href = blob;
  7959. if (a.origin !== location.origin) {
  7960. if (corsEnabled(a.href)) {
  7961. download(blob, name, opts);
  7962. } else {
  7963. a.target = "_blank";
  7964. click(a);
  7965. }
  7966. } else {
  7967. click(a);
  7968. }
  7969. } else {
  7970. a.href = URL.createObjectURL(blob);
  7971. setTimeout(function() {
  7972. URL.revokeObjectURL(a.href);
  7973. }, 4e4);
  7974. setTimeout(function() {
  7975. click(a);
  7976. }, 0);
  7977. }
  7978. }
  7979. function msSaveAs(blob, name = "download", opts) {
  7980. if (typeof blob === "string") {
  7981. if (corsEnabled(blob)) {
  7982. download(blob, name, opts);
  7983. } else {
  7984. const a = document.createElement("a");
  7985. a.href = blob;
  7986. a.target = "_blank";
  7987. setTimeout(function() {
  7988. click(a);
  7989. });
  7990. }
  7991. } else {
  7992. navigator.msSaveOrOpenBlob(bom(blob, opts), name);
  7993. }
  7994. }
  7995. function fileSaverSaveAs(blob, name, opts, popup) {
  7996. popup = popup || open("", "_blank");
  7997. if (popup) {
  7998. popup.document.title = popup.document.body.innerText = "downloading...";
  7999. }
  8000. if (typeof blob === "string")
  8001. return download(blob, name, opts);
  8002. const force = blob.type === "application/octet-stream";
  8003. const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
  8004. const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
  8005. if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
  8006. const reader = new FileReader();
  8007. reader.onloadend = function() {
  8008. let url2 = reader.result;
  8009. if (typeof url2 !== "string") {
  8010. popup = null;
  8011. throw new Error("Wrong reader.result type");
  8012. }
  8013. url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;");
  8014. if (popup) {
  8015. popup.location.href = url2;
  8016. } else {
  8017. location.assign(url2);
  8018. }
  8019. popup = null;
  8020. };
  8021. reader.readAsDataURL(blob);
  8022. } else {
  8023. const url2 = URL.createObjectURL(blob);
  8024. if (popup)
  8025. popup.location.assign(url2);
  8026. else
  8027. location.href = url2;
  8028. popup = null;
  8029. setTimeout(function() {
  8030. URL.revokeObjectURL(url2);
  8031. }, 4e4);
  8032. }
  8033. }
  8034. function toastMessage(message, type2) {
  8035. const piniaMessage = "🍍 " + message;
  8036. if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
  8037. __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);
  8038. } else if (type2 === "error") {
  8039. console.error(piniaMessage);
  8040. } else if (type2 === "warn") {
  8041. console.warn(piniaMessage);
  8042. } else {
  8043. console.log(piniaMessage);
  8044. }
  8045. }
  8046. function isPinia(o) {
  8047. return "_a" in o && "install" in o;
  8048. }
  8049. function checkClipboardAccess() {
  8050. if (!("clipboard" in navigator)) {
  8051. toastMessage(`Your browser doesn't support the Clipboard API`, "error");
  8052. return true;
  8053. }
  8054. }
  8055. function checkNotFocusedError(error2) {
  8056. if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) {
  8057. toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
  8058. return true;
  8059. }
  8060. return false;
  8061. }
  8062. async function actionGlobalCopyState(pinia2) {
  8063. if (checkClipboardAccess())
  8064. return;
  8065. try {
  8066. await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));
  8067. toastMessage("Global state copied to clipboard.");
  8068. } catch (error2) {
  8069. if (checkNotFocusedError(error2))
  8070. return;
  8071. toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
  8072. console.error(error2);
  8073. }
  8074. }
  8075. async function actionGlobalPasteState(pinia2) {
  8076. if (checkClipboardAccess())
  8077. return;
  8078. try {
  8079. loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));
  8080. toastMessage("Global state pasted from clipboard.");
  8081. } catch (error2) {
  8082. if (checkNotFocusedError(error2))
  8083. return;
  8084. toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
  8085. console.error(error2);
  8086. }
  8087. }
  8088. async function actionGlobalSaveState(pinia2) {
  8089. try {
  8090. saveAs(new Blob([JSON.stringify(pinia2.state.value)], {
  8091. type: "text/plain;charset=utf-8"
  8092. }), "pinia-state.json");
  8093. } catch (error2) {
  8094. toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
  8095. console.error(error2);
  8096. }
  8097. }
  8098. let fileInput;
  8099. function getFileOpener() {
  8100. if (!fileInput) {
  8101. fileInput = document.createElement("input");
  8102. fileInput.type = "file";
  8103. fileInput.accept = ".json";
  8104. }
  8105. function openFile() {
  8106. return new Promise((resolve, reject) => {
  8107. fileInput.onchange = async () => {
  8108. const files = fileInput.files;
  8109. if (!files)
  8110. return resolve(null);
  8111. const file = files.item(0);
  8112. if (!file)
  8113. return resolve(null);
  8114. return resolve({ text: await file.text(), file });
  8115. };
  8116. fileInput.oncancel = () => resolve(null);
  8117. fileInput.onerror = reject;
  8118. fileInput.click();
  8119. });
  8120. }
  8121. return openFile;
  8122. }
  8123. async function actionGlobalOpenStateFile(pinia2) {
  8124. try {
  8125. const open2 = getFileOpener();
  8126. const result = await open2();
  8127. if (!result)
  8128. return;
  8129. const { text, file } = result;
  8130. loadStoresState(pinia2, JSON.parse(text));
  8131. toastMessage(`Global state imported from "${file.name}".`);
  8132. } catch (error2) {
  8133. toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
  8134. console.error(error2);
  8135. }
  8136. }
  8137. function loadStoresState(pinia2, state) {
  8138. for (const key in state) {
  8139. const storeState = pinia2.state.value[key];
  8140. if (storeState) {
  8141. Object.assign(storeState, state[key]);
  8142. } else {
  8143. pinia2.state.value[key] = state[key];
  8144. }
  8145. }
  8146. }
  8147. function formatDisplay(display) {
  8148. return {
  8149. _custom: {
  8150. display
  8151. }
  8152. };
  8153. }
  8154. const PINIA_ROOT_LABEL = "🍍 Pinia (root)";
  8155. const PINIA_ROOT_ID = "_root";
  8156. function formatStoreForInspectorTree(store2) {
  8157. return isPinia(store2) ? {
  8158. id: PINIA_ROOT_ID,
  8159. label: PINIA_ROOT_LABEL
  8160. } : {
  8161. id: store2.$id,
  8162. label: store2.$id
  8163. };
  8164. }
  8165. function formatStoreForInspectorState(store2) {
  8166. if (isPinia(store2)) {
  8167. const storeNames = Array.from(store2._s.keys());
  8168. const storeMap = store2._s;
  8169. const state2 = {
  8170. state: storeNames.map((storeId) => ({
  8171. editable: true,
  8172. key: storeId,
  8173. value: store2.state.value[storeId]
  8174. })),
  8175. getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
  8176. const store22 = storeMap.get(id);
  8177. return {
  8178. editable: false,
  8179. key: id,
  8180. value: store22._getters.reduce((getters, key) => {
  8181. getters[key] = store22[key];
  8182. return getters;
  8183. }, {})
  8184. };
  8185. })
  8186. };
  8187. return state2;
  8188. }
  8189. const state = {
  8190. state: Object.keys(store2.$state).map((key) => ({
  8191. editable: true,
  8192. key,
  8193. value: store2.$state[key]
  8194. }))
  8195. };
  8196. if (store2._getters && store2._getters.length) {
  8197. state.getters = store2._getters.map((getterName) => ({
  8198. editable: false,
  8199. key: getterName,
  8200. value: store2[getterName]
  8201. }));
  8202. }
  8203. if (store2._customProperties.size) {
  8204. state.customProperties = Array.from(store2._customProperties).map((key) => ({
  8205. editable: true,
  8206. key,
  8207. value: store2[key]
  8208. }));
  8209. }
  8210. return state;
  8211. }
  8212. function formatEventData(events) {
  8213. if (!events)
  8214. return {};
  8215. if (Array.isArray(events)) {
  8216. return events.reduce((data, event) => {
  8217. data.keys.push(event.key);
  8218. data.operations.push(event.type);
  8219. data.oldValue[event.key] = event.oldValue;
  8220. data.newValue[event.key] = event.newValue;
  8221. return data;
  8222. }, {
  8223. oldValue: {},
  8224. keys: [],
  8225. operations: [],
  8226. newValue: {}
  8227. });
  8228. } else {
  8229. return {
  8230. operation: formatDisplay(events.type),
  8231. key: formatDisplay(events.key),
  8232. oldValue: events.oldValue,
  8233. newValue: events.newValue
  8234. };
  8235. }
  8236. }
  8237. function formatMutationType(type2) {
  8238. switch (type2) {
  8239. case MutationType.direct:
  8240. return "mutation";
  8241. case MutationType.patchFunction:
  8242. return "$patch";
  8243. case MutationType.patchObject:
  8244. return "$patch";
  8245. default:
  8246. return "unknown";
  8247. }
  8248. }
  8249. let isTimelineActive = true;
  8250. const componentStateTypes = [];
  8251. const MUTATIONS_LAYER_ID = "pinia:mutations";
  8252. const INSPECTOR_ID = "pinia";
  8253. const { assign: assign$1 } = Object;
  8254. const getStoreType = (id) => "🍍 " + id;
  8255. function registerPiniaDevtools(app, pinia2) {
  8256. setupDevtoolsPlugin({
  8257. id: "dev.esm.pinia",
  8258. label: "Pinia 🍍",
  8259. logo: "https://pinia.vuejs.org/logo.svg",
  8260. packageName: "pinia",
  8261. homepage: "https://pinia.vuejs.org",
  8262. componentStateTypes,
  8263. app
  8264. }, (api) => {
  8265. if (typeof api.now !== "function") {
  8266. 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.");
  8267. }
  8268. api.addTimelineLayer({
  8269. id: MUTATIONS_LAYER_ID,
  8270. label: `Pinia 🍍`,
  8271. color: 15064968
  8272. });
  8273. api.addInspector({
  8274. id: INSPECTOR_ID,
  8275. label: "Pinia 🍍",
  8276. icon: "storage",
  8277. treeFilterPlaceholder: "Search stores",
  8278. actions: [
  8279. {
  8280. icon: "content_copy",
  8281. action: () => {
  8282. actionGlobalCopyState(pinia2);
  8283. },
  8284. tooltip: "Serialize and copy the state"
  8285. },
  8286. {
  8287. icon: "content_paste",
  8288. action: async () => {
  8289. await actionGlobalPasteState(pinia2);
  8290. api.sendInspectorTree(INSPECTOR_ID);
  8291. api.sendInspectorState(INSPECTOR_ID);
  8292. },
  8293. tooltip: "Replace the state with the content of your clipboard"
  8294. },
  8295. {
  8296. icon: "save",
  8297. action: () => {
  8298. actionGlobalSaveState(pinia2);
  8299. },
  8300. tooltip: "Save the state as a JSON file"
  8301. },
  8302. {
  8303. icon: "folder_open",
  8304. action: async () => {
  8305. await actionGlobalOpenStateFile(pinia2);
  8306. api.sendInspectorTree(INSPECTOR_ID);
  8307. api.sendInspectorState(INSPECTOR_ID);
  8308. },
  8309. tooltip: "Import the state from a JSON file"
  8310. }
  8311. ],
  8312. nodeActions: [
  8313. {
  8314. icon: "restore",
  8315. tooltip: 'Reset the state (with "$reset")',
  8316. action: (nodeId) => {
  8317. const store2 = pinia2._s.get(nodeId);
  8318. if (!store2) {
  8319. toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
  8320. } else if (typeof store2.$reset !== "function") {
  8321. toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
  8322. } else {
  8323. store2.$reset();
  8324. toastMessage(`Store "${nodeId}" reset.`);
  8325. }
  8326. }
  8327. }
  8328. ]
  8329. });
  8330. api.on.inspectComponent((payload, ctx) => {
  8331. const proxy = payload.componentInstance && payload.componentInstance.proxy;
  8332. if (proxy && proxy._pStores) {
  8333. const piniaStores = payload.componentInstance.proxy._pStores;
  8334. Object.values(piniaStores).forEach((store2) => {
  8335. payload.instanceData.state.push({
  8336. type: getStoreType(store2.$id),
  8337. key: "state",
  8338. editable: true,
  8339. value: store2._isOptionsAPI ? {
  8340. _custom: {
  8341. value: vue.toRaw(store2.$state),
  8342. actions: [
  8343. {
  8344. icon: "restore",
  8345. tooltip: "Reset the state of this store",
  8346. action: () => store2.$reset()
  8347. }
  8348. ]
  8349. }
  8350. } : (
  8351. // NOTE: workaround to unwrap transferred refs
  8352. Object.keys(store2.$state).reduce((state, key) => {
  8353. state[key] = store2.$state[key];
  8354. return state;
  8355. }, {})
  8356. )
  8357. });
  8358. if (store2._getters && store2._getters.length) {
  8359. payload.instanceData.state.push({
  8360. type: getStoreType(store2.$id),
  8361. key: "getters",
  8362. editable: false,
  8363. value: store2._getters.reduce((getters, key) => {
  8364. try {
  8365. getters[key] = store2[key];
  8366. } catch (error2) {
  8367. getters[key] = error2;
  8368. }
  8369. return getters;
  8370. }, {})
  8371. });
  8372. }
  8373. });
  8374. }
  8375. });
  8376. api.on.getInspectorTree((payload) => {
  8377. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8378. let stores = [pinia2];
  8379. stores = stores.concat(Array.from(pinia2._s.values()));
  8380. 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);
  8381. }
  8382. });
  8383. api.on.getInspectorState((payload) => {
  8384. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8385. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  8386. if (!inspectedStore) {
  8387. return;
  8388. }
  8389. if (inspectedStore) {
  8390. payload.state = formatStoreForInspectorState(inspectedStore);
  8391. }
  8392. }
  8393. });
  8394. api.on.editInspectorState((payload, ctx) => {
  8395. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8396. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  8397. if (!inspectedStore) {
  8398. return toastMessage(`store "${payload.nodeId}" not found`, "error");
  8399. }
  8400. const { path } = payload;
  8401. if (!isPinia(inspectedStore)) {
  8402. if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
  8403. path.unshift("$state");
  8404. }
  8405. } else {
  8406. path.unshift("state");
  8407. }
  8408. isTimelineActive = false;
  8409. payload.set(inspectedStore, path, payload.state.value);
  8410. isTimelineActive = true;
  8411. }
  8412. });
  8413. api.on.editComponentState((payload) => {
  8414. if (payload.type.startsWith("🍍")) {
  8415. const storeId = payload.type.replace(/^🍍\s*/, "");
  8416. const store2 = pinia2._s.get(storeId);
  8417. if (!store2) {
  8418. return toastMessage(`store "${storeId}" not found`, "error");
  8419. }
  8420. const { path } = payload;
  8421. if (path[0] !== "state") {
  8422. return toastMessage(`Invalid path for store "${storeId}":
  8423. ${path}
  8424. Only state can be modified.`);
  8425. }
  8426. path[0] = "$state";
  8427. isTimelineActive = false;
  8428. payload.set(store2, path, payload.state.value);
  8429. isTimelineActive = true;
  8430. }
  8431. });
  8432. });
  8433. }
  8434. function addStoreToDevtools(app, store2) {
  8435. if (!componentStateTypes.includes(getStoreType(store2.$id))) {
  8436. componentStateTypes.push(getStoreType(store2.$id));
  8437. }
  8438. setupDevtoolsPlugin({
  8439. id: "dev.esm.pinia",
  8440. label: "Pinia 🍍",
  8441. logo: "https://pinia.vuejs.org/logo.svg",
  8442. packageName: "pinia",
  8443. homepage: "https://pinia.vuejs.org",
  8444. componentStateTypes,
  8445. app,
  8446. settings: {
  8447. logStoreChanges: {
  8448. label: "Notify about new/deleted stores",
  8449. type: "boolean",
  8450. defaultValue: true
  8451. }
  8452. // useEmojis: {
  8453. // label: 'Use emojis in messages ⚡️',
  8454. // type: 'boolean',
  8455. // defaultValue: true,
  8456. // },
  8457. }
  8458. }, (api) => {
  8459. const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
  8460. store2.$onAction(({ after, onError, name, args }) => {
  8461. const groupId = runningActionId++;
  8462. api.addTimelineEvent({
  8463. layerId: MUTATIONS_LAYER_ID,
  8464. event: {
  8465. time: now2(),
  8466. title: "🛫 " + name,
  8467. subtitle: "start",
  8468. data: {
  8469. store: formatDisplay(store2.$id),
  8470. action: formatDisplay(name),
  8471. args
  8472. },
  8473. groupId
  8474. }
  8475. });
  8476. after((result) => {
  8477. activeAction = void 0;
  8478. api.addTimelineEvent({
  8479. layerId: MUTATIONS_LAYER_ID,
  8480. event: {
  8481. time: now2(),
  8482. title: "🛬 " + name,
  8483. subtitle: "end",
  8484. data: {
  8485. store: formatDisplay(store2.$id),
  8486. action: formatDisplay(name),
  8487. args,
  8488. result
  8489. },
  8490. groupId
  8491. }
  8492. });
  8493. });
  8494. onError((error2) => {
  8495. activeAction = void 0;
  8496. api.addTimelineEvent({
  8497. layerId: MUTATIONS_LAYER_ID,
  8498. event: {
  8499. time: now2(),
  8500. logType: "error",
  8501. title: "💥 " + name,
  8502. subtitle: "end",
  8503. data: {
  8504. store: formatDisplay(store2.$id),
  8505. action: formatDisplay(name),
  8506. args,
  8507. error: error2
  8508. },
  8509. groupId
  8510. }
  8511. });
  8512. });
  8513. }, true);
  8514. store2._customProperties.forEach((name) => {
  8515. vue.watch(() => vue.unref(store2[name]), (newValue, oldValue) => {
  8516. api.notifyComponentUpdate();
  8517. api.sendInspectorState(INSPECTOR_ID);
  8518. if (isTimelineActive) {
  8519. api.addTimelineEvent({
  8520. layerId: MUTATIONS_LAYER_ID,
  8521. event: {
  8522. time: now2(),
  8523. title: "Change",
  8524. subtitle: name,
  8525. data: {
  8526. newValue,
  8527. oldValue
  8528. },
  8529. groupId: activeAction
  8530. }
  8531. });
  8532. }
  8533. }, { deep: true });
  8534. });
  8535. store2.$subscribe(({ events, type: type2 }, state) => {
  8536. api.notifyComponentUpdate();
  8537. api.sendInspectorState(INSPECTOR_ID);
  8538. if (!isTimelineActive)
  8539. return;
  8540. const eventData = {
  8541. time: now2(),
  8542. title: formatMutationType(type2),
  8543. data: assign$1({ store: formatDisplay(store2.$id) }, formatEventData(events)),
  8544. groupId: activeAction
  8545. };
  8546. if (type2 === MutationType.patchFunction) {
  8547. eventData.subtitle = "⤵️";
  8548. } else if (type2 === MutationType.patchObject) {
  8549. eventData.subtitle = "🧩";
  8550. } else if (events && !Array.isArray(events)) {
  8551. eventData.subtitle = events.type;
  8552. }
  8553. if (events) {
  8554. eventData.data["rawEvent(s)"] = {
  8555. _custom: {
  8556. display: "DebuggerEvent",
  8557. type: "object",
  8558. tooltip: "raw DebuggerEvent[]",
  8559. value: events
  8560. }
  8561. };
  8562. }
  8563. api.addTimelineEvent({
  8564. layerId: MUTATIONS_LAYER_ID,
  8565. event: eventData
  8566. });
  8567. }, { detached: true, flush: "sync" });
  8568. const hotUpdate = store2._hotUpdate;
  8569. store2._hotUpdate = vue.markRaw((newStore) => {
  8570. hotUpdate(newStore);
  8571. api.addTimelineEvent({
  8572. layerId: MUTATIONS_LAYER_ID,
  8573. event: {
  8574. time: now2(),
  8575. title: "🔥 " + store2.$id,
  8576. subtitle: "HMR update",
  8577. data: {
  8578. store: formatDisplay(store2.$id),
  8579. info: formatDisplay(`HMR update`)
  8580. }
  8581. }
  8582. });
  8583. api.notifyComponentUpdate();
  8584. api.sendInspectorTree(INSPECTOR_ID);
  8585. api.sendInspectorState(INSPECTOR_ID);
  8586. });
  8587. const { $dispose } = store2;
  8588. store2.$dispose = () => {
  8589. $dispose();
  8590. api.notifyComponentUpdate();
  8591. api.sendInspectorTree(INSPECTOR_ID);
  8592. api.sendInspectorState(INSPECTOR_ID);
  8593. api.getSettings().logStoreChanges && toastMessage(`Disposed "${store2.$id}" store 🗑`);
  8594. };
  8595. api.notifyComponentUpdate();
  8596. api.sendInspectorTree(INSPECTOR_ID);
  8597. api.sendInspectorState(INSPECTOR_ID);
  8598. api.getSettings().logStoreChanges && toastMessage(`"${store2.$id}" store installed 🆕`);
  8599. });
  8600. }
  8601. let runningActionId = 0;
  8602. let activeAction;
  8603. function patchActionForGrouping(store2, actionNames, wrapWithProxy) {
  8604. const actions = actionNames.reduce((storeActions, actionName) => {
  8605. storeActions[actionName] = vue.toRaw(store2)[actionName];
  8606. return storeActions;
  8607. }, {});
  8608. for (const actionName in actions) {
  8609. store2[actionName] = function() {
  8610. const _actionId = runningActionId;
  8611. const trackedStore = wrapWithProxy ? new Proxy(store2, {
  8612. get(...args) {
  8613. activeAction = _actionId;
  8614. return Reflect.get(...args);
  8615. },
  8616. set(...args) {
  8617. activeAction = _actionId;
  8618. return Reflect.set(...args);
  8619. }
  8620. }) : store2;
  8621. activeAction = _actionId;
  8622. const retValue = actions[actionName].apply(trackedStore, arguments);
  8623. activeAction = void 0;
  8624. return retValue;
  8625. };
  8626. }
  8627. }
  8628. function devtoolsPlugin({ app, store: store2, options }) {
  8629. if (store2.$id.startsWith("__hot:")) {
  8630. return;
  8631. }
  8632. store2._isOptionsAPI = !!options.state;
  8633. patchActionForGrouping(store2, Object.keys(options.actions), store2._isOptionsAPI);
  8634. const originalHotUpdate = store2._hotUpdate;
  8635. vue.toRaw(store2)._hotUpdate = function(newStore) {
  8636. originalHotUpdate.apply(this, arguments);
  8637. patchActionForGrouping(store2, Object.keys(newStore._hmrPayload.actions), !!store2._isOptionsAPI);
  8638. };
  8639. addStoreToDevtools(
  8640. app,
  8641. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  8642. store2
  8643. );
  8644. }
  8645. function createPinia() {
  8646. const scope = vue.effectScope(true);
  8647. const state = scope.run(() => vue.ref({}));
  8648. let _p = [];
  8649. let toBeInstalled = [];
  8650. const pinia2 = vue.markRaw({
  8651. install(app) {
  8652. setActivePinia(pinia2);
  8653. {
  8654. pinia2._a = app;
  8655. app.provide(piniaSymbol, pinia2);
  8656. app.config.globalProperties.$pinia = pinia2;
  8657. if (USE_DEVTOOLS) {
  8658. registerPiniaDevtools(app, pinia2);
  8659. }
  8660. toBeInstalled.forEach((plugin) => _p.push(plugin));
  8661. toBeInstalled = [];
  8662. }
  8663. },
  8664. use(plugin) {
  8665. if (!this._a && !isVue2) {
  8666. toBeInstalled.push(plugin);
  8667. } else {
  8668. _p.push(plugin);
  8669. }
  8670. return this;
  8671. },
  8672. _p,
  8673. // it's actually undefined here
  8674. // @ts-expect-error
  8675. _a: null,
  8676. _e: scope,
  8677. _s: /* @__PURE__ */ new Map(),
  8678. state
  8679. });
  8680. if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
  8681. pinia2.use(devtoolsPlugin);
  8682. }
  8683. return pinia2;
  8684. }
  8685. function patchObject(newState, oldState) {
  8686. for (const key in oldState) {
  8687. const subPatch = oldState[key];
  8688. if (!(key in newState)) {
  8689. continue;
  8690. }
  8691. const targetValue = newState[key];
  8692. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  8693. newState[key] = patchObject(targetValue, subPatch);
  8694. } else {
  8695. {
  8696. newState[key] = subPatch;
  8697. }
  8698. }
  8699. }
  8700. return newState;
  8701. }
  8702. const noop = () => {
  8703. };
  8704. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  8705. subscriptions.push(callback);
  8706. const removeSubscription = () => {
  8707. const idx = subscriptions.indexOf(callback);
  8708. if (idx > -1) {
  8709. subscriptions.splice(idx, 1);
  8710. onCleanup();
  8711. }
  8712. };
  8713. if (!detached && vue.getCurrentScope()) {
  8714. vue.onScopeDispose(removeSubscription);
  8715. }
  8716. return removeSubscription;
  8717. }
  8718. function triggerSubscriptions(subscriptions, ...args) {
  8719. subscriptions.slice().forEach((callback) => {
  8720. callback(...args);
  8721. });
  8722. }
  8723. const fallbackRunWithContext = (fn) => fn();
  8724. function mergeReactiveObjects(target, patchToApply) {
  8725. if (target instanceof Map && patchToApply instanceof Map) {
  8726. patchToApply.forEach((value2, key) => target.set(key, value2));
  8727. }
  8728. if (target instanceof Set && patchToApply instanceof Set) {
  8729. patchToApply.forEach(target.add, target);
  8730. }
  8731. for (const key in patchToApply) {
  8732. if (!patchToApply.hasOwnProperty(key))
  8733. continue;
  8734. const subPatch = patchToApply[key];
  8735. const targetValue = target[key];
  8736. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  8737. target[key] = mergeReactiveObjects(targetValue, subPatch);
  8738. } else {
  8739. target[key] = subPatch;
  8740. }
  8741. }
  8742. return target;
  8743. }
  8744. const skipHydrateSymbol = Symbol("pinia:skipHydration");
  8745. function shouldHydrate(obj) {
  8746. return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  8747. }
  8748. const { assign } = Object;
  8749. function isComputed(o) {
  8750. return !!(vue.isRef(o) && o.effect);
  8751. }
  8752. function createOptionsStore(id, options, pinia2, hot) {
  8753. const { state, actions, getters } = options;
  8754. const initialState = pinia2.state.value[id];
  8755. let store2;
  8756. function setup() {
  8757. if (!initialState && !hot) {
  8758. {
  8759. pinia2.state.value[id] = state ? state() : {};
  8760. }
  8761. }
  8762. const localState = hot ? (
  8763. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  8764. vue.toRefs(vue.ref(state ? state() : {}).value)
  8765. ) : vue.toRefs(pinia2.state.value[id]);
  8766. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  8767. if (name in localState) {
  8768. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
  8769. }
  8770. computedGetters[name] = vue.markRaw(vue.computed(() => {
  8771. setActivePinia(pinia2);
  8772. const store22 = pinia2._s.get(id);
  8773. return getters[name].call(store22, store22);
  8774. }));
  8775. return computedGetters;
  8776. }, {}));
  8777. }
  8778. store2 = createSetupStore(id, setup, options, pinia2, hot, true);
  8779. return store2;
  8780. }
  8781. function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {
  8782. let scope;
  8783. const optionsForPlugin = assign({ actions: {} }, options);
  8784. if (!pinia2._e.active) {
  8785. throw new Error("Pinia destroyed");
  8786. }
  8787. const $subscribeOptions = {
  8788. deep: true
  8789. // flush: 'post',
  8790. };
  8791. {
  8792. $subscribeOptions.onTrigger = (event) => {
  8793. if (isListening) {
  8794. debuggerEvents = event;
  8795. } else if (isListening == false && !store2._hotUpdating) {
  8796. if (Array.isArray(debuggerEvents)) {
  8797. debuggerEvents.push(event);
  8798. } else {
  8799. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  8800. }
  8801. }
  8802. };
  8803. }
  8804. let isListening;
  8805. let isSyncListening;
  8806. let subscriptions = [];
  8807. let actionSubscriptions = [];
  8808. let debuggerEvents;
  8809. const initialState = pinia2.state.value[$id];
  8810. if (!isOptionsStore && !initialState && !hot) {
  8811. {
  8812. pinia2.state.value[$id] = {};
  8813. }
  8814. }
  8815. const hotState = vue.ref({});
  8816. let activeListener;
  8817. function $patch(partialStateOrMutator) {
  8818. let subscriptionMutation;
  8819. isListening = isSyncListening = false;
  8820. {
  8821. debuggerEvents = [];
  8822. }
  8823. if (typeof partialStateOrMutator === "function") {
  8824. partialStateOrMutator(pinia2.state.value[$id]);
  8825. subscriptionMutation = {
  8826. type: MutationType.patchFunction,
  8827. storeId: $id,
  8828. events: debuggerEvents
  8829. };
  8830. } else {
  8831. mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);
  8832. subscriptionMutation = {
  8833. type: MutationType.patchObject,
  8834. payload: partialStateOrMutator,
  8835. storeId: $id,
  8836. events: debuggerEvents
  8837. };
  8838. }
  8839. const myListenerId = activeListener = Symbol();
  8840. vue.nextTick().then(() => {
  8841. if (activeListener === myListenerId) {
  8842. isListening = true;
  8843. }
  8844. });
  8845. isSyncListening = true;
  8846. triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);
  8847. }
  8848. const $reset = isOptionsStore ? function $reset2() {
  8849. const { state } = options;
  8850. const newState = state ? state() : {};
  8851. this.$patch(($state) => {
  8852. assign($state, newState);
  8853. });
  8854. } : (
  8855. /* istanbul ignore next */
  8856. () => {
  8857. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  8858. }
  8859. );
  8860. function $dispose() {
  8861. scope.stop();
  8862. subscriptions = [];
  8863. actionSubscriptions = [];
  8864. pinia2._s.delete($id);
  8865. }
  8866. function wrapAction(name, action) {
  8867. return function() {
  8868. setActivePinia(pinia2);
  8869. const args = Array.from(arguments);
  8870. const afterCallbackList = [];
  8871. const onErrorCallbackList = [];
  8872. function after(callback) {
  8873. afterCallbackList.push(callback);
  8874. }
  8875. function onError(callback) {
  8876. onErrorCallbackList.push(callback);
  8877. }
  8878. triggerSubscriptions(actionSubscriptions, {
  8879. args,
  8880. name,
  8881. store: store2,
  8882. after,
  8883. onError
  8884. });
  8885. let ret;
  8886. try {
  8887. ret = action.apply(this && this.$id === $id ? this : store2, args);
  8888. } catch (error2) {
  8889. triggerSubscriptions(onErrorCallbackList, error2);
  8890. throw error2;
  8891. }
  8892. if (ret instanceof Promise) {
  8893. return ret.then((value2) => {
  8894. triggerSubscriptions(afterCallbackList, value2);
  8895. return value2;
  8896. }).catch((error2) => {
  8897. triggerSubscriptions(onErrorCallbackList, error2);
  8898. return Promise.reject(error2);
  8899. });
  8900. }
  8901. triggerSubscriptions(afterCallbackList, ret);
  8902. return ret;
  8903. };
  8904. }
  8905. const _hmrPayload = /* @__PURE__ */ vue.markRaw({
  8906. actions: {},
  8907. getters: {},
  8908. state: [],
  8909. hotState
  8910. });
  8911. const partialStore = {
  8912. _p: pinia2,
  8913. // _s: scope,
  8914. $id,
  8915. $onAction: addSubscription.bind(null, actionSubscriptions),
  8916. $patch,
  8917. $reset,
  8918. $subscribe(callback, options2 = {}) {
  8919. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  8920. const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => {
  8921. if (options2.flush === "sync" ? isSyncListening : isListening) {
  8922. callback({
  8923. storeId: $id,
  8924. type: MutationType.direct,
  8925. events: debuggerEvents
  8926. }, state);
  8927. }
  8928. }, assign({}, $subscribeOptions, options2)));
  8929. return removeSubscription;
  8930. },
  8931. $dispose
  8932. };
  8933. const store2 = vue.reactive(assign(
  8934. {
  8935. _hmrPayload,
  8936. _customProperties: vue.markRaw(/* @__PURE__ */ new Set())
  8937. // devtools custom properties
  8938. },
  8939. partialStore
  8940. // must be added later
  8941. // setupStore
  8942. ));
  8943. pinia2._s.set($id, store2);
  8944. const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;
  8945. const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup)));
  8946. for (const key in setupStore) {
  8947. const prop = setupStore[key];
  8948. if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) {
  8949. if (hot) {
  8950. set(hotState.value, key, vue.toRef(setupStore, key));
  8951. } else if (!isOptionsStore) {
  8952. if (initialState && shouldHydrate(prop)) {
  8953. if (vue.isRef(prop)) {
  8954. prop.value = initialState[key];
  8955. } else {
  8956. mergeReactiveObjects(prop, initialState[key]);
  8957. }
  8958. }
  8959. {
  8960. pinia2.state.value[$id][key] = prop;
  8961. }
  8962. }
  8963. {
  8964. _hmrPayload.state.push(key);
  8965. }
  8966. } else if (typeof prop === "function") {
  8967. const actionValue = hot ? prop : wrapAction(key, prop);
  8968. {
  8969. setupStore[key] = actionValue;
  8970. }
  8971. {
  8972. _hmrPayload.actions[key] = prop;
  8973. }
  8974. optionsForPlugin.actions[key] = prop;
  8975. } else {
  8976. if (isComputed(prop)) {
  8977. _hmrPayload.getters[key] = isOptionsStore ? (
  8978. // @ts-expect-error
  8979. options.getters[key]
  8980. ) : prop;
  8981. if (IS_CLIENT) {
  8982. const getters = setupStore._getters || // @ts-expect-error: same
  8983. (setupStore._getters = vue.markRaw([]));
  8984. getters.push(key);
  8985. }
  8986. }
  8987. }
  8988. }
  8989. {
  8990. assign(store2, setupStore);
  8991. assign(vue.toRaw(store2), setupStore);
  8992. }
  8993. Object.defineProperty(store2, "$state", {
  8994. get: () => hot ? hotState.value : pinia2.state.value[$id],
  8995. set: (state) => {
  8996. if (hot) {
  8997. throw new Error("cannot set hotState");
  8998. }
  8999. $patch(($state) => {
  9000. assign($state, state);
  9001. });
  9002. }
  9003. });
  9004. {
  9005. store2._hotUpdate = vue.markRaw((newStore) => {
  9006. store2._hotUpdating = true;
  9007. newStore._hmrPayload.state.forEach((stateKey) => {
  9008. if (stateKey in store2.$state) {
  9009. const newStateTarget = newStore.$state[stateKey];
  9010. const oldStateSource = store2.$state[stateKey];
  9011. if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) {
  9012. patchObject(newStateTarget, oldStateSource);
  9013. } else {
  9014. newStore.$state[stateKey] = oldStateSource;
  9015. }
  9016. }
  9017. set(store2, stateKey, vue.toRef(newStore.$state, stateKey));
  9018. });
  9019. Object.keys(store2.$state).forEach((stateKey) => {
  9020. if (!(stateKey in newStore.$state)) {
  9021. del(store2, stateKey);
  9022. }
  9023. });
  9024. isListening = false;
  9025. isSyncListening = false;
  9026. pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState");
  9027. isSyncListening = true;
  9028. vue.nextTick().then(() => {
  9029. isListening = true;
  9030. });
  9031. for (const actionName in newStore._hmrPayload.actions) {
  9032. const action = newStore[actionName];
  9033. set(store2, actionName, wrapAction(actionName, action));
  9034. }
  9035. for (const getterName in newStore._hmrPayload.getters) {
  9036. const getter = newStore._hmrPayload.getters[getterName];
  9037. const getterValue = isOptionsStore ? (
  9038. // special handling of options api
  9039. vue.computed(() => {
  9040. setActivePinia(pinia2);
  9041. return getter.call(store2, store2);
  9042. })
  9043. ) : getter;
  9044. set(store2, getterName, getterValue);
  9045. }
  9046. Object.keys(store2._hmrPayload.getters).forEach((key) => {
  9047. if (!(key in newStore._hmrPayload.getters)) {
  9048. del(store2, key);
  9049. }
  9050. });
  9051. Object.keys(store2._hmrPayload.actions).forEach((key) => {
  9052. if (!(key in newStore._hmrPayload.actions)) {
  9053. del(store2, key);
  9054. }
  9055. });
  9056. store2._hmrPayload = newStore._hmrPayload;
  9057. store2._getters = newStore._getters;
  9058. store2._hotUpdating = false;
  9059. });
  9060. }
  9061. if (USE_DEVTOOLS) {
  9062. const nonEnumerable = {
  9063. writable: true,
  9064. configurable: true,
  9065. // avoid warning on devtools trying to display this property
  9066. enumerable: false
  9067. };
  9068. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
  9069. Object.defineProperty(store2, p, assign({ value: store2[p] }, nonEnumerable));
  9070. });
  9071. }
  9072. pinia2._p.forEach((extender) => {
  9073. if (USE_DEVTOOLS) {
  9074. const extensions = scope.run(() => extender({
  9075. store: store2,
  9076. app: pinia2._a,
  9077. pinia: pinia2,
  9078. options: optionsForPlugin
  9079. }));
  9080. Object.keys(extensions || {}).forEach((key) => store2._customProperties.add(key));
  9081. assign(store2, extensions);
  9082. } else {
  9083. assign(store2, scope.run(() => extender({
  9084. store: store2,
  9085. app: pinia2._a,
  9086. pinia: pinia2,
  9087. options: optionsForPlugin
  9088. })));
  9089. }
  9090. });
  9091. if (store2.$state && typeof store2.$state === "object" && typeof store2.$state.constructor === "function" && !store2.$state.constructor.toString().includes("[native code]")) {
  9092. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  9093. state: () => new MyClass()
  9094. Found in store "${store2.$id}".`);
  9095. }
  9096. if (initialState && isOptionsStore && options.hydrate) {
  9097. options.hydrate(store2.$state, initialState);
  9098. }
  9099. isListening = true;
  9100. isSyncListening = true;
  9101. return store2;
  9102. }
  9103. function defineStore(idOrOptions, setup, setupOptions) {
  9104. let id;
  9105. let options;
  9106. const isSetupStore = typeof setup === "function";
  9107. if (typeof idOrOptions === "string") {
  9108. id = idOrOptions;
  9109. options = isSetupStore ? setupOptions : setup;
  9110. } else {
  9111. options = idOrOptions;
  9112. id = idOrOptions.id;
  9113. if (typeof id !== "string") {
  9114. throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
  9115. }
  9116. }
  9117. function useStore2(pinia2, hot) {
  9118. const hasContext = vue.hasInjectionContext();
  9119. pinia2 = // in test mode, ignore the argument provided as we can always retrieve a
  9120. // pinia instance with getActivePinia()
  9121. pinia2 || (hasContext ? vue.inject(piniaSymbol, null) : null);
  9122. if (pinia2)
  9123. setActivePinia(pinia2);
  9124. if (!activePinia) {
  9125. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
  9126. See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
  9127. This will fail in production.`);
  9128. }
  9129. pinia2 = activePinia;
  9130. if (!pinia2._s.has(id)) {
  9131. if (isSetupStore) {
  9132. createSetupStore(id, setup, options, pinia2);
  9133. } else {
  9134. createOptionsStore(id, options, pinia2);
  9135. }
  9136. {
  9137. useStore2._pinia = pinia2;
  9138. }
  9139. }
  9140. const store2 = pinia2._s.get(id);
  9141. if (hot) {
  9142. const hotId = "__hot:" + id;
  9143. const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign({}, options), pinia2, true);
  9144. hot._hotUpdate(newStore);
  9145. delete pinia2.state.value[hotId];
  9146. pinia2._s.delete(hotId);
  9147. }
  9148. if (IS_CLIENT) {
  9149. const currentInstance = vue.getCurrentInstance();
  9150. if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
  9151. !hot) {
  9152. const vm = currentInstance.proxy;
  9153. const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  9154. cache[id] = store2;
  9155. }
  9156. }
  9157. return store2;
  9158. }
  9159. useStore2.$id = id;
  9160. return useStore2;
  9161. }
  9162. const useStore = defineStore("user", {
  9163. state: () => ({
  9164. userInfo: {},
  9165. // 用户信息
  9166. token: "",
  9167. // uploadUrl: 'http://192.168.1.3:8080/ai-file/upload/oss', // 上传资源的服务器网址
  9168. uploadUrl: "https://gc.sdzcq.com/prod-api/ai-file/upload/oss"
  9169. // 上传资源的服务器网址
  9170. }),
  9171. getters: {},
  9172. actions: {
  9173. setUserInfo(data) {
  9174. if (data.userId) {
  9175. formatAppLog("log", "at store/uses.js:16", "更新全局的用户信息-也更新本地存储", data);
  9176. this.userInfo = data;
  9177. uni.setStorageSync("userInfo", data);
  9178. } else {
  9179. uni.removeStorageSync("userInfo");
  9180. }
  9181. },
  9182. setToken(token) {
  9183. if (token) {
  9184. formatAppLog("log", "at store/uses.js:25", "更新全局的 token -也更新本地存储", token);
  9185. this.token = token;
  9186. uni.setStorageSync("token", token);
  9187. } else {
  9188. uni.removeStorageSync("token");
  9189. }
  9190. }
  9191. }
  9192. });
  9193. const pinia = createPinia();
  9194. const store = useStore(pinia);
  9195. const _sfc_main$1L = {
  9196. __name: "index",
  9197. props: {
  9198. request: {
  9199. type: Function
  9200. },
  9201. requestStr: {
  9202. type: String
  9203. },
  9204. isRefresh: {
  9205. type: [Number, Boolean],
  9206. default: 0
  9207. },
  9208. height: {
  9209. type: [String, Number]
  9210. },
  9211. total: {
  9212. type: [Number],
  9213. default: 0
  9214. },
  9215. otherParams: {
  9216. type: Object,
  9217. default: () => ({})
  9218. },
  9219. diffHeight: {
  9220. type: Number,
  9221. default: 0
  9222. },
  9223. immediate: {
  9224. type: Boolean,
  9225. default: false
  9226. },
  9227. method: {
  9228. type: String,
  9229. default: "get"
  9230. },
  9231. isUpAutoLoad: {
  9232. type: Boolean,
  9233. default: true
  9234. }
  9235. },
  9236. emits: ["updateList", "update:total"],
  9237. setup(__props, { expose: __expose, emit: __emit }) {
  9238. const {
  9239. mescrollInit,
  9240. downCallback,
  9241. getMescroll
  9242. } = useMescroll();
  9243. const windowHeight = vue.computed(() => {
  9244. return store.clientHeight - props2.diffHeight;
  9245. });
  9246. const emit2 = __emit;
  9247. const props2 = __props;
  9248. const list = vue.ref([]);
  9249. const getList = (mescroll) => {
  9250. return new Promise((resolve, reject) => {
  9251. let params = {
  9252. pageNum: mescroll.num,
  9253. pageSize: mescroll.size,
  9254. ...props2.otherParams
  9255. };
  9256. let methods = props2.method == "post" ? uni.$u.http.post(props2.requestStr, params) : uni.$u.http.get(props2.requestStr, {
  9257. params
  9258. });
  9259. methods.then((res2) => {
  9260. emit2("update:total", res2.total);
  9261. resolve(res2);
  9262. });
  9263. });
  9264. };
  9265. const upCallback = (mescroll) => {
  9266. formatAppLog("log", "at components/pageScroll/index.vue:99", mescroll, "mescroll");
  9267. if (!props2.requestStr)
  9268. return;
  9269. getList(mescroll).then((res2) => {
  9270. const curPageData = res2.rows || res2.data || [];
  9271. if (mescroll.num == 1)
  9272. list.value = [];
  9273. list.value = list.value.concat(curPageData);
  9274. emit2("updateList", list.value, mescroll.num);
  9275. mescroll.endBySize(curPageData.length, res2.total);
  9276. }).catch(() => {
  9277. mescroll.endErr();
  9278. });
  9279. };
  9280. const resetUpScroll = () => {
  9281. setTimeout(() => {
  9282. getMescroll().resetUpScroll();
  9283. }, 100);
  9284. };
  9285. const scroll = (e) => {
  9286. emit2("scroll", e);
  9287. };
  9288. __expose({
  9289. resetUpScroll
  9290. });
  9291. 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() {
  9292. return onShow;
  9293. }, get useMescroll() {
  9294. return useMescroll;
  9295. }, get store() {
  9296. return store;
  9297. } };
  9298. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9299. return __returned__;
  9300. }
  9301. };
  9302. function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
  9303. const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$a);
  9304. return vue.openBlock(), vue.createBlock(_component_mescroll_uni, {
  9305. onInit: $setup.mescrollInit,
  9306. onDown: $setup.downCallback,
  9307. onUp: $setup.upCallback,
  9308. height: $props.height || $setup.windowHeight + "px",
  9309. up: { textNoMore: "-- 没有更多了 --", auto: $props.isUpAutoLoad },
  9310. down: { auto: $props.isUpAutoLoad }
  9311. }, {
  9312. default: vue.withCtx(() => [
  9313. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9314. ]),
  9315. _: 3
  9316. /* FORWARDED */
  9317. }, 8, ["onInit", "onDown", "height", "up", "down"]);
  9318. }
  9319. const pageScroll = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-30bc23e1"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/pageScroll/index.vue"]]);
  9320. const _sfc_main$1K = {
  9321. __name: "index",
  9322. setup(__props, { expose: __expose }) {
  9323. __expose();
  9324. const statusList = vue.ref([
  9325. {
  9326. label: "待初审",
  9327. value: "1361",
  9328. path: "/pages/order/stat/pending-review"
  9329. },
  9330. {
  9331. label: "待拣件",
  9332. value: "1361",
  9333. path: "/pages/order/stat/pending-pick"
  9334. },
  9335. {
  9336. label: "已拣件待签收",
  9337. value: "1361",
  9338. path: "/pages/order/stat/pending-sign"
  9339. },
  9340. {
  9341. label: "待确认收货",
  9342. value: "1361",
  9343. path: "/pages/order/stat/pending-confirm"
  9344. },
  9345. {
  9346. label: "已到货待审核",
  9347. value: "1361",
  9348. path: "/pages/order/stat/pending-audit"
  9349. },
  9350. {
  9351. label: "待付款",
  9352. value: "1361",
  9353. path: "/pages/order/stat/pending-payment"
  9354. }
  9355. ]);
  9356. const navigateToDetail = (path) => {
  9357. uni.navigateTo({
  9358. url: path
  9359. });
  9360. };
  9361. const __returned__ = { statusList, navigateToDetail, PageScroll: pageScroll, ref: vue.ref };
  9362. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9363. return __returned__;
  9364. }
  9365. };
  9366. function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
  9367. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  9368. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  9369. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  9370. return vue.openBlock(), vue.createElementBlock("view", { class: "order-statistics" }, [
  9371. vue.createCommentVNode(" 顶部统计卡片 "),
  9372. vue.createElementVNode("view", { class: "overview-card" }, [
  9373. vue.createElementVNode("view", { class: "overview-grid" }, [
  9374. vue.createElementVNode("view", { class: "grid-item" }, [
  9375. vue.createElementVNode("text", { class: "item-label" }, "今日订单"),
  9376. vue.createElementVNode("text", { class: "item-value" }, "1361")
  9377. ]),
  9378. vue.createElementVNode("view", { class: "grid-item" }, [
  9379. vue.createElementVNode("text", { class: "item-label" }, "昨日订单"),
  9380. vue.createElementVNode("text", { class: "item-value" }, "1361")
  9381. ]),
  9382. vue.createElementVNode("view", { class: "grid-item" }, [
  9383. vue.createElementVNode("text", { class: "item-label" }, "本月订单"),
  9384. vue.createElementVNode("text", { class: "item-value" }, [
  9385. vue.createTextVNode("2.77"),
  9386. vue.createElementVNode("text", { class: "unit" }, "万")
  9387. ])
  9388. ])
  9389. ])
  9390. ]),
  9391. vue.createCommentVNode(" 订单状态网格 "),
  9392. vue.createElementVNode("view", { class: "status-grid" }, [
  9393. (vue.openBlock(true), vue.createElementBlock(
  9394. vue.Fragment,
  9395. null,
  9396. vue.renderList($setup.statusList, (item, index2) => {
  9397. return vue.openBlock(), vue.createElementBlock("view", {
  9398. key: index2,
  9399. class: "status-item",
  9400. onClick: ($event) => $setup.navigateToDetail(item.path)
  9401. }, [
  9402. vue.createElementVNode("view", { class: "status-content" }, [
  9403. vue.createElementVNode(
  9404. "text",
  9405. { class: "status-label" },
  9406. vue.toDisplayString(item.label),
  9407. 1
  9408. /* TEXT */
  9409. ),
  9410. vue.createElementVNode("view", { class: "status-value-wrap" }, [
  9411. vue.createElementVNode(
  9412. "text",
  9413. { class: "status-value" },
  9414. vue.toDisplayString(item.value),
  9415. 1
  9416. /* TEXT */
  9417. ),
  9418. vue.createVNode(_component_u_icon, {
  9419. name: "arrow-right",
  9420. color: "#999",
  9421. size: "14"
  9422. })
  9423. ])
  9424. ])
  9425. ], 8, ["onClick"]);
  9426. }),
  9427. 128
  9428. /* KEYED_FRAGMENT */
  9429. ))
  9430. ]),
  9431. vue.createCommentVNode(" 底部操作项 "),
  9432. vue.createElementVNode("view", { class: "bottom-actions" }, [
  9433. vue.createVNode(_component_u_cell_group, { border: false }, {
  9434. default: vue.withCtx(() => [
  9435. vue.createVNode(_component_u_cell, {
  9436. title: "收货统计",
  9437. isLink: "",
  9438. onClick: _cache[0] || (_cache[0] = ($event) => $setup.navigateToDetail("/pages/statistics/receive"))
  9439. }),
  9440. vue.createVNode(_component_u_cell, {
  9441. title: "全部订单",
  9442. isLink: "",
  9443. onClick: _cache[1] || (_cache[1] = ($event) => $setup.navigateToDetail("/pages/order/stat/all")),
  9444. border: false
  9445. })
  9446. ]),
  9447. _: 1
  9448. /* STABLE */
  9449. })
  9450. ])
  9451. ]);
  9452. }
  9453. const PagesOrderIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-17a44f9d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/index.vue"]]);
  9454. const props$r = {
  9455. props: {
  9456. // 搜索框形状,round-圆形,square-方形
  9457. shape: {
  9458. type: String,
  9459. default: props$E.search.shape
  9460. },
  9461. // 搜索框背景色,默认值#f2f2f2
  9462. bgColor: {
  9463. type: String,
  9464. default: props$E.search.bgColor
  9465. },
  9466. // 占位提示文字
  9467. placeholder: {
  9468. type: String,
  9469. default: props$E.search.placeholder
  9470. },
  9471. // 是否启用清除控件
  9472. clearabled: {
  9473. type: Boolean,
  9474. default: props$E.search.clearabled
  9475. },
  9476. // 是否自动聚焦
  9477. focus: {
  9478. type: Boolean,
  9479. default: props$E.search.focus
  9480. },
  9481. // 是否在搜索框右侧显示取消按钮
  9482. showAction: {
  9483. type: Boolean,
  9484. default: props$E.search.showAction
  9485. },
  9486. // 右边控件的样式
  9487. actionStyle: {
  9488. type: Object,
  9489. default: props$E.search.actionStyle
  9490. },
  9491. // 取消按钮文字
  9492. actionText: {
  9493. type: String,
  9494. default: props$E.search.actionText
  9495. },
  9496. // 输入框内容对齐方式,可选值为 left|center|right
  9497. inputAlign: {
  9498. type: String,
  9499. default: props$E.search.inputAlign
  9500. },
  9501. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  9502. inputStyle: {
  9503. type: Object,
  9504. default: props$E.search.inputStyle
  9505. },
  9506. // 是否启用输入框
  9507. disabled: {
  9508. type: Boolean,
  9509. default: props$E.search.disabled
  9510. },
  9511. // 边框颜色
  9512. borderColor: {
  9513. type: String,
  9514. default: props$E.search.borderColor
  9515. },
  9516. // 搜索图标的颜色,默认同输入框字体颜色
  9517. searchIconColor: {
  9518. type: String,
  9519. default: props$E.search.searchIconColor
  9520. },
  9521. // 输入框字体颜色
  9522. color: {
  9523. type: String,
  9524. default: props$E.search.color
  9525. },
  9526. // placeholder的颜色
  9527. placeholderColor: {
  9528. type: String,
  9529. default: props$E.search.placeholderColor
  9530. },
  9531. // 左边输入框的图标,可以为uView图标名称或图片路径
  9532. searchIcon: {
  9533. type: String,
  9534. default: props$E.search.searchIcon
  9535. },
  9536. searchIconSize: {
  9537. type: [Number, String],
  9538. default: props$E.search.searchIconSize
  9539. },
  9540. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  9541. margin: {
  9542. type: String,
  9543. default: props$E.search.margin
  9544. },
  9545. // 开启showAction时,是否在input获取焦点时才显示
  9546. animation: {
  9547. type: Boolean,
  9548. default: props$E.search.animation
  9549. },
  9550. // 输入框的初始化内容
  9551. modelValue: {
  9552. type: String,
  9553. default: props$E.search.value
  9554. },
  9555. value: {
  9556. type: String,
  9557. default: props$E.search.value
  9558. },
  9559. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  9560. maxlength: {
  9561. type: [String, Number],
  9562. default: props$E.search.maxlength
  9563. },
  9564. // 搜索框高度,单位px
  9565. height: {
  9566. type: [String, Number],
  9567. default: props$E.search.height
  9568. },
  9569. // 搜索框左侧文本
  9570. label: {
  9571. type: [String, Number, null],
  9572. default: props$E.search.label
  9573. }
  9574. }
  9575. };
  9576. const _sfc_main$1J = {
  9577. name: "u-search",
  9578. mixins: [mpMixin, mixin, props$r],
  9579. data() {
  9580. return {
  9581. keyword: "",
  9582. showClear: false,
  9583. // 是否显示右边的清除图标
  9584. show: false,
  9585. // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件
  9586. focused: this.focus
  9587. // 绑定输入框的值
  9588. // inputValue: this.value
  9589. };
  9590. },
  9591. watch: {
  9592. keyword(nVal) {
  9593. this.$emit("update:modelValue", nVal);
  9594. this.$emit("change", nVal);
  9595. },
  9596. modelValue: {
  9597. immediate: true,
  9598. handler(nVal) {
  9599. this.keyword = nVal;
  9600. }
  9601. }
  9602. },
  9603. computed: {
  9604. showActionBtn() {
  9605. return !this.animation && this.showAction;
  9606. }
  9607. },
  9608. emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"],
  9609. methods: {
  9610. // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化
  9611. inputChange(e) {
  9612. this.keyword = e.detail.value;
  9613. },
  9614. // 清空输入
  9615. // 也可以作为用户通过this.$refs形式调用清空输入框内容
  9616. clear() {
  9617. this.keyword = "";
  9618. this.$nextTick(() => {
  9619. this.$emit("clear");
  9620. });
  9621. },
  9622. // 确定搜索
  9623. search(e) {
  9624. this.$emit("search", e.detail.value);
  9625. try {
  9626. uni.hideKeyboard();
  9627. } catch (e2) {
  9628. }
  9629. },
  9630. // 点击右边自定义按钮的事件
  9631. custom() {
  9632. this.$emit("custom", this.keyword);
  9633. try {
  9634. uni.hideKeyboard();
  9635. } catch (e) {
  9636. }
  9637. },
  9638. // 获取焦点
  9639. getFocus() {
  9640. this.focused = true;
  9641. if (this.animation && this.showAction)
  9642. this.show = true;
  9643. this.$emit("focus", this.keyword);
  9644. },
  9645. // 失去焦点
  9646. blur() {
  9647. setTimeout(() => {
  9648. this.focused = false;
  9649. }, 100);
  9650. this.show = false;
  9651. this.$emit("blur", this.keyword);
  9652. },
  9653. // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
  9654. clickHandler() {
  9655. if (this.disabled)
  9656. this.$emit("click");
  9657. },
  9658. // 点击左边图标
  9659. clickIcon() {
  9660. this.$emit("clickIcon");
  9661. }
  9662. }
  9663. };
  9664. function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
  9665. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  9666. return vue.openBlock(), vue.createElementBlock(
  9667. "view",
  9668. {
  9669. class: "u-search",
  9670. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  9671. style: vue.normalizeStyle([{
  9672. margin: _ctx.margin
  9673. }, _ctx.$u.addStyle(_ctx.customStyle)])
  9674. },
  9675. [
  9676. vue.createElementVNode(
  9677. "view",
  9678. {
  9679. class: "u-search__content",
  9680. style: vue.normalizeStyle({
  9681. backgroundColor: _ctx.bgColor,
  9682. borderRadius: _ctx.shape == "round" ? "100px" : "4px",
  9683. borderColor: _ctx.borderColor
  9684. })
  9685. },
  9686. [
  9687. _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [
  9688. vue.createElementVNode(
  9689. "text",
  9690. { class: "u-search__content__label" },
  9691. vue.toDisplayString(_ctx.label),
  9692. 1
  9693. /* TEXT */
  9694. )
  9695. ], true) : vue.createCommentVNode("v-if", true),
  9696. vue.createElementVNode("view", { class: "u-search__content__icon" }, [
  9697. vue.createVNode(_component_u_icon, {
  9698. onClick: $options.clickIcon,
  9699. size: _ctx.searchIconSize,
  9700. name: _ctx.searchIcon,
  9701. color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
  9702. }, null, 8, ["onClick", "size", "name", "color"])
  9703. ]),
  9704. vue.createElementVNode("input", {
  9705. "confirm-type": "search",
  9706. onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)),
  9707. value: $data.keyword,
  9708. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)),
  9709. onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)),
  9710. disabled: _ctx.disabled,
  9711. onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)),
  9712. focus: _ctx.focus,
  9713. maxlength: _ctx.maxlength,
  9714. "placeholder-class": "u-search__content__input--placeholder",
  9715. placeholder: _ctx.placeholder,
  9716. "placeholder-style": `color: ${_ctx.placeholderColor}`,
  9717. class: "u-search__content__input",
  9718. type: "text",
  9719. style: vue.normalizeStyle([{
  9720. textAlign: _ctx.inputAlign,
  9721. color: _ctx.color,
  9722. backgroundColor: _ctx.bgColor,
  9723. height: _ctx.$u.addUnit(_ctx.height)
  9724. }, _ctx.inputStyle])
  9725. }, null, 44, ["value", "disabled", "focus", "maxlength", "placeholder", "placeholder-style"]),
  9726. $data.keyword && _ctx.clearabled && $data.focused ? (vue.openBlock(), vue.createElementBlock("view", {
  9727. key: 1,
  9728. class: "u-search__content__icon u-search__content__close",
  9729. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  9730. }, [
  9731. vue.createVNode(_component_u_icon, {
  9732. name: "close",
  9733. size: "11",
  9734. color: "#ffffff",
  9735. customStyle: "line-height: 12px"
  9736. })
  9737. ])) : vue.createCommentVNode("v-if", true)
  9738. ],
  9739. 4
  9740. /* STYLE */
  9741. ),
  9742. vue.createElementVNode(
  9743. "text",
  9744. {
  9745. style: vue.normalizeStyle([_ctx.actionStyle]),
  9746. class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]),
  9747. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"]))
  9748. },
  9749. vue.toDisplayString(_ctx.actionText),
  9750. 7
  9751. /* TEXT, CLASS, STYLE */
  9752. )
  9753. ],
  9754. 4
  9755. /* STYLE */
  9756. );
  9757. }
  9758. const __easycom_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-e082a34a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
  9759. const props$q = {
  9760. props: {
  9761. // 是否展示组件
  9762. show: {
  9763. type: Boolean,
  9764. default: props$E.transition.show
  9765. },
  9766. // 使用的动画模式
  9767. mode: {
  9768. type: String,
  9769. default: props$E.transition.mode
  9770. },
  9771. // 动画的执行时间,单位ms
  9772. duration: {
  9773. type: [String, Number],
  9774. default: props$E.transition.duration
  9775. },
  9776. // 使用的动画过渡函数
  9777. timingFunction: {
  9778. type: String,
  9779. default: props$E.transition.timingFunction
  9780. }
  9781. }
  9782. };
  9783. const getClassNames = (name) => ({
  9784. enter: `u-${name}-enter u-${name}-enter-active`,
  9785. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  9786. leave: `u-${name}-leave u-${name}-leave-active`,
  9787. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  9788. });
  9789. const transition = {
  9790. methods: {
  9791. // 组件被点击发出事件
  9792. clickHandler() {
  9793. this.$emit("click");
  9794. },
  9795. // vue版本的组件进场处理
  9796. vueEnter() {
  9797. const classNames = getClassNames(this.mode);
  9798. this.status = "enter";
  9799. this.$emit("beforeEnter");
  9800. this.inited = true;
  9801. this.display = true;
  9802. this.classes = classNames.enter;
  9803. this.$nextTick(async () => {
  9804. this.$emit("enter");
  9805. this.transitionEnded = false;
  9806. this.$emit("afterEnter");
  9807. this.classes = classNames["enter-to"];
  9808. });
  9809. },
  9810. // 动画离场处理
  9811. vueLeave() {
  9812. if (!this.display)
  9813. return;
  9814. const classNames = getClassNames(this.mode);
  9815. this.status = "leave";
  9816. this.$emit("beforeLeave");
  9817. this.classes = classNames.leave;
  9818. this.$nextTick(() => {
  9819. this.transitionEnded = false;
  9820. this.$emit("leave");
  9821. setTimeout(this.onTransitionEnd, this.duration);
  9822. this.classes = classNames["leave-to"];
  9823. });
  9824. },
  9825. // 完成过渡后触发
  9826. onTransitionEnd() {
  9827. if (this.transitionEnded)
  9828. return;
  9829. this.transitionEnded = true;
  9830. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  9831. if (!this.show && this.display) {
  9832. this.display = false;
  9833. this.inited = false;
  9834. }
  9835. }
  9836. }
  9837. };
  9838. const _sfc_main$1I = {
  9839. name: "u-transition",
  9840. data() {
  9841. return {
  9842. inited: false,
  9843. // 是否显示/隐藏组件
  9844. viewStyle: {},
  9845. // 组件内部的样式
  9846. status: "",
  9847. // 记录组件动画的状态
  9848. transitionEnded: false,
  9849. // 组件是否结束的标记
  9850. display: false,
  9851. // 组件是否展示
  9852. classes: ""
  9853. // 应用的类名
  9854. };
  9855. },
  9856. computed: {
  9857. mergeStyle() {
  9858. const { viewStyle, customStyle } = this;
  9859. return {
  9860. transitionDuration: `${this.duration}ms`,
  9861. // display: `${this.display ? '' : 'none'}`,
  9862. transitionTimingFunction: this.timingFunction,
  9863. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  9864. ...uni.$u.addStyle(customStyle),
  9865. ...viewStyle
  9866. };
  9867. }
  9868. },
  9869. // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
  9870. mixins: [mpMixin, mixin, transition, props$q],
  9871. watch: {
  9872. show: {
  9873. handler(newVal) {
  9874. newVal ? this.vueEnter() : this.vueLeave();
  9875. },
  9876. // 表示同时监听初始化时的props的show的意思
  9877. immediate: true
  9878. }
  9879. }
  9880. };
  9881. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  9882. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  9883. "view",
  9884. {
  9885. key: 0,
  9886. class: vue.normalizeClass(["u-transition", $data.classes]),
  9887. ref: "u-transition",
  9888. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  9889. style: vue.normalizeStyle([$options.mergeStyle]),
  9890. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  9891. },
  9892. [
  9893. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9894. ],
  9895. 38
  9896. /* CLASS, STYLE, NEED_HYDRATION */
  9897. )) : vue.createCommentVNode("v-if", true);
  9898. }
  9899. const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  9900. const props$p = {
  9901. props: {
  9902. // 是否显示遮罩
  9903. show: {
  9904. type: Boolean,
  9905. default: props$E.overlay.show
  9906. },
  9907. // 层级z-index
  9908. zIndex: {
  9909. type: [String, Number],
  9910. default: props$E.overlay.zIndex
  9911. },
  9912. // 遮罩的过渡时间,单位为ms
  9913. duration: {
  9914. type: [String, Number],
  9915. default: props$E.overlay.duration
  9916. },
  9917. // 不透明度值,当做rgba的第四个参数
  9918. opacity: {
  9919. type: [String, Number],
  9920. default: props$E.overlay.opacity
  9921. }
  9922. }
  9923. };
  9924. const _sfc_main$1H = {
  9925. name: "u-overlay",
  9926. mixins: [mpMixin, mixin, props$p],
  9927. computed: {
  9928. overlayStyle() {
  9929. const style = {
  9930. position: "fixed",
  9931. top: 0,
  9932. left: 0,
  9933. right: 0,
  9934. zIndex: this.zIndex,
  9935. bottom: 0,
  9936. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  9937. };
  9938. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  9939. }
  9940. },
  9941. methods: {
  9942. clickHandler() {
  9943. this.$emit("click");
  9944. }
  9945. }
  9946. };
  9947. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  9948. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  9949. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  9950. show: _ctx.show,
  9951. "custom-class": "u-overlay",
  9952. duration: _ctx.duration,
  9953. "custom-style": $options.overlayStyle,
  9954. onClick: $options.clickHandler
  9955. }, {
  9956. default: vue.withCtx(() => [
  9957. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9958. ]),
  9959. _: 3
  9960. /* FORWARDED */
  9961. }, 8, ["show", "duration", "custom-style", "onClick"]);
  9962. }
  9963. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  9964. const props$o = {
  9965. props: {
  9966. bgColor: {
  9967. type: String,
  9968. default: props$E.statusBar.bgColor
  9969. }
  9970. }
  9971. };
  9972. const _sfc_main$1G = {
  9973. name: "u-status-bar",
  9974. mixins: [mpMixin, mixin, props$o],
  9975. data() {
  9976. return {};
  9977. },
  9978. computed: {
  9979. style() {
  9980. const style = {};
  9981. style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
  9982. style.backgroundColor = this.bgColor;
  9983. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  9984. }
  9985. }
  9986. };
  9987. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  9988. return vue.openBlock(), vue.createElementBlock(
  9989. "view",
  9990. {
  9991. style: vue.normalizeStyle([$options.style]),
  9992. class: "u-status-bar"
  9993. },
  9994. [
  9995. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9996. ],
  9997. 4
  9998. /* STYLE */
  9999. );
  10000. }
  10001. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  10002. const props$n = {
  10003. props: {}
  10004. };
  10005. const _sfc_main$1F = {
  10006. name: "u-safe-bottom",
  10007. mixins: [mpMixin, mixin, props$n],
  10008. data() {
  10009. return {
  10010. safeAreaBottomHeight: 0,
  10011. isNvue: false
  10012. };
  10013. },
  10014. computed: {
  10015. style() {
  10016. const style = {};
  10017. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10018. }
  10019. },
  10020. mounted() {
  10021. }
  10022. };
  10023. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  10024. return vue.openBlock(), vue.createElementBlock(
  10025. "view",
  10026. {
  10027. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  10028. style: vue.normalizeStyle([$options.style])
  10029. },
  10030. null,
  10031. 6
  10032. /* CLASS, STYLE */
  10033. );
  10034. }
  10035. const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  10036. const props$m = {
  10037. props: {
  10038. // 是否展示弹窗
  10039. show: {
  10040. type: Boolean,
  10041. default: props$E.popup.show
  10042. },
  10043. // 是否显示遮罩
  10044. overlay: {
  10045. type: Boolean,
  10046. default: props$E.popup.overlay
  10047. },
  10048. // 弹出的方向,可选值为 top bottom right left center
  10049. mode: {
  10050. type: String,
  10051. default: props$E.popup.mode
  10052. },
  10053. // 动画时长,单位ms
  10054. duration: {
  10055. type: [String, Number],
  10056. default: props$E.popup.duration
  10057. },
  10058. // 是否显示关闭图标
  10059. closeable: {
  10060. type: Boolean,
  10061. default: props$E.popup.closeable
  10062. },
  10063. // 自定义遮罩的样式
  10064. overlayStyle: {
  10065. type: [Object, String],
  10066. default: props$E.popup.overlayStyle
  10067. },
  10068. // 点击遮罩是否关闭弹窗
  10069. closeOnClickOverlay: {
  10070. type: Boolean,
  10071. default: props$E.popup.closeOnClickOverlay
  10072. },
  10073. // 层级
  10074. zIndex: {
  10075. type: [String, Number],
  10076. default: props$E.popup.zIndex
  10077. },
  10078. // 是否为iPhoneX留出底部安全距离
  10079. safeAreaInsetBottom: {
  10080. type: Boolean,
  10081. default: props$E.popup.safeAreaInsetBottom
  10082. },
  10083. // 是否留出顶部安全距离(状态栏高度)
  10084. safeAreaInsetTop: {
  10085. type: Boolean,
  10086. default: props$E.popup.safeAreaInsetTop
  10087. },
  10088. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  10089. closeIconPos: {
  10090. type: String,
  10091. default: props$E.popup.closeIconPos
  10092. },
  10093. // 是否显示圆角
  10094. round: {
  10095. type: [Boolean, String, Number],
  10096. default: props$E.popup.round
  10097. },
  10098. // mode=center,也即中部弹出时,是否使用缩放模式
  10099. zoom: {
  10100. type: Boolean,
  10101. default: props$E.popup.zoom
  10102. },
  10103. // 弹窗背景色,设置为transparent可去除白色背景
  10104. bgColor: {
  10105. type: String,
  10106. default: props$E.popup.bgColor
  10107. },
  10108. // 遮罩的透明度,0-1之间
  10109. overlayOpacity: {
  10110. type: [Number, String],
  10111. default: props$E.popup.overlayOpacity
  10112. }
  10113. }
  10114. };
  10115. const _sfc_main$1E = {
  10116. name: "u-popup",
  10117. mixins: [mpMixin, mixin, props$m],
  10118. data() {
  10119. return {
  10120. overlayDuration: this.duration + 50
  10121. };
  10122. },
  10123. watch: {
  10124. show(newValue, oldValue) {
  10125. }
  10126. },
  10127. computed: {
  10128. transitionStyle() {
  10129. const style = {
  10130. zIndex: this.zIndex,
  10131. position: "fixed",
  10132. display: "flex"
  10133. };
  10134. style[this.mode] = 0;
  10135. if (this.mode === "left") {
  10136. return uni.$u.deepMerge(style, {
  10137. bottom: 0,
  10138. top: 0
  10139. });
  10140. } else if (this.mode === "right") {
  10141. return uni.$u.deepMerge(style, {
  10142. bottom: 0,
  10143. top: 0
  10144. });
  10145. } else if (this.mode === "top") {
  10146. return uni.$u.deepMerge(style, {
  10147. left: 0,
  10148. right: 0
  10149. });
  10150. } else if (this.mode === "bottom") {
  10151. return uni.$u.deepMerge(style, {
  10152. left: 0,
  10153. right: 0
  10154. });
  10155. } else if (this.mode === "center") {
  10156. return uni.$u.deepMerge(style, {
  10157. alignItems: "center",
  10158. "justify-content": "center",
  10159. top: 0,
  10160. left: 0,
  10161. right: 0,
  10162. bottom: 0
  10163. });
  10164. }
  10165. },
  10166. contentStyle() {
  10167. const style = {};
  10168. uni.$u.sys();
  10169. if (this.mode !== "center") {
  10170. style.flex = 1;
  10171. }
  10172. if (this.bgColor) {
  10173. style.backgroundColor = this.bgColor;
  10174. }
  10175. if (this.round) {
  10176. const value2 = uni.$u.addUnit(this.round);
  10177. if (this.mode === "top") {
  10178. style.borderBottomLeftRadius = value2;
  10179. style.borderBottomRightRadius = value2;
  10180. } else if (this.mode === "bottom") {
  10181. style.borderTopLeftRadius = value2;
  10182. style.borderTopRightRadius = value2;
  10183. } else if (this.mode === "center") {
  10184. style.borderRadius = value2;
  10185. }
  10186. }
  10187. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10188. },
  10189. position() {
  10190. if (this.mode === "center") {
  10191. return this.zoom ? "fade-zoom" : "fade";
  10192. }
  10193. if (this.mode === "left") {
  10194. return "slide-left";
  10195. }
  10196. if (this.mode === "right") {
  10197. return "slide-right";
  10198. }
  10199. if (this.mode === "bottom") {
  10200. return "slide-up";
  10201. }
  10202. if (this.mode === "top") {
  10203. return "slide-down";
  10204. }
  10205. }
  10206. },
  10207. methods: {
  10208. // 点击遮罩
  10209. overlayClick() {
  10210. if (this.closeOnClickOverlay) {
  10211. this.$emit("close");
  10212. }
  10213. },
  10214. close(e) {
  10215. this.$emit("close");
  10216. },
  10217. afterEnter() {
  10218. this.$emit("open");
  10219. },
  10220. clickHandler() {
  10221. if (this.mode === "center") {
  10222. this.overlayClick();
  10223. }
  10224. this.$emit("click");
  10225. }
  10226. }
  10227. };
  10228. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  10229. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$9);
  10230. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  10231. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10232. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$4);
  10233. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  10234. return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
  10235. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  10236. key: 0,
  10237. show: _ctx.show,
  10238. onClick: $options.overlayClick,
  10239. duration: $data.overlayDuration,
  10240. customStyle: _ctx.overlayStyle,
  10241. opacity: _ctx.overlayOpacity
  10242. }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  10243. vue.createVNode(_component_u_transition, {
  10244. show: _ctx.show,
  10245. customStyle: $options.transitionStyle,
  10246. mode: $options.position,
  10247. duration: _ctx.duration,
  10248. onAfterEnter: $options.afterEnter,
  10249. onClick: $options.clickHandler
  10250. }, {
  10251. default: vue.withCtx(() => [
  10252. vue.createElementVNode(
  10253. "view",
  10254. {
  10255. class: "u-popup__content",
  10256. style: vue.normalizeStyle([$options.contentStyle]),
  10257. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
  10258. },
  10259. [
  10260. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  10261. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  10262. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  10263. "view",
  10264. {
  10265. key: 1,
  10266. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  10267. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  10268. "hover-class": "u-popup__content__close--hover",
  10269. "hover-stay-time": "150"
  10270. },
  10271. [
  10272. vue.createVNode(_component_u_icon, {
  10273. name: "close",
  10274. color: "#909399",
  10275. size: "18",
  10276. bold: ""
  10277. })
  10278. ],
  10279. 2
  10280. /* CLASS */
  10281. )) : vue.createCommentVNode("v-if", true),
  10282. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  10283. ],
  10284. 4
  10285. /* STYLE */
  10286. )
  10287. ]),
  10288. _: 3
  10289. /* FORWARDED */
  10290. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  10291. ]);
  10292. }
  10293. const __easycom_7 = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  10294. function pickExclude(obj, keys) {
  10295. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  10296. return {};
  10297. }
  10298. return Object.keys(obj).reduce((prev, key) => {
  10299. if (!keys.includes(key)) {
  10300. prev[key] = obj[key];
  10301. }
  10302. return prev;
  10303. }, {});
  10304. }
  10305. function formatImage(res2) {
  10306. return res2.tempFiles.map((item) => ({
  10307. ...pickExclude(item, ["path"]),
  10308. type: "image",
  10309. url: item.path,
  10310. thumb: item.path,
  10311. size: item.size
  10312. }));
  10313. }
  10314. function formatVideo(res2) {
  10315. return [
  10316. {
  10317. ...pickExclude(res2, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  10318. type: "video",
  10319. url: res2.tempFilePath,
  10320. thumb: res2.thumbTempFilePath,
  10321. size: res2.size
  10322. }
  10323. ];
  10324. }
  10325. function chooseFile({
  10326. accept,
  10327. multiple,
  10328. capture,
  10329. compressed,
  10330. maxDuration,
  10331. sizeType,
  10332. camera,
  10333. maxCount
  10334. }) {
  10335. return new Promise((resolve, reject) => {
  10336. switch (accept) {
  10337. case "image":
  10338. uni.chooseImage({
  10339. count: multiple ? Math.min(maxCount, 9) : 1,
  10340. sourceType: capture,
  10341. sizeType,
  10342. success: (res2) => resolve(formatImage(res2)),
  10343. fail: reject
  10344. });
  10345. break;
  10346. case "video":
  10347. uni.chooseVideo({
  10348. sourceType: capture,
  10349. compressed,
  10350. maxDuration,
  10351. camera,
  10352. success: (res2) => resolve(formatVideo(res2)),
  10353. fail: reject
  10354. });
  10355. break;
  10356. }
  10357. });
  10358. }
  10359. const mixinUp = {
  10360. watch: {
  10361. // 监听accept的变化,判断是否符合个平台要求
  10362. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  10363. accept: {
  10364. immediate: true,
  10365. handler(val) {
  10366. if (val === "all" || val === "media") {
  10367. uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
  10368. }
  10369. if (val === "file") {
  10370. uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  10371. }
  10372. }
  10373. }
  10374. }
  10375. };
  10376. const props$l = {
  10377. props: {
  10378. // 接受的文件类型, 可选值为all media image file video
  10379. accept: {
  10380. type: String,
  10381. default: props$E.upload.accept
  10382. },
  10383. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  10384. capture: {
  10385. type: [String, Array],
  10386. default: props$E.upload.capture
  10387. },
  10388. // 当accept为video时生效,是否压缩视频,默认为true
  10389. compressed: {
  10390. type: Boolean,
  10391. default: props$E.upload.compressed
  10392. },
  10393. // 当accept为video时生效,可选值为back或front
  10394. camera: {
  10395. type: String,
  10396. default: props$E.upload.camera
  10397. },
  10398. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  10399. maxDuration: {
  10400. type: Number,
  10401. default: props$E.upload.maxDuration
  10402. },
  10403. // 上传区域的图标,只能内置图标
  10404. uploadIcon: {
  10405. type: String,
  10406. default: props$E.upload.uploadIcon
  10407. },
  10408. // 上传区域的图标的颜色,默认
  10409. uploadIconColor: {
  10410. type: String,
  10411. default: props$E.upload.uploadIconColor
  10412. },
  10413. // 是否开启文件读取前事件
  10414. useBeforeRead: {
  10415. type: Boolean,
  10416. default: props$E.upload.useBeforeRead
  10417. },
  10418. // 读取后的处理函数
  10419. afterRead: {
  10420. type: Function,
  10421. default: null
  10422. },
  10423. // 读取前的处理函数
  10424. beforeRead: {
  10425. type: Function,
  10426. default: null
  10427. },
  10428. // 是否显示组件自带的图片预览功能
  10429. previewFullImage: {
  10430. type: Boolean,
  10431. default: props$E.upload.previewFullImage
  10432. },
  10433. // 最大上传数量
  10434. maxCount: {
  10435. type: [String, Number],
  10436. default: props$E.upload.maxCount
  10437. },
  10438. // 是否启用
  10439. disabled: {
  10440. type: Boolean,
  10441. default: props$E.upload.disabled
  10442. },
  10443. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  10444. imageMode: {
  10445. type: String,
  10446. default: props$E.upload.imageMode
  10447. },
  10448. // 标识符,可以在回调函数的第二项参数中获取
  10449. name: {
  10450. type: String,
  10451. default: props$E.upload.name
  10452. },
  10453. // 所选的图片的尺寸, 可选值为original compressed
  10454. sizeType: {
  10455. type: Array,
  10456. default: props$E.upload.sizeType
  10457. },
  10458. // 是否开启图片多选,部分安卓机型不支持
  10459. multiple: {
  10460. type: Boolean,
  10461. default: props$E.upload.multiple
  10462. },
  10463. // 是否展示删除按钮
  10464. deletable: {
  10465. type: Boolean,
  10466. default: props$E.upload.deletable
  10467. },
  10468. // 文件大小限制,单位为byte
  10469. maxSize: {
  10470. type: [String, Number],
  10471. default: props$E.upload.maxSize
  10472. },
  10473. // 显示已上传的文件列表
  10474. fileList: {
  10475. type: Array,
  10476. default: props$E.upload.fileList
  10477. },
  10478. // 上传区域的提示文字
  10479. uploadText: {
  10480. type: String,
  10481. default: props$E.upload.uploadText
  10482. },
  10483. // 内部预览图片区域和选择图片按钮的区域宽度
  10484. width: {
  10485. type: [String, Number],
  10486. default: props$E.upload.width
  10487. },
  10488. // 内部预览图片区域和选择图片按钮的区域高度
  10489. height: {
  10490. type: [String, Number],
  10491. default: props$E.upload.height
  10492. },
  10493. // 是否在上传完成后展示预览图
  10494. previewImage: {
  10495. type: Boolean,
  10496. default: props$E.upload.previewImage
  10497. }
  10498. }
  10499. };
  10500. const _sfc_main$1D = {
  10501. name: "u-upload",
  10502. mixins: [mpMixin, mixin, mixinUp, props$l],
  10503. data() {
  10504. return {
  10505. lists: [],
  10506. isInCount: true
  10507. };
  10508. },
  10509. watch: {
  10510. // 监听文件列表的变化,重新整理内部数据
  10511. fileList: {
  10512. immediate: true,
  10513. handler() {
  10514. this.formatFileList();
  10515. },
  10516. immediate: true,
  10517. deep: true
  10518. }
  10519. },
  10520. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
  10521. methods: {
  10522. formatFileList() {
  10523. const {
  10524. fileList = [],
  10525. maxCount
  10526. } = this;
  10527. const lists = fileList.map(
  10528. (item) => Object.assign(Object.assign({}, item), {
  10529. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  10530. isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
  10531. isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
  10532. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  10533. })
  10534. );
  10535. this.lists = lists;
  10536. this.isInCount = lists.length < maxCount;
  10537. },
  10538. chooseFile() {
  10539. const {
  10540. maxCount,
  10541. multiple,
  10542. lists,
  10543. disabled
  10544. } = this;
  10545. if (disabled)
  10546. return;
  10547. let capture;
  10548. try {
  10549. capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
  10550. } catch (e) {
  10551. capture = [];
  10552. }
  10553. chooseFile(
  10554. Object.assign({
  10555. accept: this.accept,
  10556. multiple: this.multiple,
  10557. capture,
  10558. compressed: this.compressed,
  10559. maxDuration: this.maxDuration,
  10560. sizeType: this.sizeType,
  10561. camera: this.camera
  10562. }, {
  10563. maxCount: maxCount - lists.length
  10564. })
  10565. ).then((res2) => {
  10566. this.onBeforeRead(multiple ? res2 : res2[0]);
  10567. }).catch((error2) => {
  10568. this.$emit("error", error2);
  10569. });
  10570. },
  10571. // 文件读取之前
  10572. onBeforeRead(file) {
  10573. const {
  10574. beforeRead,
  10575. useBeforeRead
  10576. } = this;
  10577. let res2 = true;
  10578. if (uni.$u.test.func(beforeRead)) {
  10579. res2 = beforeRead(file, this.getDetail());
  10580. }
  10581. if (useBeforeRead) {
  10582. res2 = new Promise((resolve, reject) => {
  10583. this.$emit(
  10584. "beforeRead",
  10585. Object.assign(Object.assign({
  10586. file
  10587. }, this.getDetail()), {
  10588. callback: (ok) => {
  10589. ok ? resolve() : reject();
  10590. }
  10591. })
  10592. );
  10593. });
  10594. }
  10595. if (!res2) {
  10596. return;
  10597. }
  10598. if (uni.$u.test.promise(res2)) {
  10599. res2.then((data) => this.onAfterRead(data || file));
  10600. } else {
  10601. this.onAfterRead(file);
  10602. }
  10603. },
  10604. getDetail(index2) {
  10605. return {
  10606. name: this.name,
  10607. index: index2 == null ? this.fileList.length : index2
  10608. };
  10609. },
  10610. onAfterRead(file) {
  10611. const {
  10612. maxSize,
  10613. afterRead
  10614. } = this;
  10615. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  10616. if (oversize) {
  10617. this.$emit("oversize", Object.assign({
  10618. file
  10619. }, this.getDetail()));
  10620. return;
  10621. }
  10622. if (typeof afterRead === "function") {
  10623. afterRead(file, this.getDetail());
  10624. }
  10625. this.$emit("afterRead", Object.assign({
  10626. file
  10627. }, this.getDetail()));
  10628. },
  10629. deleteItem(index2) {
  10630. this.$emit(
  10631. "delete",
  10632. Object.assign(Object.assign({}, this.getDetail(index2)), {
  10633. file: this.fileList[index2]
  10634. })
  10635. );
  10636. },
  10637. // 预览图片
  10638. onPreviewImage(item) {
  10639. if (!item.isImage || !this.previewFullImage)
  10640. return;
  10641. uni.previewImage({
  10642. // 先filter找出为图片的item,再返回filter结果中的图片url
  10643. urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
  10644. current: item.url || item.thumb,
  10645. fail() {
  10646. uni.$u.toast("预览图片失败");
  10647. }
  10648. });
  10649. },
  10650. onPreviewVideo(event) {
  10651. if (!this.data.previewFullImage)
  10652. return;
  10653. const {
  10654. index: index2
  10655. } = event.currentTarget.dataset;
  10656. const {
  10657. lists
  10658. } = this.data;
  10659. wx.previewMedia({
  10660. sources: lists.filter((item) => isVideoFile(item)).map(
  10661. (item) => Object.assign(Object.assign({}, item), {
  10662. type: "video"
  10663. })
  10664. ),
  10665. current: index2,
  10666. fail() {
  10667. uni.$u.toast("预览视频失败");
  10668. }
  10669. });
  10670. },
  10671. onClickPreview(event) {
  10672. const {
  10673. index: index2
  10674. } = event.currentTarget.dataset;
  10675. const item = this.data.lists[index2];
  10676. this.$emit(
  10677. "clickPreview",
  10678. Object.assign(Object.assign({}, item), this.getDetail(index2))
  10679. );
  10680. }
  10681. }
  10682. };
  10683. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  10684. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10685. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  10686. return vue.openBlock(), vue.createElementBlock(
  10687. "view",
  10688. {
  10689. class: "u-upload",
  10690. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  10691. },
  10692. [
  10693. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  10694. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  10695. vue.Fragment,
  10696. { key: 0 },
  10697. vue.renderList($data.lists, (item, index2) => {
  10698. return vue.openBlock(), vue.createElementBlock("view", {
  10699. class: "u-upload__wrap__preview",
  10700. key: index2
  10701. }, [
  10702. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  10703. key: 0,
  10704. src: item.thumb || item.url,
  10705. mode: _ctx.imageMode,
  10706. class: "u-upload__wrap__preview__image",
  10707. onClick: ($event) => $options.onPreviewImage(item),
  10708. style: vue.normalizeStyle([{
  10709. width: _ctx.$u.addUnit(_ctx.width),
  10710. height: _ctx.$u.addUnit(_ctx.height)
  10711. }])
  10712. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10713. key: 1,
  10714. class: "u-upload__wrap__preview__other"
  10715. }, [
  10716. vue.createVNode(_component_u_icon, {
  10717. color: "#80CBF9",
  10718. size: "26",
  10719. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  10720. }, null, 8, ["name"]),
  10721. vue.createElementVNode(
  10722. "text",
  10723. { class: "u-upload__wrap__preview__other__text" },
  10724. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
  10725. 1
  10726. /* TEXT */
  10727. )
  10728. ])),
  10729. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  10730. key: 2,
  10731. class: "u-upload__status"
  10732. }, [
  10733. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  10734. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  10735. key: 0,
  10736. name: "close-circle",
  10737. color: "#ffffff",
  10738. size: "25"
  10739. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  10740. key: 1,
  10741. size: "22",
  10742. mode: "circle",
  10743. color: "#ffffff"
  10744. }))
  10745. ]),
  10746. item.message ? (vue.openBlock(), vue.createElementBlock(
  10747. "text",
  10748. {
  10749. key: 0,
  10750. class: "u-upload__status__message"
  10751. },
  10752. vue.toDisplayString(item.message),
  10753. 1
  10754. /* TEXT */
  10755. )) : vue.createCommentVNode("v-if", true)
  10756. ])) : vue.createCommentVNode("v-if", true),
  10757. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  10758. key: 3,
  10759. class: "u-upload__deletable",
  10760. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  10761. }, [
  10762. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  10763. vue.createVNode(_component_u_icon, {
  10764. name: "close",
  10765. color: "#ffffff",
  10766. size: "10"
  10767. })
  10768. ])
  10769. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  10770. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  10771. key: 4,
  10772. class: "u-upload__success"
  10773. }, [
  10774. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  10775. vue.createVNode(_component_u_icon, {
  10776. name: "checkmark",
  10777. color: "#ffffff",
  10778. size: "12"
  10779. })
  10780. ])
  10781. ])) : vue.createCommentVNode("v-if", true)
  10782. ]);
  10783. }),
  10784. 128
  10785. /* KEYED_FRAGMENT */
  10786. )) : vue.createCommentVNode("v-if", true),
  10787. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  10788. vue.Fragment,
  10789. { key: 1 },
  10790. [
  10791. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  10792. key: 0,
  10793. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  10794. }, [
  10795. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10796. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  10797. key: 1,
  10798. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  10799. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  10800. "hover-stay-time": "150",
  10801. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  10802. style: vue.normalizeStyle([{
  10803. width: _ctx.$u.addUnit(_ctx.width),
  10804. height: _ctx.$u.addUnit(_ctx.height)
  10805. }])
  10806. }, [
  10807. vue.createVNode(_component_u_icon, {
  10808. name: _ctx.uploadIcon,
  10809. size: "26",
  10810. color: _ctx.uploadIconColor
  10811. }, null, 8, ["name", "color"]),
  10812. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  10813. "text",
  10814. {
  10815. key: 0,
  10816. class: "u-upload__button__text"
  10817. },
  10818. vue.toDisplayString(_ctx.uploadText),
  10819. 1
  10820. /* TEXT */
  10821. )) : vue.createCommentVNode("v-if", true)
  10822. ], 14, ["hover-class"]))
  10823. ],
  10824. 64
  10825. /* STABLE_FRAGMENT */
  10826. )) : vue.createCommentVNode("v-if", true)
  10827. ])
  10828. ],
  10829. 4
  10830. /* STYLE */
  10831. );
  10832. }
  10833. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  10834. const baseUrl = "http://bk.shuhi.com";
  10835. function initRequest() {
  10836. formatAppLog("log", "at config/request.js:9", "初始化了 http 请求代码");
  10837. uni.$u.http.setConfig((config2) => {
  10838. config2.baseURL = baseUrl;
  10839. config2.custom.toast = true;
  10840. return config2;
  10841. });
  10842. uni.$u.http.interceptors.request.use((config2) => {
  10843. config2.data = config2.data || {};
  10844. let token = store.token || uni.getStorageSync("token");
  10845. config2.header.Authorization = token ? `Bearer ${token}` : "";
  10846. return config2;
  10847. }, (config2) => {
  10848. return Promise.reject(config2);
  10849. });
  10850. uni.$u.http.interceptors.response.use((response) => {
  10851. var _a;
  10852. const data = response.data;
  10853. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  10854. if (data.code !== 200) {
  10855. if (data.code === 401) {
  10856. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  10857. uni.removeStorageSync("token");
  10858. store.setToken("");
  10859. setTimeout(() => {
  10860. uni.$u.route({
  10861. type: "reLaunch",
  10862. url: "/pages/login/login"
  10863. // 跳转到登录页
  10864. });
  10865. }, 1e3);
  10866. } else {
  10867. if (custom.toast !== false) {
  10868. uni.$u.toast(data.msg);
  10869. }
  10870. return data;
  10871. }
  10872. }
  10873. return data;
  10874. }, (response) => {
  10875. return Promise.reject(response);
  10876. });
  10877. }
  10878. const _sfc_main$1C = {
  10879. __name: "index",
  10880. props: {
  10881. filename: {
  10882. type: [Array, String],
  10883. default: () => []
  10884. },
  10885. url: {
  10886. type: String
  10887. },
  10888. notFile: {
  10889. type: Boolean,
  10890. default: false
  10891. },
  10892. tips: {
  10893. type: String
  10894. },
  10895. disabled: {
  10896. type: Boolean,
  10897. default: false
  10898. },
  10899. isUpdate: {
  10900. type: Boolean,
  10901. default: false
  10902. }
  10903. },
  10904. emits: ["update:filename", "update:keyValue", "success"],
  10905. setup(__props, { expose: __expose, emit: __emit }) {
  10906. __expose();
  10907. const emit2 = __emit;
  10908. const props2 = __props;
  10909. const fileList = vue.ref([]);
  10910. vue.watch(() => props2.filename, (filename) => {
  10911. if (!filename)
  10912. return fileList.value = [];
  10913. if (typeof filename == "string") {
  10914. fileList.value = filename.split(",").map((v) => ({
  10915. url: baseUrl + v
  10916. }));
  10917. } else {
  10918. fileList.value = filename && filename.length > 0 ? filename.map((v) => ({
  10919. url: v.url || v
  10920. })) : [];
  10921. }
  10922. }, {
  10923. immediate: true,
  10924. deep: true
  10925. });
  10926. const afterRead = async (e) => {
  10927. const {
  10928. file
  10929. } = e;
  10930. fileList.value.push({
  10931. ...file,
  10932. status: "uploading",
  10933. message: "上传中..."
  10934. });
  10935. const result = await uploadFilePromise(file.url);
  10936. formatAppLog("log", "at components/cy-upload/index.vue:68", result, "result");
  10937. fileList.value.forEach((v, index2) => {
  10938. if (index2 == fileList.value.length - 1) {
  10939. v.url = result.url;
  10940. v.status = "success";
  10941. v.message = "";
  10942. }
  10943. });
  10944. formatAppLog("log", "at components/cy-upload/index.vue:77", fileList.value, "fileList.value");
  10945. emit2("update:filename", fileList.value.map((v) => v.url));
  10946. emit2("success", result);
  10947. };
  10948. const deletePic = (event) => {
  10949. fileList.value.splice(event.index, 1);
  10950. };
  10951. const uploadFilePromise = (url2, baseStr = "/app/common/upload") => {
  10952. let token = uni.getStorageSync("token");
  10953. return new Promise((resolve, reject) => {
  10954. uni.uploadFile({
  10955. url: baseUrl + baseStr,
  10956. // 图片上传地址
  10957. filePath: url2,
  10958. name: "file",
  10959. header: {
  10960. "Authorization": token
  10961. },
  10962. success: (res2) => {
  10963. let respic = JSON.parse(res2.data);
  10964. resolve(respic);
  10965. }
  10966. });
  10967. });
  10968. };
  10969. const __returned__ = { emit: emit2, props: props2, fileList, afterRead, deletePic, uploadFilePromise, watch: vue.watch, ref: vue.ref, get baseUrl() {
  10970. return baseUrl;
  10971. } };
  10972. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  10973. return __returned__;
  10974. }
  10975. };
  10976. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  10977. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$7);
  10978. return vue.openBlock(), vue.createElementBlock(
  10979. vue.Fragment,
  10980. null,
  10981. [
  10982. vue.createVNode(_component_u_upload, vue.mergeProps(_ctx.$attrs, {
  10983. fileList: $setup.fileList,
  10984. onAfterRead: $setup.afterRead,
  10985. onDelete: $setup.deletePic,
  10986. notFile: $props.notFile,
  10987. disabled: $props.disabled
  10988. }), null, 16, ["fileList", "notFile", "disabled"]),
  10989. $props.tips ? (vue.openBlock(), vue.createElementBlock(
  10990. "view",
  10991. {
  10992. key: 0,
  10993. class: "tips"
  10994. },
  10995. vue.toDisplayString($props.tips),
  10996. 1
  10997. /* TEXT */
  10998. )) : vue.createCommentVNode("v-if", true)
  10999. ],
  11000. 64
  11001. /* STABLE_FRAGMENT */
  11002. );
  11003. }
  11004. const cyUpload = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-5002576b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/cy-upload/index.vue"]]);
  11005. const _sfc_main$1B = {
  11006. __name: "feedbackPopup",
  11007. emits: ["submit"],
  11008. setup(__props, { expose: __expose, emit: __emit }) {
  11009. const show = vue.ref(false);
  11010. const emit2 = __emit;
  11011. const formRef = vue.ref(null);
  11012. const submitting = vue.ref(false);
  11013. const formData = vue.reactive({
  11014. feedbackContent: "",
  11015. imgUrl: [],
  11016. isbn: ""
  11017. });
  11018. const rules2 = {
  11019. feedbackContent: [
  11020. {
  11021. required: true,
  11022. message: "请输入反馈信息",
  11023. trigger: ["blur", "change"]
  11024. }
  11025. ]
  11026. };
  11027. function open2(data) {
  11028. show.value = true;
  11029. formData.isbn = data.isbn;
  11030. }
  11031. function handleCancel() {
  11032. resetForm();
  11033. show.value = false;
  11034. }
  11035. async function handleConfirm() {
  11036. var _a;
  11037. (_a = formRef.value) == null ? void 0 : _a.validate().then((res2) => {
  11038. submitting.value = true;
  11039. let data = JSON.parse(JSON.stringify(formData));
  11040. data.imgUrl = data.imgUrl.join(",");
  11041. uni.$u.http.post("/app/feedback/add", data).then((res3) => {
  11042. if (res3.code == 200) {
  11043. uni.showToast({
  11044. title: "反馈已提交",
  11045. icon: "success"
  11046. });
  11047. emit2("submit", formData);
  11048. show.value = false;
  11049. } else {
  11050. uni.$u.toast(res3.msg);
  11051. }
  11052. }).finally(() => {
  11053. submitting.value = false;
  11054. });
  11055. });
  11056. }
  11057. function resetForm() {
  11058. var _a;
  11059. formData.feedbackContent = "";
  11060. formData.imgUrl = "";
  11061. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  11062. }
  11063. __expose({
  11064. open: open2
  11065. });
  11066. const __returned__ = { show, emit: emit2, formRef, submitting, formData, rules: rules2, open: open2, handleCancel, handleConfirm, resetForm, cyUpload, ref: vue.ref, reactive: vue.reactive };
  11067. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11068. return __returned__;
  11069. }
  11070. };
  11071. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  11072. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11073. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  11074. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11075. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  11076. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11077. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11078. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11079. mode: "center",
  11080. show: $setup.show,
  11081. onClose: $setup.handleCancel,
  11082. closeOnClickOverlay: false
  11083. }, {
  11084. default: vue.withCtx(() => [
  11085. vue.createElementVNode("view", { class: "popup-container" }, [
  11086. vue.createVNode(_component_u_form, {
  11087. ref: "formRef",
  11088. model: $setup.formData,
  11089. rules: $setup.rules,
  11090. labelPosition: "top",
  11091. labelWidth: "100%",
  11092. "error-type": "toast"
  11093. }, {
  11094. default: vue.withCtx(() => [
  11095. vue.createCommentVNode(" 反馈信息 "),
  11096. vue.createVNode(_component_u_form_item, {
  11097. label: "反馈图书信息",
  11098. prop: "feedbackContent",
  11099. borderBottom: true
  11100. }, {
  11101. default: vue.withCtx(() => [
  11102. vue.createVNode(_component_u_input, {
  11103. modelValue: $setup.formData.feedbackContent,
  11104. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackContent = $event),
  11105. type: "textarea",
  11106. placeholder: "请输入反馈信息",
  11107. height: "100"
  11108. }, null, 8, ["modelValue"])
  11109. ]),
  11110. _: 1
  11111. /* STABLE */
  11112. }),
  11113. vue.createCommentVNode(" 图片上传 "),
  11114. vue.createVNode(_component_u_form_item, {
  11115. label: "上传照片",
  11116. prop: "imgUrl",
  11117. borderBottom: false
  11118. }, {
  11119. default: vue.withCtx(() => [
  11120. vue.createVNode($setup["cyUpload"], {
  11121. filename: $setup.formData.imgUrl,
  11122. "onUpdate:filename": _cache[1] || (_cache[1] = ($event) => $setup.formData.imgUrl = $event),
  11123. multiple: "",
  11124. maxCount: 4
  11125. }, {
  11126. default: vue.withCtx(() => [
  11127. vue.createElementVNode("view", { class: "upload-slot" }, [
  11128. vue.createVNode(_component_u_icon, {
  11129. name: "plus",
  11130. size: "30"
  11131. }),
  11132. vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
  11133. ])
  11134. ]),
  11135. _: 1
  11136. /* STABLE */
  11137. }, 8, ["filename"])
  11138. ]),
  11139. _: 1
  11140. /* STABLE */
  11141. })
  11142. ]),
  11143. _: 1
  11144. /* STABLE */
  11145. }, 8, ["model"]),
  11146. vue.createCommentVNode(" 按钮组 "),
  11147. vue.createElementVNode("view", { class: "button-group" }, [
  11148. vue.createVNode(_component_u_button, {
  11149. type: "info",
  11150. text: "取消",
  11151. plain: true,
  11152. onClick: $setup.handleCancel,
  11153. disabled: $setup.submitting
  11154. }, null, 8, ["disabled"]),
  11155. vue.createVNode(_component_u_button, {
  11156. type: "primary",
  11157. text: "确认",
  11158. onClick: $setup.handleConfirm,
  11159. loading: $setup.submitting
  11160. }, null, 8, ["loading"])
  11161. ])
  11162. ])
  11163. ]),
  11164. _: 1
  11165. /* STABLE */
  11166. }, 8, ["show"]);
  11167. }
  11168. const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-0265fb8a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/components/feedbackPopup.vue"]]);
  11169. const _sfc_main$1A = {
  11170. __name: "index",
  11171. setup(__props, { expose: __expose }) {
  11172. __expose();
  11173. const showFeedback = vue.ref(null);
  11174. function handleFeedbackSubmit(data) {
  11175. formatAppLog("log", "at pages/book/index.vue:47", "反馈数据:", data);
  11176. }
  11177. const searchText = vue.ref("");
  11178. const bookList = vue.ref([]);
  11179. async function handleSearch() {
  11180. if (!searchText.value) {
  11181. uni.showToast({
  11182. title: "请输入ISBN",
  11183. icon: "none"
  11184. });
  11185. return;
  11186. }
  11187. await getSimpleBookInfoByIsbn(searchText.value);
  11188. }
  11189. async function getSimpleBookInfoByIsbn(isbn) {
  11190. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  11191. if (res2.code == 200) {
  11192. let bool = bookList.value.some((v) => v.isbn == isbn);
  11193. if (!bool) {
  11194. bookList.value.push(res2.data);
  11195. }
  11196. } else {
  11197. uni.$u.toast(res2.msg);
  11198. }
  11199. });
  11200. }
  11201. function scanCode() {
  11202. uni.scanCode({
  11203. scanType: ["barCode"],
  11204. success: (res2) => {
  11205. searchText.value = res2.result;
  11206. getSimpleBookInfoByIsbn(res2.result);
  11207. },
  11208. fail: () => {
  11209. uni.showToast({
  11210. title: "扫码失败",
  11211. icon: "none"
  11212. });
  11213. }
  11214. });
  11215. }
  11216. function editBook(book) {
  11217. var _a;
  11218. (_a = showFeedback.value) == null ? void 0 : _a.open(book);
  11219. }
  11220. onLoad(() => {
  11221. uni.$u.useGlobalEvent((e) => {
  11222. if (!e.barcode)
  11223. return;
  11224. getSimpleBookInfoByIsbn(e.barcode);
  11225. });
  11226. });
  11227. const __returned__ = { showFeedback, handleFeedbackSubmit, searchText, bookList, handleSearch, getSimpleBookInfoByIsbn, scanCode, editBook, ref: vue.ref, computed: vue.computed, get onLoad() {
  11228. return onLoad;
  11229. }, FeedbackPopup };
  11230. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11231. return __returned__;
  11232. }
  11233. };
  11234. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  11235. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11236. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11237. return vue.openBlock(), vue.createElementBlock("view", {
  11238. class: "book-list",
  11239. style: { "padding": "0" }
  11240. }, [
  11241. vue.createCommentVNode(" 搜索框 "),
  11242. vue.createElementVNode("view", { class: "search-header" }, [
  11243. vue.createElementVNode("view", { class: "search-box" }, [
  11244. vue.createVNode(_component_u_icon, {
  11245. style: { "margin-right": "16rpx" },
  11246. name: "scan",
  11247. size: "30",
  11248. color: "#ffffff",
  11249. onClick: $setup.scanCode
  11250. }),
  11251. vue.createVNode(_component_u_search, {
  11252. height: "80rpx",
  11253. modelValue: $setup.searchText,
  11254. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  11255. placeholder: "请输入ISBN",
  11256. showAction: false,
  11257. clearabled: true,
  11258. onSearch: $setup.handleSearch,
  11259. bgColor: "#ffffff"
  11260. }, null, 8, ["modelValue"])
  11261. ])
  11262. ]),
  11263. vue.createCommentVNode(" 搜索结果列表 "),
  11264. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11265. key: 0,
  11266. class: "book-list"
  11267. }, [
  11268. (vue.openBlock(true), vue.createElementBlock(
  11269. vue.Fragment,
  11270. null,
  11271. vue.renderList($setup.bookList, (book, index2) => {
  11272. return vue.openBlock(), vue.createElementBlock("view", {
  11273. class: "book-item",
  11274. key: index2
  11275. }, [
  11276. vue.createElementVNode("view", { class: "book-info" }, [
  11277. vue.createElementVNode("image", {
  11278. class: "book-image",
  11279. src: book.cover,
  11280. mode: "aspectFill"
  11281. }, null, 8, ["src"]),
  11282. vue.createElementVNode("view", { class: "book-details" }, [
  11283. vue.createElementVNode(
  11284. "text",
  11285. { class: "book-title" },
  11286. vue.toDisplayString(book.bookName),
  11287. 1
  11288. /* TEXT */
  11289. ),
  11290. vue.createElementVNode(
  11291. "text",
  11292. { class: "book-isbn" },
  11293. "ISBN: " + vue.toDisplayString(book.isbn),
  11294. 1
  11295. /* TEXT */
  11296. ),
  11297. vue.createElementVNode(
  11298. "text",
  11299. { class: "book-price" },
  11300. "定价: " + vue.toDisplayString(book.price),
  11301. 1
  11302. /* TEXT */
  11303. ),
  11304. vue.createElementVNode(
  11305. "text",
  11306. { class: "book-set" },
  11307. "套装: " + vue.toDisplayString(book.suit == 1 ? "是" : "否"),
  11308. 1
  11309. /* TEXT */
  11310. )
  11311. ])
  11312. ]),
  11313. vue.createElementVNode("view", { class: "book-action" }, [
  11314. vue.createVNode(_component_u_icon, {
  11315. name: "edit-pen",
  11316. size: "30",
  11317. color: "#4cd964",
  11318. onClick: ($event) => $setup.editBook(book)
  11319. }, null, 8, ["onClick"])
  11320. ])
  11321. ]);
  11322. }),
  11323. 128
  11324. /* KEYED_FRAGMENT */
  11325. ))
  11326. ])) : vue.createCommentVNode("v-if", true),
  11327. vue.createVNode(
  11328. $setup["FeedbackPopup"],
  11329. {
  11330. ref: "showFeedback",
  11331. onSubmit: $setup.handleFeedbackSubmit
  11332. },
  11333. null,
  11334. 512
  11335. /* NEED_PATCH */
  11336. )
  11337. ]);
  11338. }
  11339. const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-0452ab4c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/index.vue"]]);
  11340. const props$k = {
  11341. props: {
  11342. // 标签类型info、primary、success、warning、error
  11343. type: {
  11344. type: String,
  11345. default: props$E.tag.type
  11346. },
  11347. // 不可用
  11348. disabled: {
  11349. type: [Boolean, String],
  11350. default: props$E.tag.disabled
  11351. },
  11352. // 标签的大小,large,medium,mini
  11353. size: {
  11354. type: String,
  11355. default: props$E.tag.size
  11356. },
  11357. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  11358. shape: {
  11359. type: String,
  11360. default: props$E.tag.shape
  11361. },
  11362. // 标签文字
  11363. text: {
  11364. type: [String, Number],
  11365. default: props$E.tag.text
  11366. },
  11367. // 背景颜色,默认为空字符串,即不处理
  11368. bgColor: {
  11369. type: String,
  11370. default: props$E.tag.bgColor
  11371. },
  11372. // 标签字体颜色,默认为空字符串,即不处理
  11373. color: {
  11374. type: String,
  11375. default: props$E.tag.color
  11376. },
  11377. // 标签的边框颜色
  11378. borderColor: {
  11379. type: String,
  11380. default: props$E.tag.borderColor
  11381. },
  11382. // 关闭按钮图标的颜色
  11383. closeColor: {
  11384. type: String,
  11385. default: props$E.tag.closeColor
  11386. },
  11387. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  11388. name: {
  11389. type: [String, Number],
  11390. default: props$E.tag.name
  11391. },
  11392. // // 模式选择,dark|light|plain
  11393. // mode: {
  11394. // type: String,
  11395. // default: 'light'
  11396. // },
  11397. // 镂空时是否填充背景色
  11398. plainFill: {
  11399. type: Boolean,
  11400. default: props$E.tag.plainFill
  11401. },
  11402. // 是否镂空
  11403. plain: {
  11404. type: Boolean,
  11405. default: props$E.tag.plain
  11406. },
  11407. // 是否可关闭
  11408. closable: {
  11409. type: Boolean,
  11410. default: props$E.tag.closable
  11411. },
  11412. // 是否显示
  11413. show: {
  11414. type: Boolean,
  11415. default: props$E.tag.show
  11416. },
  11417. // 内置图标,或绝对路径的图片
  11418. icon: {
  11419. type: String,
  11420. default: props$E.tag.icon
  11421. }
  11422. }
  11423. };
  11424. const _sfc_main$1z = {
  11425. name: "u-tag",
  11426. mixins: [mpMixin, mixin, props$k],
  11427. data() {
  11428. return {};
  11429. },
  11430. computed: {
  11431. style() {
  11432. const style = {};
  11433. if (this.bgColor) {
  11434. style.backgroundColor = this.bgColor;
  11435. }
  11436. if (this.color) {
  11437. style.color = this.color;
  11438. }
  11439. if (this.borderColor) {
  11440. style.borderColor = this.borderColor;
  11441. }
  11442. return style;
  11443. },
  11444. // nvue下,文本颜色无法继承父元素
  11445. textColor() {
  11446. const style = {};
  11447. if (this.color) {
  11448. style.color = this.color;
  11449. }
  11450. return style;
  11451. },
  11452. imgStyle() {
  11453. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  11454. return {
  11455. width,
  11456. height: width
  11457. };
  11458. },
  11459. // 文本的样式
  11460. closeSize() {
  11461. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  11462. return size;
  11463. },
  11464. // 图标大小
  11465. iconSize() {
  11466. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  11467. return size;
  11468. },
  11469. // 图标颜色
  11470. elIconColor() {
  11471. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  11472. }
  11473. },
  11474. methods: {
  11475. // 点击关闭按钮
  11476. closeHandler() {
  11477. this.$emit("close", this.name);
  11478. },
  11479. // 点击标签
  11480. clickHandler() {
  11481. this.$emit("click", this.name);
  11482. }
  11483. }
  11484. };
  11485. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  11486. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11487. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  11488. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  11489. mode: "fade",
  11490. show: _ctx.show,
  11491. style: { "display": "inline-flex" }
  11492. }, {
  11493. default: vue.withCtx(() => [
  11494. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  11495. vue.createElementVNode(
  11496. "view",
  11497. {
  11498. 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`]]),
  11499. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  11500. style: vue.normalizeStyle([{
  11501. marginRight: _ctx.closable ? "10px" : 0,
  11502. marginTop: _ctx.closable ? "10px" : 0
  11503. }, $options.style])
  11504. },
  11505. [
  11506. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  11507. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  11508. key: 0,
  11509. class: "u-tag__icon"
  11510. }, [
  11511. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  11512. key: 0,
  11513. src: _ctx.icon,
  11514. style: vue.normalizeStyle([$options.imgStyle])
  11515. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  11516. key: 1,
  11517. color: $options.elIconColor,
  11518. name: _ctx.icon,
  11519. size: $options.iconSize
  11520. }, null, 8, ["color", "name", "size"]))
  11521. ])) : vue.createCommentVNode("v-if", true)
  11522. ], true),
  11523. vue.createElementVNode(
  11524. "text",
  11525. {
  11526. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  11527. style: vue.normalizeStyle([$options.textColor])
  11528. },
  11529. vue.toDisplayString(_ctx.text),
  11530. 7
  11531. /* TEXT, CLASS, STYLE */
  11532. )
  11533. ],
  11534. 6
  11535. /* CLASS, STYLE */
  11536. ),
  11537. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  11538. "view",
  11539. {
  11540. key: 0,
  11541. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  11542. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  11543. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  11544. },
  11545. [
  11546. vue.createVNode(_component_u_icon, {
  11547. name: "close",
  11548. size: $options.closeSize,
  11549. color: "#ffffff"
  11550. }, null, 8, ["size"])
  11551. ],
  11552. 6
  11553. /* CLASS, STYLE */
  11554. )) : vue.createCommentVNode("v-if", true)
  11555. ])
  11556. ]),
  11557. _: 3
  11558. /* FORWARDED */
  11559. }, 8, ["show"]);
  11560. }
  11561. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  11562. const _sfc_main$1y = {
  11563. __name: "WarehouseSelector",
  11564. props: {
  11565. show: {
  11566. type: Boolean,
  11567. default: false
  11568. }
  11569. },
  11570. emits: ["update:show", "warehouse-selected"],
  11571. setup(__props, { expose: __expose, emit: __emit }) {
  11572. __expose();
  11573. const props2 = __props;
  11574. const emit2 = __emit;
  11575. const searchKeyword = vue.ref("");
  11576. const searchResults = vue.ref([]);
  11577. const historyWarehouses = vue.ref([""]);
  11578. const selectedWarehouse = vue.ref("");
  11579. const warehouseSearch = (name) => {
  11580. formatAppLog("log", "at pages/index/express/components/WarehouseSelector.vue:68", name);
  11581. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  11582. if (res2.code == 200) {
  11583. searchResults.value = res2.data;
  11584. }
  11585. });
  11586. };
  11587. const getUserBindHistory = () => {
  11588. uni.$u.http.get("/app/appUser/getUserBindGodownReocrd").then((res2) => {
  11589. if (res2.code == 200) {
  11590. historyWarehouses.value = res2.data;
  11591. }
  11592. });
  11593. };
  11594. getUserBindHistory();
  11595. const handleSearch = () => {
  11596. warehouseSearch(searchKeyword.value);
  11597. };
  11598. const selectItem = vue.ref({});
  11599. const selectWarehouse = (item) => {
  11600. selectedWarehouse.value = item.godownName;
  11601. selectItem.value = item;
  11602. };
  11603. const handleClose = () => {
  11604. emit2("update:show", false);
  11605. searchKeyword.value = "";
  11606. };
  11607. const handleConfirm = () => {
  11608. if (selectedWarehouse.value) {
  11609. emit2("warehouse-selected", selectItem.value);
  11610. handleClose();
  11611. }
  11612. };
  11613. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, warehouseSearch, getUserBindHistory, handleSearch, selectItem, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
  11614. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11615. return __returned__;
  11616. }
  11617. };
  11618. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  11619. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11620. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  11621. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11622. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11623. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11624. show: $props.show,
  11625. onClose: $setup.handleClose,
  11626. mode: "bottom",
  11627. round: "10"
  11628. }, {
  11629. default: vue.withCtx(() => [
  11630. vue.createElementVNode("view", { class: "warehouse-selector" }, [
  11631. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  11632. vue.createCommentVNode(" 标题 "),
  11633. vue.createElementVNode("view", { class: "header" }, [
  11634. vue.createElementVNode("text", { class: "title" }, "绑定仓库")
  11635. ]),
  11636. vue.createCommentVNode(" 搜索框 "),
  11637. vue.createElementVNode("view", { class: "search-box" }, [
  11638. vue.createVNode(_component_u_search, {
  11639. inputStyle: { "height": "80rpx", "font-size": "16px" },
  11640. actionStyle: { "font-size": "16px", color: "#22ac38" },
  11641. modelValue: $setup.searchKeyword,
  11642. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  11643. placeholder: "搜索仓库",
  11644. "show-action": true,
  11645. "action-text": "搜索",
  11646. onSearch: $setup.handleSearch,
  11647. onCustom: $setup.handleSearch
  11648. }, null, 8, ["modelValue"])
  11649. ]),
  11650. vue.createCommentVNode(" 搜索结果 "),
  11651. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11652. key: 0,
  11653. class: "search-result"
  11654. }, [
  11655. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  11656. vue.createElementVNode("view", { class: "tag-group" }, [
  11657. (vue.openBlock(true), vue.createElementBlock(
  11658. vue.Fragment,
  11659. null,
  11660. vue.renderList($setup.searchResults, (item) => {
  11661. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11662. key: item,
  11663. text: item.godownName,
  11664. plain: $setup.selectedWarehouse !== item.godownName,
  11665. shape: "circle",
  11666. onClick: ($event) => $setup.selectWarehouse(item),
  11667. size: "large"
  11668. }, null, 8, ["text", "plain", "onClick"]);
  11669. }),
  11670. 128
  11671. /* KEYED_FRAGMENT */
  11672. ))
  11673. ])
  11674. ])) : vue.createCommentVNode("v-if", true),
  11675. vue.createCommentVNode(" 历史绑定 "),
  11676. $setup.historyWarehouses.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11677. key: 1,
  11678. class: "history-section"
  11679. }, [
  11680. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  11681. vue.createElementVNode("view", { class: "tag-group" }, [
  11682. (vue.openBlock(true), vue.createElementBlock(
  11683. vue.Fragment,
  11684. null,
  11685. vue.renderList($setup.historyWarehouses, (item) => {
  11686. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11687. key: item,
  11688. text: item,
  11689. plain: $setup.selectedWarehouse !== item.godownName,
  11690. shape: "circle",
  11691. onClick: ($event) => $setup.selectWarehouse(item),
  11692. size: "large"
  11693. }, null, 8, ["text", "plain", "onClick"]);
  11694. }),
  11695. 128
  11696. /* KEYED_FRAGMENT */
  11697. ))
  11698. ])
  11699. ])) : vue.createCommentVNode("v-if", true)
  11700. ]),
  11701. vue.createCommentVNode(" 底部按钮 "),
  11702. vue.createElementVNode("view", { class: "footer" }, [
  11703. vue.createVNode(_component_u_button, {
  11704. onClick: $setup.handleClose,
  11705. text: "取消",
  11706. plain: "",
  11707. shape: "circle"
  11708. }),
  11709. vue.createVNode(_component_u_button, {
  11710. type: "primary",
  11711. onClick: $setup.handleConfirm,
  11712. text: "确定",
  11713. shape: "circle"
  11714. })
  11715. ])
  11716. ])
  11717. ]),
  11718. _: 1
  11719. /* STABLE */
  11720. }, 8, ["show"]);
  11721. }
  11722. const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-b9bd3f04"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/WarehouseSelector.vue"]]);
  11723. const placeholderStyle$2 = "font-size:32rpx";
  11724. const _sfc_main$1x = {
  11725. __name: "transfer-sign",
  11726. setup(__props, { expose: __expose }) {
  11727. __expose();
  11728. const customStyle = vue.reactive({
  11729. height: "90rpx"
  11730. });
  11731. const selectedWarehouse = vue.ref("");
  11732. const form = vue.ref({
  11733. "packageCode": "",
  11734. "godownId": ""
  11735. });
  11736. const showSelector = vue.ref(false);
  11737. function openWarehouseSelector() {
  11738. showSelector.value = true;
  11739. }
  11740. function handleWarehouseSelected(item) {
  11741. selectedWarehouse.value = item.godownName;
  11742. form.value.godownId = item.id;
  11743. }
  11744. function scanCode() {
  11745. uni.scanCode({
  11746. success: (res2) => {
  11747. form.value.packageCode = res2.result;
  11748. handleBarcode(res2.result);
  11749. },
  11750. fail: (err) => {
  11751. uni.$u.toast("扫码失败");
  11752. }
  11753. });
  11754. }
  11755. function handleBarcode(code2) {
  11756. if (!code2)
  11757. return uni.$u.toast("请输入物流单号");
  11758. uni.$u.http.post("/app/ordersign/transferSign", form.value).then((res2) => {
  11759. if (res2.code == 200) {
  11760. let text = code2 + "签收成功";
  11761. uni.$u.ttsModule.speak(text);
  11762. } else {
  11763. let text = code2 + "订单不存在";
  11764. uni.$u.ttsModule.speak(text);
  11765. }
  11766. });
  11767. }
  11768. function getUserBindWarehouse() {
  11769. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  11770. var _a, _b;
  11771. if (res2.code == 200) {
  11772. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  11773. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  11774. }
  11775. });
  11776. }
  11777. onLoad(() => {
  11778. getUserBindWarehouse();
  11779. uni.$u.useGlobalEvent((e) => {
  11780. form.value.packageCode = e.barcode;
  11781. handleBarcode(e.barcode);
  11782. });
  11783. });
  11784. const __returned__ = { placeholderStyle: placeholderStyle$2, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  11785. return onLoad;
  11786. }, WarehouseSelector };
  11787. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11788. return __returned__;
  11789. }
  11790. };
  11791. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  11792. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11793. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11794. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11795. vue.createElementVNode("view", { class: "main-content" }, [
  11796. vue.createElementVNode("view", { class: "input-group" }, [
  11797. vue.createVNode(_component_u_input, {
  11798. customStyle: $setup.customStyle,
  11799. "placeholder-style": $setup.placeholderStyle,
  11800. modelValue: $setup.selectedWarehouse,
  11801. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  11802. placeholder: "请选择仓库",
  11803. readonly: "",
  11804. border: "surround"
  11805. }, null, 8, ["customStyle", "modelValue"]),
  11806. vue.createVNode(_component_u_button, {
  11807. customStyle: $setup.customStyle,
  11808. type: "info",
  11809. color: "#a4adb3",
  11810. onClick: $setup.openWarehouseSelector,
  11811. text: "选择"
  11812. }, null, 8, ["customStyle"])
  11813. ]),
  11814. vue.createElementVNode("view", { class: "input-group" }, [
  11815. vue.createVNode(_component_u_input, {
  11816. customStyle: $setup.customStyle,
  11817. "placeholder-style": $setup.placeholderStyle,
  11818. modelValue: $setup.form.packageCode,
  11819. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  11820. placeholder: "扫描/输入物流单号",
  11821. border: "surround"
  11822. }, null, 8, ["customStyle", "modelValue"]),
  11823. vue.createVNode(_component_u_button, {
  11824. customStyle: $setup.customStyle,
  11825. type: "info",
  11826. color: "#a4adb3",
  11827. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  11828. text: "确定"
  11829. }, null, 8, ["customStyle"])
  11830. ])
  11831. ]),
  11832. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  11833. vue.createVNode(_component_u_button, {
  11834. size: "large",
  11835. type: "success",
  11836. onClick: $setup.scanCode,
  11837. text: "扫码",
  11838. class: "scan-button"
  11839. })
  11840. ]),
  11841. vue.createVNode($setup["WarehouseSelector"], {
  11842. show: $setup.showSelector,
  11843. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  11844. onWarehouseSelected: $setup.handleWarehouseSelected
  11845. }, null, 8, ["show"])
  11846. ]);
  11847. }
  11848. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-333d344a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/transfer-sign.vue"]]);
  11849. const _sfc_main$1w = {
  11850. __name: "scan",
  11851. setup(__props, { expose: __expose }) {
  11852. __expose();
  11853. const isInitializing = vue.ref(false);
  11854. const isBluetoothOpened = vue.ref(false);
  11855. const isDiscovering = vue.ref(false);
  11856. const isConnecting = vue.ref(false);
  11857. const isConnected = vue.ref(false);
  11858. const devices = vue.ref([]);
  11859. const selectedDevice = vue.ref(null);
  11860. const scanData = vue.ref(null);
  11861. const deviceId = vue.ref("");
  11862. const serviceId = vue.ref("");
  11863. const characteristicId = vue.ref("");
  11864. const initBluetooth = () => {
  11865. isInitializing.value = true;
  11866. uni.openBluetoothAdapter({
  11867. success: (res2) => {
  11868. formatAppLog("log", "at pages/index/express/scan.vue:35", "蓝牙适配器初始化成功");
  11869. isBluetoothOpened.value = true;
  11870. isInitializing.value = false;
  11871. },
  11872. fail: (err) => {
  11873. formatAppLog("log", "at pages/index/express/scan.vue:40", "蓝牙适配器初始化失败:", err);
  11874. isInitializing.value = false;
  11875. }
  11876. });
  11877. };
  11878. const startDiscovery = () => {
  11879. isDiscovering.value = true;
  11880. uni.startBluetoothDevicesDiscovery({
  11881. success: (res2) => {
  11882. formatAppLog("log", "at pages/index/express/scan.vue:50", "开始搜索蓝牙设备成功");
  11883. uni.onBluetoothDeviceFound((devicesRes) => {
  11884. const newDevices = devicesRes.devices;
  11885. devices.value = devices.value.concat(newDevices);
  11886. formatAppLog("log", "at pages/index/express/scan.vue:54", devices.value, "devices.value");
  11887. const scanGunDevice = newDevices.find((device) => device.name.includes("Z0"));
  11888. if (scanGunDevice) {
  11889. selectedDevice.value = scanGunDevice;
  11890. deviceId.value = scanGunDevice.deviceId;
  11891. }
  11892. });
  11893. uni.onBluetoothAdapterStateChange((stateRes) => {
  11894. if (!stateRes.available) {
  11895. isDiscovering.value = false;
  11896. formatAppLog("log", "at pages/index/express/scan.vue:64", "蓝牙适配器不可用,停止搜索");
  11897. }
  11898. });
  11899. },
  11900. fail: (err) => {
  11901. formatAppLog("log", "at pages/index/express/scan.vue:69", "开始搜索蓝牙设备失败:", err);
  11902. isDiscovering.value = false;
  11903. }
  11904. });
  11905. };
  11906. const connectDevice = () => {
  11907. isConnecting.value = true;
  11908. uni.createBLEConnection({
  11909. deviceId: deviceId.value,
  11910. success: (res2) => {
  11911. formatAppLog("log", "at pages/index/express/scan.vue:80", "连接蓝牙设备成功");
  11912. isConnected.value = true;
  11913. isConnecting.value = false;
  11914. getBLEDeviceServices(deviceId.value);
  11915. },
  11916. fail: (err) => {
  11917. formatAppLog("log", "at pages/index/express/scan.vue:86", "连接蓝牙设备失败:", err);
  11918. isConnecting.value = false;
  11919. }
  11920. });
  11921. };
  11922. const getBLEDeviceServices = (deviceId2) => {
  11923. uni.getBLEDeviceServices({
  11924. deviceId: deviceId2,
  11925. success: (res2) => {
  11926. formatAppLog("log", "at pages/index/express/scan.vue:96", "获取服务列表成功:", res2.services);
  11927. const targetService = res2.services.find((service) => service.uuid === "目标服务UUID");
  11928. if (targetService) {
  11929. serviceId.value = targetService.uuid;
  11930. getBLEDeviceCharacteristics(deviceId2, serviceId.value);
  11931. }
  11932. },
  11933. fail: (err) => {
  11934. formatAppLog("log", "at pages/index/express/scan.vue:104", "获取服务列表失败:", err);
  11935. }
  11936. });
  11937. };
  11938. const getBLEDeviceCharacteristics = (deviceId2, serviceId2) => {
  11939. uni.getBLEDeviceCharacteristics({
  11940. deviceId: deviceId2,
  11941. serviceId: serviceId2,
  11942. success: (res2) => {
  11943. formatAppLog("log", "at pages/index/express/scan.vue:114", "获取特征列表成功:", res2.characteristics);
  11944. const targetCharacteristic = res2.characteristics.find((characteristic) => characteristic.properties.read && characteristic.properties.notify);
  11945. if (targetCharacteristic) {
  11946. characteristicId.value = targetCharacteristic.uuid;
  11947. }
  11948. },
  11949. fail: (err) => {
  11950. formatAppLog("log", "at pages/index/express/scan.vue:121", "获取特征列表失败:", err);
  11951. }
  11952. });
  11953. };
  11954. const startDataMonitor = () => {
  11955. uni.onBLECharacteristicValueChange((characteristicRes) => {
  11956. const value2 = characteristicRes.value;
  11957. const data = ab2str(value2);
  11958. formatAppLog("log", "at pages/index/express/scan.vue:130", "获取到扫码枪扫描的数据:", data);
  11959. scanData.value = data;
  11960. });
  11961. uni.notifyBLECharacteristicValueChange({
  11962. state: true,
  11963. deviceId: deviceId.value,
  11964. characteristicId: characteristicId.value,
  11965. success: (res2) => {
  11966. formatAppLog("log", "at pages/index/express/scan.vue:138", "开启特征值通知成功");
  11967. },
  11968. fail: (err) => {
  11969. formatAppLog("log", "at pages/index/express/scan.vue:141", "开启特征值通知失败:", err);
  11970. }
  11971. });
  11972. };
  11973. const ab2str = (buffer) => {
  11974. return String.fromCharCode.apply(null, new Uint8Array(buffer));
  11975. };
  11976. 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() {
  11977. return onLoad;
  11978. } };
  11979. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11980. return __returned__;
  11981. }
  11982. };
  11983. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  11984. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11985. vue.createElementVNode("button", {
  11986. onClick: $setup.initBluetooth,
  11987. disabled: $setup.isInitializing
  11988. }, "初始化蓝牙", 8, ["disabled"]),
  11989. vue.createElementVNode("button", {
  11990. onClick: $setup.startDiscovery,
  11991. disabled: $setup.isDiscovering || !$setup.isBluetoothOpened
  11992. }, "开始搜索设备", 8, ["disabled"]),
  11993. vue.createElementVNode("button", {
  11994. onClick: $setup.connectDevice,
  11995. disabled: !$setup.selectedDevice || $setup.isConnecting
  11996. }, "连接设备", 8, ["disabled"]),
  11997. vue.createElementVNode("button", {
  11998. onClick: $setup.startDataMonitor,
  11999. disabled: !$setup.isConnected
  12000. }, "开始监听数据", 8, ["disabled"]),
  12001. $setup.scanData ? (vue.openBlock(), vue.createElementBlock(
  12002. "view",
  12003. { key: 0 },
  12004. "扫描结果: " + vue.toDisplayString($setup.scanData),
  12005. 1
  12006. /* TEXT */
  12007. )) : vue.createCommentVNode("v-if", true),
  12008. (vue.openBlock(true), vue.createElementBlock(
  12009. vue.Fragment,
  12010. null,
  12011. vue.renderList($setup.devices, (item) => {
  12012. return vue.openBlock(), vue.createElementBlock(
  12013. "view",
  12014. null,
  12015. vue.toDisplayString(item.name),
  12016. 1
  12017. /* TEXT */
  12018. );
  12019. }),
  12020. 256
  12021. /* UNKEYED_FRAGMENT */
  12022. ))
  12023. ]);
  12024. }
  12025. const PagesIndexExpressScan = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/scan.vue"]]);
  12026. const props$j = {
  12027. props: {
  12028. // radio的名称
  12029. name: {
  12030. type: [String, Number, Boolean],
  12031. default: props$E.radio.name
  12032. },
  12033. // 形状,square为方形,circle为圆型
  12034. shape: {
  12035. type: String,
  12036. default: props$E.radio.shape
  12037. },
  12038. // 是否禁用
  12039. disabled: {
  12040. type: [String, Boolean],
  12041. default: props$E.radio.disabled
  12042. },
  12043. // 是否禁止点击提示语选中单选框
  12044. labelDisabled: {
  12045. type: [String, Boolean],
  12046. default: props$E.radio.labelDisabled
  12047. },
  12048. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12049. activeColor: {
  12050. type: String,
  12051. default: props$E.radio.activeColor
  12052. },
  12053. // 未选中的颜色
  12054. inactiveColor: {
  12055. type: String,
  12056. default: props$E.radio.inactiveColor
  12057. },
  12058. // 图标的大小,单位px
  12059. iconSize: {
  12060. type: [String, Number],
  12061. default: props$E.radio.iconSize
  12062. },
  12063. // label的字体大小,px单位
  12064. labelSize: {
  12065. type: [String, Number],
  12066. default: props$E.radio.labelSize
  12067. },
  12068. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  12069. label: {
  12070. type: [String, Number],
  12071. default: props$E.radio.label
  12072. },
  12073. // 整体的大小
  12074. size: {
  12075. type: [String, Number],
  12076. default: props$E.radio.size
  12077. },
  12078. // 图标颜色
  12079. color: {
  12080. type: String,
  12081. default: props$E.radio.color
  12082. },
  12083. // label的颜色
  12084. labelColor: {
  12085. type: String,
  12086. default: props$E.radio.labelColor
  12087. },
  12088. // 图标颜色
  12089. iconColor: {
  12090. type: String,
  12091. default: props$E.radio.iconColor
  12092. }
  12093. }
  12094. };
  12095. const _sfc_main$1v = {
  12096. name: "u-radio",
  12097. mixins: [mpMixin, mixin, props$j],
  12098. data() {
  12099. return {
  12100. checked: false,
  12101. // 当你看到这段代码的时候,
  12102. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  12103. // 故只能使用如此方法
  12104. parentData: {
  12105. iconSize: 12,
  12106. labelDisabled: null,
  12107. disabled: null,
  12108. shape: null,
  12109. activeColor: null,
  12110. inactiveColor: null,
  12111. size: 18,
  12112. value: null,
  12113. modelValue: null,
  12114. iconColor: null,
  12115. placement: "row",
  12116. borderBottom: false,
  12117. iconPlacement: "left"
  12118. }
  12119. };
  12120. },
  12121. computed: {
  12122. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  12123. elDisabled() {
  12124. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  12125. },
  12126. // 是否禁用label点击
  12127. elLabelDisabled() {
  12128. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  12129. },
  12130. // 组件尺寸,对应size的值,默认值为21px
  12131. elSize() {
  12132. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  12133. },
  12134. // 组件的勾选图标的尺寸,默认12px
  12135. elIconSize() {
  12136. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  12137. },
  12138. // 组件选中激活时的颜色
  12139. elActiveColor() {
  12140. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  12141. },
  12142. // 组件选未中激活时的颜色
  12143. elInactiveColor() {
  12144. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  12145. },
  12146. // label的颜色
  12147. elLabelColor() {
  12148. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  12149. },
  12150. // 组件的形状
  12151. elShape() {
  12152. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  12153. },
  12154. // label大小
  12155. elLabelSize() {
  12156. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  12157. },
  12158. elIconColor() {
  12159. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  12160. if (this.elDisabled) {
  12161. return this.checked ? this.elInactiveColor : "transparent";
  12162. } else {
  12163. return this.checked ? iconColor : "transparent";
  12164. }
  12165. },
  12166. iconClasses() {
  12167. let classes = [];
  12168. classes.push("u-radio__icon-wrap--" + this.elShape);
  12169. if (this.elDisabled) {
  12170. classes.push("u-radio__icon-wrap--disabled");
  12171. }
  12172. if (this.checked && this.elDisabled) {
  12173. classes.push("u-radio__icon-wrap--disabled--checked");
  12174. }
  12175. return classes;
  12176. },
  12177. iconWrapStyle() {
  12178. const style = {};
  12179. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  12180. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  12181. style.width = uni.$u.addUnit(this.elSize);
  12182. style.height = uni.$u.addUnit(this.elSize);
  12183. if (this.parentData.iconPlacement === "right") {
  12184. style.marginRight = 0;
  12185. }
  12186. return style;
  12187. },
  12188. radioStyle() {
  12189. const style = {};
  12190. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  12191. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  12192. }
  12193. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  12194. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  12195. }
  12196. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  12197. }
  12198. },
  12199. mounted() {
  12200. this.init();
  12201. },
  12202. methods: {
  12203. init() {
  12204. this.updateParentData();
  12205. if (!this.parent) {
  12206. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  12207. }
  12208. this.checked = this.name === this.parentData.modelValue;
  12209. },
  12210. updateParentData() {
  12211. this.getParentData("u-radio-group");
  12212. },
  12213. // 点击图标
  12214. iconClickHandler(e) {
  12215. this.preventEvent(e);
  12216. if (!this.elDisabled) {
  12217. this.setRadioCheckedStatus();
  12218. }
  12219. },
  12220. // 横向两端排列时,点击组件即可触发选中事件
  12221. wrapperClickHandler(e) {
  12222. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  12223. },
  12224. // 点击label
  12225. labelClickHandler(e) {
  12226. this.preventEvent(e);
  12227. if (!this.elLabelDisabled && !this.elDisabled) {
  12228. this.setRadioCheckedStatus();
  12229. }
  12230. },
  12231. emitEvent() {
  12232. if (!this.checked) {
  12233. this.$emit("change", this.name);
  12234. this.$nextTick(() => {
  12235. uni.$u.formValidate(this, "change");
  12236. });
  12237. }
  12238. },
  12239. // 改变组件选中状态
  12240. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  12241. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  12242. setRadioCheckedStatus() {
  12243. this.emitEvent();
  12244. this.checked = true;
  12245. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  12246. }
  12247. }
  12248. };
  12249. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  12250. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12251. return vue.openBlock(), vue.createElementBlock(
  12252. "view",
  12253. {
  12254. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  12255. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  12256. style: vue.normalizeStyle([$options.radioStyle])
  12257. },
  12258. [
  12259. vue.createElementVNode(
  12260. "view",
  12261. {
  12262. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  12263. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  12264. style: vue.normalizeStyle([$options.iconWrapStyle])
  12265. },
  12266. [
  12267. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  12268. vue.createVNode(_component_u_icon, {
  12269. class: "u-radio__icon-wrap__icon",
  12270. name: "checkbox-mark",
  12271. size: $options.elIconSize,
  12272. color: $options.elIconColor
  12273. }, null, 8, ["size", "color"])
  12274. ], true)
  12275. ],
  12276. 6
  12277. /* CLASS, STYLE */
  12278. ),
  12279. vue.createElementVNode(
  12280. "text",
  12281. {
  12282. class: "u-radio__text",
  12283. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  12284. style: vue.normalizeStyle({
  12285. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  12286. fontSize: $options.elLabelSize,
  12287. lineHeight: $options.elLabelSize
  12288. })
  12289. },
  12290. vue.toDisplayString(_ctx.label),
  12291. 5
  12292. /* TEXT, STYLE */
  12293. )
  12294. ],
  12295. 6
  12296. /* CLASS, STYLE */
  12297. );
  12298. }
  12299. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-83036558"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  12300. const props$i = {
  12301. props: {
  12302. // 绑定的值
  12303. modelValue: {
  12304. type: [String, Number, Boolean],
  12305. default: props$E.radioGroup.value
  12306. },
  12307. // 是否禁用全部radio
  12308. disabled: {
  12309. type: Boolean,
  12310. default: props$E.radioGroup.disabled
  12311. },
  12312. // 形状,circle-圆形,square-方形
  12313. shape: {
  12314. type: String,
  12315. default: props$E.radioGroup.shape
  12316. },
  12317. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12318. activeColor: {
  12319. type: String,
  12320. default: props$E.radioGroup.activeColor
  12321. },
  12322. // 未选中的颜色
  12323. inactiveColor: {
  12324. type: String,
  12325. default: props$E.radioGroup.inactiveColor
  12326. },
  12327. // 标识符
  12328. name: {
  12329. type: String,
  12330. default: props$E.radioGroup.name
  12331. },
  12332. // 整个组件的尺寸,默认px
  12333. size: {
  12334. type: [String, Number],
  12335. default: props$E.radioGroup.size
  12336. },
  12337. // 布局方式,row-横向,column-纵向
  12338. placement: {
  12339. type: String,
  12340. default: props$E.radioGroup.placement
  12341. },
  12342. // label的文本
  12343. label: {
  12344. type: [String],
  12345. default: props$E.radioGroup.label
  12346. },
  12347. // label的颜色 (默认 '#303133' )
  12348. labelColor: {
  12349. type: [String],
  12350. default: props$E.radioGroup.labelColor
  12351. },
  12352. // label的字体大小,px单位
  12353. labelSize: {
  12354. type: [String, Number],
  12355. default: props$E.radioGroup.labelSize
  12356. },
  12357. // 是否禁止点击文本操作checkbox(默认 false )
  12358. labelDisabled: {
  12359. type: Boolean,
  12360. default: props$E.radioGroup.labelDisabled
  12361. },
  12362. // 图标颜色
  12363. iconColor: {
  12364. type: String,
  12365. default: props$E.radioGroup.iconColor
  12366. },
  12367. // 图标的大小,单位px
  12368. iconSize: {
  12369. type: [String, Number],
  12370. default: props$E.radioGroup.iconSize
  12371. },
  12372. // 竖向配列时,是否显示下划线
  12373. borderBottom: {
  12374. type: Boolean,
  12375. default: props$E.radioGroup.borderBottom
  12376. },
  12377. // 图标与文字的对齐方式
  12378. iconPlacement: {
  12379. type: String,
  12380. default: props$E.radio.iconPlacement
  12381. }
  12382. }
  12383. };
  12384. const _sfc_main$1u = {
  12385. name: "u-radio-group",
  12386. mixins: [mpMixin, mixin, props$i],
  12387. computed: {
  12388. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  12389. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  12390. // 拉取父组件新的变化后的参数
  12391. parentData() {
  12392. return [
  12393. this.modelValue,
  12394. this.disabled,
  12395. this.inactiveColor,
  12396. this.activeColor,
  12397. this.size,
  12398. this.labelDisabled,
  12399. this.shape,
  12400. this.iconSize,
  12401. this.borderBottom,
  12402. this.placement
  12403. ];
  12404. },
  12405. bemClass() {
  12406. return this.bem("radio-group", ["placement"]);
  12407. }
  12408. },
  12409. watch: {
  12410. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  12411. parentData() {
  12412. if (this.children.length) {
  12413. this.children.map((child) => {
  12414. typeof child.init === "function" && child.init();
  12415. });
  12416. }
  12417. }
  12418. },
  12419. data() {
  12420. return {};
  12421. },
  12422. created() {
  12423. this.children = [];
  12424. },
  12425. emits: ["update:modelValue", "change"],
  12426. methods: {
  12427. // 将其他的radio设置为未选中的状态
  12428. unCheckedOther(childInstance) {
  12429. this.children.map((child) => {
  12430. if (childInstance !== child) {
  12431. child.checked = false;
  12432. }
  12433. });
  12434. const {
  12435. name
  12436. } = childInstance;
  12437. this.$emit("update:modelValue", name);
  12438. this.$emit("change", name);
  12439. }
  12440. }
  12441. };
  12442. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  12443. return vue.openBlock(), vue.createElementBlock(
  12444. "view",
  12445. {
  12446. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  12447. },
  12448. [
  12449. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  12450. ],
  12451. 2
  12452. /* CLASS */
  12453. );
  12454. }
  12455. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  12456. const props$h = {
  12457. props: {
  12458. // 是否虚线
  12459. dashed: {
  12460. type: Boolean,
  12461. default: props$E.divider.dashed
  12462. },
  12463. // 是否细线
  12464. hairline: {
  12465. type: Boolean,
  12466. default: props$E.divider.hairline
  12467. },
  12468. // 是否以点替代文字,优先于text字段起作用
  12469. dot: {
  12470. type: Boolean,
  12471. default: props$E.divider.dot
  12472. },
  12473. // 内容文本的位置,left-左边,center-中间,right-右边
  12474. textPosition: {
  12475. type: String,
  12476. default: props$E.divider.textPosition
  12477. },
  12478. // 文本内容
  12479. text: {
  12480. type: [String, Number],
  12481. default: props$E.divider.text
  12482. },
  12483. // 文本大小
  12484. textSize: {
  12485. type: [String, Number],
  12486. default: props$E.divider.textSize
  12487. },
  12488. // 文本颜色
  12489. textColor: {
  12490. type: String,
  12491. default: props$E.divider.textColor
  12492. },
  12493. // 线条颜色
  12494. lineColor: {
  12495. type: String,
  12496. default: props$E.divider.lineColor
  12497. }
  12498. }
  12499. };
  12500. const _sfc_main$1t = {
  12501. name: "u-divider",
  12502. mixins: [mpMixin, mixin, props$h],
  12503. computed: {
  12504. textStyle() {
  12505. const style = {};
  12506. style.fontSize = uni.$u.addUnit(this.textSize);
  12507. style.color = this.textColor;
  12508. return style;
  12509. },
  12510. // 左边线条的的样式
  12511. leftLineStyle() {
  12512. const style = {};
  12513. if (this.textPosition === "left") {
  12514. style.width = "80rpx";
  12515. } else {
  12516. style.flex = 1;
  12517. }
  12518. return style;
  12519. },
  12520. // 右边线条的的样式
  12521. rightLineStyle() {
  12522. const style = {};
  12523. if (this.textPosition === "right") {
  12524. style.width = "80rpx";
  12525. } else {
  12526. style.flex = 1;
  12527. }
  12528. return style;
  12529. }
  12530. },
  12531. methods: {
  12532. // divider组件被点击时触发
  12533. click() {
  12534. this.$emit("click");
  12535. }
  12536. }
  12537. };
  12538. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  12539. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  12540. return vue.openBlock(), vue.createElementBlock(
  12541. "view",
  12542. {
  12543. class: "u-divider",
  12544. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  12545. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  12546. },
  12547. [
  12548. vue.createVNode(_component_u_line, {
  12549. color: _ctx.lineColor,
  12550. customStyle: $options.leftLineStyle,
  12551. hairline: _ctx.hairline,
  12552. dashed: _ctx.dashed
  12553. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  12554. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  12555. key: 0,
  12556. class: "u-divider__dot"
  12557. }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  12558. "text",
  12559. {
  12560. key: 1,
  12561. class: "u-divider__text",
  12562. style: vue.normalizeStyle([$options.textStyle])
  12563. },
  12564. vue.toDisplayString(_ctx.text),
  12565. 5
  12566. /* TEXT, STYLE */
  12567. )) : vue.createCommentVNode("v-if", true),
  12568. vue.createVNode(_component_u_line, {
  12569. color: _ctx.lineColor,
  12570. customStyle: $options.rightLineStyle,
  12571. hairline: _ctx.hairline,
  12572. dashed: _ctx.dashed
  12573. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  12574. ],
  12575. 4
  12576. /* STYLE */
  12577. );
  12578. }
  12579. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-ea022cee"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  12580. const _sfc_main$1s = {
  12581. __name: "quick-check",
  12582. setup(__props, { expose: __expose }) {
  12583. __expose();
  12584. const selectedBatchId = vue.ref("");
  12585. const showBatchSelector = vue.ref(false);
  12586. const count = vue.ref(0);
  12587. const formData = vue.ref({
  12588. batchNum: "",
  12589. packageCode: "",
  12590. searchType: "2",
  12591. packageStatus: ""
  12592. });
  12593. const batchList = vue.ref([]);
  12594. function getBatchList() {
  12595. uni.$u.http.get("/app/batchnum/pagelist").then((res2) => {
  12596. batchList.value = res2.rows;
  12597. });
  12598. }
  12599. getBatchList();
  12600. const openBatchSelector = () => {
  12601. showBatchSelector.value = true;
  12602. };
  12603. const selectBatch = (batch) => {
  12604. selectedBatchId.value = batch.id;
  12605. count.value = Number(batch.num);
  12606. formData.value.batchNum = batch.batchNum;
  12607. showBatchSelector.value = false;
  12608. };
  12609. const handleSearch = () => {
  12610. formatAppLog("log", "at pages/index/express/quick-check.vue:116", "查询:", formData.value.packageCode);
  12611. };
  12612. const handleSubmitBatch = () => {
  12613. formatAppLog("log", "at pages/index/express/quick-check.vue:121", "提交批次:", formData.value.batchNum);
  12614. if (!formData.value.batchNum) {
  12615. uni.$u.toast("请选择批次");
  12616. return;
  12617. }
  12618. if (!formData.value.packageCode) {
  12619. uni.$u.toast("请扫描/输入物流单号");
  12620. return;
  12621. }
  12622. uni.$u.http.post("/app/ordersign/deliverySign", formData.value).then((res2) => {
  12623. formatAppLog("log", "at pages/index/express/quick-check.vue:131", res2);
  12624. if (res2.code == 200) {
  12625. let text = code + "快递验收成功";
  12626. uni.$u.ttsModule.speak(text);
  12627. } else {
  12628. let text = code + "订单不存在";
  12629. uni.$u.ttsModule.speak(text);
  12630. }
  12631. });
  12632. };
  12633. const handleScan = () => {
  12634. uni.scanCode({
  12635. success: (res2) => {
  12636. formData.value.packageCode = res2.result;
  12637. handleSubmitBatch();
  12638. }
  12639. });
  12640. };
  12641. const createNewBatch = () => {
  12642. selectedBatchId.value = "new";
  12643. formData.value.batchNum = "新建批次";
  12644. count.value = 0;
  12645. };
  12646. onLoad(() => {
  12647. uni.$u.useGlobalEvent((e) => {
  12648. formData.value.packageCode = e.barcode;
  12649. handleSubmitBatch();
  12650. });
  12651. });
  12652. const __returned__ = { selectedBatchId, showBatchSelector, count, formData, batchList, getBatchList, openBatchSelector, selectBatch, handleSearch, handleSubmitBatch, handleScan, createNewBatch, ref: vue.ref, get onLoad() {
  12653. return onLoad;
  12654. } };
  12655. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12656. return __returned__;
  12657. }
  12658. };
  12659. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  12660. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12661. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12662. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  12663. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  12664. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  12665. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  12666. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  12667. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12668. vue.createCommentVNode(" 批次选择区域 "),
  12669. vue.createElementVNode("view", { class: "select-section" }, [
  12670. vue.createElementVNode("view", { class: "batch-select" }, [
  12671. vue.createElementVNode("text", { class: "required" }, "*"),
  12672. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次:"),
  12673. vue.createElementVNode("view", { class: "batch-input" }, [
  12674. vue.createElementVNode("view", {
  12675. class: "batch-input-text",
  12676. onClick: $setup.openBatchSelector
  12677. }),
  12678. vue.createVNode(_component_u_input, {
  12679. modelValue: $setup.formData.batchNum,
  12680. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.batchNum = $event),
  12681. placeholder: "请选择/新建批次",
  12682. readonly: "",
  12683. border: "surround",
  12684. "placeholder-style": "font-size: 32rpx",
  12685. "custom-style": "font-size: 32rpx;height: 88rpx;"
  12686. }, {
  12687. suffix: vue.withCtx(() => [
  12688. vue.createVNode(_component_u_icon, {
  12689. name: "arrow-down",
  12690. size: "18"
  12691. })
  12692. ]),
  12693. _: 1
  12694. /* STABLE */
  12695. }, 8, ["modelValue"])
  12696. ])
  12697. ])
  12698. ]),
  12699. vue.createCommentVNode(" 数量显示 "),
  12700. vue.createElementVNode("view", { class: "count-badge" }, [
  12701. vue.createTextVNode(" 数量 "),
  12702. vue.createElementVNode(
  12703. "text",
  12704. { style: { "font-size": "32rpx" } },
  12705. vue.toDisplayString($setup.count),
  12706. 1
  12707. /* TEXT */
  12708. )
  12709. ]),
  12710. vue.createCommentVNode(" 底部按钮 "),
  12711. vue.createElementVNode("view", { class: "footer" }, [
  12712. vue.createCommentVNode(" 查询区域 "),
  12713. vue.createElementVNode("view", { class: "query-section" }, [
  12714. vue.createVNode(_component_u_radio_group, {
  12715. modelValue: $setup.formData.searchType,
  12716. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.searchType = $event),
  12717. class: "query-radio"
  12718. }, {
  12719. default: vue.withCtx(() => [
  12720. vue.createVNode(_component_u_radio, {
  12721. label: "查订单",
  12722. name: "1",
  12723. labelSize: "16px",
  12724. iconSize: "16px"
  12725. }),
  12726. vue.createVNode(_component_u_radio, {
  12727. label: "查物流",
  12728. "custom-style": "margin-left:20px",
  12729. name: "2",
  12730. labelSize: "16px",
  12731. iconSize: "16px"
  12732. })
  12733. ]),
  12734. _: 1
  12735. /* STABLE */
  12736. }, 8, ["modelValue"]),
  12737. vue.createElementVNode("view", { class: "search-box" }, [
  12738. vue.createVNode(_component_u_input, {
  12739. "custom-style": "font-size: 32rpx;",
  12740. "placeholder-style": "font-size: 32rpx;",
  12741. modelValue: $setup.formData.packageCode,
  12742. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.packageCode = $event),
  12743. adjustPosition: true,
  12744. placeholder: "扫描/输入物流单号",
  12745. border: "surround",
  12746. clearable: ""
  12747. }, null, 8, ["modelValue"]),
  12748. vue.createVNode(_component_u_button, {
  12749. color: "#c8c8c8",
  12750. text: "查询",
  12751. onClick: $setup.handleSearch
  12752. })
  12753. ])
  12754. ]),
  12755. vue.createVNode(_component_u_divider),
  12756. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  12757. vue.createVNode(_component_u_button, {
  12758. size: "large",
  12759. type: "warning",
  12760. text: "验收扫码",
  12761. onClick: $setup.handleScan
  12762. }),
  12763. vue.createVNode(_component_u_button, {
  12764. size: "large",
  12765. type: "primary",
  12766. text: "提交批次",
  12767. onClick: $setup.handleSubmitBatch
  12768. })
  12769. ])
  12770. ]),
  12771. vue.createCommentVNode(" 批次选择弹窗 "),
  12772. vue.createVNode(_component_u_popup, {
  12773. show: $setup.showBatchSelector,
  12774. mode: "bottom",
  12775. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
  12776. }, {
  12777. default: vue.withCtx(() => [
  12778. vue.createElementVNode("view", {
  12779. class: "batch-popup",
  12780. style: { "min-height": "300px" }
  12781. }, [
  12782. vue.createElementVNode("view", { class: "popup-header" }, [
  12783. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次")
  12784. ]),
  12785. vue.createElementVNode("scroll-view", {
  12786. "scroll-y": "",
  12787. class: "batch-list"
  12788. }, [
  12789. vue.createElementVNode(
  12790. "view",
  12791. {
  12792. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === "new" }]),
  12793. onClick: $setup.createNewBatch
  12794. },
  12795. [
  12796. vue.createElementVNode("text", null, "新建批次")
  12797. ],
  12798. 2
  12799. /* CLASS */
  12800. ),
  12801. (vue.openBlock(true), vue.createElementBlock(
  12802. vue.Fragment,
  12803. null,
  12804. vue.renderList($setup.batchList, (batch) => {
  12805. return vue.openBlock(), vue.createElementBlock("view", {
  12806. key: batch.id,
  12807. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
  12808. onClick: ($event) => $setup.selectBatch(batch)
  12809. }, [
  12810. vue.createElementVNode(
  12811. "text",
  12812. null,
  12813. vue.toDisplayString(batch.batchNum),
  12814. 1
  12815. /* TEXT */
  12816. ),
  12817. vue.createElementVNode(
  12818. "text",
  12819. null,
  12820. vue.toDisplayString(batch.num),
  12821. 1
  12822. /* TEXT */
  12823. )
  12824. ], 10, ["onClick"]);
  12825. }),
  12826. 128
  12827. /* KEYED_FRAGMENT */
  12828. ))
  12829. ])
  12830. ])
  12831. ]),
  12832. _: 1
  12833. /* STABLE */
  12834. }, 8, ["show"])
  12835. ]);
  12836. }
  12837. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-61cc11f4"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-check.vue"]]);
  12838. const keymap = {
  12839. "7": "0",
  12840. "8": "1",
  12841. "9": "2",
  12842. "10": "3",
  12843. "11": "4",
  12844. "12": "5",
  12845. "13": "6",
  12846. "14": "7",
  12847. "15": "8",
  12848. "16": "9",
  12849. "29": "A",
  12850. "30": "B",
  12851. "31": "C",
  12852. "32": "D",
  12853. "33": "E",
  12854. "34": "F",
  12855. "35": "G",
  12856. "36": "H",
  12857. "37": "I",
  12858. "38": "J",
  12859. "39": "K",
  12860. "40": "L",
  12861. "41": "M",
  12862. "42": "N",
  12863. "43": "O",
  12864. "44": "P",
  12865. "45": "Q",
  12866. "46": "R",
  12867. "47": "S",
  12868. "48": "T",
  12869. "49": "U",
  12870. "50": "V",
  12871. "51": "W",
  12872. "52": "X",
  12873. "53": "Y",
  12874. "54": "Z",
  12875. "55": ",",
  12876. "56": ".",
  12877. "59": "",
  12878. "69": "-",
  12879. "70": "=",
  12880. "81": "+"
  12881. };
  12882. const _sfc_main$1r = {
  12883. __name: "quick-unpack",
  12884. setup(__props, { expose: __expose }) {
  12885. __expose();
  12886. function goScan() {
  12887. uni.navigateTo({
  12888. url: "/pages/index/express/scan"
  12889. });
  12890. }
  12891. const unpackCode = vue.ref("");
  12892. function confirmTrackingNumber(code2) {
  12893. uni.$u.http.post("/app/ordersign/unpackingSign", {
  12894. packageCode: code2
  12895. }).then((res2) => {
  12896. if (res2.code == 200) {
  12897. let text = code2 + "拆包成功";
  12898. uni.$u.ttsModule.speak(text);
  12899. } else {
  12900. let text = code2 + res2.msg;
  12901. uni.$u.ttsModule.speak(text);
  12902. }
  12903. });
  12904. }
  12905. function scanCode() {
  12906. uni.scanCode({
  12907. success: (res2) => {
  12908. unpackCode.value = res2.result;
  12909. confirmTrackingNumber(res2.result);
  12910. formatAppLog("log", "at pages/index/express/quick-unpack.vue:66", "扫码结果:", res2.result);
  12911. },
  12912. fail: (err) => {
  12913. formatAppLog("error", "at pages/index/express/quick-unpack.vue:69", "扫码失败:", err);
  12914. }
  12915. });
  12916. }
  12917. const inputCache = vue.ref("");
  12918. const keypress = (e) => {
  12919. if (e.keyCode === 66 || e.key == "Enter") {
  12920. unpackCode.value = inputCache.value;
  12921. confirmTrackingNumber(unpackCode.value);
  12922. inputCache.value = "";
  12923. } else {
  12924. inputCache.value += keymap[e.keyCode] || "";
  12925. }
  12926. };
  12927. onLoad(() => {
  12928. uni.$u.useGlobalEvent((e) => {
  12929. unpackCode.value = e.barcode;
  12930. confirmTrackingNumber(e.barcode);
  12931. });
  12932. plus.key.addEventListener("keyup", keypress);
  12933. });
  12934. onUnload(() => {
  12935. plus.key.removeEventListener("keyup", keypress);
  12936. });
  12937. const __returned__ = { goScan, unpackCode, confirmTrackingNumber, scanCode, inputCache, keypress, ref: vue.ref, get onLoad() {
  12938. return onLoad;
  12939. }, get onUnload() {
  12940. return onUnload;
  12941. }, get keymap() {
  12942. return keymap;
  12943. } };
  12944. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12945. return __returned__;
  12946. }
  12947. };
  12948. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  12949. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12950. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  12951. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12952. vue.createCommentVNode(' <view class="container">\r\n <button @click="initBluetooth" :disabled="isInitializing">初始化蓝牙</button>\r\n <button @click="startDiscovery" :disabled="isDiscovering || !isBluetoothOpened">开始搜索设备</button>\r\n <button @click="connectDevice" :disabled="!selectedDevice || isConnecting">连接设备</button>\r\n <button @click="startDataMonitor" :disabled="!isConnected">开始监听数据</button>\r\n <view v-if="scanData">扫描结果: {{ scanData }}</view>\r\n </view> '),
  12953. vue.createCommentVNode(' <u-button type="primary" @click="goScan" text="扫码" /> '),
  12954. vue.createElementVNode("view", { class: "main-content" }, [
  12955. vue.createElementVNode("view", { class: "input-group" }, [
  12956. vue.createVNode(_component_u_input, {
  12957. "placeholder-style": "font-size:32rpx",
  12958. modelValue: $setup.unpackCode,
  12959. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.unpackCode = $event),
  12960. placeholder: "扫描/输入物流单号",
  12961. border: "surround"
  12962. }, null, 8, ["modelValue"]),
  12963. vue.createVNode(_component_u_button, {
  12964. type: "primary",
  12965. onClick: _cache[1] || (_cache[1] = ($event) => $setup.confirmTrackingNumber($setup.unpackCode)),
  12966. text: "确定"
  12967. })
  12968. ])
  12969. ]),
  12970. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  12971. vue.createVNode(_component_u_button, {
  12972. size: "large",
  12973. type: "success",
  12974. onClick: $setup.scanCode,
  12975. text: "扫码",
  12976. class: "scan-button"
  12977. })
  12978. ])
  12979. ]);
  12980. }
  12981. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-unpack.vue"]]);
  12982. const props$g = {
  12983. props: {
  12984. // tab的数据
  12985. list: {
  12986. type: Array,
  12987. default: props$E.subsection.list
  12988. },
  12989. // 当前活动的tab的index
  12990. current: {
  12991. type: [String, Number],
  12992. default: props$E.subsection.current
  12993. },
  12994. // 激活的颜色
  12995. activeColor: {
  12996. type: String,
  12997. default: props$E.subsection.activeColor
  12998. },
  12999. // 未激活的颜色
  13000. inactiveColor: {
  13001. type: String,
  13002. default: props$E.subsection.inactiveColor
  13003. },
  13004. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  13005. mode: {
  13006. type: String,
  13007. default: props$E.subsection.mode
  13008. },
  13009. // 字体大小
  13010. fontSize: {
  13011. type: [String, Number],
  13012. default: props$E.subsection.fontSize
  13013. },
  13014. // 激活tab的字体是否加粗
  13015. bold: {
  13016. type: Boolean,
  13017. default: props$E.subsection.bold
  13018. },
  13019. // mode = button时,组件背景颜色
  13020. bgColor: {
  13021. type: String,
  13022. default: props$E.subsection.bgColor
  13023. },
  13024. // 从list元素对象中读取的键名
  13025. keyName: {
  13026. type: String,
  13027. default: props$E.subsection.keyName
  13028. }
  13029. }
  13030. };
  13031. const _sfc_main$1q = {
  13032. name: "u-subsection",
  13033. mixins: [mpMixin, mixin, props$g],
  13034. data() {
  13035. return {
  13036. // 组件尺寸
  13037. itemRect: {
  13038. width: 0,
  13039. height: 0
  13040. }
  13041. };
  13042. },
  13043. watch: {
  13044. list(newValue, oldValue) {
  13045. this.init();
  13046. },
  13047. current: {
  13048. immediate: true,
  13049. handler(n) {
  13050. }
  13051. }
  13052. },
  13053. computed: {
  13054. wrapperStyle() {
  13055. const style = {};
  13056. if (this.mode === "button") {
  13057. style.backgroundColor = this.bgColor;
  13058. }
  13059. return style;
  13060. },
  13061. // 滑块的样式
  13062. barStyle() {
  13063. const style = {};
  13064. style.width = `${this.itemRect.width}px`;
  13065. style.height = `${this.itemRect.height}px`;
  13066. style.transform = `translateX(${this.current * this.itemRect.width}px)`;
  13067. if (this.mode === "subsection") {
  13068. style.backgroundColor = this.activeColor;
  13069. }
  13070. return style;
  13071. },
  13072. // 分段器item的样式
  13073. itemStyle(index2) {
  13074. return (index3) => {
  13075. const style = {};
  13076. if (this.mode === "subsection") {
  13077. style.borderColor = this.activeColor;
  13078. style.borderWidth = "1px";
  13079. style.borderStyle = "solid";
  13080. }
  13081. return style;
  13082. };
  13083. },
  13084. // 分段器文字颜色
  13085. textStyle(index2) {
  13086. return (index3) => {
  13087. const style = {};
  13088. style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
  13089. style.fontSize = uni.$u.addUnit(this.fontSize);
  13090. if (this.mode === "subsection") {
  13091. style.color = this.current === index3 ? "#fff" : this.inactiveColor;
  13092. } else {
  13093. style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
  13094. }
  13095. return style;
  13096. };
  13097. }
  13098. },
  13099. mounted() {
  13100. this.init();
  13101. },
  13102. methods: {
  13103. init() {
  13104. uni.$u.sleep().then(() => this.getRect());
  13105. },
  13106. // 判断展示文本
  13107. getText(item) {
  13108. return typeof item === "object" ? item[this.keyName] : item;
  13109. },
  13110. // 获取组件的尺寸
  13111. getRect() {
  13112. this.$uGetRect(".u-subsection__item--0").then((size) => {
  13113. this.itemRect = size;
  13114. });
  13115. },
  13116. clickHandler(index2) {
  13117. this.$emit("change", index2);
  13118. }
  13119. }
  13120. };
  13121. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  13122. return vue.openBlock(), vue.createElementBlock(
  13123. "view",
  13124. {
  13125. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  13126. ref: "u-subsection",
  13127. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
  13128. },
  13129. [
  13130. vue.createElementVNode(
  13131. "view",
  13132. {
  13133. class: vue.normalizeClass(["u-subsection__bar", [
  13134. _ctx.mode === "button" && "u-subsection--button__bar",
  13135. _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  13136. _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  13137. _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  13138. ]]),
  13139. ref: "u-subsection__bar",
  13140. style: vue.normalizeStyle([$options.barStyle])
  13141. },
  13142. null,
  13143. 6
  13144. /* CLASS, STYLE */
  13145. ),
  13146. (vue.openBlock(true), vue.createElementBlock(
  13147. vue.Fragment,
  13148. null,
  13149. vue.renderList(_ctx.list, (item, index2) => {
  13150. return vue.openBlock(), vue.createElementBlock("view", {
  13151. class: vue.normalizeClass(["u-subsection__item", [
  13152. `u-subsection__item--${index2}`,
  13153. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  13154. index2 === 0 && "u-subsection__item--first",
  13155. index2 === _ctx.list.length - 1 && "u-subsection__item--last"
  13156. ]]),
  13157. ref_for: true,
  13158. ref: `u-subsection__item--${index2}`,
  13159. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  13160. onClick: ($event) => $options.clickHandler(index2),
  13161. key: index2
  13162. }, [
  13163. vue.createElementVNode(
  13164. "text",
  13165. {
  13166. class: "u-subsection__item__text",
  13167. style: vue.normalizeStyle([$options.textStyle(index2)])
  13168. },
  13169. vue.toDisplayString($options.getText(item)),
  13170. 5
  13171. /* TEXT, STYLE */
  13172. )
  13173. ], 14, ["onClick"]);
  13174. }),
  13175. 128
  13176. /* KEYED_FRAGMENT */
  13177. ))
  13178. ],
  13179. 6
  13180. /* CLASS, STYLE */
  13181. );
  13182. }
  13183. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-b5ccb67e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  13184. const props$f = {
  13185. props: {
  13186. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  13187. offsetTop: {
  13188. type: [String, Number],
  13189. default: props$E.sticky.offsetTop
  13190. },
  13191. // 自定义导航栏的高度
  13192. customNavHeight: {
  13193. type: [String, Number],
  13194. default: props$E.sticky.customNavHeight
  13195. },
  13196. // 是否开启吸顶功能
  13197. disabled: {
  13198. type: Boolean,
  13199. default: props$E.sticky.disabled
  13200. },
  13201. // 吸顶区域的背景颜色
  13202. bgColor: {
  13203. type: String,
  13204. default: props$E.sticky.bgColor
  13205. },
  13206. // z-index值
  13207. zIndex: {
  13208. type: [String, Number],
  13209. default: props$E.sticky.zIndex
  13210. },
  13211. // 列表中的索引值
  13212. index: {
  13213. type: [String, Number],
  13214. default: props$E.sticky.index
  13215. }
  13216. }
  13217. };
  13218. const _sfc_main$1p = {
  13219. name: "u-sticky",
  13220. mixins: [mpMixin, mixin, props$f],
  13221. data() {
  13222. return {
  13223. cssSticky: false,
  13224. // 是否使用css的sticky实现
  13225. stickyTop: 0,
  13226. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  13227. elId: uni.$u.guid(),
  13228. left: 0,
  13229. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  13230. width: "auto",
  13231. height: "auto",
  13232. fixed: false
  13233. // js模式时,是否处于吸顶模式
  13234. };
  13235. },
  13236. computed: {
  13237. style() {
  13238. const style = {};
  13239. if (!this.disabled) {
  13240. if (this.cssSticky) {
  13241. style.position = "sticky";
  13242. style.zIndex = this.uZindex;
  13243. style.top = uni.$u.addUnit(this.stickyTop);
  13244. } else {
  13245. style.height = this.fixed ? this.height + "px" : "auto";
  13246. }
  13247. } else {
  13248. style.position = "static";
  13249. }
  13250. style.backgroundColor = this.bgColor;
  13251. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  13252. },
  13253. // 吸顶内容的样式
  13254. stickyContent() {
  13255. const style = {};
  13256. if (!this.cssSticky) {
  13257. style.position = this.fixed ? "fixed" : "static";
  13258. style.top = this.stickyTop + "px";
  13259. style.left = this.left + "px";
  13260. style.width = this.width == "auto" ? "auto" : this.width + "px";
  13261. style.zIndex = this.uZindex;
  13262. }
  13263. return style;
  13264. },
  13265. uZindex() {
  13266. return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
  13267. }
  13268. },
  13269. mounted() {
  13270. this.init();
  13271. },
  13272. methods: {
  13273. init() {
  13274. this.getStickyTop();
  13275. this.checkSupportCssSticky();
  13276. if (!this.cssSticky) {
  13277. !this.disabled && this.initObserveContent();
  13278. }
  13279. },
  13280. initObserveContent() {
  13281. this.$uGetRect("#" + this.elId).then((res2) => {
  13282. this.height = res2.height;
  13283. this.left = res2.left;
  13284. this.width = res2.width;
  13285. this.$nextTick(() => {
  13286. this.observeContent();
  13287. });
  13288. });
  13289. },
  13290. observeContent() {
  13291. this.disconnectObserver("contentObserver");
  13292. const contentObserver = uni.createIntersectionObserver({
  13293. // 检测的区间范围
  13294. thresholds: [0.95, 0.98, 1]
  13295. });
  13296. contentObserver.relativeToViewport({
  13297. top: -this.stickyTop
  13298. });
  13299. contentObserver.observe(`#${this.elId}`, (res2) => {
  13300. this.setFixed(res2.boundingClientRect.top);
  13301. });
  13302. this.contentObserver = contentObserver;
  13303. },
  13304. setFixed(top) {
  13305. const fixed = top <= this.stickyTop;
  13306. this.fixed = fixed;
  13307. },
  13308. disconnectObserver(observerName) {
  13309. const observer = this[observerName];
  13310. observer && observer.disconnect();
  13311. },
  13312. getStickyTop() {
  13313. this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
  13314. },
  13315. async checkSupportCssSticky() {
  13316. if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
  13317. this.cssSticky = true;
  13318. }
  13319. this.cssSticky = await this.checkComputedStyle();
  13320. if (uni.$u.os() === "ios") {
  13321. this.cssSticky = true;
  13322. }
  13323. },
  13324. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  13325. checkComputedStyle() {
  13326. return new Promise((resolve) => {
  13327. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  13328. computedStyle: ["position"]
  13329. }).exec((e) => {
  13330. resolve("sticky" === e[0].position);
  13331. });
  13332. });
  13333. },
  13334. // H5通过创建元素的形式嗅探是否支持css sticky
  13335. // 判断浏览器是否支持sticky属性
  13336. checkCssStickyForH5() {
  13337. }
  13338. },
  13339. beforeDestroy() {
  13340. this.disconnectObserver("contentObserver");
  13341. }
  13342. };
  13343. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  13344. return vue.openBlock(), vue.createElementBlock("view", {
  13345. class: "u-sticky",
  13346. id: $data.elId,
  13347. style: vue.normalizeStyle([$options.style])
  13348. }, [
  13349. vue.createElementVNode(
  13350. "view",
  13351. {
  13352. style: vue.normalizeStyle([$options.stickyContent]),
  13353. class: "u-sticky__content"
  13354. },
  13355. [
  13356. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  13357. ],
  13358. 4
  13359. /* STYLE */
  13360. )
  13361. ], 12, ["id"]);
  13362. }
  13363. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-8b303089"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  13364. const props$e = {
  13365. props: {
  13366. // 是否展示modal
  13367. show: {
  13368. type: Boolean,
  13369. default: props$E.modal.show
  13370. },
  13371. // 标题
  13372. title: {
  13373. type: [String],
  13374. default: props$E.modal.title
  13375. },
  13376. // 弹窗内容
  13377. content: {
  13378. type: String,
  13379. default: props$E.modal.content
  13380. },
  13381. // 确认文案
  13382. confirmText: {
  13383. type: String,
  13384. default: props$E.modal.confirmText
  13385. },
  13386. // 取消文案
  13387. cancelText: {
  13388. type: String,
  13389. default: props$E.modal.cancelText
  13390. },
  13391. // 是否显示确认按钮
  13392. showConfirmButton: {
  13393. type: Boolean,
  13394. default: props$E.modal.showConfirmButton
  13395. },
  13396. // 是否显示取消按钮
  13397. showCancelButton: {
  13398. type: Boolean,
  13399. default: props$E.modal.showCancelButton
  13400. },
  13401. // 确认按钮颜色
  13402. confirmColor: {
  13403. type: String,
  13404. default: props$E.modal.confirmColor
  13405. },
  13406. // 取消文字颜色
  13407. cancelColor: {
  13408. type: String,
  13409. default: props$E.modal.cancelColor
  13410. },
  13411. // 对调确认和取消的位置
  13412. buttonReverse: {
  13413. type: Boolean,
  13414. default: props$E.modal.buttonReverse
  13415. },
  13416. // 是否开启缩放效果
  13417. zoom: {
  13418. type: Boolean,
  13419. default: props$E.modal.zoom
  13420. },
  13421. // 是否异步关闭,只对确定按钮有效
  13422. asyncClose: {
  13423. type: Boolean,
  13424. default: props$E.modal.asyncClose
  13425. },
  13426. // 是否允许点击遮罩关闭modal
  13427. closeOnClickOverlay: {
  13428. type: Boolean,
  13429. default: props$E.modal.closeOnClickOverlay
  13430. },
  13431. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  13432. negativeTop: {
  13433. type: [String, Number],
  13434. default: props$E.modal.negativeTop
  13435. },
  13436. // modal宽度,不支持百分比,可以数值,px,rpx单位
  13437. width: {
  13438. type: [String, Number],
  13439. default: props$E.modal.width
  13440. },
  13441. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  13442. confirmButtonShape: {
  13443. type: String,
  13444. default: props$E.modal.confirmButtonShape
  13445. }
  13446. }
  13447. };
  13448. const _sfc_main$1o = {
  13449. name: "u-modal",
  13450. mixins: [mpMixin, mixin, props$e],
  13451. data() {
  13452. return {
  13453. loading: false
  13454. };
  13455. },
  13456. watch: {
  13457. show(n) {
  13458. if (n && this.loading)
  13459. this.loading = false;
  13460. }
  13461. },
  13462. methods: {
  13463. // 点击确定按钮
  13464. confirmHandler() {
  13465. if (this.asyncClose) {
  13466. this.loading = true;
  13467. }
  13468. this.$emit("confirm");
  13469. },
  13470. // 点击取消按钮
  13471. cancelHandler() {
  13472. this.$emit("cancel");
  13473. },
  13474. // 点击遮罩
  13475. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  13476. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  13477. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  13478. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  13479. clickHandler() {
  13480. if (this.closeOnClickOverlay) {
  13481. this.$emit("close");
  13482. }
  13483. }
  13484. }
  13485. };
  13486. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  13487. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  13488. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  13489. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  13490. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13491. mode: "center",
  13492. zoom: _ctx.zoom,
  13493. show: _ctx.show,
  13494. customStyle: {
  13495. borderRadius: "6px",
  13496. overflow: "hidden",
  13497. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  13498. },
  13499. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  13500. safeAreaInsetBottom: false,
  13501. duration: 400,
  13502. onClick: $options.clickHandler
  13503. }, {
  13504. default: vue.withCtx(() => [
  13505. vue.createElementVNode(
  13506. "view",
  13507. {
  13508. class: "u-modal",
  13509. style: vue.normalizeStyle({
  13510. width: _ctx.$u.addUnit(_ctx.width)
  13511. })
  13512. },
  13513. [
  13514. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13515. "text",
  13516. {
  13517. key: 0,
  13518. class: "u-modal__title"
  13519. },
  13520. vue.toDisplayString(_ctx.title),
  13521. 1
  13522. /* TEXT */
  13523. )) : vue.createCommentVNode("v-if", true),
  13524. vue.createElementVNode(
  13525. "view",
  13526. {
  13527. class: "u-modal__content",
  13528. style: vue.normalizeStyle({
  13529. paddingTop: `${_ctx.title ? 12 : 25}px`
  13530. })
  13531. },
  13532. [
  13533. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  13534. vue.createElementVNode(
  13535. "text",
  13536. { class: "u-modal__content__text" },
  13537. vue.toDisplayString(_ctx.content),
  13538. 1
  13539. /* TEXT */
  13540. )
  13541. ], true)
  13542. ],
  13543. 4
  13544. /* STYLE */
  13545. ),
  13546. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  13547. key: 1,
  13548. class: "u-modal__button-group--confirm-button"
  13549. }, [
  13550. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  13551. ])) : (vue.openBlock(), vue.createElementBlock(
  13552. vue.Fragment,
  13553. { key: 2 },
  13554. [
  13555. vue.createVNode(_component_u_line),
  13556. vue.createElementVNode(
  13557. "view",
  13558. {
  13559. class: "u-modal__button-group",
  13560. style: vue.normalizeStyle({
  13561. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  13562. })
  13563. },
  13564. [
  13565. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  13566. "view",
  13567. {
  13568. key: 0,
  13569. 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"]]),
  13570. "hover-stay-time": 150,
  13571. "hover-class": "u-modal__button-group__wrapper--hover",
  13572. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  13573. },
  13574. [
  13575. vue.createElementVNode(
  13576. "text",
  13577. {
  13578. class: "u-modal__button-group__wrapper__text",
  13579. style: vue.normalizeStyle({
  13580. color: _ctx.cancelColor
  13581. })
  13582. },
  13583. vue.toDisplayString(_ctx.cancelText),
  13584. 5
  13585. /* TEXT, STYLE */
  13586. )
  13587. ],
  13588. 2
  13589. /* CLASS */
  13590. )) : vue.createCommentVNode("v-if", true),
  13591. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  13592. key: 1,
  13593. direction: "column"
  13594. })) : vue.createCommentVNode("v-if", true),
  13595. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  13596. "view",
  13597. {
  13598. key: 2,
  13599. 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"]]),
  13600. "hover-stay-time": 150,
  13601. "hover-class": "u-modal__button-group__wrapper--hover",
  13602. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  13603. },
  13604. [
  13605. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  13606. "text",
  13607. {
  13608. key: 1,
  13609. class: "u-modal__button-group__wrapper__text",
  13610. style: vue.normalizeStyle({
  13611. color: _ctx.confirmColor
  13612. })
  13613. },
  13614. vue.toDisplayString(_ctx.confirmText),
  13615. 5
  13616. /* TEXT, STYLE */
  13617. ))
  13618. ],
  13619. 2
  13620. /* CLASS */
  13621. )) : vue.createCommentVNode("v-if", true)
  13622. ],
  13623. 4
  13624. /* STYLE */
  13625. )
  13626. ],
  13627. 64
  13628. /* STABLE_FRAGMENT */
  13629. ))
  13630. ],
  13631. 4
  13632. /* STYLE */
  13633. )
  13634. ]),
  13635. _: 3
  13636. /* FORWARDED */
  13637. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  13638. }
  13639. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-f667648f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  13640. const _sfc_main$1n = {
  13641. __name: "ApproveButton",
  13642. emits: ["approve"],
  13643. setup(__props, { expose: __expose, emit: __emit }) {
  13644. __expose();
  13645. const emit2 = __emit;
  13646. const showConfirmModal = vue.ref(false);
  13647. const handleApprove = () => {
  13648. showConfirmModal.value = true;
  13649. };
  13650. const confirmApprove = () => {
  13651. emit2("approve");
  13652. showConfirmModal.value = false;
  13653. };
  13654. const __returned__ = { emit: emit2, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
  13655. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13656. return __returned__;
  13657. }
  13658. };
  13659. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  13660. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  13661. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  13662. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  13663. vue.createVNode(
  13664. _component_u_button,
  13665. vue.mergeProps({
  13666. type: "success",
  13667. text: "同意",
  13668. size: "small",
  13669. onClick: $setup.handleApprove
  13670. }, _ctx.$attrs),
  13671. null,
  13672. 16
  13673. /* FULL_PROPS */
  13674. ),
  13675. vue.createCommentVNode(" 确认弹窗 "),
  13676. vue.createVNode(_component_u_modal, {
  13677. show: $setup.showConfirmModal,
  13678. title: "确认",
  13679. content: "确认收到货了吗?",
  13680. onConfirm: $setup.confirmApprove,
  13681. showCancelButton: "",
  13682. "content-style": { textAlign: "center" },
  13683. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
  13684. }, null, 8, ["show"])
  13685. ]);
  13686. }
  13687. const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ApproveButton.vue"]]);
  13688. const props$d = {
  13689. props: {
  13690. // 是否展示工具条
  13691. show: {
  13692. type: Boolean,
  13693. default: props$E.toolbar.show
  13694. },
  13695. // 取消按钮的文字
  13696. cancelText: {
  13697. type: String,
  13698. default: props$E.toolbar.cancelText
  13699. },
  13700. // 确认按钮的文字
  13701. confirmText: {
  13702. type: String,
  13703. default: props$E.toolbar.confirmText
  13704. },
  13705. // 取消按钮的颜色
  13706. cancelColor: {
  13707. type: String,
  13708. default: props$E.toolbar.cancelColor
  13709. },
  13710. // 确认按钮的颜色
  13711. confirmColor: {
  13712. type: String,
  13713. default: props$E.toolbar.confirmColor
  13714. },
  13715. // 标题文字
  13716. title: {
  13717. type: String,
  13718. default: props$E.toolbar.title
  13719. }
  13720. }
  13721. };
  13722. const _sfc_main$1m = {
  13723. name: "u-toolbar",
  13724. mixins: [mpMixin, mixin, props$d],
  13725. methods: {
  13726. // 点击取消按钮
  13727. cancel() {
  13728. this.$emit("cancel");
  13729. },
  13730. // 点击确定按钮
  13731. confirm() {
  13732. this.$emit("confirm");
  13733. }
  13734. }
  13735. };
  13736. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  13737. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  13738. "view",
  13739. {
  13740. key: 0,
  13741. class: "u-toolbar",
  13742. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  13743. },
  13744. [
  13745. vue.createElementVNode("view", {
  13746. class: "u-toolbar__cancel__wrapper",
  13747. "hover-class": "u-hover-class"
  13748. }, [
  13749. vue.createElementVNode(
  13750. "text",
  13751. {
  13752. class: "u-toolbar__wrapper__cancel",
  13753. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  13754. style: vue.normalizeStyle({
  13755. color: _ctx.cancelColor
  13756. })
  13757. },
  13758. vue.toDisplayString(_ctx.cancelText),
  13759. 5
  13760. /* TEXT, STYLE */
  13761. )
  13762. ]),
  13763. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13764. "text",
  13765. {
  13766. key: 0,
  13767. class: "u-toolbar__title u-line-1"
  13768. },
  13769. vue.toDisplayString(_ctx.title),
  13770. 1
  13771. /* TEXT */
  13772. )) : vue.createCommentVNode("v-if", true),
  13773. vue.createElementVNode("view", {
  13774. class: "u-toolbar__confirm__wrapper",
  13775. "hover-class": "u-hover-class"
  13776. }, [
  13777. vue.createElementVNode(
  13778. "text",
  13779. {
  13780. class: "u-toolbar__wrapper__confirm",
  13781. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  13782. style: vue.normalizeStyle({
  13783. color: _ctx.confirmColor
  13784. })
  13785. },
  13786. vue.toDisplayString(_ctx.confirmText),
  13787. 5
  13788. /* TEXT, STYLE */
  13789. )
  13790. ])
  13791. ],
  13792. 32
  13793. /* NEED_HYDRATION */
  13794. )) : vue.createCommentVNode("v-if", true);
  13795. }
  13796. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  13797. const props$c = {
  13798. props: {
  13799. // 是否展示picker弹窗
  13800. show: {
  13801. type: Boolean,
  13802. default: props$E.picker.show
  13803. },
  13804. // 是否展示顶部的操作栏
  13805. showToolbar: {
  13806. type: Boolean,
  13807. default: props$E.picker.showToolbar
  13808. },
  13809. // 顶部标题
  13810. title: {
  13811. type: String,
  13812. default: props$E.picker.title
  13813. },
  13814. // 对象数组,设置每一列的数据
  13815. columns: {
  13816. type: Array,
  13817. default: props$E.picker.columns
  13818. },
  13819. // 是否显示加载中状态
  13820. loading: {
  13821. type: Boolean,
  13822. default: props$E.picker.loading
  13823. },
  13824. // 各列中,单个选项的高度
  13825. itemHeight: {
  13826. type: [String, Number],
  13827. default: props$E.picker.itemHeight
  13828. },
  13829. // 取消按钮的文字
  13830. cancelText: {
  13831. type: String,
  13832. default: props$E.picker.cancelText
  13833. },
  13834. // 确认按钮的文字
  13835. confirmText: {
  13836. type: String,
  13837. default: props$E.picker.confirmText
  13838. },
  13839. // 取消按钮的颜色
  13840. cancelColor: {
  13841. type: String,
  13842. default: props$E.picker.cancelColor
  13843. },
  13844. // 确认按钮的颜色
  13845. confirmColor: {
  13846. type: String,
  13847. default: props$E.picker.confirmColor
  13848. },
  13849. // 每列中可见选项的数量
  13850. visibleItemCount: {
  13851. type: [String, Number],
  13852. default: props$E.picker.visibleItemCount
  13853. },
  13854. // 选项对象中,需要展示的属性键名
  13855. keyName: {
  13856. type: String,
  13857. default: props$E.picker.keyName
  13858. },
  13859. // 是否允许点击遮罩关闭选择器
  13860. closeOnClickOverlay: {
  13861. type: Boolean,
  13862. default: props$E.picker.closeOnClickOverlay
  13863. },
  13864. // 各列的默认索引
  13865. defaultIndex: {
  13866. type: Array,
  13867. default: props$E.picker.defaultIndex
  13868. },
  13869. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  13870. immediateChange: {
  13871. type: Boolean,
  13872. default: props$E.picker.immediateChange
  13873. }
  13874. }
  13875. };
  13876. const _sfc_main$1l = {
  13877. name: "u-picker",
  13878. mixins: [mpMixin, mixin, props$c],
  13879. data() {
  13880. return {
  13881. // 上一次选择的列索引
  13882. lastIndex: [],
  13883. // 索引值 ,对应picker-view的value
  13884. innerIndex: [],
  13885. // 各列的值
  13886. innerColumns: [],
  13887. // 上一次的变化列索引
  13888. columnIndex: 0
  13889. };
  13890. },
  13891. watch: {
  13892. // 监听默认索引的变化,重新设置对应的值
  13893. defaultIndex: {
  13894. immediate: true,
  13895. handler(n) {
  13896. this.setIndexs(n, true);
  13897. }
  13898. },
  13899. // 监听columns参数的变化
  13900. columns: {
  13901. immediate: true,
  13902. deep: true,
  13903. handler(n) {
  13904. this.setColumns(n);
  13905. }
  13906. }
  13907. },
  13908. emits: ["close", "cancel", "confirm", "change"],
  13909. methods: {
  13910. // 获取item需要显示的文字,判别为对象还是文本
  13911. getItemText(item) {
  13912. if (uni.$u.test.object(item)) {
  13913. return item[this.keyName];
  13914. } else {
  13915. return item;
  13916. }
  13917. },
  13918. // 关闭选择器
  13919. closeHandler() {
  13920. if (this.closeOnClickOverlay) {
  13921. this.$emit("close");
  13922. }
  13923. },
  13924. // 点击工具栏的取消按钮
  13925. cancel() {
  13926. this.$emit("cancel");
  13927. },
  13928. // 点击工具栏的确定按钮
  13929. confirm() {
  13930. this.$emit("confirm", {
  13931. indexs: this.innerIndex,
  13932. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  13933. values: this.innerColumns
  13934. });
  13935. },
  13936. // 选择器某一列的数据发生变化时触发
  13937. changeHandler(e) {
  13938. const {
  13939. value: value2
  13940. } = e.detail;
  13941. let index2 = 0, columnIndex = 0;
  13942. for (let i = 0; i < value2.length; i++) {
  13943. let item = value2[i];
  13944. if (item !== (this.lastIndex[i] || 0)) {
  13945. columnIndex = i;
  13946. index2 = item;
  13947. break;
  13948. }
  13949. }
  13950. this.columnIndex = columnIndex;
  13951. const values = this.innerColumns;
  13952. this.setLastIndex(value2);
  13953. this.setIndexs(value2);
  13954. this.$emit("change", {
  13955. // 微信小程序不能传递this,会因为循环引用而报错
  13956. picker: this,
  13957. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  13958. index: index2,
  13959. indexs: value2,
  13960. // values为当前变化列的数组内容
  13961. values,
  13962. columnIndex
  13963. });
  13964. },
  13965. // 设置index索引,此方法可被外部调用设置
  13966. setIndexs(index2, setLastIndex) {
  13967. this.innerIndex = uni.$u.deepClone(index2);
  13968. if (setLastIndex) {
  13969. this.setLastIndex(index2);
  13970. }
  13971. },
  13972. // 记录上一次的各列索引位置
  13973. setLastIndex(index2) {
  13974. this.lastIndex = uni.$u.deepClone(index2);
  13975. },
  13976. // 设置对应列选项的所有值
  13977. setColumnValues(columnIndex, values) {
  13978. this.innerColumns.splice(columnIndex, 1, values);
  13979. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  13980. for (let i = 0; i < this.innerColumns.length; i++) {
  13981. if (i > this.columnIndex) {
  13982. tmpIndex[i] = 0;
  13983. }
  13984. }
  13985. this.setIndexs(tmpIndex);
  13986. },
  13987. // 获取对应列的所有选项
  13988. getColumnValues(columnIndex) {
  13989. (async () => {
  13990. await uni.$u.sleep();
  13991. })();
  13992. return this.innerColumns[columnIndex];
  13993. },
  13994. // 设置整体各列的columns的值
  13995. setColumns(columns) {
  13996. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  13997. this.innerColumns = uni.$u.deepClone(columns);
  13998. if (this.innerIndex.length === 0) {
  13999. this.innerIndex = new Array(columns.length).fill(0);
  14000. }
  14001. },
  14002. // 获取各列选中值对应的索引
  14003. getIndexs() {
  14004. return this.innerIndex;
  14005. },
  14006. // 获取各列选中的值
  14007. getValues() {
  14008. (async () => {
  14009. await uni.$u.sleep();
  14010. })();
  14011. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  14012. }
  14013. }
  14014. };
  14015. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  14016. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$4);
  14017. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  14018. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  14019. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  14020. show: _ctx.show,
  14021. onClose: $options.closeHandler
  14022. }, {
  14023. default: vue.withCtx(() => [
  14024. vue.createElementVNode("view", { class: "u-picker" }, [
  14025. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  14026. key: 0,
  14027. cancelColor: _ctx.cancelColor,
  14028. confirmColor: _ctx.confirmColor,
  14029. cancelText: _ctx.cancelText,
  14030. confirmText: _ctx.confirmText,
  14031. title: _ctx.title,
  14032. onCancel: $options.cancel,
  14033. onConfirm: $options.confirm
  14034. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  14035. vue.createElementVNode("picker-view", {
  14036. class: "u-picker__view",
  14037. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  14038. value: $data.innerIndex,
  14039. immediateChange: _ctx.immediateChange,
  14040. style: vue.normalizeStyle({
  14041. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  14042. }),
  14043. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  14044. }, [
  14045. (vue.openBlock(true), vue.createElementBlock(
  14046. vue.Fragment,
  14047. null,
  14048. vue.renderList($data.innerColumns, (item, index2) => {
  14049. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  14050. key: index2,
  14051. class: "u-picker__view__column"
  14052. }, [
  14053. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  14054. vue.Fragment,
  14055. { key: 0 },
  14056. vue.renderList(item, (item1, index1) => {
  14057. return vue.openBlock(), vue.createElementBlock(
  14058. "text",
  14059. {
  14060. class: "u-picker__view__column__item u-line-1",
  14061. key: index1,
  14062. style: vue.normalizeStyle({
  14063. height: _ctx.$u.addUnit(_ctx.itemHeight),
  14064. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  14065. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  14066. })
  14067. },
  14068. vue.toDisplayString($options.getItemText(item1)),
  14069. 5
  14070. /* TEXT, STYLE */
  14071. );
  14072. }),
  14073. 128
  14074. /* KEYED_FRAGMENT */
  14075. )) : vue.createCommentVNode("v-if", true)
  14076. ]);
  14077. }),
  14078. 128
  14079. /* KEYED_FRAGMENT */
  14080. ))
  14081. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  14082. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  14083. key: 1,
  14084. class: "u-picker--loading"
  14085. }, [
  14086. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  14087. ])) : vue.createCommentVNode("v-if", true)
  14088. ])
  14089. ]),
  14090. _: 1
  14091. /* STABLE */
  14092. }, 8, ["show", "onClose"]);
  14093. }
  14094. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-91b05052"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  14095. const _sfc_main$1k = {
  14096. __name: "RejectButton",
  14097. emits: ["reject"],
  14098. setup(__props, { expose: __expose, emit: __emit }) {
  14099. __expose();
  14100. const emit2 = __emit;
  14101. const showRejectPicker = vue.ref(false);
  14102. const rejectReasons = vue.ref([]);
  14103. const getRejectReason = async () => {
  14104. const res2 = await uni.$u.http.get("/app/sysDict/getDict?key=route_exception_reason ");
  14105. if (res2.code == 200) {
  14106. rejectReasons.value = res2.data.map((item) => item.dictValue);
  14107. }
  14108. };
  14109. getRejectReason();
  14110. const handleReject = () => {
  14111. showRejectPicker.value = true;
  14112. };
  14113. const confirmReject = (e) => {
  14114. const reason = e.value[0];
  14115. emit2("reject", reason);
  14116. showRejectPicker.value = false;
  14117. };
  14118. const __returned__ = { emit: emit2, showRejectPicker, rejectReasons, getRejectReason, handleReject, confirmReject, ref: vue.ref };
  14119. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14120. return __returned__;
  14121. }
  14122. };
  14123. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  14124. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14125. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  14126. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  14127. vue.createVNode(
  14128. _component_u_button,
  14129. vue.mergeProps({
  14130. type: "warning",
  14131. text: "驳回",
  14132. size: "small",
  14133. onClick: $setup.handleReject
  14134. }, _ctx.$attrs),
  14135. null,
  14136. 16
  14137. /* FULL_PROPS */
  14138. ),
  14139. vue.createCommentVNode(" 驳回原因选择器 "),
  14140. vue.createVNode(_component_u_picker, {
  14141. show: $setup.showRejectPicker,
  14142. columns: [$setup.rejectReasons],
  14143. onConfirm: $setup.confirmReject,
  14144. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
  14145. }, null, 8, ["show", "columns"])
  14146. ]);
  14147. }
  14148. const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/RejectButton.vue"]]);
  14149. const _sfc_main$1j = {
  14150. __name: "ExceptionItem",
  14151. props: {
  14152. order: {
  14153. type: Object,
  14154. default: () => ({
  14155. orderNo: "",
  14156. expressNo: "",
  14157. estimatedPrice: "",
  14158. pusher: "",
  14159. pushTime: ""
  14160. })
  14161. }
  14162. },
  14163. emits: ["refresh"],
  14164. setup(__props, { expose: __expose, emit: __emit }) {
  14165. __expose();
  14166. const props2 = __props;
  14167. const emit2 = __emit;
  14168. const handleCheckLogistics = () => {
  14169. uni.navigateTo({
  14170. url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
  14171. });
  14172. };
  14173. function handleButtonClick(checkStatus, reason) {
  14174. uni.$u.http.post("/app/orderexception/update", {
  14175. id: props2.order.id,
  14176. checkStatus,
  14177. refusalReason: reason
  14178. }).then((res2) => {
  14179. if (res2.code == 200) {
  14180. if (checkStatus == 2) {
  14181. let text = props2.order.waybillCode + "签收成功";
  14182. uni.$u.ttsModule.speak(text);
  14183. }
  14184. uni.$u.toast("操作成功");
  14185. emit2("refresh");
  14186. } else {
  14187. uni.$u.toast(res2.msg);
  14188. }
  14189. });
  14190. }
  14191. const __returned__ = { props: props2, emit: emit2, handleCheckLogistics, handleButtonClick, ref: vue.ref, ApproveButton, RejectButton };
  14192. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14193. return __returned__;
  14194. }
  14195. };
  14196. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  14197. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14198. return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
  14199. vue.createCommentVNode(" 订单信息 "),
  14200. vue.createElementVNode("view", { class: "info-section flex-1" }, [
  14201. vue.createElementVNode("view", { class: "info-row" }, [
  14202. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  14203. vue.createElementVNode(
  14204. "text",
  14205. { class: "value" },
  14206. vue.toDisplayString($props.order.orderId),
  14207. 1
  14208. /* TEXT */
  14209. )
  14210. ]),
  14211. vue.createElementVNode("view", { class: "info-row" }, [
  14212. vue.createElementVNode("text", { class: "label" }, "快递单号:"),
  14213. vue.createElementVNode(
  14214. "text",
  14215. { class: "value" },
  14216. vue.toDisplayString($props.order.waybillCode),
  14217. 1
  14218. /* TEXT */
  14219. )
  14220. ]),
  14221. vue.createElementVNode("view", { class: "info-row" }, [
  14222. vue.createElementVNode("text", { class: "label" }, "预估单价:"),
  14223. vue.createElementVNode(
  14224. "text",
  14225. { class: "value" },
  14226. vue.toDisplayString($props.order.expectMoney) + "元",
  14227. 1
  14228. /* TEXT */
  14229. )
  14230. ]),
  14231. vue.createElementVNode("view", { class: "info-row" }, [
  14232. vue.createElementVNode("text", { class: "label" }, "推送人:"),
  14233. vue.createElementVNode(
  14234. "text",
  14235. { class: "value" },
  14236. vue.toDisplayString($props.order.createName),
  14237. 1
  14238. /* TEXT */
  14239. )
  14240. ]),
  14241. vue.createElementVNode("view", {
  14242. class: "info-row",
  14243. style: { "margin-bottom": "0" }
  14244. }, [
  14245. vue.createElementVNode("text", { class: "label" }, "推送时间:"),
  14246. vue.createElementVNode(
  14247. "text",
  14248. { class: "value" },
  14249. vue.toDisplayString($props.order.createTime),
  14250. 1
  14251. /* TEXT */
  14252. )
  14253. ])
  14254. ]),
  14255. vue.createCommentVNode(" 操作按钮 "),
  14256. vue.createElementVNode("view", { class: "action-section" }, [
  14257. vue.createVNode(_component_u_button, {
  14258. type: "primary",
  14259. text: "查看物流",
  14260. size: "small",
  14261. onClick: $setup.handleCheckLogistics
  14262. }),
  14263. $props.order.checkStatus == 1 ? (vue.openBlock(), vue.createBlock($setup["ApproveButton"], {
  14264. key: 0,
  14265. onApprove: _cache[0] || (_cache[0] = ($event) => $setup.handleButtonClick(2))
  14266. })) : vue.createCommentVNode("v-if", true),
  14267. $props.order.checkStatus == 1 ? (vue.openBlock(), vue.createBlock($setup["RejectButton"], {
  14268. key: 1,
  14269. onReject: _cache[1] || (_cache[1] = (reason) => $setup.handleButtonClick(3, reason))
  14270. })) : vue.createCommentVNode("v-if", true),
  14271. $props.order.checkStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  14272. key: 2,
  14273. style: { "color": "#19be6b" }
  14274. }, "[已签收]")) : vue.createCommentVNode("v-if", true),
  14275. $props.order.checkStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  14276. key: 3,
  14277. style: { "color": "#f00" }
  14278. }, "[已驳回]")) : vue.createCommentVNode("v-if", true)
  14279. ])
  14280. ]);
  14281. }
  14282. const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-e0527396"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ExceptionItem.vue"]]);
  14283. const _sfc_main$1i = {
  14284. __name: "route-exception",
  14285. setup(__props, { expose: __expose }) {
  14286. __expose();
  14287. const tabList = ["待处理订单", "历史异常签收"];
  14288. const curNow = vue.ref(0);
  14289. const exceptionList = vue.ref([]);
  14290. let urlList = ["/app/orderexception/pagelist", "/app/orderexception/getPageLoglist"];
  14291. const requestStr = vue.ref(urlList[0]);
  14292. function sectionChange(index2) {
  14293. curNow.value = index2;
  14294. requestStr.value = urlList[index2];
  14295. handleSearch();
  14296. }
  14297. const pageScrollRef = vue.ref(null);
  14298. const otherParams = vue.ref({ search: "" });
  14299. const updateList = (list) => {
  14300. exceptionList.value = list;
  14301. };
  14302. const handleSearch = () => {
  14303. var _a;
  14304. (_a = pageScrollRef.value) == null ? void 0 : _a.resetUpScroll();
  14305. };
  14306. const handleScan = () => {
  14307. uni.scanCode({
  14308. success: (res2) => {
  14309. otherParams.value.search = res2.result;
  14310. handleSearch();
  14311. }
  14312. });
  14313. };
  14314. onLoad(() => {
  14315. uni.$u.useGlobalEvent((e) => {
  14316. otherParams.value.search = e.barcode;
  14317. handleSearch();
  14318. });
  14319. });
  14320. const __returned__ = { tabList, curNow, exceptionList, get urlList() {
  14321. return urlList;
  14322. }, set urlList(v) {
  14323. urlList = v;
  14324. }, requestStr, sectionChange, pageScrollRef, otherParams, updateList, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  14325. return onLoad;
  14326. }, ExceptionItem, PageScroll: pageScroll };
  14327. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14328. return __returned__;
  14329. }
  14330. };
  14331. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  14332. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  14333. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  14334. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  14335. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14336. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14337. vue.createCommentVNode(" 列表区域 "),
  14338. vue.createVNode($setup["PageScroll"], {
  14339. ref: "pageScrollRef",
  14340. height: "100vh",
  14341. requestStr: $setup.requestStr,
  14342. onUpdateList: $setup.updateList,
  14343. otherParams: $setup.otherParams
  14344. }, {
  14345. default: vue.withCtx(() => [
  14346. vue.createVNode(_component_u_sticky, { "offset-top": 0 }, {
  14347. default: vue.withCtx(() => [
  14348. vue.createCommentVNode(" 顶部标签页 "),
  14349. vue.createVNode(_component_u_subsection, {
  14350. fontSize: "16",
  14351. list: $setup.tabList,
  14352. current: $setup.curNow,
  14353. onChange: $setup.sectionChange,
  14354. mode: "subsection",
  14355. class: "tabs-list"
  14356. }, null, 8, ["current"])
  14357. ]),
  14358. _: 1
  14359. /* STABLE */
  14360. }),
  14361. vue.createElementVNode("view", { class: "list-container" }, [
  14362. (vue.openBlock(true), vue.createElementBlock(
  14363. vue.Fragment,
  14364. null,
  14365. vue.renderList($setup.exceptionList, (item) => {
  14366. return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
  14367. key: item.orderNo,
  14368. order: item,
  14369. onRefresh: $setup.handleSearch
  14370. }, null, 8, ["order"]);
  14371. }),
  14372. 128
  14373. /* KEYED_FRAGMENT */
  14374. ))
  14375. ])
  14376. ]),
  14377. _: 1
  14378. /* STABLE */
  14379. }, 8, ["requestStr", "otherParams"]),
  14380. vue.createCommentVNode(" 底部搜索框 "),
  14381. vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
  14382. vue.createVNode(_component_u_search, {
  14383. modelValue: $setup.otherParams.search,
  14384. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  14385. placeholder: "请输入物流单号/订单编号",
  14386. "show-action": false,
  14387. inputStyle: { fontSize: "32rpx" },
  14388. onSearch: $setup.handleSearch,
  14389. height: "80rpx",
  14390. shape: "round"
  14391. }, null, 8, ["modelValue"]),
  14392. vue.createVNode(_component_u_icon, {
  14393. name: "scan",
  14394. size: "28",
  14395. color: "#19be6b",
  14396. onClick: $setup.handleScan
  14397. })
  14398. ])
  14399. ]);
  14400. }
  14401. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-388e5b84"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/route-exception.vue"]]);
  14402. const placeholderStyle$1 = "font-size:32rpx";
  14403. const _sfc_main$1h = {
  14404. __name: "warehouse-sign",
  14405. setup(__props, { expose: __expose }) {
  14406. __expose();
  14407. const customStyle = vue.reactive({
  14408. height: "90rpx"
  14409. });
  14410. const selectedWarehouse = vue.ref("");
  14411. const form = vue.ref({
  14412. "packageCode": "",
  14413. "godownId": ""
  14414. });
  14415. const showSelector = vue.ref(false);
  14416. function openWarehouseSelector() {
  14417. showSelector.value = true;
  14418. }
  14419. function handleWarehouseSelected(item) {
  14420. selectedWarehouse.value = item.godownName;
  14421. form.value.godownId = item.id;
  14422. }
  14423. function scanCode() {
  14424. uni.scanCode({
  14425. success: (res2) => {
  14426. form.value.packageCode = res2.result;
  14427. handleBarcode(res2.result);
  14428. },
  14429. fail: (err) => {
  14430. uni.$u.toast("扫码失败");
  14431. }
  14432. });
  14433. }
  14434. function handleBarcode(code2) {
  14435. if (!code2)
  14436. return uni.$u.toast("请输入物流单号");
  14437. uni.$u.http.post("/app/ordersign/toGodownSign", form.value).then((res2) => {
  14438. if (res2.code == 200) {
  14439. let text = code2 + "到仓签收成功";
  14440. uni.$u.ttsModule.speak(text);
  14441. } else {
  14442. let text = code2 + "订单不存在";
  14443. uni.$u.ttsModule.speak(text);
  14444. }
  14445. });
  14446. }
  14447. function getUserBindWarehouse() {
  14448. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  14449. var _a, _b;
  14450. if (res2.code == 200) {
  14451. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  14452. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  14453. }
  14454. });
  14455. }
  14456. onLoad(() => {
  14457. getUserBindWarehouse();
  14458. uni.$u.useGlobalEvent((e) => {
  14459. form.value.packageCode = e.barcode;
  14460. handleBarcode(e.barcode);
  14461. });
  14462. });
  14463. const __returned__ = { placeholderStyle: placeholderStyle$1, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  14464. return onLoad;
  14465. }, WarehouseSelector };
  14466. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14467. return __returned__;
  14468. }
  14469. };
  14470. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  14471. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14472. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14473. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14474. vue.createElementVNode("view", { class: "main-content" }, [
  14475. vue.createElementVNode("view", { class: "input-group" }, [
  14476. vue.createVNode(_component_u_input, {
  14477. customStyle: $setup.customStyle,
  14478. "placeholder-style": $setup.placeholderStyle,
  14479. modelValue: $setup.selectedWarehouse,
  14480. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  14481. placeholder: "请选择仓库",
  14482. readonly: "",
  14483. border: "surround"
  14484. }, null, 8, ["customStyle", "modelValue"]),
  14485. vue.createVNode(_component_u_button, {
  14486. customStyle: $setup.customStyle,
  14487. type: "info",
  14488. color: "#a4adb3",
  14489. onClick: $setup.openWarehouseSelector,
  14490. text: "选择"
  14491. }, null, 8, ["customStyle"])
  14492. ]),
  14493. vue.createElementVNode("view", { class: "input-group" }, [
  14494. vue.createVNode(_component_u_input, {
  14495. customStyle: $setup.customStyle,
  14496. "placeholder-style": $setup.placeholderStyle,
  14497. modelValue: $setup.form.packageCode,
  14498. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  14499. placeholder: "扫描/输入物流单号",
  14500. border: "surround"
  14501. }, null, 8, ["customStyle", "modelValue"]),
  14502. vue.createVNode(_component_u_button, {
  14503. customStyle: $setup.customStyle,
  14504. type: "info",
  14505. color: "#a4adb3",
  14506. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  14507. text: "确定"
  14508. }, null, 8, ["customStyle"])
  14509. ])
  14510. ]),
  14511. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14512. vue.createVNode(_component_u_button, {
  14513. size: "large",
  14514. type: "success",
  14515. onClick: $setup.scanCode,
  14516. text: "扫码",
  14517. class: "scan-button"
  14518. })
  14519. ]),
  14520. vue.createVNode($setup["WarehouseSelector"], {
  14521. show: $setup.showSelector,
  14522. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  14523. onWarehouseSelected: $setup.handleWarehouseSelected
  14524. }, null, 8, ["show"])
  14525. ]);
  14526. }
  14527. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-7473f06e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/warehouse-sign.vue"]]);
  14528. const placeholderStyle = "font-size:32rpx";
  14529. const _sfc_main$1g = {
  14530. __name: "weight-modify",
  14531. setup(__props, { expose: __expose }) {
  14532. __expose();
  14533. const customStyle = vue.reactive({
  14534. height: "90rpx"
  14535. });
  14536. const formRef = vue.ref(null);
  14537. const form = vue.ref({
  14538. "packageCode": "",
  14539. "batchNum": "",
  14540. "godownId": "",
  14541. "otherInfo": "",
  14542. "actualWeight": "",
  14543. "imgUrlList": []
  14544. });
  14545. const rules2 = {
  14546. packageCode: [{
  14547. required: true,
  14548. message: "请输入物流单号",
  14549. trigger: "blur"
  14550. }],
  14551. actualWeight: [{
  14552. required: true,
  14553. message: "请输入重量",
  14554. trigger: "blur"
  14555. }]
  14556. };
  14557. function scanCode() {
  14558. uni.scanCode({
  14559. success: (res2) => {
  14560. form.value.packageCode = res2.result;
  14561. },
  14562. fail: (err) => {
  14563. uni.$u.toast("扫码失败");
  14564. }
  14565. });
  14566. }
  14567. function submitForm() {
  14568. formRef.value.validate().then((valid) => {
  14569. if (valid) {
  14570. uni.$u.http.post("/app/ordersign/changeWeight", form.value).then((res2) => {
  14571. if (res2.code == 200) {
  14572. uni.$u.toast("重量修改成功");
  14573. let text = code + "已提交审核";
  14574. uni.$u.ttsModule.speak(text);
  14575. } else {
  14576. let text = code + "订单不存在";
  14577. uni.$u.ttsModule.speak(text);
  14578. }
  14579. });
  14580. }
  14581. });
  14582. }
  14583. onLoad(() => {
  14584. uni.$u.useGlobalEvent((e) => {
  14585. form.value.packageCode = e.barcode;
  14586. });
  14587. });
  14588. const __returned__ = { placeholderStyle, customStyle, formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  14589. return onLoad;
  14590. }, cyUpload };
  14591. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14592. return __returned__;
  14593. }
  14594. };
  14595. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  14596. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14597. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  14598. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
  14599. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14600. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14601. vue.createVNode(_component_u__form, {
  14602. ref: "formRef",
  14603. model: $setup.form,
  14604. rules: $setup.rules,
  14605. "label-width": "165px",
  14606. "label-position": "top",
  14607. labelStyle: { fontSize: "32rpx" },
  14608. errorType: "toast"
  14609. }, {
  14610. default: vue.withCtx(() => [
  14611. vue.createCommentVNode(" 物流单号输入 "),
  14612. vue.createVNode(_component_u_form_item, {
  14613. label: "",
  14614. prop: "packageCode"
  14615. }, {
  14616. default: vue.withCtx(() => [
  14617. vue.createVNode(_component_u_input, {
  14618. placeholderStyle: $setup.placeholderStyle,
  14619. customStyle: $setup.customStyle,
  14620. modelValue: $setup.form.packageCode,
  14621. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.packageCode = $event),
  14622. placeholder: "扫描/输入物流单号",
  14623. border: "surround",
  14624. name: "packageCode"
  14625. }, null, 8, ["customStyle", "modelValue"])
  14626. ]),
  14627. _: 1
  14628. /* STABLE */
  14629. }),
  14630. vue.createCommentVNode(" 重量输入 "),
  14631. vue.createVNode(_component_u_form_item, {
  14632. label: "重量(kg)",
  14633. prop: "actualWeight"
  14634. }, {
  14635. default: vue.withCtx(() => [
  14636. vue.createVNode(_component_u_input, {
  14637. placeholderStyle: $setup.placeholderStyle,
  14638. customStyle: $setup.customStyle,
  14639. modelValue: $setup.form.actualWeight,
  14640. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.actualWeight = $event),
  14641. placeholder: "请输入重量",
  14642. border: "surround",
  14643. name: "actualWeight",
  14644. type: "number"
  14645. }, null, 8, ["customStyle", "modelValue"])
  14646. ]),
  14647. _: 1
  14648. /* STABLE */
  14649. }),
  14650. vue.createCommentVNode(" 图片上传 "),
  14651. vue.createVNode(_component_u_form_item, {
  14652. label: "上传图片",
  14653. prop: "imgUrlList"
  14654. }, {
  14655. default: vue.withCtx(() => [
  14656. vue.createVNode($setup["cyUpload"], {
  14657. filename: $setup.form.imgUrlList,
  14658. "onUpdate:filename": _cache[2] || (_cache[2] = ($event) => $setup.form.imgUrlList = $event),
  14659. name: "imgUrlList",
  14660. limit: 10,
  14661. "max-size": 1024 * 1024
  14662. }, null, 8, ["filename"])
  14663. ]),
  14664. _: 1
  14665. /* STABLE */
  14666. })
  14667. ]),
  14668. _: 1
  14669. /* STABLE */
  14670. }, 8, ["model"]),
  14671. vue.createCommentVNode(" 底部按钮 "),
  14672. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14673. vue.createVNode(_component_u_button, {
  14674. size: "large",
  14675. type: "warning",
  14676. onClick: $setup.scanCode,
  14677. text: "扫码",
  14678. class: "scan-button"
  14679. }),
  14680. vue.createVNode(_component_u_button, {
  14681. size: "large",
  14682. type: "success",
  14683. onClick: $setup.submitForm,
  14684. text: "提交",
  14685. class: "submit-button"
  14686. })
  14687. ])
  14688. ]);
  14689. }
  14690. const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-e6126507"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/weight-modify.vue"]]);
  14691. const _sfc_main$1f = {
  14692. __name: "confirm-receipt",
  14693. setup(__props, { expose: __expose }) {
  14694. __expose();
  14695. const formData = vue.ref({
  14696. searchType: "2",
  14697. search: ""
  14698. });
  14699. const handleSubmit = () => {
  14700. if (!formData.value.search) {
  14701. uni.$u.toast("请扫描/输入物流单号");
  14702. return;
  14703. }
  14704. uni.$u.http.post("/app/orderinfo/confirmOrder", formData.value).then((res2) => {
  14705. if (res2.code == 200) {
  14706. let text = formData.value.search + "收货成功";
  14707. uni.$u.ttsModule.speak(text);
  14708. } else {
  14709. let text = formData.value.search + "订单不存在";
  14710. uni.$u.ttsModule.speak(text);
  14711. }
  14712. });
  14713. };
  14714. const handleScan = () => {
  14715. uni.scanCode({
  14716. success: (res2) => {
  14717. formData.value.search = res2.result;
  14718. handleSubmit();
  14719. }
  14720. });
  14721. };
  14722. onLoad(() => {
  14723. uni.$u.useGlobalEvent((e) => {
  14724. formData.value.search = e.barcode;
  14725. handleSubmit();
  14726. });
  14727. });
  14728. const __returned__ = { formData, handleSubmit, handleScan, ref: vue.ref, get onLoad() {
  14729. return onLoad;
  14730. } };
  14731. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14732. return __returned__;
  14733. }
  14734. };
  14735. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  14736. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  14737. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  14738. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14739. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14740. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  14741. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14742. vue.createCommentVNode(" 底部按钮 "),
  14743. vue.createElementVNode("view", { class: "footer" }, [
  14744. vue.createCommentVNode(" 查询区域 "),
  14745. vue.createElementVNode("view", { class: "query-section" }, [
  14746. vue.createVNode(_component_u_radio_group, {
  14747. modelValue: $setup.formData.searchType,
  14748. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.searchType = $event)
  14749. }, {
  14750. default: vue.withCtx(() => [
  14751. vue.createVNode(_component_u_radio, {
  14752. label: "查订单",
  14753. name: "1",
  14754. labelSize: "16px",
  14755. iconSize: "16px"
  14756. }),
  14757. vue.createVNode(_component_u_radio, {
  14758. label: "查物流",
  14759. "custom-style": "margin-left:20px",
  14760. name: "2",
  14761. labelSize: "16px",
  14762. iconSize: "16px"
  14763. })
  14764. ]),
  14765. _: 1
  14766. /* STABLE */
  14767. }, 8, ["modelValue"]),
  14768. vue.createElementVNode("view", { class: "search-box" }, [
  14769. vue.createVNode(_component_u_input, {
  14770. "custom-style": "font-size:32rpx",
  14771. "placeholder-style": "fong-size:32rpx",
  14772. modelValue: $setup.formData.search,
  14773. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.search = $event),
  14774. placeholder: $setup.formData.searchType == "1" ? "扫描/输入订单号" : "扫描/输入物流单号",
  14775. border: "surround",
  14776. clearable: ""
  14777. }, null, 8, ["modelValue", "placeholder"]),
  14778. vue.createVNode(_component_u_button, {
  14779. color: "#c8c8c8",
  14780. text: "查询",
  14781. onClick: $setup.handleSubmit
  14782. })
  14783. ])
  14784. ]),
  14785. vue.createVNode(_component_u_divider),
  14786. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  14787. vue.createVNode(_component_u_button, {
  14788. size: "large",
  14789. type: "success",
  14790. text: "确认收货扫码",
  14791. onClick: $setup.handleScan
  14792. })
  14793. ])
  14794. ])
  14795. ]);
  14796. }
  14797. const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-fec7d541"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/confirm-receipt.vue"]]);
  14798. const props$b = {
  14799. props: {
  14800. // 是否开启顶部安全区适配
  14801. safeAreaInsetTop: {
  14802. type: Boolean,
  14803. default: props$E.navbar.safeAreaInsetTop
  14804. },
  14805. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  14806. placeholder: {
  14807. type: Boolean,
  14808. default: props$E.navbar.placeholder
  14809. },
  14810. // 是否固定在顶部
  14811. fixed: {
  14812. type: Boolean,
  14813. default: props$E.navbar.fixed
  14814. },
  14815. // 是否显示下边框
  14816. border: {
  14817. type: Boolean,
  14818. default: props$E.navbar.border
  14819. },
  14820. // 左边的图标
  14821. leftIcon: {
  14822. type: String,
  14823. default: props$E.navbar.leftIcon
  14824. },
  14825. // 左边的提示文字
  14826. leftText: {
  14827. type: String,
  14828. default: props$E.navbar.leftText
  14829. },
  14830. // 左右的提示文字
  14831. rightText: {
  14832. type: String,
  14833. default: props$E.navbar.rightText
  14834. },
  14835. // 右边的图标
  14836. rightIcon: {
  14837. type: String,
  14838. default: props$E.navbar.rightIcon
  14839. },
  14840. // 标题
  14841. title: {
  14842. type: [String, Number],
  14843. default: props$E.navbar.title
  14844. },
  14845. // 背景颜色
  14846. bgColor: {
  14847. type: String,
  14848. default: props$E.navbar.bgColor
  14849. },
  14850. // 标题的宽度
  14851. titleWidth: {
  14852. type: [String, Number],
  14853. default: props$E.navbar.titleWidth
  14854. },
  14855. // 导航栏高度
  14856. height: {
  14857. type: [String, Number],
  14858. default: props$E.navbar.height
  14859. },
  14860. // 左侧返回图标的大小
  14861. leftIconSize: {
  14862. type: [String, Number],
  14863. default: props$E.navbar.leftIconSize
  14864. },
  14865. // 左侧返回图标的颜色
  14866. leftIconColor: {
  14867. type: String,
  14868. default: props$E.navbar.leftIconColor
  14869. },
  14870. // 点击左侧区域(返回图标),是否自动返回上一页
  14871. autoBack: {
  14872. type: Boolean,
  14873. default: props$E.navbar.autoBack
  14874. },
  14875. // 标题的样式,对象或字符串
  14876. titleStyle: {
  14877. type: [String, Object],
  14878. default: props$E.navbar.titleStyle
  14879. }
  14880. }
  14881. };
  14882. const _sfc_main$1e = {
  14883. name: "u-navbar",
  14884. mixins: [mpMixin, mixin, props$b],
  14885. data() {
  14886. return {};
  14887. },
  14888. methods: {
  14889. // 点击左侧区域
  14890. leftClick() {
  14891. this.$emit("leftClick");
  14892. if (this.autoBack) {
  14893. uni.navigateBack();
  14894. }
  14895. },
  14896. // 点击右侧区域
  14897. rightClick() {
  14898. this.$emit("rightClick");
  14899. }
  14900. }
  14901. };
  14902. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  14903. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  14904. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14905. return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
  14906. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  14907. "view",
  14908. {
  14909. key: 0,
  14910. class: "u-navbar__placeholder",
  14911. style: vue.normalizeStyle({
  14912. height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  14913. })
  14914. },
  14915. null,
  14916. 4
  14917. /* STYLE */
  14918. )) : vue.createCommentVNode("v-if", true),
  14919. vue.createElementVNode(
  14920. "view",
  14921. {
  14922. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  14923. },
  14924. [
  14925. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  14926. key: 0,
  14927. bgColor: _ctx.bgColor
  14928. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  14929. vue.createElementVNode(
  14930. "view",
  14931. {
  14932. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  14933. style: vue.normalizeStyle({
  14934. height: _ctx.$u.addUnit(_ctx.height),
  14935. backgroundColor: _ctx.bgColor
  14936. })
  14937. },
  14938. [
  14939. vue.createElementVNode("view", {
  14940. class: "u-navbar__content__left",
  14941. "hover-class": "u-navbar__content__left--hover",
  14942. "hover-start-time": "150",
  14943. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  14944. }, [
  14945. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  14946. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  14947. key: 0,
  14948. name: _ctx.leftIcon,
  14949. size: _ctx.leftIconSize,
  14950. color: _ctx.leftIconColor
  14951. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  14952. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  14953. "text",
  14954. {
  14955. key: 1,
  14956. style: vue.normalizeStyle({
  14957. color: _ctx.leftIconColor
  14958. }),
  14959. class: "u-navbar__content__left__text"
  14960. },
  14961. vue.toDisplayString(_ctx.leftText),
  14962. 5
  14963. /* TEXT, STYLE */
  14964. )) : vue.createCommentVNode("v-if", true)
  14965. ], true)
  14966. ]),
  14967. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  14968. vue.createElementVNode(
  14969. "text",
  14970. {
  14971. class: "u-line-1 u-navbar__content__title",
  14972. style: vue.normalizeStyle([{
  14973. width: _ctx.$u.addUnit(_ctx.titleWidth)
  14974. }, _ctx.$u.addStyle(_ctx.titleStyle)])
  14975. },
  14976. vue.toDisplayString(_ctx.title),
  14977. 5
  14978. /* TEXT, STYLE */
  14979. )
  14980. ], true),
  14981. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  14982. key: 0,
  14983. class: "u-navbar__content__right",
  14984. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  14985. }, [
  14986. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  14987. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  14988. key: 0,
  14989. name: _ctx.rightIcon,
  14990. size: "20"
  14991. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  14992. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  14993. "text",
  14994. {
  14995. key: 1,
  14996. class: "u-navbar__content__right__text"
  14997. },
  14998. vue.toDisplayString(_ctx.rightText),
  14999. 1
  15000. /* TEXT */
  15001. )) : vue.createCommentVNode("v-if", true)
  15002. ], true)
  15003. ])) : vue.createCommentVNode("v-if", true)
  15004. ],
  15005. 6
  15006. /* CLASS, STYLE */
  15007. )
  15008. ],
  15009. 2
  15010. /* CLASS */
  15011. )
  15012. ]);
  15013. }
  15014. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-f631659b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  15015. const props$a = {
  15016. props: {
  15017. // 步进器标识符,在change回调返回
  15018. name: {
  15019. type: [String, Number],
  15020. default: props$E.numberBox.name
  15021. },
  15022. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  15023. modelValue: {
  15024. type: [String, Number],
  15025. default: props$E.numberBox.value
  15026. },
  15027. // 最小值
  15028. min: {
  15029. type: [String, Number],
  15030. default: props$E.numberBox.min
  15031. },
  15032. // 最大值
  15033. max: {
  15034. type: [String, Number],
  15035. default: props$E.numberBox.max
  15036. },
  15037. // 加减的步长,可为小数
  15038. step: {
  15039. type: [String, Number],
  15040. default: props$E.numberBox.step
  15041. },
  15042. // 是否只允许输入整数
  15043. integer: {
  15044. type: Boolean,
  15045. default: props$E.numberBox.integer
  15046. },
  15047. // 是否禁用,包括输入框,加减按钮
  15048. disabled: {
  15049. type: Boolean,
  15050. default: props$E.numberBox.disabled
  15051. },
  15052. // 是否禁用输入框
  15053. disabledInput: {
  15054. type: Boolean,
  15055. default: props$E.numberBox.disabledInput
  15056. },
  15057. // 是否开启异步变更,开启后需要手动控制输入值
  15058. asyncChange: {
  15059. type: Boolean,
  15060. default: props$E.numberBox.asyncChange
  15061. },
  15062. // 输入框宽度,单位为px
  15063. inputWidth: {
  15064. type: [String, Number],
  15065. default: props$E.numberBox.inputWidth
  15066. },
  15067. // 是否显示减少按钮
  15068. showMinus: {
  15069. type: Boolean,
  15070. default: props$E.numberBox.showMinus
  15071. },
  15072. // 是否显示增加按钮
  15073. showPlus: {
  15074. type: Boolean,
  15075. default: props$E.numberBox.showPlus
  15076. },
  15077. // 显示的小数位数
  15078. decimalLength: {
  15079. type: [String, Number, null],
  15080. default: props$E.numberBox.decimalLength
  15081. },
  15082. // 是否开启长按加减手势
  15083. longPress: {
  15084. type: Boolean,
  15085. default: props$E.numberBox.longPress
  15086. },
  15087. // 输入框文字和加减按钮图标的颜色
  15088. color: {
  15089. type: String,
  15090. default: props$E.numberBox.color
  15091. },
  15092. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  15093. buttonSize: {
  15094. type: [String, Number],
  15095. default: props$E.numberBox.buttonSize
  15096. },
  15097. // 输入框和按钮的背景颜色
  15098. bgColor: {
  15099. type: String,
  15100. default: props$E.numberBox.bgColor
  15101. },
  15102. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  15103. cursorSpacing: {
  15104. type: [String, Number],
  15105. default: props$E.numberBox.cursorSpacing
  15106. },
  15107. // 是否禁用增加按钮
  15108. disablePlus: {
  15109. type: Boolean,
  15110. default: props$E.numberBox.disablePlus
  15111. },
  15112. // 是否禁用减少按钮
  15113. disableMinus: {
  15114. type: Boolean,
  15115. default: props$E.numberBox.disableMinus
  15116. },
  15117. // 加减按钮图标的样式
  15118. iconStyle: {
  15119. type: [Object, String],
  15120. default: props$E.numberBox.iconStyle
  15121. }
  15122. }
  15123. };
  15124. const _sfc_main$1d = {
  15125. name: "u-number-box",
  15126. mixins: [mpMixin, mixin, props$a],
  15127. data() {
  15128. return {
  15129. // 输入框实际操作的值
  15130. currentValue: "",
  15131. // 定时器
  15132. longPressTimer: null
  15133. };
  15134. },
  15135. watch: {
  15136. // 多个值之间,只要一个值发生变化,都要重新检查check()函数
  15137. watchChange(n) {
  15138. this.check();
  15139. },
  15140. // 监听v-mode的变化,重新初始化内部的值
  15141. modelValue(n) {
  15142. if (n !== this.currentValue) {
  15143. this.currentValue = this.format(this.modelValue);
  15144. }
  15145. }
  15146. },
  15147. computed: {
  15148. getCursorSpacing() {
  15149. return uni.$u.getPx(this.cursorSpacing);
  15150. },
  15151. // 按钮的样式
  15152. buttonStyle() {
  15153. return (type2) => {
  15154. const style = {
  15155. backgroundColor: this.bgColor,
  15156. height: uni.$u.addUnit(this.buttonSize),
  15157. color: this.color
  15158. };
  15159. if (this.isDisabled(type2)) {
  15160. style.backgroundColor = "#f7f8fa";
  15161. }
  15162. return style;
  15163. };
  15164. },
  15165. // 输入框的样式
  15166. inputStyle() {
  15167. this.disabled || this.disabledInput;
  15168. const style = {
  15169. color: this.color,
  15170. backgroundColor: this.bgColor,
  15171. height: uni.$u.addUnit(this.buttonSize),
  15172. width: uni.$u.addUnit(this.inputWidth)
  15173. };
  15174. return style;
  15175. },
  15176. // 用于监听多个值发生变化
  15177. watchChange() {
  15178. return [this.integer, this.decimalLength, this.min, this.max];
  15179. },
  15180. isDisabled() {
  15181. return (type2) => {
  15182. if (type2 === "plus") {
  15183. return this.disabled || this.disablePlus || this.currentValue >= this.max;
  15184. }
  15185. return this.disabled || this.disableMinus || this.currentValue <= this.min;
  15186. };
  15187. }
  15188. },
  15189. mounted() {
  15190. this.init();
  15191. },
  15192. emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
  15193. methods: {
  15194. init() {
  15195. this.currentValue = this.format(this.modelValue);
  15196. },
  15197. // 格式化整理数据,限制范围
  15198. format(value2) {
  15199. value2 = this.filter(value2);
  15200. value2 = value2 === "" ? 0 : +value2;
  15201. value2 = Math.max(Math.min(this.max, value2), this.min);
  15202. if (this.decimalLength !== null) {
  15203. value2 = value2.toFixed(this.decimalLength);
  15204. }
  15205. return value2;
  15206. },
  15207. // 过滤非法的字符
  15208. filter(value2) {
  15209. value2 = String(value2).replace(/[^0-9.-]/g, "");
  15210. if (this.integer && value2.indexOf(".") !== -1) {
  15211. value2 = value2.split(".")[0];
  15212. }
  15213. return value2;
  15214. },
  15215. check() {
  15216. const val = this.format(this.currentValue);
  15217. if (val !== this.currentValue) {
  15218. this.currentValue = val;
  15219. }
  15220. },
  15221. // 判断是否出于禁止操作状态
  15222. // isDisabled(type) {
  15223. // if (type === 'plus') {
  15224. // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
  15225. // return (
  15226. // this.disabled ||
  15227. // this.disablePlus ||
  15228. // this.currentValue >= this.max
  15229. // )
  15230. // }
  15231. // // 点击减少按钮同理
  15232. // return (
  15233. // this.disabled ||
  15234. // this.disableMinus ||
  15235. // this.currentValue <= this.min
  15236. // )
  15237. // },
  15238. // 输入框活动焦点
  15239. onFocus(event) {
  15240. this.$emit("focus", {
  15241. ...event.detail,
  15242. name: this.name
  15243. });
  15244. },
  15245. // 输入框失去焦点
  15246. onBlur(event) {
  15247. this.format(event.detail.value);
  15248. this.$emit(
  15249. "blur",
  15250. {
  15251. ...event.detail,
  15252. name: this.name
  15253. }
  15254. );
  15255. },
  15256. // 输入框值发生变化
  15257. onInput(e) {
  15258. const {
  15259. value: value2 = ""
  15260. } = e.detail || {};
  15261. if (value2 === "")
  15262. return;
  15263. let formatted = this.filter(value2);
  15264. if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
  15265. const pair = formatted.split(".");
  15266. formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
  15267. }
  15268. formatted = this.format(formatted);
  15269. this.emitChange(formatted);
  15270. },
  15271. // 发出change事件
  15272. emitChange(value2) {
  15273. if (!this.asyncChange) {
  15274. this.$nextTick(() => {
  15275. this.$emit("update:modelValue", value2);
  15276. this.currentValue = value2;
  15277. this.$forceUpdate();
  15278. });
  15279. }
  15280. this.$emit("change", {
  15281. value: value2,
  15282. name: this.name
  15283. });
  15284. },
  15285. onChange() {
  15286. const {
  15287. type: type2
  15288. } = this;
  15289. if (this.isDisabled(type2)) {
  15290. return this.$emit("overlimit", type2);
  15291. }
  15292. const diff = type2 === "minus" ? -this.step : +this.step;
  15293. const value2 = this.format(this.add(+this.currentValue, diff));
  15294. this.emitChange(value2);
  15295. this.$emit(type2);
  15296. },
  15297. // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
  15298. add(num1, num2) {
  15299. const cardinal = Math.pow(10, 10);
  15300. return Math.round((num1 + num2) * cardinal) / cardinal;
  15301. },
  15302. // 点击加减按钮
  15303. clickHandler(type2) {
  15304. this.type = type2;
  15305. this.onChange();
  15306. },
  15307. longPressStep() {
  15308. this.clearTimeout();
  15309. this.longPressTimer = setTimeout(() => {
  15310. this.onChange();
  15311. this.longPressStep();
  15312. }, 250);
  15313. },
  15314. onTouchStart(type2) {
  15315. if (!this.longPress)
  15316. return;
  15317. this.clearTimeout();
  15318. this.type = type2;
  15319. this.longPressTimer = setTimeout(() => {
  15320. this.onChange();
  15321. this.longPressStep();
  15322. }, 600);
  15323. },
  15324. // 触摸结束,清除定时器,停止长按加减
  15325. onTouchEnd() {
  15326. if (!this.longPress)
  15327. return;
  15328. this.clearTimeout();
  15329. },
  15330. // 清除定时器
  15331. clearTimeout() {
  15332. clearTimeout(this.longPressTimer);
  15333. this.longPressTimer = null;
  15334. }
  15335. }
  15336. };
  15337. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  15338. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15339. return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
  15340. _ctx.showMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
  15341. "view",
  15342. {
  15343. key: 0,
  15344. class: "u-number-box__slot",
  15345. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15346. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
  15347. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15348. },
  15349. [
  15350. vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
  15351. ],
  15352. 32
  15353. /* NEED_HYDRATION */
  15354. )) : _ctx.showMinus ? (vue.openBlock(), vue.createElementBlock(
  15355. "view",
  15356. {
  15357. key: 1,
  15358. class: vue.normalizeClass(["u-number-box__minus", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
  15359. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15360. onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
  15361. onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15362. "hover-class": "u-number-box__minus--hover",
  15363. "hover-stay-time": "150",
  15364. style: vue.normalizeStyle([$options.buttonStyle("minus")])
  15365. },
  15366. [
  15367. vue.createVNode(_component_u_icon, {
  15368. name: "minus",
  15369. color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
  15370. size: "15",
  15371. bold: "",
  15372. customStyle: _ctx.iconStyle
  15373. }, null, 8, ["color", "customStyle"])
  15374. ],
  15375. 38
  15376. /* CLASS, STYLE, NEED_HYDRATION */
  15377. )) : vue.createCommentVNode("v-if", true),
  15378. vue.renderSlot(_ctx.$slots, "input", {}, () => [
  15379. vue.withDirectives(vue.createElementVNode("input", {
  15380. disabled: _ctx.disabledInput || _ctx.disabled,
  15381. "cursor-spacing": $options.getCursorSpacing,
  15382. class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
  15383. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
  15384. onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
  15385. onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
  15386. onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
  15387. type: "number",
  15388. style: vue.normalizeStyle([$options.inputStyle])
  15389. }, null, 46, ["disabled", "cursor-spacing"]), [
  15390. [vue.vModelText, $data.currentValue]
  15391. ])
  15392. ], true),
  15393. _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
  15394. "view",
  15395. {
  15396. key: 2,
  15397. class: "u-number-box__slot",
  15398. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15399. onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
  15400. onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15401. },
  15402. [
  15403. vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
  15404. ],
  15405. 32
  15406. /* NEED_HYDRATION */
  15407. )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
  15408. "view",
  15409. {
  15410. key: 3,
  15411. class: vue.normalizeClass(["u-number-box__plus", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
  15412. onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15413. onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
  15414. onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15415. "hover-class": "u-number-box__plus--hover",
  15416. "hover-stay-time": "150",
  15417. style: vue.normalizeStyle([$options.buttonStyle("plus")])
  15418. },
  15419. [
  15420. vue.createVNode(_component_u_icon, {
  15421. name: "plus",
  15422. color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
  15423. size: "15",
  15424. bold: "",
  15425. customStyle: _ctx.iconStyle
  15426. }, null, 8, ["color", "customStyle"])
  15427. ],
  15428. 38
  15429. /* CLASS, STYLE, NEED_HYDRATION */
  15430. )) : vue.createCommentVNode("v-if", true)
  15431. ]);
  15432. }
  15433. const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-eb6f6237"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]);
  15434. const _sfc_main$1c = {
  15435. __name: "scan-order",
  15436. setup(__props, { expose: __expose }) {
  15437. __expose();
  15438. const isbnList = vue.ref([]);
  15439. const showModal = vue.ref(false);
  15440. const newIsbn = vue.ref("");
  15441. const removeItem = (index2) => {
  15442. isbnList.value.splice(index2, 1);
  15443. };
  15444. const goBack = () => {
  15445. uni.navigateBack();
  15446. };
  15447. function clearAll() {
  15448. isbnList.value.length = 0;
  15449. }
  15450. const addOrUpdateIsbn = (isbn) => {
  15451. const existingItem = isbnList.value.find((item) => item.isbn === isbn);
  15452. if (existingItem) {
  15453. existingItem.quantity += 1;
  15454. } else {
  15455. isbnList.value.push({
  15456. isbn,
  15457. quantity: 1
  15458. });
  15459. }
  15460. };
  15461. function handleIsbn(isbn) {
  15462. if (isValidISBN(isbn)) {
  15463. addOrUpdateIsbn(isbn);
  15464. } else {
  15465. uni.$u.ttsModule.speak("不正确的ISBN码");
  15466. }
  15467. }
  15468. const handleScan = () => {
  15469. uni.scanCode({
  15470. success: (res2) => {
  15471. handleIsbn(res2.result);
  15472. }
  15473. });
  15474. };
  15475. const isValidISBN = (isbn) => {
  15476. return /^97[89]\d{10}$/.test(isbn);
  15477. };
  15478. const handleQuery = () => {
  15479. if (isbnList.value.length === 0) {
  15480. uni.showToast({
  15481. title: "请先添加ISBN",
  15482. icon: "none"
  15483. });
  15484. return;
  15485. }
  15486. uni.setStorageSync("isbnList", isbnList.value);
  15487. uni.navigateTo({
  15488. url: "/pages/index/audit/isbn-order"
  15489. });
  15490. };
  15491. const addIsbn = () => {
  15492. if (isValidISBN(newIsbn.value)) {
  15493. addOrUpdateIsbn(newIsbn.value);
  15494. showModal.value = false;
  15495. newIsbn.value = "";
  15496. } else {
  15497. uni.$u.ttsModule.speak("不正确的ISBN码");
  15498. }
  15499. };
  15500. onLoad(() => {
  15501. uni.$u.useGlobalEvent((e) => {
  15502. addOrUpdateIsbn(e.barcode);
  15503. });
  15504. });
  15505. const __returned__ = { isbnList, showModal, newIsbn, removeItem, goBack, clearAll, addOrUpdateIsbn, handleIsbn, handleScan, isValidISBN, handleQuery, addIsbn, ref: vue.ref, get onLoad() {
  15506. return onLoad;
  15507. } };
  15508. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15509. return __returned__;
  15510. }
  15511. };
  15512. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  15513. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15514. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  15515. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  15516. const _component_u_number_box = resolveEasycom(vue.resolveDynamicComponent("u-number-box"), __easycom_3$3);
  15517. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  15518. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15519. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  15520. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  15521. vue.createVNode(_component_u_navbar, {
  15522. title: "扫书查单",
  15523. border: false,
  15524. fixed: "",
  15525. bgColor: "#22ac38",
  15526. leftIconColor: "#fff",
  15527. titleStyle: "font-size:36rpx;color:#fff"
  15528. }, {
  15529. left: vue.withCtx(() => [
  15530. vue.createVNode(_component_u_icon, {
  15531. name: "arrow-left",
  15532. color: "#fff",
  15533. size: "20",
  15534. onClick: $setup.goBack
  15535. })
  15536. ]),
  15537. right: vue.withCtx(() => [
  15538. vue.createElementVNode("text", {
  15539. style: { "color": "#fff", "font-size": "32rpx" },
  15540. type: "primary",
  15541. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true)
  15542. }, "新增")
  15543. ]),
  15544. _: 1
  15545. /* STABLE */
  15546. }),
  15547. vue.createCommentVNode(" 顶部操作栏 "),
  15548. vue.createVNode(_component_u_sticky, null, {
  15549. default: vue.withCtx(() => [
  15550. vue.createElementVNode("view", {
  15551. class: "header",
  15552. onClick: $setup.clearAll
  15553. }, "清除全部"),
  15554. vue.createCommentVNode(" 提示信息 "),
  15555. vue.createElementVNode("view", { class: "tips" }, [
  15556. vue.createElementVNode("text", null, "请勿录入审核为不良的书籍ISBN!"),
  15557. vue.createElementVNode("text", { class: "sub-tips" }, "不良书籍的ISBN可能是错误的!")
  15558. ])
  15559. ]),
  15560. _: 1
  15561. /* STABLE */
  15562. }),
  15563. vue.createCommentVNode(" ISBN列表 "),
  15564. vue.createElementVNode("scroll-view", {
  15565. "scroll-y": "",
  15566. class: "isbn-list"
  15567. }, [
  15568. (vue.openBlock(true), vue.createElementBlock(
  15569. vue.Fragment,
  15570. null,
  15571. vue.renderList($setup.isbnList, (item, index2) => {
  15572. return vue.openBlock(), vue.createElementBlock("view", {
  15573. key: index2,
  15574. class: "isbn-item"
  15575. }, [
  15576. vue.createElementVNode("view", { class: "item-left" }, [
  15577. vue.createVNode(_component_u_icon, {
  15578. name: "minus-circle-fill",
  15579. color: "#dd524d",
  15580. size: "24",
  15581. onClick: ($event) => $setup.removeItem(index2)
  15582. }, null, 8, ["onClick"]),
  15583. vue.createElementVNode(
  15584. "text",
  15585. { class: "index" },
  15586. vue.toDisplayString(index2 + 1) + "、",
  15587. 1
  15588. /* TEXT */
  15589. ),
  15590. vue.createElementVNode(
  15591. "text",
  15592. { class: "isbn" },
  15593. vue.toDisplayString(item.isbn),
  15594. 1
  15595. /* TEXT */
  15596. )
  15597. ]),
  15598. vue.createVNode(_component_u_number_box, {
  15599. modelValue: item.quantity,
  15600. "onUpdate:modelValue": ($event) => item.quantity = $event,
  15601. disableMinus: item.quantity <= 1
  15602. }, null, 8, ["modelValue", "onUpdate:modelValue", "disableMinus"])
  15603. ]);
  15604. }),
  15605. 128
  15606. /* KEYED_FRAGMENT */
  15607. ))
  15608. ]),
  15609. vue.createCommentVNode(" 底部按钮 "),
  15610. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  15611. vue.createVNode(_component_u_button, {
  15612. size: "large",
  15613. type: "warning",
  15614. text: "扫码加书",
  15615. onClick: $setup.handleScan
  15616. }),
  15617. vue.createVNode(_component_u_button, {
  15618. size: "large",
  15619. type: "primary",
  15620. text: "查询",
  15621. onClick: $setup.handleQuery
  15622. })
  15623. ]),
  15624. vue.createCommentVNode(" ISBN Input Modal "),
  15625. vue.createVNode(_component_u_popup, {
  15626. show: $setup.showModal,
  15627. mode: "center",
  15628. customStyle: "width: 84%;border-radius:10px"
  15629. }, {
  15630. default: vue.withCtx(() => [
  15631. vue.createElementVNode("view", { class: "modal-content" }, [
  15632. vue.createElementVNode("text", null, "输入ISBN码"),
  15633. vue.createVNode(_component_u_input, {
  15634. modelValue: $setup.newIsbn,
  15635. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.newIsbn = $event),
  15636. placeholder: "请输入ISBN码",
  15637. "custom-style": "margin:60rpx 0"
  15638. }, null, 8, ["modelValue"]),
  15639. vue.createElementVNode("view", { class: "modal-buttons" }, [
  15640. vue.createVNode(_component_u_button, {
  15641. text: "取消",
  15642. onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false)
  15643. }),
  15644. vue.createVNode(_component_u_button, {
  15645. type: "primary",
  15646. text: "确定",
  15647. onClick: $setup.addIsbn
  15648. })
  15649. ])
  15650. ])
  15651. ]),
  15652. _: 1
  15653. /* STABLE */
  15654. }, 8, ["show"])
  15655. ]);
  15656. }
  15657. const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-1af411ea"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/scan-order.vue"]]);
  15658. const _sfc_main$1b = {
  15659. __name: "orderItem",
  15660. props: {
  15661. item: {
  15662. type: Object,
  15663. default: () => {
  15664. }
  15665. }
  15666. },
  15667. setup(__props, { expose: __expose }) {
  15668. __expose();
  15669. const props2 = __props;
  15670. const statusEnum = {
  15671. "0": "创建",
  15672. "1": "用户删除",
  15673. "2": "下单(待初审)",
  15674. "3": "初审(待取书)",
  15675. "4": "初审未通过",
  15676. "5": "快递取书(待签收)",
  15677. "6": "快递签收(待收货)",
  15678. "7": "物流签收(路由异常)",
  15679. "8": "仓库收货(待审核)",
  15680. "9": "审核中(审核未提交)",
  15681. "10": "已审核(待付款)",
  15682. "11": "已完成"
  15683. };
  15684. const maskedNickName = vue.computed(() => {
  15685. if (!props2.item.userNick)
  15686. return "";
  15687. return props2.item.userNick.charAt(0) + "*".repeat(props2.item.userNick.length - 1);
  15688. });
  15689. let statusText = vue.computed(() => {
  15690. return props2.item.status ? statusEnum[props2.item.status] : "-";
  15691. });
  15692. const statusColor = vue.ref("#FF4D4F");
  15693. const copyToClipboard = (text) => {
  15694. uni.setClipboardData({
  15695. data: text,
  15696. success: () => {
  15697. uni.showToast({
  15698. title: "复制成功",
  15699. icon: "success"
  15700. });
  15701. }
  15702. });
  15703. };
  15704. const handleAudit = () => {
  15705. uni.navigateTo({
  15706. url: `/pages/index/detail/index?id=${props2.item.orderId}`
  15707. });
  15708. };
  15709. const handleView = () => {
  15710. uni.navigateTo({
  15711. url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
  15712. });
  15713. };
  15714. const __returned__ = { props: props2, statusEnum, maskedNickName, get statusText() {
  15715. return statusText;
  15716. }, set statusText(v) {
  15717. statusText = v;
  15718. }, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref, computed: vue.computed };
  15719. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15720. return __returned__;
  15721. }
  15722. };
  15723. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  15724. var _a, _b, _c;
  15725. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  15726. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  15727. vue.createCommentVNode(" 用户信息 "),
  15728. vue.createElementVNode("view", { class: "user-info" }, [
  15729. vue.createElementVNode("image", {
  15730. class: "avatar",
  15731. src: $props.item.imgPath,
  15732. mode: "aspectFill"
  15733. }, null, 8, ["src"]),
  15734. vue.createElementVNode("view", { class: "user-details" }, [
  15735. vue.createElementVNode(
  15736. "text",
  15737. { class: "username" },
  15738. vue.toDisplayString($props.item.plat == 1 ? "微信用户" : "支付宝用户") + " (" + vue.toDisplayString($setup.maskedNickName) + ")",
  15739. 1
  15740. /* TEXT */
  15741. ),
  15742. vue.createElementVNode(
  15743. "text",
  15744. { class: "date" },
  15745. "共卖出" + vue.toDisplayString($props.item.totalNum) + "本书",
  15746. 1
  15747. /* TEXT */
  15748. ),
  15749. vue.createElementVNode(
  15750. "text",
  15751. { class: "date" },
  15752. "来自" + vue.toDisplayString($props.item.sendSsq),
  15753. 1
  15754. /* TEXT */
  15755. )
  15756. ]),
  15757. vue.createElementVNode("view", { class: "user-details right-items" }, [
  15758. vue.createElementVNode(
  15759. "text",
  15760. { class: "date" },
  15761. vue.toDisplayString($props.item.schedulePickupStartTime),
  15762. 1
  15763. /* TEXT */
  15764. ),
  15765. vue.createElementVNode(
  15766. "text",
  15767. {
  15768. class: "status",
  15769. style: vue.normalizeStyle({ color: $setup.statusColor })
  15770. },
  15771. "[" + vue.toDisplayString($setup.statusText) + "]",
  15772. 5
  15773. /* TEXT, STYLE */
  15774. )
  15775. ])
  15776. ]),
  15777. vue.createCommentVNode(" 订单详情 "),
  15778. vue.createElementVNode("view", { class: "order-details" }, [
  15779. vue.createElementVNode("view", { class: "detail-row flex flex-col" }, [
  15780. vue.createElementVNode("view", { class: "flex-1" }, [
  15781. vue.createElementVNode("text", null, "订单ID:"),
  15782. vue.createElementVNode(
  15783. "text",
  15784. {
  15785. class: "link",
  15786. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.item.orderId))
  15787. },
  15788. vue.toDisplayString($props.item.orderId),
  15789. 1
  15790. /* TEXT */
  15791. )
  15792. ]),
  15793. vue.createElementVNode("view", {
  15794. class: "flex-1",
  15795. style: { "flex": "1.5" }
  15796. }, [
  15797. vue.createElementVNode("text", null, "运单号:"),
  15798. vue.createElementVNode(
  15799. "text",
  15800. {
  15801. class: "link",
  15802. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.item.waybillCode))
  15803. },
  15804. vue.toDisplayString($props.item.waybillCode),
  15805. 1
  15806. /* TEXT */
  15807. )
  15808. ])
  15809. ]),
  15810. vue.createElementVNode("view", { class: "detail-row" }, [
  15811. vue.createElementVNode(
  15812. "text",
  15813. { class: "flex-1" },
  15814. "预估金额:" + vue.toDisplayString($props.item.expectMoney || 0),
  15815. 1
  15816. /* TEXT */
  15817. ),
  15818. vue.createElementVNode(
  15819. "text",
  15820. { class: "flex-1" },
  15821. "审核金额:" + vue.toDisplayString($props.item.finalMoney || "待核算"),
  15822. 1
  15823. /* TEXT */
  15824. )
  15825. ]),
  15826. vue.createElementVNode("view", { class: "detail-row" }, [
  15827. vue.createElementVNode(
  15828. "text",
  15829. null,
  15830. "内部备注:" + 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 : "-"),
  15831. 1
  15832. /* TEXT */
  15833. )
  15834. ])
  15835. ]),
  15836. vue.createCommentVNode(" 操作按钮 "),
  15837. vue.createElementVNode("view", { class: "action-buttons" }, [
  15838. vue.createVNode(_component_u_button, {
  15839. size: "small",
  15840. type: "primary",
  15841. onClick: $setup.handleAudit
  15842. }, {
  15843. default: vue.withCtx(() => [
  15844. vue.createTextVNode("到货审核")
  15845. ]),
  15846. _: 1
  15847. /* STABLE */
  15848. }),
  15849. vue.createVNode(_component_u_button, {
  15850. size: "small",
  15851. onClick: $setup.handleView
  15852. }, {
  15853. default: vue.withCtx(() => [
  15854. vue.createTextVNode("查看")
  15855. ]),
  15856. _: 1
  15857. /* STABLE */
  15858. })
  15859. ])
  15860. ]);
  15861. }
  15862. const orderItem = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-12bc2a79"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/components/orderItem.vue"]]);
  15863. const _sfc_main$1a = {
  15864. __name: "isbn-order",
  15865. setup(__props, { expose: __expose }) {
  15866. __expose();
  15867. const otherParams = vue.ref({
  15868. isbnList: ""
  15869. });
  15870. const scrollRef = vue.ref(null);
  15871. const refreshList = () => {
  15872. var _a;
  15873. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  15874. };
  15875. let dataList = vue.ref([]);
  15876. const updateList = (data, page2) => {
  15877. dataList.value = data;
  15878. if (data.length > 0 && page2 == 1) {
  15879. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  15880. }
  15881. if (data.length == 0 && page2 == 1) {
  15882. uni.$u.ttsModule.speak("未查询到数据");
  15883. }
  15884. };
  15885. onLoad(() => {
  15886. const storedList = uni.getStorageSync("isbnList");
  15887. if (storedList) {
  15888. otherParams.value.isbnList = storedList.map((v) => v.isbn);
  15889. refreshList();
  15890. }
  15891. });
  15892. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  15893. return dataList;
  15894. }, set dataList(v) {
  15895. dataList = v;
  15896. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  15897. return onLoad;
  15898. } };
  15899. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15900. return __returned__;
  15901. }
  15902. };
  15903. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  15904. return vue.openBlock(), vue.createElementBlock("view", {
  15905. class: "common-page",
  15906. style: { "padding": "0" }
  15907. }, [
  15908. vue.createVNode($setup["PageScroll"], {
  15909. requestStr: "/app/orderinfo/getOrderListByIsbn",
  15910. onUpdateList: $setup.updateList,
  15911. ref: "scrollRef",
  15912. otherParams: $setup.otherParams,
  15913. method: "post"
  15914. }, {
  15915. default: vue.withCtx(() => [
  15916. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  15917. key: 0,
  15918. class: "list-con"
  15919. }, [
  15920. (vue.openBlock(true), vue.createElementBlock(
  15921. vue.Fragment,
  15922. null,
  15923. vue.renderList($setup.dataList, (cell) => {
  15924. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  15925. key: cell.id,
  15926. item: cell,
  15927. class: "mt-20"
  15928. }, null, 8, ["item"]);
  15929. }),
  15930. 128
  15931. /* KEYED_FRAGMENT */
  15932. ))
  15933. ])) : vue.createCommentVNode("v-if", true)
  15934. ]),
  15935. _: 1
  15936. /* STABLE */
  15937. }, 8, ["otherParams"])
  15938. ]);
  15939. }
  15940. const PagesIndexAuditIsbnOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/isbn-order.vue"]]);
  15941. const _sfc_main$19 = {
  15942. __name: "express-order",
  15943. setup(__props, { expose: __expose }) {
  15944. __expose();
  15945. const form = vue.ref({
  15946. searchType: "2",
  15947. search: ""
  15948. });
  15949. const handleSearch = () => {
  15950. formatAppLog("log", "at pages/index/audit/express-order.vue:46", "查询:", form.value.search);
  15951. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  15952. params: {
  15953. ...form.value
  15954. }
  15955. }).then((res2) => {
  15956. if (res2.code == 200) {
  15957. uni.setStorageSync("orderDetail", res2.data);
  15958. uni.navigateTo({
  15959. url: `/pages/index/detail/index?id=${res2.data.orderId}`
  15960. });
  15961. } else {
  15962. let text = form.value.search + res2.msg;
  15963. uni.$u.ttsModule.speak(text);
  15964. }
  15965. });
  15966. };
  15967. const handleScan = () => {
  15968. uni.scanCode({
  15969. success: (res2) => {
  15970. form.value.search = res2.result;
  15971. handleSearch();
  15972. }
  15973. });
  15974. };
  15975. onLoad(() => {
  15976. uni.$u.useGlobalEvent((e) => {
  15977. form.value.search = e.barcode;
  15978. handleSearch();
  15979. });
  15980. });
  15981. const __returned__ = { form, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  15982. return onLoad;
  15983. } };
  15984. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15985. return __returned__;
  15986. }
  15987. };
  15988. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  15989. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  15990. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  15991. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15992. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  15993. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  15994. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  15995. vue.createCommentVNode(" 底部按钮 "),
  15996. vue.createElementVNode("view", { class: "footer" }, [
  15997. vue.createCommentVNode(" 查询区域 "),
  15998. vue.createElementVNode("view", { class: "query-section" }, [
  15999. vue.createVNode(_component_u_radio_group, {
  16000. modelValue: $setup.form.searchType,
  16001. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.searchType = $event)
  16002. }, {
  16003. default: vue.withCtx(() => [
  16004. vue.createVNode(_component_u_radio, {
  16005. label: "查订单",
  16006. name: "1",
  16007. "label-size": "17"
  16008. }),
  16009. vue.createVNode(_component_u_radio, {
  16010. label: "查物流",
  16011. "custom-style": "margin-left:20px",
  16012. name: "2",
  16013. "label-size": "17"
  16014. })
  16015. ]),
  16016. _: 1
  16017. /* STABLE */
  16018. }, 8, ["modelValue"]),
  16019. vue.createElementVNode("view", { class: "search-box" }, [
  16020. vue.createVNode(_component_u_input, {
  16021. "custom-style": "width:100rpx",
  16022. modelValue: $setup.form.search,
  16023. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.search = $event),
  16024. placeholder: $setup.form.searchType == "1" ? "扫描/输入订单编号" : "扫描/输入物流单号",
  16025. border: "surround",
  16026. clearable: "",
  16027. "placeholder-style": "font-size:32rpx"
  16028. }, null, 8, ["modelValue", "placeholder"]),
  16029. vue.createVNode(_component_u_button, {
  16030. color: "#c8c8c8",
  16031. text: "查询",
  16032. onClick: $setup.handleSearch
  16033. })
  16034. ])
  16035. ]),
  16036. vue.createVNode(_component_u_divider),
  16037. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  16038. vue.createVNode(_component_u_button, {
  16039. size: "large",
  16040. type: "success",
  16041. text: "扫码",
  16042. onClick: $setup.handleScan
  16043. })
  16044. ])
  16045. ])
  16046. ]);
  16047. }
  16048. const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-b27ee25f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/express-order.vue"]]);
  16049. const _sfc_main$18 = {
  16050. __name: "AuditorSelector",
  16051. props: {
  16052. show: {
  16053. type: Boolean,
  16054. default: false
  16055. }
  16056. },
  16057. emits: ["update:show", "auditor-selected"],
  16058. setup(__props, { expose: __expose, emit: __emit }) {
  16059. __expose();
  16060. const props2 = __props;
  16061. const emit2 = __emit;
  16062. const searchKeyword = vue.ref("");
  16063. const searchResults = vue.ref([]);
  16064. const historyAuditors = vue.ref(uni.getStorageSync("historyAuditors") || []);
  16065. const checkUserId = vue.ref("");
  16066. const auditorSearch = (name) => {
  16067. formatAppLog("log", "at pages/index/detail/components/AuditorSelector.vue:66", name);
  16068. uni.$u.http.get("/app/appUser/getCheckUser?name=" + name).then((res2) => {
  16069. if (res2.code == 200) {
  16070. searchResults.value = res2.data;
  16071. }
  16072. });
  16073. };
  16074. const handleSearch = () => {
  16075. auditorSearch(searchKeyword.value);
  16076. };
  16077. const selectItem = vue.ref({});
  16078. const selectAuditor = (item) => {
  16079. checkUserId.value = item.userId;
  16080. selectItem.value = item;
  16081. };
  16082. const handleClose = () => {
  16083. emit2("update:show", false);
  16084. searchKeyword.value = "";
  16085. };
  16086. const handleConfirm = () => {
  16087. if (checkUserId.value) {
  16088. emit2("auditor-selected", selectItem.value);
  16089. uni.setStorageSync("checkUserInfo", selectItem.value);
  16090. addToHistory(selectItem.value);
  16091. handleClose();
  16092. }
  16093. };
  16094. const addToHistory = (item) => {
  16095. const existingIndex = historyAuditors.value.findIndex((auditor) => auditor.userId === item.userId);
  16096. if (existingIndex !== -1) {
  16097. historyAuditors.value.splice(existingIndex, 1);
  16098. }
  16099. historyAuditors.value.unshift(item);
  16100. if (historyAuditors.value.length > 10) {
  16101. historyAuditors.value.pop();
  16102. }
  16103. uni.setStorageSync("historyAuditors", historyAuditors.value);
  16104. };
  16105. vue.onMounted(() => {
  16106. const storedHistory = uni.getStorageSync("historyAuditors") || [];
  16107. historyAuditors.value = storedHistory;
  16108. });
  16109. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyAuditors, checkUserId, auditorSearch, handleSearch, selectItem, selectAuditor, handleClose, handleConfirm, addToHistory, ref: vue.ref, onMounted: vue.onMounted };
  16110. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16111. return __returned__;
  16112. }
  16113. };
  16114. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  16115. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  16116. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  16117. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  16118. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  16119. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16120. show: $props.show,
  16121. onClose: $setup.handleClose,
  16122. mode: "bottom",
  16123. round: "10"
  16124. }, {
  16125. default: vue.withCtx(() => [
  16126. vue.createElementVNode("view", { class: "auditor-selector" }, [
  16127. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  16128. vue.createCommentVNode(" Title "),
  16129. vue.createElementVNode("view", { class: "header" }, [
  16130. vue.createElementVNode("text", { class: "title" }, "绑定审核员")
  16131. ]),
  16132. vue.createCommentVNode(" Search Box "),
  16133. vue.createElementVNode("view", { class: "search-box" }, [
  16134. vue.createVNode(_component_u_search, {
  16135. inputStyle: { "height": "80rpx", "font-size": "16px" },
  16136. actionStyle: { "font-size": "16px", color: "#22ac38" },
  16137. modelValue: $setup.searchKeyword,
  16138. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  16139. placeholder: "搜索审核员",
  16140. "show-action": true,
  16141. "action-text": "搜索",
  16142. onSearch: $setup.handleSearch,
  16143. onCustom: $setup.handleSearch
  16144. }, null, 8, ["modelValue"])
  16145. ]),
  16146. vue.createCommentVNode(" Search Results "),
  16147. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16148. key: 0,
  16149. class: "search-result"
  16150. }, [
  16151. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  16152. vue.createElementVNode("view", { class: "tag-group" }, [
  16153. (vue.openBlock(true), vue.createElementBlock(
  16154. vue.Fragment,
  16155. null,
  16156. vue.renderList($setup.searchResults, (item) => {
  16157. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16158. key: item,
  16159. text: item.userName,
  16160. plain: $setup.checkUserId !== item.userId,
  16161. shape: "circle",
  16162. onClick: ($event) => $setup.selectAuditor(item),
  16163. size: "large"
  16164. }, null, 8, ["text", "plain", "onClick"]);
  16165. }),
  16166. 128
  16167. /* KEYED_FRAGMENT */
  16168. ))
  16169. ])
  16170. ])) : vue.createCommentVNode("v-if", true),
  16171. vue.createCommentVNode(" History "),
  16172. $setup.historyAuditors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16173. key: 1,
  16174. class: "history-section"
  16175. }, [
  16176. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  16177. vue.createElementVNode("view", { class: "tag-group" }, [
  16178. (vue.openBlock(true), vue.createElementBlock(
  16179. vue.Fragment,
  16180. null,
  16181. vue.renderList($setup.historyAuditors, (item) => {
  16182. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16183. key: item,
  16184. text: item.userName,
  16185. plain: $setup.checkUserId !== item.userId,
  16186. shape: "circle",
  16187. onClick: ($event) => $setup.selectAuditor(item),
  16188. size: "large"
  16189. }, null, 8, ["text", "plain", "onClick"]);
  16190. }),
  16191. 128
  16192. /* KEYED_FRAGMENT */
  16193. ))
  16194. ])
  16195. ])) : vue.createCommentVNode("v-if", true)
  16196. ]),
  16197. vue.createCommentVNode(" Footer Buttons "),
  16198. vue.createElementVNode("view", { class: "footer" }, [
  16199. vue.createVNode(_component_u_button, {
  16200. onClick: $setup.handleClose,
  16201. text: "取消",
  16202. plain: "",
  16203. shape: "circle"
  16204. }),
  16205. vue.createVNode(_component_u_button, {
  16206. type: "primary",
  16207. onClick: $setup.handleConfirm,
  16208. text: "确定",
  16209. shape: "circle"
  16210. })
  16211. ])
  16212. ])
  16213. ]),
  16214. _: 1
  16215. /* STABLE */
  16216. }, 8, ["show"]);
  16217. }
  16218. const AuditorSelector = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-8d9417b9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/AuditorSelector.vue"]]);
  16219. const props$9 = {
  16220. props: {
  16221. // 输入框的内容
  16222. value: {
  16223. type: [String, Number],
  16224. default: props$E.textarea.value
  16225. },
  16226. // 输入框的内容
  16227. modelValue: {
  16228. type: [String, Number],
  16229. default: props$E.textarea.value
  16230. },
  16231. // 输入框为空时占位符
  16232. placeholder: {
  16233. type: [String, Number],
  16234. default: props$E.textarea.placeholder
  16235. },
  16236. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  16237. placeholderClass: {
  16238. type: String,
  16239. default: props$E.input.placeholderClass
  16240. },
  16241. // 指定placeholder的样式
  16242. placeholderStyle: {
  16243. type: [String, Object],
  16244. default: props$E.input.placeholderStyle
  16245. },
  16246. // 输入框高度
  16247. height: {
  16248. type: [String, Number],
  16249. default: props$E.textarea.height
  16250. },
  16251. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  16252. confirmType: {
  16253. type: String,
  16254. default: props$E.textarea.confirmType
  16255. },
  16256. // 是否禁用
  16257. disabled: {
  16258. type: Boolean,
  16259. default: props$E.textarea.disabled
  16260. },
  16261. // 是否显示统计字数
  16262. count: {
  16263. type: Boolean,
  16264. default: props$E.textarea.count
  16265. },
  16266. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  16267. focus: {
  16268. type: Boolean,
  16269. default: props$E.textarea.focus
  16270. },
  16271. // 是否自动增加高度
  16272. autoHeight: {
  16273. type: Boolean,
  16274. default: props$E.textarea.autoHeight
  16275. },
  16276. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  16277. fixed: {
  16278. type: Boolean,
  16279. default: props$E.textarea.fixed
  16280. },
  16281. // 指定光标与键盘的距离
  16282. cursorSpacing: {
  16283. type: Number,
  16284. default: props$E.textarea.cursorSpacing
  16285. },
  16286. // 指定focus时的光标位置
  16287. cursor: {
  16288. type: [String, Number],
  16289. default: props$E.textarea.cursor
  16290. },
  16291. // 是否显示键盘上方带有”完成“按钮那一栏,
  16292. showConfirmBar: {
  16293. type: Boolean,
  16294. default: props$E.textarea.showConfirmBar
  16295. },
  16296. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  16297. selectionStart: {
  16298. type: Number,
  16299. default: props$E.textarea.selectionStart
  16300. },
  16301. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  16302. selectionEnd: {
  16303. type: Number,
  16304. default: props$E.textarea.selectionEnd
  16305. },
  16306. // 键盘弹起时,是否自动上推页面
  16307. adjustPosition: {
  16308. type: Boolean,
  16309. default: props$E.textarea.adjustPosition
  16310. },
  16311. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  16312. disableDefaultPadding: {
  16313. type: Boolean,
  16314. default: props$E.textarea.disableDefaultPadding
  16315. },
  16316. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  16317. holdKeyboard: {
  16318. type: Boolean,
  16319. default: props$E.textarea.holdKeyboard
  16320. },
  16321. // 最大输入长度,设置为 -1 的时候不限制最大长度
  16322. maxlength: {
  16323. type: [String, Number],
  16324. default: props$E.textarea.maxlength
  16325. },
  16326. // 边框类型,surround-四周边框,bottom-底部边框
  16327. border: {
  16328. type: String,
  16329. default: props$E.textarea.border
  16330. },
  16331. // 用于处理或者过滤输入框内容的方法
  16332. formatter: {
  16333. type: [Function, null],
  16334. default: props$E.textarea.formatter
  16335. },
  16336. // 是否忽略组件内对文本合成系统事件的处理
  16337. ignoreCompositionEvent: {
  16338. type: Boolean,
  16339. default: true
  16340. }
  16341. }
  16342. };
  16343. const _sfc_main$17 = {
  16344. name: "u-textarea",
  16345. mixins: [mpMixin, mixin, props$9],
  16346. data() {
  16347. return {
  16348. // 输入框的值
  16349. innerValue: "",
  16350. // 是否处于获得焦点状态
  16351. focused: false,
  16352. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  16353. firstChange: true,
  16354. // value绑定值的变化是由内部还是外部引起的
  16355. changeFromInner: false,
  16356. // 过滤处理方法
  16357. innerFormatter: (value2) => value2
  16358. };
  16359. },
  16360. created() {
  16361. },
  16362. watch: {
  16363. modelValue: {
  16364. immediate: true,
  16365. handler(newVal, oldVal) {
  16366. this.innerValue = newVal;
  16367. this.firstChange = false;
  16368. this.changeFromInner = false;
  16369. }
  16370. }
  16371. },
  16372. computed: {
  16373. // 组件的类名
  16374. textareaClass() {
  16375. let classes = [], { border, disabled } = this;
  16376. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  16377. border === "bottom" && (classes = classes.concat([
  16378. "u-border-bottom",
  16379. "u-textarea--no-radius"
  16380. ]));
  16381. disabled && classes.push("u-textarea--disabled");
  16382. return classes.join(" ");
  16383. },
  16384. // 组件的样式
  16385. textareaStyle() {
  16386. const style = {};
  16387. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16388. }
  16389. },
  16390. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  16391. methods: {
  16392. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  16393. setFormatter(e) {
  16394. this.innerFormatter = e;
  16395. },
  16396. onFocus(e) {
  16397. this.$emit("focus", e);
  16398. },
  16399. onBlur(e) {
  16400. this.$emit("blur", e);
  16401. uni.$u.formValidate(this, "blur");
  16402. },
  16403. onLinechange(e) {
  16404. this.$emit("linechange", e);
  16405. },
  16406. onInput(e) {
  16407. let { value: value2 = "" } = e.detail || {};
  16408. const formatter = this.formatter || this.innerFormatter;
  16409. const formatValue = formatter(value2);
  16410. this.innerValue = value2;
  16411. this.$nextTick(() => {
  16412. this.innerValue = formatValue;
  16413. this.valueChange();
  16414. });
  16415. },
  16416. // 内容发生变化,进行处理
  16417. valueChange() {
  16418. const value2 = this.innerValue;
  16419. this.$nextTick(() => {
  16420. this.$emit("update:modelValue", value2);
  16421. this.changeFromInner = true;
  16422. this.$emit("change", value2);
  16423. uni.$u.formValidate(this, "change");
  16424. });
  16425. },
  16426. onConfirm(e) {
  16427. this.$emit("confirm", e);
  16428. },
  16429. onKeyboardheightchange(e) {
  16430. this.$emit("keyboardheightchange", e);
  16431. }
  16432. }
  16433. };
  16434. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  16435. return vue.openBlock(), vue.createElementBlock(
  16436. "view",
  16437. {
  16438. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  16439. style: vue.normalizeStyle([$options.textareaStyle])
  16440. },
  16441. [
  16442. vue.createElementVNode("textarea", {
  16443. class: "u-textarea__field",
  16444. value: $data.innerValue,
  16445. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  16446. placeholder: _ctx.placeholder,
  16447. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  16448. "placeholder-class": _ctx.placeholderClass,
  16449. disabled: _ctx.disabled,
  16450. focus: _ctx.focus,
  16451. autoHeight: _ctx.autoHeight,
  16452. fixed: _ctx.fixed,
  16453. cursorSpacing: _ctx.cursorSpacing,
  16454. cursor: _ctx.cursor,
  16455. showConfirmBar: _ctx.showConfirmBar,
  16456. selectionStart: _ctx.selectionStart,
  16457. selectionEnd: _ctx.selectionEnd,
  16458. adjustPosition: _ctx.adjustPosition,
  16459. disableDefaultPadding: _ctx.disableDefaultPadding,
  16460. holdKeyboard: _ctx.holdKeyboard,
  16461. maxlength: _ctx.maxlength,
  16462. "confirm-type": _ctx.confirmType,
  16463. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  16464. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  16465. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  16466. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  16467. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  16468. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  16469. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  16470. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  16471. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  16472. "text",
  16473. {
  16474. key: 0,
  16475. class: "u-textarea__count",
  16476. style: vue.normalizeStyle({
  16477. "background-color": _ctx.disabled ? "transparent" : "#fff"
  16478. })
  16479. },
  16480. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  16481. 5
  16482. /* TEXT, STYLE */
  16483. )) : vue.createCommentVNode("v-if", true)
  16484. ],
  16485. 6
  16486. /* CLASS, STYLE */
  16487. );
  16488. }
  16489. const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-b6c174a6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
  16490. const _sfc_main$16 = {
  16491. __name: "OrderInfo",
  16492. props: {
  16493. orderId: String,
  16494. estimatedAmount: Number,
  16495. userNote: String,
  16496. detail: Object
  16497. // Add more props as needed
  16498. },
  16499. emits: ["refresh"],
  16500. setup(__props, { expose: __expose, emit: __emit }) {
  16501. __expose();
  16502. const props2 = __props;
  16503. let finalExpressList = { "1": "顺丰快递", "2": "京东快递", "3": "德邦快递" };
  16504. let finalExpressText = vue.computed(() => {
  16505. return props2.detail.finalExpress ? finalExpressList[props2.detail.finalExpress] : "";
  16506. });
  16507. const statusEnum = {
  16508. 0: "创建",
  16509. 1: "用户删除",
  16510. 2: "下单(待初审)",
  16511. 3: "初审(待取书)",
  16512. 4: "初审未通过",
  16513. 5: "快递取书(待签收)",
  16514. 6: "快递签收(待收货)",
  16515. 7: "物流签收(路由异常)",
  16516. 8: "仓库收货(待审核)",
  16517. 9: "审核中(审核未提交)",
  16518. 10: "已审核(待付款)",
  16519. 11: "已完成"
  16520. };
  16521. let statusText = vue.computed(() => {
  16522. return statusEnum[props2.detail.status] || "未知状态";
  16523. });
  16524. const maskedSendMobile = vue.computed(() => {
  16525. if (props2.detail.sendMobile && props2.detail.sendMobile.length === 11) {
  16526. return props2.detail.sendMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  16527. }
  16528. return props2.detail.sendMobile;
  16529. });
  16530. function copyToClipboard(text) {
  16531. uni.setClipboardData({
  16532. data: text,
  16533. success: function() {
  16534. uni.showToast({
  16535. title: "复制成功",
  16536. icon: "success"
  16537. });
  16538. },
  16539. fail: function(err) {
  16540. formatAppLog("error", "at pages/index/detail/components/OrderInfo.vue:121", "Could not copy text: ", err);
  16541. }
  16542. });
  16543. }
  16544. const showModal = vue.ref(false);
  16545. const internalRemark = vue.ref("");
  16546. function fillRemark(text) {
  16547. internalRemark.value = text;
  16548. }
  16549. const remarkInfo = vue.ref({});
  16550. function handleRemark() {
  16551. var _a;
  16552. showModal.value = true;
  16553. remarkInfo.value = ((_a = props2.detail.manageRemark) == null ? void 0 : _a[0]) || {};
  16554. internalRemark.value = remarkInfo.value.remark || "";
  16555. }
  16556. const emit2 = __emit;
  16557. function confirmRemark() {
  16558. uni.$u.http.post("/app/orderinfo/setManageRemark", {
  16559. orderId: props2.detail.orderId,
  16560. remark: internalRemark.value,
  16561. id: remarkInfo.value.id
  16562. }).then((res2) => {
  16563. if (res2.code == 200) {
  16564. uni.$u.toast("保存成功");
  16565. uni.$u.ttsModule.speak("保存成功");
  16566. showModal.value = false;
  16567. emit2("refresh");
  16568. } else {
  16569. uni.$u.toast(res2.msg);
  16570. }
  16571. });
  16572. }
  16573. const __returned__ = { props: props2, get finalExpressList() {
  16574. return finalExpressList;
  16575. }, set finalExpressList(v) {
  16576. finalExpressList = v;
  16577. }, get finalExpressText() {
  16578. return finalExpressText;
  16579. }, set finalExpressText(v) {
  16580. finalExpressText = v;
  16581. }, statusEnum, get statusText() {
  16582. return statusText;
  16583. }, set statusText(v) {
  16584. statusText = v;
  16585. }, maskedSendMobile, copyToClipboard, showModal, internalRemark, fillRemark, remarkInfo, handleRemark, emit: emit2, confirmRemark, computed: vue.computed, ref: vue.ref, watch: vue.watch };
  16586. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16587. return __returned__;
  16588. }
  16589. };
  16590. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  16591. var _a, _b, _c, _d;
  16592. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  16593. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  16594. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  16595. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  16596. return vue.openBlock(), vue.createElementBlock(
  16597. vue.Fragment,
  16598. null,
  16599. [
  16600. vue.createElementVNode("view", { class: "order-info bg-white" }, [
  16601. vue.createElementVNode("view", { class: "info-item flex" }, [
  16602. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  16603. vue.createElementVNode(
  16604. "text",
  16605. {
  16606. style: { "color": "#22ac38" },
  16607. class: "flex-1 text-center content",
  16608. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.detail.orderId))
  16609. },
  16610. vue.toDisplayString($props.detail.orderId),
  16611. 1
  16612. /* TEXT */
  16613. )
  16614. ]),
  16615. vue.createElementVNode("view", { class: "info-item" }, [
  16616. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  16617. vue.createElementVNode(
  16618. "text",
  16619. { class: "content" },
  16620. vue.toDisplayString($props.detail.expectMoney),
  16621. 1
  16622. /* TEXT */
  16623. ),
  16624. vue.createElementVNode("text", { class: "label border-left" }, "审核金额"),
  16625. vue.createElementVNode(
  16626. "text",
  16627. { class: "content" },
  16628. vue.toDisplayString($props.detail.finalMoney),
  16629. 1
  16630. /* TEXT */
  16631. )
  16632. ]),
  16633. vue.createElementVNode("view", { class: "info-item" }, [
  16634. vue.createElementVNode("text", { class: "label" }, "用户备注"),
  16635. vue.createElementVNode(
  16636. "text",
  16637. { class: "content" },
  16638. vue.toDisplayString($props.detail.userRemark),
  16639. 1
  16640. /* TEXT */
  16641. )
  16642. ]),
  16643. vue.createElementVNode("view", {
  16644. class: "info-item",
  16645. onClick: $setup.handleRemark
  16646. }, [
  16647. vue.createElementVNode("text", { class: "label" }, "内部备注"),
  16648. vue.createElementVNode(
  16649. "text",
  16650. { class: "content" },
  16651. 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 : " " : " "),
  16652. 1
  16653. /* TEXT */
  16654. )
  16655. ]),
  16656. vue.createElementVNode("view", { class: "info-item" }, [
  16657. vue.createElementVNode("text", { class: "label" }, "订单状态"),
  16658. vue.createElementVNode(
  16659. "text",
  16660. {
  16661. class: "content",
  16662. style: { "color": "#c5493e" }
  16663. },
  16664. "[" + vue.toDisplayString($setup.statusText) + "]",
  16665. 1
  16666. /* TEXT */
  16667. )
  16668. ]),
  16669. vue.createElementVNode("view", { class: "info-item" }, [
  16670. vue.createElementVNode("text", { class: "label" }, "快递"),
  16671. vue.createElementVNode(
  16672. "text",
  16673. { class: "content" },
  16674. vue.toDisplayString($setup.finalExpressText) + "(单号:" + vue.toDisplayString($props.detail.waybillCode) + ")",
  16675. 1
  16676. /* TEXT */
  16677. )
  16678. ]),
  16679. vue.createElementVNode("view", { class: "info-item" }, [
  16680. vue.createElementVNode("text", { class: "label" }, [
  16681. vue.createTextVNode("发件人"),
  16682. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  16683. ]),
  16684. vue.createElementVNode("view", { class: "content flex flex-a-c flex-j-c" }, [
  16685. vue.createElementVNode("text", {
  16686. class: "content-text",
  16687. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.detail.sendMobile))
  16688. }, "复制"),
  16689. vue.createElementVNode(
  16690. "text",
  16691. { class: "content-text ml-10 mr-10" },
  16692. vue.toDisplayString($setup.maskedSendMobile),
  16693. 1
  16694. /* TEXT */
  16695. ),
  16696. $props.detail.orderFrom == 1 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16697. key: 0,
  16698. name: "weixin-circle-fill",
  16699. size: "18",
  16700. color: "#22ac38"
  16701. })) : vue.createCommentVNode("v-if", true),
  16702. $props.detail.orderFrom == 2 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16703. key: 1,
  16704. name: "zhifubao-circle-fill",
  16705. size: "18",
  16706. color: "#999"
  16707. })) : vue.createCommentVNode("v-if", true)
  16708. ])
  16709. ]),
  16710. vue.createElementVNode("view", { class: "info-item" }, [
  16711. vue.createElementVNode("text", { class: "label" }, "发货地址"),
  16712. vue.createElementVNode(
  16713. "text",
  16714. { class: "content" },
  16715. vue.toDisplayString($props.detail.sendAddress),
  16716. 1
  16717. /* TEXT */
  16718. )
  16719. ]),
  16720. vue.createElementVNode("view", { class: "info-item" }, [
  16721. vue.createElementVNode("text", { class: "label" }, "收货仓库"),
  16722. vue.createElementVNode(
  16723. "text",
  16724. { class: "content" },
  16725. vue.toDisplayString($props.detail.recipientAddress) + "-" + vue.toDisplayString($props.detail.recipientGodown) + "-" + vue.toDisplayString($props.detail.recipientName),
  16726. 1
  16727. /* TEXT */
  16728. )
  16729. ])
  16730. ]),
  16731. vue.createVNode(_component_u_modal, {
  16732. show: $setup.showModal,
  16733. title: "编辑内部备注",
  16734. showCancelButton: true,
  16735. onConfirm: $setup.confirmRemark,
  16736. onCancel: _cache[8] || (_cache[8] = ($event) => $setup.showModal = false)
  16737. }, {
  16738. default: vue.withCtx(() => [
  16739. vue.createElementVNode("view", { class: "modal-content w100" }, [
  16740. vue.createVNode(_component_u_textarea, {
  16741. modelValue: $setup.internalRemark,
  16742. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.internalRemark = $event),
  16743. placeholder: "编辑内部备注",
  16744. autoHeight: "",
  16745. style: { "min-height": "100px" }
  16746. }, null, 8, ["modelValue"]),
  16747. vue.createElementVNode("view", { class: "mt-20 common-title" }, "快速填入"),
  16748. vue.createElementVNode("view", { class: "quick-fill mt-16" }, [
  16749. vue.createVNode(_component_u_tag, {
  16750. class: "mr-10 mb-10",
  16751. onClick: _cache[3] || (_cache[3] = ($event) => $setup.fillRemark("少书给客服")),
  16752. text: "少书给客服"
  16753. }),
  16754. vue.createVNode(_component_u_tag, {
  16755. class: "mr-10 mb-10",
  16756. onClick: _cache[4] || (_cache[4] = ($event) => $setup.fillRemark("多书给客服")),
  16757. text: "多书给客服"
  16758. }),
  16759. vue.createVNode(_component_u_tag, {
  16760. class: "mr-10 mb-10",
  16761. onClick: _cache[5] || (_cache[5] = ($event) => $setup.fillRemark("子母件")),
  16762. text: "子母件"
  16763. }),
  16764. vue.createVNode(_component_u_tag, {
  16765. class: "mr-10 mb-10",
  16766. onClick: _cache[6] || (_cache[6] = ($event) => $setup.fillRemark("书单不符给客服")),
  16767. text: "书单不符给客服"
  16768. }),
  16769. vue.createVNode(_component_u_tag, {
  16770. class: "mr-10 mb-10",
  16771. onClick: _cache[7] || (_cache[7] = ($event) => $setup.fillRemark("需理赔给客服")),
  16772. text: "需理赔给客服"
  16773. })
  16774. ])
  16775. ])
  16776. ]),
  16777. _: 1
  16778. /* STABLE */
  16779. }, 8, ["show"])
  16780. ],
  16781. 64
  16782. /* STABLE_FRAGMENT */
  16783. );
  16784. }
  16785. const OrderInfo = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-034ad4bc"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/OrderInfo.vue"]]);
  16786. const _sfc_main$15 = {
  16787. __name: "UserInfoCard",
  16788. props: {
  16789. detail: {
  16790. type: Object,
  16791. default: () => ({})
  16792. }
  16793. },
  16794. setup(__props, { expose: __expose }) {
  16795. __expose();
  16796. const props2 = __props;
  16797. const formattedName = vue.computed(() => {
  16798. var _a, _b;
  16799. return ((_b = (_a = props2.detail) == null ? void 0 : _a.userNick) == null ? void 0 : _b.charAt(0)) + "**";
  16800. });
  16801. const statusClass = vue.computed(() => {
  16802. return props2.detail.userStatus == 1 ? "color-green" : "color-red";
  16803. });
  16804. const blacklistAction = vue.computed(() => {
  16805. return props2.detail.userStatus == 1 ? "加入黑名单" : "移除黑名单";
  16806. });
  16807. const showModal = vue.ref(false);
  16808. const showBlacklistModal = vue.ref(false);
  16809. const reason = vue.ref("");
  16810. const toggleBlacklist = () => {
  16811. showBlacklistModal.value = true;
  16812. };
  16813. const confirmBlacklist = () => {
  16814. let apiStr = props2.detail.userStatus == 1 ? "/app/appUser/setUserBlack" : "app/appUser/removeUserBlack";
  16815. uni.$u.http.post(apiStr, {
  16816. userId: props2.detail.userId,
  16817. reason: reason.value
  16818. }).then((res2) => {
  16819. if (res2.code == 200) {
  16820. uni.$u.toast("操作成功");
  16821. showBlacklistModal.value = false;
  16822. props2.detail.userStatus = props2.detail.userStatus == 1 ? 2 : 1;
  16823. } else {
  16824. uni.$u.toast(res2.msg);
  16825. }
  16826. });
  16827. };
  16828. const __returned__ = { props: props2, formattedName, statusClass, blacklistAction, showModal, showBlacklistModal, reason, toggleBlacklist, confirmBlacklist, ref: vue.ref, computed: vue.computed };
  16829. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16830. return __returned__;
  16831. }
  16832. };
  16833. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  16834. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  16835. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-card bg-white mt-16" }, [
  16836. vue.createElementVNode("view", { class: "header" }, [
  16837. vue.createElementVNode(
  16838. "text",
  16839. { style: { "color": "#666" } },
  16840. vue.toDisplayString($props.detail.orderTime),
  16841. 1
  16842. /* TEXT */
  16843. ),
  16844. vue.createElementVNode("text", {
  16845. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true),
  16846. class: "color-green"
  16847. }, "[查看订单日志]")
  16848. ]),
  16849. vue.createElementVNode("view", { class: "content flex flex-j-b" }, [
  16850. vue.createElementVNode("image", {
  16851. src: $props.detail.imgPath,
  16852. class: "user-image"
  16853. }, null, 8, ["src"]),
  16854. vue.createElementVNode("view", { class: "flex flex-a-e flex-1 ml-12" }, [
  16855. vue.createElementVNode("view", { class: "flex flex-d flex-1" }, [
  16856. vue.createElementVNode("text", { class: "color-green" }, [
  16857. vue.createTextVNode(
  16858. vue.toDisplayString($setup.formattedName),
  16859. 1
  16860. /* TEXT */
  16861. ),
  16862. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  16863. ]),
  16864. vue.createElementVNode(
  16865. "text",
  16866. {
  16867. class: "common-text",
  16868. style: { "margin-top": "10rpx" }
  16869. },
  16870. "共卖出" + vue.toDisplayString($props.detail.totalNum) + "本书",
  16871. 1
  16872. /* TEXT */
  16873. ),
  16874. vue.createElementVNode(
  16875. "text",
  16876. { class: "common-text" },
  16877. "来自" + vue.toDisplayString($props.detail.sendSsq),
  16878. 1
  16879. /* TEXT */
  16880. ),
  16881. vue.createElementVNode("text", {
  16882. class: "common-text",
  16883. style: { "margin-top": "10rpx" }
  16884. }, [
  16885. vue.createTextVNode("用户状态: "),
  16886. vue.createElementVNode(
  16887. "text",
  16888. {
  16889. class: vue.normalizeClass($setup.statusClass)
  16890. },
  16891. vue.toDisplayString($props.detail.userStatus == 1 ? "正常" : $props.detail.userStatus == 2 ? "黑名单" : "-"),
  16892. 3
  16893. /* TEXT, CLASS */
  16894. )
  16895. ])
  16896. ]),
  16897. vue.createElementVNode(
  16898. "text",
  16899. {
  16900. style: { "min-width": "160rpx" },
  16901. onClick: $setup.toggleBlacklist,
  16902. class: "color-red"
  16903. },
  16904. "[" + vue.toDisplayString($setup.blacklistAction) + "]",
  16905. 1
  16906. /* TEXT */
  16907. )
  16908. ])
  16909. ]),
  16910. vue.createVNode(_component_u_modal, {
  16911. show: $setup.showModal,
  16912. "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showModal = $event),
  16913. title: "订单日志",
  16914. showCancelButton: false,
  16915. confirmText: "关闭",
  16916. onConfirm: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false),
  16917. class: "log-modal"
  16918. }, {
  16919. default: vue.withCtx(() => [
  16920. vue.createElementVNode("view", { class: "log-container" }, [
  16921. vue.createElementVNode("view", { class: "log-header" }, [
  16922. vue.createElementVNode("text", null, "描述"),
  16923. vue.createElementVNode("text", null, "操作人"),
  16924. vue.createElementVNode("text", null, "时间")
  16925. ]),
  16926. (vue.openBlock(true), vue.createElementBlock(
  16927. vue.Fragment,
  16928. null,
  16929. vue.renderList($props.detail.logVoList, (log, index2) => {
  16930. return vue.openBlock(), vue.createElementBlock("view", {
  16931. class: "log-item",
  16932. key: index2
  16933. }, [
  16934. vue.createElementVNode(
  16935. "text",
  16936. { class: "log-item-content" },
  16937. vue.toDisplayString(log.statusName),
  16938. 1
  16939. /* TEXT */
  16940. ),
  16941. vue.createElementVNode(
  16942. "text",
  16943. { class: "log-item-name" },
  16944. vue.toDisplayString(log.createName),
  16945. 1
  16946. /* TEXT */
  16947. ),
  16948. vue.createElementVNode(
  16949. "text",
  16950. { class: "log-item-time" },
  16951. vue.toDisplayString(log.createTime),
  16952. 1
  16953. /* TEXT */
  16954. )
  16955. ]);
  16956. }),
  16957. 128
  16958. /* KEYED_FRAGMENT */
  16959. ))
  16960. ])
  16961. ]),
  16962. _: 1
  16963. /* STABLE */
  16964. }, 8, ["show"]),
  16965. vue.createVNode(_component_u_modal, {
  16966. show: $setup.showBlacklistModal,
  16967. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showBlacklistModal = $event),
  16968. title: "拉黑用户",
  16969. showCancelButton: true,
  16970. confirmText: "提交",
  16971. cancelText: "取消",
  16972. onConfirm: $setup.confirmBlacklist,
  16973. onCancel: _cache[5] || (_cache[5] = ($event) => $setup.showBlacklistModal = false)
  16974. }, {
  16975. default: vue.withCtx(() => [
  16976. vue.withDirectives(vue.createElementVNode(
  16977. "textarea",
  16978. {
  16979. class: "reason-textarea",
  16980. placeholder: "请输入拉黑原因...",
  16981. autoHeight: "",
  16982. "bg-color": "#f8f8f8",
  16983. "border-radius": "10rpx",
  16984. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.reason = $event),
  16985. height: "100px"
  16986. },
  16987. null,
  16988. 512
  16989. /* NEED_PATCH */
  16990. ), [
  16991. [vue.vModelText, $setup.reason]
  16992. ])
  16993. ]),
  16994. _: 1
  16995. /* STABLE */
  16996. }, 8, ["show"])
  16997. ]);
  16998. }
  16999. const UserInfoCard = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-42a1a738"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/UserInfoCard.vue"]]);
  17000. const _sfc_main$14 = {
  17001. __name: "LogisticsTimeline",
  17002. props: {
  17003. list: {
  17004. type: Array,
  17005. default: []
  17006. }
  17007. },
  17008. setup(__props, { expose: __expose }) {
  17009. __expose();
  17010. const props2 = __props;
  17011. const __returned__ = { props: props2 };
  17012. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17013. return __returned__;
  17014. }
  17015. };
  17016. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  17017. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  17018. return vue.openBlock(), vue.createElementBlock("view", {
  17019. "scroll-y": "",
  17020. class: "timeline-container"
  17021. }, [
  17022. (vue.openBlock(true), vue.createElementBlock(
  17023. vue.Fragment,
  17024. null,
  17025. vue.renderList($props.list, (item, index2) => {
  17026. return vue.openBlock(), vue.createElementBlock("view", {
  17027. key: index2,
  17028. class: "timeline-item"
  17029. }, [
  17030. vue.createElementVNode("view", { class: "timeline-icon" }, [
  17031. vue.createVNode(_component_u_icon, {
  17032. name: "map-fill",
  17033. color: "#19be6b",
  17034. size: "16"
  17035. })
  17036. ]),
  17037. vue.createElementVNode("view", { class: "timeline-content" }, [
  17038. vue.createElementVNode(
  17039. "text",
  17040. { class: "title" },
  17041. vue.toDisplayString(item.title),
  17042. 1
  17043. /* TEXT */
  17044. ),
  17045. vue.createElementVNode(
  17046. "text",
  17047. { class: "desc" },
  17048. vue.toDisplayString(item.description),
  17049. 1
  17050. /* TEXT */
  17051. ),
  17052. vue.createElementVNode(
  17053. "text",
  17054. { class: "time" },
  17055. vue.toDisplayString(item.time),
  17056. 1
  17057. /* TEXT */
  17058. )
  17059. ]),
  17060. index2 < $props.list.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  17061. key: 0,
  17062. class: "timeline-line"
  17063. })) : vue.createCommentVNode("v-if", true)
  17064. ]);
  17065. }),
  17066. 128
  17067. /* KEYED_FRAGMENT */
  17068. ))
  17069. ]);
  17070. }
  17071. const LogisticsTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-140e9488"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/LogisticsTimeline.vue"]]);
  17072. const _sfc_main$13 = {
  17073. __name: "BookItem",
  17074. props: {
  17075. item: Object,
  17076. showClose: {
  17077. type: Boolean,
  17078. default: false
  17079. }
  17080. },
  17081. setup(__props, { expose: __expose }) {
  17082. __expose();
  17083. const props2 = __props;
  17084. const goodNum = vue.computed(() => {
  17085. var _a;
  17086. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17087. });
  17088. const badNum = vue.computed(() => {
  17089. var _a;
  17090. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 3).length) || 0;
  17091. });
  17092. const reasons = vue.computed(() => {
  17093. let list = props2.item.auditCommentList;
  17094. if (!list)
  17095. return "";
  17096. if (list.length > 0) {
  17097. let poorList = list.filter((v) => v.sts == 3);
  17098. if (poorList.length == 0)
  17099. return "";
  17100. return poorList.map((v) => v.com).join(";");
  17101. }
  17102. });
  17103. const __returned__ = { props: props2, goodNum, badNum, reasons, computed: vue.computed };
  17104. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17105. return __returned__;
  17106. }
  17107. };
  17108. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  17109. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  17110. vue.createElementVNode("view", { class: "flex w100" }, [
  17111. vue.createElementVNode("view", { class: "flex-d" }, [
  17112. vue.createElementVNode("image", {
  17113. style: { "width": "70px", "height": "90px" },
  17114. src: $props.item.cover,
  17115. mode: "aspectFill"
  17116. }, null, 8, ["src"]),
  17117. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  17118. "view",
  17119. {
  17120. key: 0,
  17121. class: "quantity mt-24"
  17122. },
  17123. "数量: " + vue.toDisplayString($props.item.num),
  17124. 1
  17125. /* TEXT */
  17126. )) : vue.createCommentVNode("v-if", true)
  17127. ]),
  17128. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  17129. vue.createElementVNode(
  17130. "view",
  17131. { class: "common-title mb-20" },
  17132. vue.toDisplayString($props.item.bookName),
  17133. 1
  17134. /* TEXT */
  17135. ),
  17136. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17137. vue.createElementVNode(
  17138. "view",
  17139. { class: "isbn" },
  17140. "ISBN: " + vue.toDisplayString($props.item.isbn),
  17141. 1
  17142. /* TEXT */
  17143. ),
  17144. vue.createElementVNode(
  17145. "view",
  17146. { class: "set" },
  17147. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  17148. 1
  17149. /* TEXT */
  17150. )
  17151. ]),
  17152. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17153. vue.createElementVNode(
  17154. "view",
  17155. { class: "price" },
  17156. "定价: " + vue.toDisplayString($props.item.bookPrice),
  17157. 1
  17158. /* TEXT */
  17159. ),
  17160. vue.createElementVNode(
  17161. "view",
  17162. { class: "estimate" },
  17163. "预估单价: " + vue.toDisplayString(($props.item.recycleDiscount * $props.item.bookPrice * 0.1).toFixed(2)),
  17164. 1
  17165. /* TEXT */
  17166. )
  17167. ]),
  17168. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17169. vue.createElementVNode(
  17170. "view",
  17171. { class: "discount" },
  17172. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  17173. 1
  17174. /* TEXT */
  17175. ),
  17176. vue.createElementVNode("view", { class: "review" }, [
  17177. vue.createTextVNode("审核金额: "),
  17178. vue.createElementVNode(
  17179. "text",
  17180. { class: "color-red" },
  17181. vue.toDisplayString($props.item.finalMoney || 0),
  17182. 1
  17183. /* TEXT */
  17184. )
  17185. ])
  17186. ]),
  17187. vue.createElementVNode("view", { class: "quality mb-10" }, [
  17188. vue.createTextVNode(
  17189. " 品相: 良好(" + vue.toDisplayString($setup.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.averageNum || 0) + ") 、 ",
  17190. 1
  17191. /* TEXT */
  17192. ),
  17193. vue.createElementVNode(
  17194. "text",
  17195. {
  17196. class: vue.normalizeClass($props.item.badNum > 0 ? "color-red" : "")
  17197. },
  17198. "极差(" + vue.toDisplayString($setup.badNum) + ")",
  17199. 3
  17200. /* TEXT, CLASS */
  17201. )
  17202. ]),
  17203. $setup.reasons ? (vue.openBlock(), vue.createElementBlock(
  17204. "view",
  17205. {
  17206. key: 0,
  17207. class: "color-red"
  17208. },
  17209. "原因:" + vue.toDisplayString($setup.reasons),
  17210. 1
  17211. /* TEXT */
  17212. )) : vue.createCommentVNode("v-if", true)
  17213. ])
  17214. ])
  17215. ]);
  17216. }
  17217. const BookItem$2 = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-a629889e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookItem.vue"]]);
  17218. const pinyin = {
  17219. "a": "啊阿锕",
  17220. "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭",
  17221. "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯",
  17222. "ang": "肮昂盎",
  17223. "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖",
  17224. "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃",
  17225. "bai": "白柏百摆佰败拜稗薜掰鞴",
  17226. "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨",
  17227. "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃",
  17228. "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅",
  17229. "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛",
  17230. "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾",
  17231. "ben": "奔苯本笨畚坌锛",
  17232. "beng": "崩绷甭泵蹦迸唪嘣甏",
  17233. "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀",
  17234. "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊",
  17235. "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔",
  17236. "bie": "鳖憋别瘪蹩鳘",
  17237. "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓",
  17238. "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹",
  17239. "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭",
  17240. "ca": "擦嚓礤",
  17241. "cai": "猜裁材才财睬踩采彩菜蔡",
  17242. "can": "餐参蚕残惭惨灿骖璨粲黪",
  17243. "cang": "苍舱仓沧藏伧",
  17244. "cao": "操糙槽曹草艹嘈漕螬艚",
  17245. "ce": "厕策侧册测刂帻恻",
  17246. "ceng": "层蹭噌",
  17247. "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩",
  17248. "chai": "拆柴豺侪茈瘥虿龇",
  17249. "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔",
  17250. "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳",
  17251. "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖",
  17252. "che": "车扯撤掣彻澈坼屮砗",
  17253. "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀",
  17254. "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲",
  17255. "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑",
  17256. "chong": "充冲虫崇宠茺忡憧铳艟",
  17257. "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋",
  17258. "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜",
  17259. "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡",
  17260. "chuang": "疮窗幢床闯创怆",
  17261. "chui": "吹炊捶锤垂陲棰槌",
  17262. "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽",
  17263. "chuo": "戳绰蔟辶辍镞踔龊",
  17264. "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑",
  17265. "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞",
  17266. "cu": "凑粗醋簇猝殂蹙",
  17267. "cuan": "蹿篡窜汆撺昕爨",
  17268. "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹",
  17269. "cun": "村存寸磋忖皴",
  17270. "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜",
  17271. "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑",
  17272. "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛",
  17273. "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪",
  17274. "dang": "当挡党荡档谠凼菪宕砀铛裆",
  17275. "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛",
  17276. "de": "德得的锝",
  17277. "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦",
  17278. "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶",
  17279. "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮",
  17280. "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂",
  17281. "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎",
  17282. "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊",
  17283. "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫",
  17284. "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡",
  17285. "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩",
  17286. "duan": "端短锻段断缎彖椴煅簖",
  17287. "dui": "堆兑队对怼憝碓",
  17288. "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸",
  17289. "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱",
  17290. "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄",
  17291. "en": "恩蒽摁唔嗯",
  17292. "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕",
  17293. "fa": "发罚筏伐乏阀法珐垡砝",
  17294. "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯",
  17295. "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂",
  17296. "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱",
  17297. "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢",
  17298. "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜",
  17299. "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆",
  17300. "ga": "噶嘎蛤尬呷尕尜旮钆",
  17301. "gai": "该改概钙盖溉丐陔垓戤赅胲",
  17302. "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐",
  17303. "gang": "冈刚钢缸肛纲岗港戆罡颃筻",
  17304. "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥",
  17305. "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆",
  17306. "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂",
  17307. "gei": "给",
  17308. "gen": "根跟亘茛哏艮",
  17309. "geng": "耕更庚羹埂耿梗哽赓鲠",
  17310. "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲",
  17311. "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘",
  17312. "gua": "刮瓜剐寡挂褂卦诖呱栝鸹",
  17313. "guai": "乖拐怪哙",
  17314. "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏",
  17315. "guang": "光广逛犷桄胱疒",
  17316. "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜",
  17317. "gun": "辊滚棍丨衮绲磙鲧",
  17318. "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈",
  17319. "ha": "哈",
  17320. "hai": "骸孩海氦亥害骇咴嗨颏醢",
  17321. "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾",
  17322. "hen": "夯痕很狠恨",
  17323. "hang": "杭航沆绗珩桁",
  17324. "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝",
  17325. "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮",
  17326. "hei": "嘿黑",
  17327. "heng": "哼亨横衡恒訇蘅",
  17328. "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓",
  17329. "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺",
  17330. "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛",
  17331. "hua": "花哗华猾滑画划化话劐浍骅桦铧稞",
  17332. "huai": "槐徊怀淮坏还踝",
  17333. "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟",
  17334. "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇",
  17335. "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾",
  17336. "hun": "荤昏婚魂浑混诨馄阍溷缗",
  17337. "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖",
  17338. "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂",
  17339. "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏",
  17340. "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯",
  17341. "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇",
  17342. "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛",
  17343. "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫",
  17344. "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜",
  17345. "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌",
  17346. "jiong": "炯窘冂迥扃",
  17347. "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏",
  17348. "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫",
  17349. "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽",
  17350. "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖",
  17351. "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇",
  17352. "ka": "喀咖卡佧咔胩",
  17353. "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁",
  17354. "kai": "开揩楷凯慨剀垲蒈忾恺铠锎",
  17355. "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰",
  17356. "kang": "康慷糠扛抗亢炕坑伉闶钪",
  17357. "kao": "考拷烤靠尻栲犒铐",
  17358. "ken": "肯啃垦恳垠裉颀",
  17359. "keng": "吭忐铿",
  17360. "kong": "空恐孔控倥崆箜",
  17361. "kou": "抠口扣寇芤蔻叩眍筘",
  17362. "ku": "枯哭窟苦酷库裤刳堀喾绔骷",
  17363. "kua": "夸垮挎跨胯侉",
  17364. "kuai": "块筷侩快蒯郐蒉狯脍",
  17365. "kuan": "宽款髋",
  17366. "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶",
  17367. "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬",
  17368. "kun": "坤昆捆困悃阃琨锟醌鲲髡",
  17369. "kuo": "括扩廓阔蛞",
  17370. "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌",
  17371. "lai": "莱来赖崃徕涞濑赉睐铼癞籁",
  17372. "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴",
  17373. "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂",
  17374. "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪",
  17375. "le": "勒乐肋仂叻嘞泐鳓",
  17376. "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹",
  17377. "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮",
  17378. "leng": "楞愣",
  17379. "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧",
  17380. "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢",
  17381. "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉",
  17382. "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢",
  17383. "lie": "列裂烈劣猎冽埒洌趔躐鬣",
  17384. "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟",
  17385. "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏",
  17386. "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃",
  17387. "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅",
  17388. "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈",
  17389. "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛",
  17390. "luan": "峦孪滦卵乱栾鸾銮",
  17391. "lue": "掠略锊",
  17392. "lun": "轮伦仑沦纶论囵",
  17393. "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒",
  17394. "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽",
  17395. "mai": "埋买麦卖迈脉劢荬咪霾",
  17396. "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔",
  17397. "mang": "芒茫盲忙莽邙漭朦硭蟒",
  17398. "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾",
  17399. "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱",
  17400. "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦",
  17401. "me": "么",
  17402. "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅",
  17403. "men": "门闷们扪玟焖懑钔",
  17404. "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋",
  17405. "mian": "棉眠绵冕免勉娩缅面沔湎腼眄",
  17406. "mie": "蔑灭咩蠛篾",
  17407. "min": "民抿皿敏悯闽苠岷闵泯珉",
  17408. "ming": "明螟鸣铭名命冥茗溟暝瞑酩",
  17409. "miu": "谬",
  17410. "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘",
  17411. "mou": "谋牟某厶哞婺眸鍪",
  17412. "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼",
  17413. "na": "拿哪呐钠那娜纳内捺肭镎衲箬",
  17414. "nai": "氖乃奶耐奈鼐艿萘柰",
  17415. "nan": "南男难囊喃囡楠腩蝻赧",
  17416. "nao": "挠脑恼闹孬垴猱瑙硇铙蛲",
  17417. "ne": "淖呢讷",
  17418. "nei": "馁",
  17419. "nen": "嫩能枘恁",
  17420. "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵",
  17421. "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶",
  17422. "niang": "娘酿",
  17423. "niao": "鸟尿茑嬲脲袅",
  17424. "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑",
  17425. "nin": "您柠",
  17426. "ning": "狞凝宁拧泞佞蓥咛甯聍",
  17427. "niu": "牛扭钮纽狃忸妞蚴",
  17428. "nong": "脓浓农侬",
  17429. "nu": "奴努怒呶帑弩胬孥驽",
  17430. "nv": "女恧钕衄",
  17431. "nuan": "暖",
  17432. "nuenue": "虐",
  17433. "nue": "疟谑",
  17434. "nuo": "挪懦糯诺傩搦喏锘",
  17435. "ou": "哦欧鸥殴藕呕偶沤怄瓯耦",
  17436. "pa": "啪趴爬帕怕琶葩筢",
  17437. "pai": "拍排牌徘湃派俳蒎",
  17438. "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒",
  17439. "pang": "乓庞旁耪胖滂逄",
  17440. "pao": "抛咆刨炮袍跑泡匏狍庖脬疱",
  17441. "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈",
  17442. "pen": "喷盆湓",
  17443. "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛",
  17444. "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔",
  17445. "pian": "篇偏片骗谝骈犏胼褊翩蹁",
  17446. "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵",
  17447. "pie": "撇瞥丿苤氕",
  17448. "pin": "拼频贫品聘拚姘嫔榀牝颦",
  17449. "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆",
  17450. "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸",
  17451. "pou": "剖裒踣",
  17452. "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼",
  17453. "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒",
  17454. "qia": "掐恰洽葜",
  17455. "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝",
  17456. "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄",
  17457. "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒",
  17458. "qie": "切茄且怯窃郄唼惬妾挈锲箧",
  17459. "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾",
  17460. "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥",
  17461. "qiong": "琼穷邛茕穹筇銎",
  17462. "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽",
  17463. "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢",
  17464. "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈",
  17465. "que": "缺炔瘸却鹊榷确雀阙悫",
  17466. "qun": "裙群逡",
  17467. "ran": "然燃冉染苒髯",
  17468. "rang": "瓤壤攘嚷让禳穰",
  17469. "rao": "饶扰绕荛娆桡",
  17470. "ruo": "惹若弱",
  17471. "re": "热偌",
  17472. "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽",
  17473. "reng": "扔仍",
  17474. "ri": "日",
  17475. "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾",
  17476. "rou": "揉柔肉糅蹂鞣",
  17477. "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥",
  17478. "ruan": "软阮朊",
  17479. "rui": "蕊瑞锐芮蕤睿蚋",
  17480. "run": "闰润",
  17481. "sa": "撒洒萨卅仨挲飒",
  17482. "sai": "腮鳃塞赛噻",
  17483. "san": "三叁伞散彡馓氵毵糁霰",
  17484. "sang": "桑嗓丧搡磉颡",
  17485. "sao": "搔骚扫嫂埽臊瘙鳋",
  17486. "se": "瑟色涩啬铩铯穑",
  17487. "sen": "森",
  17488. "seng": "僧",
  17489. "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨",
  17490. "shai": "筛晒酾",
  17491. "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝",
  17492. "shang": "墒伤商赏晌上尚裳垧绱殇熵觞",
  17493. "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄",
  17494. "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝",
  17495. "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃",
  17496. "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙",
  17497. "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺",
  17498. "shou": "收手首守寿授售受瘦兽扌狩绶艏",
  17499. "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬",
  17500. "shua": "刷耍唰涮",
  17501. "shuai": "摔衰甩帅蟀",
  17502. "shuan": "栓拴闩",
  17503. "shuang": "霜双爽孀",
  17504. "shui": "谁水睡税",
  17505. "shun": "吮瞬顺舜恂",
  17506. "shuo": "说硕朔烁蒴搠嗍濯妁槊铄",
  17507. "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥",
  17508. "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦",
  17509. "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋",
  17510. "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣",
  17511. "suan": "酸蒜算",
  17512. "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢",
  17513. "sun": "孙损笋荪狲飧榫跣隼",
  17514. "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧",
  17515. "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓",
  17516. "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐",
  17517. "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃",
  17518. "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣",
  17519. "thang": "倘躺淌",
  17520. "theng": "趟烫",
  17521. "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕",
  17522. "te": "特",
  17523. "teng": "藤腾疼誊滕",
  17524. "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍",
  17525. "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺",
  17526. "tiao": "条迢眺跳佻祧铫窕龆鲦",
  17527. "tie": "贴铁帖萜餮",
  17528. "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆",
  17529. "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼",
  17530. "tou": "偷投头透亠",
  17531. "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴",
  17532. "tuan": "湍团疃",
  17533. "tui": "推颓腿蜕褪退忒煺",
  17534. "tun": "吞屯臀饨暾豚窀",
  17535. "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍",
  17536. "wa": "挖哇蛙洼娃瓦袜佤娲腽",
  17537. "wai": "歪外",
  17538. "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢",
  17539. "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍",
  17540. "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔",
  17541. "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯",
  17542. "weng": "嗡翁瓮蓊蕹",
  17543. "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌",
  17544. "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯",
  17545. "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷",
  17546. "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠",
  17547. "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹",
  17548. "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨",
  17549. "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈",
  17550. "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞",
  17551. "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫",
  17552. "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎",
  17553. "xiong": "兄凶胸匈汹雄熊芎",
  17554. "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹",
  17555. "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑",
  17556. "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃",
  17557. "xue": "靴薛学穴雪血噱泶鳕",
  17558. "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟",
  17559. "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖",
  17560. "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹",
  17561. "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅",
  17562. "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐",
  17563. "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘",
  17564. "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟",
  17565. "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈",
  17566. "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂",
  17567. "yo": "哟唷",
  17568. "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔",
  17569. "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬",
  17570. "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉",
  17571. "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋",
  17572. "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺",
  17573. "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲",
  17574. "za": "匝砸杂拶咂",
  17575. "zai": "栽哉灾宰载再在咱崽甾",
  17576. "zan": "攒暂赞瓒昝簪糌趱錾",
  17577. "zang": "赃脏葬奘戕臧",
  17578. "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫",
  17579. "ze": "责择则泽仄赜啧迮昃笮箦舴",
  17580. "zei": "贼",
  17581. "zen": "怎谮",
  17582. "zeng": "增憎曾赠缯甑罾锃",
  17583. "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄",
  17584. "zhai": "摘斋宅窄债寨砦",
  17585. "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃",
  17586. "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑",
  17587. "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊",
  17588. "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭",
  17589. "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩",
  17590. "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝",
  17591. "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯",
  17592. "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵",
  17593. "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷",
  17594. "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈",
  17595. "zhua": "抓",
  17596. "zhuai": "拽",
  17597. "zhuan": "专砖转撰赚篆抟啭颛",
  17598. "zhuang": "桩庄装妆撞壮状丬",
  17599. "zhui": "椎锥追赘坠缀萑骓缒",
  17600. "zhun": "谆准",
  17601. "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫",
  17602. "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭",
  17603. "zong": "鬃棕踪宗综总纵腙粽",
  17604. "zou": "邹走奏揍鄹鲰",
  17605. "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴",
  17606. "zuan": "钻纂攥缵",
  17607. "zui": "嘴醉最罪",
  17608. "zun": "尊遵撙樽鳟",
  17609. "zuo": "昨左佐柞做作坐座阝阼胙祚酢",
  17610. "cou": "薮楱辏腠",
  17611. "nang": "攮哝囔馕曩",
  17612. "o": "喔",
  17613. "dia": "嗲",
  17614. "chuai": "嘬膪踹",
  17615. "cen": "岑涔",
  17616. "diu": "铥",
  17617. "nou": "耨",
  17618. "fou": "缶",
  17619. "bia": "髟"
  17620. };
  17621. const _ToPinyin = class _ToPinyin {
  17622. constructor() {
  17623. }
  17624. static getInstance() {
  17625. if (!this.instance) {
  17626. this.instance = new _ToPinyin();
  17627. }
  17628. return this.instance;
  17629. }
  17630. // 转首字母 this.chineseToInitials(this.chineseToPinYin('你好')) this.chineseToInitials('NiHao')
  17631. chineseToInitials(word) {
  17632. let SX = "";
  17633. for (var i = 0; i < word.length; i++) {
  17634. var c = word.charAt(i);
  17635. if (/^[A-Z]+$/.test(c)) {
  17636. SX += c;
  17637. }
  17638. }
  17639. return SX;
  17640. }
  17641. // 转拼音
  17642. chineseToPinYin(l1) {
  17643. var l2 = l1.length;
  17644. var I1 = "";
  17645. var reg = new RegExp("[a-zA-Z0-9]");
  17646. for (var i = 0; i < l2; i++) {
  17647. var val = l1.substr(i, 1);
  17648. var name = this.arraySearch(val, pinyin);
  17649. if (reg.test(val)) {
  17650. I1 += val.toLocaleUpperCase();
  17651. } else if (name !== false) {
  17652. I1 += name;
  17653. }
  17654. }
  17655. I1 = I1.replace(/ /g, "-");
  17656. while (I1.indexOf("--") > 0) {
  17657. I1 = I1.replace("--", "-");
  17658. }
  17659. return I1;
  17660. }
  17661. arraySearch(l1, l2) {
  17662. for (var name in pinyin) {
  17663. if (pinyin[name].indexOf(l1) !== -1) {
  17664. return this.ucfirst(name);
  17665. }
  17666. }
  17667. return false;
  17668. }
  17669. ucfirst(l1) {
  17670. if (l1.length > 0) {
  17671. var first = l1.substr(0, 1).toUpperCase();
  17672. var spare = l1.substr(1, l1.length);
  17673. return first + spare;
  17674. }
  17675. }
  17676. };
  17677. __publicField(_ToPinyin, "instance");
  17678. let ToPinyin = _ToPinyin;
  17679. const toPinyin = ToPinyin.getInstance();
  17680. const _sfc_main$12 = {
  17681. __name: "BookInfo",
  17682. props: {
  17683. bookList: {
  17684. type: Array,
  17685. default: () => []
  17686. },
  17687. detail: {
  17688. type: Object,
  17689. default: () => ({})
  17690. },
  17691. isShow: {
  17692. type: Boolean,
  17693. default: true
  17694. }
  17695. },
  17696. emits: ["get-all-firstLetter"],
  17697. setup(__props, { expose: __expose, emit: __emit }) {
  17698. __expose();
  17699. const props2 = __props;
  17700. const emit2 = __emit;
  17701. const auditNum = vue.computed(() => {
  17702. return props2.bookList.reduce((total, item) => {
  17703. var _a;
  17704. return total + ((_a = item.auditCommentList) == null ? void 0 : _a.length) || 0;
  17705. }, 0);
  17706. });
  17707. function handleBookClick(book) {
  17708. if (props2.detail.status == 10) {
  17709. uni.$u.ttsModule.speak("此订单已审核");
  17710. return;
  17711. }
  17712. uni.navigateTo({
  17713. url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
  17714. });
  17715. uni.setStorageSync("auditBook", book);
  17716. }
  17717. function getAuditCateNum(cate) {
  17718. let auditList = [];
  17719. props2.bookList.forEach((v) => {
  17720. auditList.push(...v.auditCommentList || []);
  17721. });
  17722. return auditList.filter((v) => v.sts == cate).length;
  17723. }
  17724. const formatBookList = (list) => {
  17725. const poorBooks = { title: "极差", list: [], backgroundColor: "#de868f", id: "poor" };
  17726. const goodBooks = { title: "良好", list: [], backgroundColor: "#81b337", id: "good" };
  17727. const otherBooks = [];
  17728. const allFirstLetter = [];
  17729. const handleBookCategorization = (book) => {
  17730. let firstLetter;
  17731. let firstChineseChar = null;
  17732. for (let i = 0; i < book.bookName.length; i++) {
  17733. const char = book.bookName.charAt(i);
  17734. if (/^[\u4E00-\u9FA5]$/.test(char)) {
  17735. firstChineseChar = char;
  17736. break;
  17737. }
  17738. }
  17739. if (firstChineseChar) {
  17740. firstLetter = toPinyin.chineseToInitials(toPinyin.chineseToPinYin(firstChineseChar));
  17741. } else {
  17742. const char = book.bookName.charAt(0);
  17743. if (/^[A-Za-z]$/.test(char)) {
  17744. firstLetter = char.toUpperCase();
  17745. } else {
  17746. firstLetter = char;
  17747. }
  17748. }
  17749. let bool = otherBooks.some((item) => item.title == firstLetter);
  17750. if (!bool) {
  17751. otherBooks.push({ id: firstLetter, title: firstLetter, list: [{ ...book }] });
  17752. allFirstLetter.push(firstLetter);
  17753. emit2("get-all-firstLetter", allFirstLetter);
  17754. } else {
  17755. otherBooks.find((item) => item.title == firstLetter).list.push(book);
  17756. }
  17757. };
  17758. list.forEach((book) => {
  17759. var _a, _b, _c;
  17760. book.goodNum = ((_a = book.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17761. book.badNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((v) => v.sts == 3).length) || 0;
  17762. const totalAudited = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((v) => v.sts !== 0).length) || 0;
  17763. const isFullyAudited = totalAudited === book.num;
  17764. if (isFullyAudited) {
  17765. if (book.auditCommentList.some((v) => v.sts === 3)) {
  17766. poorBooks.list.push(book);
  17767. } else if (book.auditCommentList.every((v) => v.sts === 1)) {
  17768. goodBooks.list.push(book);
  17769. } else {
  17770. handleBookCategorization(book);
  17771. }
  17772. } else {
  17773. handleBookCategorization(book);
  17774. }
  17775. });
  17776. return { poorBooks, goodBooks, otherBooks };
  17777. };
  17778. const formatList = vue.ref([]);
  17779. vue.watch(() => props2.bookList, (newVal) => {
  17780. let { poorBooks, goodBooks, otherBooks } = formatBookList(newVal);
  17781. otherBooks.sort((a, b) => a.id.localeCompare(b.id));
  17782. let poor = poorBooks.list.length > 0 ? poorBooks : {};
  17783. let good = goodBooks.list.length > 0 ? goodBooks : {};
  17784. formatList.value = [...otherBooks, poor, good];
  17785. }, { immediate: true, deep: true });
  17786. 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() {
  17787. return toPinyin;
  17788. } };
  17789. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17790. return __returned__;
  17791. }
  17792. };
  17793. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  17794. return vue.openBlock(), vue.createElementBlock("view", { class: "book-info" }, [
  17795. $props.isShow ? (vue.openBlock(), vue.createElementBlock(
  17796. vue.Fragment,
  17797. { key: 0 },
  17798. [
  17799. vue.createElementVNode(
  17800. "view",
  17801. {
  17802. class: "font-bold mt-12 mb-10",
  17803. style: { "padding": "0 20rpx" }
  17804. },
  17805. vue.toDisplayString($props.bookList.length) + "条记录,共" + vue.toDisplayString($props.detail.totalNum) + "本,已审" + vue.toDisplayString($setup.auditNum || 0) + "本 ",
  17806. 1
  17807. /* TEXT */
  17808. ),
  17809. vue.createElementVNode(
  17810. "view",
  17811. {
  17812. class: "font-light",
  17813. style: { "padding": "0 20rpx" }
  17814. },
  17815. " 其中已审:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般0本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  17816. 1
  17817. /* TEXT */
  17818. )
  17819. ],
  17820. 64
  17821. /* STABLE_FRAGMENT */
  17822. )) : vue.createCommentVNode("v-if", true),
  17823. (vue.openBlock(true), vue.createElementBlock(
  17824. vue.Fragment,
  17825. null,
  17826. vue.renderList($setup.formatList, (item) => {
  17827. return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
  17828. class: "book-info-item bg-white mt-12",
  17829. style: vue.normalizeStyle({ backgroundColor: item.backgroundColor }),
  17830. key: item.title,
  17831. id: item.id
  17832. }, [
  17833. vue.createElementVNode(
  17834. "view",
  17835. { class: "book-info-item-title" },
  17836. vue.toDisplayString(item.title),
  17837. 1
  17838. /* TEXT */
  17839. ),
  17840. vue.createElementVNode("view", { class: "book-info-item-list" }, [
  17841. (vue.openBlock(true), vue.createElementBlock(
  17842. vue.Fragment,
  17843. null,
  17844. vue.renderList(item.list, (book) => {
  17845. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  17846. key: book.bookId,
  17847. item: book,
  17848. onClick: ($event) => $setup.handleBookClick(book)
  17849. }, null, 8, ["item", "onClick"]);
  17850. }),
  17851. 128
  17852. /* KEYED_FRAGMENT */
  17853. ))
  17854. ])
  17855. ], 12, ["id"])), [
  17856. [vue.vShow, item == null ? void 0 : item.title]
  17857. ]);
  17858. }),
  17859. 128
  17860. /* KEYED_FRAGMENT */
  17861. ))
  17862. ]);
  17863. }
  17864. const BookInfo = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-8c7d14f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookInfo.vue"]]);
  17865. const props$8 = {
  17866. props: {
  17867. // 图片地址
  17868. src: {
  17869. type: String,
  17870. default: props$E.image.src
  17871. },
  17872. // 裁剪模式
  17873. mode: {
  17874. type: String,
  17875. default: props$E.image.mode
  17876. },
  17877. // 宽度,单位任意
  17878. width: {
  17879. type: [String, Number],
  17880. default: props$E.image.width
  17881. },
  17882. // 高度,单位任意
  17883. height: {
  17884. type: [String, Number],
  17885. default: props$E.image.height
  17886. },
  17887. // 图片形状,circle-圆形,square-方形
  17888. shape: {
  17889. type: String,
  17890. default: props$E.image.shape
  17891. },
  17892. // 圆角,单位任意
  17893. radius: {
  17894. type: [String, Number],
  17895. default: props$E.image.radius
  17896. },
  17897. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  17898. lazyLoad: {
  17899. type: Boolean,
  17900. default: props$E.image.lazyLoad
  17901. },
  17902. // 开启长按图片显示识别微信小程序码菜单
  17903. showMenuByLongpress: {
  17904. type: Boolean,
  17905. default: props$E.image.showMenuByLongpress
  17906. },
  17907. // 加载中的图标,或者小图片
  17908. loadingIcon: {
  17909. type: String,
  17910. default: props$E.image.loadingIcon
  17911. },
  17912. // 加载失败的图标,或者小图片
  17913. errorIcon: {
  17914. type: String,
  17915. default: props$E.image.errorIcon
  17916. },
  17917. // 是否显示加载中的图标或者自定义的slot
  17918. showLoading: {
  17919. type: Boolean,
  17920. default: props$E.image.showLoading
  17921. },
  17922. // 是否显示加载错误的图标或者自定义的slot
  17923. showError: {
  17924. type: Boolean,
  17925. default: props$E.image.showError
  17926. },
  17927. // 是否需要淡入效果
  17928. fade: {
  17929. type: Boolean,
  17930. default: props$E.image.fade
  17931. },
  17932. // 只支持网络资源,只对微信小程序有效
  17933. webp: {
  17934. type: Boolean,
  17935. default: props$E.image.webp
  17936. },
  17937. // 过渡时间,单位ms
  17938. duration: {
  17939. type: [String, Number],
  17940. default: props$E.image.duration
  17941. },
  17942. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  17943. bgColor: {
  17944. type: String,
  17945. default: props$E.image.bgColor
  17946. }
  17947. }
  17948. };
  17949. const _sfc_main$11 = {
  17950. name: "u-image",
  17951. mixins: [mpMixin, mixin, props$8],
  17952. data() {
  17953. return {
  17954. // 图片是否加载错误,如果是,则显示错误占位图
  17955. isError: false,
  17956. // 初始化组件时,默认为加载中状态
  17957. loading: true,
  17958. // 不透明度,为了实现淡入淡出的效果
  17959. opacity: 1,
  17960. // 过渡时间,因为props的值无法修改,故需要一个中间值
  17961. durationTime: this.duration,
  17962. // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
  17963. backgroundStyle: {},
  17964. // 用于fade模式的控制组件显示与否
  17965. show: false
  17966. };
  17967. },
  17968. watch: {
  17969. src: {
  17970. immediate: true,
  17971. handler(n) {
  17972. if (!n) {
  17973. this.isError = true;
  17974. } else {
  17975. this.isError = false;
  17976. this.loading = true;
  17977. }
  17978. }
  17979. }
  17980. },
  17981. computed: {
  17982. wrapStyle() {
  17983. let style = {};
  17984. style.width = this.$u.addUnit(this.width);
  17985. style.height = this.$u.addUnit(this.height);
  17986. style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius);
  17987. style.overflow = this.radius > 0 ? "hidden" : "visible";
  17988. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  17989. }
  17990. },
  17991. mounted() {
  17992. this.show = true;
  17993. },
  17994. emits: ["click", "error", "load"],
  17995. methods: {
  17996. // 点击图片
  17997. onClick() {
  17998. this.$emit("click");
  17999. },
  18000. // 图片加载失败
  18001. onErrorHandler(err) {
  18002. this.loading = false;
  18003. this.isError = true;
  18004. this.$emit("error", err);
  18005. },
  18006. // 图片加载完成,标记loading结束
  18007. onLoadHandler(event) {
  18008. this.loading = false;
  18009. this.isError = false;
  18010. this.$emit("load", event);
  18011. this.removeBgColor();
  18012. },
  18013. // 移除图片的背景色
  18014. removeBgColor() {
  18015. this.backgroundStyle = {
  18016. backgroundColor: "transparent"
  18017. };
  18018. }
  18019. }
  18020. };
  18021. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  18022. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18023. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  18024. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  18025. mode: "fade",
  18026. show: $data.show,
  18027. duration: _ctx.fade ? 1e3 : 0
  18028. }, {
  18029. default: vue.withCtx(() => [
  18030. vue.createElementVNode(
  18031. "view",
  18032. {
  18033. class: "u-image",
  18034. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
  18035. style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
  18036. },
  18037. [
  18038. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  18039. key: 0,
  18040. src: _ctx.src,
  18041. mode: _ctx.mode,
  18042. onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
  18043. onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
  18044. "show-menu-by-longpress": _ctx.showMenuByLongpress,
  18045. "lazy-load": _ctx.lazyLoad,
  18046. class: "u-image__image",
  18047. style: vue.normalizeStyle({
  18048. borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius),
  18049. width: _ctx.$u.addUnit(_ctx.width),
  18050. height: _ctx.$u.addUnit(_ctx.height)
  18051. })
  18052. }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
  18053. _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  18054. "view",
  18055. {
  18056. key: 1,
  18057. class: "u-image__loading",
  18058. style: vue.normalizeStyle({
  18059. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18060. backgroundColor: this.bgColor,
  18061. width: _ctx.$u.addUnit(_ctx.width),
  18062. height: _ctx.$u.addUnit(_ctx.height)
  18063. })
  18064. },
  18065. [
  18066. vue.renderSlot(_ctx.$slots, "loading", {}, () => [
  18067. vue.createVNode(_component_u_icon, {
  18068. name: _ctx.loadingIcon,
  18069. width: _ctx.width,
  18070. height: _ctx.height
  18071. }, null, 8, ["name", "width", "height"])
  18072. ], true)
  18073. ],
  18074. 4
  18075. /* STYLE */
  18076. )) : vue.createCommentVNode("v-if", true),
  18077. _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
  18078. "view",
  18079. {
  18080. key: 2,
  18081. class: "u-image__error",
  18082. style: vue.normalizeStyle({
  18083. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18084. width: _ctx.$u.addUnit(_ctx.width),
  18085. height: _ctx.$u.addUnit(_ctx.height)
  18086. })
  18087. },
  18088. [
  18089. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  18090. vue.createVNode(_component_u_icon, {
  18091. name: _ctx.errorIcon,
  18092. width: _ctx.width,
  18093. height: _ctx.height
  18094. }, null, 8, ["name", "width", "height"])
  18095. ], true)
  18096. ],
  18097. 4
  18098. /* STYLE */
  18099. )) : vue.createCommentVNode("v-if", true)
  18100. ],
  18101. 4
  18102. /* STYLE */
  18103. )
  18104. ]),
  18105. _: 3
  18106. /* FORWARDED */
  18107. }, 8, ["show", "duration"]);
  18108. }
  18109. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-abebd402"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-image/u-image.vue"]]);
  18110. const _sfc_main$10 = {
  18111. __name: "FileInfo",
  18112. props: {
  18113. orderId: {
  18114. type: String,
  18115. default: ""
  18116. },
  18117. annexType: {
  18118. type: Number,
  18119. default: 1
  18120. },
  18121. isbn: {
  18122. type: String,
  18123. default: ""
  18124. }
  18125. },
  18126. setup(__props, { expose: __expose }) {
  18127. __expose();
  18128. const form = vue.ref({
  18129. imgInfo: [],
  18130. remark: ""
  18131. });
  18132. const props2 = __props;
  18133. const fileList = vue.ref([]);
  18134. function getFileList() {
  18135. uni.$u.http.get("/app/orderinfo/getOrderAnnexList", {
  18136. params: {
  18137. orderId: props2.orderId,
  18138. annexType: props2.annexType,
  18139. isbn: props2.isbn
  18140. }
  18141. }).then((res2) => {
  18142. if (res2.code == 200) {
  18143. fileList.value = res2.data;
  18144. }
  18145. });
  18146. }
  18147. getFileList();
  18148. const handleUpload = () => {
  18149. formatAppLog("log", "at pages/index/detail/components/FileInfo.vue:73", form.value);
  18150. let data = {
  18151. orderId: props2.orderId,
  18152. annexType: props2.annexType,
  18153. isbn: props2.isbn,
  18154. ...form.value
  18155. };
  18156. uni.$u.http.post("/app/orderinfo/setOrderAnnex", data).then((res2) => {
  18157. if (res2.code == 200) {
  18158. uni.$u.toast("上传成功");
  18159. form.value.imgInfo = [];
  18160. form.value.remark = "";
  18161. getFileList();
  18162. } else {
  18163. uni.$u.toast(res2.msg);
  18164. }
  18165. });
  18166. };
  18167. const __returned__ = { form, props: props2, fileList, getFileList, handleUpload, ref: vue.ref, cyUpload };
  18168. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18169. return __returned__;
  18170. }
  18171. };
  18172. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  18173. var _a;
  18174. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  18175. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  18176. const _component_u_image = resolveEasycom(vue.resolveDynamicComponent("u-image"), __easycom_2$1);
  18177. return vue.openBlock(), vue.createElementBlock("view", { class: "file-info bg-white" }, [
  18178. vue.createElementVNode("view", { class: "file-info-container" }, [
  18179. vue.createVNode($setup["cyUpload"], {
  18180. filename: $setup.form.imgInfo,
  18181. "onUpdate:filename": _cache[0] || (_cache[0] = ($event) => $setup.form.imgInfo = $event),
  18182. limit: 3
  18183. }, null, 8, ["filename"]),
  18184. vue.createVNode(_component_u_textarea, {
  18185. modelValue: $setup.form.remark,
  18186. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  18187. placeholder: "上传说明...",
  18188. autoHeight: "",
  18189. style: { "min-height": "60px" }
  18190. }, null, 8, ["modelValue"]),
  18191. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-c" }, [
  18192. vue.createVNode(_component_u_button, {
  18193. class: "mt-24",
  18194. type: "primary",
  18195. onClick: $setup.handleUpload
  18196. }, {
  18197. default: vue.withCtx(() => [
  18198. vue.createTextVNode("上传(最多上传3张)")
  18199. ]),
  18200. _: 1
  18201. /* STABLE */
  18202. })
  18203. ])
  18204. ]),
  18205. vue.createElementVNode("view", { class: "file-info-list" }, [
  18206. vue.createElementVNode("view", { class: "file-info-list-title text-center" }, "已上传记录"),
  18207. !((_a = $setup.fileList) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  18208. key: 0,
  18209. class: "file-info-list-content mt-24 mb-24 text-center"
  18210. }, "还没有上传记录")) : (vue.openBlock(true), vue.createElementBlock(
  18211. vue.Fragment,
  18212. { key: 1 },
  18213. vue.renderList($setup.fileList, (item) => {
  18214. return vue.openBlock(), vue.createElementBlock("view", {
  18215. class: "file-info-item",
  18216. key: item.id
  18217. }, [
  18218. vue.createElementVNode("view", { class: "file-info-item-img flex flex-a-c" }, [
  18219. (vue.openBlock(true), vue.createElementBlock(
  18220. vue.Fragment,
  18221. null,
  18222. vue.renderList(item.imgInfo, (img) => {
  18223. return vue.openBlock(), vue.createBlock(_component_u_image, {
  18224. src: img,
  18225. width: "90",
  18226. height: "90",
  18227. style: { "margin-right": "10px" }
  18228. }, null, 8, ["src"]);
  18229. }),
  18230. 256
  18231. /* UNKEYED_FRAGMENT */
  18232. ))
  18233. ]),
  18234. vue.createElementVNode("view", { class: "file-info-item-info mt-10 font-14" }, [
  18235. vue.createElementVNode(
  18236. "view",
  18237. { class: "file-info-item-info-name" },
  18238. "上传说明:" + vue.toDisplayString(item.remark),
  18239. 1
  18240. /* TEXT */
  18241. ),
  18242. vue.createElementVNode("view", { class: "file-info-item-info-name mt-10" }, [
  18243. vue.createElementVNode(
  18244. "text",
  18245. null,
  18246. vue.toDisplayString(item.createTime),
  18247. 1
  18248. /* TEXT */
  18249. ),
  18250. vue.createElementVNode(
  18251. "text",
  18252. { class: "ml-20" },
  18253. vue.toDisplayString(item.createName),
  18254. 1
  18255. /* TEXT */
  18256. )
  18257. ])
  18258. ])
  18259. ]);
  18260. }),
  18261. 128
  18262. /* KEYED_FRAGMENT */
  18263. ))
  18264. ])
  18265. ]);
  18266. }
  18267. const FileInfo = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-b4cf7c83"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/FileInfo.vue"]]);
  18268. const _sfc_main$$ = {
  18269. __name: "index",
  18270. setup(__props, { expose: __expose }) {
  18271. __expose();
  18272. const showAuditorSelector = vue.ref(false);
  18273. const selectedAuditor = vue.ref({});
  18274. const handleAuditorSelected = (auditor) => {
  18275. selectedAuditor.value = auditor;
  18276. orderDetail.value.auditUserId = auditor.userId;
  18277. orderDetail.value.auditUserName = auditor.userName;
  18278. };
  18279. const toView = vue.ref("");
  18280. function scrollToView(to) {
  18281. toView.value = to;
  18282. uni.pageScrollTo({
  18283. selector: "#" + to,
  18284. duration: 200
  18285. });
  18286. }
  18287. function scrollToTop() {
  18288. uni.pageScrollTo({
  18289. top: 0,
  18290. duration: 200
  18291. });
  18292. }
  18293. function handleBindCode() {
  18294. uni.$u.toast("暂无开发");
  18295. }
  18296. const list = vue.ref(["图书清单", "物流信息", "上传附件"]);
  18297. const current = vue.ref(0);
  18298. const handleSectionChange = (index2) => {
  18299. current.value = index2;
  18300. };
  18301. const allLetters = vue.ref([]);
  18302. function onGetAllFirstLetter(data) {
  18303. allLetters.value = data;
  18304. }
  18305. function handleLogisticsConfirm() {
  18306. uni.showModal({
  18307. title: "提示",
  18308. content: "是否确认物流签收?",
  18309. success: (res2) => {
  18310. if (res2.confirm) {
  18311. uni.showLoading({ title: "加载中...", mask: true });
  18312. uni.$u.http.post("/app/orderinfo/signLogistics", {
  18313. params: {
  18314. searchType: 1,
  18315. "search": orderId.value
  18316. }
  18317. }).then((res3) => {
  18318. if (res3.code == 200) {
  18319. uni.showToast({ title: "签收成功", icon: "none" });
  18320. uni.$u.ttsModule.speak("签收成功");
  18321. uni.navigateBack();
  18322. }
  18323. }).finally(() => {
  18324. uni.hideLoading();
  18325. });
  18326. }
  18327. }
  18328. });
  18329. }
  18330. function handleConfirm() {
  18331. uni.showLoading({ title: "加载中...", mask: true });
  18332. uni.$u.http.post("/app/orderinfo/confirmOrder", {
  18333. searchType: 1,
  18334. "search": orderDetail.value.orderId
  18335. }).then((res2) => {
  18336. if (res2.code == 200) {
  18337. uni.showToast({ title: "确认收货成功", icon: "none" });
  18338. uni.$u.ttsModule.speak("确认收货成功");
  18339. getOrderDetail();
  18340. }
  18341. }).finally(() => {
  18342. uni.hideLoading();
  18343. });
  18344. }
  18345. function handleComplete() {
  18346. let bookList = orderDetail.value.detailVoList;
  18347. let bool = bookList.some((item) => {
  18348. var _a;
  18349. return ((_a = item.auditCommentList) == null ? void 0 : _a.length) < item.num;
  18350. });
  18351. if (bool) {
  18352. let text = "还有未审核的书";
  18353. uni.$u.toast(text);
  18354. uni.$u.ttsModule.speak(text);
  18355. return;
  18356. } else {
  18357. uni.$u.http.post("/app/orderinfo/checkOrderFinish", {
  18358. checkUserId: orderDetail.value.auditUserId,
  18359. "orderId": orderDetail.value.orderId
  18360. }).then((res2) => {
  18361. if (res2.code == 200) {
  18362. uni.showToast({ title: "审核完成", icon: "none" });
  18363. uni.$u.ttsModule.speak("审核完成");
  18364. uni.navigateBack();
  18365. }
  18366. });
  18367. }
  18368. }
  18369. const orderDetail = vue.ref({ status: 0 });
  18370. function getOrderDetail() {
  18371. if (!orderId.value)
  18372. return;
  18373. uni.showLoading({
  18374. title: "加载中...",
  18375. mask: true
  18376. });
  18377. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  18378. params: {
  18379. searchType: 1,
  18380. "search": orderId.value
  18381. }
  18382. }).then((res2) => {
  18383. if (res2.code == 200) {
  18384. orderDetail.value = res2.data;
  18385. if (isOnLoad.value) {
  18386. if (res2.data.manageRemark.length > 0 && res2.data.status < 10) {
  18387. uni.$u.ttsModule.speak("此订单有备注信息,请注意查看");
  18388. }
  18389. if (res2.data.warnArea && res2.data.warnArea.length > 0) {
  18390. let text = `此订单来源于${res2.data.warnArea}`;
  18391. uni.$u.ttsModule.speak(text);
  18392. }
  18393. isOnLoad.value = false;
  18394. if (res2.data.auditUserId) {
  18395. let auditUserInfo = {
  18396. userName: res2.data.auditUserName,
  18397. userId: res2.data.auditUserId
  18398. };
  18399. uni.setStorageSync("checkUserInfo", auditUserInfo);
  18400. } else {
  18401. let userInfo = uni.getStorageSync("userInfo");
  18402. if (userInfo) {
  18403. orderDetail.value.auditUserName = userInfo.userName;
  18404. orderDetail.value.auditUserId = userInfo.userId;
  18405. uni.setStorageSync("checkUserInfo", {
  18406. userName: userInfo.userName,
  18407. userId: userInfo.userId
  18408. });
  18409. }
  18410. }
  18411. }
  18412. } else {
  18413. uni.$u.toast(res2.msg);
  18414. }
  18415. }).finally(() => {
  18416. uni.hideLoading();
  18417. });
  18418. }
  18419. function checkIsbn(isbn) {
  18420. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  18421. if (isbn13Regex.test(isbn)) {
  18422. return true;
  18423. }
  18424. return false;
  18425. }
  18426. function handleScan(isbn) {
  18427. if (!checkIsbn(isbn)) {
  18428. let text = `不是正确的ISBN码`;
  18429. uni.$u.ttsModule.speak(text);
  18430. return;
  18431. }
  18432. if (orderDetail.value.status == 10) {
  18433. uni.$u.ttsModule.speak("此订单已审核");
  18434. return;
  18435. }
  18436. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  18437. if (isbns.includes(isbn)) {
  18438. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  18439. if (book.suit == 1) {
  18440. let text = `${isbn}请注意套装书是否齐全`;
  18441. uni.$u.ttsModule.speak(text);
  18442. }
  18443. if (book.bookWarn == 1) {
  18444. let text = `请注意${isbn}需要取出`;
  18445. uni.$u.ttsModule.speak(text);
  18446. }
  18447. uni.navigateTo({
  18448. url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
  18449. });
  18450. uni.setStorageSync("auditBook", book);
  18451. uni.setStorageSync("orderDetail", orderDetail.value);
  18452. } else {
  18453. let text = `此订单中不存在${isbn}这本书 `;
  18454. uni.$u.ttsModule.speak(text);
  18455. }
  18456. }
  18457. function handleScanCode() {
  18458. uni.scanCode({
  18459. success: (res2) => {
  18460. res2.result && handleScan(res2.result);
  18461. }
  18462. });
  18463. }
  18464. const orderId = vue.ref("");
  18465. const isOnLoad = vue.ref(false);
  18466. const type2 = vue.ref(1);
  18467. onLoad((option) => {
  18468. orderId.value = option.id;
  18469. getOrderDetail();
  18470. isOnLoad.value = true;
  18471. type2.value = option.type || 1;
  18472. uni.removeStorageSync("scannedBooks");
  18473. uni.$u.useGlobalEvent((e) => {
  18474. if (e.barcode) {
  18475. handleScan(e.barcode);
  18476. }
  18477. });
  18478. });
  18479. onShow(() => {
  18480. getOrderDetail();
  18481. });
  18482. const __returned__ = { showAuditorSelector, selectedAuditor, handleAuditorSelected, toView, scrollToView, scrollToTop, handleBindCode, list, current, handleSectionChange, allLetters, onGetAllFirstLetter, handleLogisticsConfirm, handleConfirm, handleComplete, orderDetail, getOrderDetail, checkIsbn, handleScan, handleScanCode, orderId, isOnLoad, type: type2, ref: vue.ref, get onLoad() {
  18483. return onLoad;
  18484. }, get onShow() {
  18485. return onShow;
  18486. }, AuditorSelector, OrderInfo, UserInfoCard, LogisticsTimeline, BookInfo, FileInfo };
  18487. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18488. return __returned__;
  18489. }
  18490. };
  18491. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  18492. var _a;
  18493. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  18494. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18495. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  18496. return vue.openBlock(), vue.createElementBlock(
  18497. "view",
  18498. {
  18499. class: vue.normalizeClass(["order-detail", { "fixed-bottom-2": $setup.type == 2 }])
  18500. },
  18501. [
  18502. vue.createElementVNode("scroll-view", {
  18503. class: "scroller",
  18504. "scroll-into-view": $setup.toView,
  18505. "scroll-y": "true",
  18506. "scroll-with-animation": "true"
  18507. }, [
  18508. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-b bg-white bind-audit mb-16" }, [
  18509. vue.createElementVNode("text", null, "绑定审核员"),
  18510. vue.createElementVNode(
  18511. "text",
  18512. { class: "text-center flex-1" },
  18513. vue.toDisplayString($setup.orderDetail.auditUserName || ((_a = $setup.selectedAuditor) == null ? void 0 : _a.userName) || ""),
  18514. 1
  18515. /* TEXT */
  18516. ),
  18517. vue.createElementVNode("text", {
  18518. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showAuditorSelector = true),
  18519. class: "color-primary"
  18520. }, "绑定")
  18521. ]),
  18522. vue.createVNode($setup["OrderInfo"], {
  18523. detail: $setup.orderDetail,
  18524. onRefresh: $setup.getOrderDetail
  18525. }, null, 8, ["detail"]),
  18526. vue.createVNode($setup["UserInfoCard"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  18527. vue.createElementVNode("view", {
  18528. class: "mt-16",
  18529. style: { "padding": "0 6rpx" }
  18530. }, [
  18531. vue.createVNode(_component_u_subsection, {
  18532. list: $setup.list,
  18533. mode: "subsection",
  18534. current: $setup.current,
  18535. onChange: $setup.handleSectionChange
  18536. }, null, 8, ["list", "current"]),
  18537. $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["BookInfo"], {
  18538. key: 0,
  18539. bookList: $setup.orderDetail.detailVoList,
  18540. detail: $setup.orderDetail,
  18541. onGetAllFirstLetter: $setup.onGetAllFirstLetter
  18542. }, null, 8, ["bookList", "detail"])) : vue.createCommentVNode("v-if", true),
  18543. $setup.current == 1 ? (vue.openBlock(), vue.createBlock($setup["LogisticsTimeline"], {
  18544. key: 1,
  18545. list: $setup.orderDetail.trackingVoList
  18546. }, null, 8, ["list"])) : vue.createCommentVNode("v-if", true),
  18547. $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
  18548. key: 2,
  18549. orderId: $setup.orderDetail.orderId
  18550. }, null, 8, ["orderId"])) : vue.createCommentVNode("v-if", true)
  18551. ])
  18552. ], 8, ["scroll-into-view"]),
  18553. vue.createElementVNode("view", { class: "fixed-left" }, [
  18554. vue.createElementVNode("view", {
  18555. class: "bind-code common-bg",
  18556. style: { "margin-bottom": "30px", "padding": "20rpx" },
  18557. onClick: $setup.handleBindCode
  18558. }, "绑码 "),
  18559. vue.createElementVNode("view", { class: "common-bg flex flex-a-c flex-j-c flex-d" }, [
  18560. vue.createElementVNode("view", {
  18561. class: "book-status-item",
  18562. onClick: _cache[1] || (_cache[1] = ($event) => $setup.scrollToView("good"))
  18563. }, "良好"),
  18564. vue.createElementVNode("view", {
  18565. class: "book-status-item item-center",
  18566. onClick: _cache[2] || (_cache[2] = ($event) => $setup.scrollToView("average"))
  18567. }, "一般"),
  18568. vue.createElementVNode("view", {
  18569. class: "book-status-item",
  18570. onClick: _cache[3] || (_cache[3] = ($event) => $setup.scrollToView("poor"))
  18571. }, "极差")
  18572. ])
  18573. ]),
  18574. vue.createElementVNode("view", { class: "fixed-right" }, [
  18575. vue.createElementVNode("view", { class: "letter-bg flex flex-a-c flex-j-c flex-d" }, [
  18576. vue.createElementVNode("view", { class: "letter-item" }, [
  18577. vue.createVNode(_component_u_icon, {
  18578. name: "arrow-up-fill",
  18579. size: "20",
  18580. color: "#ffffff",
  18581. onClick: $setup.scrollToTop
  18582. })
  18583. ]),
  18584. (vue.openBlock(true), vue.createElementBlock(
  18585. vue.Fragment,
  18586. null,
  18587. vue.renderList($setup.allLetters, (item) => {
  18588. return vue.openBlock(), vue.createElementBlock("view", {
  18589. class: "letter-item",
  18590. onClick: ($event) => $setup.scrollToView(item)
  18591. }, vue.toDisplayString(item), 9, ["onClick"]);
  18592. }),
  18593. 256
  18594. /* UNKEYED_FRAGMENT */
  18595. ))
  18596. ])
  18597. ]),
  18598. $setup.type != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  18599. key: 0,
  18600. class: "common-bg fixed-bottom"
  18601. }, [
  18602. $setup.orderDetail.status == 5 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18603. key: 0,
  18604. type: "warning",
  18605. size: "large",
  18606. onClick: $setup.handleLogisticsConfirm
  18607. }, {
  18608. default: vue.withCtx(() => [
  18609. vue.createTextVNode("物流签收")
  18610. ]),
  18611. _: 1
  18612. /* STABLE */
  18613. })) : vue.createCommentVNode("v-if", true),
  18614. $setup.orderDetail.status == 6 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18615. key: 1,
  18616. type: "primary",
  18617. size: "large",
  18618. onClick: $setup.handleConfirm
  18619. }, {
  18620. default: vue.withCtx(() => [
  18621. vue.createTextVNode("确认收货")
  18622. ]),
  18623. _: 1
  18624. /* STABLE */
  18625. })) : vue.createCommentVNode("v-if", true),
  18626. $setup.orderDetail.status == 8 || $setup.orderDetail.status == 9 || $setup.orderDetail.status == 10 ? (vue.openBlock(), vue.createElementBlock(
  18627. vue.Fragment,
  18628. { key: 2 },
  18629. [
  18630. vue.createVNode(_component_u_button, {
  18631. type: "warning",
  18632. size: "large",
  18633. onClick: $setup.handleScanCode
  18634. }, {
  18635. default: vue.withCtx(() => [
  18636. vue.createTextVNode("扫码")
  18637. ]),
  18638. _: 1
  18639. /* STABLE */
  18640. }),
  18641. vue.createVNode(_component_u_button, {
  18642. type: "primary",
  18643. size: "large",
  18644. onClick: $setup.handleComplete
  18645. }, {
  18646. default: vue.withCtx(() => [
  18647. vue.createTextVNode("完成")
  18648. ]),
  18649. _: 1
  18650. /* STABLE */
  18651. })
  18652. ],
  18653. 64
  18654. /* STABLE_FRAGMENT */
  18655. )) : vue.createCommentVNode("v-if", true)
  18656. ])) : vue.createCommentVNode("v-if", true),
  18657. vue.createVNode($setup["AuditorSelector"], {
  18658. show: $setup.showAuditorSelector,
  18659. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showAuditorSelector = $event),
  18660. onAuditorSelected: $setup.handleAuditorSelected
  18661. }, null, 8, ["show"])
  18662. ],
  18663. 2
  18664. /* CLASS */
  18665. );
  18666. }
  18667. const PagesIndexDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-8b10f148"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/index.vue"]]);
  18668. const _sfc_main$_ = {
  18669. __name: "AuditInfo",
  18670. props: {
  18671. detail: {
  18672. type: Object,
  18673. default: () => ({})
  18674. },
  18675. auditList: {
  18676. type: Array,
  18677. default: () => []
  18678. }
  18679. },
  18680. emits: ["selected"],
  18681. setup(__props, { expose: __expose, emit: __emit }) {
  18682. const props2 = __props;
  18683. const auditCommentList = vue.ref([]);
  18684. const initAuditList = (detail) => {
  18685. if (!(detail == null ? void 0 : detail.auditCommentList))
  18686. return;
  18687. auditCommentList.value = detail.auditCommentList.map((item, index2) => ({
  18688. ...item,
  18689. idx: index2,
  18690. isbn: detail.isbn,
  18691. comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
  18692. }));
  18693. };
  18694. vue.watch(
  18695. () => props2.detail,
  18696. () => {
  18697. initAuditList(props2.detail);
  18698. },
  18699. { deep: true, immediate: true }
  18700. );
  18701. const auditList = vue.ref([
  18702. { sts: 1, label: "品相良好" },
  18703. { sts: 2, label: "品相一般", disabled: true },
  18704. { sts: 3, label: "品相极差" }
  18705. ]);
  18706. const emit2 = __emit;
  18707. const radioClick = (audit, index2, sts) => {
  18708. if (sts == 2)
  18709. return;
  18710. audit.sts = sts;
  18711. if (sts == 1) {
  18712. audit.comList = [];
  18713. }
  18714. auditCommentList.value[index2] = audit;
  18715. formatReason();
  18716. };
  18717. const getAuditCateNum = (cate) => {
  18718. var _a, _b;
  18719. return ((_b = (_a = props2.detail.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == cate)) == null ? void 0 : _b.length) || 0;
  18720. };
  18721. let reasonList = vue.ref([
  18722. { sts: 3, label: "明显泛黄水印/发霉/明显异味" },
  18723. { sts: 3, label: "老化泛黄褪色/污渍" },
  18724. { sts: 3, label: "明显破损/脱胶缺页/书籍变型" },
  18725. { sts: 3, label: "无此书" },
  18726. { sts: 3, label: "印刷不清晰" },
  18727. { sts: 3, label: "无防伪" },
  18728. { sts: 3, label: "无外护封/无ISBN" },
  18729. { sts: 3, label: "无此书多其他书" },
  18730. { sts: 3, label: "笔记杂乱/习题做完" },
  18731. { sts: 3, label: "有笔记贴" },
  18732. { sts: 3, label: "套装缺册" },
  18733. { sts: 3, label: "听力无光盘" },
  18734. { sts: 3, label: "图书馆/藏书印章" }
  18735. ]);
  18736. const formatReason = () => {
  18737. let list = auditCommentList.value.map((item, index2) => ({
  18738. ...item,
  18739. idx: index2,
  18740. com: item.comList.join(",")
  18741. }));
  18742. return list;
  18743. };
  18744. const toggleReason = (audit, index2, item) => {
  18745. const idx = audit.comList.indexOf(item.label);
  18746. if (idx > -1) {
  18747. audit.comList.splice(idx, 1);
  18748. } else {
  18749. audit.comList.push(item.label);
  18750. }
  18751. auditCommentList.value[index2] = audit;
  18752. };
  18753. __expose({
  18754. formatReason,
  18755. initAuditList
  18756. });
  18757. const __returned__ = { props: props2, auditCommentList, initAuditList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
  18758. return reasonList;
  18759. }, set reasonList(v) {
  18760. reasonList = v;
  18761. }, formatReason, toggleReason, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, onMounted: vue.onMounted };
  18762. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18763. return __returned__;
  18764. }
  18765. };
  18766. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  18767. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  18768. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-info" }, [
  18769. vue.createElementVNode(
  18770. "view",
  18771. {
  18772. class: "font-bold mt-16",
  18773. style: { "padding": "0 20rpx" }
  18774. },
  18775. " 该书共" + vue.toDisplayString($props.detail.num) + "本,其中:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般" + vue.toDisplayString($setup.getAuditCateNum(2)) + "本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  18776. 1
  18777. /* TEXT */
  18778. ),
  18779. $setup.auditCommentList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  18780. vue.Fragment,
  18781. { key: 0 },
  18782. vue.renderList($setup.auditCommentList, (audit, index2) => {
  18783. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  18784. vue.createElementVNode(
  18785. "view",
  18786. {
  18787. class: "mt-10 bind-code",
  18788. style: { "padding": "10rpx 20rpx" }
  18789. },
  18790. " 第" + vue.toDisplayString(index2 + 1) + "本的审核意见 ",
  18791. 1
  18792. /* TEXT */
  18793. ),
  18794. vue.createElementVNode("view", {
  18795. class: "mt-20 bg-white flex flex-j-a flex-a-c",
  18796. style: { "padding": "20rpx", "border-radius": "10rpx" }
  18797. }, [
  18798. (vue.openBlock(true), vue.createElementBlock(
  18799. vue.Fragment,
  18800. null,
  18801. vue.renderList($setup.auditList, (item, idx) => {
  18802. return vue.openBlock(), vue.createElementBlock("view", {
  18803. class: "u-page__tag-item",
  18804. key: idx
  18805. }, [
  18806. vue.createVNode(_component_u_tag, {
  18807. size: "large",
  18808. text: item.label,
  18809. plain: audit.sts != item.sts,
  18810. type: "primary",
  18811. name: item.sts,
  18812. class: vue.normalizeClass({ disabled: item.sts == 2 }),
  18813. onClick: ($event) => $setup.radioClick(audit, index2, item.sts)
  18814. }, null, 8, ["text", "plain", "name", "class", "onClick"])
  18815. ]);
  18816. }),
  18817. 128
  18818. /* KEYED_FRAGMENT */
  18819. ))
  18820. ]),
  18821. audit.sts == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  18822. key: 0,
  18823. class: "mt-20 bg-white",
  18824. style: { "padding": "20rpx", "border-radius": "10rpx" }
  18825. }, [
  18826. vue.createElementVNode("view", { class: "flex flex-a-c flex-wrap" }, [
  18827. (vue.openBlock(true), vue.createElementBlock(
  18828. vue.Fragment,
  18829. null,
  18830. vue.renderList($setup.reasonList, (item, idx) => {
  18831. return vue.openBlock(), vue.createElementBlock("view", {
  18832. class: vue.normalizeClass(["mr-10 reason-item", { selected: audit.comList.includes(item.label) }]),
  18833. key: idx,
  18834. onClick: ($event) => $setup.toggleReason(audit, index2, item)
  18835. }, vue.toDisplayString(item.label), 11, ["onClick"]);
  18836. }),
  18837. 128
  18838. /* KEYED_FRAGMENT */
  18839. ))
  18840. ])
  18841. ])) : vue.createCommentVNode("v-if", true)
  18842. ]);
  18843. }),
  18844. 128
  18845. /* KEYED_FRAGMENT */
  18846. )) : vue.createCommentVNode("v-if", true)
  18847. ]);
  18848. }
  18849. const AuditInfo = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-9873c737"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/AuditInfo.vue"]]);
  18850. const _sfc_main$Z = {
  18851. __name: "book-audit",
  18852. setup(__props, { expose: __expose }) {
  18853. __expose();
  18854. const detail = vue.ref({});
  18855. const getBookInfo = (isbn) => {
  18856. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  18857. if (res2.code == 200) {
  18858. detail.value = res2.data;
  18859. }
  18860. });
  18861. };
  18862. const auditBook = vue.ref({});
  18863. const getBookInfoAndAuditInfo = (isbn, orderId2) => {
  18864. uni.$u.http.get(`/app/orderinfo/getBookCheckInfo?isbn=${isbn}&&orderId=${orderId2}`).then((res2) => {
  18865. if (res2.code == 200) {
  18866. auditBook.value = res2.data;
  18867. vue.nextTick(() => {
  18868. var _a;
  18869. (_a = auditInfoRef.value) == null ? void 0 : _a.initAuditList(auditBook.value);
  18870. });
  18871. }
  18872. });
  18873. };
  18874. const list = vue.ref(["图书审核", "绑码", "附件信息"]);
  18875. const current = vue.ref(0);
  18876. const handleSectionChange = (index2) => {
  18877. current.value = index2;
  18878. };
  18879. const auditData = vue.ref([]);
  18880. const handleAuditSelected = (data) => {
  18881. auditData.value = data.map((item, index2) => {
  18882. item.idx = index2;
  18883. item.com = Array.isArray(item.com) ? item.com.join(",") : item.com;
  18884. return item;
  18885. });
  18886. };
  18887. const scannedBooks = vue.ref([]);
  18888. function checkIsbn(isbn) {
  18889. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  18890. if (isbn13Regex.test(isbn)) {
  18891. return true;
  18892. }
  18893. return false;
  18894. }
  18895. function handleScan(isbn) {
  18896. var _a;
  18897. if (!checkIsbn(isbn)) {
  18898. let text = `不是正确的ISBN码`;
  18899. uni.$u.ttsModule.speak(text);
  18900. return;
  18901. }
  18902. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  18903. if (isbns.includes(isbn)) {
  18904. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  18905. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  18906. let noAuditNum = book.auditCommentList.filter((item) => item.sts == 0).length;
  18907. formatAppLog("log", "at pages/index/detail/book-audit.vue:136", noAuditNum, "noAuditNum");
  18908. if (noAuditNum == 0) {
  18909. let text = `${isbn}已超出订单中的数量`;
  18910. uni.$u.ttsModule.speak(text);
  18911. return;
  18912. }
  18913. if (book.suit == 1) {
  18914. let text = `${isbn}请注意套装书是否齐全`;
  18915. uni.$u.ttsModule.speak(text);
  18916. }
  18917. if (book.bookWarn == 1) {
  18918. let text = `请注意${isbn}需要取出`;
  18919. uni.$u.ttsModule.speak(text);
  18920. }
  18921. scannedBooks.value.push(isbn);
  18922. uni.setStorageSync("scannedBooks", scannedBooks.value);
  18923. uni.navigateTo({
  18924. url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
  18925. });
  18926. }
  18927. } else {
  18928. let text = `此订单中不存在${isbn}这本书 `;
  18929. uni.$u.ttsModule.speak(text);
  18930. }
  18931. }
  18932. function handleScanCode() {
  18933. uni.scanCode({
  18934. success: (res2) => {
  18935. handleScan(res2.result);
  18936. }
  18937. });
  18938. }
  18939. const auditInfoRef = vue.ref();
  18940. const handleAudit = () => {
  18941. var _a;
  18942. let checkList = (_a = auditInfoRef.value) == null ? void 0 : _a.formatReason(auditData.value);
  18943. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  18944. if (checkUserInfo.userId) {
  18945. checkUserId.value = checkUserInfo.userId;
  18946. } else {
  18947. uni.$u.toast("请先选择审核人");
  18948. }
  18949. let poorList = checkList.filter((item) => item.sts == 3);
  18950. if (poorList.length > 0 && !poorList.every((item) => item.com)) {
  18951. uni.$u.ttsModule.speak("请选择品相");
  18952. return;
  18953. }
  18954. uni.$u.http.post("/app/orderinfo/checkOrder", {
  18955. checkUserId: checkUserId.value,
  18956. orderId: orderId.value,
  18957. checkList
  18958. }).then((res2) => {
  18959. if (res2.code == 200) {
  18960. uni.showToast({ title: "审核成功", icon: "none" });
  18961. uni.$u.ttsModule.speak("审核成功");
  18962. uni.navigateBack();
  18963. } else {
  18964. uni.$u.toast(res2.msg);
  18965. }
  18966. });
  18967. };
  18968. const checkUserId = vue.ref();
  18969. const orderId = vue.ref();
  18970. const orderDetail = vue.ref({});
  18971. let isbnScan = vue.ref("");
  18972. onLoad((options) => {
  18973. options.isbn && getBookInfo(options.isbn);
  18974. scannedBooks.value = [options.isbn];
  18975. isbnScan.value = options.isbn;
  18976. orderId.value = options.orderId;
  18977. getBookInfoAndAuditInfo(options.isbn, options.orderId);
  18978. orderDetail.value = uni.getStorageSync("orderDetail");
  18979. uni.$u.useGlobalEvent((e) => {
  18980. if (e.barcode) {
  18981. handleScan(e.barcode);
  18982. }
  18983. });
  18984. });
  18985. onShow(() => {
  18986. var _a;
  18987. if (isbnScan.value) {
  18988. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  18989. orderDetail.value = uni.getStorageSync("orderDetail");
  18990. }
  18991. });
  18992. const __returned__ = { detail, getBookInfo, auditBook, getBookInfoAndAuditInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, checkUserId, orderId, orderDetail, get isbnScan() {
  18993. return isbnScan;
  18994. }, set isbnScan(v) {
  18995. isbnScan = v;
  18996. }, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
  18997. return onLoad;
  18998. }, get onShow() {
  18999. return onShow;
  19000. }, AuditInfo, FileInfo };
  19001. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19002. return __returned__;
  19003. }
  19004. };
  19005. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  19006. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  19007. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  19008. return vue.openBlock(), vue.createElementBlock("view", { class: "book-audit" }, [
  19009. vue.createElementVNode("view", {
  19010. class: "bg-white flex flex-a-c",
  19011. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19012. }, [
  19013. vue.createElementVNode("image", {
  19014. src: $setup.detail.cover,
  19015. mode: "aspectFill",
  19016. style: { "width": "80px", "height": "100px" }
  19017. }, null, 8, ["src"]),
  19018. vue.createElementVNode("view", { class: "flex flex-d flex-1 ml-20" }, [
  19019. vue.createElementVNode(
  19020. "text",
  19021. { class: "common-title mb-20" },
  19022. vue.toDisplayString($setup.detail.bookName),
  19023. 1
  19024. /* TEXT */
  19025. ),
  19026. vue.createElementVNode("text", { class: "text-sm" }, [
  19027. vue.createTextVNode("ISBN: "),
  19028. vue.createElementVNode(
  19029. "text",
  19030. { class: "color-primary" },
  19031. vue.toDisplayString($setup.detail.isbn),
  19032. 1
  19033. /* TEXT */
  19034. )
  19035. ]),
  19036. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  19037. vue.createTextVNode("作者: "),
  19038. vue.createElementVNode(
  19039. "text",
  19040. null,
  19041. vue.toDisplayString($setup.detail.author),
  19042. 1
  19043. /* TEXT */
  19044. )
  19045. ]),
  19046. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  19047. vue.createTextVNode("出版社: "),
  19048. vue.createElementVNode(
  19049. "text",
  19050. null,
  19051. vue.toDisplayString($setup.detail.publish),
  19052. 1
  19053. /* TEXT */
  19054. )
  19055. ])
  19056. ])
  19057. ]),
  19058. vue.createElementVNode("view", {
  19059. class: "mt-20 bg-white price-info",
  19060. style: { "border-radius": "10rpx" }
  19061. }, [
  19062. vue.createElementVNode("view", { class: "flex" }, [
  19063. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19064. vue.createElementVNode("text", { class: "label" }, "定价"),
  19065. vue.createElementVNode(
  19066. "text",
  19067. { class: "content" },
  19068. "¥" + vue.toDisplayString($setup.detail.price),
  19069. 1
  19070. /* TEXT */
  19071. )
  19072. ]),
  19073. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19074. vue.createElementVNode("text", { class: "label" }, "回收折扣"),
  19075. vue.createElementVNode(
  19076. "text",
  19077. { class: "content" },
  19078. vue.toDisplayString($setup.detail.recycleDiscount) + "折",
  19079. 1
  19080. /* TEXT */
  19081. )
  19082. ])
  19083. ]),
  19084. vue.createElementVNode("view", { class: "flex flex-a-c" }, [
  19085. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19086. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  19087. vue.createElementVNode(
  19088. "text",
  19089. { class: "content" },
  19090. "¥" + vue.toDisplayString($setup.auditBook.expectMoney),
  19091. 1
  19092. /* TEXT */
  19093. )
  19094. ]),
  19095. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19096. vue.createElementVNode("text", { class: "label" }, "审核金额"),
  19097. vue.createElementVNode(
  19098. "text",
  19099. { class: "content" },
  19100. "¥" + vue.toDisplayString($setup.auditBook.finalMoney || 0),
  19101. 1
  19102. /* TEXT */
  19103. )
  19104. ])
  19105. ])
  19106. ]),
  19107. vue.createElementVNode("view", { class: "mt-20" }, [
  19108. vue.createVNode(_component_u_subsection, {
  19109. list: $setup.list,
  19110. mode: "subsection",
  19111. current: $setup.current,
  19112. onChange: $setup.handleSectionChange
  19113. }, null, 8, ["list", "current"]),
  19114. vue.withDirectives(vue.createVNode($setup["AuditInfo"], {
  19115. detail: $setup.auditBook,
  19116. auditList: $setup.auditBook.auditCommentList,
  19117. ref: "auditInfoRef"
  19118. }, null, 8, ["detail", "auditList"]), [
  19119. [vue.vShow, $setup.current == 0]
  19120. ]),
  19121. vue.withDirectives(vue.createVNode($setup["FileInfo"], {
  19122. orderId: $setup.orderId,
  19123. annexType: 2,
  19124. isbn: $setup.isbnScan
  19125. }, null, 8, ["orderId", "isbn"]), [
  19126. [vue.vShow, $setup.current == 2]
  19127. ])
  19128. ]),
  19129. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19130. vue.createVNode(_component_u_button, {
  19131. type: "warning",
  19132. size: "large",
  19133. onClick: $setup.handleScanCode
  19134. }, {
  19135. default: vue.withCtx(() => [
  19136. vue.createTextVNode("扫码")
  19137. ]),
  19138. _: 1
  19139. /* STABLE */
  19140. }),
  19141. vue.createVNode(_component_u_button, {
  19142. type: "primary",
  19143. size: "large",
  19144. onClick: $setup.handleAudit
  19145. }, {
  19146. default: vue.withCtx(() => [
  19147. vue.createTextVNode("确定")
  19148. ]),
  19149. _: 1
  19150. /* STABLE */
  19151. })
  19152. ])
  19153. ]);
  19154. }
  19155. const PagesIndexDetailBookAudit = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-376f8a68"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/book-audit.vue"]]);
  19156. const _sfc_main$Y = {
  19157. __name: "BookItem2",
  19158. props: {
  19159. item: Object,
  19160. showClose: {
  19161. type: Boolean,
  19162. default: false
  19163. }
  19164. },
  19165. emits: ["close"],
  19166. setup(__props, { expose: __expose, emit: __emit }) {
  19167. __expose();
  19168. const props2 = __props;
  19169. const emit2 = __emit;
  19170. const handleClose = () => {
  19171. emit2("close", props2.item.isbn);
  19172. };
  19173. const __returned__ = { props: props2, emit: emit2, handleClose, computed: vue.computed };
  19174. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19175. return __returned__;
  19176. }
  19177. };
  19178. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  19179. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19180. return vue.openBlock(), vue.createElementBlock(
  19181. "view",
  19182. {
  19183. class: vue.normalizeClass(["card", { "card-close": $props.showClose }])
  19184. },
  19185. [
  19186. vue.createElementVNode("view", { class: "flex w100" }, [
  19187. vue.createElementVNode("view", { class: "flex-d" }, [
  19188. vue.createElementVNode("image", {
  19189. style: { "width": "70px", "height": "90px" },
  19190. src: $props.item.cover,
  19191. mode: "aspectFill"
  19192. }, null, 8, ["src"]),
  19193. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  19194. "view",
  19195. {
  19196. key: 0,
  19197. class: "quantity mt-24"
  19198. },
  19199. "数量: " + vue.toDisplayString($props.item.num),
  19200. 1
  19201. /* TEXT */
  19202. )) : vue.createCommentVNode("v-if", true)
  19203. ]),
  19204. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  19205. vue.createElementVNode(
  19206. "view",
  19207. { class: "common-title mb-20" },
  19208. vue.toDisplayString($props.item.bookName),
  19209. 1
  19210. /* TEXT */
  19211. ),
  19212. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19213. vue.createElementVNode(
  19214. "view",
  19215. { class: "isbn" },
  19216. "ISBN: " + vue.toDisplayString($props.item.isbn),
  19217. 1
  19218. /* TEXT */
  19219. ),
  19220. vue.createElementVNode(
  19221. "view",
  19222. { class: "set" },
  19223. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  19224. 1
  19225. /* TEXT */
  19226. )
  19227. ]),
  19228. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19229. vue.createElementVNode(
  19230. "view",
  19231. { class: "price" },
  19232. "定价: " + vue.toDisplayString($props.item.price),
  19233. 1
  19234. /* TEXT */
  19235. ),
  19236. vue.createElementVNode(
  19237. "view",
  19238. { class: "estimate" },
  19239. "预估单价: " + vue.toDisplayString($props.item.expectMoney || 0),
  19240. 1
  19241. /* TEXT */
  19242. )
  19243. ]),
  19244. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19245. vue.createElementVNode(
  19246. "view",
  19247. { class: "discount" },
  19248. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  19249. 1
  19250. /* TEXT */
  19251. ),
  19252. vue.createElementVNode("view", { class: "review" }, [
  19253. vue.createTextVNode("审核金额: "),
  19254. vue.createElementVNode(
  19255. "text",
  19256. { class: "color-red" },
  19257. vue.toDisplayString($props.item.review || 0),
  19258. 1
  19259. /* TEXT */
  19260. )
  19261. ])
  19262. ])
  19263. ])
  19264. ]),
  19265. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  19266. key: 0,
  19267. class: "quantity-icon mt-24"
  19268. }, [
  19269. vue.createVNode(_component_u_icon, {
  19270. name: "close-circle-fill",
  19271. size: "18",
  19272. color: "#999",
  19273. onClick: $setup.handleClose
  19274. })
  19275. ])) : vue.createCommentVNode("v-if", true)
  19276. ],
  19277. 2
  19278. /* CLASS */
  19279. );
  19280. }
  19281. const BookItem$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-469f67ea"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookItem2.vue"]]);
  19282. const _sfc_main$X = {
  19283. __name: "batch-audit",
  19284. setup(__props, { expose: __expose }) {
  19285. __expose();
  19286. const detailMap = vue.ref({});
  19287. const scannedBooksDetail = vue.ref([]);
  19288. const getBookInfo = (isbn) => {
  19289. if (detailMap.value[isbn]) {
  19290. scannedBooksDetail.value.push(detailMap.value[isbn]);
  19291. return;
  19292. }
  19293. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  19294. if (res2.code == 200) {
  19295. detailMap.value[isbn] = res2.data;
  19296. scannedBooksDetail.value.push(res2.data);
  19297. }
  19298. });
  19299. };
  19300. const handleClose = (index2, isbn) => {
  19301. scannedBooksDetail.value.splice(index2, 1);
  19302. scannedBooks.value = scannedBooks.value.filter((item) => item != isbn);
  19303. };
  19304. function checkIsbn(isbn) {
  19305. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19306. if (isbn13Regex.test(isbn)) {
  19307. return true;
  19308. }
  19309. return false;
  19310. }
  19311. const scannedBooks = vue.ref([]);
  19312. function handleScan(isbn) {
  19313. var _a;
  19314. if (!checkIsbn(isbn)) {
  19315. let text = `不是正确的ISBN码`;
  19316. uni.$u.ttsModule.speak(text);
  19317. return;
  19318. }
  19319. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19320. if (isbns.includes(isbn)) {
  19321. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19322. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  19323. let notAuditNum = book.auditCommentList.filter((item) => item.sts === 0).length || 0;
  19324. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  19325. if (scannedNum >= notAuditNum) {
  19326. let text = `${isbn}已超出订单中的数量`;
  19327. return uni.$u.ttsModule.speak(text);
  19328. } else {
  19329. if (book.suit == 1) {
  19330. let text = `${isbn}请注意套装书是否齐全`;
  19331. uni.$u.ttsModule.speak(text);
  19332. }
  19333. if (book.bookWarn == 1) {
  19334. let text = `请注意${isbn}需要取出`;
  19335. uni.$u.ttsModule.speak(text);
  19336. }
  19337. if (scannedNum >= notAuditNum && scannedNum < notAuditNum + poorNum) {
  19338. let text = `${isbn}已审核为极差`;
  19339. uni.$u.ttsModule.speak(text);
  19340. }
  19341. scannedBooks.value.push(isbn);
  19342. getBookInfo(isbn);
  19343. }
  19344. }
  19345. } else {
  19346. let text = `此订单中不存在${isbn}这本书 `;
  19347. uni.$u.ttsModule.speak(text);
  19348. }
  19349. }
  19350. function handleScanCode() {
  19351. uni.scanCode({
  19352. success: (res2) => {
  19353. handleScan(res2.result);
  19354. }
  19355. });
  19356. }
  19357. const checkUserId = vue.ref();
  19358. const orderId = vue.ref();
  19359. const orderDetail = vue.ref({});
  19360. const showModal = vue.ref(false);
  19361. const isQualitySelected = vue.ref(false);
  19362. const showQualityModal = () => {
  19363. showModal.value = true;
  19364. };
  19365. const closeModal = () => {
  19366. showModal.value = false;
  19367. };
  19368. const toggleQuality = () => {
  19369. isQualitySelected.value = !isQualitySelected.value;
  19370. };
  19371. const handleAudit = () => {
  19372. if (!isQualitySelected.value) {
  19373. uni.$u.toast("请选择品相");
  19374. uni.$u.ttsModule.speak("请选择品相");
  19375. return;
  19376. }
  19377. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19378. if (checkUserInfo.userId) {
  19379. checkUserId.value = checkUserInfo.userId;
  19380. }
  19381. uni.$u.http.post("/app/orderinfo/checkOrder", {
  19382. checkUserId: checkUserId.value,
  19383. orderId: orderId.value,
  19384. checkList: scannedBooks.value.map((isbn) => ({ sts: 1, com: "", isbn }))
  19385. }).then((res2) => {
  19386. if (res2.code == 200) {
  19387. uni.showToast({ title: "审核成功", icon: "none" });
  19388. uni.$u.ttsModule.speak("审核成功");
  19389. uni.navigateBack({ delta: 2 });
  19390. } else {
  19391. uni.$u.toast(res2.msg);
  19392. }
  19393. });
  19394. };
  19395. onLoad((options) => {
  19396. orderId.value = options.orderId;
  19397. orderDetail.value = uni.getStorageSync("orderDetail");
  19398. scannedBooks.value = uni.getStorageSync("scannedBooks");
  19399. scannedBooks.value.forEach((isbn) => {
  19400. getBookInfo(isbn);
  19401. });
  19402. uni.$u.useGlobalEvent((e) => {
  19403. if (e.barcode) {
  19404. handleScan(e.barcode);
  19405. }
  19406. });
  19407. });
  19408. onShow(() => {
  19409. var _a;
  19410. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  19411. orderDetail.value = uni.getStorageSync("orderDetail");
  19412. });
  19413. const __returned__ = { detailMap, scannedBooksDetail, getBookInfo, handleClose, checkIsbn, scannedBooks, handleScan, handleScanCode, checkUserId, orderId, orderDetail, showModal, isQualitySelected, showQualityModal, closeModal, toggleQuality, handleAudit, ref: vue.ref, get onLoad() {
  19414. return onLoad;
  19415. }, get onShow() {
  19416. return onShow;
  19417. }, BookItem: BookItem$1 };
  19418. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19419. return __returned__;
  19420. }
  19421. };
  19422. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  19423. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  19424. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  19425. return vue.openBlock(), vue.createElementBlock("view", { class: "batch-audit" }, [
  19426. (vue.openBlock(true), vue.createElementBlock(
  19427. vue.Fragment,
  19428. null,
  19429. vue.renderList($setup.scannedBooksDetail, (item, index2) => {
  19430. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  19431. key: item.isbn,
  19432. item,
  19433. showClose: "",
  19434. onClose: (isbn) => $setup.handleClose(index2, isbn)
  19435. }, null, 8, ["item", "onClose"]);
  19436. }),
  19437. 128
  19438. /* KEYED_FRAGMENT */
  19439. )),
  19440. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19441. vue.createVNode(_component_u_button, {
  19442. type: "warning",
  19443. size: "large",
  19444. onClick: $setup.handleScanCode
  19445. }, {
  19446. default: vue.withCtx(() => [
  19447. vue.createTextVNode("扫码")
  19448. ]),
  19449. _: 1
  19450. /* STABLE */
  19451. }),
  19452. vue.createVNode(_component_u_button, {
  19453. type: "primary",
  19454. size: "large",
  19455. onClick: $setup.showQualityModal
  19456. }, {
  19457. default: vue.withCtx(() => [
  19458. vue.createTextVNode("确定")
  19459. ]),
  19460. _: 1
  19461. /* STABLE */
  19462. })
  19463. ]),
  19464. vue.createVNode(_component_u_modal, {
  19465. show: $setup.showModal,
  19466. title: "品相选择",
  19467. onCancel: $setup.closeModal,
  19468. showCancelButton: true,
  19469. closeOnClickOverlay: true,
  19470. onConfirm: $setup.handleAudit
  19471. }, {
  19472. default: vue.withCtx(() => [
  19473. vue.createElementVNode("view", { class: "quality-selector" }, [
  19474. vue.createElementVNode(
  19475. "view",
  19476. {
  19477. class: vue.normalizeClass(["quality-circle", { selected: $setup.isQualitySelected }]),
  19478. onClick: $setup.toggleQuality
  19479. },
  19480. [
  19481. vue.createElementVNode("text", null, "良好")
  19482. ],
  19483. 2
  19484. /* CLASS */
  19485. )
  19486. ])
  19487. ]),
  19488. _: 1
  19489. /* STABLE */
  19490. }, 8, ["show"])
  19491. ]);
  19492. }
  19493. const PagesIndexDetailBatchAudit = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-bc156c69"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/batch-audit.vue"]]);
  19494. const _sfc_main$W = {
  19495. __name: "sender",
  19496. setup(__props, { expose: __expose }) {
  19497. __expose();
  19498. const otherParams = vue.ref({
  19499. search: ""
  19500. });
  19501. const scrollRef = vue.ref(null);
  19502. const refreshList = () => {
  19503. var _a;
  19504. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19505. };
  19506. let dataList = vue.ref([]);
  19507. const updateList = (data, page2) => {
  19508. dataList.value = data;
  19509. if (!isSearch.value)
  19510. return;
  19511. if (data.length > 0) {
  19512. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  19513. } else {
  19514. uni.$u.ttsModule.speak("未查询到数据");
  19515. }
  19516. isSearch.value = false;
  19517. };
  19518. const isSearch = vue.ref(false);
  19519. const handleSearch = () => {
  19520. isSearch.value = true;
  19521. refreshList();
  19522. };
  19523. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19524. return dataList;
  19525. }, set dataList(v) {
  19526. dataList = v;
  19527. }, updateList, isSearch, handleSearch, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  19528. return onLoad;
  19529. } };
  19530. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19531. return __returned__;
  19532. }
  19533. };
  19534. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  19535. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  19536. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  19537. return vue.openBlock(), vue.createElementBlock("view", {
  19538. class: "common-page",
  19539. style: { "padding": "0" }
  19540. }, [
  19541. vue.createVNode($setup["PageScroll"], {
  19542. requestStr: "/app/orderinfo/getOrderListByUserInfo",
  19543. onUpdateList: $setup.updateList,
  19544. ref: "scrollRef",
  19545. otherParams: $setup.otherParams,
  19546. immediate: false
  19547. }, {
  19548. default: vue.withCtx(() => [
  19549. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19550. default: vue.withCtx(() => [
  19551. vue.createElementVNode("view", { class: "search-area" }, [
  19552. vue.createVNode(_component_u_search, {
  19553. placeholder: "请输入发件人姓名或电话",
  19554. searchIconSize: 18,
  19555. bgColor: "#f6f7f6",
  19556. onSearch: $setup.handleSearch,
  19557. modelValue: $setup.otherParams.search,
  19558. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  19559. "custom-style": "font-size:32rpx",
  19560. "placeholder-style": "font-size:32rpx",
  19561. clearabled: true,
  19562. focus: false,
  19563. showAction: false,
  19564. height: 36
  19565. }, null, 8, ["modelValue"])
  19566. ])
  19567. ]),
  19568. _: 1
  19569. /* STABLE */
  19570. }),
  19571. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  19572. key: 0,
  19573. class: "list-con"
  19574. }, [
  19575. (vue.openBlock(true), vue.createElementBlock(
  19576. vue.Fragment,
  19577. null,
  19578. vue.renderList($setup.dataList, (cell) => {
  19579. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  19580. key: cell.id,
  19581. item: cell,
  19582. class: "mt-20"
  19583. }, null, 8, ["item"]);
  19584. }),
  19585. 128
  19586. /* KEYED_FRAGMENT */
  19587. ))
  19588. ])) : vue.createCommentVNode("v-if", true)
  19589. ]),
  19590. _: 1
  19591. /* STABLE */
  19592. }, 8, ["otherParams"])
  19593. ]);
  19594. }
  19595. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/sender.vue"]]);
  19596. const _sfc_main$V = {
  19597. __name: "audit",
  19598. setup(__props, { expose: __expose }) {
  19599. __expose();
  19600. const otherParams = vue.ref({
  19601. sender: ""
  19602. });
  19603. const scrollRef = vue.ref(null);
  19604. const refreshList = () => {
  19605. var _a;
  19606. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19607. };
  19608. let dataList = vue.ref([{
  19609. date: "2024-10-24",
  19610. orderNum: 423,
  19611. auditNum: 293,
  19612. trueNum: 323
  19613. }, {
  19614. date: "2024-10-24",
  19615. orderNum: 423,
  19616. auditNum: 293,
  19617. trueNum: 323
  19618. }, {
  19619. date: "2024-10-24",
  19620. orderNum: 423,
  19621. auditNum: 293,
  19622. trueNum: 323
  19623. }]);
  19624. const updateList = (data) => {
  19625. dataList.value = data;
  19626. };
  19627. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19628. return dataList;
  19629. }, set dataList(v) {
  19630. dataList = v;
  19631. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  19632. return onLoad;
  19633. } };
  19634. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19635. return __returned__;
  19636. }
  19637. };
  19638. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  19639. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  19640. return vue.openBlock(), vue.createElementBlock("view", {
  19641. class: "common-page",
  19642. style: { "padding": "0" }
  19643. }, [
  19644. vue.createVNode($setup["PageScroll"], {
  19645. requestStr: "/team/token/shop/invite/page",
  19646. onUpdateList: $setup.updateList,
  19647. ref: "scrollRef",
  19648. otherParams: $setup.otherParams
  19649. }, {
  19650. default: vue.withCtx(() => [
  19651. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19652. default: vue.withCtx(() => [
  19653. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  19654. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  19655. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  19656. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  19657. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  19658. ])
  19659. ]),
  19660. _: 1
  19661. /* STABLE */
  19662. }),
  19663. vue.createElementVNode("view", { class: "list-con" }, [
  19664. (vue.openBlock(true), vue.createElementBlock(
  19665. vue.Fragment,
  19666. null,
  19667. vue.renderList($setup.dataList, (item, index2) => {
  19668. return vue.openBlock(), vue.createElementBlock("view", {
  19669. key: index2,
  19670. class: "flex-a"
  19671. }, [
  19672. vue.createElementVNode(
  19673. "view",
  19674. { class: "text-item flex-1" },
  19675. vue.toDisplayString(item.date),
  19676. 1
  19677. /* TEXT */
  19678. ),
  19679. vue.createElementVNode(
  19680. "view",
  19681. { class: "text-item flex-1" },
  19682. vue.toDisplayString(item.orderNum),
  19683. 1
  19684. /* TEXT */
  19685. ),
  19686. vue.createElementVNode(
  19687. "view",
  19688. { class: "text-item flex-1" },
  19689. vue.toDisplayString(item.auditNum),
  19690. 1
  19691. /* TEXT */
  19692. ),
  19693. vue.createElementVNode(
  19694. "view",
  19695. { class: "text-item flex-1" },
  19696. vue.toDisplayString(item.trueNum),
  19697. 1
  19698. /* TEXT */
  19699. )
  19700. ]);
  19701. }),
  19702. 128
  19703. /* KEYED_FRAGMENT */
  19704. ))
  19705. ])
  19706. ]),
  19707. _: 1
  19708. /* STABLE */
  19709. }, 8, ["otherParams"])
  19710. ]);
  19711. }
  19712. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/audit.vue"]]);
  19713. const icons = {
  19714. "id": "2852637",
  19715. "name": "uniui图标库",
  19716. "font_family": "uniicons",
  19717. "css_prefix_text": "uniui-",
  19718. "description": "",
  19719. "glyphs": [
  19720. {
  19721. "icon_id": "25027049",
  19722. "name": "yanse",
  19723. "font_class": "color",
  19724. "unicode": "e6cf",
  19725. "unicode_decimal": 59087
  19726. },
  19727. {
  19728. "icon_id": "25027048",
  19729. "name": "wallet",
  19730. "font_class": "wallet",
  19731. "unicode": "e6b1",
  19732. "unicode_decimal": 59057
  19733. },
  19734. {
  19735. "icon_id": "25015720",
  19736. "name": "settings-filled",
  19737. "font_class": "settings-filled",
  19738. "unicode": "e6ce",
  19739. "unicode_decimal": 59086
  19740. },
  19741. {
  19742. "icon_id": "25015434",
  19743. "name": "shimingrenzheng-filled",
  19744. "font_class": "auth-filled",
  19745. "unicode": "e6cc",
  19746. "unicode_decimal": 59084
  19747. },
  19748. {
  19749. "icon_id": "24934246",
  19750. "name": "shop-filled",
  19751. "font_class": "shop-filled",
  19752. "unicode": "e6cd",
  19753. "unicode_decimal": 59085
  19754. },
  19755. {
  19756. "icon_id": "24934159",
  19757. "name": "staff-filled-01",
  19758. "font_class": "staff-filled",
  19759. "unicode": "e6cb",
  19760. "unicode_decimal": 59083
  19761. },
  19762. {
  19763. "icon_id": "24932461",
  19764. "name": "VIP-filled",
  19765. "font_class": "vip-filled",
  19766. "unicode": "e6c6",
  19767. "unicode_decimal": 59078
  19768. },
  19769. {
  19770. "icon_id": "24932462",
  19771. "name": "plus_circle_fill",
  19772. "font_class": "plus-filled",
  19773. "unicode": "e6c7",
  19774. "unicode_decimal": 59079
  19775. },
  19776. {
  19777. "icon_id": "24932463",
  19778. "name": "folder_add-filled",
  19779. "font_class": "folder-add-filled",
  19780. "unicode": "e6c8",
  19781. "unicode_decimal": 59080
  19782. },
  19783. {
  19784. "icon_id": "24932464",
  19785. "name": "yanse-filled",
  19786. "font_class": "color-filled",
  19787. "unicode": "e6c9",
  19788. "unicode_decimal": 59081
  19789. },
  19790. {
  19791. "icon_id": "24932465",
  19792. "name": "tune-filled",
  19793. "font_class": "tune-filled",
  19794. "unicode": "e6ca",
  19795. "unicode_decimal": 59082
  19796. },
  19797. {
  19798. "icon_id": "24932455",
  19799. "name": "a-rilidaka-filled",
  19800. "font_class": "calendar-filled",
  19801. "unicode": "e6c0",
  19802. "unicode_decimal": 59072
  19803. },
  19804. {
  19805. "icon_id": "24932456",
  19806. "name": "notification-filled",
  19807. "font_class": "notification-filled",
  19808. "unicode": "e6c1",
  19809. "unicode_decimal": 59073
  19810. },
  19811. {
  19812. "icon_id": "24932457",
  19813. "name": "wallet-filled",
  19814. "font_class": "wallet-filled",
  19815. "unicode": "e6c2",
  19816. "unicode_decimal": 59074
  19817. },
  19818. {
  19819. "icon_id": "24932458",
  19820. "name": "paihangbang-filled",
  19821. "font_class": "medal-filled",
  19822. "unicode": "e6c3",
  19823. "unicode_decimal": 59075
  19824. },
  19825. {
  19826. "icon_id": "24932459",
  19827. "name": "gift-filled",
  19828. "font_class": "gift-filled",
  19829. "unicode": "e6c4",
  19830. "unicode_decimal": 59076
  19831. },
  19832. {
  19833. "icon_id": "24932460",
  19834. "name": "fire-filled",
  19835. "font_class": "fire-filled",
  19836. "unicode": "e6c5",
  19837. "unicode_decimal": 59077
  19838. },
  19839. {
  19840. "icon_id": "24928001",
  19841. "name": "refreshempty",
  19842. "font_class": "refreshempty",
  19843. "unicode": "e6bf",
  19844. "unicode_decimal": 59071
  19845. },
  19846. {
  19847. "icon_id": "24926853",
  19848. "name": "location-ellipse",
  19849. "font_class": "location-filled",
  19850. "unicode": "e6af",
  19851. "unicode_decimal": 59055
  19852. },
  19853. {
  19854. "icon_id": "24926735",
  19855. "name": "person-filled",
  19856. "font_class": "person-filled",
  19857. "unicode": "e69d",
  19858. "unicode_decimal": 59037
  19859. },
  19860. {
  19861. "icon_id": "24926703",
  19862. "name": "personadd-filled",
  19863. "font_class": "personadd-filled",
  19864. "unicode": "e698",
  19865. "unicode_decimal": 59032
  19866. },
  19867. {
  19868. "icon_id": "24923351",
  19869. "name": "back",
  19870. "font_class": "back",
  19871. "unicode": "e6b9",
  19872. "unicode_decimal": 59065
  19873. },
  19874. {
  19875. "icon_id": "24923352",
  19876. "name": "forward",
  19877. "font_class": "forward",
  19878. "unicode": "e6ba",
  19879. "unicode_decimal": 59066
  19880. },
  19881. {
  19882. "icon_id": "24923353",
  19883. "name": "arrowthinright",
  19884. "font_class": "arrow-right",
  19885. "unicode": "e6bb",
  19886. "unicode_decimal": 59067
  19887. },
  19888. {
  19889. "icon_id": "24923353",
  19890. "name": "arrowthinright",
  19891. "font_class": "arrowthinright",
  19892. "unicode": "e6bb",
  19893. "unicode_decimal": 59067
  19894. },
  19895. {
  19896. "icon_id": "24923354",
  19897. "name": "arrowthinleft",
  19898. "font_class": "arrow-left",
  19899. "unicode": "e6bc",
  19900. "unicode_decimal": 59068
  19901. },
  19902. {
  19903. "icon_id": "24923354",
  19904. "name": "arrowthinleft",
  19905. "font_class": "arrowthinleft",
  19906. "unicode": "e6bc",
  19907. "unicode_decimal": 59068
  19908. },
  19909. {
  19910. "icon_id": "24923355",
  19911. "name": "arrowthinup",
  19912. "font_class": "arrow-up",
  19913. "unicode": "e6bd",
  19914. "unicode_decimal": 59069
  19915. },
  19916. {
  19917. "icon_id": "24923355",
  19918. "name": "arrowthinup",
  19919. "font_class": "arrowthinup",
  19920. "unicode": "e6bd",
  19921. "unicode_decimal": 59069
  19922. },
  19923. {
  19924. "icon_id": "24923356",
  19925. "name": "arrowthindown",
  19926. "font_class": "arrow-down",
  19927. "unicode": "e6be",
  19928. "unicode_decimal": 59070
  19929. },
  19930. {
  19931. "icon_id": "24923356",
  19932. "name": "arrowthindown",
  19933. "font_class": "arrowthindown",
  19934. "unicode": "e6be",
  19935. "unicode_decimal": 59070
  19936. },
  19937. {
  19938. "icon_id": "24923349",
  19939. "name": "arrowdown",
  19940. "font_class": "bottom",
  19941. "unicode": "e6b8",
  19942. "unicode_decimal": 59064
  19943. },
  19944. {
  19945. "icon_id": "24923349",
  19946. "name": "arrowdown",
  19947. "font_class": "arrowdown",
  19948. "unicode": "e6b8",
  19949. "unicode_decimal": 59064
  19950. },
  19951. {
  19952. "icon_id": "24923346",
  19953. "name": "arrowright",
  19954. "font_class": "right",
  19955. "unicode": "e6b5",
  19956. "unicode_decimal": 59061
  19957. },
  19958. {
  19959. "icon_id": "24923346",
  19960. "name": "arrowright",
  19961. "font_class": "arrowright",
  19962. "unicode": "e6b5",
  19963. "unicode_decimal": 59061
  19964. },
  19965. {
  19966. "icon_id": "24923347",
  19967. "name": "arrowup",
  19968. "font_class": "top",
  19969. "unicode": "e6b6",
  19970. "unicode_decimal": 59062
  19971. },
  19972. {
  19973. "icon_id": "24923347",
  19974. "name": "arrowup",
  19975. "font_class": "arrowup",
  19976. "unicode": "e6b6",
  19977. "unicode_decimal": 59062
  19978. },
  19979. {
  19980. "icon_id": "24923348",
  19981. "name": "arrowleft",
  19982. "font_class": "left",
  19983. "unicode": "e6b7",
  19984. "unicode_decimal": 59063
  19985. },
  19986. {
  19987. "icon_id": "24923348",
  19988. "name": "arrowleft",
  19989. "font_class": "arrowleft",
  19990. "unicode": "e6b7",
  19991. "unicode_decimal": 59063
  19992. },
  19993. {
  19994. "icon_id": "24923334",
  19995. "name": "eye",
  19996. "font_class": "eye",
  19997. "unicode": "e651",
  19998. "unicode_decimal": 58961
  19999. },
  20000. {
  20001. "icon_id": "24923335",
  20002. "name": "eye-filled",
  20003. "font_class": "eye-filled",
  20004. "unicode": "e66a",
  20005. "unicode_decimal": 58986
  20006. },
  20007. {
  20008. "icon_id": "24923336",
  20009. "name": "eye-slash",
  20010. "font_class": "eye-slash",
  20011. "unicode": "e6b3",
  20012. "unicode_decimal": 59059
  20013. },
  20014. {
  20015. "icon_id": "24923337",
  20016. "name": "eye-slash-filled",
  20017. "font_class": "eye-slash-filled",
  20018. "unicode": "e6b4",
  20019. "unicode_decimal": 59060
  20020. },
  20021. {
  20022. "icon_id": "24923305",
  20023. "name": "info-filled",
  20024. "font_class": "info-filled",
  20025. "unicode": "e649",
  20026. "unicode_decimal": 58953
  20027. },
  20028. {
  20029. "icon_id": "24923299",
  20030. "name": "reload-01",
  20031. "font_class": "reload",
  20032. "unicode": "e6b2",
  20033. "unicode_decimal": 59058
  20034. },
  20035. {
  20036. "icon_id": "24923195",
  20037. "name": "mic_slash_fill",
  20038. "font_class": "micoff-filled",
  20039. "unicode": "e6b0",
  20040. "unicode_decimal": 59056
  20041. },
  20042. {
  20043. "icon_id": "24923165",
  20044. "name": "map-pin-ellipse",
  20045. "font_class": "map-pin-ellipse",
  20046. "unicode": "e6ac",
  20047. "unicode_decimal": 59052
  20048. },
  20049. {
  20050. "icon_id": "24923166",
  20051. "name": "map-pin",
  20052. "font_class": "map-pin",
  20053. "unicode": "e6ad",
  20054. "unicode_decimal": 59053
  20055. },
  20056. {
  20057. "icon_id": "24923167",
  20058. "name": "location",
  20059. "font_class": "location",
  20060. "unicode": "e6ae",
  20061. "unicode_decimal": 59054
  20062. },
  20063. {
  20064. "icon_id": "24923064",
  20065. "name": "starhalf",
  20066. "font_class": "starhalf",
  20067. "unicode": "e683",
  20068. "unicode_decimal": 59011
  20069. },
  20070. {
  20071. "icon_id": "24923065",
  20072. "name": "star",
  20073. "font_class": "star",
  20074. "unicode": "e688",
  20075. "unicode_decimal": 59016
  20076. },
  20077. {
  20078. "icon_id": "24923066",
  20079. "name": "star-filled",
  20080. "font_class": "star-filled",
  20081. "unicode": "e68f",
  20082. "unicode_decimal": 59023
  20083. },
  20084. {
  20085. "icon_id": "24899646",
  20086. "name": "a-rilidaka",
  20087. "font_class": "calendar",
  20088. "unicode": "e6a0",
  20089. "unicode_decimal": 59040
  20090. },
  20091. {
  20092. "icon_id": "24899647",
  20093. "name": "fire",
  20094. "font_class": "fire",
  20095. "unicode": "e6a1",
  20096. "unicode_decimal": 59041
  20097. },
  20098. {
  20099. "icon_id": "24899648",
  20100. "name": "paihangbang",
  20101. "font_class": "medal",
  20102. "unicode": "e6a2",
  20103. "unicode_decimal": 59042
  20104. },
  20105. {
  20106. "icon_id": "24899649",
  20107. "name": "font",
  20108. "font_class": "font",
  20109. "unicode": "e6a3",
  20110. "unicode_decimal": 59043
  20111. },
  20112. {
  20113. "icon_id": "24899650",
  20114. "name": "gift",
  20115. "font_class": "gift",
  20116. "unicode": "e6a4",
  20117. "unicode_decimal": 59044
  20118. },
  20119. {
  20120. "icon_id": "24899651",
  20121. "name": "link",
  20122. "font_class": "link",
  20123. "unicode": "e6a5",
  20124. "unicode_decimal": 59045
  20125. },
  20126. {
  20127. "icon_id": "24899652",
  20128. "name": "notification",
  20129. "font_class": "notification",
  20130. "unicode": "e6a6",
  20131. "unicode_decimal": 59046
  20132. },
  20133. {
  20134. "icon_id": "24899653",
  20135. "name": "staff",
  20136. "font_class": "staff",
  20137. "unicode": "e6a7",
  20138. "unicode_decimal": 59047
  20139. },
  20140. {
  20141. "icon_id": "24899654",
  20142. "name": "VIP",
  20143. "font_class": "vip",
  20144. "unicode": "e6a8",
  20145. "unicode_decimal": 59048
  20146. },
  20147. {
  20148. "icon_id": "24899655",
  20149. "name": "folder_add",
  20150. "font_class": "folder-add",
  20151. "unicode": "e6a9",
  20152. "unicode_decimal": 59049
  20153. },
  20154. {
  20155. "icon_id": "24899656",
  20156. "name": "tune",
  20157. "font_class": "tune",
  20158. "unicode": "e6aa",
  20159. "unicode_decimal": 59050
  20160. },
  20161. {
  20162. "icon_id": "24899657",
  20163. "name": "shimingrenzheng",
  20164. "font_class": "auth",
  20165. "unicode": "e6ab",
  20166. "unicode_decimal": 59051
  20167. },
  20168. {
  20169. "icon_id": "24899565",
  20170. "name": "person",
  20171. "font_class": "person",
  20172. "unicode": "e699",
  20173. "unicode_decimal": 59033
  20174. },
  20175. {
  20176. "icon_id": "24899566",
  20177. "name": "email-filled",
  20178. "font_class": "email-filled",
  20179. "unicode": "e69a",
  20180. "unicode_decimal": 59034
  20181. },
  20182. {
  20183. "icon_id": "24899567",
  20184. "name": "phone-filled",
  20185. "font_class": "phone-filled",
  20186. "unicode": "e69b",
  20187. "unicode_decimal": 59035
  20188. },
  20189. {
  20190. "icon_id": "24899568",
  20191. "name": "phone",
  20192. "font_class": "phone",
  20193. "unicode": "e69c",
  20194. "unicode_decimal": 59036
  20195. },
  20196. {
  20197. "icon_id": "24899570",
  20198. "name": "email",
  20199. "font_class": "email",
  20200. "unicode": "e69e",
  20201. "unicode_decimal": 59038
  20202. },
  20203. {
  20204. "icon_id": "24899571",
  20205. "name": "personadd",
  20206. "font_class": "personadd",
  20207. "unicode": "e69f",
  20208. "unicode_decimal": 59039
  20209. },
  20210. {
  20211. "icon_id": "24899558",
  20212. "name": "chatboxes-filled",
  20213. "font_class": "chatboxes-filled",
  20214. "unicode": "e692",
  20215. "unicode_decimal": 59026
  20216. },
  20217. {
  20218. "icon_id": "24899559",
  20219. "name": "contact",
  20220. "font_class": "contact",
  20221. "unicode": "e693",
  20222. "unicode_decimal": 59027
  20223. },
  20224. {
  20225. "icon_id": "24899560",
  20226. "name": "chatbubble-filled",
  20227. "font_class": "chatbubble-filled",
  20228. "unicode": "e694",
  20229. "unicode_decimal": 59028
  20230. },
  20231. {
  20232. "icon_id": "24899561",
  20233. "name": "contact-filled",
  20234. "font_class": "contact-filled",
  20235. "unicode": "e695",
  20236. "unicode_decimal": 59029
  20237. },
  20238. {
  20239. "icon_id": "24899562",
  20240. "name": "chatboxes",
  20241. "font_class": "chatboxes",
  20242. "unicode": "e696",
  20243. "unicode_decimal": 59030
  20244. },
  20245. {
  20246. "icon_id": "24899563",
  20247. "name": "chatbubble",
  20248. "font_class": "chatbubble",
  20249. "unicode": "e697",
  20250. "unicode_decimal": 59031
  20251. },
  20252. {
  20253. "icon_id": "24881290",
  20254. "name": "upload-filled",
  20255. "font_class": "upload-filled",
  20256. "unicode": "e68e",
  20257. "unicode_decimal": 59022
  20258. },
  20259. {
  20260. "icon_id": "24881292",
  20261. "name": "upload",
  20262. "font_class": "upload",
  20263. "unicode": "e690",
  20264. "unicode_decimal": 59024
  20265. },
  20266. {
  20267. "icon_id": "24881293",
  20268. "name": "weixin",
  20269. "font_class": "weixin",
  20270. "unicode": "e691",
  20271. "unicode_decimal": 59025
  20272. },
  20273. {
  20274. "icon_id": "24881274",
  20275. "name": "compose",
  20276. "font_class": "compose",
  20277. "unicode": "e67f",
  20278. "unicode_decimal": 59007
  20279. },
  20280. {
  20281. "icon_id": "24881275",
  20282. "name": "qq",
  20283. "font_class": "qq",
  20284. "unicode": "e680",
  20285. "unicode_decimal": 59008
  20286. },
  20287. {
  20288. "icon_id": "24881276",
  20289. "name": "download-filled",
  20290. "font_class": "download-filled",
  20291. "unicode": "e681",
  20292. "unicode_decimal": 59009
  20293. },
  20294. {
  20295. "icon_id": "24881277",
  20296. "name": "pengyouquan",
  20297. "font_class": "pyq",
  20298. "unicode": "e682",
  20299. "unicode_decimal": 59010
  20300. },
  20301. {
  20302. "icon_id": "24881279",
  20303. "name": "sound",
  20304. "font_class": "sound",
  20305. "unicode": "e684",
  20306. "unicode_decimal": 59012
  20307. },
  20308. {
  20309. "icon_id": "24881280",
  20310. "name": "trash-filled",
  20311. "font_class": "trash-filled",
  20312. "unicode": "e685",
  20313. "unicode_decimal": 59013
  20314. },
  20315. {
  20316. "icon_id": "24881281",
  20317. "name": "sound-filled",
  20318. "font_class": "sound-filled",
  20319. "unicode": "e686",
  20320. "unicode_decimal": 59014
  20321. },
  20322. {
  20323. "icon_id": "24881282",
  20324. "name": "trash",
  20325. "font_class": "trash",
  20326. "unicode": "e687",
  20327. "unicode_decimal": 59015
  20328. },
  20329. {
  20330. "icon_id": "24881284",
  20331. "name": "videocam-filled",
  20332. "font_class": "videocam-filled",
  20333. "unicode": "e689",
  20334. "unicode_decimal": 59017
  20335. },
  20336. {
  20337. "icon_id": "24881285",
  20338. "name": "spinner-cycle",
  20339. "font_class": "spinner-cycle",
  20340. "unicode": "e68a",
  20341. "unicode_decimal": 59018
  20342. },
  20343. {
  20344. "icon_id": "24881286",
  20345. "name": "weibo",
  20346. "font_class": "weibo",
  20347. "unicode": "e68b",
  20348. "unicode_decimal": 59019
  20349. },
  20350. {
  20351. "icon_id": "24881288",
  20352. "name": "videocam",
  20353. "font_class": "videocam",
  20354. "unicode": "e68c",
  20355. "unicode_decimal": 59020
  20356. },
  20357. {
  20358. "icon_id": "24881289",
  20359. "name": "download",
  20360. "font_class": "download",
  20361. "unicode": "e68d",
  20362. "unicode_decimal": 59021
  20363. },
  20364. {
  20365. "icon_id": "24879601",
  20366. "name": "help",
  20367. "font_class": "help",
  20368. "unicode": "e679",
  20369. "unicode_decimal": 59001
  20370. },
  20371. {
  20372. "icon_id": "24879602",
  20373. "name": "navigate-filled",
  20374. "font_class": "navigate-filled",
  20375. "unicode": "e67a",
  20376. "unicode_decimal": 59002
  20377. },
  20378. {
  20379. "icon_id": "24879603",
  20380. "name": "plusempty",
  20381. "font_class": "plusempty",
  20382. "unicode": "e67b",
  20383. "unicode_decimal": 59003
  20384. },
  20385. {
  20386. "icon_id": "24879604",
  20387. "name": "smallcircle",
  20388. "font_class": "smallcircle",
  20389. "unicode": "e67c",
  20390. "unicode_decimal": 59004
  20391. },
  20392. {
  20393. "icon_id": "24879605",
  20394. "name": "minus-filled",
  20395. "font_class": "minus-filled",
  20396. "unicode": "e67d",
  20397. "unicode_decimal": 59005
  20398. },
  20399. {
  20400. "icon_id": "24879606",
  20401. "name": "micoff",
  20402. "font_class": "micoff",
  20403. "unicode": "e67e",
  20404. "unicode_decimal": 59006
  20405. },
  20406. {
  20407. "icon_id": "24879588",
  20408. "name": "closeempty",
  20409. "font_class": "closeempty",
  20410. "unicode": "e66c",
  20411. "unicode_decimal": 58988
  20412. },
  20413. {
  20414. "icon_id": "24879589",
  20415. "name": "clear",
  20416. "font_class": "clear",
  20417. "unicode": "e66d",
  20418. "unicode_decimal": 58989
  20419. },
  20420. {
  20421. "icon_id": "24879590",
  20422. "name": "navigate",
  20423. "font_class": "navigate",
  20424. "unicode": "e66e",
  20425. "unicode_decimal": 58990
  20426. },
  20427. {
  20428. "icon_id": "24879591",
  20429. "name": "minus",
  20430. "font_class": "minus",
  20431. "unicode": "e66f",
  20432. "unicode_decimal": 58991
  20433. },
  20434. {
  20435. "icon_id": "24879592",
  20436. "name": "image",
  20437. "font_class": "image",
  20438. "unicode": "e670",
  20439. "unicode_decimal": 58992
  20440. },
  20441. {
  20442. "icon_id": "24879593",
  20443. "name": "mic",
  20444. "font_class": "mic",
  20445. "unicode": "e671",
  20446. "unicode_decimal": 58993
  20447. },
  20448. {
  20449. "icon_id": "24879594",
  20450. "name": "paperplane",
  20451. "font_class": "paperplane",
  20452. "unicode": "e672",
  20453. "unicode_decimal": 58994
  20454. },
  20455. {
  20456. "icon_id": "24879595",
  20457. "name": "close",
  20458. "font_class": "close",
  20459. "unicode": "e673",
  20460. "unicode_decimal": 58995
  20461. },
  20462. {
  20463. "icon_id": "24879596",
  20464. "name": "help-filled",
  20465. "font_class": "help-filled",
  20466. "unicode": "e674",
  20467. "unicode_decimal": 58996
  20468. },
  20469. {
  20470. "icon_id": "24879597",
  20471. "name": "plus-filled",
  20472. "font_class": "paperplane-filled",
  20473. "unicode": "e675",
  20474. "unicode_decimal": 58997
  20475. },
  20476. {
  20477. "icon_id": "24879598",
  20478. "name": "plus",
  20479. "font_class": "plus",
  20480. "unicode": "e676",
  20481. "unicode_decimal": 58998
  20482. },
  20483. {
  20484. "icon_id": "24879599",
  20485. "name": "mic-filled",
  20486. "font_class": "mic-filled",
  20487. "unicode": "e677",
  20488. "unicode_decimal": 58999
  20489. },
  20490. {
  20491. "icon_id": "24879600",
  20492. "name": "image-filled",
  20493. "font_class": "image-filled",
  20494. "unicode": "e678",
  20495. "unicode_decimal": 59e3
  20496. },
  20497. {
  20498. "icon_id": "24855900",
  20499. "name": "locked-filled",
  20500. "font_class": "locked-filled",
  20501. "unicode": "e668",
  20502. "unicode_decimal": 58984
  20503. },
  20504. {
  20505. "icon_id": "24855901",
  20506. "name": "info",
  20507. "font_class": "info",
  20508. "unicode": "e669",
  20509. "unicode_decimal": 58985
  20510. },
  20511. {
  20512. "icon_id": "24855903",
  20513. "name": "locked",
  20514. "font_class": "locked",
  20515. "unicode": "e66b",
  20516. "unicode_decimal": 58987
  20517. },
  20518. {
  20519. "icon_id": "24855884",
  20520. "name": "camera-filled",
  20521. "font_class": "camera-filled",
  20522. "unicode": "e658",
  20523. "unicode_decimal": 58968
  20524. },
  20525. {
  20526. "icon_id": "24855885",
  20527. "name": "chat-filled",
  20528. "font_class": "chat-filled",
  20529. "unicode": "e659",
  20530. "unicode_decimal": 58969
  20531. },
  20532. {
  20533. "icon_id": "24855886",
  20534. "name": "camera",
  20535. "font_class": "camera",
  20536. "unicode": "e65a",
  20537. "unicode_decimal": 58970
  20538. },
  20539. {
  20540. "icon_id": "24855887",
  20541. "name": "circle",
  20542. "font_class": "circle",
  20543. "unicode": "e65b",
  20544. "unicode_decimal": 58971
  20545. },
  20546. {
  20547. "icon_id": "24855888",
  20548. "name": "checkmarkempty",
  20549. "font_class": "checkmarkempty",
  20550. "unicode": "e65c",
  20551. "unicode_decimal": 58972
  20552. },
  20553. {
  20554. "icon_id": "24855889",
  20555. "name": "chat",
  20556. "font_class": "chat",
  20557. "unicode": "e65d",
  20558. "unicode_decimal": 58973
  20559. },
  20560. {
  20561. "icon_id": "24855890",
  20562. "name": "circle-filled",
  20563. "font_class": "circle-filled",
  20564. "unicode": "e65e",
  20565. "unicode_decimal": 58974
  20566. },
  20567. {
  20568. "icon_id": "24855891",
  20569. "name": "flag",
  20570. "font_class": "flag",
  20571. "unicode": "e65f",
  20572. "unicode_decimal": 58975
  20573. },
  20574. {
  20575. "icon_id": "24855892",
  20576. "name": "flag-filled",
  20577. "font_class": "flag-filled",
  20578. "unicode": "e660",
  20579. "unicode_decimal": 58976
  20580. },
  20581. {
  20582. "icon_id": "24855893",
  20583. "name": "gear-filled",
  20584. "font_class": "gear-filled",
  20585. "unicode": "e661",
  20586. "unicode_decimal": 58977
  20587. },
  20588. {
  20589. "icon_id": "24855894",
  20590. "name": "home",
  20591. "font_class": "home",
  20592. "unicode": "e662",
  20593. "unicode_decimal": 58978
  20594. },
  20595. {
  20596. "icon_id": "24855895",
  20597. "name": "home-filled",
  20598. "font_class": "home-filled",
  20599. "unicode": "e663",
  20600. "unicode_decimal": 58979
  20601. },
  20602. {
  20603. "icon_id": "24855896",
  20604. "name": "gear",
  20605. "font_class": "gear",
  20606. "unicode": "e664",
  20607. "unicode_decimal": 58980
  20608. },
  20609. {
  20610. "icon_id": "24855897",
  20611. "name": "smallcircle-filled",
  20612. "font_class": "smallcircle-filled",
  20613. "unicode": "e665",
  20614. "unicode_decimal": 58981
  20615. },
  20616. {
  20617. "icon_id": "24855898",
  20618. "name": "map-filled",
  20619. "font_class": "map-filled",
  20620. "unicode": "e666",
  20621. "unicode_decimal": 58982
  20622. },
  20623. {
  20624. "icon_id": "24855899",
  20625. "name": "map",
  20626. "font_class": "map",
  20627. "unicode": "e667",
  20628. "unicode_decimal": 58983
  20629. },
  20630. {
  20631. "icon_id": "24855825",
  20632. "name": "refresh-filled",
  20633. "font_class": "refresh-filled",
  20634. "unicode": "e656",
  20635. "unicode_decimal": 58966
  20636. },
  20637. {
  20638. "icon_id": "24855826",
  20639. "name": "refresh",
  20640. "font_class": "refresh",
  20641. "unicode": "e657",
  20642. "unicode_decimal": 58967
  20643. },
  20644. {
  20645. "icon_id": "24855808",
  20646. "name": "cloud-upload",
  20647. "font_class": "cloud-upload",
  20648. "unicode": "e645",
  20649. "unicode_decimal": 58949
  20650. },
  20651. {
  20652. "icon_id": "24855809",
  20653. "name": "cloud-download-filled",
  20654. "font_class": "cloud-download-filled",
  20655. "unicode": "e646",
  20656. "unicode_decimal": 58950
  20657. },
  20658. {
  20659. "icon_id": "24855810",
  20660. "name": "cloud-download",
  20661. "font_class": "cloud-download",
  20662. "unicode": "e647",
  20663. "unicode_decimal": 58951
  20664. },
  20665. {
  20666. "icon_id": "24855811",
  20667. "name": "cloud-upload-filled",
  20668. "font_class": "cloud-upload-filled",
  20669. "unicode": "e648",
  20670. "unicode_decimal": 58952
  20671. },
  20672. {
  20673. "icon_id": "24855813",
  20674. "name": "redo",
  20675. "font_class": "redo",
  20676. "unicode": "e64a",
  20677. "unicode_decimal": 58954
  20678. },
  20679. {
  20680. "icon_id": "24855814",
  20681. "name": "images-filled",
  20682. "font_class": "images-filled",
  20683. "unicode": "e64b",
  20684. "unicode_decimal": 58955
  20685. },
  20686. {
  20687. "icon_id": "24855815",
  20688. "name": "undo-filled",
  20689. "font_class": "undo-filled",
  20690. "unicode": "e64c",
  20691. "unicode_decimal": 58956
  20692. },
  20693. {
  20694. "icon_id": "24855816",
  20695. "name": "more",
  20696. "font_class": "more",
  20697. "unicode": "e64d",
  20698. "unicode_decimal": 58957
  20699. },
  20700. {
  20701. "icon_id": "24855817",
  20702. "name": "more-filled",
  20703. "font_class": "more-filled",
  20704. "unicode": "e64e",
  20705. "unicode_decimal": 58958
  20706. },
  20707. {
  20708. "icon_id": "24855818",
  20709. "name": "undo",
  20710. "font_class": "undo",
  20711. "unicode": "e64f",
  20712. "unicode_decimal": 58959
  20713. },
  20714. {
  20715. "icon_id": "24855819",
  20716. "name": "images",
  20717. "font_class": "images",
  20718. "unicode": "e650",
  20719. "unicode_decimal": 58960
  20720. },
  20721. {
  20722. "icon_id": "24855821",
  20723. "name": "paperclip",
  20724. "font_class": "paperclip",
  20725. "unicode": "e652",
  20726. "unicode_decimal": 58962
  20727. },
  20728. {
  20729. "icon_id": "24855822",
  20730. "name": "settings",
  20731. "font_class": "settings",
  20732. "unicode": "e653",
  20733. "unicode_decimal": 58963
  20734. },
  20735. {
  20736. "icon_id": "24855823",
  20737. "name": "search",
  20738. "font_class": "search",
  20739. "unicode": "e654",
  20740. "unicode_decimal": 58964
  20741. },
  20742. {
  20743. "icon_id": "24855824",
  20744. "name": "redo-filled",
  20745. "font_class": "redo-filled",
  20746. "unicode": "e655",
  20747. "unicode_decimal": 58965
  20748. },
  20749. {
  20750. "icon_id": "24841702",
  20751. "name": "list",
  20752. "font_class": "list",
  20753. "unicode": "e644",
  20754. "unicode_decimal": 58948
  20755. },
  20756. {
  20757. "icon_id": "24841489",
  20758. "name": "mail-open-filled",
  20759. "font_class": "mail-open-filled",
  20760. "unicode": "e63a",
  20761. "unicode_decimal": 58938
  20762. },
  20763. {
  20764. "icon_id": "24841491",
  20765. "name": "hand-thumbsdown-filled",
  20766. "font_class": "hand-down-filled",
  20767. "unicode": "e63c",
  20768. "unicode_decimal": 58940
  20769. },
  20770. {
  20771. "icon_id": "24841492",
  20772. "name": "hand-thumbsdown",
  20773. "font_class": "hand-down",
  20774. "unicode": "e63d",
  20775. "unicode_decimal": 58941
  20776. },
  20777. {
  20778. "icon_id": "24841493",
  20779. "name": "hand-thumbsup-filled",
  20780. "font_class": "hand-up-filled",
  20781. "unicode": "e63e",
  20782. "unicode_decimal": 58942
  20783. },
  20784. {
  20785. "icon_id": "24841494",
  20786. "name": "hand-thumbsup",
  20787. "font_class": "hand-up",
  20788. "unicode": "e63f",
  20789. "unicode_decimal": 58943
  20790. },
  20791. {
  20792. "icon_id": "24841496",
  20793. "name": "heart-filled",
  20794. "font_class": "heart-filled",
  20795. "unicode": "e641",
  20796. "unicode_decimal": 58945
  20797. },
  20798. {
  20799. "icon_id": "24841498",
  20800. "name": "mail-open",
  20801. "font_class": "mail-open",
  20802. "unicode": "e643",
  20803. "unicode_decimal": 58947
  20804. },
  20805. {
  20806. "icon_id": "24841488",
  20807. "name": "heart",
  20808. "font_class": "heart",
  20809. "unicode": "e639",
  20810. "unicode_decimal": 58937
  20811. },
  20812. {
  20813. "icon_id": "24839963",
  20814. "name": "loop",
  20815. "font_class": "loop",
  20816. "unicode": "e633",
  20817. "unicode_decimal": 58931
  20818. },
  20819. {
  20820. "icon_id": "24839866",
  20821. "name": "pulldown",
  20822. "font_class": "pulldown",
  20823. "unicode": "e632",
  20824. "unicode_decimal": 58930
  20825. },
  20826. {
  20827. "icon_id": "24813798",
  20828. "name": "scan",
  20829. "font_class": "scan",
  20830. "unicode": "e62a",
  20831. "unicode_decimal": 58922
  20832. },
  20833. {
  20834. "icon_id": "24813786",
  20835. "name": "bars",
  20836. "font_class": "bars",
  20837. "unicode": "e627",
  20838. "unicode_decimal": 58919
  20839. },
  20840. {
  20841. "icon_id": "24813788",
  20842. "name": "cart-filled",
  20843. "font_class": "cart-filled",
  20844. "unicode": "e629",
  20845. "unicode_decimal": 58921
  20846. },
  20847. {
  20848. "icon_id": "24813790",
  20849. "name": "checkbox",
  20850. "font_class": "checkbox",
  20851. "unicode": "e62b",
  20852. "unicode_decimal": 58923
  20853. },
  20854. {
  20855. "icon_id": "24813791",
  20856. "name": "checkbox-filled",
  20857. "font_class": "checkbox-filled",
  20858. "unicode": "e62c",
  20859. "unicode_decimal": 58924
  20860. },
  20861. {
  20862. "icon_id": "24813794",
  20863. "name": "shop",
  20864. "font_class": "shop",
  20865. "unicode": "e62f",
  20866. "unicode_decimal": 58927
  20867. },
  20868. {
  20869. "icon_id": "24813795",
  20870. "name": "headphones",
  20871. "font_class": "headphones",
  20872. "unicode": "e630",
  20873. "unicode_decimal": 58928
  20874. },
  20875. {
  20876. "icon_id": "24813796",
  20877. "name": "cart",
  20878. "font_class": "cart",
  20879. "unicode": "e631",
  20880. "unicode_decimal": 58929
  20881. }
  20882. ]
  20883. };
  20884. const getVal = (val) => {
  20885. const reg = /^[0-9]*$/g;
  20886. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  20887. };
  20888. const _sfc_main$U = {
  20889. name: "UniIcons",
  20890. emits: ["click"],
  20891. props: {
  20892. type: {
  20893. type: String,
  20894. default: ""
  20895. },
  20896. color: {
  20897. type: String,
  20898. default: "#333333"
  20899. },
  20900. size: {
  20901. type: [Number, String],
  20902. default: 16
  20903. },
  20904. customPrefix: {
  20905. type: String,
  20906. default: ""
  20907. }
  20908. },
  20909. data() {
  20910. return {
  20911. icons: icons.glyphs
  20912. };
  20913. },
  20914. computed: {
  20915. unicode() {
  20916. let code2 = this.icons.find((v) => v.font_class === this.type);
  20917. if (code2) {
  20918. return unescape(`%u${code2.unicode}`);
  20919. }
  20920. return "";
  20921. },
  20922. iconSize() {
  20923. return getVal(this.size);
  20924. }
  20925. },
  20926. methods: {
  20927. _onClick() {
  20928. this.$emit("click");
  20929. }
  20930. }
  20931. };
  20932. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  20933. return vue.openBlock(), vue.createElementBlock(
  20934. "text",
  20935. {
  20936. style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
  20937. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  20938. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  20939. },
  20940. null,
  20941. 6
  20942. /* CLASS, STYLE */
  20943. );
  20944. }
  20945. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-d31e1c47"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  20946. let Calendar$1 = class Calendar {
  20947. constructor({
  20948. selected,
  20949. startDate,
  20950. endDate,
  20951. range: range2
  20952. } = {}) {
  20953. this.date = this.getDateObj(/* @__PURE__ */ new Date());
  20954. this.selected = selected || [];
  20955. this.startDate = startDate;
  20956. this.endDate = endDate;
  20957. this.range = range2;
  20958. this.cleanMultipleStatus();
  20959. this.weeks = {};
  20960. this.lastHover = false;
  20961. }
  20962. /**
  20963. * 设置日期
  20964. * @param {Object} date
  20965. */
  20966. setDate(date3) {
  20967. const selectDate = this.getDateObj(date3);
  20968. this.getWeeks(selectDate.fullDate);
  20969. }
  20970. /**
  20971. * 清理多选状态
  20972. */
  20973. cleanMultipleStatus() {
  20974. this.multipleStatus = {
  20975. before: "",
  20976. after: "",
  20977. data: []
  20978. };
  20979. }
  20980. setStartDate(startDate) {
  20981. this.startDate = startDate;
  20982. }
  20983. setEndDate(endDate) {
  20984. this.endDate = endDate;
  20985. }
  20986. getPreMonthObj(date3) {
  20987. date3 = fixIosDateFormat(date3);
  20988. date3 = new Date(date3);
  20989. const oldMonth = date3.getMonth();
  20990. date3.setMonth(oldMonth - 1);
  20991. const newMonth = date3.getMonth();
  20992. if (oldMonth !== 0 && newMonth - oldMonth === 0) {
  20993. date3.setMonth(newMonth - 1);
  20994. }
  20995. return this.getDateObj(date3);
  20996. }
  20997. getNextMonthObj(date3) {
  20998. date3 = fixIosDateFormat(date3);
  20999. date3 = new Date(date3);
  21000. const oldMonth = date3.getMonth();
  21001. date3.setMonth(oldMonth + 1);
  21002. const newMonth = date3.getMonth();
  21003. if (newMonth - oldMonth > 1) {
  21004. date3.setMonth(newMonth - 1);
  21005. }
  21006. return this.getDateObj(date3);
  21007. }
  21008. /**
  21009. * 获取指定格式Date对象
  21010. */
  21011. getDateObj(date3) {
  21012. date3 = fixIosDateFormat(date3);
  21013. date3 = new Date(date3);
  21014. return {
  21015. fullDate: getDate(date3),
  21016. year: date3.getFullYear(),
  21017. month: addZero(date3.getMonth() + 1),
  21018. date: addZero(date3.getDate()),
  21019. day: date3.getDay()
  21020. };
  21021. }
  21022. /**
  21023. * 获取上一个月日期集合
  21024. */
  21025. getPreMonthDays(amount2, dateObj) {
  21026. const result = [];
  21027. for (let i = amount2 - 1; i >= 0; i--) {
  21028. const month = dateObj.month > 1 ? dateObj.month - 1 : 12;
  21029. const year = month === 12 ? dateObj.year - 1 : dateObj.year;
  21030. const date3 = new Date(year, month, -i).getDate();
  21031. const fullDate = `${year}-${addZero(month)}-${addZero(date3)}`;
  21032. let multiples = this.multipleStatus.data;
  21033. let multiplesStatus = -1;
  21034. if (this.range && multiples) {
  21035. multiplesStatus = multiples.findIndex((item) => {
  21036. return this.dateEqual(item, fullDate);
  21037. });
  21038. }
  21039. const checked = multiplesStatus !== -1;
  21040. const extraInfo = this.selected && this.selected.find((item) => {
  21041. if (this.dateEqual(fullDate, item.date)) {
  21042. return item;
  21043. }
  21044. });
  21045. result.push({
  21046. fullDate,
  21047. year,
  21048. month,
  21049. date: date3,
  21050. multiple: this.range ? checked : false,
  21051. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21052. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21053. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21054. isToday: fullDate === this.date.fullDate,
  21055. userChecked: false,
  21056. extraInfo
  21057. });
  21058. }
  21059. return result;
  21060. }
  21061. /**
  21062. * 获取本月日期集合
  21063. */
  21064. getCurrentMonthDays(amount2, dateObj) {
  21065. const result = [];
  21066. const fullDate = this.date.fullDate;
  21067. for (let i = 1; i <= amount2; i++) {
  21068. const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
  21069. const isToday = fullDate === currentDate;
  21070. const extraInfo = this.selected && this.selected.find((item) => {
  21071. if (this.dateEqual(currentDate, item.date)) {
  21072. return item;
  21073. }
  21074. });
  21075. if (this.startDate) {
  21076. dateCompare(this.startDate, currentDate);
  21077. }
  21078. if (this.endDate) {
  21079. dateCompare(currentDate, this.endDate);
  21080. }
  21081. let multiples = this.multipleStatus.data;
  21082. let multiplesStatus = -1;
  21083. if (this.range && multiples) {
  21084. multiplesStatus = multiples.findIndex((item) => {
  21085. return this.dateEqual(item, currentDate);
  21086. });
  21087. }
  21088. const checked = multiplesStatus !== -1;
  21089. result.push({
  21090. fullDate: currentDate,
  21091. year: dateObj.year,
  21092. month: dateObj.month,
  21093. date: i,
  21094. multiple: this.range ? checked : false,
  21095. beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21096. afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21097. disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
  21098. isToday,
  21099. userChecked: false,
  21100. extraInfo
  21101. });
  21102. }
  21103. return result;
  21104. }
  21105. /**
  21106. * 获取下一个月日期集合
  21107. */
  21108. _getNextMonthDays(amount2, dateObj) {
  21109. const result = [];
  21110. dateObj.month + 1;
  21111. for (let i = 1; i <= amount2; i++) {
  21112. const month = dateObj.month === 12 ? 1 : dateObj.month * 1 + 1;
  21113. const year = month === 1 ? dateObj.year + 1 : dateObj.year;
  21114. const fullDate = `${year}-${addZero(month)}-${addZero(i)}`;
  21115. let multiples = this.multipleStatus.data;
  21116. let multiplesStatus = -1;
  21117. if (this.range && multiples) {
  21118. multiplesStatus = multiples.findIndex((item) => {
  21119. return this.dateEqual(item, fullDate);
  21120. });
  21121. }
  21122. const checked = multiplesStatus !== -1;
  21123. const extraInfo = this.selected && this.selected.find((item) => {
  21124. if (this.dateEqual(fullDate, item.date)) {
  21125. return item;
  21126. }
  21127. });
  21128. result.push({
  21129. fullDate,
  21130. year,
  21131. date: i,
  21132. month,
  21133. multiple: this.range ? checked : false,
  21134. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21135. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21136. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21137. isToday: fullDate === this.date.fullDate,
  21138. userChecked: false,
  21139. extraInfo
  21140. });
  21141. }
  21142. return result;
  21143. }
  21144. /**
  21145. * 获取当前日期详情
  21146. * @param {Object} date
  21147. */
  21148. getInfo(date3) {
  21149. if (!date3) {
  21150. date3 = /* @__PURE__ */ new Date();
  21151. }
  21152. return this.calendar.find((item) => item.fullDate === this.getDateObj(date3).fullDate);
  21153. }
  21154. /**
  21155. * 比较时间是否相等
  21156. */
  21157. dateEqual(before, after) {
  21158. before = new Date(fixIosDateFormat(before));
  21159. after = new Date(fixIosDateFormat(after));
  21160. return before.valueOf() === after.valueOf();
  21161. }
  21162. /**
  21163. * 比较真实起始日期
  21164. */
  21165. isLogicBefore(currentDate, before, after) {
  21166. let logicBefore = before;
  21167. if (before && after) {
  21168. logicBefore = dateCompare(before, after) ? before : after;
  21169. }
  21170. return this.dateEqual(logicBefore, currentDate);
  21171. }
  21172. isLogicAfter(currentDate, before, after) {
  21173. let logicAfter = after;
  21174. if (before && after) {
  21175. logicAfter = dateCompare(before, after) ? after : before;
  21176. }
  21177. return this.dateEqual(logicAfter, currentDate);
  21178. }
  21179. /**
  21180. * 获取日期范围内所有日期
  21181. * @param {Object} begin
  21182. * @param {Object} end
  21183. */
  21184. geDateAll(begin, end) {
  21185. var arr = [];
  21186. var ab = begin.split("-");
  21187. var ae = end.split("-");
  21188. var db = /* @__PURE__ */ new Date();
  21189. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  21190. var de = /* @__PURE__ */ new Date();
  21191. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  21192. var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
  21193. var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
  21194. for (var k = unixDb; k <= unixDe; ) {
  21195. k = k + 24 * 60 * 60 * 1e3;
  21196. arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
  21197. }
  21198. return arr;
  21199. }
  21200. /**
  21201. * 获取多选状态
  21202. */
  21203. setMultiple(fullDate) {
  21204. if (!this.range)
  21205. return;
  21206. let {
  21207. before,
  21208. after
  21209. } = this.multipleStatus;
  21210. if (before && after) {
  21211. if (!this.lastHover) {
  21212. this.lastHover = true;
  21213. return;
  21214. }
  21215. this.multipleStatus.before = fullDate;
  21216. this.multipleStatus.after = "";
  21217. this.multipleStatus.data = [];
  21218. this.multipleStatus.fulldate = "";
  21219. this.lastHover = false;
  21220. } else {
  21221. if (!before) {
  21222. this.multipleStatus.before = fullDate;
  21223. this.lastHover = false;
  21224. } else {
  21225. this.multipleStatus.after = fullDate;
  21226. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21227. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21228. } else {
  21229. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21230. }
  21231. this.lastHover = true;
  21232. }
  21233. }
  21234. this.getWeeks(fullDate);
  21235. }
  21236. /**
  21237. * 鼠标 hover 更新多选状态
  21238. */
  21239. setHoverMultiple(fullDate) {
  21240. if (!this.range || this.lastHover)
  21241. return;
  21242. const { before } = this.multipleStatus;
  21243. if (!before) {
  21244. this.multipleStatus.before = fullDate;
  21245. } else {
  21246. this.multipleStatus.after = fullDate;
  21247. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21248. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21249. } else {
  21250. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21251. }
  21252. }
  21253. this.getWeeks(fullDate);
  21254. }
  21255. /**
  21256. * 更新默认值多选状态
  21257. */
  21258. setDefaultMultiple(before, after) {
  21259. this.multipleStatus.before = before;
  21260. this.multipleStatus.after = after;
  21261. if (before && after) {
  21262. if (dateCompare(before, after)) {
  21263. this.multipleStatus.data = this.geDateAll(before, after);
  21264. this.getWeeks(after);
  21265. } else {
  21266. this.multipleStatus.data = this.geDateAll(after, before);
  21267. this.getWeeks(before);
  21268. }
  21269. }
  21270. }
  21271. /**
  21272. * 获取每周数据
  21273. * @param {Object} dateData
  21274. */
  21275. getWeeks(dateData) {
  21276. const {
  21277. year,
  21278. month
  21279. } = this.getDateObj(dateData);
  21280. const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
  21281. const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
  21282. const currentMonthDayAmount = new Date(year, month, 0).getDate();
  21283. const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
  21284. const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
  21285. const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
  21286. const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
  21287. const weeks = new Array(6);
  21288. for (let i = 0; i < calendarDays.length; i++) {
  21289. const index2 = Math.floor(i / 7);
  21290. if (!weeks[index2]) {
  21291. weeks[index2] = new Array(7);
  21292. }
  21293. weeks[index2][i % 7] = calendarDays[i];
  21294. }
  21295. this.calendar = calendarDays;
  21296. this.weeks = weeks;
  21297. }
  21298. };
  21299. function getDateTime(date3, hideSecond) {
  21300. return `${getDate(date3)} ${getTime(date3, hideSecond)}`;
  21301. }
  21302. function getDate(date3) {
  21303. date3 = fixIosDateFormat(date3);
  21304. date3 = new Date(date3);
  21305. const year = date3.getFullYear();
  21306. const month = date3.getMonth() + 1;
  21307. const day = date3.getDate();
  21308. return `${year}-${addZero(month)}-${addZero(day)}`;
  21309. }
  21310. function getTime(date3, hideSecond) {
  21311. date3 = fixIosDateFormat(date3);
  21312. date3 = new Date(date3);
  21313. const hour = date3.getHours();
  21314. const minute = date3.getMinutes();
  21315. const second = date3.getSeconds();
  21316. return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
  21317. }
  21318. function addZero(num) {
  21319. if (num < 10) {
  21320. num = `0${num}`;
  21321. }
  21322. return num;
  21323. }
  21324. function getDefaultSecond(hideSecond) {
  21325. return hideSecond ? "00:00" : "00:00:00";
  21326. }
  21327. function dateCompare(startDate, endDate) {
  21328. startDate = new Date(fixIosDateFormat(startDate));
  21329. endDate = new Date(fixIosDateFormat(endDate));
  21330. return startDate <= endDate;
  21331. }
  21332. function checkDate(date3) {
  21333. const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
  21334. return date3.match(dateReg);
  21335. }
  21336. 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])?$/;
  21337. function fixIosDateFormat(value2) {
  21338. if (typeof value2 === "string" && dateTimeReg.test(value2)) {
  21339. value2 = value2.replace(/-/g, "/");
  21340. }
  21341. return value2;
  21342. }
  21343. const _sfc_main$T = {
  21344. props: {
  21345. weeks: {
  21346. type: Object,
  21347. default() {
  21348. return {};
  21349. }
  21350. },
  21351. calendar: {
  21352. type: Object,
  21353. default: () => {
  21354. return {};
  21355. }
  21356. },
  21357. selected: {
  21358. type: Array,
  21359. default: () => {
  21360. return [];
  21361. }
  21362. },
  21363. checkHover: {
  21364. type: Boolean,
  21365. default: false
  21366. }
  21367. },
  21368. methods: {
  21369. choiceDate(weeks) {
  21370. this.$emit("change", weeks);
  21371. },
  21372. handleMousemove(weeks) {
  21373. this.$emit("handleMouse", weeks);
  21374. }
  21375. }
  21376. };
  21377. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  21378. return vue.openBlock(), vue.createElementBlock(
  21379. "view",
  21380. {
  21381. class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
  21382. "uni-calendar-item--disable": $props.weeks.disable,
  21383. "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
  21384. "uni-calendar-item--multiple": $props.weeks.multiple,
  21385. "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
  21386. }]),
  21387. onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
  21388. onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
  21389. },
  21390. [
  21391. vue.createElementVNode(
  21392. "view",
  21393. {
  21394. class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
  21395. "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
  21396. "uni-calendar-item--checked-range-text": $props.checkHover,
  21397. "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
  21398. "uni-calendar-item--multiple": $props.weeks.multiple,
  21399. "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
  21400. "uni-calendar-item--disable": $props.weeks.disable
  21401. }])
  21402. },
  21403. [
  21404. $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  21405. key: 0,
  21406. class: "uni-calendar-item__weeks-box-circle"
  21407. })) : vue.createCommentVNode("v-if", true),
  21408. vue.createElementVNode(
  21409. "text",
  21410. { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
  21411. vue.toDisplayString($props.weeks.date),
  21412. 1
  21413. /* TEXT */
  21414. )
  21415. ],
  21416. 2
  21417. /* CLASS */
  21418. ),
  21419. vue.createElementVNode(
  21420. "view",
  21421. {
  21422. class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday })
  21423. },
  21424. null,
  21425. 2
  21426. /* CLASS */
  21427. )
  21428. ],
  21429. 34
  21430. /* CLASS, NEED_HYDRATION */
  21431. );
  21432. }
  21433. const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-3c762a01"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
  21434. const isObject$1 = (val) => val !== null && typeof val === "object";
  21435. const defaultDelimiters = ["{", "}"];
  21436. class BaseFormatter {
  21437. constructor() {
  21438. this._caches = /* @__PURE__ */ Object.create(null);
  21439. }
  21440. interpolate(message, values, delimiters = defaultDelimiters) {
  21441. if (!values) {
  21442. return [message];
  21443. }
  21444. let tokens = this._caches[message];
  21445. if (!tokens) {
  21446. tokens = parse(message, delimiters);
  21447. this._caches[message] = tokens;
  21448. }
  21449. return compile(tokens, values);
  21450. }
  21451. }
  21452. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  21453. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  21454. function parse(format2, [startDelimiter, endDelimiter]) {
  21455. const tokens = [];
  21456. let position = 0;
  21457. let text = "";
  21458. while (position < format2.length) {
  21459. let char = format2[position++];
  21460. if (char === startDelimiter) {
  21461. if (text) {
  21462. tokens.push({ type: "text", value: text });
  21463. }
  21464. text = "";
  21465. let sub = "";
  21466. char = format2[position++];
  21467. while (char !== void 0 && char !== endDelimiter) {
  21468. sub += char;
  21469. char = format2[position++];
  21470. }
  21471. const isClosed = char === endDelimiter;
  21472. const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  21473. tokens.push({ value: sub, type: type2 });
  21474. } else {
  21475. text += char;
  21476. }
  21477. }
  21478. text && tokens.push({ type: "text", value: text });
  21479. return tokens;
  21480. }
  21481. function compile(tokens, values) {
  21482. const compiled = [];
  21483. let index2 = 0;
  21484. const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
  21485. if (mode === "unknown") {
  21486. return compiled;
  21487. }
  21488. while (index2 < tokens.length) {
  21489. const token = tokens[index2];
  21490. switch (token.type) {
  21491. case "text":
  21492. compiled.push(token.value);
  21493. break;
  21494. case "list":
  21495. compiled.push(values[parseInt(token.value, 10)]);
  21496. break;
  21497. case "named":
  21498. if (mode === "named") {
  21499. compiled.push(values[token.value]);
  21500. } else {
  21501. {
  21502. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  21503. }
  21504. }
  21505. break;
  21506. case "unknown":
  21507. {
  21508. console.warn(`Detect 'unknown' type of token!`);
  21509. }
  21510. break;
  21511. }
  21512. index2++;
  21513. }
  21514. return compiled;
  21515. }
  21516. const LOCALE_ZH_HANS = "zh-Hans";
  21517. const LOCALE_ZH_HANT = "zh-Hant";
  21518. const LOCALE_EN = "en";
  21519. const LOCALE_FR = "fr";
  21520. const LOCALE_ES = "es";
  21521. const hasOwnProperty = Object.prototype.hasOwnProperty;
  21522. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  21523. const defaultFormatter = new BaseFormatter();
  21524. function include(str, parts) {
  21525. return !!parts.find((part) => str.indexOf(part) !== -1);
  21526. }
  21527. function startsWith(str, parts) {
  21528. return parts.find((part) => str.indexOf(part) === 0);
  21529. }
  21530. function normalizeLocale(locale, messages2) {
  21531. if (!locale) {
  21532. return;
  21533. }
  21534. locale = locale.trim().replace(/_/g, "-");
  21535. if (messages2 && messages2[locale]) {
  21536. return locale;
  21537. }
  21538. locale = locale.toLowerCase();
  21539. if (locale === "chinese") {
  21540. return LOCALE_ZH_HANS;
  21541. }
  21542. if (locale.indexOf("zh") === 0) {
  21543. if (locale.indexOf("-hans") > -1) {
  21544. return LOCALE_ZH_HANS;
  21545. }
  21546. if (locale.indexOf("-hant") > -1) {
  21547. return LOCALE_ZH_HANT;
  21548. }
  21549. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  21550. return LOCALE_ZH_HANT;
  21551. }
  21552. return LOCALE_ZH_HANS;
  21553. }
  21554. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  21555. if (messages2 && Object.keys(messages2).length > 0) {
  21556. locales = Object.keys(messages2);
  21557. }
  21558. const lang = startsWith(locale, locales);
  21559. if (lang) {
  21560. return lang;
  21561. }
  21562. }
  21563. class I18n {
  21564. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  21565. this.locale = LOCALE_EN;
  21566. this.fallbackLocale = LOCALE_EN;
  21567. this.message = {};
  21568. this.messages = {};
  21569. this.watchers = [];
  21570. if (fallbackLocale) {
  21571. this.fallbackLocale = fallbackLocale;
  21572. }
  21573. this.formater = formater2 || defaultFormatter;
  21574. this.messages = messages2 || {};
  21575. this.setLocale(locale || LOCALE_EN);
  21576. if (watcher) {
  21577. this.watchLocale(watcher);
  21578. }
  21579. }
  21580. setLocale(locale) {
  21581. const oldLocale = this.locale;
  21582. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  21583. if (!this.messages[this.locale]) {
  21584. this.messages[this.locale] = {};
  21585. }
  21586. this.message = this.messages[this.locale];
  21587. if (oldLocale !== this.locale) {
  21588. this.watchers.forEach((watcher) => {
  21589. watcher(this.locale, oldLocale);
  21590. });
  21591. }
  21592. }
  21593. getLocale() {
  21594. return this.locale;
  21595. }
  21596. watchLocale(fn) {
  21597. const index2 = this.watchers.push(fn) - 1;
  21598. return () => {
  21599. this.watchers.splice(index2, 1);
  21600. };
  21601. }
  21602. add(locale, message, override = true) {
  21603. const curMessages = this.messages[locale];
  21604. if (curMessages) {
  21605. if (override) {
  21606. Object.assign(curMessages, message);
  21607. } else {
  21608. Object.keys(message).forEach((key) => {
  21609. if (!hasOwn(curMessages, key)) {
  21610. curMessages[key] = message[key];
  21611. }
  21612. });
  21613. }
  21614. } else {
  21615. this.messages[locale] = message;
  21616. }
  21617. }
  21618. f(message, values, delimiters) {
  21619. return this.formater.interpolate(message, values, delimiters).join("");
  21620. }
  21621. t(key, locale, values) {
  21622. let message = this.message;
  21623. if (typeof locale === "string") {
  21624. locale = normalizeLocale(locale, this.messages);
  21625. locale && (message = this.messages[locale]);
  21626. } else {
  21627. values = locale;
  21628. }
  21629. if (!hasOwn(message, key)) {
  21630. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  21631. return key;
  21632. }
  21633. return this.formater.interpolate(message[key], values).join("");
  21634. }
  21635. }
  21636. function watchAppLocale(appVm, i18n) {
  21637. if (appVm.$watchLocale) {
  21638. appVm.$watchLocale((newLocale) => {
  21639. i18n.setLocale(newLocale);
  21640. });
  21641. } else {
  21642. appVm.$watch(() => appVm.$locale, (newLocale) => {
  21643. i18n.setLocale(newLocale);
  21644. });
  21645. }
  21646. }
  21647. function getDefaultLocale() {
  21648. if (typeof uni !== "undefined" && uni.getLocale) {
  21649. return uni.getLocale();
  21650. }
  21651. if (typeof global !== "undefined" && global.getLocale) {
  21652. return global.getLocale();
  21653. }
  21654. return LOCALE_EN;
  21655. }
  21656. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  21657. if (typeof locale !== "string") {
  21658. const options = [
  21659. messages2,
  21660. locale
  21661. ];
  21662. locale = options[0];
  21663. messages2 = options[1];
  21664. }
  21665. if (typeof locale !== "string") {
  21666. locale = getDefaultLocale();
  21667. }
  21668. if (typeof fallbackLocale !== "string") {
  21669. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  21670. }
  21671. const i18n = new I18n({
  21672. locale,
  21673. fallbackLocale,
  21674. messages: messages2,
  21675. watcher
  21676. });
  21677. let t2 = (key, values) => {
  21678. if (typeof getApp !== "function") {
  21679. t2 = function(key2, values2) {
  21680. return i18n.t(key2, values2);
  21681. };
  21682. } else {
  21683. let isWatchedAppLocale = false;
  21684. t2 = function(key2, values2) {
  21685. const appVm = getApp().$vm;
  21686. if (appVm) {
  21687. appVm.$locale;
  21688. if (!isWatchedAppLocale) {
  21689. isWatchedAppLocale = true;
  21690. watchAppLocale(appVm, i18n);
  21691. }
  21692. }
  21693. return i18n.t(key2, values2);
  21694. };
  21695. }
  21696. return t2(key, values);
  21697. };
  21698. return {
  21699. i18n,
  21700. f(message, values, delimiters) {
  21701. return i18n.f(message, values, delimiters);
  21702. },
  21703. t(key, values) {
  21704. return t2(key, values);
  21705. },
  21706. add(locale2, message, override = true) {
  21707. return i18n.add(locale2, message, override);
  21708. },
  21709. watch(fn) {
  21710. return i18n.watchLocale(fn);
  21711. },
  21712. getLocale() {
  21713. return i18n.getLocale();
  21714. },
  21715. setLocale(newLocale) {
  21716. return i18n.setLocale(newLocale);
  21717. }
  21718. };
  21719. }
  21720. const en = {
  21721. "uni-datetime-picker.selectDate": "select date",
  21722. "uni-datetime-picker.selectTime": "select time",
  21723. "uni-datetime-picker.selectDateTime": "select date and time",
  21724. "uni-datetime-picker.startDate": "start date",
  21725. "uni-datetime-picker.endDate": "end date",
  21726. "uni-datetime-picker.startTime": "start time",
  21727. "uni-datetime-picker.endTime": "end time",
  21728. "uni-datetime-picker.ok": "ok",
  21729. "uni-datetime-picker.clear": "clear",
  21730. "uni-datetime-picker.cancel": "cancel",
  21731. "uni-datetime-picker.year": "-",
  21732. "uni-datetime-picker.month": "",
  21733. "uni-calender.MON": "MON",
  21734. "uni-calender.TUE": "TUE",
  21735. "uni-calender.WED": "WED",
  21736. "uni-calender.THU": "THU",
  21737. "uni-calender.FRI": "FRI",
  21738. "uni-calender.SAT": "SAT",
  21739. "uni-calender.SUN": "SUN",
  21740. "uni-calender.confirm": "confirm"
  21741. };
  21742. const zhHans = {
  21743. "uni-datetime-picker.selectDate": "选择日期",
  21744. "uni-datetime-picker.selectTime": "选择时间",
  21745. "uni-datetime-picker.selectDateTime": "选择日期时间",
  21746. "uni-datetime-picker.startDate": "开始日期",
  21747. "uni-datetime-picker.endDate": "结束日期",
  21748. "uni-datetime-picker.startTime": "开始时间",
  21749. "uni-datetime-picker.endTime": "结束时间",
  21750. "uni-datetime-picker.ok": "确定",
  21751. "uni-datetime-picker.clear": "清除",
  21752. "uni-datetime-picker.cancel": "取消",
  21753. "uni-datetime-picker.year": "年",
  21754. "uni-datetime-picker.month": "月",
  21755. "uni-calender.SUN": "日",
  21756. "uni-calender.MON": "一",
  21757. "uni-calender.TUE": "二",
  21758. "uni-calender.WED": "三",
  21759. "uni-calender.THU": "四",
  21760. "uni-calender.FRI": "五",
  21761. "uni-calender.SAT": "六",
  21762. "uni-calender.confirm": "确认"
  21763. };
  21764. const zhHant = {
  21765. "uni-datetime-picker.selectDate": "選擇日期",
  21766. "uni-datetime-picker.selectTime": "選擇時間",
  21767. "uni-datetime-picker.selectDateTime": "選擇日期時間",
  21768. "uni-datetime-picker.startDate": "開始日期",
  21769. "uni-datetime-picker.endDate": "結束日期",
  21770. "uni-datetime-picker.startTime": "開始时间",
  21771. "uni-datetime-picker.endTime": "結束时间",
  21772. "uni-datetime-picker.ok": "確定",
  21773. "uni-datetime-picker.clear": "清除",
  21774. "uni-datetime-picker.cancel": "取消",
  21775. "uni-datetime-picker.year": "年",
  21776. "uni-datetime-picker.month": "月",
  21777. "uni-calender.SUN": "日",
  21778. "uni-calender.MON": "一",
  21779. "uni-calender.TUE": "二",
  21780. "uni-calender.WED": "三",
  21781. "uni-calender.THU": "四",
  21782. "uni-calender.FRI": "五",
  21783. "uni-calender.SAT": "六",
  21784. "uni-calender.confirm": "確認"
  21785. };
  21786. const i18nMessages = {
  21787. en,
  21788. "zh-Hans": zhHans,
  21789. "zh-Hant": zhHant
  21790. };
  21791. const { t: t$1 } = initVueI18n(i18nMessages);
  21792. const _sfc_main$S = {
  21793. name: "UniDatetimePicker",
  21794. data() {
  21795. return {
  21796. indicatorStyle: `height: 50px;`,
  21797. visible: false,
  21798. fixNvueBug: {},
  21799. dateShow: true,
  21800. timeShow: true,
  21801. title: "日期和时间",
  21802. // 输入框当前时间
  21803. time: "",
  21804. // 当前的年月日时分秒
  21805. year: 1920,
  21806. month: 0,
  21807. day: 0,
  21808. hour: 0,
  21809. minute: 0,
  21810. second: 0,
  21811. // 起始时间
  21812. startYear: 1920,
  21813. startMonth: 1,
  21814. startDay: 1,
  21815. startHour: 0,
  21816. startMinute: 0,
  21817. startSecond: 0,
  21818. // 结束时间
  21819. endYear: 2120,
  21820. endMonth: 12,
  21821. endDay: 31,
  21822. endHour: 23,
  21823. endMinute: 59,
  21824. endSecond: 59
  21825. };
  21826. },
  21827. props: {
  21828. type: {
  21829. type: String,
  21830. default: "datetime"
  21831. },
  21832. value: {
  21833. type: [String, Number],
  21834. default: ""
  21835. },
  21836. modelValue: {
  21837. type: [String, Number],
  21838. default: ""
  21839. },
  21840. start: {
  21841. type: [Number, String],
  21842. default: ""
  21843. },
  21844. end: {
  21845. type: [Number, String],
  21846. default: ""
  21847. },
  21848. returnType: {
  21849. type: String,
  21850. default: "string"
  21851. },
  21852. disabled: {
  21853. type: [Boolean, String],
  21854. default: false
  21855. },
  21856. border: {
  21857. type: [Boolean, String],
  21858. default: true
  21859. },
  21860. hideSecond: {
  21861. type: [Boolean, String],
  21862. default: false
  21863. }
  21864. },
  21865. watch: {
  21866. modelValue: {
  21867. handler(newVal) {
  21868. if (newVal) {
  21869. this.parseValue(fixIosDateFormat(newVal));
  21870. this.initTime(false);
  21871. } else {
  21872. this.time = "";
  21873. this.parseValue(Date.now());
  21874. }
  21875. },
  21876. immediate: true
  21877. },
  21878. type: {
  21879. handler(newValue) {
  21880. if (newValue === "date") {
  21881. this.dateShow = true;
  21882. this.timeShow = false;
  21883. this.title = "日期";
  21884. } else if (newValue === "time") {
  21885. this.dateShow = false;
  21886. this.timeShow = true;
  21887. this.title = "时间";
  21888. } else {
  21889. this.dateShow = true;
  21890. this.timeShow = true;
  21891. this.title = "日期和时间";
  21892. }
  21893. },
  21894. immediate: true
  21895. },
  21896. start: {
  21897. handler(newVal) {
  21898. this.parseDatetimeRange(fixIosDateFormat(newVal), "start");
  21899. },
  21900. immediate: true
  21901. },
  21902. end: {
  21903. handler(newVal) {
  21904. this.parseDatetimeRange(fixIosDateFormat(newVal), "end");
  21905. },
  21906. immediate: true
  21907. },
  21908. // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  21909. months(newVal) {
  21910. this.checkValue("month", this.month, newVal);
  21911. },
  21912. days(newVal) {
  21913. this.checkValue("day", this.day, newVal);
  21914. },
  21915. hours(newVal) {
  21916. this.checkValue("hour", this.hour, newVal);
  21917. },
  21918. minutes(newVal) {
  21919. this.checkValue("minute", this.minute, newVal);
  21920. },
  21921. seconds(newVal) {
  21922. this.checkValue("second", this.second, newVal);
  21923. }
  21924. },
  21925. computed: {
  21926. // 当前年、月、日、时、分、秒选择范围
  21927. years() {
  21928. return this.getCurrentRange("year");
  21929. },
  21930. months() {
  21931. return this.getCurrentRange("month");
  21932. },
  21933. days() {
  21934. return this.getCurrentRange("day");
  21935. },
  21936. hours() {
  21937. return this.getCurrentRange("hour");
  21938. },
  21939. minutes() {
  21940. return this.getCurrentRange("minute");
  21941. },
  21942. seconds() {
  21943. return this.getCurrentRange("second");
  21944. },
  21945. // picker 当前值数组
  21946. ymd() {
  21947. return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
  21948. },
  21949. hms() {
  21950. return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
  21951. },
  21952. // 当前 date 是 start
  21953. currentDateIsStart() {
  21954. return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
  21955. },
  21956. // 当前 date 是 end
  21957. currentDateIsEnd() {
  21958. return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
  21959. },
  21960. // 当前年、月、日、时、分、秒的最小值和最大值
  21961. minYear() {
  21962. return this.startYear;
  21963. },
  21964. maxYear() {
  21965. return this.endYear;
  21966. },
  21967. minMonth() {
  21968. if (this.year === this.startYear) {
  21969. return this.startMonth;
  21970. } else {
  21971. return 1;
  21972. }
  21973. },
  21974. maxMonth() {
  21975. if (this.year === this.endYear) {
  21976. return this.endMonth;
  21977. } else {
  21978. return 12;
  21979. }
  21980. },
  21981. minDay() {
  21982. if (this.year === this.startYear && this.month === this.startMonth) {
  21983. return this.startDay;
  21984. } else {
  21985. return 1;
  21986. }
  21987. },
  21988. maxDay() {
  21989. if (this.year === this.endYear && this.month === this.endMonth) {
  21990. return this.endDay;
  21991. } else {
  21992. return this.daysInMonth(this.year, this.month);
  21993. }
  21994. },
  21995. minHour() {
  21996. if (this.type === "datetime") {
  21997. if (this.currentDateIsStart) {
  21998. return this.startHour;
  21999. } else {
  22000. return 0;
  22001. }
  22002. }
  22003. if (this.type === "time") {
  22004. return this.startHour;
  22005. }
  22006. },
  22007. maxHour() {
  22008. if (this.type === "datetime") {
  22009. if (this.currentDateIsEnd) {
  22010. return this.endHour;
  22011. } else {
  22012. return 23;
  22013. }
  22014. }
  22015. if (this.type === "time") {
  22016. return this.endHour;
  22017. }
  22018. },
  22019. minMinute() {
  22020. if (this.type === "datetime") {
  22021. if (this.currentDateIsStart && this.hour === this.startHour) {
  22022. return this.startMinute;
  22023. } else {
  22024. return 0;
  22025. }
  22026. }
  22027. if (this.type === "time") {
  22028. if (this.hour === this.startHour) {
  22029. return this.startMinute;
  22030. } else {
  22031. return 0;
  22032. }
  22033. }
  22034. },
  22035. maxMinute() {
  22036. if (this.type === "datetime") {
  22037. if (this.currentDateIsEnd && this.hour === this.endHour) {
  22038. return this.endMinute;
  22039. } else {
  22040. return 59;
  22041. }
  22042. }
  22043. if (this.type === "time") {
  22044. if (this.hour === this.endHour) {
  22045. return this.endMinute;
  22046. } else {
  22047. return 59;
  22048. }
  22049. }
  22050. },
  22051. minSecond() {
  22052. if (this.type === "datetime") {
  22053. if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
  22054. return this.startSecond;
  22055. } else {
  22056. return 0;
  22057. }
  22058. }
  22059. if (this.type === "time") {
  22060. if (this.hour === this.startHour && this.minute === this.startMinute) {
  22061. return this.startSecond;
  22062. } else {
  22063. return 0;
  22064. }
  22065. }
  22066. },
  22067. maxSecond() {
  22068. if (this.type === "datetime") {
  22069. if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
  22070. return this.endSecond;
  22071. } else {
  22072. return 59;
  22073. }
  22074. }
  22075. if (this.type === "time") {
  22076. if (this.hour === this.endHour && this.minute === this.endMinute) {
  22077. return this.endSecond;
  22078. } else {
  22079. return 59;
  22080. }
  22081. }
  22082. },
  22083. /**
  22084. * for i18n
  22085. */
  22086. selectTimeText() {
  22087. return t$1("uni-datetime-picker.selectTime");
  22088. },
  22089. okText() {
  22090. return t$1("uni-datetime-picker.ok");
  22091. },
  22092. clearText() {
  22093. return t$1("uni-datetime-picker.clear");
  22094. },
  22095. cancelText() {
  22096. return t$1("uni-datetime-picker.cancel");
  22097. }
  22098. },
  22099. mounted() {
  22100. },
  22101. methods: {
  22102. /**
  22103. * @param {Object} item
  22104. * 小于 10 在前面加个 0
  22105. */
  22106. lessThanTen(item) {
  22107. return item < 10 ? "0" + item : item;
  22108. },
  22109. /**
  22110. * 解析时分秒字符串,例如:00:00:00
  22111. * @param {String} timeString
  22112. */
  22113. parseTimeType(timeString) {
  22114. if (timeString) {
  22115. let timeArr = timeString.split(":");
  22116. this.hour = Number(timeArr[0]);
  22117. this.minute = Number(timeArr[1]);
  22118. this.second = Number(timeArr[2]);
  22119. }
  22120. },
  22121. /**
  22122. * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
  22123. * @param {String | Number} datetime
  22124. */
  22125. initPickerValue(datetime) {
  22126. let defaultValue = null;
  22127. if (datetime) {
  22128. defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
  22129. } else {
  22130. defaultValue = Date.now();
  22131. defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
  22132. }
  22133. this.parseValue(defaultValue);
  22134. },
  22135. /**
  22136. * 初始值规则:
  22137. * - 用户设置初始值 value
  22138. * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
  22139. * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
  22140. * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
  22141. * - 无起始终止时间,则初始值为 value
  22142. * - 无初始值 value,则初始值为当前本地时间 Date.now()
  22143. * @param {Object} value
  22144. * @param {Object} dateBase
  22145. */
  22146. compareValueWithStartAndEnd(value2, start, end) {
  22147. let winner = null;
  22148. value2 = this.superTimeStamp(value2);
  22149. start = this.superTimeStamp(start);
  22150. end = this.superTimeStamp(end);
  22151. if (start && end) {
  22152. if (value2 < start) {
  22153. winner = new Date(start);
  22154. } else if (value2 > end) {
  22155. winner = new Date(end);
  22156. } else {
  22157. winner = new Date(value2);
  22158. }
  22159. } else if (start && !end) {
  22160. winner = start <= value2 ? new Date(value2) : new Date(start);
  22161. } else if (!start && end) {
  22162. winner = value2 <= end ? new Date(value2) : new Date(end);
  22163. } else {
  22164. winner = new Date(value2);
  22165. }
  22166. return winner;
  22167. },
  22168. /**
  22169. * 转换为可比较的时间戳,接受日期、时分秒、时间戳
  22170. * @param {Object} value
  22171. */
  22172. superTimeStamp(value2) {
  22173. let dateBase = "";
  22174. if (this.type === "time" && value2 && typeof value2 === "string") {
  22175. const now2 = /* @__PURE__ */ new Date();
  22176. const year = now2.getFullYear();
  22177. const month = now2.getMonth() + 1;
  22178. const day = now2.getDate();
  22179. dateBase = year + "/" + month + "/" + day + " ";
  22180. }
  22181. if (Number(value2)) {
  22182. value2 = parseInt(value2);
  22183. dateBase = 0;
  22184. }
  22185. return this.createTimeStamp(dateBase + value2);
  22186. },
  22187. /**
  22188. * 解析默认值 value,字符串、时间戳
  22189. * @param {Object} defaultTime
  22190. */
  22191. parseValue(value2) {
  22192. if (!value2) {
  22193. return;
  22194. }
  22195. if (this.type === "time" && typeof value2 === "string") {
  22196. this.parseTimeType(value2);
  22197. } else {
  22198. let defaultDate = null;
  22199. defaultDate = new Date(value2);
  22200. if (this.type !== "time") {
  22201. this.year = defaultDate.getFullYear();
  22202. this.month = defaultDate.getMonth() + 1;
  22203. this.day = defaultDate.getDate();
  22204. }
  22205. if (this.type !== "date") {
  22206. this.hour = defaultDate.getHours();
  22207. this.minute = defaultDate.getMinutes();
  22208. this.second = defaultDate.getSeconds();
  22209. }
  22210. }
  22211. if (this.hideSecond) {
  22212. this.second = 0;
  22213. }
  22214. },
  22215. /**
  22216. * 解析可选择时间范围 start、end,年月日字符串、时间戳
  22217. * @param {Object} defaultTime
  22218. */
  22219. parseDatetimeRange(point, pointType) {
  22220. if (!point) {
  22221. if (pointType === "start") {
  22222. this.startYear = 1920;
  22223. this.startMonth = 1;
  22224. this.startDay = 1;
  22225. this.startHour = 0;
  22226. this.startMinute = 0;
  22227. this.startSecond = 0;
  22228. }
  22229. if (pointType === "end") {
  22230. this.endYear = 2120;
  22231. this.endMonth = 12;
  22232. this.endDay = 31;
  22233. this.endHour = 23;
  22234. this.endMinute = 59;
  22235. this.endSecond = 59;
  22236. }
  22237. return;
  22238. }
  22239. if (this.type === "time") {
  22240. const pointArr = point.split(":");
  22241. this[pointType + "Hour"] = Number(pointArr[0]);
  22242. this[pointType + "Minute"] = Number(pointArr[1]);
  22243. this[pointType + "Second"] = Number(pointArr[2]);
  22244. } else {
  22245. if (!point) {
  22246. pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
  22247. return;
  22248. }
  22249. if (Number(point)) {
  22250. point = parseInt(point);
  22251. }
  22252. const hasTime = /[0-9]:[0-9]/;
  22253. if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
  22254. point
  22255. )) {
  22256. point = point + " 23:59:59";
  22257. }
  22258. const pointDate = new Date(point);
  22259. this[pointType + "Year"] = pointDate.getFullYear();
  22260. this[pointType + "Month"] = pointDate.getMonth() + 1;
  22261. this[pointType + "Day"] = pointDate.getDate();
  22262. if (this.type === "datetime") {
  22263. this[pointType + "Hour"] = pointDate.getHours();
  22264. this[pointType + "Minute"] = pointDate.getMinutes();
  22265. this[pointType + "Second"] = pointDate.getSeconds();
  22266. }
  22267. }
  22268. },
  22269. // 获取 年、月、日、时、分、秒 当前可选范围
  22270. getCurrentRange(value2) {
  22271. const range2 = [];
  22272. for (let i = this["min" + this.capitalize(value2)]; i <= this["max" + this.capitalize(value2)]; i++) {
  22273. range2.push(i);
  22274. }
  22275. return range2;
  22276. },
  22277. // 字符串首字母大写
  22278. capitalize(str) {
  22279. return str.charAt(0).toUpperCase() + str.slice(1);
  22280. },
  22281. // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22282. checkValue(name, value2, values) {
  22283. if (values.indexOf(value2) === -1) {
  22284. this[name] = values[0];
  22285. }
  22286. },
  22287. // 每个月的实际天数
  22288. daysInMonth(year, month) {
  22289. return new Date(year, month, 0).getDate();
  22290. },
  22291. //兼容 iOS、safari 日期格式
  22292. fixIosDateFormat(value2) {
  22293. if (typeof value2 === "string") {
  22294. value2 = value2.replace(/-/g, "/");
  22295. }
  22296. return value2;
  22297. },
  22298. /**
  22299. * 生成时间戳
  22300. * @param {Object} time
  22301. */
  22302. createTimeStamp(time) {
  22303. if (!time)
  22304. return;
  22305. if (typeof time === "number") {
  22306. return time;
  22307. } else {
  22308. time = time.replace(/-/g, "/");
  22309. if (this.type === "date") {
  22310. time = time + " 00:00:00";
  22311. }
  22312. return Date.parse(time);
  22313. }
  22314. },
  22315. /**
  22316. * 生成日期或时间的字符串
  22317. */
  22318. createDomSting() {
  22319. const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
  22320. let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
  22321. if (!this.hideSecond) {
  22322. hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
  22323. }
  22324. if (this.type === "date") {
  22325. return yymmdd;
  22326. } else if (this.type === "time") {
  22327. return hhmmss;
  22328. } else {
  22329. return yymmdd + " " + hhmmss;
  22330. }
  22331. },
  22332. /**
  22333. * 初始化返回值,并抛出 change 事件
  22334. */
  22335. initTime(emit2 = true) {
  22336. this.time = this.createDomSting();
  22337. if (!emit2)
  22338. return;
  22339. if (this.returnType === "timestamp" && this.type !== "time") {
  22340. this.$emit("change", this.createTimeStamp(this.time));
  22341. this.$emit("input", this.createTimeStamp(this.time));
  22342. this.$emit("update:modelValue", this.createTimeStamp(this.time));
  22343. } else {
  22344. this.$emit("change", this.time);
  22345. this.$emit("input", this.time);
  22346. this.$emit("update:modelValue", this.time);
  22347. }
  22348. },
  22349. /**
  22350. * 用户选择日期或时间更新 data
  22351. * @param {Object} e
  22352. */
  22353. bindDateChange(e) {
  22354. const val = e.detail.value;
  22355. this.year = this.years[val[0]];
  22356. this.month = this.months[val[1]];
  22357. this.day = this.days[val[2]];
  22358. },
  22359. bindTimeChange(e) {
  22360. const val = e.detail.value;
  22361. this.hour = this.hours[val[0]];
  22362. this.minute = this.minutes[val[1]];
  22363. this.second = this.seconds[val[2]];
  22364. },
  22365. /**
  22366. * 初始化弹出层
  22367. */
  22368. initTimePicker() {
  22369. if (this.disabled)
  22370. return;
  22371. const value2 = fixIosDateFormat(this.time);
  22372. this.initPickerValue(value2);
  22373. this.visible = !this.visible;
  22374. },
  22375. /**
  22376. * 触发或关闭弹框
  22377. */
  22378. tiggerTimePicker(e) {
  22379. this.visible = !this.visible;
  22380. },
  22381. /**
  22382. * 用户点击“清空”按钮,清空当前值
  22383. */
  22384. clearTime() {
  22385. this.time = "";
  22386. this.$emit("change", this.time);
  22387. this.$emit("input", this.time);
  22388. this.$emit("update:modelValue", this.time);
  22389. this.tiggerTimePicker();
  22390. },
  22391. /**
  22392. * 用户点击“确定”按钮
  22393. */
  22394. setTime() {
  22395. this.initTime();
  22396. this.tiggerTimePicker();
  22397. }
  22398. }
  22399. };
  22400. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  22401. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
  22402. vue.createElementVNode("view", {
  22403. onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
  22404. }, [
  22405. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  22406. vue.createElementVNode(
  22407. "view",
  22408. {
  22409. class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
  22410. },
  22411. [
  22412. vue.createElementVNode(
  22413. "text",
  22414. { class: "uni-datetime-picker-text" },
  22415. vue.toDisplayString($data.time),
  22416. 1
  22417. /* TEXT */
  22418. ),
  22419. !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
  22420. key: 0,
  22421. class: "uni-datetime-picker-time"
  22422. }, [
  22423. vue.createElementVNode(
  22424. "text",
  22425. { class: "uni-datetime-picker-text" },
  22426. vue.toDisplayString($options.selectTimeText),
  22427. 1
  22428. /* TEXT */
  22429. )
  22430. ])) : vue.createCommentVNode("v-if", true)
  22431. ],
  22432. 2
  22433. /* CLASS */
  22434. )
  22435. ], true)
  22436. ]),
  22437. $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  22438. key: 0,
  22439. id: "mask",
  22440. class: "uni-datetime-picker-mask",
  22441. onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22442. })) : vue.createCommentVNode("v-if", true),
  22443. $data.visible ? (vue.openBlock(), vue.createElementBlock(
  22444. "view",
  22445. {
  22446. key: 1,
  22447. class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
  22448. style: vue.normalizeStyle($data.fixNvueBug)
  22449. },
  22450. [
  22451. vue.createElementVNode("view", { class: "uni-title" }, [
  22452. vue.createElementVNode(
  22453. "text",
  22454. { class: "uni-datetime-picker-text" },
  22455. vue.toDisplayString($options.selectTimeText),
  22456. 1
  22457. /* TEXT */
  22458. )
  22459. ]),
  22460. $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22461. key: 0,
  22462. class: "uni-datetime-picker__container-box"
  22463. }, [
  22464. vue.createElementVNode("picker-view", {
  22465. class: "uni-datetime-picker-view",
  22466. "indicator-style": $data.indicatorStyle,
  22467. value: $options.ymd,
  22468. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  22469. }, [
  22470. vue.createElementVNode("picker-view-column", null, [
  22471. (vue.openBlock(true), vue.createElementBlock(
  22472. vue.Fragment,
  22473. null,
  22474. vue.renderList($options.years, (item, index2) => {
  22475. return vue.openBlock(), vue.createElementBlock("view", {
  22476. class: "uni-datetime-picker-item",
  22477. key: index2
  22478. }, [
  22479. vue.createElementVNode(
  22480. "text",
  22481. { class: "uni-datetime-picker-item" },
  22482. vue.toDisplayString($options.lessThanTen(item)),
  22483. 1
  22484. /* TEXT */
  22485. )
  22486. ]);
  22487. }),
  22488. 128
  22489. /* KEYED_FRAGMENT */
  22490. ))
  22491. ]),
  22492. vue.createElementVNode("picker-view-column", null, [
  22493. (vue.openBlock(true), vue.createElementBlock(
  22494. vue.Fragment,
  22495. null,
  22496. vue.renderList($options.months, (item, index2) => {
  22497. return vue.openBlock(), vue.createElementBlock("view", {
  22498. class: "uni-datetime-picker-item",
  22499. key: index2
  22500. }, [
  22501. vue.createElementVNode(
  22502. "text",
  22503. { class: "uni-datetime-picker-item" },
  22504. vue.toDisplayString($options.lessThanTen(item)),
  22505. 1
  22506. /* TEXT */
  22507. )
  22508. ]);
  22509. }),
  22510. 128
  22511. /* KEYED_FRAGMENT */
  22512. ))
  22513. ]),
  22514. vue.createElementVNode("picker-view-column", null, [
  22515. (vue.openBlock(true), vue.createElementBlock(
  22516. vue.Fragment,
  22517. null,
  22518. vue.renderList($options.days, (item, index2) => {
  22519. return vue.openBlock(), vue.createElementBlock("view", {
  22520. class: "uni-datetime-picker-item",
  22521. key: index2
  22522. }, [
  22523. vue.createElementVNode(
  22524. "text",
  22525. { class: "uni-datetime-picker-item" },
  22526. vue.toDisplayString($options.lessThanTen(item)),
  22527. 1
  22528. /* TEXT */
  22529. )
  22530. ]);
  22531. }),
  22532. 128
  22533. /* KEYED_FRAGMENT */
  22534. ))
  22535. ])
  22536. ], 40, ["indicator-style", "value"]),
  22537. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22538. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
  22539. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
  22540. ])) : vue.createCommentVNode("v-if", true),
  22541. $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22542. key: 1,
  22543. class: "uni-datetime-picker__container-box"
  22544. }, [
  22545. vue.createElementVNode("picker-view", {
  22546. class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
  22547. "indicator-style": $data.indicatorStyle,
  22548. value: $options.hms,
  22549. onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
  22550. }, [
  22551. vue.createElementVNode("picker-view-column", null, [
  22552. (vue.openBlock(true), vue.createElementBlock(
  22553. vue.Fragment,
  22554. null,
  22555. vue.renderList($options.hours, (item, index2) => {
  22556. return vue.openBlock(), vue.createElementBlock("view", {
  22557. class: "uni-datetime-picker-item",
  22558. key: index2
  22559. }, [
  22560. vue.createElementVNode(
  22561. "text",
  22562. { class: "uni-datetime-picker-item" },
  22563. vue.toDisplayString($options.lessThanTen(item)),
  22564. 1
  22565. /* TEXT */
  22566. )
  22567. ]);
  22568. }),
  22569. 128
  22570. /* KEYED_FRAGMENT */
  22571. ))
  22572. ]),
  22573. vue.createElementVNode("picker-view-column", null, [
  22574. (vue.openBlock(true), vue.createElementBlock(
  22575. vue.Fragment,
  22576. null,
  22577. vue.renderList($options.minutes, (item, index2) => {
  22578. return vue.openBlock(), vue.createElementBlock("view", {
  22579. class: "uni-datetime-picker-item",
  22580. key: index2
  22581. }, [
  22582. vue.createElementVNode(
  22583. "text",
  22584. { class: "uni-datetime-picker-item" },
  22585. vue.toDisplayString($options.lessThanTen(item)),
  22586. 1
  22587. /* TEXT */
  22588. )
  22589. ]);
  22590. }),
  22591. 128
  22592. /* KEYED_FRAGMENT */
  22593. ))
  22594. ]),
  22595. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
  22596. (vue.openBlock(true), vue.createElementBlock(
  22597. vue.Fragment,
  22598. null,
  22599. vue.renderList($options.seconds, (item, index2) => {
  22600. return vue.openBlock(), vue.createElementBlock("view", {
  22601. class: "uni-datetime-picker-item",
  22602. key: index2
  22603. }, [
  22604. vue.createElementVNode(
  22605. "text",
  22606. { class: "uni-datetime-picker-item" },
  22607. vue.toDisplayString($options.lessThanTen(item)),
  22608. 1
  22609. /* TEXT */
  22610. )
  22611. ]);
  22612. }),
  22613. 128
  22614. /* KEYED_FRAGMENT */
  22615. ))
  22616. ])) : vue.createCommentVNode("v-if", true)
  22617. ], 42, ["indicator-style", "value"]),
  22618. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22619. vue.createElementVNode(
  22620. "text",
  22621. {
  22622. class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
  22623. },
  22624. ":",
  22625. 2
  22626. /* CLASS */
  22627. ),
  22628. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
  22629. key: 0,
  22630. class: "uni-datetime-picker-sign sign-right"
  22631. }, ":")) : vue.createCommentVNode("v-if", true)
  22632. ])) : vue.createCommentVNode("v-if", true),
  22633. vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
  22634. vue.createElementVNode("view", {
  22635. onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
  22636. }, [
  22637. vue.createElementVNode(
  22638. "text",
  22639. { class: "uni-datetime-picker-btn-text" },
  22640. vue.toDisplayString($options.clearText),
  22641. 1
  22642. /* TEXT */
  22643. )
  22644. ]),
  22645. vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
  22646. vue.createElementVNode("view", {
  22647. class: "uni-datetime-picker-cancel",
  22648. onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22649. }, [
  22650. vue.createElementVNode(
  22651. "text",
  22652. { class: "uni-datetime-picker-btn-text" },
  22653. vue.toDisplayString($options.cancelText),
  22654. 1
  22655. /* TEXT */
  22656. )
  22657. ]),
  22658. vue.createElementVNode("view", {
  22659. onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
  22660. }, [
  22661. vue.createElementVNode(
  22662. "text",
  22663. { class: "uni-datetime-picker-btn-text" },
  22664. vue.toDisplayString($options.okText),
  22665. 1
  22666. /* TEXT */
  22667. )
  22668. ])
  22669. ])
  22670. ])
  22671. ],
  22672. 6
  22673. /* CLASS, STYLE */
  22674. )) : vue.createCommentVNode("v-if", true)
  22675. ]);
  22676. }
  22677. const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-1d532b70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
  22678. const { t } = initVueI18n(i18nMessages);
  22679. const _sfc_main$R = {
  22680. components: {
  22681. calendarItem,
  22682. timePicker: TimePicker
  22683. },
  22684. props: {
  22685. date: {
  22686. type: String,
  22687. default: ""
  22688. },
  22689. defTime: {
  22690. type: [String, Object],
  22691. default: ""
  22692. },
  22693. selectableTimes: {
  22694. type: [Object],
  22695. default() {
  22696. return {};
  22697. }
  22698. },
  22699. selected: {
  22700. type: Array,
  22701. default() {
  22702. return [];
  22703. }
  22704. },
  22705. startDate: {
  22706. type: String,
  22707. default: ""
  22708. },
  22709. endDate: {
  22710. type: String,
  22711. default: ""
  22712. },
  22713. startPlaceholder: {
  22714. type: String,
  22715. default: ""
  22716. },
  22717. endPlaceholder: {
  22718. type: String,
  22719. default: ""
  22720. },
  22721. range: {
  22722. type: Boolean,
  22723. default: false
  22724. },
  22725. hasTime: {
  22726. type: Boolean,
  22727. default: false
  22728. },
  22729. insert: {
  22730. type: Boolean,
  22731. default: true
  22732. },
  22733. showMonth: {
  22734. type: Boolean,
  22735. default: true
  22736. },
  22737. clearDate: {
  22738. type: Boolean,
  22739. default: true
  22740. },
  22741. checkHover: {
  22742. type: Boolean,
  22743. default: true
  22744. },
  22745. hideSecond: {
  22746. type: [Boolean],
  22747. default: false
  22748. },
  22749. pleStatus: {
  22750. type: Object,
  22751. default() {
  22752. return {
  22753. before: "",
  22754. after: "",
  22755. data: [],
  22756. fulldate: ""
  22757. };
  22758. }
  22759. },
  22760. defaultValue: {
  22761. type: [String, Object, Array],
  22762. default: ""
  22763. }
  22764. },
  22765. data() {
  22766. return {
  22767. show: false,
  22768. weeks: [],
  22769. calendar: {},
  22770. nowDate: {},
  22771. aniMaskShow: false,
  22772. firstEnter: true,
  22773. time: "",
  22774. timeRange: {
  22775. startTime: "",
  22776. endTime: ""
  22777. },
  22778. tempSingleDate: "",
  22779. tempRange: {
  22780. before: "",
  22781. after: ""
  22782. }
  22783. };
  22784. },
  22785. watch: {
  22786. date: {
  22787. immediate: true,
  22788. handler(newVal) {
  22789. if (!this.range) {
  22790. this.tempSingleDate = newVal;
  22791. setTimeout(() => {
  22792. this.init(newVal);
  22793. }, 100);
  22794. }
  22795. }
  22796. },
  22797. defTime: {
  22798. immediate: true,
  22799. handler(newVal) {
  22800. if (!this.range) {
  22801. this.time = newVal;
  22802. } else {
  22803. this.timeRange.startTime = newVal.start;
  22804. this.timeRange.endTime = newVal.end;
  22805. }
  22806. }
  22807. },
  22808. startDate(val) {
  22809. if (!this.cale) {
  22810. return;
  22811. }
  22812. this.cale.setStartDate(val);
  22813. this.cale.setDate(this.nowDate.fullDate);
  22814. this.weeks = this.cale.weeks;
  22815. },
  22816. endDate(val) {
  22817. if (!this.cale) {
  22818. return;
  22819. }
  22820. this.cale.setEndDate(val);
  22821. this.cale.setDate(this.nowDate.fullDate);
  22822. this.weeks = this.cale.weeks;
  22823. },
  22824. selected(newVal) {
  22825. if (!this.cale) {
  22826. return;
  22827. }
  22828. this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
  22829. this.weeks = this.cale.weeks;
  22830. },
  22831. pleStatus: {
  22832. immediate: true,
  22833. handler(newVal) {
  22834. const {
  22835. before,
  22836. after,
  22837. fulldate,
  22838. which
  22839. } = newVal;
  22840. this.tempRange.before = before;
  22841. this.tempRange.after = after;
  22842. setTimeout(() => {
  22843. if (fulldate) {
  22844. this.cale.setHoverMultiple(fulldate);
  22845. if (before && after) {
  22846. this.cale.lastHover = true;
  22847. if (this.rangeWithinMonth(after, before))
  22848. return;
  22849. this.setDate(before);
  22850. } else {
  22851. this.cale.setMultiple(fulldate);
  22852. this.setDate(this.nowDate.fullDate);
  22853. this.calendar.fullDate = "";
  22854. this.cale.lastHover = false;
  22855. }
  22856. } else {
  22857. if (!this.cale) {
  22858. return;
  22859. }
  22860. this.cale.setDefaultMultiple(before, after);
  22861. if (which === "left" && before) {
  22862. this.setDate(before);
  22863. this.weeks = this.cale.weeks;
  22864. } else if (after) {
  22865. this.setDate(after);
  22866. this.weeks = this.cale.weeks;
  22867. }
  22868. this.cale.lastHover = true;
  22869. }
  22870. }, 16);
  22871. }
  22872. }
  22873. },
  22874. computed: {
  22875. timepickerStartTime() {
  22876. const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
  22877. return activeDate === this.startDate ? this.selectableTimes.start : "";
  22878. },
  22879. timepickerEndTime() {
  22880. const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
  22881. return activeDate === this.endDate ? this.selectableTimes.end : "";
  22882. },
  22883. /**
  22884. * for i18n
  22885. */
  22886. selectDateText() {
  22887. return t("uni-datetime-picker.selectDate");
  22888. },
  22889. startDateText() {
  22890. return this.startPlaceholder || t("uni-datetime-picker.startDate");
  22891. },
  22892. endDateText() {
  22893. return this.endPlaceholder || t("uni-datetime-picker.endDate");
  22894. },
  22895. okText() {
  22896. return t("uni-datetime-picker.ok");
  22897. },
  22898. yearText() {
  22899. return t("uni-datetime-picker.year");
  22900. },
  22901. monthText() {
  22902. return t("uni-datetime-picker.month");
  22903. },
  22904. MONText() {
  22905. return t("uni-calender.MON");
  22906. },
  22907. TUEText() {
  22908. return t("uni-calender.TUE");
  22909. },
  22910. WEDText() {
  22911. return t("uni-calender.WED");
  22912. },
  22913. THUText() {
  22914. return t("uni-calender.THU");
  22915. },
  22916. FRIText() {
  22917. return t("uni-calender.FRI");
  22918. },
  22919. SATText() {
  22920. return t("uni-calender.SAT");
  22921. },
  22922. SUNText() {
  22923. return t("uni-calender.SUN");
  22924. },
  22925. confirmText() {
  22926. return t("uni-calender.confirm");
  22927. }
  22928. },
  22929. created() {
  22930. this.cale = new Calendar$1({
  22931. selected: this.selected,
  22932. startDate: this.startDate,
  22933. endDate: this.endDate,
  22934. range: this.range
  22935. });
  22936. this.init(this.date);
  22937. },
  22938. methods: {
  22939. leaveCale() {
  22940. this.firstEnter = true;
  22941. },
  22942. handleMouse(weeks) {
  22943. if (weeks.disable)
  22944. return;
  22945. if (this.cale.lastHover)
  22946. return;
  22947. let {
  22948. before,
  22949. after
  22950. } = this.cale.multipleStatus;
  22951. if (!before)
  22952. return;
  22953. this.calendar = weeks;
  22954. this.cale.setHoverMultiple(this.calendar.fullDate);
  22955. this.weeks = this.cale.weeks;
  22956. if (this.firstEnter) {
  22957. this.$emit("firstEnterCale", this.cale.multipleStatus);
  22958. this.firstEnter = false;
  22959. }
  22960. },
  22961. rangeWithinMonth(A, B) {
  22962. const [yearA, monthA] = A.split("-");
  22963. const [yearB, monthB] = B.split("-");
  22964. return yearA === yearB && monthA === monthB;
  22965. },
  22966. // 蒙版点击事件
  22967. maskClick() {
  22968. this.close();
  22969. this.$emit("maskClose");
  22970. },
  22971. clearCalender() {
  22972. if (this.range) {
  22973. this.timeRange.startTime = "";
  22974. this.timeRange.endTime = "";
  22975. this.tempRange.before = "";
  22976. this.tempRange.after = "";
  22977. this.cale.multipleStatus.before = "";
  22978. this.cale.multipleStatus.after = "";
  22979. this.cale.multipleStatus.data = [];
  22980. this.cale.lastHover = false;
  22981. } else {
  22982. this.time = "";
  22983. this.tempSingleDate = "";
  22984. }
  22985. this.calendar.fullDate = "";
  22986. this.setDate(/* @__PURE__ */ new Date());
  22987. },
  22988. bindDateChange(e) {
  22989. const value2 = e.detail.value + "-1";
  22990. this.setDate(value2);
  22991. },
  22992. /**
  22993. * 初始化日期显示
  22994. * @param {Object} date
  22995. */
  22996. init(date3) {
  22997. if (!this.cale) {
  22998. return;
  22999. }
  23000. this.cale.setDate(date3 || /* @__PURE__ */ new Date());
  23001. this.weeks = this.cale.weeks;
  23002. this.nowDate = this.cale.getInfo(date3);
  23003. this.calendar = { ...this.nowDate };
  23004. if (!date3) {
  23005. this.calendar.fullDate = "";
  23006. if (this.defaultValue && !this.range) {
  23007. const defaultDate = new Date(this.defaultValue);
  23008. const fullDate = getDate(defaultDate);
  23009. const year = defaultDate.getFullYear();
  23010. const month = defaultDate.getMonth() + 1;
  23011. const date4 = defaultDate.getDate();
  23012. const day = defaultDate.getDay();
  23013. this.calendar = {
  23014. fullDate,
  23015. year,
  23016. month,
  23017. date: date4,
  23018. day
  23019. }, this.tempSingleDate = fullDate;
  23020. this.time = getTime(defaultDate, this.hideSecond);
  23021. }
  23022. }
  23023. },
  23024. /**
  23025. * 打开日历弹窗
  23026. */
  23027. open() {
  23028. if (this.clearDate && !this.insert) {
  23029. this.cale.cleanMultipleStatus();
  23030. this.init(this.date);
  23031. }
  23032. this.show = true;
  23033. this.$nextTick(() => {
  23034. setTimeout(() => {
  23035. this.aniMaskShow = true;
  23036. }, 50);
  23037. });
  23038. },
  23039. /**
  23040. * 关闭日历弹窗
  23041. */
  23042. close() {
  23043. this.aniMaskShow = false;
  23044. this.$nextTick(() => {
  23045. setTimeout(() => {
  23046. this.show = false;
  23047. this.$emit("close");
  23048. }, 300);
  23049. });
  23050. },
  23051. /**
  23052. * 确认按钮
  23053. */
  23054. confirm() {
  23055. this.setEmit("confirm");
  23056. this.close();
  23057. },
  23058. /**
  23059. * 变化触发
  23060. */
  23061. change() {
  23062. if (!this.insert)
  23063. return;
  23064. this.setEmit("change");
  23065. },
  23066. /**
  23067. * 选择月份触发
  23068. */
  23069. monthSwitch() {
  23070. let {
  23071. year,
  23072. month
  23073. } = this.nowDate;
  23074. this.$emit("monthSwitch", {
  23075. year,
  23076. month: Number(month)
  23077. });
  23078. },
  23079. /**
  23080. * 派发事件
  23081. * @param {Object} name
  23082. */
  23083. setEmit(name) {
  23084. if (!this.range) {
  23085. if (!this.calendar.fullDate) {
  23086. this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
  23087. this.tempSingleDate = this.calendar.fullDate;
  23088. }
  23089. if (this.hasTime && !this.time) {
  23090. this.time = getTime(/* @__PURE__ */ new Date(), this.hideSecond);
  23091. }
  23092. }
  23093. let {
  23094. year,
  23095. month,
  23096. date: date3,
  23097. fullDate,
  23098. extraInfo
  23099. } = this.calendar;
  23100. this.$emit(name, {
  23101. range: this.cale.multipleStatus,
  23102. year,
  23103. month,
  23104. date: date3,
  23105. time: this.time,
  23106. timeRange: this.timeRange,
  23107. fulldate: fullDate,
  23108. extraInfo: extraInfo || {}
  23109. });
  23110. },
  23111. /**
  23112. * 选择天触发
  23113. * @param {Object} weeks
  23114. */
  23115. choiceDate(weeks) {
  23116. if (weeks.disable)
  23117. return;
  23118. this.calendar = weeks;
  23119. this.calendar.userChecked = true;
  23120. this.cale.setMultiple(this.calendar.fullDate, true);
  23121. this.weeks = this.cale.weeks;
  23122. this.tempSingleDate = this.calendar.fullDate;
  23123. const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
  23124. const afterDate = new Date(this.cale.multipleStatus.after).getTime();
  23125. if (beforeDate > afterDate && afterDate) {
  23126. this.tempRange.before = this.cale.multipleStatus.after;
  23127. this.tempRange.after = this.cale.multipleStatus.before;
  23128. } else {
  23129. this.tempRange.before = this.cale.multipleStatus.before;
  23130. this.tempRange.after = this.cale.multipleStatus.after;
  23131. }
  23132. this.change();
  23133. },
  23134. changeMonth(type2) {
  23135. let newDate;
  23136. if (type2 === "pre") {
  23137. newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
  23138. } else if (type2 === "next") {
  23139. newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
  23140. }
  23141. this.setDate(newDate);
  23142. this.monthSwitch();
  23143. },
  23144. /**
  23145. * 设置日期
  23146. * @param {Object} date
  23147. */
  23148. setDate(date3) {
  23149. this.cale.setDate(date3);
  23150. this.weeks = this.cale.weeks;
  23151. this.nowDate = this.cale.getInfo(date3);
  23152. }
  23153. }
  23154. };
  23155. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  23156. const _component_calendar_item = vue.resolveComponent("calendar-item");
  23157. const _component_time_picker = vue.resolveComponent("time-picker");
  23158. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  23159. return vue.openBlock(), vue.createElementBlock(
  23160. "view",
  23161. {
  23162. class: "uni-calendar",
  23163. onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
  23164. },
  23165. [
  23166. !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
  23167. "view",
  23168. {
  23169. key: 0,
  23170. class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
  23171. onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args))
  23172. },
  23173. null,
  23174. 2
  23175. /* CLASS */
  23176. )) : vue.createCommentVNode("v-if", true),
  23177. $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
  23178. "view",
  23179. {
  23180. key: 1,
  23181. class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
  23182. },
  23183. [
  23184. vue.createElementVNode(
  23185. "view",
  23186. {
  23187. class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
  23188. },
  23189. [
  23190. vue.createElementVNode("view", {
  23191. class: "uni-calendar__header-btn-box",
  23192. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"]))
  23193. }, [
  23194. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
  23195. ]),
  23196. vue.createElementVNode("picker", {
  23197. mode: "date",
  23198. value: $props.date,
  23199. fields: "month",
  23200. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  23201. }, [
  23202. vue.createElementVNode(
  23203. "text",
  23204. { class: "uni-calendar__header-text" },
  23205. vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
  23206. 1
  23207. /* TEXT */
  23208. )
  23209. ], 40, ["value"]),
  23210. vue.createElementVNode("view", {
  23211. class: "uni-calendar__header-btn-box",
  23212. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"]))
  23213. }, [
  23214. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
  23215. ]),
  23216. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23217. key: 0,
  23218. class: "dialog-close",
  23219. onClick: _cache[4] || (_cache[4] = (...args) => $options.close && $options.close(...args))
  23220. }, [
  23221. vue.createElementVNode("view", {
  23222. class: "dialog-close-plus",
  23223. "data-id": "close"
  23224. }),
  23225. vue.createElementVNode("view", {
  23226. class: "dialog-close-plus dialog-close-rotate",
  23227. "data-id": "close"
  23228. })
  23229. ])) : vue.createCommentVNode("v-if", true)
  23230. ],
  23231. 2
  23232. /* CLASS */
  23233. ),
  23234. vue.createElementVNode("view", { class: "uni-calendar__box" }, [
  23235. $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
  23236. key: 0,
  23237. class: "uni-calendar__box-bg"
  23238. }, [
  23239. vue.createElementVNode(
  23240. "text",
  23241. { class: "uni-calendar__box-bg-text" },
  23242. vue.toDisplayString($data.nowDate.month),
  23243. 1
  23244. /* TEXT */
  23245. )
  23246. ])) : vue.createCommentVNode("v-if", true),
  23247. vue.createElementVNode("view", {
  23248. class: "uni-calendar__weeks",
  23249. style: { "padding-bottom": "7px" }
  23250. }, [
  23251. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23252. vue.createElementVNode(
  23253. "text",
  23254. { class: "uni-calendar__weeks-day-text" },
  23255. vue.toDisplayString($options.SUNText),
  23256. 1
  23257. /* TEXT */
  23258. )
  23259. ]),
  23260. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23261. vue.createElementVNode(
  23262. "text",
  23263. { class: "uni-calendar__weeks-day-text" },
  23264. vue.toDisplayString($options.MONText),
  23265. 1
  23266. /* TEXT */
  23267. )
  23268. ]),
  23269. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23270. vue.createElementVNode(
  23271. "text",
  23272. { class: "uni-calendar__weeks-day-text" },
  23273. vue.toDisplayString($options.TUEText),
  23274. 1
  23275. /* TEXT */
  23276. )
  23277. ]),
  23278. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23279. vue.createElementVNode(
  23280. "text",
  23281. { class: "uni-calendar__weeks-day-text" },
  23282. vue.toDisplayString($options.WEDText),
  23283. 1
  23284. /* TEXT */
  23285. )
  23286. ]),
  23287. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23288. vue.createElementVNode(
  23289. "text",
  23290. { class: "uni-calendar__weeks-day-text" },
  23291. vue.toDisplayString($options.THUText),
  23292. 1
  23293. /* TEXT */
  23294. )
  23295. ]),
  23296. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23297. vue.createElementVNode(
  23298. "text",
  23299. { class: "uni-calendar__weeks-day-text" },
  23300. vue.toDisplayString($options.FRIText),
  23301. 1
  23302. /* TEXT */
  23303. )
  23304. ]),
  23305. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23306. vue.createElementVNode(
  23307. "text",
  23308. { class: "uni-calendar__weeks-day-text" },
  23309. vue.toDisplayString($options.SATText),
  23310. 1
  23311. /* TEXT */
  23312. )
  23313. ])
  23314. ]),
  23315. (vue.openBlock(true), vue.createElementBlock(
  23316. vue.Fragment,
  23317. null,
  23318. vue.renderList($data.weeks, (item, weekIndex) => {
  23319. return vue.openBlock(), vue.createElementBlock("view", {
  23320. class: "uni-calendar__weeks",
  23321. key: weekIndex
  23322. }, [
  23323. (vue.openBlock(true), vue.createElementBlock(
  23324. vue.Fragment,
  23325. null,
  23326. vue.renderList(item, (weeks, weeksIndex) => {
  23327. return vue.openBlock(), vue.createElementBlock("view", {
  23328. class: "uni-calendar__weeks-item",
  23329. key: weeksIndex
  23330. }, [
  23331. vue.createVNode(_component_calendar_item, {
  23332. class: "uni-calendar-item--hook",
  23333. weeks,
  23334. calendar: $data.calendar,
  23335. selected: $props.selected,
  23336. checkHover: $props.range,
  23337. onChange: $options.choiceDate,
  23338. onHandleMouse: $options.handleMouse
  23339. }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"])
  23340. ]);
  23341. }),
  23342. 128
  23343. /* KEYED_FRAGMENT */
  23344. ))
  23345. ]);
  23346. }),
  23347. 128
  23348. /* KEYED_FRAGMENT */
  23349. ))
  23350. ]),
  23351. !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23352. key: 0,
  23353. class: "uni-date-changed uni-calendar--fixed-top",
  23354. style: { "padding": "0 80px" }
  23355. }, [
  23356. vue.createElementVNode(
  23357. "view",
  23358. { class: "uni-date-changed--time-date" },
  23359. vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
  23360. 1
  23361. /* TEXT */
  23362. ),
  23363. vue.createVNode(_component_time_picker, {
  23364. type: "time",
  23365. start: $options.timepickerStartTime,
  23366. end: $options.timepickerEndTime,
  23367. modelValue: $data.time,
  23368. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
  23369. disabled: !$data.tempSingleDate,
  23370. border: false,
  23371. "hide-second": $props.hideSecond,
  23372. class: "time-picker-style"
  23373. }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
  23374. ])) : vue.createCommentVNode("v-if", true),
  23375. !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23376. key: 1,
  23377. class: "uni-date-changed uni-calendar--fixed-top"
  23378. }, [
  23379. vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
  23380. vue.createElementVNode(
  23381. "view",
  23382. { class: "uni-date-changed--time-date" },
  23383. vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
  23384. 1
  23385. /* TEXT */
  23386. ),
  23387. vue.createVNode(_component_time_picker, {
  23388. type: "time",
  23389. start: $options.timepickerStartTime,
  23390. modelValue: $data.timeRange.startTime,
  23391. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
  23392. border: false,
  23393. "hide-second": $props.hideSecond,
  23394. disabled: !$data.tempRange.before,
  23395. class: "time-picker-style"
  23396. }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
  23397. ]),
  23398. vue.createElementVNode("view", { style: { "line-height": "50px" } }, [
  23399. vue.createVNode(_component_uni_icons, {
  23400. type: "arrowthinright",
  23401. color: "#999"
  23402. })
  23403. ]),
  23404. vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
  23405. vue.createElementVNode(
  23406. "view",
  23407. { class: "uni-date-changed--time-date" },
  23408. vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
  23409. 1
  23410. /* TEXT */
  23411. ),
  23412. vue.createVNode(_component_time_picker, {
  23413. type: "time",
  23414. end: $options.timepickerEndTime,
  23415. modelValue: $data.timeRange.endTime,
  23416. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
  23417. border: false,
  23418. "hide-second": $props.hideSecond,
  23419. disabled: !$data.tempRange.after,
  23420. class: "time-picker-style"
  23421. }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
  23422. ])
  23423. ])) : vue.createCommentVNode("v-if", true),
  23424. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23425. key: 2,
  23426. class: "uni-date-changed uni-date-btn--ok"
  23427. }, [
  23428. vue.createElementVNode(
  23429. "view",
  23430. {
  23431. class: "uni-datetime-picker--btn",
  23432. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
  23433. },
  23434. vue.toDisplayString($options.confirmText),
  23435. 1
  23436. /* TEXT */
  23437. )
  23438. ])) : vue.createCommentVNode("v-if", true)
  23439. ],
  23440. 2
  23441. /* CLASS */
  23442. )) : vue.createCommentVNode("v-if", true)
  23443. ],
  23444. 32
  23445. /* NEED_HYDRATION */
  23446. );
  23447. }
  23448. const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-1d379219"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
  23449. const _sfc_main$Q = {
  23450. name: "UniDatetimePicker",
  23451. options: {
  23452. virtualHost: true
  23453. },
  23454. components: {
  23455. Calendar,
  23456. TimePicker
  23457. },
  23458. data() {
  23459. return {
  23460. isRange: false,
  23461. hasTime: false,
  23462. displayValue: "",
  23463. inputDate: "",
  23464. calendarDate: "",
  23465. pickerTime: "",
  23466. calendarRange: {
  23467. startDate: "",
  23468. startTime: "",
  23469. endDate: "",
  23470. endTime: ""
  23471. },
  23472. displayRangeValue: {
  23473. startDate: "",
  23474. endDate: ""
  23475. },
  23476. tempRange: {
  23477. startDate: "",
  23478. startTime: "",
  23479. endDate: "",
  23480. endTime: ""
  23481. },
  23482. // 左右日历同步数据
  23483. startMultipleStatus: {
  23484. before: "",
  23485. after: "",
  23486. data: [],
  23487. fulldate: ""
  23488. },
  23489. endMultipleStatus: {
  23490. before: "",
  23491. after: "",
  23492. data: [],
  23493. fulldate: ""
  23494. },
  23495. pickerVisible: false,
  23496. pickerPositionStyle: null,
  23497. isEmitValue: false,
  23498. isPhone: false,
  23499. isFirstShow: true,
  23500. i18nT: () => {
  23501. }
  23502. };
  23503. },
  23504. props: {
  23505. type: {
  23506. type: String,
  23507. default: "datetime"
  23508. },
  23509. value: {
  23510. type: [String, Number, Array, Date],
  23511. default: ""
  23512. },
  23513. modelValue: {
  23514. type: [String, Number, Array, Date],
  23515. default: ""
  23516. },
  23517. start: {
  23518. type: [Number, String],
  23519. default: ""
  23520. },
  23521. end: {
  23522. type: [Number, String],
  23523. default: ""
  23524. },
  23525. returnType: {
  23526. type: String,
  23527. default: "string"
  23528. },
  23529. placeholder: {
  23530. type: String,
  23531. default: ""
  23532. },
  23533. startPlaceholder: {
  23534. type: String,
  23535. default: ""
  23536. },
  23537. endPlaceholder: {
  23538. type: String,
  23539. default: ""
  23540. },
  23541. rangeSeparator: {
  23542. type: String,
  23543. default: "-"
  23544. },
  23545. border: {
  23546. type: [Boolean],
  23547. default: true
  23548. },
  23549. disabled: {
  23550. type: [Boolean],
  23551. default: false
  23552. },
  23553. clearIcon: {
  23554. type: [Boolean],
  23555. default: true
  23556. },
  23557. hideSecond: {
  23558. type: [Boolean],
  23559. default: false
  23560. },
  23561. defaultValue: {
  23562. type: [String, Object, Array],
  23563. default: ""
  23564. }
  23565. },
  23566. watch: {
  23567. type: {
  23568. immediate: true,
  23569. handler(newVal) {
  23570. this.hasTime = newVal.indexOf("time") !== -1;
  23571. this.isRange = newVal.indexOf("range") !== -1;
  23572. }
  23573. },
  23574. modelValue: {
  23575. immediate: true,
  23576. handler(newVal) {
  23577. if (this.isEmitValue) {
  23578. this.isEmitValue = false;
  23579. return;
  23580. }
  23581. this.initPicker(newVal);
  23582. }
  23583. },
  23584. start: {
  23585. immediate: true,
  23586. handler(newVal) {
  23587. if (!newVal)
  23588. return;
  23589. this.calendarRange.startDate = getDate(newVal);
  23590. if (this.hasTime) {
  23591. this.calendarRange.startTime = getTime(newVal);
  23592. }
  23593. }
  23594. },
  23595. end: {
  23596. immediate: true,
  23597. handler(newVal) {
  23598. if (!newVal)
  23599. return;
  23600. this.calendarRange.endDate = getDate(newVal);
  23601. if (this.hasTime) {
  23602. this.calendarRange.endTime = getTime(newVal, this.hideSecond);
  23603. }
  23604. }
  23605. }
  23606. },
  23607. computed: {
  23608. timepickerStartTime() {
  23609. const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
  23610. return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
  23611. },
  23612. timepickerEndTime() {
  23613. const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
  23614. return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
  23615. },
  23616. mobileCalendarTime() {
  23617. const timeRange = {
  23618. start: this.tempRange.startTime,
  23619. end: this.tempRange.endTime
  23620. };
  23621. return this.isRange ? timeRange : this.pickerTime;
  23622. },
  23623. mobSelectableTime() {
  23624. return {
  23625. start: this.calendarRange.startTime,
  23626. end: this.calendarRange.endTime
  23627. };
  23628. },
  23629. datePopupWidth() {
  23630. return this.isRange ? 653 : 301;
  23631. },
  23632. /**
  23633. * for i18n
  23634. */
  23635. singlePlaceholderText() {
  23636. return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
  23637. },
  23638. startPlaceholderText() {
  23639. return this.startPlaceholder || this.startDateText;
  23640. },
  23641. endPlaceholderText() {
  23642. return this.endPlaceholder || this.endDateText;
  23643. },
  23644. selectDateText() {
  23645. return this.i18nT("uni-datetime-picker.selectDate");
  23646. },
  23647. selectDateTimeText() {
  23648. return this.i18nT("uni-datetime-picker.selectDateTime");
  23649. },
  23650. selectTimeText() {
  23651. return this.i18nT("uni-datetime-picker.selectTime");
  23652. },
  23653. startDateText() {
  23654. return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
  23655. },
  23656. startTimeText() {
  23657. return this.i18nT("uni-datetime-picker.startTime");
  23658. },
  23659. endDateText() {
  23660. return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
  23661. },
  23662. endTimeText() {
  23663. return this.i18nT("uni-datetime-picker.endTime");
  23664. },
  23665. okText() {
  23666. return this.i18nT("uni-datetime-picker.ok");
  23667. },
  23668. clearText() {
  23669. return this.i18nT("uni-datetime-picker.clear");
  23670. },
  23671. showClearIcon() {
  23672. return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
  23673. }
  23674. },
  23675. created() {
  23676. this.initI18nT();
  23677. this.platform();
  23678. },
  23679. methods: {
  23680. initI18nT() {
  23681. const vueI18n = initVueI18n(i18nMessages);
  23682. this.i18nT = vueI18n.t;
  23683. },
  23684. initPicker(newVal) {
  23685. if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
  23686. this.$nextTick(() => {
  23687. this.clear(false);
  23688. });
  23689. return;
  23690. }
  23691. if (!Array.isArray(newVal) && !this.isRange) {
  23692. if (newVal) {
  23693. this.displayValue = this.inputDate = this.calendarDate = getDate(newVal);
  23694. if (this.hasTime) {
  23695. this.pickerTime = getTime(newVal, this.hideSecond);
  23696. this.displayValue = `${this.displayValue} ${this.pickerTime}`;
  23697. }
  23698. } else if (this.defaultValue) {
  23699. this.inputDate = this.calendarDate = getDate(this.defaultValue);
  23700. if (this.hasTime) {
  23701. this.pickerTime = getTime(this.defaultValue, this.hideSecond);
  23702. }
  23703. }
  23704. } else {
  23705. const [before, after] = newVal;
  23706. if (!before && !after)
  23707. return;
  23708. const beforeDate = getDate(before);
  23709. const beforeTime = getTime(before, this.hideSecond);
  23710. const afterDate = getDate(after);
  23711. const afterTime = getTime(after, this.hideSecond);
  23712. const startDate = beforeDate;
  23713. const endDate = afterDate;
  23714. this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
  23715. this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
  23716. if (this.hasTime) {
  23717. this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
  23718. this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
  23719. this.tempRange.startTime = beforeTime;
  23720. this.tempRange.endTime = afterTime;
  23721. }
  23722. const defaultRange = {
  23723. before: beforeDate,
  23724. after: afterDate
  23725. };
  23726. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
  23727. which: "right"
  23728. });
  23729. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
  23730. which: "left"
  23731. });
  23732. }
  23733. },
  23734. updateLeftCale(e) {
  23735. const left = this.$refs.left;
  23736. left.cale.setHoverMultiple(e.after);
  23737. left.setDate(this.$refs.left.nowDate.fullDate);
  23738. },
  23739. updateRightCale(e) {
  23740. const right = this.$refs.right;
  23741. right.cale.setHoverMultiple(e.after);
  23742. right.setDate(this.$refs.right.nowDate.fullDate);
  23743. },
  23744. platform() {
  23745. if (typeof navigator !== "undefined") {
  23746. this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1;
  23747. return;
  23748. }
  23749. const { windowWidth } = uni.getSystemInfoSync();
  23750. this.isPhone = windowWidth <= 500;
  23751. this.windowWidth = windowWidth;
  23752. },
  23753. show() {
  23754. if (this.disabled) {
  23755. return;
  23756. }
  23757. this.platform();
  23758. if (this.isPhone) {
  23759. setTimeout(() => {
  23760. this.$refs.mobile.open();
  23761. }, 0);
  23762. return;
  23763. }
  23764. this.pickerPositionStyle = {
  23765. top: "10px"
  23766. };
  23767. const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
  23768. dateEditor.boundingClientRect((rect) => {
  23769. if (this.windowWidth - rect.left < this.datePopupWidth) {
  23770. this.pickerPositionStyle.right = 0;
  23771. }
  23772. }).exec();
  23773. setTimeout(() => {
  23774. this.pickerVisible = !this.pickerVisible;
  23775. if (!this.isPhone && this.isRange && this.isFirstShow) {
  23776. this.isFirstShow = false;
  23777. const {
  23778. startDate,
  23779. endDate
  23780. } = this.calendarRange;
  23781. if (startDate && endDate) {
  23782. if (this.diffDate(startDate, endDate) < 30) {
  23783. this.$refs.right.changeMonth("pre");
  23784. }
  23785. } else {
  23786. this.$refs.right.changeMonth("next");
  23787. this.$refs.right.cale.lastHover = false;
  23788. }
  23789. }
  23790. }, 50);
  23791. },
  23792. close() {
  23793. setTimeout(() => {
  23794. this.pickerVisible = false;
  23795. this.$emit("maskClick", this.value);
  23796. this.$refs.mobile && this.$refs.mobile.close();
  23797. }, 20);
  23798. },
  23799. setEmit(value2) {
  23800. if (this.returnType === "timestamp" || this.returnType === "date") {
  23801. if (!Array.isArray(value2)) {
  23802. if (!this.hasTime) {
  23803. value2 = value2 + " 00:00:00";
  23804. }
  23805. value2 = this.createTimestamp(value2);
  23806. if (this.returnType === "date") {
  23807. value2 = new Date(value2);
  23808. }
  23809. } else {
  23810. if (!this.hasTime) {
  23811. value2[0] = value2[0] + " 00:00:00";
  23812. value2[1] = value2[1] + " 00:00:00";
  23813. }
  23814. value2[0] = this.createTimestamp(value2[0]);
  23815. value2[1] = this.createTimestamp(value2[1]);
  23816. if (this.returnType === "date") {
  23817. value2[0] = new Date(value2[0]);
  23818. value2[1] = new Date(value2[1]);
  23819. }
  23820. }
  23821. }
  23822. this.$emit("update:modelValue", value2);
  23823. this.$emit("input", value2);
  23824. this.$emit("change", value2);
  23825. this.isEmitValue = true;
  23826. },
  23827. createTimestamp(date3) {
  23828. date3 = fixIosDateFormat(date3);
  23829. return Date.parse(new Date(date3));
  23830. },
  23831. singleChange(e) {
  23832. this.calendarDate = this.inputDate = e.fulldate;
  23833. if (this.hasTime)
  23834. return;
  23835. this.confirmSingleChange();
  23836. },
  23837. confirmSingleChange() {
  23838. if (!checkDate(this.inputDate)) {
  23839. const now2 = /* @__PURE__ */ new Date();
  23840. this.calendarDate = this.inputDate = getDate(now2);
  23841. this.pickerTime = getTime(now2, this.hideSecond);
  23842. }
  23843. let startLaterInputDate = false;
  23844. let startDate, startTime;
  23845. if (this.start) {
  23846. let startString = this.start;
  23847. if (typeof this.start === "number") {
  23848. startString = getDateTime(this.start, this.hideSecond);
  23849. }
  23850. [startDate, startTime] = startString.split(" ");
  23851. if (this.start && !dateCompare(startDate, this.inputDate)) {
  23852. startLaterInputDate = true;
  23853. this.inputDate = startDate;
  23854. }
  23855. }
  23856. let endEarlierInputDate = false;
  23857. let endDate, endTime;
  23858. if (this.end) {
  23859. let endString = this.end;
  23860. if (typeof this.end === "number") {
  23861. endString = getDateTime(this.end, this.hideSecond);
  23862. }
  23863. [endDate, endTime] = endString.split(" ");
  23864. if (this.end && !dateCompare(this.inputDate, endDate)) {
  23865. endEarlierInputDate = true;
  23866. this.inputDate = endDate;
  23867. }
  23868. }
  23869. if (this.hasTime) {
  23870. if (startLaterInputDate) {
  23871. this.pickerTime = startTime || getDefaultSecond(this.hideSecond);
  23872. }
  23873. if (endEarlierInputDate) {
  23874. this.pickerTime = endTime || getDefaultSecond(this.hideSecond);
  23875. }
  23876. if (!this.pickerTime) {
  23877. this.pickerTime = getTime(Date.now(), this.hideSecond);
  23878. }
  23879. this.displayValue = `${this.inputDate} ${this.pickerTime}`;
  23880. } else {
  23881. this.displayValue = this.inputDate;
  23882. }
  23883. this.setEmit(this.displayValue);
  23884. this.pickerVisible = false;
  23885. },
  23886. leftChange(e) {
  23887. const {
  23888. before,
  23889. after
  23890. } = e.range;
  23891. this.rangeChange(before, after);
  23892. const obj = {
  23893. before: e.range.before,
  23894. after: e.range.after,
  23895. data: e.range.data,
  23896. fulldate: e.fulldate
  23897. };
  23898. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
  23899. },
  23900. rightChange(e) {
  23901. const {
  23902. before,
  23903. after
  23904. } = e.range;
  23905. this.rangeChange(before, after);
  23906. const obj = {
  23907. before: e.range.before,
  23908. after: e.range.after,
  23909. data: e.range.data,
  23910. fulldate: e.fulldate
  23911. };
  23912. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
  23913. },
  23914. mobileChange(e) {
  23915. if (this.isRange) {
  23916. const { before, after } = e.range;
  23917. if (!before || !after) {
  23918. return;
  23919. }
  23920. this.handleStartAndEnd(before, after, true);
  23921. if (this.hasTime) {
  23922. const {
  23923. startTime,
  23924. endTime
  23925. } = e.timeRange;
  23926. this.tempRange.startTime = startTime;
  23927. this.tempRange.endTime = endTime;
  23928. }
  23929. this.confirmRangeChange();
  23930. } else {
  23931. if (this.hasTime) {
  23932. this.displayValue = e.fulldate + " " + e.time;
  23933. } else {
  23934. this.displayValue = e.fulldate;
  23935. }
  23936. this.setEmit(this.displayValue);
  23937. }
  23938. this.$refs.mobile.close();
  23939. },
  23940. rangeChange(before, after) {
  23941. if (!(before && after))
  23942. return;
  23943. this.handleStartAndEnd(before, after, true);
  23944. if (this.hasTime)
  23945. return;
  23946. this.confirmRangeChange();
  23947. },
  23948. confirmRangeChange() {
  23949. if (!this.tempRange.startDate || !this.tempRange.endDate) {
  23950. this.pickerVisible = false;
  23951. return;
  23952. }
  23953. if (!checkDate(this.tempRange.startDate)) {
  23954. this.tempRange.startDate = getDate(Date.now());
  23955. }
  23956. if (!checkDate(this.tempRange.endDate)) {
  23957. this.tempRange.endDate = getDate(Date.now());
  23958. }
  23959. let start, end;
  23960. let startDateLaterRangeStartDate = false;
  23961. let startDateLaterRangeEndDate = false;
  23962. let startDate, startTime;
  23963. if (this.start) {
  23964. let startString = this.start;
  23965. if (typeof this.start === "number") {
  23966. startString = getDateTime(this.start, this.hideSecond);
  23967. }
  23968. [startDate, startTime] = startString.split(" ");
  23969. if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
  23970. startDateLaterRangeStartDate = true;
  23971. this.tempRange.startDate = startDate;
  23972. }
  23973. if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
  23974. startDateLaterRangeEndDate = true;
  23975. this.tempRange.endDate = startDate;
  23976. }
  23977. }
  23978. let endDateEarlierRangeStartDate = false;
  23979. let endDateEarlierRangeEndDate = false;
  23980. let endDate, endTime;
  23981. if (this.end) {
  23982. let endString = this.end;
  23983. if (typeof this.end === "number") {
  23984. endString = getDateTime(this.end, this.hideSecond);
  23985. }
  23986. [endDate, endTime] = endString.split(" ");
  23987. if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
  23988. endDateEarlierRangeStartDate = true;
  23989. this.tempRange.startDate = endDate;
  23990. }
  23991. if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
  23992. endDateEarlierRangeEndDate = true;
  23993. this.tempRange.endDate = endDate;
  23994. }
  23995. }
  23996. if (!this.hasTime) {
  23997. start = this.displayRangeValue.startDate = this.tempRange.startDate;
  23998. end = this.displayRangeValue.endDate = this.tempRange.endDate;
  23999. } else {
  24000. if (startDateLaterRangeStartDate) {
  24001. this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond);
  24002. } else if (endDateEarlierRangeStartDate) {
  24003. this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond);
  24004. }
  24005. if (!this.tempRange.startTime) {
  24006. this.tempRange.startTime = getTime(Date.now(), this.hideSecond);
  24007. }
  24008. if (startDateLaterRangeEndDate) {
  24009. this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond);
  24010. } else if (endDateEarlierRangeEndDate) {
  24011. this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond);
  24012. }
  24013. if (!this.tempRange.endTime) {
  24014. this.tempRange.endTime = getTime(Date.now(), this.hideSecond);
  24015. }
  24016. start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
  24017. end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
  24018. }
  24019. if (!dateCompare(start, end)) {
  24020. [start, end] = [end, start];
  24021. }
  24022. this.displayRangeValue.startDate = start;
  24023. this.displayRangeValue.endDate = end;
  24024. const displayRange = [start, end];
  24025. this.setEmit(displayRange);
  24026. this.pickerVisible = false;
  24027. },
  24028. handleStartAndEnd(before, after, temp = false) {
  24029. if (!(before && after))
  24030. return;
  24031. const type2 = temp ? "tempRange" : "range";
  24032. const isStartEarlierEnd = dateCompare(before, after);
  24033. this[type2].startDate = isStartEarlierEnd ? before : after;
  24034. this[type2].endDate = isStartEarlierEnd ? after : before;
  24035. },
  24036. /**
  24037. * 比较时间大小
  24038. */
  24039. dateCompare(startDate, endDate) {
  24040. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24041. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24042. return startDate <= endDate;
  24043. },
  24044. /**
  24045. * 比较时间差
  24046. */
  24047. diffDate(startDate, endDate) {
  24048. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24049. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24050. const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
  24051. return Math.abs(diff);
  24052. },
  24053. clear(needEmit = true) {
  24054. if (!this.isRange) {
  24055. this.displayValue = "";
  24056. this.inputDate = "";
  24057. this.pickerTime = "";
  24058. if (this.isPhone) {
  24059. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24060. } else {
  24061. this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
  24062. }
  24063. if (needEmit) {
  24064. this.$emit("change", "");
  24065. this.$emit("input", "");
  24066. this.$emit("update:modelValue", "");
  24067. }
  24068. } else {
  24069. this.displayRangeValue.startDate = "";
  24070. this.displayRangeValue.endDate = "";
  24071. this.tempRange.startDate = "";
  24072. this.tempRange.startTime = "";
  24073. this.tempRange.endDate = "";
  24074. this.tempRange.endTime = "";
  24075. if (this.isPhone) {
  24076. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24077. } else {
  24078. this.$refs.left && this.$refs.left.clearCalender();
  24079. this.$refs.right && this.$refs.right.clearCalender();
  24080. this.$refs.right && this.$refs.right.changeMonth("next");
  24081. }
  24082. if (needEmit) {
  24083. this.$emit("change", []);
  24084. this.$emit("input", []);
  24085. this.$emit("update:modelValue", []);
  24086. }
  24087. }
  24088. }
  24089. }
  24090. };
  24091. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  24092. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  24093. const _component_time_picker = vue.resolveComponent("time-picker");
  24094. const _component_Calendar = vue.resolveComponent("Calendar");
  24095. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
  24096. vue.createElementVNode("view", {
  24097. class: "uni-date-editor",
  24098. onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args))
  24099. }, [
  24100. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  24101. vue.createElementVNode(
  24102. "view",
  24103. {
  24104. class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }])
  24105. },
  24106. [
  24107. !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
  24108. key: 0,
  24109. class: "uni-date-x uni-date-single"
  24110. }, [
  24111. vue.createVNode(_component_uni_icons, {
  24112. class: "icon-calendar",
  24113. type: "calendar",
  24114. color: "#c0c4cc",
  24115. size: "22"
  24116. }),
  24117. vue.createElementVNode(
  24118. "view",
  24119. { class: "uni-date__x-input" },
  24120. vue.toDisplayString($data.displayValue || $options.singlePlaceholderText),
  24121. 1
  24122. /* TEXT */
  24123. )
  24124. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  24125. key: 1,
  24126. class: "uni-date-x uni-date-range"
  24127. }, [
  24128. vue.createVNode(_component_uni_icons, {
  24129. class: "icon-calendar",
  24130. type: "calendar",
  24131. color: "#c0c4cc",
  24132. size: "22"
  24133. }),
  24134. vue.createElementVNode(
  24135. "view",
  24136. { class: "uni-date__x-input text-center" },
  24137. vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText),
  24138. 1
  24139. /* TEXT */
  24140. ),
  24141. vue.createElementVNode(
  24142. "view",
  24143. { class: "range-separator" },
  24144. vue.toDisplayString($props.rangeSeparator),
  24145. 1
  24146. /* TEXT */
  24147. ),
  24148. vue.createElementVNode(
  24149. "view",
  24150. { class: "uni-date__x-input text-center" },
  24151. vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText),
  24152. 1
  24153. /* TEXT */
  24154. )
  24155. ])),
  24156. $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  24157. key: 2,
  24158. class: "uni-date__icon-clear",
  24159. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  24160. }, [
  24161. vue.createVNode(_component_uni_icons, {
  24162. type: "clear",
  24163. color: "#c0c4cc",
  24164. size: "22"
  24165. })
  24166. ])) : vue.createCommentVNode("v-if", true)
  24167. ],
  24168. 2
  24169. /* CLASS */
  24170. )
  24171. ], true)
  24172. ]),
  24173. vue.withDirectives(vue.createElementVNode(
  24174. "view",
  24175. {
  24176. class: "uni-date-mask--pc",
  24177. onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
  24178. },
  24179. null,
  24180. 512
  24181. /* NEED_PATCH */
  24182. ), [
  24183. [vue.vShow, $data.pickerVisible]
  24184. ]),
  24185. !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  24186. "view",
  24187. {
  24188. key: 0,
  24189. ref: "datePicker",
  24190. class: "uni-date-picker__container"
  24191. },
  24192. [
  24193. !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
  24194. "view",
  24195. {
  24196. key: 0,
  24197. class: "uni-date-single--x",
  24198. style: vue.normalizeStyle($data.pickerPositionStyle)
  24199. },
  24200. [
  24201. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24202. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24203. key: 0,
  24204. class: "uni-date-changed popup-x-header"
  24205. }, [
  24206. vue.withDirectives(vue.createElementVNode("input", {
  24207. class: "uni-date__input text-center",
  24208. type: "text",
  24209. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event),
  24210. placeholder: $options.selectDateText
  24211. }, null, 8, ["placeholder"]), [
  24212. [vue.vModelText, $data.inputDate]
  24213. ]),
  24214. vue.createVNode(_component_time_picker, {
  24215. type: "time",
  24216. modelValue: $data.pickerTime,
  24217. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event),
  24218. border: false,
  24219. disabled: !$data.inputDate,
  24220. start: $options.timepickerStartTime,
  24221. end: $options.timepickerEndTime,
  24222. hideSecond: $props.hideSecond,
  24223. style: { "width": "100%" }
  24224. }, {
  24225. default: vue.withCtx(() => [
  24226. vue.withDirectives(vue.createElementVNode("input", {
  24227. class: "uni-date__input text-center",
  24228. type: "text",
  24229. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event),
  24230. placeholder: $options.selectTimeText,
  24231. disabled: !$data.inputDate
  24232. }, null, 8, ["placeholder", "disabled"]), [
  24233. [vue.vModelText, $data.pickerTime]
  24234. ])
  24235. ]),
  24236. _: 1
  24237. /* STABLE */
  24238. }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
  24239. ])) : vue.createCommentVNode("v-if", true),
  24240. vue.createVNode(_component_Calendar, {
  24241. ref: "pcSingle",
  24242. showMonth: false,
  24243. "start-date": $data.calendarRange.startDate,
  24244. "end-date": $data.calendarRange.endDate,
  24245. date: $data.calendarDate,
  24246. onChange: $options.singleChange,
  24247. "default-value": $props.defaultValue,
  24248. style: { "padding": "0 8px" }
  24249. }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]),
  24250. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24251. key: 1,
  24252. class: "popup-x-footer"
  24253. }, [
  24254. vue.createElementVNode(
  24255. "text",
  24256. {
  24257. class: "confirm-text",
  24258. onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
  24259. },
  24260. vue.toDisplayString($options.okText),
  24261. 1
  24262. /* TEXT */
  24263. )
  24264. ])) : vue.createCommentVNode("v-if", true)
  24265. ],
  24266. 4
  24267. /* STYLE */
  24268. )) : (vue.openBlock(), vue.createElementBlock(
  24269. "view",
  24270. {
  24271. key: 1,
  24272. class: "uni-date-range--x",
  24273. style: vue.normalizeStyle($data.pickerPositionStyle)
  24274. },
  24275. [
  24276. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24277. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24278. key: 0,
  24279. class: "popup-x-header uni-date-changed"
  24280. }, [
  24281. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24282. vue.withDirectives(vue.createElementVNode("input", {
  24283. class: "uni-date__input uni-date-range__input",
  24284. type: "text",
  24285. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event),
  24286. placeholder: $options.startDateText
  24287. }, null, 8, ["placeholder"]), [
  24288. [vue.vModelText, $data.tempRange.startDate]
  24289. ]),
  24290. vue.createVNode(_component_time_picker, {
  24291. type: "time",
  24292. modelValue: $data.tempRange.startTime,
  24293. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event),
  24294. start: $options.timepickerStartTime,
  24295. border: false,
  24296. disabled: !$data.tempRange.startDate,
  24297. hideSecond: $props.hideSecond
  24298. }, {
  24299. default: vue.withCtx(() => [
  24300. vue.withDirectives(vue.createElementVNode("input", {
  24301. class: "uni-date__input uni-date-range__input",
  24302. type: "text",
  24303. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event),
  24304. placeholder: $options.startTimeText,
  24305. disabled: !$data.tempRange.startDate
  24306. }, null, 8, ["placeholder", "disabled"]), [
  24307. [vue.vModelText, $data.tempRange.startTime]
  24308. ])
  24309. ]),
  24310. _: 1
  24311. /* STABLE */
  24312. }, 8, ["modelValue", "start", "disabled", "hideSecond"])
  24313. ]),
  24314. vue.createVNode(_component_uni_icons, {
  24315. type: "arrowthinright",
  24316. color: "#999",
  24317. style: { "line-height": "40px" }
  24318. }),
  24319. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24320. vue.withDirectives(vue.createElementVNode("input", {
  24321. class: "uni-date__input uni-date-range__input",
  24322. type: "text",
  24323. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event),
  24324. placeholder: $options.endDateText
  24325. }, null, 8, ["placeholder"]), [
  24326. [vue.vModelText, $data.tempRange.endDate]
  24327. ]),
  24328. vue.createVNode(_component_time_picker, {
  24329. type: "time",
  24330. modelValue: $data.tempRange.endTime,
  24331. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event),
  24332. end: $options.timepickerEndTime,
  24333. border: false,
  24334. disabled: !$data.tempRange.endDate,
  24335. hideSecond: $props.hideSecond
  24336. }, {
  24337. default: vue.withCtx(() => [
  24338. vue.withDirectives(vue.createElementVNode("input", {
  24339. class: "uni-date__input uni-date-range__input",
  24340. type: "text",
  24341. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event),
  24342. placeholder: $options.endTimeText,
  24343. disabled: !$data.tempRange.endDate
  24344. }, null, 8, ["placeholder", "disabled"]), [
  24345. [vue.vModelText, $data.tempRange.endTime]
  24346. ])
  24347. ]),
  24348. _: 1
  24349. /* STABLE */
  24350. }, 8, ["modelValue", "end", "disabled", "hideSecond"])
  24351. ])
  24352. ])) : vue.createCommentVNode("v-if", true),
  24353. vue.createElementVNode("view", { class: "popup-x-body" }, [
  24354. vue.createVNode(_component_Calendar, {
  24355. ref: "left",
  24356. showMonth: false,
  24357. "start-date": $data.calendarRange.startDate,
  24358. "end-date": $data.calendarRange.endDate,
  24359. range: true,
  24360. pleStatus: $data.endMultipleStatus,
  24361. onChange: $options.leftChange,
  24362. onFirstEnterCale: $options.updateRightCale,
  24363. style: { "padding": "0 8px" }
  24364. }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]),
  24365. vue.createVNode(_component_Calendar, {
  24366. ref: "right",
  24367. showMonth: false,
  24368. "start-date": $data.calendarRange.startDate,
  24369. "end-date": $data.calendarRange.endDate,
  24370. range: true,
  24371. onChange: $options.rightChange,
  24372. pleStatus: $data.startMultipleStatus,
  24373. onFirstEnterCale: $options.updateLeftCale,
  24374. style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
  24375. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"])
  24376. ]),
  24377. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24378. key: 1,
  24379. class: "popup-x-footer"
  24380. }, [
  24381. vue.createElementVNode(
  24382. "text",
  24383. {
  24384. onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args))
  24385. },
  24386. vue.toDisplayString($options.clearText),
  24387. 1
  24388. /* TEXT */
  24389. ),
  24390. vue.createElementVNode(
  24391. "text",
  24392. {
  24393. class: "confirm-text",
  24394. onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
  24395. },
  24396. vue.toDisplayString($options.okText),
  24397. 1
  24398. /* TEXT */
  24399. )
  24400. ])) : vue.createCommentVNode("v-if", true)
  24401. ],
  24402. 4
  24403. /* STYLE */
  24404. ))
  24405. ],
  24406. 512
  24407. /* NEED_PATCH */
  24408. )), [
  24409. [vue.vShow, $data.pickerVisible]
  24410. ]) : vue.createCommentVNode("v-if", true),
  24411. $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, {
  24412. key: 1,
  24413. ref: "mobile",
  24414. clearDate: false,
  24415. date: $data.calendarDate,
  24416. defTime: $options.mobileCalendarTime,
  24417. "start-date": $data.calendarRange.startDate,
  24418. "end-date": $data.calendarRange.endDate,
  24419. selectableTimes: $options.mobSelectableTime,
  24420. startPlaceholder: $props.startPlaceholder,
  24421. endPlaceholder: $props.endPlaceholder,
  24422. "default-value": $props.defaultValue,
  24423. pleStatus: $data.endMultipleStatus,
  24424. showMonth: false,
  24425. range: $data.isRange,
  24426. hasTime: $data.hasTime,
  24427. insert: false,
  24428. hideSecond: $props.hideSecond,
  24429. onConfirm: $options.mobileChange,
  24430. onMaskClose: $options.close
  24431. }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose"])) : vue.createCommentVNode("v-if", true)
  24432. ]);
  24433. }
  24434. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-9802168a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
  24435. const _sfc_main$P = {
  24436. __name: "after-sale",
  24437. setup(__props, { expose: __expose }) {
  24438. __expose();
  24439. const otherParams = vue.ref({
  24440. sender: ""
  24441. });
  24442. const scrollRef = vue.ref(null);
  24443. const refreshList = () => {
  24444. var _a;
  24445. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24446. };
  24447. let dataList = vue.ref([{
  24448. date: "2024-10-24",
  24449. orderNum: 423,
  24450. auditNum: 293,
  24451. trueNum: 323
  24452. }, {
  24453. date: "2024-10-24",
  24454. orderNum: 423,
  24455. auditNum: 293,
  24456. trueNum: 323
  24457. }, {
  24458. date: "2024-10-24",
  24459. orderNum: 423,
  24460. auditNum: 293,
  24461. trueNum: 323
  24462. }]);
  24463. const updateList = (data) => {
  24464. dataList.value = data;
  24465. };
  24466. const form = vue.reactive({
  24467. startTime: "",
  24468. endTime: ""
  24469. });
  24470. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24471. return dataList;
  24472. }, set dataList(v) {
  24473. dataList = v;
  24474. }, updateList, form, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  24475. return onLoad;
  24476. } };
  24477. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24478. return __returned__;
  24479. }
  24480. };
  24481. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  24482. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$2);
  24483. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  24484. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  24485. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  24486. return vue.openBlock(), vue.createElementBlock("view", {
  24487. class: "common-page",
  24488. style: { "padding": "0" }
  24489. }, [
  24490. vue.createVNode($setup["PageScroll"], {
  24491. requestStr: "/team/token/shop/invite/page",
  24492. onUpdateList: $setup.updateList,
  24493. ref: "scrollRef",
  24494. otherParams: $setup.otherParams
  24495. }, {
  24496. default: vue.withCtx(() => [
  24497. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24498. default: vue.withCtx(() => [
  24499. vue.createElementVNode("view", { class: "search-area flex-d" }, [
  24500. vue.createElementVNode("view", { class: "flex-a mb-12" }, [
  24501. vue.createElementVNode("text", { class: "font-13 mr-10" }, "开始时间:"),
  24502. vue.createVNode(_component_uni_datetime_picker, {
  24503. type: "datetime",
  24504. modelValue: $setup.form.startTime,
  24505. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.startTime = $event)
  24506. }, null, 8, ["modelValue"])
  24507. ]),
  24508. vue.createElementVNode("view", { class: "flex-a" }, [
  24509. vue.createElementVNode("text", { class: "font-13 mr-10" }, "结束时间:"),
  24510. vue.createVNode(_component_uni_datetime_picker, {
  24511. type: "datetime",
  24512. modelValue: $setup.form.endTime,
  24513. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.endTime = $event)
  24514. }, null, 8, ["modelValue"]),
  24515. vue.createVNode(_component_u_button, {
  24516. type: "primary",
  24517. "custom-style": "width:160rpx;height:72rpx;margin-left:10px"
  24518. }, {
  24519. default: vue.withCtx(() => [
  24520. vue.createTextVNode("查询")
  24521. ]),
  24522. _: 1
  24523. /* STABLE */
  24524. })
  24525. ]),
  24526. vue.createVNode(_component_u_divider),
  24527. vue.createElementVNode("view", { class: "flex-a" }, [
  24528. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24529. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  24530. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  24531. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  24532. ])
  24533. ])
  24534. ]),
  24535. _: 1
  24536. /* STABLE */
  24537. }),
  24538. vue.createElementVNode("view", { class: "list-con" }, [
  24539. (vue.openBlock(true), vue.createElementBlock(
  24540. vue.Fragment,
  24541. null,
  24542. vue.renderList($setup.dataList, (item, index2) => {
  24543. return vue.openBlock(), vue.createElementBlock("view", {
  24544. key: index2,
  24545. class: "flex-a"
  24546. }, [
  24547. vue.createElementVNode(
  24548. "view",
  24549. { class: "text-item flex-1" },
  24550. vue.toDisplayString(item.date),
  24551. 1
  24552. /* TEXT */
  24553. ),
  24554. vue.createElementVNode(
  24555. "view",
  24556. { class: "text-item flex-1" },
  24557. vue.toDisplayString(item.orderNum),
  24558. 1
  24559. /* TEXT */
  24560. ),
  24561. vue.createElementVNode(
  24562. "view",
  24563. { class: "text-item flex-1" },
  24564. vue.toDisplayString(item.auditNum),
  24565. 1
  24566. /* TEXT */
  24567. ),
  24568. vue.createElementVNode(
  24569. "view",
  24570. { class: "text-item flex-1" },
  24571. vue.toDisplayString(item.trueNum),
  24572. 1
  24573. /* TEXT */
  24574. )
  24575. ]);
  24576. }),
  24577. 128
  24578. /* KEYED_FRAGMENT */
  24579. ))
  24580. ])
  24581. ]),
  24582. _: 1
  24583. /* STABLE */
  24584. }, 8, ["otherParams"])
  24585. ]);
  24586. }
  24587. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/after-sale.vue"]]);
  24588. const _sfc_main$O = {
  24589. __name: "package",
  24590. setup(__props, { expose: __expose }) {
  24591. __expose();
  24592. const otherParams = vue.ref({
  24593. sender: ""
  24594. });
  24595. const scrollRef = vue.ref(null);
  24596. const refreshList = () => {
  24597. var _a;
  24598. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24599. };
  24600. let dataList = vue.ref([{
  24601. date: "2024-10-24",
  24602. orderNum: 423
  24603. }, {
  24604. date: "2024-10-24",
  24605. orderNum: 423
  24606. }, {
  24607. date: "2024-10-24",
  24608. orderNum: 423
  24609. }]);
  24610. const updateList = (data) => {
  24611. dataList.value = data;
  24612. };
  24613. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24614. return dataList;
  24615. }, set dataList(v) {
  24616. dataList = v;
  24617. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  24618. return onLoad;
  24619. } };
  24620. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24621. return __returned__;
  24622. }
  24623. };
  24624. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  24625. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  24626. return vue.openBlock(), vue.createElementBlock("view", {
  24627. class: "common-page",
  24628. style: { "padding": "0" }
  24629. }, [
  24630. vue.createVNode($setup["PageScroll"], {
  24631. requestStr: "/team/token/shop/invite/page",
  24632. onUpdateList: $setup.updateList,
  24633. ref: "scrollRef",
  24634. otherParams: $setup.otherParams
  24635. }, {
  24636. default: vue.withCtx(() => [
  24637. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24638. default: vue.withCtx(() => [
  24639. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  24640. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24641. vue.createElementVNode("view", { class: "text-item flex-1" }, "数量")
  24642. ])
  24643. ]),
  24644. _: 1
  24645. /* STABLE */
  24646. }),
  24647. vue.createElementVNode("view", { class: "list-con" }, [
  24648. (vue.openBlock(true), vue.createElementBlock(
  24649. vue.Fragment,
  24650. null,
  24651. vue.renderList($setup.dataList, (item, index2) => {
  24652. return vue.openBlock(), vue.createElementBlock("view", {
  24653. key: index2,
  24654. class: "flex-a"
  24655. }, [
  24656. vue.createElementVNode(
  24657. "view",
  24658. { class: "text-item flex-1" },
  24659. vue.toDisplayString(item.date),
  24660. 1
  24661. /* TEXT */
  24662. ),
  24663. vue.createElementVNode(
  24664. "view",
  24665. { class: "text-item flex-1" },
  24666. vue.toDisplayString(item.orderNum),
  24667. 1
  24668. /* TEXT */
  24669. )
  24670. ]);
  24671. }),
  24672. 128
  24673. /* KEYED_FRAGMENT */
  24674. ))
  24675. ])
  24676. ]),
  24677. _: 1
  24678. /* STABLE */
  24679. }, 8, ["otherParams"])
  24680. ]);
  24681. }
  24682. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/package.vue"]]);
  24683. const _sfc_main$N = {
  24684. name: "GoodIn"
  24685. };
  24686. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  24687. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24688. vue.createCommentVNode(" 开发中提示 "),
  24689. vue.createElementVNode("view", { class: "developing" }, [
  24690. vue.createElementVNode("text", null, "开发中")
  24691. ])
  24692. ]);
  24693. }
  24694. const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-04e21b6f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/medium-in.vue"]]);
  24695. const _sfc_main$M = {
  24696. name: "GoodIn"
  24697. };
  24698. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  24699. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24700. vue.createCommentVNode(" 开发中提示 "),
  24701. vue.createElementVNode("view", { class: "developing" }, [
  24702. vue.createElementVNode("text", null, "开发中")
  24703. ])
  24704. ]);
  24705. }
  24706. const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-701c6544"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/good-in.vue"]]);
  24707. const _sfc_main$L = {
  24708. name: "GoodIn"
  24709. };
  24710. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  24711. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24712. vue.createCommentVNode(" 开发中提示 "),
  24713. vue.createElementVNode("view", { class: "developing" }, [
  24714. vue.createElementVNode("text", null, "开发中")
  24715. ])
  24716. ]);
  24717. }
  24718. const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-52deef37"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/secondary-in.vue"]]);
  24719. const MIN_DISTANCE = 10;
  24720. function getDirection(x, y) {
  24721. if (x > y && x > MIN_DISTANCE) {
  24722. return "horizontal";
  24723. }
  24724. if (y > x && y > MIN_DISTANCE) {
  24725. return "vertical";
  24726. }
  24727. return "";
  24728. }
  24729. const touch = {
  24730. methods: {
  24731. getTouchPoint(e) {
  24732. if (!e) {
  24733. return {
  24734. x: 0,
  24735. y: 0
  24736. };
  24737. }
  24738. if (e.touches && e.touches[0]) {
  24739. return {
  24740. x: e.touches[0].pageX,
  24741. y: e.touches[0].pageY
  24742. };
  24743. }
  24744. if (e.changedTouches && e.changedTouches[0]) {
  24745. return {
  24746. x: e.changedTouches[0].pageX,
  24747. y: e.changedTouches[0].pageY
  24748. };
  24749. }
  24750. return {
  24751. x: e.clientX || 0,
  24752. y: e.clientY || 0
  24753. };
  24754. },
  24755. resetTouchStatus() {
  24756. this.direction = "";
  24757. this.deltaX = 0;
  24758. this.deltaY = 0;
  24759. this.offsetX = 0;
  24760. this.offsetY = 0;
  24761. },
  24762. touchStart(event) {
  24763. this.resetTouchStatus();
  24764. const touch2 = this.getTouchPoint(event);
  24765. this.startX = touch2.x;
  24766. this.startY = touch2.y;
  24767. },
  24768. touchMove(event) {
  24769. const touch2 = this.getTouchPoint(event);
  24770. this.deltaX = touch2.x - this.startX;
  24771. this.deltaY = touch2.y - this.startY;
  24772. this.offsetX = Math.abs(this.deltaX);
  24773. this.offsetY = Math.abs(this.deltaY);
  24774. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  24775. }
  24776. }
  24777. };
  24778. const props$7 = {
  24779. props: {
  24780. // 控制打开或者关闭
  24781. show: {
  24782. type: Boolean,
  24783. default: props$E.swipeActionItem.show
  24784. },
  24785. // 标识符,如果是v-for,可用index索引值
  24786. name: {
  24787. type: [String, Number],
  24788. default: props$E.swipeActionItem.name
  24789. },
  24790. // 是否禁用
  24791. disabled: {
  24792. type: Boolean,
  24793. default: props$E.swipeActionItem.disabled
  24794. },
  24795. // 是否自动关闭其他swipe按钮组
  24796. autoClose: {
  24797. type: Boolean,
  24798. default: props$E.swipeActionItem.autoClose
  24799. },
  24800. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  24801. threshold: {
  24802. type: Number,
  24803. default: props$E.swipeActionItem.threshold
  24804. },
  24805. // 右侧按钮内容
  24806. options: {
  24807. type: Array,
  24808. default() {
  24809. return uni.$u.props.swipeActionItem.rightOptions;
  24810. }
  24811. },
  24812. // 动画过渡时间,单位ms
  24813. duration: {
  24814. type: [String, Number],
  24815. default: props$E.swipeActionItem.duration
  24816. }
  24817. }
  24818. };
  24819. const wxs = {
  24820. methods: {
  24821. // 关闭时执行
  24822. closeHandler() {
  24823. this.status = "close";
  24824. },
  24825. setState(status) {
  24826. this.status = status;
  24827. },
  24828. closeOther() {
  24829. this.parent && this.parent.closeOther(this);
  24830. }
  24831. }
  24832. };
  24833. const block0 = (Comp) => {
  24834. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  24835. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
  24836. };
  24837. const _sfc_main$K = {
  24838. name: "u-swipe-action-item",
  24839. emits: ["click"],
  24840. mixins: [mpMixin, mixin, props$7, touch],
  24841. mixins: [mpMixin, mixin, props$7, touch, wxs],
  24842. data() {
  24843. return {
  24844. // 按钮的尺寸信息
  24845. size: {},
  24846. // 父组件u-swipe-action的参数
  24847. parentData: {
  24848. autoClose: true
  24849. },
  24850. // 当前状态,open-打开,close-关闭
  24851. status: "close"
  24852. };
  24853. },
  24854. watch: {
  24855. // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
  24856. wxsInit(newValue, oldValue) {
  24857. this.queryRect();
  24858. }
  24859. },
  24860. computed: {
  24861. wxsInit() {
  24862. return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
  24863. }
  24864. },
  24865. mounted() {
  24866. this.init();
  24867. },
  24868. methods: {
  24869. init() {
  24870. this.updateParentData();
  24871. uni.$u.sleep().then(() => {
  24872. this.queryRect();
  24873. });
  24874. },
  24875. updateParentData() {
  24876. this.getParentData("u-swipe-action");
  24877. },
  24878. // 查询节点
  24879. queryRect() {
  24880. this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
  24881. this.size = {
  24882. buttons,
  24883. show: this.show,
  24884. disabled: this.disabled,
  24885. threshold: this.threshold,
  24886. duration: this.duration
  24887. };
  24888. });
  24889. },
  24890. // 按钮被点击
  24891. buttonClickHandler(item, index2) {
  24892. this.$emit("click", {
  24893. index: index2,
  24894. name: this.name
  24895. });
  24896. }
  24897. }
  24898. };
  24899. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  24900. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  24901. return vue.openBlock(), vue.createElementBlock(
  24902. "view",
  24903. {
  24904. class: "u-swipe-action-item",
  24905. ref: "u-swipe-action-item"
  24906. },
  24907. [
  24908. vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
  24909. vue.renderSlot(_ctx.$slots, "button", {}, () => [
  24910. (vue.openBlock(true), vue.createElementBlock(
  24911. vue.Fragment,
  24912. null,
  24913. vue.renderList(_ctx.options, (item, index2) => {
  24914. return vue.openBlock(), vue.createElementBlock("view", {
  24915. key: index2,
  24916. class: "u-swipe-action-item__right__button",
  24917. ref_for: true,
  24918. ref: `u-swipe-action-item__right__button-${index2}`,
  24919. style: vue.normalizeStyle([{
  24920. alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
  24921. }]),
  24922. onClick: ($event) => $options.buttonClickHandler(item, index2)
  24923. }, [
  24924. vue.createElementVNode(
  24925. "view",
  24926. {
  24927. class: "u-swipe-action-item__right__button__wrapper",
  24928. style: vue.normalizeStyle([{
  24929. backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
  24930. borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
  24931. padding: item.style && item.style.borderRadius ? "0" : "0 15px"
  24932. }, item.style])
  24933. },
  24934. [
  24935. item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  24936. key: 0,
  24937. name: item.icon,
  24938. color: item.style && item.style.color ? item.style.color : "#ffffff",
  24939. size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17,
  24940. customStyle: {
  24941. marginRight: item.text ? "2px" : 0
  24942. }
  24943. }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
  24944. item.text ? (vue.openBlock(), vue.createElementBlock(
  24945. "text",
  24946. {
  24947. key: 1,
  24948. class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
  24949. style: vue.normalizeStyle([{
  24950. color: item.style && item.style.color ? item.style.color : "#ffffff",
  24951. fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
  24952. lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
  24953. }])
  24954. },
  24955. vue.toDisplayString(item.text),
  24956. 5
  24957. /* TEXT, STYLE */
  24958. )) : vue.createCommentVNode("v-if", true)
  24959. ],
  24960. 4
  24961. /* STYLE */
  24962. )
  24963. ], 12, ["onClick"]);
  24964. }),
  24965. 128
  24966. /* KEYED_FRAGMENT */
  24967. ))
  24968. ], true)
  24969. ]),
  24970. vue.createElementVNode("view", {
  24971. class: "u-swipe-action-item__content",
  24972. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
  24973. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
  24974. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
  24975. status: vue.wp($data.status),
  24976. "change:status": _ctx.wxs.statusChange,
  24977. size: vue.wp($data.size),
  24978. "change:size": _ctx.wxs.sizeChange
  24979. }, [
  24980. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  24981. ], 40, ["status", "change:status", "size", "change:size"])
  24982. ],
  24983. 512
  24984. /* NEED_PATCH */
  24985. );
  24986. }
  24987. if (typeof block0 === "function")
  24988. block0(_sfc_main$K);
  24989. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__scopeId", "data-v-ed3ce04a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]);
  24990. const props$6 = {
  24991. props: {
  24992. // 是否自动关闭其他swipe按钮组
  24993. autoClose: {
  24994. type: Boolean,
  24995. default: props$E.swipeAction.autoClose
  24996. }
  24997. }
  24998. };
  24999. const _sfc_main$J = {
  25000. name: "u-swipe-action",
  25001. mixins: [mpMixin, mixin, props$6],
  25002. data() {
  25003. return {};
  25004. },
  25005. provide() {
  25006. return {
  25007. swipeAction: this
  25008. };
  25009. },
  25010. computed: {
  25011. // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  25012. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
  25013. // 拉取父组件新的变化后的参数
  25014. parentData() {
  25015. return [this.autoClose];
  25016. }
  25017. },
  25018. watch: {
  25019. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  25020. parentData() {
  25021. if (this.children.length) {
  25022. this.children.map((child) => {
  25023. typeof child.updateParentData === "function" && child.updateParentData();
  25024. });
  25025. }
  25026. }
  25027. },
  25028. created() {
  25029. this.children = [];
  25030. },
  25031. methods: {
  25032. closeOther(child) {
  25033. if (this.autoClose) {
  25034. this.children.map((item, index2) => {
  25035. if (child !== item) {
  25036. item.closeHandler();
  25037. }
  25038. });
  25039. }
  25040. }
  25041. }
  25042. };
  25043. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  25044. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
  25045. vue.renderSlot(_ctx.$slots, "default")
  25046. ]);
  25047. }
  25048. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]);
  25049. const _sfc_main$I = {
  25050. __name: "BadItem",
  25051. props: {
  25052. data: {
  25053. type: Object,
  25054. required: true,
  25055. default: () => ({
  25056. orderNo: "",
  25057. badCount: "",
  25058. logisticsNo: "",
  25059. checkDate: "",
  25060. operator: ""
  25061. })
  25062. }
  25063. },
  25064. emits: ["delete", "edit"],
  25065. setup(__props, { expose: __expose, emit: __emit }) {
  25066. __expose();
  25067. const props2 = __props;
  25068. const emit2 = __emit;
  25069. const options = vue.ref([
  25070. {
  25071. text: "删除",
  25072. style: {
  25073. backgroundColor: "#ff4444"
  25074. }
  25075. }
  25076. ]);
  25077. const handleAction = (e) => {
  25078. if (e.index === 0) {
  25079. uni.showModal({
  25080. title: "提示",
  25081. content: "确定要删除该订单吗?",
  25082. success: (res2) => {
  25083. if (res2.confirm) {
  25084. emit2("delete");
  25085. }
  25086. }
  25087. });
  25088. }
  25089. };
  25090. const __returned__ = { props: props2, emit: emit2, options, handleAction, ref: vue.ref };
  25091. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25092. return __returned__;
  25093. }
  25094. };
  25095. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  25096. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25097. const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1);
  25098. const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2);
  25099. return vue.openBlock(), vue.createElementBlock("view", { class: "bad-item" }, [
  25100. vue.createVNode(_component_u_swipe_action, null, {
  25101. default: vue.withCtx(() => [
  25102. vue.createVNode(_component_u_swipe_action_item, {
  25103. options: $setup.options,
  25104. onClick: $setup.handleAction
  25105. }, {
  25106. default: vue.withCtx(() => [
  25107. vue.createElementVNode("view", { class: "item-content" }, [
  25108. vue.createElementVNode("view", { class: "item-row" }, [
  25109. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  25110. vue.createElementVNode(
  25111. "text",
  25112. { class: "value" },
  25113. vue.toDisplayString($props.data.orderId),
  25114. 1
  25115. /* TEXT */
  25116. ),
  25117. vue.createVNode(_component_u_icon, {
  25118. name: "edit-pen",
  25119. color: "#4CAF50",
  25120. size: "20",
  25121. class: "edit-icon",
  25122. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
  25123. })
  25124. ]),
  25125. vue.createElementVNode("view", { class: "item-row" }, [
  25126. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  25127. vue.createElementVNode(
  25128. "text",
  25129. { class: "value" },
  25130. vue.toDisplayString($props.data.badNum),
  25131. 1
  25132. /* TEXT */
  25133. )
  25134. ]),
  25135. vue.createElementVNode("view", { class: "item-row" }, [
  25136. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  25137. vue.createElementVNode(
  25138. "text",
  25139. { class: "value" },
  25140. vue.toDisplayString($props.data.waybillCode),
  25141. 1
  25142. /* TEXT */
  25143. )
  25144. ]),
  25145. vue.createElementVNode("view", { class: "item-row" }, [
  25146. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  25147. vue.createElementVNode(
  25148. "text",
  25149. { class: "value" },
  25150. vue.toDisplayString($props.data.auditFinishTime),
  25151. 1
  25152. /* TEXT */
  25153. )
  25154. ]),
  25155. vue.createElementVNode("view", { class: "item-row" }, [
  25156. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  25157. vue.createElementVNode(
  25158. "text",
  25159. { class: "value" },
  25160. vue.toDisplayString($props.data.auditUserName),
  25161. 1
  25162. /* TEXT */
  25163. )
  25164. ])
  25165. ])
  25166. ]),
  25167. _: 1
  25168. /* STABLE */
  25169. }, 8, ["options"])
  25170. ]),
  25171. _: 1
  25172. /* STABLE */
  25173. })
  25174. ]);
  25175. }
  25176. const BadItem = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-93494456"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/BadItem.vue"]]);
  25177. class VolumeTTS {
  25178. constructor(opts) {
  25179. __publicField(this, "ttsParams", {
  25180. lang: "zh-CN",
  25181. speed: 1,
  25182. // 将 0-10 转换为 0-1
  25183. pitch: 1,
  25184. // 将 0-10 转换为 0-1
  25185. volume: 1
  25186. });
  25187. __publicField(this, "TTSModule");
  25188. __publicField(this, "platform", uni.getSystemInfoSync().platform);
  25189. if (opts)
  25190. this.ttsParams = opts;
  25191. this.init();
  25192. }
  25193. init() {
  25194. this.TTSModule = requireNativePlugin("nrb-tts-plugin");
  25195. this.TTSModule && this.TTSModule.init({
  25196. "lang": "zh",
  25197. "country": "CN"
  25198. }, (res2) => {
  25199. if (res2.success == 0) {
  25200. formatAppLog("log", "at utils/VolumeTTS.js:27", "TTS初始化成功");
  25201. }
  25202. });
  25203. }
  25204. //加一个text的预处理,将text中的数字替换成 零一二三四五六七八九十
  25205. preprocessText(text) {
  25206. const digitMap = {
  25207. "0": "零",
  25208. "1": "一",
  25209. "2": "二",
  25210. "3": "三",
  25211. "4": "四",
  25212. "5": "五",
  25213. "6": "六",
  25214. "7": "七",
  25215. "8": "八",
  25216. "9": "九"
  25217. };
  25218. return text.replace(/\d+/g, (match) => {
  25219. return match.split("").map((digit) => digitMap[digit] || digit).join("");
  25220. });
  25221. }
  25222. speak(text) {
  25223. text = this.preprocessText(text);
  25224. let opts = this.platform == "ios" ? {
  25225. "rate": this.ttsParams.speed,
  25226. "lang": "zh-CN",
  25227. "volume": 1
  25228. } : {
  25229. "pitch": this.ttsParams.pitch,
  25230. "speechRate": this.ttsParams.speed,
  25231. "queueMode": 1
  25232. };
  25233. this.TTSModule.speak(text, opts, (e) => {
  25234. formatAppLog("log", "at utils/VolumeTTS.js:71", e, "读取成功");
  25235. });
  25236. }
  25237. stop() {
  25238. if (this.TTSModule) {
  25239. this.TTSModule.stop();
  25240. }
  25241. }
  25242. }
  25243. const _sfc_main$H = {
  25244. __name: "RemarkDialog",
  25245. props: {
  25246. visible: {
  25247. type: Boolean,
  25248. default: false
  25249. },
  25250. initialValue: {
  25251. type: String,
  25252. default: ""
  25253. }
  25254. },
  25255. emits: ["update:visible", "confirm"],
  25256. setup(__props, { expose: __expose, emit: __emit }) {
  25257. __expose();
  25258. const props2 = __props;
  25259. const emit2 = __emit;
  25260. const remarkText = vue.ref("");
  25261. const quickTags = vue.ref(["少书", "多书", "子母件", "书单不符"]);
  25262. vue.watch(() => props2.visible, (newVal) => {
  25263. if (newVal) {
  25264. remarkText.value = props2.initialValue;
  25265. }
  25266. });
  25267. const appendTag = (tag) => {
  25268. remarkText.value += remarkText.value ? " " + tag : tag;
  25269. };
  25270. const onClose = () => {
  25271. emit2("update:visible", false);
  25272. };
  25273. const onConfirm = () => {
  25274. emit2("confirm", remarkText.value);
  25275. onClose();
  25276. };
  25277. const __returned__ = { props: props2, emit: emit2, remarkText, quickTags, appendTag, onClose, onConfirm, ref: vue.ref, watch: vue.watch };
  25278. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25279. return __returned__;
  25280. }
  25281. };
  25282. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  25283. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  25284. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  25285. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  25286. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  25287. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  25288. show: $props.visible,
  25289. onClose: $setup.onClose,
  25290. mode: "center",
  25291. round: "10",
  25292. closeOnClickOverlay: false
  25293. }, {
  25294. default: vue.withCtx(() => [
  25295. vue.createElementVNode("view", { class: "remark-dialog" }, [
  25296. vue.createElementVNode("view", { class: "dialog-title" }, "编辑备注"),
  25297. vue.createCommentVNode(" 备注输入框 "),
  25298. vue.createElementVNode("view", { class: "dialog-content mb-30" }, [
  25299. vue.createVNode(_component_u_textarea, {
  25300. modelValue: $setup.remarkText,
  25301. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.remarkText = $event),
  25302. placeholder: "请输入",
  25303. maxlength: 200,
  25304. height: "100",
  25305. count: ""
  25306. }, null, 8, ["modelValue"]),
  25307. vue.createCommentVNode(" 快速输入标签 "),
  25308. vue.createElementVNode("view", { class: "quick-tags mt-10" }, [
  25309. vue.createElementVNode("text", { class: "common-title" }, "快速填入"),
  25310. vue.createElementVNode("view", { class: "tags-container flex-w mt-20" }, [
  25311. (vue.openBlock(true), vue.createElementBlock(
  25312. vue.Fragment,
  25313. null,
  25314. vue.renderList($setup.quickTags, (tag, index2) => {
  25315. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  25316. key: index2,
  25317. text: tag,
  25318. plain: "",
  25319. size: "mini",
  25320. type: "primary",
  25321. onClick: ($event) => $setup.appendTag(tag),
  25322. class: "tag-item"
  25323. }, null, 8, ["text", "onClick"]);
  25324. }),
  25325. 128
  25326. /* KEYED_FRAGMENT */
  25327. ))
  25328. ])
  25329. ])
  25330. ]),
  25331. vue.createCommentVNode(" 底部按钮 "),
  25332. vue.createElementVNode("view", { class: "dialog-footer" }, [
  25333. vue.createVNode(_component_u_button, {
  25334. plain: "",
  25335. onClick: $setup.onClose,
  25336. class: "footer-btn"
  25337. }, {
  25338. default: vue.withCtx(() => [
  25339. vue.createTextVNode("取消")
  25340. ]),
  25341. _: 1
  25342. /* STABLE */
  25343. }),
  25344. vue.createVNode(_component_u_button, {
  25345. type: "primary",
  25346. onClick: $setup.onConfirm,
  25347. class: "footer-btn"
  25348. }, {
  25349. default: vue.withCtx(() => [
  25350. vue.createTextVNode("确定")
  25351. ]),
  25352. _: 1
  25353. /* STABLE */
  25354. })
  25355. ])
  25356. ])
  25357. ]),
  25358. _: 1
  25359. /* STABLE */
  25360. }, 8, ["show"]);
  25361. }
  25362. const RemarkDialog = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-73050f50"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/RemarkDialog.vue"]]);
  25363. const _sfc_main$G = {
  25364. __name: "bad-in",
  25365. setup(__props, { expose: __expose }) {
  25366. __expose();
  25367. const waybillCode = vue.ref();
  25368. const formData = vue.reactive({
  25369. godownName: "",
  25370. godownId: "",
  25371. positionCode: ""
  25372. });
  25373. const ordersMap = vue.ref([]);
  25374. const codeMap = vue.ref([]);
  25375. function getDetailByCode2(code2) {
  25376. if (codeMap.value.includes(code2)) {
  25377. uni.$u.ttsModule.speak("重复扫描");
  25378. return;
  25379. }
  25380. uni.$u.http.get("/app/stock/searchOrder?waybillCode=" + code2).then((res2) => {
  25381. if (res2.code == 200) {
  25382. ordersMap.value.unshift(res2.data);
  25383. codeMap.value.push(code2);
  25384. } else if (res2.code == 601) {
  25385. uni.$u.ttsModule.speak(res2.msg);
  25386. uni.showModal({
  25387. title: "提示",
  25388. content: res2.msg,
  25389. showCancel: false
  25390. });
  25391. } else {
  25392. uni.$u.toast(res2.msg);
  25393. }
  25394. });
  25395. }
  25396. const remarkVisible = vue.ref(false);
  25397. const currentRemark = vue.ref("");
  25398. const currentEditIndex = vue.ref(-1);
  25399. const goBack = () => {
  25400. if (ordersMap.value.length > 0) {
  25401. uni.showModal({
  25402. title: "退出确认",
  25403. content: "是否确认放弃本次入库?",
  25404. success: (res2) => {
  25405. if (res2.confirm) {
  25406. uni.navigateBack();
  25407. }
  25408. }
  25409. });
  25410. } else {
  25411. uni.navigateBack();
  25412. }
  25413. };
  25414. const onSubmit = () => {
  25415. if (!formData.godownId || !formData.positionCode) {
  25416. uni.$u.toast("请先选择仓库和库位");
  25417. uni.$u.ttsModule.speak("请先选择仓库和库位");
  25418. return;
  25419. }
  25420. uni.showModal({
  25421. title: "提交确认",
  25422. content: "是否确认提交本次入库?",
  25423. success: (res2) => {
  25424. if (res2.confirm) {
  25425. handleSubmitConfirm();
  25426. }
  25427. }
  25428. });
  25429. };
  25430. const handleSubmitConfirm = async () => {
  25431. uni.showLoading({
  25432. title: "提交中..."
  25433. });
  25434. let orderInfo = ordersMap.value.map((item) => {
  25435. return {
  25436. orderId: item.orderId,
  25437. waybillCode: item.waybillCode,
  25438. bookNum: item.badNum,
  25439. remark: item.remark
  25440. };
  25441. });
  25442. if (orderInfo.length == 0) {
  25443. uni.hideLoading();
  25444. uni.$u.ttsModule.speak("请添加订单数据");
  25445. return;
  25446. }
  25447. uni.$u.http.post("/app/stock/addBatch", {
  25448. godownId: formData.godownId,
  25449. positionCode: formData.positionCode,
  25450. orderInfo
  25451. }).then((res2) => {
  25452. if (res2.code == 200) {
  25453. uni.$u.toast("入库成功");
  25454. uni.$u.ttsModule.speak("入库成功");
  25455. clearData();
  25456. } else {
  25457. uni.$u.toast(res2.msg);
  25458. }
  25459. }).finally(() => {
  25460. uni.hideLoading();
  25461. });
  25462. };
  25463. const clearData = () => {
  25464. ordersMap.value.length = 0;
  25465. waybillCode.value = "";
  25466. formData.godownName = "";
  25467. formData.positionCode = "";
  25468. formData.godownId = "";
  25469. };
  25470. const editOrder = (index2) => {
  25471. openRemarkDialog(index2);
  25472. };
  25473. const openScan = () => {
  25474. uni.scanCode({
  25475. success: (res2) => {
  25476. waybillCode.value = res2.result;
  25477. getDetailByCode2(res2.result);
  25478. },
  25479. fail: (err) => {
  25480. uni.showToast({
  25481. title: "扫码失败",
  25482. icon: "error"
  25483. });
  25484. }
  25485. });
  25486. };
  25487. function selectLocation() {
  25488. if (!formData.godownId) {
  25489. uni.$u.toast("请先选择仓库");
  25490. uni.$u.ttsModule.speak("请先选择仓库");
  25491. return;
  25492. }
  25493. uni.navigateTo({
  25494. url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
  25495. });
  25496. }
  25497. const deleteOrder = (index2) => {
  25498. ordersMap.value.splice(index2, 1);
  25499. };
  25500. vue.onMounted(() => {
  25501. uni.$u.useGlobalEvent((e) => {
  25502. if (e.barcode) {
  25503. waybillCode.value = e.barcode;
  25504. getDetailByCode2(e.barcode);
  25505. }
  25506. });
  25507. uni.$on("updateLocation", (locationCode) => {
  25508. formData.positionCode = locationCode;
  25509. });
  25510. uni.$on("updateWarehouse", (data) => {
  25511. formData.godownName = data.godownName;
  25512. formData.godownId = data.id;
  25513. });
  25514. });
  25515. vue.onUnmounted(() => {
  25516. uni.$off("updateLocation");
  25517. uni.$off("updateWarehouse");
  25518. });
  25519. const openRemarkDialog = (index2, remark = "") => {
  25520. currentEditIndex.value = index2;
  25521. currentRemark.value = remark;
  25522. remarkVisible.value = true;
  25523. };
  25524. const handleRemarkConfirm = (remark) => {
  25525. if (currentEditIndex.value >= 0) {
  25526. ordersMap.value[currentEditIndex.value].remark = remark;
  25527. }
  25528. currentEditIndex.value = -1;
  25529. currentRemark.value = "";
  25530. };
  25531. const selectWarehouse = () => {
  25532. uni.navigateTo({
  25533. url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
  25534. });
  25535. };
  25536. const __returned__ = { waybillCode, formData, 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, BadItem, get VolumeTTS() {
  25537. return VolumeTTS;
  25538. }, RemarkDialog };
  25539. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25540. return __returned__;
  25541. }
  25542. };
  25543. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  25544. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25545. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  25546. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  25547. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  25548. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  25549. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  25550. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25551. return vue.openBlock(), vue.createElementBlock("view", {
  25552. class: "common-page",
  25553. style: { "padding": "0" }
  25554. }, [
  25555. vue.createCommentVNode(" 顶部导航栏 "),
  25556. vue.createElementVNode("view", { class: "header" }, [
  25557. vue.createVNode(_component_u_navbar, {
  25558. title: "不良入库",
  25559. border: false,
  25560. fixed: "",
  25561. "safe-area-inset-top": ""
  25562. }, {
  25563. left: vue.withCtx(() => [
  25564. vue.createVNode(_component_u_icon, {
  25565. name: "arrow-left",
  25566. color: "#333333",
  25567. size: "20",
  25568. onClick: $setup.goBack
  25569. })
  25570. ]),
  25571. right: vue.withCtx(() => [
  25572. vue.createVNode(_component_u_text, {
  25573. type: "primary",
  25574. text: "提交",
  25575. onClick: $setup.onSubmit
  25576. })
  25577. ]),
  25578. _: 1
  25579. /* STABLE */
  25580. })
  25581. ]),
  25582. vue.createCommentVNode(" 主要内容区域 "),
  25583. vue.createElementVNode("view", { class: "content" }, [
  25584. vue.createCommentVNode(" 订单基本信息 "),
  25585. vue.createElementVNode("view", { class: "info-section" }, [
  25586. vue.createVNode(_component_u_form, {
  25587. model: $setup.formData,
  25588. ref: "formRef",
  25589. "label-width": "80px",
  25590. "label-position": "left"
  25591. }, {
  25592. default: vue.withCtx(() => [
  25593. vue.createVNode(_component_u_form_item, {
  25594. label: "订单总数",
  25595. required: ""
  25596. }, {
  25597. default: vue.withCtx(() => [
  25598. vue.createElementVNode(
  25599. "span",
  25600. null,
  25601. vue.toDisplayString($setup.ordersMap.length),
  25602. 1
  25603. /* TEXT */
  25604. )
  25605. ]),
  25606. _: 1
  25607. /* STABLE */
  25608. }),
  25609. vue.createVNode(_component_u_form_item, {
  25610. label: "仓库",
  25611. required: ""
  25612. }, {
  25613. default: vue.withCtx(() => [
  25614. vue.createElementVNode("view", {
  25615. onClick: $setup.selectWarehouse,
  25616. style: { "width": "100%" }
  25617. }, [
  25618. vue.createVNode(_component_u_input, {
  25619. modelValue: $setup.formData.godownName,
  25620. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.godownName = $event),
  25621. readonly: "",
  25622. "custom-style": "font-size:32rpx",
  25623. placeholder: "请选择仓库",
  25624. suffixIcon: "arrow-right"
  25625. }, null, 8, ["modelValue"])
  25626. ])
  25627. ]),
  25628. _: 1
  25629. /* STABLE */
  25630. }),
  25631. vue.createVNode(_component_u_form_item, {
  25632. label: "库位",
  25633. required: ""
  25634. }, {
  25635. default: vue.withCtx(() => [
  25636. vue.createElementVNode("view", {
  25637. onClick: $setup.selectLocation,
  25638. style: { "width": "100%" }
  25639. }, [
  25640. vue.createVNode(_component_u_input, {
  25641. modelValue: $setup.formData.positionCode,
  25642. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.positionCode = $event),
  25643. readonly: "",
  25644. "custom-style": "font-size:32rpx",
  25645. placeholder: "请选择库位",
  25646. suffixIcon: "arrow-right"
  25647. }, null, 8, ["modelValue"])
  25648. ])
  25649. ]),
  25650. _: 1
  25651. /* STABLE */
  25652. })
  25653. ]),
  25654. _: 1
  25655. /* STABLE */
  25656. }, 8, ["model"])
  25657. ]),
  25658. vue.createCommentVNode(" 订单列表 "),
  25659. vue.createElementVNode("view", { class: "order-list" }, [
  25660. (vue.openBlock(true), vue.createElementBlock(
  25661. vue.Fragment,
  25662. null,
  25663. vue.renderList($setup.ordersMap, (order, index2) => {
  25664. return vue.openBlock(), vue.createBlock($setup["BadItem"], {
  25665. key: index2,
  25666. data: order,
  25667. onDelete: ($event) => $setup.deleteOrder(index2),
  25668. onEdit: ($event) => $setup.editOrder(index2)
  25669. }, null, 8, ["data", "onDelete", "onEdit"]);
  25670. }),
  25671. 128
  25672. /* KEYED_FRAGMENT */
  25673. ))
  25674. ]),
  25675. vue.createCommentVNode(" 底部扫码输入框 "),
  25676. vue.createElementVNode("view", {
  25677. class: "fixed-bottom pad-20",
  25678. style: { "background": "#ffffff" }
  25679. }, [
  25680. vue.createVNode(_component_u_search, {
  25681. placeholder: "请输入物流单号",
  25682. searchIconSize: 24,
  25683. bgColor: "#f6f7f6",
  25684. onSearch: _cache[2] || (_cache[2] = ($event) => $setup.getDetailByCode($setup.waybillCode)),
  25685. modelValue: $setup.waybillCode,
  25686. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.waybillCode = $event),
  25687. "custom-style": "font-size:32rpx",
  25688. "placeholder-style": "font-size:32rpx",
  25689. clearabled: true,
  25690. focus: false,
  25691. showAction: false,
  25692. height: 42
  25693. }, null, 8, ["modelValue"]),
  25694. vue.createVNode(_component_u_icon, {
  25695. name: "scan",
  25696. size: "32",
  25697. color: "#19be6b",
  25698. onClick: $setup.openScan
  25699. })
  25700. ])
  25701. ]),
  25702. vue.createCommentVNode(" 备注弹窗 "),
  25703. vue.createVNode($setup["RemarkDialog"], {
  25704. visible: $setup.remarkVisible,
  25705. "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => $setup.remarkVisible = $event),
  25706. "initial-value": $setup.currentRemark,
  25707. onConfirm: $setup.handleRemarkConfirm
  25708. }, null, 8, ["visible", "initial-value"])
  25709. ]);
  25710. }
  25711. const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__scopeId", "data-v-04095d32"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-in.vue"]]);
  25712. const _sfc_main$F = {
  25713. __name: "bad-out",
  25714. setup(__props, { expose: __expose }) {
  25715. __expose();
  25716. const searchText = vue.ref("");
  25717. const onSearch = () => {
  25718. uni.navigateTo({
  25719. url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}`
  25720. });
  25721. };
  25722. const openScan = () => {
  25723. uni.scanCode({
  25724. success: (res2) => {
  25725. searchText.value = res2.result;
  25726. onSearch();
  25727. },
  25728. fail: (err) => {
  25729. uni.showToast({
  25730. title: "扫码失败",
  25731. icon: "error"
  25732. });
  25733. }
  25734. });
  25735. };
  25736. const __returned__ = { searchText, onSearch, openScan, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted };
  25737. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25738. return __returned__;
  25739. }
  25740. };
  25741. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  25742. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25743. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25744. return vue.openBlock(), vue.createElementBlock("view", { class: "container flex-d h100" }, [
  25745. vue.createCommentVNode(" 库位列表 "),
  25746. vue.createElementVNode("view", { class: "location-list flex-1" }, [
  25747. vue.createElementVNode("view", { class: "no-data flex-c mt-60" }, "请输入快递单号/订单编号")
  25748. ]),
  25749. vue.createCommentVNode(" 底部搜索框 "),
  25750. vue.createElementVNode("view", {
  25751. class: "pad-20 flex-a",
  25752. style: { "background": "#ffffff" }
  25753. }, [
  25754. vue.createVNode(_component_u_search, {
  25755. modelValue: $setup.searchText,
  25756. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  25757. placeholder: "请输入快递单号/订单编号",
  25758. "show-action": false,
  25759. clearabled: true,
  25760. onChange: $setup.onSearch,
  25761. height: "40",
  25762. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  25763. }, null, 8, ["modelValue"]),
  25764. vue.createVNode(_component_u_icon, {
  25765. name: "scan",
  25766. size: "28",
  25767. color: "#19be6b",
  25768. onClick: $setup.openScan
  25769. })
  25770. ])
  25771. ]);
  25772. }
  25773. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out.vue"]]);
  25774. const _sfc_main$E = {
  25775. __name: "BadOutCard",
  25776. props: {
  25777. item: Object
  25778. },
  25779. setup(__props, { expose: __expose }) {
  25780. __expose();
  25781. const props2 = __props;
  25782. const __returned__ = { props: props2 };
  25783. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25784. return __returned__;
  25785. }
  25786. };
  25787. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  25788. var _a;
  25789. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  25790. vue.createElementVNode("view", { class: "flex w100" }, [
  25791. vue.createElementVNode("view", { class: "flex-d" }, [
  25792. vue.createElementVNode("image", {
  25793. style: { "width": "80px", "height": "100px" },
  25794. src: $props.item.cover,
  25795. mode: "aspectFill"
  25796. }, null, 8, ["src"]),
  25797. vue.createElementVNode(
  25798. "view",
  25799. { class: "quantity mt-20" },
  25800. "数量: " + vue.toDisplayString($props.item.num),
  25801. 1
  25802. /* TEXT */
  25803. )
  25804. ]),
  25805. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  25806. vue.createElementVNode(
  25807. "view",
  25808. { class: "common-title mb-20" },
  25809. vue.toDisplayString($props.item.title),
  25810. 1
  25811. /* TEXT */
  25812. ),
  25813. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25814. vue.createElementVNode(
  25815. "view",
  25816. { class: "isbn" },
  25817. "ISBN: " + vue.toDisplayString($props.item.isbn),
  25818. 1
  25819. /* TEXT */
  25820. ),
  25821. vue.createElementVNode(
  25822. "view",
  25823. { class: "set" },
  25824. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "否"),
  25825. 1
  25826. /* TEXT */
  25827. )
  25828. ]),
  25829. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25830. vue.createElementVNode(
  25831. "view",
  25832. { class: "discount" },
  25833. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  25834. 1
  25835. /* TEXT */
  25836. ),
  25837. vue.createElementVNode(
  25838. "view",
  25839. { class: "review" },
  25840. "审核金额: " + vue.toDisplayString($props.item.finalMoney),
  25841. 1
  25842. /* TEXT */
  25843. )
  25844. ]),
  25845. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25846. vue.createElementVNode(
  25847. "view",
  25848. { class: "price" },
  25849. "定价: " + vue.toDisplayString($props.item.bookPrice),
  25850. 1
  25851. /* TEXT */
  25852. ),
  25853. vue.createElementVNode(
  25854. "view",
  25855. { class: "estimate" },
  25856. "预估单价: " + vue.toDisplayString($props.item.expectMoney),
  25857. 1
  25858. /* TEXT */
  25859. )
  25860. ]),
  25861. vue.createElementVNode(
  25862. "view",
  25863. { class: "quality mb-10" },
  25864. " 品相: 良好(" + vue.toDisplayString($props.item.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.generalNum) + ") 、 极差(" + vue.toDisplayString($props.item.badNum) + ") ",
  25865. 1
  25866. /* TEXT */
  25867. ),
  25868. vue.createElementVNode(
  25869. "view",
  25870. { class: "reason color-red" },
  25871. "原因: " + vue.toDisplayString((_a = $props.item.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == 3).map((item) => item.com).join(";")),
  25872. 1
  25873. /* TEXT */
  25874. )
  25875. ])
  25876. ])
  25877. ]);
  25878. }
  25879. const BadOutCard = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-e52c1f77"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/BadOutCard.vue"]]);
  25880. const _sfc_main$D = {
  25881. __name: "bad-out-order",
  25882. setup(__props, { expose: __expose }) {
  25883. __expose();
  25884. const searchText = vue.ref("");
  25885. const errorMsg = vue.ref("");
  25886. const hasData = vue.ref(false);
  25887. const locationInfo = vue.ref({
  25888. positionCode: "",
  25889. waybillCode: "",
  25890. orderId: "",
  25891. badNum: "",
  25892. remark: ""
  25893. });
  25894. const badList = vue.ref([]);
  25895. onLoad((options) => {
  25896. if (options.searchText) {
  25897. searchText.value = options.searchText;
  25898. onSearch();
  25899. }
  25900. });
  25901. const getSearchType = (text) => {
  25902. return /^[0-9]+$/.test(text) ? 1 : 2;
  25903. };
  25904. const onSearch = async () => {
  25905. if (!searchText.value) {
  25906. errorMsg.value = "请输入运单号或订单编号";
  25907. hasData.value = false;
  25908. return;
  25909. }
  25910. try {
  25911. const searchType = getSearchType(searchText.value);
  25912. const res2 = await uni.$u.http.post("/app/stock/findOrderOutStock", {
  25913. search: searchText.value,
  25914. searchType
  25915. });
  25916. if (res2.code == 200) {
  25917. const data = res2.data;
  25918. errorMsg.value = "";
  25919. hasData.value = true;
  25920. locationInfo.value = {
  25921. positionCode: data.positionCode || "",
  25922. waybillCode: data.waybillCode || "",
  25923. orderId: data.orderId || "",
  25924. badNum: data.badNum || "",
  25925. remark: data.remark || ""
  25926. };
  25927. badList.value = data.detailVoList || [];
  25928. } else {
  25929. errorMsg.value = res2.msg || "未找到相关数据";
  25930. hasData.value = false;
  25931. return;
  25932. }
  25933. } catch (error2) {
  25934. errorMsg.value = error2.message || "获取数据失败";
  25935. hasData.value = false;
  25936. uni.showToast({
  25937. title: "获取数据失败",
  25938. icon: "none"
  25939. });
  25940. }
  25941. };
  25942. const openScan = () => {
  25943. uni.scanCode({
  25944. success: (res2) => {
  25945. searchText.value = res2.result;
  25946. onSearch();
  25947. },
  25948. fail: (err) => {
  25949. uni.showToast({
  25950. title: "扫码失败",
  25951. icon: "error"
  25952. });
  25953. }
  25954. });
  25955. };
  25956. const onConfirm = () => {
  25957. uni.showModal({
  25958. title: "确认提示",
  25959. content: "是否确认出库?",
  25960. success: async (res2) => {
  25961. if (res2.confirm) {
  25962. uni.$u.http.post("/app/stock/outStock", {
  25963. orderId: locationInfo.value.orderId,
  25964. positionCode: locationInfo.value.positionCode,
  25965. outputRemark: locationInfo.value.remark
  25966. }).then((res3) => {
  25967. if (res3.code == 200) {
  25968. uni.showToast({
  25969. title: "出库成功",
  25970. icon: "success"
  25971. });
  25972. uni.$u.ttsModule.speak("出库成功");
  25973. searchText.value = "";
  25974. locationInfo.value = {
  25975. positionCode: "",
  25976. waybillCode: "",
  25977. orderId: "",
  25978. badNum: "",
  25979. remark: ""
  25980. };
  25981. badList.value = [];
  25982. } else {
  25983. uni.showToast({
  25984. title: res3.msg,
  25985. icon: "none"
  25986. });
  25987. uni.$u.ttsModule.speak(res3.msg);
  25988. }
  25989. });
  25990. }
  25991. }
  25992. });
  25993. };
  25994. const remarkVisible = vue.ref(false);
  25995. const currentRemark = vue.ref("");
  25996. const currentEditIndex = vue.ref(-1);
  25997. const openRemarkDialog = (index2, remark = "") => {
  25998. currentEditIndex.value = index2;
  25999. currentRemark.value = remark;
  26000. remarkVisible.value = true;
  26001. };
  26002. const handleRemarkConfirm = (remark) => {
  26003. if (currentEditIndex.value >= 0) {
  26004. orders.value[currentEditIndex.value].remark = remark;
  26005. }
  26006. currentEditIndex.value = -1;
  26007. currentRemark.value = "";
  26008. };
  26009. const __returned__ = { searchText, errorMsg, hasData, locationInfo, badList, getSearchType, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, RemarkDialog, get VolumeTTS() {
  26010. return VolumeTTS;
  26011. }, get onLoad() {
  26012. return onLoad;
  26013. } };
  26014. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26015. return __returned__;
  26016. }
  26017. };
  26018. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  26019. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26020. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26021. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  26022. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  26023. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26024. vue.createCommentVNode(" 搜索框 "),
  26025. vue.createVNode(_component_u_sticky, null, {
  26026. default: vue.withCtx(() => [
  26027. vue.createElementVNode("view", { class: "search-area flex-c mb-20" }, [
  26028. vue.createVNode(_component_u_search, {
  26029. modelValue: $setup.searchText,
  26030. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  26031. placeholder: "请输入运单号/订单编号",
  26032. "show-action": false,
  26033. clearabled: true,
  26034. onChange: $setup.onSearch,
  26035. height: "40"
  26036. }, null, 8, ["modelValue"]),
  26037. vue.createVNode(_component_u_icon, {
  26038. name: "scan",
  26039. size: "28",
  26040. color: "#19be6b",
  26041. onClick: $setup.openScan
  26042. })
  26043. ])
  26044. ]),
  26045. _: 1
  26046. /* STABLE */
  26047. }),
  26048. vue.createElementVNode("view", { class: "content" }, [
  26049. vue.createCommentVNode(" 错误提示 "),
  26050. $setup.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", {
  26051. key: 0,
  26052. class: "error-section"
  26053. }, [
  26054. vue.createVNode(_component_u_icon, {
  26055. name: "info-circle",
  26056. color: "#fa3534",
  26057. size: "20"
  26058. }),
  26059. vue.createElementVNode(
  26060. "text",
  26061. { class: "error-text" },
  26062. vue.toDisplayString($setup.errorMsg),
  26063. 1
  26064. /* TEXT */
  26065. )
  26066. ])) : vue.createCommentVNode("v-if", true),
  26067. vue.createCommentVNode(" 基本信息 "),
  26068. $setup.hasData ? (vue.openBlock(), vue.createElementBlock(
  26069. vue.Fragment,
  26070. { key: 1 },
  26071. [
  26072. vue.createElementVNode("view", { class: "info-section" }, [
  26073. vue.createElementVNode(
  26074. "view",
  26075. { class: "info-item" },
  26076. "库位:" + vue.toDisplayString($setup.locationInfo.positionCode),
  26077. 1
  26078. /* TEXT */
  26079. ),
  26080. vue.createElementVNode(
  26081. "view",
  26082. { class: "info-item" },
  26083. "物流单号:" + vue.toDisplayString($setup.locationInfo.waybillCode || "-"),
  26084. 1
  26085. /* TEXT */
  26086. ),
  26087. vue.createElementVNode(
  26088. "view",
  26089. { class: "info-item" },
  26090. "订单编号:" + vue.toDisplayString($setup.locationInfo.orderId),
  26091. 1
  26092. /* TEXT */
  26093. ),
  26094. vue.createElementVNode(
  26095. "view",
  26096. { class: "info-item" },
  26097. "订单商品:" + vue.toDisplayString($setup.locationInfo.badNum),
  26098. 1
  26099. /* TEXT */
  26100. ),
  26101. vue.createElementVNode(
  26102. "view",
  26103. { class: "info-item" },
  26104. "备注信息:" + vue.toDisplayString($setup.locationInfo.remark || "-"),
  26105. 1
  26106. /* TEXT */
  26107. )
  26108. ]),
  26109. vue.createCommentVNode(" 极差商品列表 "),
  26110. vue.createElementVNode("view", { class: "bad-list" }, [
  26111. vue.createElementVNode("view", { class: "list-title mb-6" }, "极差"),
  26112. (vue.openBlock(true), vue.createElementBlock(
  26113. vue.Fragment,
  26114. null,
  26115. vue.renderList($setup.badList, (item, index2) => {
  26116. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  26117. vue.createVNode($setup["BadOutCard"], {
  26118. item,
  26119. index: index2
  26120. }, null, 8, ["item", "index"])
  26121. ]);
  26122. }),
  26123. 128
  26124. /* KEYED_FRAGMENT */
  26125. ))
  26126. ])
  26127. ],
  26128. 64
  26129. /* STABLE_FRAGMENT */
  26130. )) : vue.createCommentVNode("v-if", true)
  26131. ]),
  26132. vue.createCommentVNode(" 底部按钮 "),
  26133. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  26134. vue.createVNode(_component_u_button, {
  26135. size: "large",
  26136. type: "warning",
  26137. text: "反馈",
  26138. onClick: $setup.openRemarkDialog
  26139. }),
  26140. vue.createVNode(_component_u_button, {
  26141. size: "large",
  26142. type: "primary",
  26143. text: "确定出库",
  26144. onClick: $setup.onConfirm
  26145. })
  26146. ]),
  26147. vue.createCommentVNode(" 备注弹窗 "),
  26148. vue.createVNode($setup["RemarkDialog"], {
  26149. visible: $setup.remarkVisible,
  26150. "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $setup.remarkVisible = $event),
  26151. "initial-value": $setup.currentRemark,
  26152. onConfirm: $setup.handleRemarkConfirm
  26153. }, null, 8, ["visible", "initial-value"])
  26154. ]);
  26155. }
  26156. const PagesIndexWmsBadOutOrder = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-43bc1c65"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out-order.vue"]]);
  26157. const _sfc_main$C = {
  26158. __name: "bad-off",
  26159. setup(__props, { expose: __expose }) {
  26160. __expose();
  26161. const searchText = vue.ref("");
  26162. const taskList = vue.ref([]);
  26163. const loading = vue.ref(false);
  26164. const taskStatusEnum = {
  26165. 1: "待作业",
  26166. 2: "作业中",
  26167. 3: "已完成",
  26168. 4: "已关闭"
  26169. };
  26170. const getTaskStatusText = (status) => {
  26171. return taskStatusEnum[status] || "未知状态";
  26172. };
  26173. const fetchTaskList = async () => {
  26174. loading.value = true;
  26175. try {
  26176. const response = await uni.$u.http.post("/app/appstock/getNeedStockList");
  26177. formatAppLog("log", "at pages/index/wms/bad-off.vue:77", response);
  26178. taskList.value = response;
  26179. if (response.code === 200) {
  26180. taskList.value = response.data || [];
  26181. } else {
  26182. uni.showToast({
  26183. title: response.msg || "获取任务列表失败",
  26184. icon: "none"
  26185. });
  26186. }
  26187. } catch (error2) {
  26188. uni.showToast({
  26189. title: "获取任务列表失败",
  26190. icon: "none"
  26191. });
  26192. } finally {
  26193. loading.value = false;
  26194. }
  26195. };
  26196. const onSearch = () => {
  26197. fetchTaskList();
  26198. };
  26199. const openScan = () => {
  26200. uni.scanCode({
  26201. success: (res2) => {
  26202. searchText.value = res2.result;
  26203. onSearch();
  26204. },
  26205. fail: (err) => {
  26206. uni.showToast({
  26207. title: "扫码失败",
  26208. icon: "error"
  26209. });
  26210. }
  26211. });
  26212. };
  26213. const handleTaskClick = (task) => {
  26214. uni.showModal({
  26215. title: "领取确认",
  26216. content: "是否确认领取下架任务?",
  26217. cancelText: "取消",
  26218. confirmText: "确认",
  26219. success: async (res2) => {
  26220. if (res2.confirm) {
  26221. try {
  26222. const response = await uni.$u.http.post(`/app/appstock/lockStockTask?taskCode=${task.taskCode}`);
  26223. if (response.code === 200) {
  26224. uni.navigateTo({
  26225. url: `/pages/index/wms/task-detail?taskCode=${task.taskCode}`
  26226. });
  26227. } else {
  26228. uni.showToast({
  26229. title: response.msg || "任务锁定失败",
  26230. icon: "none"
  26231. });
  26232. }
  26233. } catch (error2) {
  26234. uni.showToast({
  26235. title: error2,
  26236. icon: "none"
  26237. });
  26238. }
  26239. }
  26240. }
  26241. });
  26242. };
  26243. vue.onMounted(() => {
  26244. fetchTaskList();
  26245. });
  26246. const __returned__ = { searchText, taskList, loading, taskStatusEnum, getTaskStatusText, fetchTaskList, onSearch, openScan, handleTaskClick, ref: vue.ref, onMounted: vue.onMounted };
  26247. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26248. return __returned__;
  26249. }
  26250. };
  26251. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  26252. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  26253. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26254. vue.createCommentVNode(" 任务列表 "),
  26255. vue.createElementVNode("view", { class: "task-list" }, [
  26256. !$setup.loading ? (vue.openBlock(), vue.createElementBlock(
  26257. vue.Fragment,
  26258. { key: 0 },
  26259. [
  26260. $setup.taskList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  26261. vue.Fragment,
  26262. { key: 0 },
  26263. vue.renderList($setup.taskList, (item, index2) => {
  26264. return vue.openBlock(), vue.createElementBlock("view", {
  26265. key: index2,
  26266. class: "task-card",
  26267. onClick: ($event) => $setup.handleTaskClick(item)
  26268. }, [
  26269. vue.createElementVNode("view", { class: "task-header" }, [
  26270. vue.createElementVNode(
  26271. "text",
  26272. { class: "task-no" },
  26273. "作业单号:" + vue.toDisplayString(item.taskCode),
  26274. 1
  26275. /* TEXT */
  26276. )
  26277. ]),
  26278. vue.createElementVNode("view", { class: "task-content" }, [
  26279. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26280. vue.createElementVNode("text", { class: "label" }, "仓库:"),
  26281. vue.createElementVNode(
  26282. "text",
  26283. { class: "value" },
  26284. vue.toDisplayString(item.godownName),
  26285. 1
  26286. /* TEXT */
  26287. )
  26288. ]),
  26289. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26290. vue.createElementVNode("text", { class: "label" }, "订单数量:"),
  26291. vue.createElementVNode(
  26292. "text",
  26293. { class: "value" },
  26294. vue.toDisplayString(item.orderNum),
  26295. 1
  26296. /* TEXT */
  26297. )
  26298. ]),
  26299. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26300. vue.createElementVNode("text", { class: "label" }, "创建时间:"),
  26301. vue.createElementVNode(
  26302. "text",
  26303. { class: "value" },
  26304. vue.toDisplayString(item.createTime),
  26305. 1
  26306. /* TEXT */
  26307. )
  26308. ]),
  26309. vue.createElementVNode("view", { class: "flex-a" }, [
  26310. vue.createElementVNode("text", { class: "label" }, "作业状态:"),
  26311. vue.createElementVNode(
  26312. "text",
  26313. { class: "value" },
  26314. vue.toDisplayString($setup.getTaskStatusText(item.taskStatus)),
  26315. 1
  26316. /* TEXT */
  26317. )
  26318. ])
  26319. ])
  26320. ], 8, ["onClick"]);
  26321. }),
  26322. 128
  26323. /* KEYED_FRAGMENT */
  26324. )) : (vue.openBlock(), vue.createElementBlock("view", {
  26325. key: 1,
  26326. class: "empty-state"
  26327. }, [
  26328. vue.createElementVNode("text", null, "暂无任务数据")
  26329. ]))
  26330. ],
  26331. 64
  26332. /* STABLE_FRAGMENT */
  26333. )) : (vue.openBlock(), vue.createElementBlock("view", {
  26334. key: 1,
  26335. class: "loading-state"
  26336. }, [
  26337. vue.createVNode(_component_u_loading_icon),
  26338. vue.createElementVNode("text", null, "加载中...")
  26339. ]))
  26340. ])
  26341. ]);
  26342. }
  26343. const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-58677b56"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-off.vue"]]);
  26344. const _sfc_main$B = {
  26345. __name: "order-query",
  26346. setup(__props, { expose: __expose }) {
  26347. __expose();
  26348. const query = vue.reactive({
  26349. searchType: 2,
  26350. search: ""
  26351. });
  26352. const orderQuery = () => {
  26353. if (!query.search) {
  26354. uni.$u.toast("请输入快递单号/订单编号");
  26355. return;
  26356. }
  26357. uni.navigateTo({
  26358. url: `/pages/index/wms/order-query-list?id=${query.search}`
  26359. });
  26360. };
  26361. function openScan() {
  26362. uni.scanCode({
  26363. success: (res2) => {
  26364. query.search = res2.result;
  26365. orderQuery();
  26366. }
  26367. });
  26368. }
  26369. onLoad(() => {
  26370. uni.$u.useGlobalEvent((e) => {
  26371. if (e.barcode) {
  26372. query.search = e.barcode;
  26373. orderQuery();
  26374. }
  26375. });
  26376. });
  26377. const __returned__ = { query, orderQuery, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  26378. return onLoad;
  26379. } };
  26380. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26381. return __returned__;
  26382. }
  26383. };
  26384. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  26385. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26386. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26387. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26388. vue.createCommentVNode(" 底部扫码输入框 "),
  26389. vue.createElementVNode("view", {
  26390. class: "fixed-bottom pad-20",
  26391. style: { "background": "#ffffff" }
  26392. }, [
  26393. vue.createVNode(_component_u_search, {
  26394. placeholder: "请输入快递单号/订单编号",
  26395. searchIconSize: 24,
  26396. bgColor: "#f6f7f6",
  26397. onSearch: $setup.orderQuery,
  26398. modelValue: $setup.query.search,
  26399. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.query.search = $event),
  26400. "custom-style": "font-size:32rpx",
  26401. "placeholder-style": "font-size:32rpx",
  26402. clearabled: true,
  26403. focus: false,
  26404. showAction: false,
  26405. height: 42
  26406. }, null, 8, ["modelValue"]),
  26407. vue.createVNode(_component_u_icon, {
  26408. name: "scan",
  26409. size: "34",
  26410. color: "#19be6b",
  26411. onClick: $setup.openScan
  26412. })
  26413. ])
  26414. ]);
  26415. }
  26416. const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-c65e1cc0"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query.vue"]]);
  26417. const props$5 = {
  26418. props: {
  26419. // 是否显示圆点
  26420. isDot: {
  26421. type: Boolean,
  26422. default: props$E.badge.isDot
  26423. },
  26424. // 显示的内容
  26425. value: {
  26426. type: [Number, String],
  26427. default: props$E.badge.value
  26428. },
  26429. // 显示的内容
  26430. modelValue: {
  26431. type: [Number, String],
  26432. default: props$E.badge.modelValue
  26433. },
  26434. // 是否显示
  26435. show: {
  26436. type: Boolean,
  26437. default: props$E.badge.show
  26438. },
  26439. // 最大值,超过最大值会显示 '{max}+'
  26440. max: {
  26441. type: [Number, String],
  26442. default: props$E.badge.max
  26443. },
  26444. // 主题类型,error|warning|success|primary
  26445. type: {
  26446. type: String,
  26447. default: props$E.badge.type
  26448. },
  26449. // 当数值为 0 时,是否展示 Badge
  26450. showZero: {
  26451. type: Boolean,
  26452. default: props$E.badge.showZero
  26453. },
  26454. // 背景颜色,优先级比type高,如设置,type参数会失效
  26455. bgColor: {
  26456. type: [String, null],
  26457. default: props$E.badge.bgColor
  26458. },
  26459. // 字体颜色
  26460. color: {
  26461. type: [String, null],
  26462. default: props$E.badge.color
  26463. },
  26464. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  26465. shape: {
  26466. type: String,
  26467. default: props$E.badge.shape
  26468. },
  26469. // 设置数字的显示方式,overflow|ellipsis|limit
  26470. // overflow会根据max字段判断,超出显示`${max}+`
  26471. // ellipsis会根据max判断,超出显示`${max}...`
  26472. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  26473. numberType: {
  26474. type: String,
  26475. default: props$E.badge.numberType
  26476. },
  26477. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  26478. offset: {
  26479. type: Array,
  26480. default: props$E.badge.offset
  26481. },
  26482. // 是否反转背景和字体颜色
  26483. inverted: {
  26484. type: Boolean,
  26485. default: props$E.badge.inverted
  26486. },
  26487. // 是否绝对定位
  26488. absolute: {
  26489. type: Boolean,
  26490. default: props$E.badge.absolute
  26491. }
  26492. }
  26493. };
  26494. const _sfc_main$A = {
  26495. name: "u-badge",
  26496. mixins: [mpMixin, props$5, mixin],
  26497. computed: {
  26498. // 是否将badge中心与父组件右上角重合
  26499. boxStyle() {
  26500. let style = {};
  26501. return style;
  26502. },
  26503. // 整个组件的样式
  26504. badgeStyle() {
  26505. const style = {};
  26506. if (this.color) {
  26507. style.color = this.color;
  26508. }
  26509. if (this.bgColor && !this.inverted) {
  26510. style.backgroundColor = this.bgColor;
  26511. }
  26512. if (this.absolute) {
  26513. style.position = "absolute";
  26514. if (this.offset.length) {
  26515. const top = this.offset[0];
  26516. const right = this.offset[1] || top;
  26517. style.top = uni.$u.addUnit(top);
  26518. style.right = uni.$u.addUnit(right);
  26519. }
  26520. }
  26521. return style;
  26522. },
  26523. showValue() {
  26524. switch (this.numberType) {
  26525. case "overflow":
  26526. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  26527. case "ellipsis":
  26528. return Number(this.value) > Number(this.max) ? "..." : this.value;
  26529. case "limit":
  26530. 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;
  26531. default:
  26532. return Number(this.value);
  26533. }
  26534. }
  26535. }
  26536. };
  26537. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  26538. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  26539. "text",
  26540. {
  26541. key: 0,
  26542. 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"]),
  26543. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
  26544. },
  26545. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  26546. 7
  26547. /* TEXT, CLASS, STYLE */
  26548. )) : vue.createCommentVNode("v-if", true);
  26549. }
  26550. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-06cca9b7"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]);
  26551. const props$4 = {
  26552. props: {
  26553. // 滑块的移动过渡时间,单位ms
  26554. duration: {
  26555. type: Number,
  26556. default: props$E.tabs.duration
  26557. },
  26558. // tabs标签数组
  26559. list: {
  26560. type: Array,
  26561. default: props$E.tabs.list
  26562. },
  26563. // 滑块颜色
  26564. lineColor: {
  26565. type: String,
  26566. default: props$E.tabs.lineColor
  26567. },
  26568. // 菜单选择中时的样式
  26569. activeStyle: {
  26570. type: [String, Object],
  26571. default: props$E.tabs.activeStyle
  26572. },
  26573. // 菜单非选中时的样式
  26574. inactiveStyle: {
  26575. type: [String, Object],
  26576. default: props$E.tabs.inactiveStyle
  26577. },
  26578. // 滑块长度
  26579. lineWidth: {
  26580. type: [String, Number],
  26581. default: props$E.tabs.lineWidth
  26582. },
  26583. // 滑块高度
  26584. lineHeight: {
  26585. type: [String, Number],
  26586. default: props$E.tabs.lineHeight
  26587. },
  26588. // 滑块背景显示大小,当滑块背景设置为图片时使用
  26589. lineBgSize: {
  26590. type: String,
  26591. default: props$E.tabs.lineBgSize
  26592. },
  26593. // 菜单item的样式
  26594. itemStyle: {
  26595. type: [String, Object],
  26596. default: props$E.tabs.itemStyle
  26597. },
  26598. // 菜单是否可滚动
  26599. scrollable: {
  26600. type: Boolean,
  26601. default: props$E.tabs.scrollable
  26602. },
  26603. // 当前选中标签的索引
  26604. current: {
  26605. type: [Number, String],
  26606. default: props$E.tabs.current
  26607. },
  26608. // 默认读取的键名
  26609. keyName: {
  26610. type: String,
  26611. default: props$E.tabs.keyName
  26612. }
  26613. }
  26614. };
  26615. const _sfc_main$z = {
  26616. name: "u-tabs",
  26617. mixins: [mpMixin, mixin, props$4],
  26618. data() {
  26619. return {
  26620. firstTime: true,
  26621. scrollLeft: 0,
  26622. scrollViewWidth: 0,
  26623. lineOffsetLeft: 0,
  26624. tabsRect: {
  26625. left: 0
  26626. },
  26627. innerCurrent: 0,
  26628. moving: false
  26629. };
  26630. },
  26631. watch: {
  26632. current: {
  26633. immediate: true,
  26634. handler(newValue, oldValue) {
  26635. if (newValue !== this.innerCurrent) {
  26636. this.innerCurrent = newValue;
  26637. this.$nextTick(() => {
  26638. this.resize();
  26639. });
  26640. }
  26641. }
  26642. },
  26643. // list变化时,重新渲染list各项信息
  26644. list() {
  26645. this.$nextTick(() => {
  26646. this.resize();
  26647. });
  26648. }
  26649. },
  26650. computed: {
  26651. textStyle() {
  26652. return (index2) => {
  26653. const style = {};
  26654. const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
  26655. this.inactiveStyle
  26656. );
  26657. if (this.list[index2].disabled) {
  26658. style.color = "#c8c9cc";
  26659. }
  26660. return uni.$u.deepMerge(customeStyle, style);
  26661. };
  26662. },
  26663. propsBadge() {
  26664. return uni.$u.props.badge;
  26665. }
  26666. },
  26667. async mounted() {
  26668. this.init();
  26669. },
  26670. emits: ["click", "change"],
  26671. methods: {
  26672. setLineLeft() {
  26673. const tabItem = this.list[this.innerCurrent];
  26674. if (!tabItem) {
  26675. return;
  26676. }
  26677. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  26678. const lineWidth = uni.$u.getPx(this.lineWidth);
  26679. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  26680. if (this.firstTime) {
  26681. setTimeout(() => {
  26682. this.firstTime = false;
  26683. }, 10);
  26684. }
  26685. },
  26686. // nvue下设置滑块的位置
  26687. animation(x, duration = 0) {
  26688. },
  26689. // 点击某一个标签
  26690. clickHandler(item, index2) {
  26691. this.$emit("click", {
  26692. ...item,
  26693. index: index2
  26694. });
  26695. if (item.disabled)
  26696. return;
  26697. this.innerCurrent = index2;
  26698. this.resize();
  26699. this.$emit("change", {
  26700. ...item,
  26701. index: index2
  26702. });
  26703. },
  26704. init() {
  26705. uni.$u.sleep().then(() => {
  26706. this.resize();
  26707. });
  26708. },
  26709. setScrollLeft() {
  26710. const tabRect = this.list[this.innerCurrent];
  26711. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  26712. return total + curr.rect.width;
  26713. }, 0);
  26714. const windowWidth = uni.$u.sys().windowWidth;
  26715. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  26716. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  26717. this.scrollLeft = Math.max(0, scrollLeft);
  26718. },
  26719. // 获取所有标签的尺寸
  26720. resize() {
  26721. if (this.list.length === 0) {
  26722. return;
  26723. }
  26724. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  26725. this.tabsRect = tabsRect;
  26726. this.scrollViewWidth = 0;
  26727. itemRect.map((item, index2) => {
  26728. this.scrollViewWidth += item.width;
  26729. this.list[index2].rect = item;
  26730. });
  26731. this.setLineLeft();
  26732. this.setScrollLeft();
  26733. });
  26734. },
  26735. // 获取导航菜单的尺寸
  26736. getTabsRect() {
  26737. return new Promise((resolve) => {
  26738. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  26739. });
  26740. },
  26741. // 获取所有标签的尺寸
  26742. getAllItemRect() {
  26743. return new Promise((resolve) => {
  26744. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  26745. `u-tabs__wrapper__nav__item-${index2}`,
  26746. true
  26747. ));
  26748. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  26749. });
  26750. },
  26751. // 获取各个标签的尺寸
  26752. queryRect(el, item) {
  26753. return new Promise((resolve) => {
  26754. this.$uGetRect(`.${el}`).then((size) => {
  26755. resolve(size);
  26756. });
  26757. });
  26758. }
  26759. }
  26760. };
  26761. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  26762. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$1);
  26763. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  26764. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  26765. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  26766. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  26767. vue.createElementVNode("scroll-view", {
  26768. "scroll-x": _ctx.scrollable,
  26769. "scroll-left": $data.scrollLeft,
  26770. "scroll-with-animation": "",
  26771. class: "u-tabs__wrapper__scroll-view",
  26772. "show-scrollbar": false,
  26773. ref: "u-tabs__wrapper__scroll-view"
  26774. }, [
  26775. vue.createElementVNode(
  26776. "view",
  26777. {
  26778. class: "u-tabs__wrapper__nav",
  26779. ref: "u-tabs__wrapper__nav"
  26780. },
  26781. [
  26782. (vue.openBlock(true), vue.createElementBlock(
  26783. vue.Fragment,
  26784. null,
  26785. vue.renderList(_ctx.list, (item, index2) => {
  26786. return vue.openBlock(), vue.createElementBlock("view", {
  26787. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
  26788. key: index2,
  26789. onClick: ($event) => $options.clickHandler(item, index2),
  26790. ref_for: true,
  26791. ref: `u-tabs__wrapper__nav__item-${index2}`,
  26792. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  26793. }, [
  26794. vue.createElementVNode(
  26795. "text",
  26796. {
  26797. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  26798. style: vue.normalizeStyle([$options.textStyle(index2)])
  26799. },
  26800. vue.toDisplayString(item[_ctx.keyName]),
  26801. 7
  26802. /* TEXT, CLASS, STYLE */
  26803. ),
  26804. vue.createVNode(_component_u_badge, {
  26805. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  26806. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  26807. value: item.badge && item.badge.value || $options.propsBadge.value,
  26808. max: item.badge && item.badge.max || $options.propsBadge.max,
  26809. type: item.badge && item.badge.type || $options.propsBadge.type,
  26810. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  26811. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  26812. color: item.badge && item.badge.color || $options.propsBadge.color,
  26813. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  26814. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  26815. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  26816. customStyle: "margin-left: 4px;"
  26817. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  26818. ], 14, ["onClick"]);
  26819. }),
  26820. 128
  26821. /* KEYED_FRAGMENT */
  26822. )),
  26823. vue.createElementVNode(
  26824. "view",
  26825. {
  26826. class: "u-tabs__wrapper__nav__line",
  26827. ref: "u-tabs__wrapper__nav__line",
  26828. style: vue.normalizeStyle([{
  26829. width: _ctx.$u.addUnit(_ctx.lineWidth),
  26830. transform: `translate(${$data.lineOffsetLeft}px)`,
  26831. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  26832. height: _ctx.$u.addUnit(_ctx.lineHeight),
  26833. background: _ctx.lineColor,
  26834. backgroundSize: _ctx.lineBgSize
  26835. }])
  26836. },
  26837. null,
  26838. 4
  26839. /* STYLE */
  26840. )
  26841. ],
  26842. 512
  26843. /* NEED_PATCH */
  26844. )
  26845. ], 8, ["scroll-x", "scroll-left"])
  26846. ]),
  26847. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  26848. ])
  26849. ]);
  26850. }
  26851. const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-02b0c54f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]);
  26852. const _sfc_main$y = {
  26853. __name: "order-query-list",
  26854. setup(__props, { expose: __expose }) {
  26855. __expose();
  26856. const list1 = vue.reactive([{
  26857. name: "商品明细"
  26858. }, {
  26859. name: "操作记录"
  26860. }]);
  26861. const activeTab = vue.ref(0);
  26862. const query = vue.reactive({
  26863. searchType: 2,
  26864. search: ""
  26865. });
  26866. const determineSearchType = (search) => {
  26867. const isNumberString = /^\d+$/.test(search.toString());
  26868. return isNumberString ? 1 : 2;
  26869. };
  26870. const detail = vue.ref({});
  26871. const orderQuery = () => {
  26872. if (!query.search) {
  26873. uni.$u.toast("请输入快递单号/订单编号");
  26874. uni.$u.ttsModule.speak("请输入快递单号/订单编号");
  26875. return;
  26876. }
  26877. query.searchType = determineSearchType(query.search);
  26878. uni.$u.http.get("/app/stock/findOrder", { params: query }).then((res2) => {
  26879. if (res2.code == 200) {
  26880. detail.value = res2.data;
  26881. uni.$u.ttsModule.speak("查询成功");
  26882. getOperationLogs(res2.data.orderId);
  26883. } else {
  26884. uni.$u.toast(res2.msg);
  26885. uni.$u.ttsModule.speak(res2.msg);
  26886. }
  26887. });
  26888. };
  26889. const operationLogs = vue.ref([]);
  26890. const getOperationLogs = (orderId) => {
  26891. uni.$u.http.get("/app/stock/getGodownStocklog", { params: { orderId } }).then((res2) => {
  26892. if (res2.code == 200) {
  26893. operationLogs.value = res2.data;
  26894. }
  26895. });
  26896. };
  26897. function handleTabChange(tab) {
  26898. activeTab.value = tab.index;
  26899. }
  26900. function openScan() {
  26901. uni.scanCode({
  26902. success: (res2) => {
  26903. query.search = res2.result;
  26904. orderQuery();
  26905. }
  26906. });
  26907. }
  26908. onLoad((options) => {
  26909. if (options.id) {
  26910. query.search = options.id;
  26911. orderQuery();
  26912. }
  26913. uni.$u.useGlobalEvent((e) => {
  26914. if (e.barcode) {
  26915. getDetailByCode(e.barcode);
  26916. }
  26917. });
  26918. });
  26919. const __returned__ = { list1, activeTab, query, determineSearchType, detail, orderQuery, operationLogs, getOperationLogs, handleTabChange, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  26920. return onLoad;
  26921. }, BookInfo };
  26922. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26923. return __returned__;
  26924. }
  26925. };
  26926. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  26927. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  26928. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26929. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26930. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26931. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  26932. key: 0,
  26933. class: "header"
  26934. }, [
  26935. vue.createElementVNode("view", { class: "flex-d" }, [
  26936. vue.createElementVNode(
  26937. "text",
  26938. null,
  26939. "订单编号: " + vue.toDisplayString($setup.detail.orderId),
  26940. 1
  26941. /* TEXT */
  26942. ),
  26943. vue.createElementVNode(
  26944. "text",
  26945. { class: "mt-16" },
  26946. "库位: " + vue.toDisplayString($setup.detail.positionCode),
  26947. 1
  26948. /* TEXT */
  26949. )
  26950. ]),
  26951. vue.createElementVNode("view", { class: "status" }, [
  26952. vue.createElementVNode(
  26953. "text",
  26954. null,
  26955. vue.toDisplayString($setup.detail.stockStatus == 1 ? "已入库" : "已出库"),
  26956. 1
  26957. /* TEXT */
  26958. )
  26959. ])
  26960. ])) : vue.createCommentVNode("v-if", true),
  26961. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  26962. key: 1,
  26963. style: { "background-color": "#ffffff" },
  26964. class: "pad-5 mt-20 content-info"
  26965. }, [
  26966. vue.createVNode(_component_u_tabs, {
  26967. list: $setup.list1,
  26968. modelValue: $setup.activeTab,
  26969. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.activeTab = $event),
  26970. itemStyle: { height: "44px", width: "48%" },
  26971. onChange: $setup.handleTabChange
  26972. }, null, 8, ["list", "modelValue"]),
  26973. $setup.activeTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  26974. key: 0,
  26975. class: "product-details"
  26976. }, [
  26977. vue.createVNode($setup["BookInfo"], {
  26978. bookList: $setup.detail.detailVoList,
  26979. detail: $setup.detail,
  26980. isShow: false
  26981. }, null, 8, ["bookList", "detail"])
  26982. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  26983. key: 1,
  26984. class: "operation-logs mt-20"
  26985. }, [
  26986. (vue.openBlock(true), vue.createElementBlock(
  26987. vue.Fragment,
  26988. null,
  26989. vue.renderList($setup.operationLogs, (log, index2) => {
  26990. return vue.openBlock(), vue.createElementBlock("view", {
  26991. key: index2,
  26992. class: "log-item"
  26993. }, [
  26994. vue.createElementVNode(
  26995. "text",
  26996. null,
  26997. vue.toDisplayString(log.createTime),
  26998. 1
  26999. /* TEXT */
  27000. ),
  27001. vue.createElementVNode(
  27002. "text",
  27003. null,
  27004. vue.toDisplayString(log.createName),
  27005. 1
  27006. /* TEXT */
  27007. ),
  27008. vue.createElementVNode(
  27009. "text",
  27010. null,
  27011. vue.toDisplayString(log.content),
  27012. 1
  27013. /* TEXT */
  27014. )
  27015. ]);
  27016. }),
  27017. 128
  27018. /* KEYED_FRAGMENT */
  27019. ))
  27020. ]))
  27021. ])) : vue.createCommentVNode("v-if", true),
  27022. vue.createCommentVNode(" 底部扫码输入框 "),
  27023. vue.createElementVNode("view", {
  27024. class: "fixed-bottom pad-20",
  27025. style: { "background": "#ffffff" }
  27026. }, [
  27027. vue.createVNode(_component_u_search, {
  27028. placeholder: "请输入快递单号/订单编号",
  27029. searchIconSize: 24,
  27030. bgColor: "#f6f7f6",
  27031. onSearch: $setup.orderQuery,
  27032. modelValue: $setup.query.search,
  27033. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.query.search = $event),
  27034. "custom-style": "font-size:32rpx",
  27035. "placeholder-style": "font-size:32rpx",
  27036. clearabled: true,
  27037. focus: false,
  27038. showAction: false,
  27039. height: 42
  27040. }, null, 8, ["modelValue"]),
  27041. vue.createVNode(_component_u_icon, {
  27042. name: "scan",
  27043. size: "34",
  27044. color: "#19be6b",
  27045. onClick: $setup.openScan
  27046. })
  27047. ])
  27048. ]);
  27049. }
  27050. const PagesIndexWmsOrderQueryList = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-13461b03"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query-list.vue"]]);
  27051. const _sfc_main$x = {
  27052. __name: "location-order",
  27053. setup(__props, { expose: __expose }) {
  27054. __expose();
  27055. const positionCode = vue.ref("");
  27056. const onSearch = () => {
  27057. if (positionCode.value) {
  27058. uni.navigateTo({
  27059. url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
  27060. });
  27061. } else {
  27062. uni.$u.toast("请输入库位编号");
  27063. }
  27064. };
  27065. function openScan() {
  27066. uni.scanCode({
  27067. success: (res2) => {
  27068. positionCode.value = res2.result;
  27069. onSearch();
  27070. }
  27071. });
  27072. }
  27073. onLoad(() => {
  27074. uni.$u.useGlobalEvent((e) => {
  27075. if (e.barcode) {
  27076. positionCode.value = e.barcode;
  27077. onSearch();
  27078. }
  27079. });
  27080. });
  27081. const __returned__ = { positionCode, onSearch, openScan, ref: vue.ref, get onLoad() {
  27082. return onLoad;
  27083. } };
  27084. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27085. return __returned__;
  27086. }
  27087. };
  27088. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  27089. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27090. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27091. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27092. vue.createCommentVNode(" 底部扫码输入框 "),
  27093. vue.createElementVNode("view", {
  27094. class: "fixed-bottom pad-20",
  27095. style: { "background": "#ffffff" }
  27096. }, [
  27097. vue.createVNode(_component_u_search, {
  27098. placeholder: "请输入库位编号",
  27099. searchIconSize: 24,
  27100. bgColor: "#f6f7f6",
  27101. onSearch: $setup.onSearch,
  27102. modelValue: $setup.positionCode,
  27103. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.positionCode = $event),
  27104. clearabled: true,
  27105. focus: false,
  27106. showAction: false,
  27107. height: 42
  27108. }, null, 8, ["modelValue"]),
  27109. vue.createVNode(_component_u_icon, {
  27110. name: "scan",
  27111. size: "32",
  27112. color: "#19be6b",
  27113. onClick: $setup.openScan
  27114. })
  27115. ])
  27116. ]);
  27117. }
  27118. const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-38a6ed3a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order.vue"]]);
  27119. const _imports_0$1 = "/static/img/share.png";
  27120. const _sfc_main$w = {
  27121. __name: "LocationOrderItem",
  27122. props: {
  27123. item: {
  27124. type: Object,
  27125. required: true
  27126. },
  27127. isCheck: {
  27128. type: Boolean,
  27129. default: false
  27130. },
  27131. isLink: {
  27132. type: Boolean,
  27133. default: true
  27134. }
  27135. },
  27136. emits: ["select"],
  27137. setup(__props, { expose: __expose, emit: __emit }) {
  27138. __expose();
  27139. const props2 = __props;
  27140. const emit2 = __emit;
  27141. const toggleSelect = () => {
  27142. emit2("select", props2.item);
  27143. };
  27144. const handleQuickJump = () => {
  27145. uni.navigateTo({
  27146. url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
  27147. });
  27148. };
  27149. const __returned__ = { props: props2, emit: emit2, toggleSelect, handleQuickJump };
  27150. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27151. return __returned__;
  27152. }
  27153. };
  27154. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  27155. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27156. return vue.openBlock(), vue.createElementBlock("view", { class: "order-item" }, [
  27157. vue.createElementVNode("view", { class: "order-header" }, [
  27158. vue.createElementVNode("view", { class: "order-info" }, [
  27159. vue.createElementVNode("view", { class: "info-row" }, [
  27160. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  27161. vue.createElementVNode(
  27162. "text",
  27163. { class: "value" },
  27164. vue.toDisplayString($props.item.orderId),
  27165. 1
  27166. /* TEXT */
  27167. )
  27168. ]),
  27169. vue.createElementVNode("view", { class: "info-row" }, [
  27170. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  27171. vue.createElementVNode(
  27172. "text",
  27173. { class: "value" },
  27174. vue.toDisplayString($props.item.badNum),
  27175. 1
  27176. /* TEXT */
  27177. )
  27178. ]),
  27179. vue.createElementVNode("view", { class: "info-row" }, [
  27180. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  27181. vue.createElementVNode(
  27182. "text",
  27183. { class: "value" },
  27184. vue.toDisplayString($props.item.waybillCode),
  27185. 1
  27186. /* TEXT */
  27187. )
  27188. ]),
  27189. vue.createElementVNode("view", { class: "info-row" }, [
  27190. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  27191. vue.createElementVNode(
  27192. "text",
  27193. { class: "value" },
  27194. vue.toDisplayString($props.item.auditFinishTime),
  27195. 1
  27196. /* TEXT */
  27197. )
  27198. ]),
  27199. vue.createElementVNode("view", { class: "info-row" }, [
  27200. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  27201. vue.createElementVNode(
  27202. "text",
  27203. { class: "value" },
  27204. vue.toDisplayString($props.item.auditUserName),
  27205. 1
  27206. /* TEXT */
  27207. )
  27208. ])
  27209. ]),
  27210. $props.isCheck ? (vue.openBlock(), vue.createElementBlock("view", {
  27211. key: 0,
  27212. class: "check-icon"
  27213. }, [
  27214. vue.createVNode(_component_u_icon, {
  27215. name: $props.item.checked ? "checkmark-circle-fill" : "checkmark-circle",
  27216. color: $props.item.checked ? "#19be6b" : "#c8c9cc",
  27217. size: "28",
  27218. onClick: $setup.toggleSelect
  27219. }, null, 8, ["name", "color"])
  27220. ])) : vue.createCommentVNode("v-if", true),
  27221. $props.isLink ? (vue.openBlock(), vue.createElementBlock("view", {
  27222. key: 1,
  27223. class: "flex flex-d flex-a-c flex-j-c quick-jump",
  27224. onClick: $setup.handleQuickJump
  27225. }, [
  27226. vue.createElementVNode("image", {
  27227. src: _imports_0$1,
  27228. mode: "widthFix",
  27229. style: { "width": "30px" }
  27230. }),
  27231. vue.createElementVNode("text", { style: { "font-size": "28rpx", "color": "#19be6b" } }, "快速跳转")
  27232. ])) : vue.createCommentVNode("v-if", true)
  27233. ])
  27234. ]);
  27235. }
  27236. const LocationOrderItem = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-b4edd1b0"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/LocationOrderItem.vue"]]);
  27237. const _sfc_main$v = {
  27238. __name: "location-order-list",
  27239. setup(__props, { expose: __expose }) {
  27240. __expose();
  27241. const orderCode = vue.ref("");
  27242. const originList = vue.ref([]);
  27243. const orderList = vue.ref([]);
  27244. const detail = vue.ref({});
  27245. const getOrderListByPositionCode = (positionCode) => {
  27246. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  27247. if (res2.code == 200) {
  27248. detail.value = res2.data;
  27249. orderList.value = res2.data.godownStockLogResults;
  27250. originList.value = res2.data.godownStockLogResults;
  27251. if (originList.value.length > 0) {
  27252. uni.$u.ttsModule.speak("查询到" + originList.value.length + "条订单");
  27253. } else {
  27254. uni.$u.toast("暂无订单");
  27255. uni.$u.ttsModule.speak("暂无订单");
  27256. }
  27257. } else {
  27258. uni.$u.toast(res2.msg);
  27259. uni.$u.ttsModule.speak(res2.msg);
  27260. }
  27261. });
  27262. };
  27263. const onSearch = () => {
  27264. if (!orderCode.value) {
  27265. orderList.value = originList.value;
  27266. uni.$u.toast("请输入订单号或物流单号");
  27267. return;
  27268. }
  27269. const searchValue = String(orderCode.value).trim();
  27270. const isNumeric = /^[0-9]+$/.test(searchValue);
  27271. const result = originList.value.filter((item) => {
  27272. if (isNumeric) {
  27273. return item.orderId === orderCode.value;
  27274. } else {
  27275. return item.waybillCode === orderCode.value;
  27276. }
  27277. });
  27278. orderList.value = result;
  27279. };
  27280. function openScan() {
  27281. uni.scanCode({
  27282. success: (res2) => {
  27283. orderCode.value = res2.result;
  27284. onSearch();
  27285. }
  27286. });
  27287. }
  27288. onLoad((options) => {
  27289. if (options.positionCode) {
  27290. getOrderListByPositionCode(options.positionCode);
  27291. }
  27292. uni.$u.useGlobalEvent((e) => {
  27293. if (e.barcode) {
  27294. orderCode.value = res.result;
  27295. onSearch();
  27296. }
  27297. });
  27298. });
  27299. const __returned__ = { orderCode, originList, orderList, detail, getOrderListByPositionCode, onSearch, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27300. return onLoad;
  27301. }, LocationOrderItem };
  27302. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27303. return __returned__;
  27304. }
  27305. };
  27306. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  27307. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27308. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27309. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27310. vue.createElementVNode("view", { class: "header" }, [
  27311. vue.createElementVNode("view", { class: "flex-d" }, [
  27312. vue.createElementVNode(
  27313. "text",
  27314. null,
  27315. "仓库: " + vue.toDisplayString($setup.detail.godownName),
  27316. 1
  27317. /* TEXT */
  27318. ),
  27319. vue.createElementVNode(
  27320. "text",
  27321. { class: "mt-16" },
  27322. "库位编号: " + vue.toDisplayString($setup.detail.positionCode),
  27323. 1
  27324. /* TEXT */
  27325. ),
  27326. vue.createElementVNode(
  27327. "text",
  27328. { class: "mt-16" },
  27329. "订单数量: " + vue.toDisplayString($setup.originList.length),
  27330. 1
  27331. /* TEXT */
  27332. )
  27333. ])
  27334. ]),
  27335. vue.createElementVNode("view", { class: "product-details" }, [
  27336. (vue.openBlock(true), vue.createElementBlock(
  27337. vue.Fragment,
  27338. null,
  27339. vue.renderList($setup.orderList, (item, index2) => {
  27340. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  27341. key: index2,
  27342. item
  27343. }, null, 8, ["item"]);
  27344. }),
  27345. 128
  27346. /* KEYED_FRAGMENT */
  27347. ))
  27348. ]),
  27349. vue.createCommentVNode(" 底部扫码输入框 "),
  27350. vue.createElementVNode("view", {
  27351. class: "fixed-bottom pad-20",
  27352. style: { "background": "#ffffff" }
  27353. }, [
  27354. vue.createVNode(_component_u_search, {
  27355. placeholder: "请输入快递单号/订单编号",
  27356. searchIconSize: 24,
  27357. bgColor: "#f6f7f6",
  27358. onSearch: $setup.onSearch,
  27359. modelValue: $setup.orderCode,
  27360. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.orderCode = $event),
  27361. clearabled: true,
  27362. focus: false,
  27363. showAction: false,
  27364. height: 42
  27365. }, null, 8, ["modelValue"]),
  27366. vue.createVNode(_component_u_icon, {
  27367. name: "scan",
  27368. size: "36",
  27369. color: "#19be6b",
  27370. onClick: $setup.openScan
  27371. })
  27372. ])
  27373. ]);
  27374. }
  27375. const PagesIndexWmsLocationOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-3e424560"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order-list.vue"]]);
  27376. const _sfc_main$u = {
  27377. __name: "location-select",
  27378. setup(__props, { expose: __expose }) {
  27379. __expose();
  27380. const searchText = vue.ref("");
  27381. const locations = vue.ref([]);
  27382. function getLocationListByGodownId(godownId2, code2 = "") {
  27383. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + godownId2 + "&code=" + code2).then((res2) => {
  27384. if (res2.code == 200) {
  27385. locations.value = res2.data;
  27386. }
  27387. });
  27388. }
  27389. const scrollHeight = vue.ref(0);
  27390. const onSearch = () => {
  27391. getLocationListByGodownId(godownId.value, searchText.value);
  27392. };
  27393. const openScan = () => {
  27394. uni.scanCode({
  27395. success: (res2) => {
  27396. searchText.value = res2.result;
  27397. onSearch();
  27398. },
  27399. fail: (err) => {
  27400. uni.showToast({
  27401. title: "扫码失败",
  27402. icon: "error"
  27403. });
  27404. }
  27405. });
  27406. };
  27407. const selectLocation = (item) => {
  27408. uni.$emit("updateLocation", item);
  27409. uni.navigateBack();
  27410. };
  27411. const godownId = vue.ref("");
  27412. const positionCode = vue.ref("");
  27413. onLoad((opts) => {
  27414. godownId.value = opts.godownId;
  27415. positionCode.value = opts.positionCode;
  27416. getLocationListByGodownId(godownId.value);
  27417. scrollHeight.value = uni.getSystemInfoSync().windowHeight - 44 - 60;
  27418. uni.$u.useGlobalEvent((e) => {
  27419. if (e.barcode) {
  27420. searchText.value = e.barcode;
  27421. getLocationListByGodownId(godownId.value, e.barcode);
  27422. }
  27423. });
  27424. });
  27425. const __returned__ = { searchText, locations, getLocationListByGodownId, scrollHeight, onSearch, openScan, selectLocation, godownId, positionCode, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  27426. return onLoad;
  27427. } };
  27428. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27429. return __returned__;
  27430. }
  27431. };
  27432. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  27433. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27434. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27435. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27436. vue.createCommentVNode(" 库位列表 "),
  27437. vue.createElementVNode(
  27438. "scroll-view",
  27439. {
  27440. "scroll-y": "",
  27441. class: "location-list",
  27442. style: vue.normalizeStyle({ height: $setup.scrollHeight + "px" })
  27443. },
  27444. [
  27445. (vue.openBlock(true), vue.createElementBlock(
  27446. vue.Fragment,
  27447. null,
  27448. vue.renderList($setup.locations, (item, index2) => {
  27449. return vue.openBlock(), vue.createElementBlock("view", {
  27450. key: index2,
  27451. class: vue.normalizeClass(["location-item", item === $setup.positionCode ? "location-item-selected" : ""]),
  27452. "hover-class": "location-item-hover",
  27453. onClick: ($event) => $setup.selectLocation(item)
  27454. }, [
  27455. vue.createElementVNode(
  27456. "text",
  27457. null,
  27458. vue.toDisplayString(item),
  27459. 1
  27460. /* TEXT */
  27461. )
  27462. ], 10, ["onClick"]);
  27463. }),
  27464. 128
  27465. /* KEYED_FRAGMENT */
  27466. ))
  27467. ],
  27468. 4
  27469. /* STYLE */
  27470. ),
  27471. vue.createCommentVNode(" 底部搜索框 "),
  27472. vue.createElementVNode("view", {
  27473. class: "fixed-bottom pad-20",
  27474. style: { "background": "#ffffff" }
  27475. }, [
  27476. vue.createVNode(_component_u_search, {
  27477. modelValue: $setup.searchText,
  27478. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27479. placeholder: "请输入库位条码",
  27480. "show-action": false,
  27481. clearabled: true,
  27482. onChange: $setup.onSearch,
  27483. height: "40",
  27484. disabled: true,
  27485. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  27486. }, null, 8, ["modelValue"]),
  27487. vue.createVNode(_component_u_icon, {
  27488. name: "scan",
  27489. size: "28",
  27490. color: "#19be6b",
  27491. onClick: $setup.openScan
  27492. })
  27493. ])
  27494. ]);
  27495. }
  27496. const PagesIndexWmsLocationSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-b26ec186"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-select.vue"]]);
  27497. const _sfc_main$t = {
  27498. __name: "warehouse-select",
  27499. setup(__props, { expose: __expose }) {
  27500. __expose();
  27501. const searchText = vue.ref("");
  27502. const warehouses = vue.ref([]);
  27503. function getGodownListByName(name = "") {
  27504. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  27505. if (res2.code == 200) {
  27506. warehouses.value = res2.data;
  27507. }
  27508. });
  27509. }
  27510. getGodownListByName();
  27511. const onSearch = () => {
  27512. getGodownListByName(searchText.value);
  27513. };
  27514. const selectWarehouse = (item) => {
  27515. uni.$emit("updateWarehouse", item);
  27516. uni.navigateBack();
  27517. };
  27518. const selectedId = vue.ref();
  27519. onLoad((options) => {
  27520. if (options.godownId) {
  27521. selectedId.value = options.godownId;
  27522. }
  27523. });
  27524. const __returned__ = { searchText, warehouses, getGodownListByName, onSearch, selectWarehouse, selectedId, ref: vue.ref, computed: vue.computed, get onLoad() {
  27525. return onLoad;
  27526. } };
  27527. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27528. return __returned__;
  27529. }
  27530. };
  27531. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  27532. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27533. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27534. vue.createCommentVNode(" 搜索框 "),
  27535. vue.createElementVNode("view", { class: "search-area" }, [
  27536. vue.createVNode(_component_u_search, {
  27537. modelValue: $setup.searchText,
  27538. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27539. placeholder: "请输入仓库名称",
  27540. "show-action": false,
  27541. clearabled: true,
  27542. onChange: $setup.onSearch,
  27543. height: "40",
  27544. "placeholder-style": "font-size:16px"
  27545. }, null, 8, ["modelValue"])
  27546. ]),
  27547. vue.createCommentVNode(" 仓库列表 "),
  27548. vue.createElementVNode("view", { class: "warehouse-list" }, [
  27549. (vue.openBlock(true), vue.createElementBlock(
  27550. vue.Fragment,
  27551. null,
  27552. vue.renderList($setup.warehouses, (item, index2) => {
  27553. return vue.openBlock(), vue.createElementBlock("view", {
  27554. key: index2,
  27555. class: vue.normalizeClass(["warehouse-item", { "warehouse-item-active": item.id == $setup.selectedId }]),
  27556. "hover-class": "warehouse-item-hover",
  27557. onClick: ($event) => $setup.selectWarehouse(item)
  27558. }, [
  27559. vue.createElementVNode(
  27560. "text",
  27561. null,
  27562. vue.toDisplayString(index2 + 1) + "." + vue.toDisplayString(item.godownName),
  27563. 1
  27564. /* TEXT */
  27565. )
  27566. ], 10, ["onClick"]);
  27567. }),
  27568. 128
  27569. /* KEYED_FRAGMENT */
  27570. ))
  27571. ])
  27572. ]);
  27573. }
  27574. const PagesIndexWmsWarehouseSelect = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-c3e02812"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/warehouse-select.vue"]]);
  27575. const _sfc_main$s = {
  27576. __name: "speedy-check",
  27577. setup(__props, { expose: __expose }) {
  27578. __expose();
  27579. const goBack = () => {
  27580. uni.navigateBack();
  27581. };
  27582. const showCheckMethodPicker = vue.ref(false);
  27583. const checkMethod = vue.ref("增加数量");
  27584. const resetType = vue.ref(0);
  27585. const checkMethodOptions = ["增加数量", "减少数量", "实际数量"];
  27586. const getUserDefaultWarehouse = () => {
  27587. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  27588. if (res2.code == 200) {
  27589. getWarehouseLocationList(res2.data.id);
  27590. }
  27591. });
  27592. };
  27593. const location2 = vue.ref("");
  27594. const showLocationPopup = vue.ref(false);
  27595. const locationList = vue.ref([]);
  27596. const selectedLocation = vue.ref("");
  27597. const godownId = vue.ref();
  27598. const getWarehouseLocationList = (id) => {
  27599. godownId.value = id;
  27600. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + id).then((res2) => {
  27601. if (res2.code == 200) {
  27602. locationList.value = res2.data;
  27603. }
  27604. });
  27605. };
  27606. const searchValue = vue.ref("");
  27607. const products = vue.ref([]);
  27608. const onCheckMethodConfirm = (e) => {
  27609. checkMethod.value = e.value[0];
  27610. showCheckMethodPicker.value = false;
  27611. resetType.value = e.indexs[0] + 1;
  27612. };
  27613. const handleLocationSelect = () => {
  27614. showLocationPopup.value = true;
  27615. selectedLocation.value = location2.value;
  27616. };
  27617. const onLocationConfirm = () => {
  27618. if (selectedLocation.value) {
  27619. location2.value = selectedLocation.value;
  27620. showLocationPopup.value = false;
  27621. selectedLocation.value = "";
  27622. } else {
  27623. uni.$u.toast("请选择库位");
  27624. }
  27625. };
  27626. const selectLocation = (item) => {
  27627. selectedLocation.value = item;
  27628. };
  27629. const onSubmit = () => {
  27630. if (products.value.length === 0) {
  27631. uni.$u.toast("请添加盘点订单");
  27632. return;
  27633. }
  27634. const params = {
  27635. godownId: godownId.value,
  27636. positionCode: location2.value,
  27637. orderInfo: products.value.map((item) => ({
  27638. orderId: item.orderId,
  27639. waybillCode: item.waybillCode,
  27640. bookNum: item.badNum,
  27641. remark: item.remark || ""
  27642. })),
  27643. resetType: resetType.value
  27644. };
  27645. uni.$u.http.post("/app/stock/resetStock", params).then((res2) => {
  27646. if (res2.code === 200) {
  27647. uni.$u.toast("盘点成功");
  27648. location2.value = "";
  27649. products.value = [];
  27650. searchValue.value = "";
  27651. } else {
  27652. uni.$u.toast(res2.msg || "提交失败");
  27653. }
  27654. }).catch((err) => {
  27655. uni.$u.toast("提交失败");
  27656. formatAppLog("error", "at pages/index/wms/speedy-check.vue:229", err);
  27657. });
  27658. };
  27659. const onSearch = () => {
  27660. if (!searchValue.value) {
  27661. uni.$u.toast("请输入快递单号或订单编号");
  27662. return;
  27663. }
  27664. const searchType = /^[0-9]+$/.test(searchValue.value) ? 1 : 2;
  27665. uni.$u.http.get("/app/stock/searchBadOrderForReset", {
  27666. params: {
  27667. searchType,
  27668. search: searchValue.value
  27669. }
  27670. }).then((res2) => {
  27671. if (res2.code === 200) {
  27672. const exists = products.value.some(
  27673. (item) => item.orderId === res2.data.orderId || item.waybillCode === res2.data.waybillCode
  27674. );
  27675. if (exists) {
  27676. uni.$u.toast("该订单已添加");
  27677. return;
  27678. }
  27679. products.value.push(res2.data);
  27680. searchValue.value = "";
  27681. } else {
  27682. uni.$u.toast(res2.msg || "查询失败");
  27683. }
  27684. }).catch((err) => {
  27685. uni.$u.toast("查询失败");
  27686. formatAppLog("error", "at pages/index/wms/speedy-check.vue:271", err);
  27687. });
  27688. };
  27689. const openScan = () => {
  27690. uni.scanCode({
  27691. success: (res2) => {
  27692. searchValue.value = res2.result;
  27693. onSearch();
  27694. },
  27695. fail: (err) => {
  27696. uni.showToast({
  27697. title: "扫码失败",
  27698. icon: "error"
  27699. });
  27700. }
  27701. });
  27702. };
  27703. function handleAdd() {
  27704. if (!location2.value) {
  27705. uni.$u.toast("请选择库位");
  27706. return;
  27707. }
  27708. uni.navigateTo({
  27709. url: "/pages/index/wms/speedy-check-add?location=" + location2.value
  27710. });
  27711. }
  27712. const close = () => {
  27713. showLocationPopup.value = false;
  27714. };
  27715. const open2 = () => {
  27716. showLocationPopup.value = true;
  27717. };
  27718. onLoad(() => {
  27719. getUserDefaultWarehouse();
  27720. uni.$on("selectedProducts", (list) => {
  27721. products.value = list;
  27722. });
  27723. uni.$u.useGlobalEvent((e) => {
  27724. if (e.barcode) {
  27725. searchValue.value = e.barcode;
  27726. onSearch();
  27727. }
  27728. });
  27729. });
  27730. onUnload(() => {
  27731. uni.$off("selectedProducts");
  27732. });
  27733. const __returned__ = { goBack, showCheckMethodPicker, checkMethod, resetType, checkMethodOptions, getUserDefaultWarehouse, location: location2, showLocationPopup, locationList, selectedLocation, godownId, getWarehouseLocationList, searchValue, products, onCheckMethodConfirm, handleLocationSelect, onLocationConfirm, selectLocation, onSubmit, onSearch, openScan, handleAdd, close, open: open2, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27734. return onLoad;
  27735. }, get onUnload() {
  27736. return onUnload;
  27737. }, LocationOrderItem };
  27738. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27739. return __returned__;
  27740. }
  27741. };
  27742. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  27743. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27744. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  27745. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  27746. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  27747. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  27748. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  27749. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  27750. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  27751. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27752. return vue.openBlock(), vue.createElementBlock("view", {
  27753. class: "container",
  27754. style: { "padding-top": "44px", "padding-bottom": "10px" }
  27755. }, [
  27756. vue.createVNode(_component_u_navbar, {
  27757. title: "快速盘点",
  27758. border: false,
  27759. fixed: "",
  27760. "safe-area-inset-top": "",
  27761. bgColor: "#22ac38",
  27762. titleStyle: "font-size:36rpx;color:#fff"
  27763. }, {
  27764. left: vue.withCtx(() => [
  27765. vue.createVNode(_component_u_icon, {
  27766. name: "arrow-left",
  27767. color: "#fff",
  27768. size: "20",
  27769. onClick: $setup.goBack
  27770. })
  27771. ]),
  27772. right: vue.withCtx(() => [
  27773. vue.createElementVNode("text", {
  27774. style: { "color": "#ffffff" },
  27775. onClick: $setup.onSubmit
  27776. }, "提交")
  27777. ]),
  27778. _: 1
  27779. /* STABLE */
  27780. }),
  27781. vue.createCommentVNode(" 盘点信息选择区域 "),
  27782. vue.createElementVNode("view", {
  27783. class: "select-area",
  27784. style: { "margin-top": "44px" }
  27785. }, [
  27786. vue.createVNode(_component_u_cell_group, { border: true }, {
  27787. default: vue.withCtx(() => [
  27788. vue.createVNode(_component_u_cell, {
  27789. title: "盘点方式",
  27790. value: $setup.checkMethod,
  27791. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showCheckMethodPicker = true),
  27792. isLink: true,
  27793. border: true
  27794. }, null, 8, ["value"]),
  27795. vue.createVNode(_component_u_cell, {
  27796. title: "目标库位",
  27797. value: $setup.location,
  27798. onClick: $setup.handleLocationSelect,
  27799. isLink: true,
  27800. border: true
  27801. }, null, 8, ["value"])
  27802. ]),
  27803. _: 1
  27804. /* STABLE */
  27805. })
  27806. ]),
  27807. vue.createCommentVNode(" 盘点方式选择器 "),
  27808. vue.createVNode(_component_u_picker, {
  27809. show: $setup.showCheckMethodPicker,
  27810. columns: [$setup.checkMethodOptions],
  27811. onConfirm: $setup.onCheckMethodConfirm,
  27812. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showCheckMethodPicker = false),
  27813. showToolbar: true,
  27814. title: "选择盘点方式",
  27815. closeOnClickOverlay: true,
  27816. cancelText: "取消",
  27817. confirmText: "确定",
  27818. itemHeight: 44,
  27819. visibleItemCount: 5
  27820. }, null, 8, ["show", "columns"]),
  27821. vue.createCommentVNode(" 库位选择弹出层 "),
  27822. vue.createVNode(_component_u_popup, {
  27823. show: $setup.showLocationPopup,
  27824. mode: "bottom",
  27825. onClose: $setup.close,
  27826. onOpen: $setup.open,
  27827. closeOnClickOverlay: true,
  27828. round: 10,
  27829. safeAreaInsetBottom: true
  27830. }, {
  27831. default: vue.withCtx(() => [
  27832. vue.createElementVNode("view", { class: "location-popup" }, [
  27833. vue.createElementVNode("view", { class: "location-popup-header" }, [
  27834. vue.createElementVNode("text", { style: { "flex": "1" } }, "选择库位"),
  27835. vue.createVNode(_component_u_text, {
  27836. style: { "width": "40px", "flex": "none" },
  27837. type: "primary",
  27838. text: "确定",
  27839. onClick: $setup.onLocationConfirm
  27840. })
  27841. ]),
  27842. vue.createElementVNode("view", { class: "location-popup-content" }, [
  27843. vue.createVNode(_component_u_input, {
  27844. modelValue: $setup.selectedLocation,
  27845. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.selectedLocation = $event),
  27846. placeholder: "请输入库位",
  27847. customStyle: "background-color: #f6f6f6; border-radius: 4px;"
  27848. }, null, 8, ["modelValue"]),
  27849. vue.createElementVNode("view", { class: "location-list" }, [
  27850. (vue.openBlock(true), vue.createElementBlock(
  27851. vue.Fragment,
  27852. null,
  27853. vue.renderList($setup.locationList, (item, index2) => {
  27854. return vue.openBlock(), vue.createElementBlock("view", {
  27855. class: vue.normalizeClass(["location-item", { "location-item--selected": $setup.selectedLocation === item }]),
  27856. key: index2,
  27857. onClick: ($event) => $setup.selectLocation(item)
  27858. }, [
  27859. vue.createElementVNode(
  27860. "text",
  27861. null,
  27862. vue.toDisplayString(item),
  27863. 1
  27864. /* TEXT */
  27865. ),
  27866. $setup.selectedLocation === item ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  27867. key: 0,
  27868. name: "checkmark",
  27869. color: "#19be6b",
  27870. size: "16"
  27871. })) : vue.createCommentVNode("v-if", true)
  27872. ], 10, ["onClick"]);
  27873. }),
  27874. 128
  27875. /* KEYED_FRAGMENT */
  27876. ))
  27877. ])
  27878. ])
  27879. ])
  27880. ]),
  27881. _: 1
  27882. /* STABLE */
  27883. }, 8, ["show"]),
  27884. vue.createCommentVNode(" 订单列表 "),
  27885. vue.createElementVNode("view", { class: "product-details" }, [
  27886. (vue.openBlock(true), vue.createElementBlock(
  27887. vue.Fragment,
  27888. null,
  27889. vue.renderList($setup.products, (item, index2) => {
  27890. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  27891. isLink: _ctx.isLink,
  27892. key: index2,
  27893. item
  27894. }, null, 8, ["isLink", "item"]);
  27895. }),
  27896. 128
  27897. /* KEYED_FRAGMENT */
  27898. ))
  27899. ]),
  27900. vue.createElementVNode("view", {
  27901. class: "add-btn",
  27902. onClick: $setup.handleAdd
  27903. }, [
  27904. vue.createVNode(_component_u_icon, {
  27905. name: "plus-circle",
  27906. size: "40",
  27907. color: "#19be6b"
  27908. })
  27909. ]),
  27910. vue.createCommentVNode(" 底部扫码输入框 "),
  27911. vue.createElementVNode("view", {
  27912. class: "fixed-bottom pad-20",
  27913. style: { "background": "#ffffff" }
  27914. }, [
  27915. vue.createVNode(_component_u_search, {
  27916. placeholder: "请输入快递单号/订单编号",
  27917. modelValue: $setup.searchValue,
  27918. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.searchValue = $event),
  27919. onSearch: $setup.onSearch,
  27920. "show-action": false,
  27921. "custom-style": "margin-right:10px"
  27922. }, null, 8, ["modelValue"]),
  27923. vue.createVNode(_component_u_icon, {
  27924. name: "scan",
  27925. size: "28",
  27926. color: "#19be6b",
  27927. onClick: $setup.openScan
  27928. })
  27929. ])
  27930. ]);
  27931. }
  27932. const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-283ebe02"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/speedy-check.vue"]]);
  27933. const _sfc_main$r = {
  27934. __name: "BookItemOrder",
  27935. props: {
  27936. book: Object,
  27937. index: Number
  27938. },
  27939. emits: ["remove"],
  27940. setup(__props, { expose: __expose, emit: __emit }) {
  27941. __expose();
  27942. const props2 = __props;
  27943. const emit2 = __emit;
  27944. const removeBook = () => {
  27945. emit2("remove", { book: props2.book, index: props2.index });
  27946. };
  27947. const __returned__ = { props: props2, emit: emit2, removeBook };
  27948. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27949. return __returned__;
  27950. }
  27951. };
  27952. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  27953. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27954. return vue.openBlock(), vue.createElementBlock("view", { class: "book-item" }, [
  27955. vue.createElementVNode("image", {
  27956. class: "book-image",
  27957. src: $props.book.cover,
  27958. mode: "aspectFill"
  27959. }, null, 8, ["src"]),
  27960. vue.createElementVNode("view", { class: "book-info" }, [
  27961. vue.createElementVNode("view", { class: "book-title" }, [
  27962. vue.createElementVNode(
  27963. "text",
  27964. null,
  27965. vue.toDisplayString($props.book.bookName),
  27966. 1
  27967. /* TEXT */
  27968. ),
  27969. vue.createVNode(_component_u_icon, {
  27970. name: "close",
  27971. size: "18",
  27972. onClick: $setup.removeBook
  27973. })
  27974. ]),
  27975. vue.createElementVNode("view", { class: "flex-a flex-1" }, [
  27976. vue.createElementVNode("view", { class: "book-details flex-d" }, [
  27977. vue.createElementVNode(
  27978. "text",
  27979. null,
  27980. "ISBN: " + vue.toDisplayString($props.book.isbn),
  27981. 1
  27982. /* TEXT */
  27983. ),
  27984. vue.createElementVNode(
  27985. "text",
  27986. null,
  27987. "定价: " + vue.toDisplayString($props.book.price),
  27988. 1
  27989. /* TEXT */
  27990. ),
  27991. vue.createElementVNode(
  27992. "text",
  27993. null,
  27994. "折扣: " + vue.toDisplayString($props.book.recycleDiscount),
  27995. 1
  27996. /* TEXT */
  27997. )
  27998. ]),
  27999. vue.createElementVNode("view", { class: "book-stats flex-d ml-20" }, [
  28000. vue.createElementVNode(
  28001. "text",
  28002. null,
  28003. "数量: " + vue.toDisplayString($props.book.quantity),
  28004. 1
  28005. /* TEXT */
  28006. ),
  28007. vue.createElementVNode(
  28008. "text",
  28009. null,
  28010. "预估单价: " + vue.toDisplayString($props.book.expectPrice),
  28011. 1
  28012. /* TEXT */
  28013. ),
  28014. vue.createElementVNode(
  28015. "text",
  28016. { style: { "color": "#ff0000" } },
  28017. "审核金额: " + vue.toDisplayString($props.book.auditPrice),
  28018. 1
  28019. /* TEXT */
  28020. )
  28021. ])
  28022. ])
  28023. ])
  28024. ]);
  28025. }
  28026. const BookItem = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-97928f7a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/components/BookItemOrder.vue"]]);
  28027. const _sfc_main$q = {
  28028. __name: "check-order",
  28029. setup(__props, { expose: __expose }) {
  28030. __expose();
  28031. const bookList = vue.ref([]);
  28032. const totalBooks = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.quantity), 0));
  28033. const totalPrice = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.auditPrice), 0).toFixed(2));
  28034. const removeBook = ({ book, index: index2 }) => {
  28035. bookList.value.splice(index2, 1);
  28036. };
  28037. const handleSubmit = () => {
  28038. if (bookList.value.length === 0) {
  28039. uni.$u.toast("请先添加书籍");
  28040. return;
  28041. }
  28042. uni.$u.http.post("/app/offlineorder/submitOfflineOrder", bookList.value).then((res2) => {
  28043. if (res2.code == 200) {
  28044. uni.$u.toast("提交成功");
  28045. bookList.value.length = 0;
  28046. }
  28047. });
  28048. };
  28049. const handleScan = () => {
  28050. uni.scanCode({
  28051. success: (res2) => {
  28052. handleBarcode(res2.result);
  28053. formatAppLog("log", "at pages/index/offline/check-order.vue:51", "扫码结果:", res2.result);
  28054. },
  28055. fail: (res2) => {
  28056. formatAppLog("log", "at pages/index/offline/check-order.vue:55", "扫码失败:", res2);
  28057. uni.$u.toast("扫码失败");
  28058. }
  28059. });
  28060. };
  28061. const handleBarcode = (barcode) => {
  28062. formatAppLog("log", "at pages/index/offline/check-order.vue:62", "扫码结果:", barcode);
  28063. uni.$u.http.get(`/app/offlineorder/getBookInfo/${barcode}`).then((res2) => {
  28064. if (res2.code == 200) {
  28065. res2.data.quantity = 1;
  28066. let item = bookList.value.find((item2) => item2.isbn === res2.data.isbn);
  28067. if (item) {
  28068. item.quantity += 1;
  28069. item.auditPrice = (item.expectPrice * item.quantity).toFixed(2);
  28070. return;
  28071. } else {
  28072. res2.data.auditPrice = (res2.data.expectPrice * res2.data.quantity).toFixed(2);
  28073. bookList.value.push(res2.data);
  28074. }
  28075. }
  28076. });
  28077. };
  28078. onLoad(() => {
  28079. uni.$u.useGlobalEvent((e) => {
  28080. handleBarcode(e.barcode);
  28081. });
  28082. });
  28083. const __returned__ = { bookList, totalBooks, totalPrice, removeBook, handleSubmit, handleScan, handleBarcode, ref: vue.ref, computed: vue.computed, get onLoad() {
  28084. return onLoad;
  28085. }, BookItem };
  28086. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28087. return __returned__;
  28088. }
  28089. };
  28090. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  28091. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  28092. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28093. vue.createElementVNode("view", { class: "book-list" }, [
  28094. (vue.openBlock(true), vue.createElementBlock(
  28095. vue.Fragment,
  28096. null,
  28097. vue.renderList($setup.bookList, (book, index2) => {
  28098. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  28099. key: index2,
  28100. book,
  28101. onRemove: $setup.removeBook
  28102. }, null, 8, ["book"]);
  28103. }),
  28104. 128
  28105. /* KEYED_FRAGMENT */
  28106. ))
  28107. ]),
  28108. vue.createCommentVNode(" 底部信息和按钮 "),
  28109. vue.createElementVNode("view", {
  28110. class: "footer fixed-bottom flex-d",
  28111. style: { "padding-top": "10rpx" }
  28112. }, [
  28113. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  28114. key: 0,
  28115. class: "pad-10"
  28116. }, [
  28117. vue.createTextVNode("共 "),
  28118. vue.createElementVNode(
  28119. "text",
  28120. { style: { "color": "#ff0000" } },
  28121. vue.toDisplayString($setup.totalBooks),
  28122. 1
  28123. /* TEXT */
  28124. ),
  28125. vue.createTextVNode(" 本,预估回收价 "),
  28126. vue.createElementVNode(
  28127. "text",
  28128. { style: { "color": "#ff0000" } },
  28129. "¥" + vue.toDisplayString($setup.totalPrice),
  28130. 1
  28131. /* TEXT */
  28132. )
  28133. ])) : vue.createCommentVNode("v-if", true),
  28134. vue.createElementVNode("view", { class: "flex-a mt-12" }, [
  28135. vue.createVNode(_component_u_button, {
  28136. size: "large",
  28137. type: "primary",
  28138. text: "提交",
  28139. onClick: $setup.handleSubmit
  28140. }),
  28141. vue.createVNode(_component_u_button, {
  28142. size: "large",
  28143. type: "warning",
  28144. text: "扫码",
  28145. onClick: $setup.handleScan
  28146. })
  28147. ])
  28148. ])
  28149. ]);
  28150. }
  28151. const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__scopeId", "data-v-8fea8cdb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-order.vue"]]);
  28152. const _sfc_main$p = {
  28153. __name: "check-record",
  28154. setup(__props, { expose: __expose }) {
  28155. __expose();
  28156. const scrollRef = vue.ref(null);
  28157. const refreshList = () => {
  28158. var _a;
  28159. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  28160. };
  28161. let dataList = vue.ref([]);
  28162. const updateList = (data) => {
  28163. dataList.value = data;
  28164. };
  28165. const __returned__ = { scrollRef, refreshList, get dataList() {
  28166. return dataList;
  28167. }, set dataList(v) {
  28168. dataList = v;
  28169. }, updateList, PageScroll: pageScroll, ref: vue.ref };
  28170. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28171. return __returned__;
  28172. }
  28173. };
  28174. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  28175. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  28176. return vue.openBlock(), vue.createElementBlock("view", {
  28177. class: "common-page",
  28178. style: { "padding": "0" }
  28179. }, [
  28180. vue.createVNode(
  28181. $setup["PageScroll"],
  28182. {
  28183. requestStr: "/app/offlineorder/getUserStat",
  28184. onUpdateList: $setup.updateList,
  28185. ref: "scrollRef"
  28186. },
  28187. {
  28188. default: vue.withCtx(() => [
  28189. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  28190. default: vue.withCtx(() => [
  28191. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  28192. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单时间"),
  28193. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单数量"),
  28194. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单本数"),
  28195. vue.createElementVNode("view", { class: "text-item flex-1" }, "预估金额")
  28196. ])
  28197. ]),
  28198. _: 1
  28199. /* STABLE */
  28200. }),
  28201. vue.createElementVNode("view", { class: "list-con" }, [
  28202. (vue.openBlock(true), vue.createElementBlock(
  28203. vue.Fragment,
  28204. null,
  28205. vue.renderList($setup.dataList, (item, index2) => {
  28206. return vue.openBlock(), vue.createElementBlock("view", {
  28207. key: index2,
  28208. class: "flex-a"
  28209. }, [
  28210. vue.createElementVNode(
  28211. "view",
  28212. { class: "text-item flex-1" },
  28213. vue.toDisplayString(item.statDate),
  28214. 1
  28215. /* TEXT */
  28216. ),
  28217. vue.createElementVNode(
  28218. "view",
  28219. { class: "text-item flex-1" },
  28220. vue.toDisplayString(item.totalNum),
  28221. 1
  28222. /* TEXT */
  28223. ),
  28224. vue.createElementVNode(
  28225. "view",
  28226. { class: "text-item flex-1" },
  28227. vue.toDisplayString(item.bookNum),
  28228. 1
  28229. /* TEXT */
  28230. ),
  28231. vue.createElementVNode(
  28232. "view",
  28233. { class: "text-item flex-1" },
  28234. vue.toDisplayString(item.expectAmount),
  28235. 1
  28236. /* TEXT */
  28237. )
  28238. ]);
  28239. }),
  28240. 128
  28241. /* KEYED_FRAGMENT */
  28242. ))
  28243. ])
  28244. ]),
  28245. _: 1
  28246. /* STABLE */
  28247. },
  28248. 512
  28249. /* NEED_PATCH */
  28250. )
  28251. ]);
  28252. }
  28253. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-record.vue"]]);
  28254. const props$3 = {
  28255. props: {
  28256. // 内置图标名称,或图片路径,建议绝对路径
  28257. icon: {
  28258. type: String,
  28259. default: props$E.empty.icon
  28260. },
  28261. // 提示文字
  28262. text: {
  28263. type: String,
  28264. default: props$E.empty.text
  28265. },
  28266. // 文字颜色
  28267. textColor: {
  28268. type: String,
  28269. default: props$E.empty.textColor
  28270. },
  28271. // 文字大小
  28272. textSize: {
  28273. type: [String, Number],
  28274. default: props$E.empty.textSize
  28275. },
  28276. // 图标的颜色
  28277. iconColor: {
  28278. type: String,
  28279. default: props$E.empty.iconColor
  28280. },
  28281. // 图标的大小
  28282. iconSize: {
  28283. type: [String, Number],
  28284. default: props$E.empty.iconSize
  28285. },
  28286. // 选择预置的图标类型
  28287. mode: {
  28288. type: String,
  28289. default: props$E.empty.mode
  28290. },
  28291. // 图标宽度,单位px
  28292. width: {
  28293. type: [String, Number],
  28294. default: props$E.empty.width
  28295. },
  28296. // 图标高度,单位px
  28297. height: {
  28298. type: [String, Number],
  28299. default: props$E.empty.height
  28300. },
  28301. // 是否显示组件
  28302. show: {
  28303. type: Boolean,
  28304. default: props$E.empty.show
  28305. },
  28306. // 组件距离上一个元素之间的距离,默认px单位
  28307. marginTop: {
  28308. type: [String, Number],
  28309. default: props$E.empty.marginTop
  28310. }
  28311. }
  28312. };
  28313. const _sfc_main$o = {
  28314. name: "u-empty",
  28315. mixins: [mpMixin, mixin, props$3],
  28316. data() {
  28317. return {
  28318. icons: {
  28319. car: "购物车为空",
  28320. page: "页面不存在",
  28321. search: "没有搜索结果",
  28322. address: "没有收货地址",
  28323. wifi: "没有WiFi",
  28324. order: "订单为空",
  28325. coupon: "没有优惠券",
  28326. favor: "暂无收藏",
  28327. permission: "无权限",
  28328. history: "无历史记录",
  28329. news: "无新闻列表",
  28330. message: "消息列表为空",
  28331. list: "列表为空",
  28332. data: "数据为空",
  28333. comment: "暂无评论"
  28334. }
  28335. };
  28336. },
  28337. computed: {
  28338. // 组件样式
  28339. emptyStyle() {
  28340. const style = {};
  28341. style.marginTop = uni.$u.addUnit(this.marginTop);
  28342. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  28343. },
  28344. // 文本样式
  28345. textStyle() {
  28346. const style = {};
  28347. style.color = this.textColor;
  28348. style.fontSize = uni.$u.addUnit(this.textSize);
  28349. return style;
  28350. },
  28351. // 判断icon是否图片路径
  28352. isSrc() {
  28353. return this.icon.indexOf("/") >= 0;
  28354. }
  28355. }
  28356. };
  28357. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  28358. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28359. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  28360. "view",
  28361. {
  28362. key: 0,
  28363. class: "u-empty",
  28364. style: vue.normalizeStyle([$options.emptyStyle])
  28365. },
  28366. [
  28367. !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28368. key: 0,
  28369. name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
  28370. size: _ctx.iconSize,
  28371. color: _ctx.iconColor,
  28372. "margin-top": "14"
  28373. }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  28374. key: 1,
  28375. style: vue.normalizeStyle({
  28376. width: _ctx.$u.addUnit(_ctx.width),
  28377. height: _ctx.$u.addUnit(_ctx.height)
  28378. }),
  28379. src: _ctx.icon,
  28380. mode: "widthFix"
  28381. }, null, 12, ["src"])),
  28382. vue.createElementVNode(
  28383. "text",
  28384. {
  28385. class: "u-empty__text",
  28386. style: vue.normalizeStyle([$options.textStyle])
  28387. },
  28388. vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
  28389. 5
  28390. /* TEXT, STYLE */
  28391. ),
  28392. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  28393. key: 2,
  28394. class: "u-empty__wrap"
  28395. }, [
  28396. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  28397. ])) : vue.createCommentVNode("v-if", true)
  28398. ],
  28399. 4
  28400. /* STYLE */
  28401. )) : vue.createCommentVNode("v-if", true);
  28402. }
  28403. const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-8dd5928e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-empty/u-empty.vue"]]);
  28404. const _sfc_main$n = {
  28405. __name: "scan-book",
  28406. setup(__props, { expose: __expose }) {
  28407. __expose();
  28408. const searchValue = vue.ref("");
  28409. const scannedISBN = vue.ref("");
  28410. const currentTab = vue.ref(0);
  28411. const tabsList = [
  28412. {
  28413. name: "简介"
  28414. },
  28415. {
  28416. name: "轨迹"
  28417. }
  28418. ];
  28419. const bookInfo = vue.ref(null);
  28420. const handleSearch = () => {
  28421. if (!searchValue.value)
  28422. return;
  28423. loadBookInfo(searchValue.value);
  28424. };
  28425. const handleScan = () => {
  28426. uni.scanCode({
  28427. success: (res2) => {
  28428. searchValue.value = res2.result;
  28429. scannedISBN.value = res2.result;
  28430. loadBookInfo(res2.result);
  28431. }
  28432. });
  28433. };
  28434. const loadBookInfo = (isbn) => {
  28435. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  28436. if (res2.code == 200) {
  28437. bookInfo.value = res2.data;
  28438. }
  28439. });
  28440. };
  28441. onLoad(() => {
  28442. uni.$u.useGlobalEvent((e) => {
  28443. searchValue.value = e.barcode;
  28444. scannedISBN.value = e.barcode;
  28445. loadBookInfo(e.barcode);
  28446. });
  28447. });
  28448. const __returned__ = { searchValue, scannedISBN, currentTab, tabsList, bookInfo, handleSearch, handleScan, loadBookInfo, ref: vue.ref, get onLoad() {
  28449. return onLoad;
  28450. } };
  28451. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28452. return __returned__;
  28453. }
  28454. };
  28455. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  28456. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28457. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28458. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  28459. const _component_u_empty = resolveEasycom(vue.resolveDynamicComponent("u-empty"), __easycom_3$1);
  28460. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  28461. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  28462. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28463. vue.createCommentVNode(" 顶部搜索框 "),
  28464. vue.createVNode(_component_u_sticky, null, {
  28465. default: vue.withCtx(() => [
  28466. vue.createElementVNode("view", { class: "search-area" }, [
  28467. vue.createVNode(_component_u_search, {
  28468. modelValue: $setup.searchValue,
  28469. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchValue = $event),
  28470. placeholder: "扫描/输入ISBN或SH码",
  28471. "show-action": true,
  28472. actionText: "查询",
  28473. onSearch: $setup.handleSearch,
  28474. onCustom: $setup.handleSearch
  28475. }, {
  28476. suffixIcon: vue.withCtx(() => [
  28477. $setup.searchValue ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28478. key: 0,
  28479. name: "close",
  28480. size: "20",
  28481. onClick: _cache[0] || (_cache[0] = ($event) => $setup.searchValue = "")
  28482. })) : vue.createCommentVNode("v-if", true)
  28483. ]),
  28484. _: 1
  28485. /* STABLE */
  28486. }, 8, ["modelValue"])
  28487. ])
  28488. ]),
  28489. _: 1
  28490. /* STABLE */
  28491. }),
  28492. vue.createCommentVNode(" 已扫描ISBN显示 "),
  28493. $setup.scannedISBN ? (vue.openBlock(), vue.createElementBlock("view", {
  28494. key: 0,
  28495. class: "isbn-display"
  28496. }, [
  28497. vue.createElementVNode(
  28498. "text",
  28499. null,
  28500. "已查询ISBN:" + vue.toDisplayString($setup.scannedISBN),
  28501. 1
  28502. /* TEXT */
  28503. )
  28504. ])) : vue.createCommentVNode("v-if", true),
  28505. vue.createCommentVNode(" 内容区域 "),
  28506. vue.createElementVNode("view", { class: "content" }, [
  28507. vue.createCommentVNode(" 空状态 "),
  28508. !$setup.bookInfo ? (vue.openBlock(), vue.createElementBlock("view", {
  28509. key: 0,
  28510. class: "empty-state"
  28511. }, [
  28512. vue.createVNode(_component_u_empty, {
  28513. mode: "data",
  28514. text: "暂无扫描数据",
  28515. "margin-top": "100"
  28516. })
  28517. ])) : (vue.openBlock(), vue.createElementBlock(
  28518. vue.Fragment,
  28519. { key: 1 },
  28520. [
  28521. vue.createCommentVNode(" 书籍详情 "),
  28522. vue.createElementVNode("view", { class: "book-detail" }, [
  28523. vue.createElementVNode("view", { class: "common-card mb-20" }, [
  28524. vue.createElementVNode("view", { class: "flex flex-d flex-a-c" }, [
  28525. vue.createElementVNode("image", {
  28526. class: "book-image",
  28527. src: $setup.bookInfo.cover,
  28528. mode: "heightFix"
  28529. }, null, 8, ["src"]),
  28530. vue.createElementVNode(
  28531. "text",
  28532. { class: "ml-20 font-15" },
  28533. vue.toDisplayString($setup.bookInfo.bookName),
  28534. 1
  28535. /* TEXT */
  28536. )
  28537. ]),
  28538. vue.createElementVNode("view", { class: "book-status" }, [
  28539. vue.createElementVNode(
  28540. "text",
  28541. { class: "status-text" },
  28542. "状态:" + vue.toDisplayString($setup.bookInfo.recycleStatus ? "已加入回收书单" : "未加入回收书单"),
  28543. 1
  28544. /* TEXT */
  28545. ),
  28546. $setup.bookInfo.recycleTime ? (vue.openBlock(), vue.createElementBlock(
  28547. "text",
  28548. {
  28549. key: 0,
  28550. class: "time-text"
  28551. },
  28552. "加入时间:" + vue.toDisplayString($setup.bookInfo.recycleTime),
  28553. 1
  28554. /* TEXT */
  28555. )) : vue.createCommentVNode("v-if", true)
  28556. ])
  28557. ]),
  28558. vue.createCommentVNode(" 基本信息 "),
  28559. vue.createElementVNode("view", { class: "common-card info-section mb-20" }, [
  28560. vue.createElementVNode("view", { class: "price-info" }, [
  28561. vue.createElementVNode("text", { class: "label" }, "定价:"),
  28562. vue.createElementVNode(
  28563. "text",
  28564. { class: "price" },
  28565. "¥" + vue.toDisplayString($setup.bookInfo.price),
  28566. 1
  28567. /* TEXT */
  28568. ),
  28569. vue.createElementVNode(
  28570. "text",
  28571. { class: "recycle-price" },
  28572. "回收价:¥" + vue.toDisplayString($setup.bookInfo.expectPrice),
  28573. 1
  28574. /* TEXT */
  28575. )
  28576. ]),
  28577. vue.createElementVNode("view", { class: "book-info" }, [
  28578. vue.createElementVNode("view", { class: "info-item" }, [
  28579. vue.createElementVNode("text", { class: "label" }, "ISBN:"),
  28580. vue.createElementVNode(
  28581. "text",
  28582. null,
  28583. vue.toDisplayString($setup.bookInfo.isbn),
  28584. 1
  28585. /* TEXT */
  28586. )
  28587. ]),
  28588. vue.createElementVNode("view", { class: "info-item" }, [
  28589. vue.createElementVNode("text", { class: "label" }, "语言:"),
  28590. vue.createElementVNode(
  28591. "text",
  28592. null,
  28593. vue.toDisplayString($setup.bookInfo.lang || "-"),
  28594. 1
  28595. /* TEXT */
  28596. )
  28597. ]),
  28598. vue.createElementVNode("view", { class: "info-item" }, [
  28599. vue.createElementVNode("text", { class: "label" }, "作者:"),
  28600. vue.createElementVNode(
  28601. "text",
  28602. null,
  28603. vue.toDisplayString($setup.bookInfo.author),
  28604. 1
  28605. /* TEXT */
  28606. )
  28607. ]),
  28608. vue.createElementVNode("view", { class: "info-item" }, [
  28609. vue.createElementVNode("text", { class: "label" }, "出版社:"),
  28610. vue.createElementVNode(
  28611. "text",
  28612. null,
  28613. vue.toDisplayString($setup.bookInfo.publish),
  28614. 1
  28615. /* TEXT */
  28616. )
  28617. ]),
  28618. vue.createElementVNode("view", { class: "info-item" }, [
  28619. vue.createElementVNode("text", { class: "label" }, "出版时间:"),
  28620. vue.createElementVNode(
  28621. "text",
  28622. null,
  28623. vue.toDisplayString($setup.bookInfo.pubDate),
  28624. 1
  28625. /* TEXT */
  28626. )
  28627. ])
  28628. ])
  28629. ]),
  28630. vue.createCommentVNode(" 简介和轨迹 "),
  28631. vue.createElementVNode("view", {
  28632. class: "common-card tabs-section",
  28633. style: { "padding": "0" }
  28634. }, [
  28635. vue.createVNode(_component_u_tabs, {
  28636. list: $setup.tabsList,
  28637. modelValue: $setup.currentTab,
  28638. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.currentTab = $event),
  28639. lineColor: "#19be6b"
  28640. }, null, 8, ["modelValue"]),
  28641. vue.createElementVNode("view", { class: "tab-content" }, [
  28642. $setup.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  28643. key: 0,
  28644. class: "intro-content"
  28645. }, [
  28646. vue.createElementVNode("text", { class: "section-title" }, "内容简介:"),
  28647. vue.createElementVNode(
  28648. "text",
  28649. { class: "content-text" },
  28650. vue.toDisplayString($setup.bookInfo.contentBlurb),
  28651. 1
  28652. /* TEXT */
  28653. ),
  28654. vue.createElementVNode("text", { class: "section-title" }, "作者简介:"),
  28655. vue.createElementVNode(
  28656. "text",
  28657. { class: "content-text" },
  28658. vue.toDisplayString($setup.bookInfo.anthorBlurb),
  28659. 1
  28660. /* TEXT */
  28661. ),
  28662. vue.createElementVNode(
  28663. "text",
  28664. { class: "content-text" },
  28665. vue.toDisplayString($setup.bookInfo.catalog),
  28666. 1
  28667. /* TEXT */
  28668. )
  28669. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  28670. key: 1,
  28671. class: "track-content"
  28672. }, [
  28673. vue.createElementVNode(
  28674. "text",
  28675. null,
  28676. vue.toDisplayString($setup.bookInfo.track),
  28677. 1
  28678. /* TEXT */
  28679. )
  28680. ]))
  28681. ])
  28682. ])
  28683. ])
  28684. ],
  28685. 2112
  28686. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  28687. ))
  28688. ]),
  28689. vue.createCommentVNode(" 底部扫描按钮 "),
  28690. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  28691. vue.createVNode(_component_u_button, {
  28692. size: "large",
  28693. type: "primary",
  28694. text: "扫码(ISBN或SH码)",
  28695. onClick: $setup.handleScan
  28696. })
  28697. ])
  28698. ]);
  28699. }
  28700. const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-04d3117d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/scan-book.vue"]]);
  28701. const _sfc_main$m = {
  28702. __name: "book-weight",
  28703. setup(__props, { expose: __expose }) {
  28704. __expose();
  28705. const customStyle = {
  28706. height: "100rpx",
  28707. fontSize: "32rpx"
  28708. };
  28709. const labelStyle = {
  28710. fontSize: "32rpx"
  28711. };
  28712. const placeholderStyle2 = vue.ref("fontSize: 32rpx");
  28713. const form = vue.ref({
  28714. weight: "",
  28715. isbn: ""
  28716. });
  28717. const rules2 = {
  28718. weight: [
  28719. {
  28720. required: true,
  28721. message: "请输入重量",
  28722. trigger: "blur"
  28723. },
  28724. {
  28725. type: "number",
  28726. message: "重量必须是数字",
  28727. trigger: "blur"
  28728. }
  28729. ],
  28730. isbn: [{
  28731. required: true,
  28732. message: "请输入ISBN",
  28733. trigger: "blur"
  28734. }]
  28735. };
  28736. function handleScan() {
  28737. uni.scanCode({
  28738. success: (res2) => {
  28739. form.value.isbn = res2.result;
  28740. }
  28741. });
  28742. }
  28743. const formRef = vue.ref(null);
  28744. const submitForm = () => {
  28745. formRef.value.validate().then((valid) => {
  28746. if (valid) {
  28747. uni.$u.http.post("/app/weighChangeLog/add", form.value).then((res2) => {
  28748. if (res2.code == 200) {
  28749. uni.$u.toast("修改成功");
  28750. form.value.isbn = "";
  28751. form.value.weight = "";
  28752. } else {
  28753. uni.$u.toast(res2.msg);
  28754. }
  28755. });
  28756. }
  28757. });
  28758. };
  28759. onLoad(() => {
  28760. uni.$u.useGlobalEvent((e) => {
  28761. form.value.isbn = e.barcode;
  28762. });
  28763. });
  28764. const __returned__ = { customStyle, labelStyle, placeholderStyle: placeholderStyle2, form, rules: rules2, handleScan, formRef, submitForm, ref: vue.ref, get onLoad() {
  28765. return onLoad;
  28766. } };
  28767. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28768. return __returned__;
  28769. }
  28770. };
  28771. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  28772. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  28773. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  28774. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  28775. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  28776. return vue.openBlock(), vue.createElementBlock("view", { class: "common-page" }, [
  28777. vue.createVNode(_component_u_form, {
  28778. model: $setup.form,
  28779. rules: $setup.rules,
  28780. ref: "formRef",
  28781. labelWidth: "90px",
  28782. errorType: "toast",
  28783. labelStyle: $setup.labelStyle
  28784. }, {
  28785. default: vue.withCtx(() => [
  28786. vue.createVNode(_component_u_form_item, {
  28787. label: "重量(克)",
  28788. prop: "weight",
  28789. required: ""
  28790. }, {
  28791. default: vue.withCtx(() => [
  28792. vue.createVNode(_component_u_input, {
  28793. placeholderStyle: $setup.placeholderStyle,
  28794. customStyle: $setup.customStyle,
  28795. modelValue: $setup.form.weight,
  28796. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.weight = $event),
  28797. placeholder: "请输入数值",
  28798. clearable: ""
  28799. }, null, 8, ["placeholderStyle", "modelValue"])
  28800. ]),
  28801. _: 1
  28802. /* STABLE */
  28803. }),
  28804. vue.createVNode(_component_u_form_item, {
  28805. label: "ISBN",
  28806. prop: "isbn",
  28807. required: ""
  28808. }, {
  28809. default: vue.withCtx(() => [
  28810. vue.createVNode(_component_u_input, {
  28811. placeholderStyle: $setup.placeholderStyle,
  28812. customStyle: $setup.customStyle,
  28813. modelValue: $setup.form.isbn,
  28814. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.isbn = $event),
  28815. placeholder: "请输入编码",
  28816. clearable: ""
  28817. }, null, 8, ["placeholderStyle", "modelValue"])
  28818. ]),
  28819. _: 1
  28820. /* STABLE */
  28821. })
  28822. ]),
  28823. _: 1
  28824. /* STABLE */
  28825. }, 8, ["model"]),
  28826. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  28827. vue.createVNode(_component_u_button, {
  28828. size: "large",
  28829. type: "warning",
  28830. text: "扫码",
  28831. onClick: $setup.handleScan
  28832. }),
  28833. vue.createVNode(_component_u_button, {
  28834. size: "large",
  28835. type: "success",
  28836. text: "提交",
  28837. onClick: $setup.submitForm
  28838. })
  28839. ])
  28840. ]);
  28841. }
  28842. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/book-weight.vue"]]);
  28843. const props$2 = {
  28844. props: {
  28845. // 显示文字
  28846. title: {
  28847. type: String,
  28848. default: props$E.alert.title
  28849. },
  28850. // 主题,success/warning/info/error
  28851. type: {
  28852. type: String,
  28853. default: props$E.alert.type
  28854. },
  28855. // 辅助性文字
  28856. description: {
  28857. type: String,
  28858. default: props$E.alert.description
  28859. },
  28860. // 是否可关闭
  28861. closable: {
  28862. type: Boolean,
  28863. default: props$E.alert.closable
  28864. },
  28865. // 是否显示图标
  28866. showIcon: {
  28867. type: Boolean,
  28868. default: props$E.alert.showIcon
  28869. },
  28870. // 浅或深色调,light-浅色,dark-深色
  28871. effect: {
  28872. type: String,
  28873. default: props$E.alert.effect
  28874. },
  28875. // 文字是否居中
  28876. center: {
  28877. type: Boolean,
  28878. default: props$E.alert.center
  28879. },
  28880. // 字体大小
  28881. fontSize: {
  28882. type: [String, Number],
  28883. default: props$E.alert.fontSize
  28884. }
  28885. }
  28886. };
  28887. const _sfc_main$l = {
  28888. name: "u-alert",
  28889. mixins: [mpMixin, mixin, props$2],
  28890. data() {
  28891. return {
  28892. show: true
  28893. };
  28894. },
  28895. computed: {
  28896. iconColor() {
  28897. return this.effect === "light" ? this.type : "#fff";
  28898. },
  28899. // 不同主题对应不同的图标
  28900. iconName() {
  28901. switch (this.type) {
  28902. case "success":
  28903. return "checkmark-circle-fill";
  28904. case "error":
  28905. return "close-circle-fill";
  28906. case "warning":
  28907. return "error-circle-fill";
  28908. case "info":
  28909. return "info-circle-fill";
  28910. case "primary":
  28911. return "more-circle-fill";
  28912. default:
  28913. return "error-circle-fill";
  28914. }
  28915. }
  28916. },
  28917. methods: {
  28918. // 点击内容
  28919. clickHandler() {
  28920. this.$emit("click");
  28921. },
  28922. // 点击关闭按钮
  28923. closeHandler() {
  28924. this.show = false;
  28925. }
  28926. }
  28927. };
  28928. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  28929. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28930. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  28931. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  28932. mode: "fade",
  28933. show: $data.show
  28934. }, {
  28935. default: vue.withCtx(() => [
  28936. vue.createElementVNode(
  28937. "view",
  28938. {
  28939. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  28940. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  28941. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  28942. },
  28943. [
  28944. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  28945. key: 0,
  28946. class: "u-alert__icon"
  28947. }, [
  28948. vue.createVNode(_component_u_icon, {
  28949. name: $options.iconName,
  28950. size: "18",
  28951. color: $options.iconColor
  28952. }, null, 8, ["name", "color"])
  28953. ])) : vue.createCommentVNode("v-if", true),
  28954. vue.createElementVNode(
  28955. "view",
  28956. {
  28957. class: "u-alert__content",
  28958. style: vue.normalizeStyle([{
  28959. paddingRight: _ctx.closable ? "20px" : 0
  28960. }])
  28961. },
  28962. [
  28963. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  28964. "text",
  28965. {
  28966. key: 0,
  28967. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  28968. style: vue.normalizeStyle([{
  28969. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  28970. textAlign: _ctx.center ? "center" : "left"
  28971. }])
  28972. },
  28973. vue.toDisplayString(_ctx.title),
  28974. 7
  28975. /* TEXT, CLASS, STYLE */
  28976. )) : vue.createCommentVNode("v-if", true),
  28977. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  28978. "text",
  28979. {
  28980. key: 1,
  28981. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  28982. style: vue.normalizeStyle([{
  28983. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  28984. textAlign: _ctx.center ? "center" : "left"
  28985. }])
  28986. },
  28987. vue.toDisplayString(_ctx.description),
  28988. 7
  28989. /* TEXT, CLASS, STYLE */
  28990. )) : vue.createCommentVNode("v-if", true)
  28991. ],
  28992. 4
  28993. /* STYLE */
  28994. ),
  28995. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  28996. key: 1,
  28997. class: "u-alert__close",
  28998. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  28999. }, [
  29000. vue.createVNode(_component_u_icon, {
  29001. name: "close",
  29002. color: $options.iconColor,
  29003. size: "15"
  29004. }, null, 8, ["color"])
  29005. ])) : vue.createCommentVNode("v-if", true)
  29006. ],
  29007. 6
  29008. /* CLASS, STYLE */
  29009. )
  29010. ]),
  29011. _: 1
  29012. /* STABLE */
  29013. }, 8, ["show"]);
  29014. }
  29015. const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-158e540a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
  29016. const _sfc_main$k = {
  29017. __name: "logistics-detail",
  29018. setup(__props, { expose: __expose }) {
  29019. __expose();
  29020. const logisticsInfo = vue.ref([]);
  29021. function getLogisticsDetail(orderId) {
  29022. uni.$u.http.get(`/app/orderinfo/getOrderExpressList?orderId=${orderId}`).then((res2) => {
  29023. if (res2.code == 200) {
  29024. logisticsInfo.value = res2.data;
  29025. }
  29026. });
  29027. }
  29028. function handleButtonClick(status, reason) {
  29029. uni.$u.http.post("/app/orderexception/update", {
  29030. id: id.value,
  29031. checkStatus: status,
  29032. refusalReason: reason
  29033. }).then((res2) => {
  29034. if (res2.code == 200) {
  29035. checkStatus.value = status;
  29036. uni.$u.toast("操作成功");
  29037. emit("refresh");
  29038. } else {
  29039. uni.$u.toast(res2.msg);
  29040. }
  29041. });
  29042. }
  29043. const checkStatus = vue.ref(0);
  29044. const id = vue.ref(0);
  29045. onLoad((e) => {
  29046. checkStatus.value = e.status;
  29047. id.value = e.id;
  29048. getLogisticsDetail(e.orderId);
  29049. });
  29050. const __returned__ = { logisticsInfo, getLogisticsDetail, handleButtonClick, checkStatus, id, ref: vue.ref, get onLoad() {
  29051. return onLoad;
  29052. }, ApproveButton, RejectButton };
  29053. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29054. return __returned__;
  29055. }
  29056. };
  29057. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  29058. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  29059. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  29060. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29061. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29062. vue.createCommentVNode(" 物流公司信息 "),
  29063. vue.createVNode(_component_u_sticky, null, {
  29064. default: vue.withCtx(() => [
  29065. vue.createVNode(_component_u_alert, {
  29066. title: `物流公司:京东快递`,
  29067. type: "warning"
  29068. })
  29069. ]),
  29070. _: 1
  29071. /* STABLE */
  29072. }),
  29073. vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
  29074. vue.createElementVNode("scroll-view", {
  29075. "scroll-y": "",
  29076. class: "timeline-container"
  29077. }, [
  29078. (vue.openBlock(true), vue.createElementBlock(
  29079. vue.Fragment,
  29080. null,
  29081. vue.renderList($setup.logisticsInfo, (item, index2) => {
  29082. return vue.openBlock(), vue.createElementBlock("view", {
  29083. key: index2,
  29084. class: "timeline-item"
  29085. }, [
  29086. vue.createElementVNode("view", { class: "timeline-icon" }, [
  29087. vue.createVNode(_component_u_icon, {
  29088. name: "map-fill",
  29089. color: "#19be6b",
  29090. size: "16"
  29091. })
  29092. ]),
  29093. vue.createElementVNode("view", { class: "timeline-content" }, [
  29094. vue.createElementVNode(
  29095. "text",
  29096. { class: "title" },
  29097. vue.toDisplayString(item.title),
  29098. 1
  29099. /* TEXT */
  29100. ),
  29101. vue.createElementVNode(
  29102. "text",
  29103. { class: "desc" },
  29104. vue.toDisplayString(item.description),
  29105. 1
  29106. /* TEXT */
  29107. ),
  29108. vue.createElementVNode(
  29109. "text",
  29110. { class: "time" },
  29111. vue.toDisplayString(item.time),
  29112. 1
  29113. /* TEXT */
  29114. )
  29115. ]),
  29116. index2 < $setup.logisticsInfo.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  29117. key: 0,
  29118. class: "timeline-line"
  29119. })) : vue.createCommentVNode("v-if", true)
  29120. ]);
  29121. }),
  29122. 128
  29123. /* KEYED_FRAGMENT */
  29124. ))
  29125. ]),
  29126. vue.createCommentVNode(" 底部操作按钮 "),
  29127. $setup.checkStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  29128. key: 0,
  29129. class: "fixed-bottom"
  29130. }, [
  29131. vue.createVNode($setup["RejectButton"], {
  29132. size: "large",
  29133. onReject: _cache[0] || (_cache[0] = (reason) => $setup.handleButtonClick(3, reason))
  29134. }),
  29135. vue.createVNode($setup["ApproveButton"], {
  29136. size: "large",
  29137. onApprove: _cache[1] || (_cache[1] = ($event) => $setup.handleButtonClick(2))
  29138. })
  29139. ])) : vue.createCommentVNode("v-if", true)
  29140. ]);
  29141. }
  29142. const PagesIndexExpressLogisticsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-8e52fe94"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/logistics-detail.vue"]]);
  29143. const _imports_0 = "/static/img/location.png";
  29144. const _imports_1 = "/static/img/location-active.png";
  29145. const _sfc_main$j = {
  29146. __name: "task-detail",
  29147. setup(__props, { expose: __expose }) {
  29148. __expose();
  29149. const currentTask = vue.ref(0);
  29150. const totalTasks = vue.ref(0);
  29151. const curTaskInfo = vue.ref({});
  29152. const nextLocation = vue.ref("");
  29153. const orderList = vue.ref([]);
  29154. const ttsModule2 = vue.ref(null);
  29155. const taskCode = vue.ref("");
  29156. onUnload(() => {
  29157. ttsModule2.value.stop();
  29158. });
  29159. const searchText = vue.ref("");
  29160. const badList = vue.ref([]);
  29161. const handleNextTask = () => {
  29162. if (currentTask.value < totalTasks.value) {
  29163. currentTask.value++;
  29164. if (currentTask.value == totalTasks.value) {
  29165. ttsModule2.value.speak("任务完成");
  29166. } else {
  29167. curTaskInfo.value = orderList.value[currentTask.value];
  29168. badList.value = curTaskInfo.value.detailVoList || [];
  29169. let nextInfo = orderList.value[currentTask.value + 1];
  29170. nextLocation.value = nextInfo.positionCode;
  29171. }
  29172. }
  29173. };
  29174. const onSearch = () => {
  29175. uni.$u.http.get(`/app/appstock/getStockTaskDetail?taskCode=${taskCode.value}`).then((res2) => {
  29176. if (res2.code == 200) {
  29177. orderList.value = res2.data;
  29178. totalTasks.value = res2.data.length;
  29179. curTaskInfo.value = res2.data[currentTask.value];
  29180. badList.value = curTaskInfo.value.detailVoList || [];
  29181. }
  29182. });
  29183. };
  29184. const confirmStockTask = () => {
  29185. const params = {
  29186. positionCode: curTaskInfo.value.positionCode,
  29187. orderId: curTaskInfo.value.orderId
  29188. };
  29189. uni.$u.http.post("/app/appstock/setStockTask", params).then((res2) => {
  29190. if (res2.code === 200) {
  29191. curTaskInfo.value.isCompleted = true;
  29192. orderList.value[currentTask.value] = curTaskInfo.value;
  29193. handleNextTask();
  29194. ttsModule2.value.speak("下架成功");
  29195. } else {
  29196. uni.showToast({
  29197. title: res2.msg,
  29198. icon: "error"
  29199. });
  29200. }
  29201. });
  29202. };
  29203. const unlockTask = () => {
  29204. uni.$u.http.post("/app/appstock/unlockStockTask?taskCode=" + taskCode.value).then((res2) => {
  29205. if (res2.code == 200) {
  29206. uni.showToast({
  29207. title: "解锁成功",
  29208. icon: "success"
  29209. });
  29210. } else {
  29211. uni.showToast({
  29212. title: res2.msg || "解锁失败",
  29213. icon: "error"
  29214. });
  29215. }
  29216. });
  29217. };
  29218. const onSubmit = () => {
  29219. uni.showModal({
  29220. title: "确认提示",
  29221. content: "是否确认提交本次下架?",
  29222. success: (res2) => {
  29223. if (res2.confirm) {
  29224. uni.navigateBack();
  29225. ttsModule2.value.speak("任务已提交");
  29226. unlockTask();
  29227. }
  29228. }
  29229. });
  29230. };
  29231. function goBack() {
  29232. uni.showModal({
  29233. title: "确认提示",
  29234. content: "是否确认放弃本次下架?",
  29235. success: (res2) => {
  29236. if (res2.confirm) {
  29237. uni.navigateBack();
  29238. ttsModule2.value.speak("任务已放弃");
  29239. unlockTask();
  29240. }
  29241. }
  29242. });
  29243. }
  29244. let isFirstScan = vue.ref(false);
  29245. const checkScanText = (scanText) => {
  29246. formatAppLog("log", "at pages/index/wms/task-detail.vue:218", scanText, "scanText");
  29247. let isPositionCode = scanText.indexOf("-") > -1;
  29248. let isWaybillCode = /^(?=.*[A-Z])(?=.*\d)[A-Z0-9]+$/.test(scanText);
  29249. let isOrderId = /^\d+$/.test(scanText);
  29250. formatAppLog(
  29251. "log",
  29252. "at pages/index/wms/task-detail.vue:224",
  29253. isPositionCode,
  29254. isWaybillCode,
  29255. isOrderId,
  29256. isFirstScan.value,
  29257. "isPositionCode, isWaybillCode, isOrderId"
  29258. );
  29259. if (isPositionCode) {
  29260. let positionCode = curTaskInfo.value.positionCode;
  29261. if (positionCode != scanText) {
  29262. uni.showToast({
  29263. title: "库位号不正确",
  29264. icon: "error"
  29265. });
  29266. } else {
  29267. isFirstScan.value = true;
  29268. curTaskInfo.value.isValid = true;
  29269. }
  29270. }
  29271. if (!isFirstScan.value) {
  29272. ttsModule2.value.speak("请先校验库位号");
  29273. return;
  29274. }
  29275. if (isWaybillCode && !isOrderId) {
  29276. let waybillCode = curTaskInfo.value.waybillCode;
  29277. if (waybillCode == scanText) {
  29278. confirmStockTask();
  29279. } else {
  29280. uni.showToast({
  29281. title: "物流号不正确",
  29282. icon: "error"
  29283. });
  29284. }
  29285. }
  29286. if (isOrderId && !isWaybillCode) {
  29287. let orderId = curTaskInfo.value.orderId;
  29288. if (orderId == scanText) {
  29289. confirmStockTask();
  29290. } else {
  29291. curTaskInfo.value.isValid = true;
  29292. }
  29293. }
  29294. };
  29295. const openScan = () => {
  29296. uni.scanCode({
  29297. success: (res2) => {
  29298. searchText.value = res2.result;
  29299. checkScanText(res2.result);
  29300. },
  29301. fail: (err) => {
  29302. uni.showToast({
  29303. title: "扫码失败",
  29304. icon: "error"
  29305. });
  29306. }
  29307. });
  29308. };
  29309. onLoad((opts) => {
  29310. taskCode.value = opts.taskCode;
  29311. onSearch();
  29312. ttsModule2.value = new VolumeTTS();
  29313. uni.$u.useGlobalEvent((e) => {
  29314. if (e.barcode) {
  29315. searchText.value = e.barcode;
  29316. checkScanText(e.barcode);
  29317. }
  29318. });
  29319. });
  29320. const __returned__ = { currentTask, totalTasks, curTaskInfo, nextLocation, orderList, ttsModule: ttsModule2, taskCode, searchText, badList, handleNextTask, onSearch, confirmStockTask, unlockTask, onSubmit, goBack, get isFirstScan() {
  29321. return isFirstScan;
  29322. }, set isFirstScan(v) {
  29323. isFirstScan = v;
  29324. }, checkScanText, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get VolumeTTS() {
  29325. return VolumeTTS;
  29326. }, get onLoad() {
  29327. return onLoad;
  29328. }, get onUnload() {
  29329. return onUnload;
  29330. } };
  29331. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29332. return __returned__;
  29333. }
  29334. };
  29335. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  29336. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29337. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  29338. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  29339. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  29340. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  29341. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29342. vue.createCommentVNode(" 顶部导航栏 "),
  29343. vue.createVNode(_component_u_navbar, {
  29344. title: "下架任务",
  29345. border: false,
  29346. fixed: "",
  29347. "safe-area-inset-top": ""
  29348. }, {
  29349. left: vue.withCtx(() => [
  29350. vue.createVNode(_component_u_icon, {
  29351. name: "arrow-left",
  29352. color: "#333333",
  29353. size: "20",
  29354. onClick: $setup.goBack
  29355. })
  29356. ]),
  29357. right: vue.withCtx(() => [
  29358. vue.createVNode(_component_u_text, {
  29359. type: "primary",
  29360. text: "提交",
  29361. onClick: $setup.onSubmit
  29362. })
  29363. ]),
  29364. _: 1
  29365. /* STABLE */
  29366. }),
  29367. vue.createCommentVNode(" 任务进度 "),
  29368. vue.createElementVNode("view", { class: "progress-section" }, [
  29369. vue.createVNode(_component_u_alert, {
  29370. title: "当前任务",
  29371. type: "info",
  29372. center: ""
  29373. }),
  29374. vue.createElementVNode("view", {
  29375. class: "flex flex-j-c pad-10",
  29376. style: { "padding-right": "40rpx" }
  29377. }, [
  29378. vue.createCommentVNode(' <view class="next-task" @click="handleNextTask">\r\n <text>上一个</text>\r\n </view> '),
  29379. vue.createElementVNode("view", { class: "flex-c" }, [
  29380. vue.createElementVNode("text", null, [
  29381. vue.createTextVNode(
  29382. vue.toDisplayString($setup.currentTask),
  29383. 1
  29384. /* TEXT */
  29385. ),
  29386. vue.createElementVNode(
  29387. "text",
  29388. { class: "progress-text font-20 color-green" },
  29389. "/" + vue.toDisplayString($setup.totalTasks),
  29390. 1
  29391. /* TEXT */
  29392. )
  29393. ])
  29394. ]),
  29395. vue.createCommentVNode(' <view class="color-green" @click="handleNextTask">\r\n <text>下一个</text>\r\n </view> ')
  29396. ])
  29397. ]),
  29398. vue.createCommentVNode(" 库位信息 "),
  29399. vue.createElementVNode("view", {
  29400. class: "flex flex-j-b pad-10 next-location",
  29401. style: { "padding-right": "40rpx", "align-items": "center" }
  29402. }, [
  29403. vue.createElementVNode(
  29404. "view",
  29405. { class: "font-14 mb-20" },
  29406. vue.toDisplayString($setup.currentTask + 1) + "/" + vue.toDisplayString($setup.totalTasks),
  29407. 1
  29408. /* TEXT */
  29409. ),
  29410. vue.createElementVNode("view", { class: "flex-d" }, [
  29411. vue.createElementVNode(
  29412. "view",
  29413. { class: "font-20 text-center" },
  29414. vue.toDisplayString($setup.curTaskInfo.positionCode),
  29415. 1
  29416. /* TEXT */
  29417. ),
  29418. $setup.nextLocation ? (vue.openBlock(), vue.createElementBlock(
  29419. "view",
  29420. {
  29421. key: 0,
  29422. class: "location-detail font-13 mt-10"
  29423. },
  29424. "下一库位 " + vue.toDisplayString($setup.nextLocation || "无"),
  29425. 1
  29426. /* TEXT */
  29427. )) : vue.createCommentVNode("v-if", true)
  29428. ]),
  29429. !$setup.curTaskInfo.isValid ? (vue.openBlock(), vue.createElementBlock("image", {
  29430. key: 0,
  29431. src: _imports_0,
  29432. mode: "widthFix",
  29433. style: { "width": "70rpx", "height": "70rpx" }
  29434. })) : (vue.openBlock(), vue.createElementBlock("image", {
  29435. key: 1,
  29436. src: _imports_1,
  29437. mode: "widthFix",
  29438. style: { "width": "70rpx", "height": "70rpx" }
  29439. }))
  29440. ]),
  29441. vue.createCommentVNode(" 订单信息 "),
  29442. vue.createElementVNode("view", { class: "order-info" }, [
  29443. vue.createElementVNode(
  29444. "view",
  29445. { class: "info-item" },
  29446. "订单编号:" + vue.toDisplayString($setup.curTaskInfo.orderId),
  29447. 1
  29448. /* TEXT */
  29449. ),
  29450. vue.createElementVNode(
  29451. "view",
  29452. { class: "info-item" },
  29453. "物流单号:" + vue.toDisplayString($setup.curTaskInfo.waybillCode || "-"),
  29454. 1
  29455. /* TEXT */
  29456. ),
  29457. vue.createElementVNode(
  29458. "view",
  29459. { class: "info-item" },
  29460. "不良数量:" + vue.toDisplayString($setup.curTaskInfo.badNum),
  29461. 1
  29462. /* TEXT */
  29463. )
  29464. ]),
  29465. vue.createCommentVNode(" 极差商品列表 "),
  29466. vue.createElementVNode("view", { class: "bad-list" }, [
  29467. vue.createElementVNode("view", { class: "list-title mb-6 mt-20" }, "极差"),
  29468. (vue.openBlock(true), vue.createElementBlock(
  29469. vue.Fragment,
  29470. null,
  29471. vue.renderList($setup.badList, (item, index2) => {
  29472. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  29473. vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
  29474. ]);
  29475. }),
  29476. 128
  29477. /* KEYED_FRAGMENT */
  29478. ))
  29479. ]),
  29480. vue.createCommentVNode(" 底部搜索框 "),
  29481. vue.createElementVNode("view", {
  29482. class: "fixed-bottom pad-20",
  29483. style: { "background": "#ffffff" }
  29484. }, [
  29485. vue.createVNode(_component_u_search, {
  29486. modelValue: $setup.searchText,
  29487. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  29488. placeholder: "请输入订单编号/物流单号/库位号",
  29489. "show-action": false,
  29490. clearabled: true,
  29491. onChange: _cache[1] || (_cache[1] = ($event) => $setup.checkScanText($setup.searchText)),
  29492. height: "40"
  29493. }, null, 8, ["modelValue"]),
  29494. vue.createVNode(_component_u_icon, {
  29495. name: "scan",
  29496. size: "28",
  29497. color: "#19be6b",
  29498. onClick: $setup.openScan
  29499. })
  29500. ])
  29501. ]);
  29502. }
  29503. const PagesIndexWmsTaskDetail = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-ca763ad9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/task-detail.vue"]]);
  29504. const _sfc_main$i = {
  29505. __name: "speedy-check-add",
  29506. setup(__props, { expose: __expose }) {
  29507. __expose();
  29508. const location2 = vue.ref("");
  29509. const products = vue.ref([]);
  29510. const orderNum = vue.ref("");
  29511. const godownName = vue.ref("");
  29512. const getOrderByPositionCode = (positionCode) => {
  29513. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  29514. if (res2.code === 200) {
  29515. const data = res2.data;
  29516. orderNum.value = data.orderNum;
  29517. godownName.value = data.godownName;
  29518. products.value = data.godownStockLogResults || [];
  29519. products.value.forEach((item) => {
  29520. item.checked = false;
  29521. });
  29522. } else {
  29523. uni.$u.toast(res2.msg);
  29524. }
  29525. });
  29526. };
  29527. onLoad((options) => {
  29528. if (options.location) {
  29529. location2.value = options.location;
  29530. getOrderByPositionCode(options.location);
  29531. }
  29532. });
  29533. const isAllSelected = vue.computed(() => {
  29534. return products.value.length > 0 && products.value.every((item) => item.checked);
  29535. });
  29536. const toggleItemSelect = (item) => {
  29537. item.checked = !item.checked;
  29538. };
  29539. const toggleSelectAll = () => {
  29540. const newState = !isAllSelected.value;
  29541. products.value.forEach((item) => {
  29542. item.checked = newState;
  29543. });
  29544. };
  29545. const onSubmit = () => {
  29546. const selectedItems = products.value.filter((item) => item.checked);
  29547. uni.$emit("selectedProducts", selectedItems);
  29548. goBack();
  29549. };
  29550. const goBack = () => {
  29551. uni.navigateBack({
  29552. delta: 1
  29553. });
  29554. };
  29555. const __returned__ = { location: location2, products, orderNum, godownName, getOrderByPositionCode, isAllSelected, toggleItemSelect, toggleSelectAll, onSubmit, goBack, ref: vue.ref, computed: vue.computed, get onLoad() {
  29556. return onLoad;
  29557. }, get onUnload() {
  29558. return onUnload;
  29559. }, LocationOrderItem };
  29560. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29561. return __returned__;
  29562. }
  29563. };
  29564. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  29565. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29566. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  29567. return vue.openBlock(), vue.createElementBlock("view", {
  29568. class: "container",
  29569. style: { "padding-top": "84px", "padding-bottom": "10px" }
  29570. }, [
  29571. vue.createVNode(_component_u_navbar, {
  29572. title: "选择商品",
  29573. border: false,
  29574. fixed: "",
  29575. "safe-area-inset-top": "",
  29576. bgColor: "#22ac38",
  29577. titleStyle: "font-size:36rpx;color:#fff"
  29578. }, {
  29579. left: vue.withCtx(() => [
  29580. vue.createVNode(_component_u_icon, {
  29581. name: "arrow-left",
  29582. color: "#fff",
  29583. size: "20",
  29584. onClick: $setup.goBack
  29585. })
  29586. ]),
  29587. right: vue.withCtx(() => [
  29588. vue.createElementVNode("text", {
  29589. style: { "color": "#ffffff" },
  29590. onClick: $setup.onSubmit
  29591. }, "确定")
  29592. ]),
  29593. _: 1
  29594. /* STABLE */
  29595. }),
  29596. vue.createCommentVNode(" 库位显示 "),
  29597. vue.createElementVNode("view", { class: "location-info" }, [
  29598. vue.createElementVNode(
  29599. "text",
  29600. null,
  29601. "库位: " + vue.toDisplayString($setup.location),
  29602. 1
  29603. /* TEXT */
  29604. ),
  29605. $setup.godownName ? (vue.openBlock(), vue.createElementBlock(
  29606. "text",
  29607. { key: 0 },
  29608. "仓库: " + vue.toDisplayString($setup.godownName),
  29609. 1
  29610. /* TEXT */
  29611. )) : vue.createCommentVNode("v-if", true),
  29612. $setup.orderNum ? (vue.openBlock(), vue.createElementBlock(
  29613. "text",
  29614. { key: 1 },
  29615. "订单号: " + vue.toDisplayString($setup.orderNum),
  29616. 1
  29617. /* TEXT */
  29618. )) : vue.createCommentVNode("v-if", true)
  29619. ]),
  29620. vue.createCommentVNode(" 订单列表 "),
  29621. vue.createElementVNode("view", { class: "product-details" }, [
  29622. (vue.openBlock(true), vue.createElementBlock(
  29623. vue.Fragment,
  29624. null,
  29625. vue.renderList($setup.products, (item, index2) => {
  29626. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  29627. isCheck: "",
  29628. key: index2,
  29629. item,
  29630. onSelect: $setup.toggleItemSelect,
  29631. isLink: false
  29632. }, null, 8, ["item"]);
  29633. }),
  29634. 128
  29635. /* KEYED_FRAGMENT */
  29636. ))
  29637. ]),
  29638. vue.createCommentVNode(" 底部全选栏 "),
  29639. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29640. vue.createElementVNode("view", {
  29641. class: "select-all",
  29642. onClick: $setup.toggleSelectAll
  29643. }, [
  29644. vue.createVNode(_component_u_icon, {
  29645. name: $setup.isAllSelected ? "checkmark-circle-fill" : "checkmark-circle",
  29646. color: $setup.isAllSelected ? "#19be6b" : "#c8c9cc",
  29647. size: "28"
  29648. }, null, 8, ["name", "color"]),
  29649. vue.createElementVNode("text", { class: "select-text" }, "全选")
  29650. ]),
  29651. vue.createElementVNode(
  29652. "text",
  29653. { class: "order-count" },
  29654. "订单总数: " + vue.toDisplayString($setup.products.length),
  29655. 1
  29656. /* TEXT */
  29657. )
  29658. ])
  29659. ]);
  29660. }
  29661. const PagesIndexWmsSpeedyCheckAdd = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-dabb4347"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/speedy-check-add.vue"]]);
  29662. const _sfc_main$h = {
  29663. __name: "user-info",
  29664. setup(__props, { expose: __expose }) {
  29665. __expose();
  29666. const userInfo = vue.ref({
  29667. avatar: "/static/images/avatar.jpg",
  29668. name: "无",
  29669. gender: "无",
  29670. birthday: "无",
  29671. education: "无",
  29672. school: "无",
  29673. username: "用户账号",
  29674. account: "fxt",
  29675. createTime: "2024-06-12 12:00:00",
  29676. lastLogin: "",
  29677. company: "无",
  29678. employeeId: "无",
  29679. position: "无",
  29680. phone: "18888888888",
  29681. email: "无",
  29682. address: "无"
  29683. });
  29684. function getUserInfo() {
  29685. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  29686. if (res2.code == 200) {
  29687. userInfo.value = res2.data;
  29688. }
  29689. });
  29690. }
  29691. getUserInfo();
  29692. function setAvatar(avatarfile) {
  29693. uni.$u.http.post("/app/appUser/setAvatar?avatarfile=" + avatarfile).then((res2) => {
  29694. if (res2.code == 200) {
  29695. userInfo.value.avatar = avatarfile;
  29696. uni.showToast({
  29697. title: "头像设置成功",
  29698. icon: "success"
  29699. });
  29700. }
  29701. });
  29702. }
  29703. const handleEditAvatar = () => {
  29704. const token = uni.getStorageSync("token");
  29705. uni.chooseImage({
  29706. count: 1,
  29707. success: (res2) => {
  29708. const filePath = res2.tempFilePaths[0];
  29709. uni.uploadFile({
  29710. url: `${baseUrl}/common/upload`,
  29711. filePath,
  29712. name: "file",
  29713. header: {
  29714. "Authorization": token
  29715. },
  29716. success: (uploadRes) => {
  29717. const data = JSON.parse(uploadRes.data);
  29718. if (data.code === 200) {
  29719. setAvatar(data.url);
  29720. } else {
  29721. uni.showToast({
  29722. title: "上传失败",
  29723. icon: "none"
  29724. });
  29725. }
  29726. },
  29727. fail: () => {
  29728. uni.showToast({
  29729. title: "上传失败",
  29730. icon: "none"
  29731. });
  29732. }
  29733. });
  29734. }
  29735. });
  29736. };
  29737. const __returned__ = { userInfo, getUserInfo, setAvatar, handleEditAvatar, ref: vue.ref, get baseUrl() {
  29738. return baseUrl;
  29739. } };
  29740. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29741. return __returned__;
  29742. }
  29743. };
  29744. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  29745. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  29746. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  29747. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  29748. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  29749. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  29750. vue.createCommentVNode(" 头像区域 "),
  29751. vue.createElementVNode("view", { class: "avatar-section" }, [
  29752. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  29753. vue.createElementVNode("text", null, "头像:"),
  29754. vue.createVNode(_component_u_avatar, {
  29755. size: 50,
  29756. src: $setup.userInfo.avatar
  29757. }, null, 8, ["src"]),
  29758. vue.createVNode(_component_u_button, {
  29759. type: "success",
  29760. style: { "width": "200rpx" },
  29761. size: "small",
  29762. onClick: $setup.handleEditAvatar
  29763. }, {
  29764. default: vue.withCtx(() => [
  29765. vue.createTextVNode("去修改")
  29766. ]),
  29767. _: 1
  29768. /* STABLE */
  29769. })
  29770. ])
  29771. ]),
  29772. vue.createCommentVNode(" 基本信息区域 "),
  29773. vue.createElementVNode("view", { class: "info-section" }, [
  29774. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  29775. vue.createElementVNode("view", { class: "info-card" }, [
  29776. vue.createVNode(_component_u_cell_group, { border: false }, {
  29777. default: vue.withCtx(() => [
  29778. vue.createVNode(_component_u_cell, {
  29779. title: "姓名",
  29780. value: $setup.userInfo.nickName || "无"
  29781. }, null, 8, ["value"]),
  29782. vue.createVNode(_component_u_cell, {
  29783. title: "性别",
  29784. value: $setup.userInfo.sex == 0 ? "男" : $setup.userInfo.sex == 1 ? "女" : "未知"
  29785. }, null, 8, ["value"]),
  29786. vue.createVNode(_component_u_cell, {
  29787. title: "生日",
  29788. value: $setup.userInfo.birthday || "无"
  29789. }, null, 8, ["value"]),
  29790. vue.createVNode(_component_u_cell, {
  29791. title: "学历",
  29792. value: $setup.userInfo.education || "无"
  29793. }, null, 8, ["value"]),
  29794. vue.createVNode(_component_u_cell, {
  29795. title: "毕业学校",
  29796. value: $setup.userInfo.school || "无",
  29797. border: false
  29798. }, null, 8, ["value"])
  29799. ]),
  29800. _: 1
  29801. /* STABLE */
  29802. })
  29803. ])
  29804. ]),
  29805. vue.createCommentVNode(" 账号信息区域 "),
  29806. vue.createElementVNode("view", { class: "info-section" }, [
  29807. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  29808. vue.createElementVNode("view", { class: "info-card" }, [
  29809. vue.createVNode(_component_u_cell_group, { border: false }, {
  29810. default: vue.withCtx(() => [
  29811. vue.createVNode(_component_u_cell, {
  29812. title: "账号",
  29813. value: $setup.userInfo.userName
  29814. }, null, 8, ["value"]),
  29815. vue.createVNode(_component_u_cell, {
  29816. title: "创建日期",
  29817. value: $setup.userInfo.createTime
  29818. }, null, 8, ["value"]),
  29819. vue.createVNode(_component_u_cell, {
  29820. title: "最近登录",
  29821. value: $setup.userInfo.loginDate || "--",
  29822. border: false
  29823. }, null, 8, ["value"])
  29824. ]),
  29825. _: 1
  29826. /* STABLE */
  29827. })
  29828. ])
  29829. ]),
  29830. vue.createCommentVNode(" 员工资料区域 "),
  29831. vue.createElementVNode("view", { class: "info-section" }, [
  29832. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  29833. vue.createElementVNode("view", { class: "info-card" }, [
  29834. vue.createVNode(_component_u_cell_group, { border: false }, {
  29835. default: vue.withCtx(() => [
  29836. vue.createVNode(_component_u_cell, {
  29837. title: "公司",
  29838. value: $setup.userInfo.company || "无"
  29839. }, null, 8, ["value"]),
  29840. vue.createVNode(_component_u_cell, {
  29841. title: "员工编号",
  29842. value: $setup.userInfo.employeeId || "无"
  29843. }, null, 8, ["value"]),
  29844. vue.createVNode(_component_u_cell, {
  29845. title: "职位",
  29846. value: $setup.userInfo.position || "无",
  29847. border: false
  29848. }, null, 8, ["value"])
  29849. ]),
  29850. _: 1
  29851. /* STABLE */
  29852. })
  29853. ])
  29854. ]),
  29855. vue.createCommentVNode(" 联系方式区域 "),
  29856. vue.createElementVNode("view", { class: "info-section" }, [
  29857. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  29858. vue.createElementVNode("view", { class: "info-card" }, [
  29859. vue.createVNode(_component_u_cell_group, { border: false }, {
  29860. default: vue.withCtx(() => [
  29861. vue.createVNode(_component_u_cell, {
  29862. title: "电话",
  29863. value: $setup.userInfo.phonenumber
  29864. }, null, 8, ["value"]),
  29865. vue.createVNode(_component_u_cell, {
  29866. title: "邮箱",
  29867. value: $setup.userInfo.email || "无"
  29868. }, null, 8, ["value"]),
  29869. vue.createVNode(_component_u_cell, {
  29870. title: "住址",
  29871. value: $setup.userInfo.address || "无",
  29872. border: false
  29873. }, null, 8, ["value"])
  29874. ]),
  29875. _: 1
  29876. /* STABLE */
  29877. })
  29878. ])
  29879. ])
  29880. ]);
  29881. }
  29882. const PagesMyPageUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-804eca28"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/user-info.vue"]]);
  29883. const _sfc_main$g = {
  29884. __name: "warehouse",
  29885. setup(__props, { expose: __expose }) {
  29886. __expose();
  29887. const showPicker = vue.ref(false);
  29888. const selectedWarehouse = vue.ref("");
  29889. const warehouseList = vue.ref([]);
  29890. const getWarehouseList = () => {
  29891. uni.$u.http.post("/app/appUser/searchGodown?name=").then((res2) => {
  29892. if (res2.code == 200) {
  29893. warehouseList.value = res2.data.filter((v) => v.useStatus == 1).map((v) => ({
  29894. text: v.godownName,
  29895. value: v.id
  29896. }));
  29897. }
  29898. });
  29899. };
  29900. getWarehouseList();
  29901. const getWarehouse = () => {
  29902. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  29903. var _a;
  29904. if (res2.code == 200) {
  29905. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  29906. }
  29907. });
  29908. };
  29909. getWarehouse();
  29910. const saveWarehouse = (godownId) => {
  29911. uni.$u.http.post("/app/appUser/bingowGodown?godownId=" + godownId).then((res2) => {
  29912. if (res2.code == 200) {
  29913. uni.showToast({
  29914. title: "设置默认仓库成功",
  29915. icon: "success"
  29916. });
  29917. }
  29918. });
  29919. };
  29920. const onConfirm = (e) => {
  29921. const [{
  29922. value: value2,
  29923. text
  29924. }] = e.value;
  29925. selectedWarehouse.value = text;
  29926. showPicker.value = false;
  29927. formatAppLog("log", "at pages/my/page/warehouse.vue:75", e, "xxxxxx");
  29928. saveWarehouse(value2);
  29929. };
  29930. const __returned__ = { showPicker, selectedWarehouse, warehouseList, getWarehouseList, getWarehouse, saveWarehouse, onConfirm, ref: vue.ref };
  29931. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29932. return __returned__;
  29933. }
  29934. };
  29935. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  29936. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29937. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  29938. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  29939. vue.createElementVNode("view", {
  29940. class: "select-wrap",
  29941. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  29942. }, [
  29943. vue.createElementVNode("text", { class: "required-label" }, "*"),
  29944. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  29945. vue.createElementVNode("view", { class: "picker-value" }, [
  29946. vue.createElementVNode(
  29947. "text",
  29948. {
  29949. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  29950. },
  29951. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  29952. 3
  29953. /* TEXT, CLASS */
  29954. ),
  29955. vue.createVNode(_component_u_icon, {
  29956. name: "arrow-right",
  29957. color: "#999",
  29958. size: "16"
  29959. })
  29960. ])
  29961. ]),
  29962. vue.createCommentVNode(" 仓库选择器 "),
  29963. vue.createVNode(_component_u_picker, {
  29964. show: $setup.showPicker,
  29965. columns: [$setup.warehouseList],
  29966. onConfirm: $setup.onConfirm,
  29967. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  29968. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  29969. title: "选择仓库",
  29970. confirmText: "确定",
  29971. cancelText: "取消"
  29972. }, null, 8, ["show", "columns"])
  29973. ]);
  29974. }
  29975. const PagesMyPageWarehouse = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-972eecda"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/warehouse.vue"]]);
  29976. const _sfc_main$f = {
  29977. __name: "school",
  29978. setup(__props, { expose: __expose }) {
  29979. __expose();
  29980. const schoolName = vue.ref("");
  29981. const schoolList = vue.ref([]);
  29982. const getSchoolList = () => {
  29983. uni.$u.http.get("/app/appConf/getPadSchoolBroadcast").then((res2) => {
  29984. if (res2.code == 200) {
  29985. schoolList.value = res2.data;
  29986. }
  29987. });
  29988. };
  29989. getSchoolList();
  29990. const handleSubmit = () => {
  29991. if (schoolList.value.length === 0) {
  29992. uni.$u.toast("请至少添加一所学校");
  29993. return;
  29994. }
  29995. uni.$u.http.post("/app/appConf/setPadSchoolBroadcast", schoolList.value).then((res2) => {
  29996. if (res2.code == 200) {
  29997. uni.showToast({
  29998. title: "设置成功",
  29999. icon: "success"
  30000. });
  30001. }
  30002. });
  30003. };
  30004. const handleAddSchool = () => {
  30005. if (!schoolName.value.trim()) {
  30006. uni.$u.toast("请输入学校名称");
  30007. return;
  30008. }
  30009. schoolList.value.push({
  30010. schoolName: schoolName.value,
  30011. id: ""
  30012. });
  30013. schoolName.value = "";
  30014. };
  30015. const handleRemoveSchool = (index2) => {
  30016. schoolList.value.splice(index2, 1);
  30017. };
  30018. const __returned__ = { schoolName, schoolList, getSchoolList, handleSubmit, handleAddSchool, handleRemoveSchool, ref: vue.ref };
  30019. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30020. return __returned__;
  30021. }
  30022. };
  30023. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  30024. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30025. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  30026. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  30027. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30028. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  30029. vue.createCommentVNode(" 输入区域 "),
  30030. vue.createElementVNode("view", { class: "input-section" }, [
  30031. vue.createElementVNode("view", { class: "input-header" }, [
  30032. vue.createElementVNode("text", { class: "required" }, "*"),
  30033. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  30034. vue.createVNode(_component_u_input, {
  30035. modelValue: $setup.schoolName,
  30036. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  30037. placeholder: "请输入一个学校名称",
  30038. border: "false",
  30039. class: "input"
  30040. }, {
  30041. suffix: vue.withCtx(() => [
  30042. vue.createVNode(_component_u_icon, {
  30043. name: "plus",
  30044. size: "24",
  30045. color: "#666",
  30046. onClick: $setup.handleAddSchool
  30047. })
  30048. ]),
  30049. _: 1
  30050. /* STABLE */
  30051. }, 8, ["modelValue"])
  30052. ])
  30053. ]),
  30054. vue.createCommentVNode(" 学校列表 "),
  30055. vue.createElementVNode("view", { class: "school-list" }, [
  30056. (vue.openBlock(true), vue.createElementBlock(
  30057. vue.Fragment,
  30058. null,
  30059. vue.renderList($setup.schoolList, (item, index2) => {
  30060. return vue.openBlock(), vue.createElementBlock("view", {
  30061. class: "school-item",
  30062. key: index2
  30063. }, [
  30064. vue.createVNode(_component_u_tag, {
  30065. text: item.schoolName,
  30066. closable: "",
  30067. size: "large"
  30068. }, null, 8, ["text"])
  30069. ]);
  30070. }),
  30071. 128
  30072. /* KEYED_FRAGMENT */
  30073. ))
  30074. ]),
  30075. vue.createCommentVNode(" 底部提交按钮 "),
  30076. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30077. vue.createVNode(_component_u_button, {
  30078. size: "large",
  30079. type: "success",
  30080. block: "",
  30081. onClick: $setup.handleSubmit
  30082. }, {
  30083. default: vue.withCtx(() => [
  30084. vue.createTextVNode("提交")
  30085. ]),
  30086. _: 1
  30087. /* STABLE */
  30088. })
  30089. ])
  30090. ]);
  30091. }
  30092. const PagesMyPageSchool = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-6d6c87ab"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/school.vue"]]);
  30093. const _sfc_main$e = {
  30094. __name: "audit-unfinished",
  30095. setup(__props, { expose: __expose }) {
  30096. __expose();
  30097. const list = vue.ref([]);
  30098. const updateList = (newList) => {
  30099. list.value = newList;
  30100. };
  30101. const __returned__ = { list, updateList, orderItem, pageScroll, ref: vue.ref };
  30102. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30103. return __returned__;
  30104. }
  30105. };
  30106. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  30107. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  30108. vue.createVNode($setup["pageScroll"], {
  30109. requestStr: "/app/orderinfo/myNeedCheckOrder",
  30110. onUpdateList: $setup.updateList
  30111. }, {
  30112. default: vue.withCtx(() => [
  30113. (vue.openBlock(true), vue.createElementBlock(
  30114. vue.Fragment,
  30115. null,
  30116. vue.renderList($setup.list, (item, index2) => {
  30117. return vue.openBlock(), vue.createBlock($setup["orderItem"], {
  30118. key: index2,
  30119. item
  30120. }, null, 8, ["item"]);
  30121. }),
  30122. 128
  30123. /* KEYED_FRAGMENT */
  30124. ))
  30125. ]),
  30126. _: 1
  30127. /* STABLE */
  30128. })
  30129. ]);
  30130. }
  30131. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/audit-unfinished.vue"]]);
  30132. const _sfc_main$d = {
  30133. __name: "version",
  30134. setup(__props, { expose: __expose }) {
  30135. __expose();
  30136. const userInfo = vue.reactive({
  30137. version: "v_2024050400_1",
  30138. // Example version number
  30139. updateStatus: "已经是新版本"
  30140. // Example update status
  30141. });
  30142. function checkForUpdates() {
  30143. setTimeout(() => {
  30144. {
  30145. userInfo.updateStatus = "发现新版本,正在下载...";
  30146. downloadNewVersion();
  30147. }
  30148. }, 1e3);
  30149. }
  30150. function downloadNewVersion() {
  30151. setTimeout(() => {
  30152. userInfo.updateStatus = "下载完成,准备安装";
  30153. }, 2e3);
  30154. }
  30155. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  30156. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30157. return __returned__;
  30158. }
  30159. };
  30160. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  30161. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  30162. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  30163. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  30164. vue.createVNode(_component_u_cell_group, {
  30165. border: false,
  30166. customStyle: "background:#ffffff"
  30167. }, {
  30168. default: vue.withCtx(() => [
  30169. vue.createVNode(_component_u_cell, {
  30170. title: "当前版本号(正式版)",
  30171. value: $setup.userInfo.version || "无"
  30172. }, null, 8, ["value"]),
  30173. vue.createVNode(_component_u_cell, {
  30174. title: "检测更新",
  30175. value: $setup.userInfo.updateStatus || "无",
  30176. border: false,
  30177. onClick: $setup.checkForUpdates
  30178. }, null, 8, ["value"])
  30179. ]),
  30180. _: 1
  30181. /* STABLE */
  30182. })
  30183. ]);
  30184. }
  30185. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/version.vue"]]);
  30186. const props$1 = {
  30187. props: {
  30188. // 是否为加载中状态
  30189. loading: {
  30190. type: Boolean,
  30191. default: props$E.switch.loading
  30192. },
  30193. // 是否为禁用装填
  30194. disabled: {
  30195. type: Boolean,
  30196. default: props$E.switch.disabled
  30197. },
  30198. // 开关尺寸,单位px
  30199. size: {
  30200. type: [String, Number],
  30201. default: props$E.switch.size
  30202. },
  30203. // 打开时的背景颜色
  30204. activeColor: {
  30205. type: String,
  30206. default: props$E.switch.activeColor
  30207. },
  30208. // 关闭时的背景颜色
  30209. inactiveColor: {
  30210. type: String,
  30211. default: props$E.switch.inactiveColor
  30212. },
  30213. // 通过v-model双向绑定的值
  30214. modelValue: {
  30215. type: [Boolean, String, Number],
  30216. default: props$E.switch.value
  30217. },
  30218. // switch打开时的值
  30219. activeValue: {
  30220. type: [String, Number, Boolean],
  30221. default: props$E.switch.activeValue
  30222. },
  30223. // switch关闭时的值
  30224. inactiveValue: {
  30225. type: [String, Number, Boolean],
  30226. default: props$E.switch.inactiveValue
  30227. },
  30228. // 是否开启异步变更,开启后需要手动控制输入值
  30229. asyncChange: {
  30230. type: Boolean,
  30231. default: props$E.switch.asyncChange
  30232. },
  30233. // 圆点与外边框的距离
  30234. space: {
  30235. type: [String, Number],
  30236. default: props$E.switch.space
  30237. }
  30238. }
  30239. };
  30240. const _sfc_main$c = {
  30241. name: "u-switch",
  30242. mixins: [mpMixin, mixin, props$1],
  30243. watch: {
  30244. modelValue: {
  30245. immediate: true,
  30246. handler(n) {
  30247. if (n !== this.inactiveValue && n !== this.activeValue) {
  30248. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  30249. }
  30250. }
  30251. }
  30252. },
  30253. data() {
  30254. return {
  30255. bgColor: "#ffffff"
  30256. };
  30257. },
  30258. computed: {
  30259. isActive() {
  30260. return this.modelValue === this.activeValue;
  30261. },
  30262. switchStyle() {
  30263. let style = {};
  30264. style.width = uni.$u.addUnit(this.size * 2 + 2);
  30265. style.height = uni.$u.addUnit(Number(this.size) + 2);
  30266. if (this.customInactiveColor) {
  30267. style.borderColor = "rgba(0, 0, 0, 0)";
  30268. }
  30269. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  30270. return style;
  30271. },
  30272. nodeStyle() {
  30273. let style = {};
  30274. style.width = uni.$u.addUnit(this.size - this.space);
  30275. style.height = uni.$u.addUnit(this.size - this.space);
  30276. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  30277. style.transform = `translateX(-${translateX})`;
  30278. return style;
  30279. },
  30280. bgStyle() {
  30281. let style = {};
  30282. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  30283. style.height = uni.$u.addUnit(this.size);
  30284. style.backgroundColor = this.inactiveColor;
  30285. style.transform = `scale(${this.isActive ? 0 : 1})`;
  30286. return style;
  30287. },
  30288. customInactiveColor() {
  30289. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  30290. }
  30291. },
  30292. emits: ["update:modelValue", "change"],
  30293. methods: {
  30294. clickHandler() {
  30295. if (!this.disabled && !this.loading) {
  30296. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  30297. if (!this.asyncChange) {
  30298. this.$emit("update:modelValue", oldValue);
  30299. }
  30300. this.$nextTick(() => {
  30301. this.$emit("change", oldValue);
  30302. });
  30303. }
  30304. }
  30305. }
  30306. };
  30307. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  30308. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  30309. return vue.openBlock(), vue.createElementBlock(
  30310. "view",
  30311. {
  30312. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  30313. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  30314. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  30315. },
  30316. [
  30317. vue.createElementVNode(
  30318. "view",
  30319. {
  30320. class: "u-switch__bg",
  30321. style: vue.normalizeStyle([$options.bgStyle])
  30322. },
  30323. null,
  30324. 4
  30325. /* STYLE */
  30326. ),
  30327. vue.createElementVNode(
  30328. "view",
  30329. {
  30330. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  30331. style: vue.normalizeStyle([$options.nodeStyle]),
  30332. ref: "u-switch__node"
  30333. },
  30334. [
  30335. vue.createVNode(_component_u_loading_icon, {
  30336. show: _ctx.loading,
  30337. mode: "circle",
  30338. timingFunction: "linear",
  30339. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  30340. size: _ctx.size * 0.6
  30341. }, null, 8, ["show", "color", "size"])
  30342. ],
  30343. 6
  30344. /* CLASS, STYLE */
  30345. )
  30346. ],
  30347. 6
  30348. /* CLASS, STYLE */
  30349. );
  30350. }
  30351. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-6ab257b3"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]);
  30352. const props = {
  30353. props: {
  30354. // 最小可选值
  30355. min: {
  30356. type: [Number, String],
  30357. default: props$E.slider.min
  30358. },
  30359. // 最大可选值
  30360. max: {
  30361. type: [Number, String],
  30362. default: props$E.slider.max
  30363. },
  30364. // 步长,取值必须大于 0,并且可被(max - min)整除
  30365. step: {
  30366. type: [Number, String],
  30367. default: props$E.slider.step
  30368. },
  30369. // 当前取值
  30370. value: {
  30371. type: [Number, String],
  30372. default: props$E.slider.value
  30373. },
  30374. // 滑块右侧已选择部分的背景色
  30375. activeColor: {
  30376. type: String,
  30377. default: props$E.slider.activeColor
  30378. },
  30379. // 滑块左侧未选择部分的背景色
  30380. inactiveColor: {
  30381. type: String,
  30382. default: props$E.slider.inactiveColor
  30383. },
  30384. // 滑块的大小,取值范围为 12 - 28
  30385. blockSize: {
  30386. type: [Number, String],
  30387. default: props$E.slider.blockSize
  30388. },
  30389. // 滑块的颜色
  30390. blockColor: {
  30391. type: String,
  30392. default: props$E.slider.blockColor
  30393. },
  30394. // 禁用状态
  30395. disabled: {
  30396. type: Boolean,
  30397. default: props$E.slider.disabled
  30398. },
  30399. // 是否显示当前的选择值
  30400. showValue: {
  30401. type: Boolean,
  30402. default: props$E.slider.showValue
  30403. }
  30404. }
  30405. };
  30406. const _sfc_main$b = {
  30407. name: "u--slider",
  30408. mixins: [mpMixin, mixin, props],
  30409. methods: {
  30410. // 拖动过程中触发
  30411. changingHandler(e) {
  30412. const {
  30413. value: value2
  30414. } = e.detail;
  30415. this.$emit("input", value2);
  30416. this.$emit("changing", value2);
  30417. },
  30418. // 滑动结束时触发
  30419. changeHandler(e) {
  30420. const {
  30421. value: value2
  30422. } = e.detail;
  30423. this.$emit("input", value2);
  30424. this.$emit("change", value2);
  30425. }
  30426. }
  30427. };
  30428. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  30429. return vue.openBlock(), vue.createElementBlock(
  30430. "view",
  30431. {
  30432. class: "u-slider",
  30433. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  30434. },
  30435. [
  30436. vue.createElementVNode("slider", {
  30437. min: _ctx.min,
  30438. max: _ctx.max,
  30439. step: _ctx.step,
  30440. value: _ctx.value,
  30441. activeColor: _ctx.activeColor,
  30442. inactiveColor: _ctx.inactiveColor,
  30443. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  30444. blockColor: _ctx.blockColor,
  30445. showValue: _ctx.showValue,
  30446. disabled: _ctx.disabled,
  30447. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  30448. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  30449. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  30450. ],
  30451. 4
  30452. /* STYLE */
  30453. );
  30454. }
  30455. const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-7b84e269"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-slider/u-slider.vue"]]);
  30456. const _sfc_main$a = {
  30457. __name: "volume",
  30458. setup(__props, { expose: __expose }) {
  30459. __expose();
  30460. const settings = vue.ref({
  30461. audioStartSwitch: true,
  30462. audioStart: "书嗨,不辜负每一个爱书的人",
  30463. audioSpeed: 10,
  30464. audioVolume: 5,
  30465. "audioPlay": false,
  30466. "audioClick": false
  30467. });
  30468. function changeSpeed(value2) {
  30469. settings.value.audioSpeed = value2;
  30470. }
  30471. function changeVolume(value2) {
  30472. settings.value.audioVolume = value2;
  30473. }
  30474. const getVoiceBroadcast = () => {
  30475. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  30476. if (res2.code == 200) {
  30477. settings.value = res2.data;
  30478. }
  30479. });
  30480. };
  30481. getVoiceBroadcast();
  30482. const saveVoiceBroadcast = () => {
  30483. uni.$u.http.post("/app/appConf/setAudioConfig", settings.value).then((res2) => {
  30484. if (res2.code == 200) {
  30485. uni.showToast({
  30486. title: "设置成功",
  30487. icon: "success"
  30488. });
  30489. initTTS();
  30490. }
  30491. });
  30492. };
  30493. const tts = vue.ref(null);
  30494. const initTTS = () => {
  30495. let params = {
  30496. speed: settings.value.audioSpeed / 10,
  30497. // 将 0-10 转换为 0-1
  30498. pitch: settings.value.audioVolume,
  30499. // 将 0-10 转换为 0-1
  30500. volume: 1
  30501. };
  30502. tts.value = new VolumeTTS(params);
  30503. settings.value.audioStartSwitch && tts.value.speak(settings.value.audioStart);
  30504. };
  30505. function stopPlayback() {
  30506. tts.value && tts.value.stop();
  30507. uni.showToast({
  30508. title: "已停止播放",
  30509. icon: "none"
  30510. });
  30511. }
  30512. function restartApp() {
  30513. uni.showModal({
  30514. title: "提示",
  30515. content: "确定要重启应用吗?",
  30516. success: function(res2) {
  30517. if (res2.confirm) {
  30518. plus.runtime.restart();
  30519. }
  30520. }
  30521. });
  30522. }
  30523. function loadSettings() {
  30524. try {
  30525. const savedSettings = uni.getStorageSync("tts_settings");
  30526. if (savedSettings) {
  30527. Object.assign(settings, savedSettings);
  30528. }
  30529. } catch (error2) {
  30530. formatAppLog("error", "at pages/my/page/volume.vue:161", "加载设置失败:", error2);
  30531. }
  30532. }
  30533. function playClickSound2() {
  30534. if (!settings.audioClick)
  30535. return;
  30536. const audio = uni.createInnerAudioContext();
  30537. audio.src = "/static/audio/click.mp3";
  30538. audio.play();
  30539. }
  30540. vue.onMounted(async () => {
  30541. loadSettings();
  30542. });
  30543. 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() {
  30544. return VolumeTTS;
  30545. } };
  30546. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30547. return __returned__;
  30548. }
  30549. };
  30550. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  30551. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  30552. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  30553. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  30554. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  30555. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  30556. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30557. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  30558. vue.createCommentVNode(" 设置选项组 "),
  30559. vue.createElementVNode("view", { class: "settings-section" }, [
  30560. vue.createVNode(_component_u_cell_group, { border: false }, {
  30561. default: vue.withCtx(() => [
  30562. vue.createCommentVNode(" 语音播报设置 "),
  30563. vue.createVNode(_component_u_cell, {
  30564. title: "语音播报",
  30565. label: "控制除app启动提示外所有语音播报的开关",
  30566. "border-bottom": true
  30567. }, {
  30568. "right-icon": vue.withCtx(() => [
  30569. vue.createVNode(_component_u_switch, {
  30570. modelValue: $setup.settings.audioPlay,
  30571. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.audioPlay = $event),
  30572. activeColor: "#4cd964"
  30573. }, null, 8, ["modelValue"])
  30574. ]),
  30575. _: 1
  30576. /* STABLE */
  30577. }),
  30578. vue.createCommentVNode(" 点击音效设置 "),
  30579. vue.createVNode(_component_u_cell, {
  30580. title: "点击音效",
  30581. "border-bottom": true
  30582. }, {
  30583. "right-icon": vue.withCtx(() => [
  30584. vue.createVNode(_component_u_switch, {
  30585. modelValue: $setup.settings.audioClick,
  30586. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.audioClick = $event),
  30587. activeColor: "#4cd964"
  30588. }, null, 8, ["modelValue"])
  30589. ]),
  30590. _: 1
  30591. /* STABLE */
  30592. }),
  30593. vue.createCommentVNode(" 启动提示语设置 "),
  30594. vue.createVNode(_component_u_cell, {
  30595. title: "启动提示语",
  30596. "border-bottom": true
  30597. }, {
  30598. "right-icon": vue.withCtx(() => [
  30599. vue.createVNode(_component_u_switch, {
  30600. modelValue: $setup.settings.audioStartSwitch,
  30601. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.audioStartSwitch = $event),
  30602. activeColor: "#4cd964"
  30603. }, null, 8, ["modelValue"])
  30604. ]),
  30605. _: 1
  30606. /* STABLE */
  30607. })
  30608. ]),
  30609. _: 1
  30610. /* STABLE */
  30611. }),
  30612. vue.createCommentVNode(" 启动提示语输入框 "),
  30613. vue.createElementVNode("view", { class: "input-section" }, [
  30614. vue.createVNode(_component_u_textarea, {
  30615. modelValue: $setup.settings.audioStart,
  30616. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.audioStart = $event),
  30617. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  30618. height: "100"
  30619. }, null, 8, ["modelValue"])
  30620. ]),
  30621. vue.createCommentVNode(" 语速设置 "),
  30622. vue.createElementVNode("view", { class: "slider-section" }, [
  30623. vue.createElementVNode("view", { class: "slider-title" }, [
  30624. vue.createElementVNode("text", null, "设置语速"),
  30625. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  30626. ]),
  30627. vue.createVNode(_component_u_slider, {
  30628. value: $setup.settings.audioSpeed,
  30629. max: 20,
  30630. min: 5,
  30631. step: 1,
  30632. showValue: "",
  30633. onChange: $setup.changeSpeed
  30634. }, null, 8, ["value"])
  30635. ]),
  30636. vue.createCommentVNode(" 音调设置 "),
  30637. vue.createElementVNode("view", { class: "slider-section" }, [
  30638. vue.createElementVNode("view", { class: "slider-title" }, [
  30639. vue.createElementVNode("text", null, "设置音调"),
  30640. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  30641. ]),
  30642. vue.createVNode(_component_u_slider, {
  30643. value: $setup.settings.audioVolume,
  30644. max: 10,
  30645. min: 1,
  30646. step: 1,
  30647. showValue: "",
  30648. onChange: $setup.changeVolume
  30649. }, null, 8, ["value"])
  30650. ]),
  30651. vue.createCommentVNode(" 操作按钮 "),
  30652. vue.createElementVNode("view", { class: "button-group" }, [
  30653. vue.createVNode(_component_u_button, {
  30654. type: "primary",
  30655. text: "保存设置并试听",
  30656. onClick: $setup.saveVoiceBroadcast
  30657. }),
  30658. vue.createVNode(_component_u_button, {
  30659. type: "warning",
  30660. text: "停止播放",
  30661. onClick: $setup.stopPlayback,
  30662. plain: true
  30663. }),
  30664. vue.createVNode(_component_u_button, {
  30665. type: "error",
  30666. text: "重启app",
  30667. onClick: $setup.restartApp,
  30668. plain: true
  30669. })
  30670. ])
  30671. ])
  30672. ]);
  30673. }
  30674. const PagesMyPageVolume = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-983b50b6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/volume.vue"]]);
  30675. const _sfc_main$9 = {
  30676. __name: "book-display",
  30677. setup(__props, { expose: __expose }) {
  30678. __expose();
  30679. const settings = vue.reactive({
  30680. showRecyclePrice: false,
  30681. showRecycleStatus: false,
  30682. showStock: false,
  30683. showDetail: false
  30684. });
  30685. function loadSettings() {
  30686. uni.$u.http.get("/app/appConf/getBookShowConfig").then((res2) => {
  30687. if (res2.code == 200) {
  30688. Object.assign(settings, res2.data);
  30689. }
  30690. });
  30691. }
  30692. function saveSettings() {
  30693. uni.$u.http.post("/app/appConf/setBookShowConfig", settings).then((res2) => {
  30694. if (res2.code == 200) {
  30695. uni.showToast({
  30696. title: "设置已保存",
  30697. icon: "success"
  30698. });
  30699. } else {
  30700. uni.showToast({
  30701. title: "保存设置失败",
  30702. icon: "error"
  30703. });
  30704. }
  30705. });
  30706. }
  30707. vue.onMounted(() => {
  30708. loadSettings();
  30709. });
  30710. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  30711. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30712. return __returned__;
  30713. }
  30714. };
  30715. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  30716. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  30717. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  30718. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  30719. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30720. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  30721. vue.createCommentVNode(" 设置列表 "),
  30722. vue.createVNode(_component_u_cell_group, {
  30723. border: false,
  30724. class: "settings-group"
  30725. }, {
  30726. default: vue.withCtx(() => [
  30727. vue.createVNode(_component_u_cell, {
  30728. title: "是否展示回收价",
  30729. "border-bottom": true
  30730. }, {
  30731. "right-icon": vue.withCtx(() => [
  30732. vue.createVNode(_component_u_switch, {
  30733. modelValue: $setup.settings.showRecyclePrice,
  30734. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  30735. activeColor: "#4cd964"
  30736. }, null, 8, ["modelValue"])
  30737. ]),
  30738. _: 1
  30739. /* STABLE */
  30740. }),
  30741. vue.createVNode(_component_u_cell, {
  30742. title: "是否展示回收状态",
  30743. "border-bottom": true
  30744. }, {
  30745. "right-icon": vue.withCtx(() => [
  30746. vue.createVNode(_component_u_switch, {
  30747. modelValue: $setup.settings.showRecycleStatus,
  30748. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  30749. activeColor: "#4cd964"
  30750. }, null, 8, ["modelValue"])
  30751. ]),
  30752. _: 1
  30753. /* STABLE */
  30754. }),
  30755. vue.createVNode(_component_u_cell, {
  30756. title: "是否展示库存信息",
  30757. "border-bottom": true
  30758. }, {
  30759. "right-icon": vue.withCtx(() => [
  30760. vue.createVNode(_component_u_switch, {
  30761. modelValue: $setup.settings.showStock,
  30762. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showStock = $event),
  30763. activeColor: "#4cd964"
  30764. }, null, 8, ["modelValue"])
  30765. ]),
  30766. _: 1
  30767. /* STABLE */
  30768. }),
  30769. vue.createVNode(_component_u_cell, {
  30770. title: "是否默认展开商品详情",
  30771. "border-bottom": false
  30772. }, {
  30773. "right-icon": vue.withCtx(() => [
  30774. vue.createVNode(_component_u_switch, {
  30775. modelValue: $setup.settings.showDetail,
  30776. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.showDetail = $event),
  30777. activeColor: "#4cd964"
  30778. }, null, 8, ["modelValue"])
  30779. ]),
  30780. _: 1
  30781. /* STABLE */
  30782. })
  30783. ]),
  30784. _: 1
  30785. /* STABLE */
  30786. }),
  30787. vue.createVNode(_component_u_button, {
  30788. class: "mt-40",
  30789. type: "primary",
  30790. onClick: $setup.saveSettings
  30791. }, {
  30792. default: vue.withCtx(() => [
  30793. vue.createTextVNode("保存")
  30794. ]),
  30795. _: 1
  30796. /* STABLE */
  30797. })
  30798. ]);
  30799. }
  30800. const PagesMyPageBookDisplay = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-30e61b0d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/book-display.vue"]]);
  30801. const _sfc_main$8 = {
  30802. __name: "password",
  30803. setup(__props, { expose: __expose }) {
  30804. __expose();
  30805. const formRef = vue.ref(null);
  30806. const loading = vue.ref(false);
  30807. const showPassword = vue.reactive({
  30808. old: false,
  30809. new: false,
  30810. confirm: false
  30811. });
  30812. const formData = vue.reactive({
  30813. oldPassword: "",
  30814. newPassword: "",
  30815. confirmPassword: ""
  30816. });
  30817. const rules2 = {
  30818. oldPassword: [{
  30819. required: true,
  30820. message: "请输入原密码",
  30821. trigger: ["blur", "change"]
  30822. }, {
  30823. min: 6,
  30824. message: "密码长度不能小于6位",
  30825. trigger: ["blur", "change"]
  30826. }],
  30827. newPassword: [{
  30828. required: true,
  30829. message: "请输入新密码",
  30830. trigger: ["blur", "change"]
  30831. }, {
  30832. min: 6,
  30833. message: "密码长度不能小于6位",
  30834. trigger: ["blur", "change"]
  30835. }, {
  30836. validator: (rule, value2, callback) => {
  30837. if (value2 === formData.oldPassword) {
  30838. callback(new Error("新密码不能与原密码相同"));
  30839. } else {
  30840. callback();
  30841. }
  30842. },
  30843. trigger: ["blur", "change"]
  30844. }],
  30845. confirmPassword: [{
  30846. required: true,
  30847. message: "请再次输入新密码",
  30848. trigger: ["blur", "change"]
  30849. }, {
  30850. validator: (rule, value2, callback) => {
  30851. if (value2 !== formData.newPassword) {
  30852. callback(new Error("两次输入的密码不一致"));
  30853. } else {
  30854. callback();
  30855. }
  30856. },
  30857. trigger: ["blur", "change"]
  30858. }]
  30859. };
  30860. function submitForm() {
  30861. if (!formRef.value)
  30862. return;
  30863. formRef.value.validate().then((valid) => {
  30864. if (valid) {
  30865. loading.value = true;
  30866. uni.$u.http.post("/app/appUser/updatePwd", formData).then((res2) => {
  30867. if (res2.code == 200) {
  30868. uni.showModal({
  30869. title: "提示",
  30870. content: "密码修改成功,是否确定要退出重新登录?",
  30871. success: (res3) => {
  30872. if (res3.confirm) {
  30873. uni.clearStorageSync();
  30874. uni.reLaunch({
  30875. url: "/pages/login/login"
  30876. });
  30877. } else {
  30878. uni.navigateBack({
  30879. delta: 1
  30880. });
  30881. }
  30882. }
  30883. });
  30884. }
  30885. }).finally(() => {
  30886. loading.value = false;
  30887. });
  30888. }
  30889. });
  30890. }
  30891. function resetForm() {
  30892. if (!formRef.value)
  30893. return;
  30894. formRef.value.resetFields();
  30895. }
  30896. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  30897. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30898. return __returned__;
  30899. }
  30900. };
  30901. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  30902. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  30903. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  30904. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  30905. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30906. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  30907. vue.createVNode(_component_u_form, {
  30908. model: $setup.formData,
  30909. rules: $setup.rules,
  30910. ref: "formRef",
  30911. labelPosition: "top",
  30912. borderBottom: true,
  30913. labelWidth: "300px",
  30914. "error-type": "toast"
  30915. }, {
  30916. default: vue.withCtx(() => [
  30917. vue.createVNode(_component_u_form_item, {
  30918. label: "原密码",
  30919. prop: "oldPassword",
  30920. borderBottom: ""
  30921. }, {
  30922. default: vue.withCtx(() => [
  30923. vue.createVNode(_component_u_input, {
  30924. modelValue: $setup.formData.oldPassword,
  30925. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.oldPassword = $event),
  30926. type: "password",
  30927. placeholder: "请输入原密码",
  30928. border: false
  30929. }, null, 8, ["modelValue"])
  30930. ]),
  30931. _: 1
  30932. /* STABLE */
  30933. }),
  30934. vue.createVNode(_component_u_form_item, {
  30935. label: "新密码",
  30936. prop: "newPassword",
  30937. borderBottom: ""
  30938. }, {
  30939. default: vue.withCtx(() => [
  30940. vue.createVNode(_component_u_input, {
  30941. modelValue: $setup.formData.newPassword,
  30942. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.newPassword = $event),
  30943. type: "password",
  30944. placeholder: "请输入新密码",
  30945. border: false
  30946. }, null, 8, ["modelValue"])
  30947. ]),
  30948. _: 1
  30949. /* STABLE */
  30950. }),
  30951. vue.createVNode(_component_u_form_item, {
  30952. label: "确认新密码",
  30953. prop: "confirmPassword",
  30954. borderBottom: ""
  30955. }, {
  30956. default: vue.withCtx(() => [
  30957. vue.createVNode(_component_u_input, {
  30958. modelValue: $setup.formData.confirmPassword,
  30959. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.confirmPassword = $event),
  30960. type: "password",
  30961. placeholder: "请再次输入新密码",
  30962. border: false
  30963. }, null, 8, ["modelValue"])
  30964. ]),
  30965. _: 1
  30966. /* STABLE */
  30967. })
  30968. ]),
  30969. _: 1
  30970. /* STABLE */
  30971. }, 8, ["model"]),
  30972. vue.createElementVNode("view", { class: "submit-btn" }, [
  30973. vue.createVNode(_component_u_button, {
  30974. type: "primary",
  30975. text: "修改密码",
  30976. onClick: $setup.submitForm,
  30977. loading: $setup.loading
  30978. }, null, 8, ["loading"])
  30979. ])
  30980. ]);
  30981. }
  30982. const PagesMyPagePassword = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-b88a898e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/password.vue"]]);
  30983. const _sfc_main$7 = {};
  30984. function _sfc_render$6(_ctx, _cache) {
  30985. return vue.openBlock(), vue.createElementBlock("view");
  30986. }
  30987. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-review.vue"]]);
  30988. const _sfc_main$6 = {};
  30989. function _sfc_render$5(_ctx, _cache) {
  30990. return vue.openBlock(), vue.createElementBlock("view");
  30991. }
  30992. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-pick.vue"]]);
  30993. const _sfc_main$5 = {};
  30994. function _sfc_render$4(_ctx, _cache) {
  30995. return vue.openBlock(), vue.createElementBlock("view");
  30996. }
  30997. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-sign.vue"]]);
  30998. const _sfc_main$4 = {};
  30999. function _sfc_render$3(_ctx, _cache) {
  31000. return vue.openBlock(), vue.createElementBlock("view");
  31001. }
  31002. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-confirm.vue"]]);
  31003. const _sfc_main$3 = {};
  31004. function _sfc_render$2(_ctx, _cache) {
  31005. return vue.openBlock(), vue.createElementBlock("view");
  31006. }
  31007. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-audit.vue"]]);
  31008. const _sfc_main$2 = {};
  31009. function _sfc_render$1(_ctx, _cache) {
  31010. return vue.openBlock(), vue.createElementBlock("view");
  31011. }
  31012. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-payment.vue"]]);
  31013. const _sfc_main$1 = {};
  31014. function _sfc_render(_ctx, _cache) {
  31015. return vue.openBlock(), vue.createElementBlock("view");
  31016. }
  31017. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/receive-stat.vue"]]);
  31018. __definePage("pages/login/login", PagesLoginLogin);
  31019. __definePage("pages/index/index", PagesIndexIndex);
  31020. __definePage("pages/my/my", PagesMyMy);
  31021. __definePage("pages/order/index", PagesOrderIndex);
  31022. __definePage("pages/book/index", PagesBookIndex);
  31023. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  31024. __definePage("pages/index/express/scan", PagesIndexExpressScan);
  31025. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  31026. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  31027. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  31028. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  31029. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  31030. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  31031. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  31032. __definePage("pages/index/audit/isbn-order", PagesIndexAuditIsbnOrder);
  31033. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  31034. __definePage("pages/index/detail/index", PagesIndexDetailIndex);
  31035. __definePage("pages/index/detail/book-audit", PagesIndexDetailBookAudit);
  31036. __definePage("pages/index/detail/batch-audit", PagesIndexDetailBatchAudit);
  31037. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  31038. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  31039. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  31040. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  31041. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  31042. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  31043. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  31044. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  31045. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  31046. __definePage("pages/index/wms/bad-out-order", PagesIndexWmsBadOutOrder);
  31047. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  31048. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  31049. __definePage("pages/index/wms/order-query-list", PagesIndexWmsOrderQueryList);
  31050. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  31051. __definePage("pages/index/wms/location-order-list", PagesIndexWmsLocationOrderList);
  31052. __definePage("pages/index/wms/location-select", PagesIndexWmsLocationSelect);
  31053. __definePage("pages/index/wms/warehouse-select", PagesIndexWmsWarehouseSelect);
  31054. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  31055. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  31056. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  31057. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  31058. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  31059. __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
  31060. __definePage("pages/index/wms/task-detail", PagesIndexWmsTaskDetail);
  31061. __definePage("pages/index/wms/speedy-check-add", PagesIndexWmsSpeedyCheckAdd);
  31062. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  31063. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  31064. __definePage("pages/my/page/school", PagesMyPageSchool);
  31065. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  31066. __definePage("pages/my/page/version", PagesMyPageVersion);
  31067. __definePage("pages/my/page/volume", PagesMyPageVolume);
  31068. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  31069. __definePage("pages/my/page/password", PagesMyPagePassword);
  31070. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  31071. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  31072. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  31073. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  31074. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  31075. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  31076. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  31077. function useInit() {
  31078. var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
  31079. barcodeModel.initScan((ret) => {
  31080. formatAppLog("log", "at utils/useBarcodeModule.js:9", "初始化扫描", ret);
  31081. });
  31082. }
  31083. function useGlobalEvent(onChange) {
  31084. var globalEvent = requireNativePlugin("globalEvent");
  31085. const handler = function(e) {
  31086. onChange && onChange(e);
  31087. };
  31088. globalEvent.removeEventListener("iDataBarcodeEvent", handler);
  31089. globalEvent.addEventListener("iDataBarcodeEvent", handler);
  31090. return () => {
  31091. globalEvent.removeEventListener("iDataBarcodeEvent", handler);
  31092. };
  31093. }
  31094. function useGlobalEventRemove() {
  31095. var globalEvent = requireNativePlugin("globalEvent");
  31096. globalEvent.removeEventListener("iDataBarcodeEvent");
  31097. }
  31098. function useRouteMonitor(onChange) {
  31099. uni.addInterceptor("navigateTo", {
  31100. invoke(e) {
  31101. var _a;
  31102. const pages2 = getCurrentPages();
  31103. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31104. onChange && onChange(e.url, from);
  31105. formatAppLog("log", "at utils/useRouteMonitor.js:18", "navigateTo", e.url, from);
  31106. return e;
  31107. }
  31108. });
  31109. uni.addInterceptor("redirectTo", {
  31110. invoke(e) {
  31111. var _a;
  31112. const pages2 = getCurrentPages();
  31113. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31114. onChange && onChange(e.url, from);
  31115. formatAppLog("log", "at utils/useRouteMonitor.js:28", "redirectTo", e.url, from);
  31116. return e;
  31117. }
  31118. });
  31119. uni.addInterceptor("reLaunch", {
  31120. invoke(e) {
  31121. var _a;
  31122. const pages2 = getCurrentPages();
  31123. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31124. onChange && onChange(e.url, from);
  31125. formatAppLog("log", "at utils/useRouteMonitor.js:38", "reLaunch", e.url, from);
  31126. return e;
  31127. }
  31128. });
  31129. uni.addInterceptor("switchTab", {
  31130. invoke(e) {
  31131. var _a;
  31132. const pages2 = getCurrentPages();
  31133. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31134. onChange && onChange(e.url, from);
  31135. formatAppLog("log", "at utils/useRouteMonitor.js:48", "switchTab", e.url, from);
  31136. return e;
  31137. }
  31138. });
  31139. }
  31140. var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  31141. var howler = {};
  31142. (function(exports) {
  31143. (function() {
  31144. var HowlerGlobal2 = function() {
  31145. this.init();
  31146. };
  31147. HowlerGlobal2.prototype = {
  31148. /**
  31149. * Initialize the global Howler object.
  31150. * @return {Howler}
  31151. */
  31152. init: function() {
  31153. var self2 = this || Howler2;
  31154. self2._counter = 1e3;
  31155. self2._html5AudioPool = [];
  31156. self2.html5PoolSize = 10;
  31157. self2._codecs = {};
  31158. self2._howls = [];
  31159. self2._muted = false;
  31160. self2._volume = 1;
  31161. self2._canPlayEvent = "canplaythrough";
  31162. self2._navigator = typeof window !== "undefined" && window.navigator ? window.navigator : null;
  31163. self2.masterGain = null;
  31164. self2.noAudio = false;
  31165. self2.usingWebAudio = true;
  31166. self2.autoSuspend = true;
  31167. self2.ctx = null;
  31168. self2.autoUnlock = true;
  31169. self2._setup();
  31170. return self2;
  31171. },
  31172. /**
  31173. * Get/set the global volume for all sounds.
  31174. * @param {Float} vol Volume from 0.0 to 1.0.
  31175. * @return {Howler/Float} Returns self or current volume.
  31176. */
  31177. volume: function(vol) {
  31178. var self2 = this || Howler2;
  31179. vol = parseFloat(vol);
  31180. if (!self2.ctx) {
  31181. setupAudioContext();
  31182. }
  31183. if (typeof vol !== "undefined" && vol >= 0 && vol <= 1) {
  31184. self2._volume = vol;
  31185. if (self2._muted) {
  31186. return self2;
  31187. }
  31188. if (self2.usingWebAudio) {
  31189. self2.masterGain.gain.setValueAtTime(vol, Howler2.ctx.currentTime);
  31190. }
  31191. for (var i = 0; i < self2._howls.length; i++) {
  31192. if (!self2._howls[i]._webAudio) {
  31193. var ids = self2._howls[i]._getSoundIds();
  31194. for (var j = 0; j < ids.length; j++) {
  31195. var sound = self2._howls[i]._soundById(ids[j]);
  31196. if (sound && sound._node) {
  31197. sound._node.volume = sound._volume * vol;
  31198. }
  31199. }
  31200. }
  31201. }
  31202. return self2;
  31203. }
  31204. return self2._volume;
  31205. },
  31206. /**
  31207. * Handle muting and unmuting globally.
  31208. * @param {Boolean} muted Is muted or not.
  31209. */
  31210. mute: function(muted) {
  31211. var self2 = this || Howler2;
  31212. if (!self2.ctx) {
  31213. setupAudioContext();
  31214. }
  31215. self2._muted = muted;
  31216. if (self2.usingWebAudio) {
  31217. self2.masterGain.gain.setValueAtTime(muted ? 0 : self2._volume, Howler2.ctx.currentTime);
  31218. }
  31219. for (var i = 0; i < self2._howls.length; i++) {
  31220. if (!self2._howls[i]._webAudio) {
  31221. var ids = self2._howls[i]._getSoundIds();
  31222. for (var j = 0; j < ids.length; j++) {
  31223. var sound = self2._howls[i]._soundById(ids[j]);
  31224. if (sound && sound._node) {
  31225. sound._node.muted = muted ? true : sound._muted;
  31226. }
  31227. }
  31228. }
  31229. }
  31230. return self2;
  31231. },
  31232. /**
  31233. * Handle stopping all sounds globally.
  31234. */
  31235. stop: function() {
  31236. var self2 = this || Howler2;
  31237. for (var i = 0; i < self2._howls.length; i++) {
  31238. self2._howls[i].stop();
  31239. }
  31240. return self2;
  31241. },
  31242. /**
  31243. * Unload and destroy all currently loaded Howl objects.
  31244. * @return {Howler}
  31245. */
  31246. unload: function() {
  31247. var self2 = this || Howler2;
  31248. for (var i = self2._howls.length - 1; i >= 0; i--) {
  31249. self2._howls[i].unload();
  31250. }
  31251. if (self2.usingWebAudio && self2.ctx && typeof self2.ctx.close !== "undefined") {
  31252. self2.ctx.close();
  31253. self2.ctx = null;
  31254. setupAudioContext();
  31255. }
  31256. return self2;
  31257. },
  31258. /**
  31259. * Check for codec support of specific extension.
  31260. * @param {String} ext Audio file extention.
  31261. * @return {Boolean}
  31262. */
  31263. codecs: function(ext) {
  31264. return (this || Howler2)._codecs[ext.replace(/^x-/, "")];
  31265. },
  31266. /**
  31267. * Setup various state values for global tracking.
  31268. * @return {Howler}
  31269. */
  31270. _setup: function() {
  31271. var self2 = this || Howler2;
  31272. self2.state = self2.ctx ? self2.ctx.state || "suspended" : "suspended";
  31273. self2._autoSuspend();
  31274. if (!self2.usingWebAudio) {
  31275. if (typeof Audio !== "undefined") {
  31276. try {
  31277. var test2 = new Audio();
  31278. if (typeof test2.oncanplaythrough === "undefined") {
  31279. self2._canPlayEvent = "canplay";
  31280. }
  31281. } catch (e) {
  31282. self2.noAudio = true;
  31283. }
  31284. } else {
  31285. self2.noAudio = true;
  31286. }
  31287. }
  31288. try {
  31289. var test2 = new Audio();
  31290. if (test2.muted) {
  31291. self2.noAudio = true;
  31292. }
  31293. } catch (e) {
  31294. }
  31295. if (!self2.noAudio) {
  31296. self2._setupCodecs();
  31297. }
  31298. return self2;
  31299. },
  31300. /**
  31301. * Check for browser support for various codecs and cache the results.
  31302. * @return {Howler}
  31303. */
  31304. _setupCodecs: function() {
  31305. var self2 = this || Howler2;
  31306. var audioTest = null;
  31307. try {
  31308. audioTest = typeof Audio !== "undefined" ? new Audio() : null;
  31309. } catch (err) {
  31310. return self2;
  31311. }
  31312. if (!audioTest || typeof audioTest.canPlayType !== "function") {
  31313. return self2;
  31314. }
  31315. var mpegTest = audioTest.canPlayType("audio/mpeg;").replace(/^no$/, "");
  31316. var ua = self2._navigator ? self2._navigator.userAgent : "";
  31317. var checkOpera = ua.match(/OPR\/(\d+)/g);
  31318. var isOldOpera = checkOpera && parseInt(checkOpera[0].split("/")[1], 10) < 33;
  31319. var checkSafari = ua.indexOf("Safari") !== -1 && ua.indexOf("Chrome") === -1;
  31320. var safariVersion = ua.match(/Version\/(.*?) /);
  31321. var isOldSafari = checkSafari && safariVersion && parseInt(safariVersion[1], 10) < 15;
  31322. self2._codecs = {
  31323. mp3: !!(!isOldOpera && (mpegTest || audioTest.canPlayType("audio/mp3;").replace(/^no$/, ""))),
  31324. mpeg: !!mpegTest,
  31325. opus: !!audioTest.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""),
  31326. ogg: !!audioTest.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
  31327. oga: !!audioTest.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
  31328. wav: !!(audioTest.canPlayType('audio/wav; codecs="1"') || audioTest.canPlayType("audio/wav")).replace(/^no$/, ""),
  31329. aac: !!audioTest.canPlayType("audio/aac;").replace(/^no$/, ""),
  31330. caf: !!audioTest.canPlayType("audio/x-caf;").replace(/^no$/, ""),
  31331. m4a: !!(audioTest.canPlayType("audio/x-m4a;") || audioTest.canPlayType("audio/m4a;") || audioTest.canPlayType("audio/aac;")).replace(/^no$/, ""),
  31332. m4b: !!(audioTest.canPlayType("audio/x-m4b;") || audioTest.canPlayType("audio/m4b;") || audioTest.canPlayType("audio/aac;")).replace(/^no$/, ""),
  31333. mp4: !!(audioTest.canPlayType("audio/x-mp4;") || audioTest.canPlayType("audio/mp4;") || audioTest.canPlayType("audio/aac;")).replace(/^no$/, ""),
  31334. weba: !!(!isOldSafari && audioTest.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")),
  31335. webm: !!(!isOldSafari && audioTest.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")),
  31336. dolby: !!audioTest.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ""),
  31337. flac: !!(audioTest.canPlayType("audio/x-flac;") || audioTest.canPlayType("audio/flac;")).replace(/^no$/, "")
  31338. };
  31339. return self2;
  31340. },
  31341. /**
  31342. * Some browsers/devices will only allow audio to be played after a user interaction.
  31343. * Attempt to automatically unlock audio on the first user interaction.
  31344. * Concept from: http://paulbakaus.com/tutorials/html5/web-audio-on-ios/
  31345. * @return {Howler}
  31346. */
  31347. _unlockAudio: function() {
  31348. var self2 = this || Howler2;
  31349. if (self2._audioUnlocked || !self2.ctx) {
  31350. return;
  31351. }
  31352. self2._audioUnlocked = false;
  31353. self2.autoUnlock = false;
  31354. if (!self2._mobileUnloaded && self2.ctx.sampleRate !== 44100) {
  31355. self2._mobileUnloaded = true;
  31356. self2.unload();
  31357. }
  31358. self2._scratchBuffer = self2.ctx.createBuffer(1, 1, 22050);
  31359. var unlock = function(e) {
  31360. while (self2._html5AudioPool.length < self2.html5PoolSize) {
  31361. try {
  31362. var audioNode = new Audio();
  31363. audioNode._unlocked = true;
  31364. self2._releaseHtml5Audio(audioNode);
  31365. } catch (e2) {
  31366. self2.noAudio = true;
  31367. break;
  31368. }
  31369. }
  31370. for (var i = 0; i < self2._howls.length; i++) {
  31371. if (!self2._howls[i]._webAudio) {
  31372. var ids = self2._howls[i]._getSoundIds();
  31373. for (var j = 0; j < ids.length; j++) {
  31374. var sound = self2._howls[i]._soundById(ids[j]);
  31375. if (sound && sound._node && !sound._node._unlocked) {
  31376. sound._node._unlocked = true;
  31377. sound._node.load();
  31378. }
  31379. }
  31380. }
  31381. }
  31382. self2._autoResume();
  31383. var source = self2.ctx.createBufferSource();
  31384. source.buffer = self2._scratchBuffer;
  31385. source.connect(self2.ctx.destination);
  31386. if (typeof source.start === "undefined") {
  31387. source.noteOn(0);
  31388. } else {
  31389. source.start(0);
  31390. }
  31391. if (typeof self2.ctx.resume === "function") {
  31392. self2.ctx.resume();
  31393. }
  31394. source.onended = function() {
  31395. source.disconnect(0);
  31396. self2._audioUnlocked = true;
  31397. document.removeEventListener("touchstart", unlock, true);
  31398. document.removeEventListener("touchend", unlock, true);
  31399. document.removeEventListener("click", unlock, true);
  31400. document.removeEventListener("keydown", unlock, true);
  31401. for (var i2 = 0; i2 < self2._howls.length; i2++) {
  31402. self2._howls[i2]._emit("unlock");
  31403. }
  31404. };
  31405. };
  31406. document.addEventListener("touchstart", unlock, true);
  31407. document.addEventListener("touchend", unlock, true);
  31408. document.addEventListener("click", unlock, true);
  31409. document.addEventListener("keydown", unlock, true);
  31410. return self2;
  31411. },
  31412. /**
  31413. * Get an unlocked HTML5 Audio object from the pool. If none are left,
  31414. * return a new Audio object and throw a warning.
  31415. * @return {Audio} HTML5 Audio object.
  31416. */
  31417. _obtainHtml5Audio: function() {
  31418. var self2 = this || Howler2;
  31419. if (self2._html5AudioPool.length) {
  31420. return self2._html5AudioPool.pop();
  31421. }
  31422. var testPlay = new Audio().play();
  31423. if (testPlay && typeof Promise !== "undefined" && (testPlay instanceof Promise || typeof testPlay.then === "function")) {
  31424. testPlay.catch(function() {
  31425. formatAppLog("warn", "at node_modules/howler/dist/howler.js:434", "HTML5 Audio pool exhausted, returning potentially locked audio object.");
  31426. });
  31427. }
  31428. return new Audio();
  31429. },
  31430. /**
  31431. * Return an activated HTML5 Audio object to the pool.
  31432. * @return {Howler}
  31433. */
  31434. _releaseHtml5Audio: function(audio) {
  31435. var self2 = this || Howler2;
  31436. if (audio._unlocked) {
  31437. self2._html5AudioPool.push(audio);
  31438. }
  31439. return self2;
  31440. },
  31441. /**
  31442. * Automatically suspend the Web Audio AudioContext after no sound has played for 30 seconds.
  31443. * This saves processing/energy and fixes various browser-specific bugs with audio getting stuck.
  31444. * @return {Howler}
  31445. */
  31446. _autoSuspend: function() {
  31447. var self2 = this;
  31448. if (!self2.autoSuspend || !self2.ctx || typeof self2.ctx.suspend === "undefined" || !Howler2.usingWebAudio) {
  31449. return;
  31450. }
  31451. for (var i = 0; i < self2._howls.length; i++) {
  31452. if (self2._howls[i]._webAudio) {
  31453. for (var j = 0; j < self2._howls[i]._sounds.length; j++) {
  31454. if (!self2._howls[i]._sounds[j]._paused) {
  31455. return self2;
  31456. }
  31457. }
  31458. }
  31459. }
  31460. if (self2._suspendTimer) {
  31461. clearTimeout(self2._suspendTimer);
  31462. }
  31463. self2._suspendTimer = setTimeout(function() {
  31464. if (!self2.autoSuspend) {
  31465. return;
  31466. }
  31467. self2._suspendTimer = null;
  31468. self2.state = "suspending";
  31469. var handleSuspension = function() {
  31470. self2.state = "suspended";
  31471. if (self2._resumeAfterSuspend) {
  31472. delete self2._resumeAfterSuspend;
  31473. self2._autoResume();
  31474. }
  31475. };
  31476. self2.ctx.suspend().then(handleSuspension, handleSuspension);
  31477. }, 3e4);
  31478. return self2;
  31479. },
  31480. /**
  31481. * Automatically resume the Web Audio AudioContext when a new sound is played.
  31482. * @return {Howler}
  31483. */
  31484. _autoResume: function() {
  31485. var self2 = this;
  31486. if (!self2.ctx || typeof self2.ctx.resume === "undefined" || !Howler2.usingWebAudio) {
  31487. return;
  31488. }
  31489. if (self2.state === "running" && self2.ctx.state !== "interrupted" && self2._suspendTimer) {
  31490. clearTimeout(self2._suspendTimer);
  31491. self2._suspendTimer = null;
  31492. } else if (self2.state === "suspended" || self2.state === "running" && self2.ctx.state === "interrupted") {
  31493. self2.ctx.resume().then(function() {
  31494. self2.state = "running";
  31495. for (var i = 0; i < self2._howls.length; i++) {
  31496. self2._howls[i]._emit("resume");
  31497. }
  31498. });
  31499. if (self2._suspendTimer) {
  31500. clearTimeout(self2._suspendTimer);
  31501. self2._suspendTimer = null;
  31502. }
  31503. } else if (self2.state === "suspending") {
  31504. self2._resumeAfterSuspend = true;
  31505. }
  31506. return self2;
  31507. }
  31508. };
  31509. var Howler2 = new HowlerGlobal2();
  31510. var Howl2 = function(o) {
  31511. var self2 = this;
  31512. if (!o.src || o.src.length === 0) {
  31513. formatAppLog("error", "at node_modules/howler/dist/howler.js:561", "An array of source files must be passed with any new Howl.");
  31514. return;
  31515. }
  31516. self2.init(o);
  31517. };
  31518. Howl2.prototype = {
  31519. /**
  31520. * Initialize a new Howl group object.
  31521. * @param {Object} o Passed in properties for this group.
  31522. * @return {Howl}
  31523. */
  31524. init: function(o) {
  31525. var self2 = this;
  31526. if (!Howler2.ctx) {
  31527. setupAudioContext();
  31528. }
  31529. self2._autoplay = o.autoplay || false;
  31530. self2._format = typeof o.format !== "string" ? o.format : [o.format];
  31531. self2._html5 = o.html5 || false;
  31532. self2._muted = o.mute || false;
  31533. self2._loop = o.loop || false;
  31534. self2._pool = o.pool || 5;
  31535. self2._preload = typeof o.preload === "boolean" || o.preload === "metadata" ? o.preload : true;
  31536. self2._rate = o.rate || 1;
  31537. self2._sprite = o.sprite || {};
  31538. self2._src = typeof o.src !== "string" ? o.src : [o.src];
  31539. self2._volume = o.volume !== void 0 ? o.volume : 1;
  31540. self2._xhr = {
  31541. method: o.xhr && o.xhr.method ? o.xhr.method : "GET",
  31542. headers: o.xhr && o.xhr.headers ? o.xhr.headers : null,
  31543. withCredentials: o.xhr && o.xhr.withCredentials ? o.xhr.withCredentials : false
  31544. };
  31545. self2._duration = 0;
  31546. self2._state = "unloaded";
  31547. self2._sounds = [];
  31548. self2._endTimers = {};
  31549. self2._queue = [];
  31550. self2._playLock = false;
  31551. self2._onend = o.onend ? [{ fn: o.onend }] : [];
  31552. self2._onfade = o.onfade ? [{ fn: o.onfade }] : [];
  31553. self2._onload = o.onload ? [{ fn: o.onload }] : [];
  31554. self2._onloaderror = o.onloaderror ? [{ fn: o.onloaderror }] : [];
  31555. self2._onplayerror = o.onplayerror ? [{ fn: o.onplayerror }] : [];
  31556. self2._onpause = o.onpause ? [{ fn: o.onpause }] : [];
  31557. self2._onplay = o.onplay ? [{ fn: o.onplay }] : [];
  31558. self2._onstop = o.onstop ? [{ fn: o.onstop }] : [];
  31559. self2._onmute = o.onmute ? [{ fn: o.onmute }] : [];
  31560. self2._onvolume = o.onvolume ? [{ fn: o.onvolume }] : [];
  31561. self2._onrate = o.onrate ? [{ fn: o.onrate }] : [];
  31562. self2._onseek = o.onseek ? [{ fn: o.onseek }] : [];
  31563. self2._onunlock = o.onunlock ? [{ fn: o.onunlock }] : [];
  31564. self2._onresume = [];
  31565. self2._webAudio = Howler2.usingWebAudio && !self2._html5;
  31566. if (typeof Howler2.ctx !== "undefined" && Howler2.ctx && Howler2.autoUnlock) {
  31567. Howler2._unlockAudio();
  31568. }
  31569. Howler2._howls.push(self2);
  31570. if (self2._autoplay) {
  31571. self2._queue.push({
  31572. event: "play",
  31573. action: function() {
  31574. self2.play();
  31575. }
  31576. });
  31577. }
  31578. if (self2._preload && self2._preload !== "none") {
  31579. self2.load();
  31580. }
  31581. return self2;
  31582. },
  31583. /**
  31584. * Load the audio file.
  31585. * @return {Howler}
  31586. */
  31587. load: function() {
  31588. var self2 = this;
  31589. var url2 = null;
  31590. if (Howler2.noAudio) {
  31591. self2._emit("loaderror", null, "No audio support.");
  31592. return;
  31593. }
  31594. if (typeof self2._src === "string") {
  31595. self2._src = [self2._src];
  31596. }
  31597. for (var i = 0; i < self2._src.length; i++) {
  31598. var ext, str;
  31599. if (self2._format && self2._format[i]) {
  31600. ext = self2._format[i];
  31601. } else {
  31602. str = self2._src[i];
  31603. if (typeof str !== "string") {
  31604. self2._emit("loaderror", null, "Non-string found in selected audio sources - ignoring.");
  31605. continue;
  31606. }
  31607. ext = /^data:audio\/([^;,]+);/i.exec(str);
  31608. if (!ext) {
  31609. ext = /\.([^.]+)$/.exec(str.split("?", 1)[0]);
  31610. }
  31611. if (ext) {
  31612. ext = ext[1].toLowerCase();
  31613. }
  31614. }
  31615. if (!ext) {
  31616. formatAppLog("warn", "at node_modules/howler/dist/howler.js:699", 'No file extension was found. Consider using the "format" property or specify an extension.');
  31617. }
  31618. if (ext && Howler2.codecs(ext)) {
  31619. url2 = self2._src[i];
  31620. break;
  31621. }
  31622. }
  31623. if (!url2) {
  31624. self2._emit("loaderror", null, "No codec support for selected audio sources.");
  31625. return;
  31626. }
  31627. self2._src = url2;
  31628. self2._state = "loading";
  31629. if (window.location.protocol === "https:" && url2.slice(0, 5) === "http:") {
  31630. self2._html5 = true;
  31631. self2._webAudio = false;
  31632. }
  31633. new Sound2(self2);
  31634. if (self2._webAudio) {
  31635. loadBuffer(self2);
  31636. }
  31637. return self2;
  31638. },
  31639. /**
  31640. * Play a sound or resume previous playback.
  31641. * @param {String/Number} sprite Sprite name for sprite playback or sound id to continue previous.
  31642. * @param {Boolean} internal Internal Use: true prevents event firing.
  31643. * @return {Number} Sound ID.
  31644. */
  31645. play: function(sprite, internal) {
  31646. var self2 = this;
  31647. var id = null;
  31648. if (typeof sprite === "number") {
  31649. id = sprite;
  31650. sprite = null;
  31651. } else if (typeof sprite === "string" && self2._state === "loaded" && !self2._sprite[sprite]) {
  31652. return null;
  31653. } else if (typeof sprite === "undefined") {
  31654. sprite = "__default";
  31655. if (!self2._playLock) {
  31656. var num = 0;
  31657. for (var i = 0; i < self2._sounds.length; i++) {
  31658. if (self2._sounds[i]._paused && !self2._sounds[i]._ended) {
  31659. num++;
  31660. id = self2._sounds[i]._id;
  31661. }
  31662. }
  31663. if (num === 1) {
  31664. sprite = null;
  31665. } else {
  31666. id = null;
  31667. }
  31668. }
  31669. }
  31670. var sound = id ? self2._soundById(id) : self2._inactiveSound();
  31671. if (!sound) {
  31672. return null;
  31673. }
  31674. if (id && !sprite) {
  31675. sprite = sound._sprite || "__default";
  31676. }
  31677. if (self2._state !== "loaded") {
  31678. sound._sprite = sprite;
  31679. sound._ended = false;
  31680. var soundId = sound._id;
  31681. self2._queue.push({
  31682. event: "play",
  31683. action: function() {
  31684. self2.play(soundId);
  31685. }
  31686. });
  31687. return soundId;
  31688. }
  31689. if (id && !sound._paused) {
  31690. if (!internal) {
  31691. self2._loadQueue("play");
  31692. }
  31693. return sound._id;
  31694. }
  31695. if (self2._webAudio) {
  31696. Howler2._autoResume();
  31697. }
  31698. var seek = Math.max(0, sound._seek > 0 ? sound._seek : self2._sprite[sprite][0] / 1e3);
  31699. var duration = Math.max(0, (self2._sprite[sprite][0] + self2._sprite[sprite][1]) / 1e3 - seek);
  31700. var timeout2 = duration * 1e3 / Math.abs(sound._rate);
  31701. var start = self2._sprite[sprite][0] / 1e3;
  31702. var stop = (self2._sprite[sprite][0] + self2._sprite[sprite][1]) / 1e3;
  31703. sound._sprite = sprite;
  31704. sound._ended = false;
  31705. var setParams = function() {
  31706. sound._paused = false;
  31707. sound._seek = seek;
  31708. sound._start = start;
  31709. sound._stop = stop;
  31710. sound._loop = !!(sound._loop || self2._sprite[sprite][2]);
  31711. };
  31712. if (seek >= stop) {
  31713. self2._ended(sound);
  31714. return;
  31715. }
  31716. var node = sound._node;
  31717. if (self2._webAudio) {
  31718. var playWebAudio = function() {
  31719. self2._playLock = false;
  31720. setParams();
  31721. self2._refreshBuffer(sound);
  31722. var vol = sound._muted || self2._muted ? 0 : sound._volume;
  31723. node.gain.setValueAtTime(vol, Howler2.ctx.currentTime);
  31724. sound._playStart = Howler2.ctx.currentTime;
  31725. if (typeof node.bufferSource.start === "undefined") {
  31726. sound._loop ? node.bufferSource.noteGrainOn(0, seek, 86400) : node.bufferSource.noteGrainOn(0, seek, duration);
  31727. } else {
  31728. sound._loop ? node.bufferSource.start(0, seek, 86400) : node.bufferSource.start(0, seek, duration);
  31729. }
  31730. if (timeout2 !== Infinity) {
  31731. self2._endTimers[sound._id] = setTimeout(self2._ended.bind(self2, sound), timeout2);
  31732. }
  31733. if (!internal) {
  31734. setTimeout(function() {
  31735. self2._emit("play", sound._id);
  31736. self2._loadQueue();
  31737. }, 0);
  31738. }
  31739. };
  31740. if (Howler2.state === "running" && Howler2.ctx.state !== "interrupted") {
  31741. playWebAudio();
  31742. } else {
  31743. self2._playLock = true;
  31744. self2.once("resume", playWebAudio);
  31745. self2._clearTimer(sound._id);
  31746. }
  31747. } else {
  31748. var playHtml5 = function() {
  31749. node.currentTime = seek;
  31750. node.muted = sound._muted || self2._muted || Howler2._muted || node.muted;
  31751. node.volume = sound._volume * Howler2.volume();
  31752. node.playbackRate = sound._rate;
  31753. try {
  31754. var play = node.play();
  31755. if (play && typeof Promise !== "undefined" && (play instanceof Promise || typeof play.then === "function")) {
  31756. self2._playLock = true;
  31757. setParams();
  31758. play.then(function() {
  31759. self2._playLock = false;
  31760. node._unlocked = true;
  31761. if (!internal) {
  31762. self2._emit("play", sound._id);
  31763. } else {
  31764. self2._loadQueue();
  31765. }
  31766. }).catch(function() {
  31767. self2._playLock = false;
  31768. self2._emit("playerror", sound._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
  31769. sound._ended = true;
  31770. sound._paused = true;
  31771. });
  31772. } else if (!internal) {
  31773. self2._playLock = false;
  31774. setParams();
  31775. self2._emit("play", sound._id);
  31776. }
  31777. node.playbackRate = sound._rate;
  31778. if (node.paused) {
  31779. self2._emit("playerror", sound._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
  31780. return;
  31781. }
  31782. if (sprite !== "__default" || sound._loop) {
  31783. self2._endTimers[sound._id] = setTimeout(self2._ended.bind(self2, sound), timeout2);
  31784. } else {
  31785. self2._endTimers[sound._id] = function() {
  31786. self2._ended(sound);
  31787. node.removeEventListener("ended", self2._endTimers[sound._id], false);
  31788. };
  31789. node.addEventListener("ended", self2._endTimers[sound._id], false);
  31790. }
  31791. } catch (err) {
  31792. self2._emit("playerror", sound._id, err);
  31793. }
  31794. };
  31795. if (node.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA") {
  31796. node.src = self2._src;
  31797. node.load();
  31798. }
  31799. var loadedNoReadyState = window && window.ejecta || !node.readyState && Howler2._navigator.isCocoonJS;
  31800. if (node.readyState >= 3 || loadedNoReadyState) {
  31801. playHtml5();
  31802. } else {
  31803. self2._playLock = true;
  31804. self2._state = "loading";
  31805. var listener = function() {
  31806. self2._state = "loaded";
  31807. playHtml5();
  31808. node.removeEventListener(Howler2._canPlayEvent, listener, false);
  31809. };
  31810. node.addEventListener(Howler2._canPlayEvent, listener, false);
  31811. self2._clearTimer(sound._id);
  31812. }
  31813. }
  31814. return sound._id;
  31815. },
  31816. /**
  31817. * Pause playback and save current position.
  31818. * @param {Number} id The sound ID (empty to pause all in group).
  31819. * @return {Howl}
  31820. */
  31821. pause: function(id) {
  31822. var self2 = this;
  31823. if (self2._state !== "loaded" || self2._playLock) {
  31824. self2._queue.push({
  31825. event: "pause",
  31826. action: function() {
  31827. self2.pause(id);
  31828. }
  31829. });
  31830. return self2;
  31831. }
  31832. var ids = self2._getSoundIds(id);
  31833. for (var i = 0; i < ids.length; i++) {
  31834. self2._clearTimer(ids[i]);
  31835. var sound = self2._soundById(ids[i]);
  31836. if (sound && !sound._paused) {
  31837. sound._seek = self2.seek(ids[i]);
  31838. sound._rateSeek = 0;
  31839. sound._paused = true;
  31840. self2._stopFade(ids[i]);
  31841. if (sound._node) {
  31842. if (self2._webAudio) {
  31843. if (!sound._node.bufferSource) {
  31844. continue;
  31845. }
  31846. if (typeof sound._node.bufferSource.stop === "undefined") {
  31847. sound._node.bufferSource.noteOff(0);
  31848. } else {
  31849. sound._node.bufferSource.stop(0);
  31850. }
  31851. self2._cleanBuffer(sound._node);
  31852. } else if (!isNaN(sound._node.duration) || sound._node.duration === Infinity) {
  31853. sound._node.pause();
  31854. }
  31855. }
  31856. }
  31857. if (!arguments[1]) {
  31858. self2._emit("pause", sound ? sound._id : null);
  31859. }
  31860. }
  31861. return self2;
  31862. },
  31863. /**
  31864. * Stop playback and reset to start.
  31865. * @param {Number} id The sound ID (empty to stop all in group).
  31866. * @param {Boolean} internal Internal Use: true prevents event firing.
  31867. * @return {Howl}
  31868. */
  31869. stop: function(id, internal) {
  31870. var self2 = this;
  31871. if (self2._state !== "loaded" || self2._playLock) {
  31872. self2._queue.push({
  31873. event: "stop",
  31874. action: function() {
  31875. self2.stop(id);
  31876. }
  31877. });
  31878. return self2;
  31879. }
  31880. var ids = self2._getSoundIds(id);
  31881. for (var i = 0; i < ids.length; i++) {
  31882. self2._clearTimer(ids[i]);
  31883. var sound = self2._soundById(ids[i]);
  31884. if (sound) {
  31885. sound._seek = sound._start || 0;
  31886. sound._rateSeek = 0;
  31887. sound._paused = true;
  31888. sound._ended = true;
  31889. self2._stopFade(ids[i]);
  31890. if (sound._node) {
  31891. if (self2._webAudio) {
  31892. if (sound._node.bufferSource) {
  31893. if (typeof sound._node.bufferSource.stop === "undefined") {
  31894. sound._node.bufferSource.noteOff(0);
  31895. } else {
  31896. sound._node.bufferSource.stop(0);
  31897. }
  31898. self2._cleanBuffer(sound._node);
  31899. }
  31900. } else if (!isNaN(sound._node.duration) || sound._node.duration === Infinity) {
  31901. sound._node.currentTime = sound._start || 0;
  31902. sound._node.pause();
  31903. if (sound._node.duration === Infinity) {
  31904. self2._clearSound(sound._node);
  31905. }
  31906. }
  31907. }
  31908. if (!internal) {
  31909. self2._emit("stop", sound._id);
  31910. }
  31911. }
  31912. }
  31913. return self2;
  31914. },
  31915. /**
  31916. * Mute/unmute a single sound or all sounds in this Howl group.
  31917. * @param {Boolean} muted Set to true to mute and false to unmute.
  31918. * @param {Number} id The sound ID to update (omit to mute/unmute all).
  31919. * @return {Howl}
  31920. */
  31921. mute: function(muted, id) {
  31922. var self2 = this;
  31923. if (self2._state !== "loaded" || self2._playLock) {
  31924. self2._queue.push({
  31925. event: "mute",
  31926. action: function() {
  31927. self2.mute(muted, id);
  31928. }
  31929. });
  31930. return self2;
  31931. }
  31932. if (typeof id === "undefined") {
  31933. if (typeof muted === "boolean") {
  31934. self2._muted = muted;
  31935. } else {
  31936. return self2._muted;
  31937. }
  31938. }
  31939. var ids = self2._getSoundIds(id);
  31940. for (var i = 0; i < ids.length; i++) {
  31941. var sound = self2._soundById(ids[i]);
  31942. if (sound) {
  31943. sound._muted = muted;
  31944. if (sound._interval) {
  31945. self2._stopFade(sound._id);
  31946. }
  31947. if (self2._webAudio && sound._node) {
  31948. sound._node.gain.setValueAtTime(muted ? 0 : sound._volume, Howler2.ctx.currentTime);
  31949. } else if (sound._node) {
  31950. sound._node.muted = Howler2._muted ? true : muted;
  31951. }
  31952. self2._emit("mute", sound._id);
  31953. }
  31954. }
  31955. return self2;
  31956. },
  31957. /**
  31958. * Get/set the volume of this sound or of the Howl group. This method can optionally take 0, 1 or 2 arguments.
  31959. * volume() -> Returns the group's volume value.
  31960. * volume(id) -> Returns the sound id's current volume.
  31961. * volume(vol) -> Sets the volume of all sounds in this Howl group.
  31962. * volume(vol, id) -> Sets the volume of passed sound id.
  31963. * @return {Howl/Number} Returns self or current volume.
  31964. */
  31965. volume: function() {
  31966. var self2 = this;
  31967. var args = arguments;
  31968. var vol, id;
  31969. if (args.length === 0) {
  31970. return self2._volume;
  31971. } else if (args.length === 1 || args.length === 2 && typeof args[1] === "undefined") {
  31972. var ids = self2._getSoundIds();
  31973. var index2 = ids.indexOf(args[0]);
  31974. if (index2 >= 0) {
  31975. id = parseInt(args[0], 10);
  31976. } else {
  31977. vol = parseFloat(args[0]);
  31978. }
  31979. } else if (args.length >= 2) {
  31980. vol = parseFloat(args[0]);
  31981. id = parseInt(args[1], 10);
  31982. }
  31983. var sound;
  31984. if (typeof vol !== "undefined" && vol >= 0 && vol <= 1) {
  31985. if (self2._state !== "loaded" || self2._playLock) {
  31986. self2._queue.push({
  31987. event: "volume",
  31988. action: function() {
  31989. self2.volume.apply(self2, args);
  31990. }
  31991. });
  31992. return self2;
  31993. }
  31994. if (typeof id === "undefined") {
  31995. self2._volume = vol;
  31996. }
  31997. id = self2._getSoundIds(id);
  31998. for (var i = 0; i < id.length; i++) {
  31999. sound = self2._soundById(id[i]);
  32000. if (sound) {
  32001. sound._volume = vol;
  32002. if (!args[2]) {
  32003. self2._stopFade(id[i]);
  32004. }
  32005. if (self2._webAudio && sound._node && !sound._muted) {
  32006. sound._node.gain.setValueAtTime(vol, Howler2.ctx.currentTime);
  32007. } else if (sound._node && !sound._muted) {
  32008. sound._node.volume = vol * Howler2.volume();
  32009. }
  32010. self2._emit("volume", sound._id);
  32011. }
  32012. }
  32013. } else {
  32014. sound = id ? self2._soundById(id) : self2._sounds[0];
  32015. return sound ? sound._volume : 0;
  32016. }
  32017. return self2;
  32018. },
  32019. /**
  32020. * Fade a currently playing sound between two volumes (if no id is passed, all sounds will fade).
  32021. * @param {Number} from The value to fade from (0.0 to 1.0).
  32022. * @param {Number} to The volume to fade to (0.0 to 1.0).
  32023. * @param {Number} len Time in milliseconds to fade.
  32024. * @param {Number} id The sound id (omit to fade all sounds).
  32025. * @return {Howl}
  32026. */
  32027. fade: function(from, to, len, id) {
  32028. var self2 = this;
  32029. if (self2._state !== "loaded" || self2._playLock) {
  32030. self2._queue.push({
  32031. event: "fade",
  32032. action: function() {
  32033. self2.fade(from, to, len, id);
  32034. }
  32035. });
  32036. return self2;
  32037. }
  32038. from = Math.min(Math.max(0, parseFloat(from)), 1);
  32039. to = Math.min(Math.max(0, parseFloat(to)), 1);
  32040. len = parseFloat(len);
  32041. self2.volume(from, id);
  32042. var ids = self2._getSoundIds(id);
  32043. for (var i = 0; i < ids.length; i++) {
  32044. var sound = self2._soundById(ids[i]);
  32045. if (sound) {
  32046. if (!id) {
  32047. self2._stopFade(ids[i]);
  32048. }
  32049. if (self2._webAudio && !sound._muted) {
  32050. var currentTime = Howler2.ctx.currentTime;
  32051. var end = currentTime + len / 1e3;
  32052. sound._volume = from;
  32053. sound._node.gain.setValueAtTime(from, currentTime);
  32054. sound._node.gain.linearRampToValueAtTime(to, end);
  32055. }
  32056. self2._startFadeInterval(sound, from, to, len, ids[i], typeof id === "undefined");
  32057. }
  32058. }
  32059. return self2;
  32060. },
  32061. /**
  32062. * Starts the internal interval to fade a sound.
  32063. * @param {Object} sound Reference to sound to fade.
  32064. * @param {Number} from The value to fade from (0.0 to 1.0).
  32065. * @param {Number} to The volume to fade to (0.0 to 1.0).
  32066. * @param {Number} len Time in milliseconds to fade.
  32067. * @param {Number} id The sound id to fade.
  32068. * @param {Boolean} isGroup If true, set the volume on the group.
  32069. */
  32070. _startFadeInterval: function(sound, from, to, len, id, isGroup) {
  32071. var self2 = this;
  32072. var vol = from;
  32073. var diff = to - from;
  32074. var steps = Math.abs(diff / 0.01);
  32075. var stepLen = Math.max(4, steps > 0 ? len / steps : len);
  32076. var lastTick = Date.now();
  32077. sound._fadeTo = to;
  32078. sound._interval = setInterval(function() {
  32079. var tick = (Date.now() - lastTick) / len;
  32080. lastTick = Date.now();
  32081. vol += diff * tick;
  32082. vol = Math.round(vol * 100) / 100;
  32083. if (diff < 0) {
  32084. vol = Math.max(to, vol);
  32085. } else {
  32086. vol = Math.min(to, vol);
  32087. }
  32088. if (self2._webAudio) {
  32089. sound._volume = vol;
  32090. } else {
  32091. self2.volume(vol, sound._id, true);
  32092. }
  32093. if (isGroup) {
  32094. self2._volume = vol;
  32095. }
  32096. if (to < from && vol <= to || to > from && vol >= to) {
  32097. clearInterval(sound._interval);
  32098. sound._interval = null;
  32099. sound._fadeTo = null;
  32100. self2.volume(to, sound._id);
  32101. self2._emit("fade", sound._id);
  32102. }
  32103. }, stepLen);
  32104. },
  32105. /**
  32106. * Internal method that stops the currently playing fade when
  32107. * a new fade starts, volume is changed or the sound is stopped.
  32108. * @param {Number} id The sound id.
  32109. * @return {Howl}
  32110. */
  32111. _stopFade: function(id) {
  32112. var self2 = this;
  32113. var sound = self2._soundById(id);
  32114. if (sound && sound._interval) {
  32115. if (self2._webAudio) {
  32116. sound._node.gain.cancelScheduledValues(Howler2.ctx.currentTime);
  32117. }
  32118. clearInterval(sound._interval);
  32119. sound._interval = null;
  32120. self2.volume(sound._fadeTo, id);
  32121. sound._fadeTo = null;
  32122. self2._emit("fade", id);
  32123. }
  32124. return self2;
  32125. },
  32126. /**
  32127. * Get/set the loop parameter on a sound. This method can optionally take 0, 1 or 2 arguments.
  32128. * loop() -> Returns the group's loop value.
  32129. * loop(id) -> Returns the sound id's loop value.
  32130. * loop(loop) -> Sets the loop value for all sounds in this Howl group.
  32131. * loop(loop, id) -> Sets the loop value of passed sound id.
  32132. * @return {Howl/Boolean} Returns self or current loop value.
  32133. */
  32134. loop: function() {
  32135. var self2 = this;
  32136. var args = arguments;
  32137. var loop, id, sound;
  32138. if (args.length === 0) {
  32139. return self2._loop;
  32140. } else if (args.length === 1) {
  32141. if (typeof args[0] === "boolean") {
  32142. loop = args[0];
  32143. self2._loop = loop;
  32144. } else {
  32145. sound = self2._soundById(parseInt(args[0], 10));
  32146. return sound ? sound._loop : false;
  32147. }
  32148. } else if (args.length === 2) {
  32149. loop = args[0];
  32150. id = parseInt(args[1], 10);
  32151. }
  32152. var ids = self2._getSoundIds(id);
  32153. for (var i = 0; i < ids.length; i++) {
  32154. sound = self2._soundById(ids[i]);
  32155. if (sound) {
  32156. sound._loop = loop;
  32157. if (self2._webAudio && sound._node && sound._node.bufferSource) {
  32158. sound._node.bufferSource.loop = loop;
  32159. if (loop) {
  32160. sound._node.bufferSource.loopStart = sound._start || 0;
  32161. sound._node.bufferSource.loopEnd = sound._stop;
  32162. if (self2.playing(ids[i])) {
  32163. self2.pause(ids[i], true);
  32164. self2.play(ids[i], true);
  32165. }
  32166. }
  32167. }
  32168. }
  32169. }
  32170. return self2;
  32171. },
  32172. /**
  32173. * Get/set the playback rate of a sound. This method can optionally take 0, 1 or 2 arguments.
  32174. * rate() -> Returns the first sound node's current playback rate.
  32175. * rate(id) -> Returns the sound id's current playback rate.
  32176. * rate(rate) -> Sets the playback rate of all sounds in this Howl group.
  32177. * rate(rate, id) -> Sets the playback rate of passed sound id.
  32178. * @return {Howl/Number} Returns self or the current playback rate.
  32179. */
  32180. rate: function() {
  32181. var self2 = this;
  32182. var args = arguments;
  32183. var rate, id;
  32184. if (args.length === 0) {
  32185. id = self2._sounds[0]._id;
  32186. } else if (args.length === 1) {
  32187. var ids = self2._getSoundIds();
  32188. var index2 = ids.indexOf(args[0]);
  32189. if (index2 >= 0) {
  32190. id = parseInt(args[0], 10);
  32191. } else {
  32192. rate = parseFloat(args[0]);
  32193. }
  32194. } else if (args.length === 2) {
  32195. rate = parseFloat(args[0]);
  32196. id = parseInt(args[1], 10);
  32197. }
  32198. var sound;
  32199. if (typeof rate === "number") {
  32200. if (self2._state !== "loaded" || self2._playLock) {
  32201. self2._queue.push({
  32202. event: "rate",
  32203. action: function() {
  32204. self2.rate.apply(self2, args);
  32205. }
  32206. });
  32207. return self2;
  32208. }
  32209. if (typeof id === "undefined") {
  32210. self2._rate = rate;
  32211. }
  32212. id = self2._getSoundIds(id);
  32213. for (var i = 0; i < id.length; i++) {
  32214. sound = self2._soundById(id[i]);
  32215. if (sound) {
  32216. if (self2.playing(id[i])) {
  32217. sound._rateSeek = self2.seek(id[i]);
  32218. sound._playStart = self2._webAudio ? Howler2.ctx.currentTime : sound._playStart;
  32219. }
  32220. sound._rate = rate;
  32221. if (self2._webAudio && sound._node && sound._node.bufferSource) {
  32222. sound._node.bufferSource.playbackRate.setValueAtTime(rate, Howler2.ctx.currentTime);
  32223. } else if (sound._node) {
  32224. sound._node.playbackRate = rate;
  32225. }
  32226. var seek = self2.seek(id[i]);
  32227. var duration = (self2._sprite[sound._sprite][0] + self2._sprite[sound._sprite][1]) / 1e3 - seek;
  32228. var timeout2 = duration * 1e3 / Math.abs(sound._rate);
  32229. if (self2._endTimers[id[i]] || !sound._paused) {
  32230. self2._clearTimer(id[i]);
  32231. self2._endTimers[id[i]] = setTimeout(self2._ended.bind(self2, sound), timeout2);
  32232. }
  32233. self2._emit("rate", sound._id);
  32234. }
  32235. }
  32236. } else {
  32237. sound = self2._soundById(id);
  32238. return sound ? sound._rate : self2._rate;
  32239. }
  32240. return self2;
  32241. },
  32242. /**
  32243. * Get/set the seek position of a sound. This method can optionally take 0, 1 or 2 arguments.
  32244. * seek() -> Returns the first sound node's current seek position.
  32245. * seek(id) -> Returns the sound id's current seek position.
  32246. * seek(seek) -> Sets the seek position of the first sound node.
  32247. * seek(seek, id) -> Sets the seek position of passed sound id.
  32248. * @return {Howl/Number} Returns self or the current seek position.
  32249. */
  32250. seek: function() {
  32251. var self2 = this;
  32252. var args = arguments;
  32253. var seek, id;
  32254. if (args.length === 0) {
  32255. if (self2._sounds.length) {
  32256. id = self2._sounds[0]._id;
  32257. }
  32258. } else if (args.length === 1) {
  32259. var ids = self2._getSoundIds();
  32260. var index2 = ids.indexOf(args[0]);
  32261. if (index2 >= 0) {
  32262. id = parseInt(args[0], 10);
  32263. } else if (self2._sounds.length) {
  32264. id = self2._sounds[0]._id;
  32265. seek = parseFloat(args[0]);
  32266. }
  32267. } else if (args.length === 2) {
  32268. seek = parseFloat(args[0]);
  32269. id = parseInt(args[1], 10);
  32270. }
  32271. if (typeof id === "undefined") {
  32272. return 0;
  32273. }
  32274. if (typeof seek === "number" && (self2._state !== "loaded" || self2._playLock)) {
  32275. self2._queue.push({
  32276. event: "seek",
  32277. action: function() {
  32278. self2.seek.apply(self2, args);
  32279. }
  32280. });
  32281. return self2;
  32282. }
  32283. var sound = self2._soundById(id);
  32284. if (sound) {
  32285. if (typeof seek === "number" && seek >= 0) {
  32286. var playing = self2.playing(id);
  32287. if (playing) {
  32288. self2.pause(id, true);
  32289. }
  32290. sound._seek = seek;
  32291. sound._ended = false;
  32292. self2._clearTimer(id);
  32293. if (!self2._webAudio && sound._node && !isNaN(sound._node.duration)) {
  32294. sound._node.currentTime = seek;
  32295. }
  32296. var seekAndEmit = function() {
  32297. if (playing) {
  32298. self2.play(id, true);
  32299. }
  32300. self2._emit("seek", id);
  32301. };
  32302. if (playing && !self2._webAudio) {
  32303. var emitSeek = function() {
  32304. if (!self2._playLock) {
  32305. seekAndEmit();
  32306. } else {
  32307. setTimeout(emitSeek, 0);
  32308. }
  32309. };
  32310. setTimeout(emitSeek, 0);
  32311. } else {
  32312. seekAndEmit();
  32313. }
  32314. } else {
  32315. if (self2._webAudio) {
  32316. var realTime = self2.playing(id) ? Howler2.ctx.currentTime - sound._playStart : 0;
  32317. var rateSeek = sound._rateSeek ? sound._rateSeek - sound._seek : 0;
  32318. return sound._seek + (rateSeek + realTime * Math.abs(sound._rate));
  32319. } else {
  32320. return sound._node.currentTime;
  32321. }
  32322. }
  32323. }
  32324. return self2;
  32325. },
  32326. /**
  32327. * Check if a specific sound is currently playing or not (if id is provided), or check if at least one of the sounds in the group is playing or not.
  32328. * @param {Number} id The sound id to check. If none is passed, the whole sound group is checked.
  32329. * @return {Boolean} True if playing and false if not.
  32330. */
  32331. playing: function(id) {
  32332. var self2 = this;
  32333. if (typeof id === "number") {
  32334. var sound = self2._soundById(id);
  32335. return sound ? !sound._paused : false;
  32336. }
  32337. for (var i = 0; i < self2._sounds.length; i++) {
  32338. if (!self2._sounds[i]._paused) {
  32339. return true;
  32340. }
  32341. }
  32342. return false;
  32343. },
  32344. /**
  32345. * Get the duration of this sound. Passing a sound id will return the sprite duration.
  32346. * @param {Number} id The sound id to check. If none is passed, return full source duration.
  32347. * @return {Number} Audio duration in seconds.
  32348. */
  32349. duration: function(id) {
  32350. var self2 = this;
  32351. var duration = self2._duration;
  32352. var sound = self2._soundById(id);
  32353. if (sound) {
  32354. duration = self2._sprite[sound._sprite][1] / 1e3;
  32355. }
  32356. return duration;
  32357. },
  32358. /**
  32359. * Returns the current loaded state of this Howl.
  32360. * @return {String} 'unloaded', 'loading', 'loaded'
  32361. */
  32362. state: function() {
  32363. return this._state;
  32364. },
  32365. /**
  32366. * Unload and destroy the current Howl object.
  32367. * This will immediately stop all sound instances attached to this group.
  32368. */
  32369. unload: function() {
  32370. var self2 = this;
  32371. var sounds = self2._sounds;
  32372. for (var i = 0; i < sounds.length; i++) {
  32373. if (!sounds[i]._paused) {
  32374. self2.stop(sounds[i]._id);
  32375. }
  32376. if (!self2._webAudio) {
  32377. self2._clearSound(sounds[i]._node);
  32378. sounds[i]._node.removeEventListener("error", sounds[i]._errorFn, false);
  32379. sounds[i]._node.removeEventListener(Howler2._canPlayEvent, sounds[i]._loadFn, false);
  32380. sounds[i]._node.removeEventListener("ended", sounds[i]._endFn, false);
  32381. Howler2._releaseHtml5Audio(sounds[i]._node);
  32382. }
  32383. delete sounds[i]._node;
  32384. self2._clearTimer(sounds[i]._id);
  32385. }
  32386. var index2 = Howler2._howls.indexOf(self2);
  32387. if (index2 >= 0) {
  32388. Howler2._howls.splice(index2, 1);
  32389. }
  32390. var remCache = true;
  32391. for (i = 0; i < Howler2._howls.length; i++) {
  32392. if (Howler2._howls[i]._src === self2._src || self2._src.indexOf(Howler2._howls[i]._src) >= 0) {
  32393. remCache = false;
  32394. break;
  32395. }
  32396. }
  32397. if (cache && remCache) {
  32398. delete cache[self2._src];
  32399. }
  32400. Howler2.noAudio = false;
  32401. self2._state = "unloaded";
  32402. self2._sounds = [];
  32403. self2 = null;
  32404. return null;
  32405. },
  32406. /**
  32407. * Listen to a custom event.
  32408. * @param {String} event Event name.
  32409. * @param {Function} fn Listener to call.
  32410. * @param {Number} id (optional) Only listen to events for this sound.
  32411. * @param {Number} once (INTERNAL) Marks event to fire only once.
  32412. * @return {Howl}
  32413. */
  32414. on: function(event, fn, id, once) {
  32415. var self2 = this;
  32416. var events = self2["_on" + event];
  32417. if (typeof fn === "function") {
  32418. events.push(once ? { id, fn, once } : { id, fn });
  32419. }
  32420. return self2;
  32421. },
  32422. /**
  32423. * Remove a custom event. Call without parameters to remove all events.
  32424. * @param {String} event Event name.
  32425. * @param {Function} fn Listener to remove. Leave empty to remove all.
  32426. * @param {Number} id (optional) Only remove events for this sound.
  32427. * @return {Howl}
  32428. */
  32429. off: function(event, fn, id) {
  32430. var self2 = this;
  32431. var events = self2["_on" + event];
  32432. var i = 0;
  32433. if (typeof fn === "number") {
  32434. id = fn;
  32435. fn = null;
  32436. }
  32437. if (fn || id) {
  32438. for (i = 0; i < events.length; i++) {
  32439. var isId = id === events[i].id;
  32440. if (fn === events[i].fn && isId || !fn && isId) {
  32441. events.splice(i, 1);
  32442. break;
  32443. }
  32444. }
  32445. } else if (event) {
  32446. self2["_on" + event] = [];
  32447. } else {
  32448. var keys = Object.keys(self2);
  32449. for (i = 0; i < keys.length; i++) {
  32450. if (keys[i].indexOf("_on") === 0 && Array.isArray(self2[keys[i]])) {
  32451. self2[keys[i]] = [];
  32452. }
  32453. }
  32454. }
  32455. return self2;
  32456. },
  32457. /**
  32458. * Listen to a custom event and remove it once fired.
  32459. * @param {String} event Event name.
  32460. * @param {Function} fn Listener to call.
  32461. * @param {Number} id (optional) Only listen to events for this sound.
  32462. * @return {Howl}
  32463. */
  32464. once: function(event, fn, id) {
  32465. var self2 = this;
  32466. self2.on(event, fn, id, 1);
  32467. return self2;
  32468. },
  32469. /**
  32470. * Emit all events of a specific type and pass the sound id.
  32471. * @param {String} event Event name.
  32472. * @param {Number} id Sound ID.
  32473. * @param {Number} msg Message to go with event.
  32474. * @return {Howl}
  32475. */
  32476. _emit: function(event, id, msg) {
  32477. var self2 = this;
  32478. var events = self2["_on" + event];
  32479. for (var i = events.length - 1; i >= 0; i--) {
  32480. if (!events[i].id || events[i].id === id || event === "load") {
  32481. setTimeout((function(fn) {
  32482. fn.call(this, id, msg);
  32483. }).bind(self2, events[i].fn), 0);
  32484. if (events[i].once) {
  32485. self2.off(event, events[i].fn, events[i].id);
  32486. }
  32487. }
  32488. }
  32489. self2._loadQueue(event);
  32490. return self2;
  32491. },
  32492. /**
  32493. * Queue of actions initiated before the sound has loaded.
  32494. * These will be called in sequence, with the next only firing
  32495. * after the previous has finished executing (even if async like play).
  32496. * @return {Howl}
  32497. */
  32498. _loadQueue: function(event) {
  32499. var self2 = this;
  32500. if (self2._queue.length > 0) {
  32501. var task = self2._queue[0];
  32502. if (task.event === event) {
  32503. self2._queue.shift();
  32504. self2._loadQueue();
  32505. }
  32506. if (!event) {
  32507. task.action();
  32508. }
  32509. }
  32510. return self2;
  32511. },
  32512. /**
  32513. * Fired when playback ends at the end of the duration.
  32514. * @param {Sound} sound The sound object to work with.
  32515. * @return {Howl}
  32516. */
  32517. _ended: function(sound) {
  32518. var self2 = this;
  32519. var sprite = sound._sprite;
  32520. if (!self2._webAudio && sound._node && !sound._node.paused && !sound._node.ended && sound._node.currentTime < sound._stop) {
  32521. setTimeout(self2._ended.bind(self2, sound), 100);
  32522. return self2;
  32523. }
  32524. var loop = !!(sound._loop || self2._sprite[sprite][2]);
  32525. self2._emit("end", sound._id);
  32526. if (!self2._webAudio && loop) {
  32527. self2.stop(sound._id, true).play(sound._id);
  32528. }
  32529. if (self2._webAudio && loop) {
  32530. self2._emit("play", sound._id);
  32531. sound._seek = sound._start || 0;
  32532. sound._rateSeek = 0;
  32533. sound._playStart = Howler2.ctx.currentTime;
  32534. var timeout2 = (sound._stop - sound._start) * 1e3 / Math.abs(sound._rate);
  32535. self2._endTimers[sound._id] = setTimeout(self2._ended.bind(self2, sound), timeout2);
  32536. }
  32537. if (self2._webAudio && !loop) {
  32538. sound._paused = true;
  32539. sound._ended = true;
  32540. sound._seek = sound._start || 0;
  32541. sound._rateSeek = 0;
  32542. self2._clearTimer(sound._id);
  32543. self2._cleanBuffer(sound._node);
  32544. Howler2._autoSuspend();
  32545. }
  32546. if (!self2._webAudio && !loop) {
  32547. self2.stop(sound._id, true);
  32548. }
  32549. return self2;
  32550. },
  32551. /**
  32552. * Clear the end timer for a sound playback.
  32553. * @param {Number} id The sound ID.
  32554. * @return {Howl}
  32555. */
  32556. _clearTimer: function(id) {
  32557. var self2 = this;
  32558. if (self2._endTimers[id]) {
  32559. if (typeof self2._endTimers[id] !== "function") {
  32560. clearTimeout(self2._endTimers[id]);
  32561. } else {
  32562. var sound = self2._soundById(id);
  32563. if (sound && sound._node) {
  32564. sound._node.removeEventListener("ended", self2._endTimers[id], false);
  32565. }
  32566. }
  32567. delete self2._endTimers[id];
  32568. }
  32569. return self2;
  32570. },
  32571. /**
  32572. * Return the sound identified by this ID, or return null.
  32573. * @param {Number} id Sound ID
  32574. * @return {Object} Sound object or null.
  32575. */
  32576. _soundById: function(id) {
  32577. var self2 = this;
  32578. for (var i = 0; i < self2._sounds.length; i++) {
  32579. if (id === self2._sounds[i]._id) {
  32580. return self2._sounds[i];
  32581. }
  32582. }
  32583. return null;
  32584. },
  32585. /**
  32586. * Return an inactive sound from the pool or create a new one.
  32587. * @return {Sound} Sound playback object.
  32588. */
  32589. _inactiveSound: function() {
  32590. var self2 = this;
  32591. self2._drain();
  32592. for (var i = 0; i < self2._sounds.length; i++) {
  32593. if (self2._sounds[i]._ended) {
  32594. return self2._sounds[i].reset();
  32595. }
  32596. }
  32597. return new Sound2(self2);
  32598. },
  32599. /**
  32600. * Drain excess inactive sounds from the pool.
  32601. */
  32602. _drain: function() {
  32603. var self2 = this;
  32604. var limit = self2._pool;
  32605. var cnt = 0;
  32606. var i = 0;
  32607. if (self2._sounds.length < limit) {
  32608. return;
  32609. }
  32610. for (i = 0; i < self2._sounds.length; i++) {
  32611. if (self2._sounds[i]._ended) {
  32612. cnt++;
  32613. }
  32614. }
  32615. for (i = self2._sounds.length - 1; i >= 0; i--) {
  32616. if (cnt <= limit) {
  32617. return;
  32618. }
  32619. if (self2._sounds[i]._ended) {
  32620. if (self2._webAudio && self2._sounds[i]._node) {
  32621. self2._sounds[i]._node.disconnect(0);
  32622. }
  32623. self2._sounds.splice(i, 1);
  32624. cnt--;
  32625. }
  32626. }
  32627. },
  32628. /**
  32629. * Get all ID's from the sounds pool.
  32630. * @param {Number} id Only return one ID if one is passed.
  32631. * @return {Array} Array of IDs.
  32632. */
  32633. _getSoundIds: function(id) {
  32634. var self2 = this;
  32635. if (typeof id === "undefined") {
  32636. var ids = [];
  32637. for (var i = 0; i < self2._sounds.length; i++) {
  32638. ids.push(self2._sounds[i]._id);
  32639. }
  32640. return ids;
  32641. } else {
  32642. return [id];
  32643. }
  32644. },
  32645. /**
  32646. * Load the sound back into the buffer source.
  32647. * @param {Sound} sound The sound object to work with.
  32648. * @return {Howl}
  32649. */
  32650. _refreshBuffer: function(sound) {
  32651. var self2 = this;
  32652. sound._node.bufferSource = Howler2.ctx.createBufferSource();
  32653. sound._node.bufferSource.buffer = cache[self2._src];
  32654. if (sound._panner) {
  32655. sound._node.bufferSource.connect(sound._panner);
  32656. } else {
  32657. sound._node.bufferSource.connect(sound._node);
  32658. }
  32659. sound._node.bufferSource.loop = sound._loop;
  32660. if (sound._loop) {
  32661. sound._node.bufferSource.loopStart = sound._start || 0;
  32662. sound._node.bufferSource.loopEnd = sound._stop || 0;
  32663. }
  32664. sound._node.bufferSource.playbackRate.setValueAtTime(sound._rate, Howler2.ctx.currentTime);
  32665. return self2;
  32666. },
  32667. /**
  32668. * Prevent memory leaks by cleaning up the buffer source after playback.
  32669. * @param {Object} node Sound's audio node containing the buffer source.
  32670. * @return {Howl}
  32671. */
  32672. _cleanBuffer: function(node) {
  32673. var self2 = this;
  32674. var isIOS = Howler2._navigator && Howler2._navigator.vendor.indexOf("Apple") >= 0;
  32675. if (!node.bufferSource) {
  32676. return self2;
  32677. }
  32678. if (Howler2._scratchBuffer && node.bufferSource) {
  32679. node.bufferSource.onended = null;
  32680. node.bufferSource.disconnect(0);
  32681. if (isIOS) {
  32682. try {
  32683. node.bufferSource.buffer = Howler2._scratchBuffer;
  32684. } catch (e) {
  32685. }
  32686. }
  32687. }
  32688. node.bufferSource = null;
  32689. return self2;
  32690. },
  32691. /**
  32692. * Set the source to a 0-second silence to stop any downloading (except in IE).
  32693. * @param {Object} node Audio node to clear.
  32694. */
  32695. _clearSound: function(node) {
  32696. var checkIE = /MSIE |Trident\//.test(Howler2._navigator && Howler2._navigator.userAgent);
  32697. if (!checkIE) {
  32698. node.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA";
  32699. }
  32700. }
  32701. };
  32702. var Sound2 = function(howl) {
  32703. this._parent = howl;
  32704. this.init();
  32705. };
  32706. Sound2.prototype = {
  32707. /**
  32708. * Initialize a new Sound object.
  32709. * @return {Sound}
  32710. */
  32711. init: function() {
  32712. var self2 = this;
  32713. var parent = self2._parent;
  32714. self2._muted = parent._muted;
  32715. self2._loop = parent._loop;
  32716. self2._volume = parent._volume;
  32717. self2._rate = parent._rate;
  32718. self2._seek = 0;
  32719. self2._paused = true;
  32720. self2._ended = true;
  32721. self2._sprite = "__default";
  32722. self2._id = ++Howler2._counter;
  32723. parent._sounds.push(self2);
  32724. self2.create();
  32725. return self2;
  32726. },
  32727. /**
  32728. * Create and setup a new sound object, whether HTML5 Audio or Web Audio.
  32729. * @return {Sound}
  32730. */
  32731. create: function() {
  32732. var self2 = this;
  32733. var parent = self2._parent;
  32734. var volume = Howler2._muted || self2._muted || self2._parent._muted ? 0 : self2._volume;
  32735. if (parent._webAudio) {
  32736. self2._node = typeof Howler2.ctx.createGain === "undefined" ? Howler2.ctx.createGainNode() : Howler2.ctx.createGain();
  32737. self2._node.gain.setValueAtTime(volume, Howler2.ctx.currentTime);
  32738. self2._node.paused = true;
  32739. self2._node.connect(Howler2.masterGain);
  32740. } else if (!Howler2.noAudio) {
  32741. self2._node = Howler2._obtainHtml5Audio();
  32742. self2._errorFn = self2._errorListener.bind(self2);
  32743. self2._node.addEventListener("error", self2._errorFn, false);
  32744. self2._loadFn = self2._loadListener.bind(self2);
  32745. self2._node.addEventListener(Howler2._canPlayEvent, self2._loadFn, false);
  32746. self2._endFn = self2._endListener.bind(self2);
  32747. self2._node.addEventListener("ended", self2._endFn, false);
  32748. self2._node.src = parent._src;
  32749. self2._node.preload = parent._preload === true ? "auto" : parent._preload;
  32750. self2._node.volume = volume * Howler2.volume();
  32751. self2._node.load();
  32752. }
  32753. return self2;
  32754. },
  32755. /**
  32756. * Reset the parameters of this sound to the original state (for recycle).
  32757. * @return {Sound}
  32758. */
  32759. reset: function() {
  32760. var self2 = this;
  32761. var parent = self2._parent;
  32762. self2._muted = parent._muted;
  32763. self2._loop = parent._loop;
  32764. self2._volume = parent._volume;
  32765. self2._rate = parent._rate;
  32766. self2._seek = 0;
  32767. self2._rateSeek = 0;
  32768. self2._paused = true;
  32769. self2._ended = true;
  32770. self2._sprite = "__default";
  32771. self2._id = ++Howler2._counter;
  32772. return self2;
  32773. },
  32774. /**
  32775. * HTML5 Audio error listener callback.
  32776. */
  32777. _errorListener: function() {
  32778. var self2 = this;
  32779. self2._parent._emit("loaderror", self2._id, self2._node.error ? self2._node.error.code : 0);
  32780. self2._node.removeEventListener("error", self2._errorFn, false);
  32781. },
  32782. /**
  32783. * HTML5 Audio canplaythrough listener callback.
  32784. */
  32785. _loadListener: function() {
  32786. var self2 = this;
  32787. var parent = self2._parent;
  32788. parent._duration = Math.ceil(self2._node.duration * 10) / 10;
  32789. if (Object.keys(parent._sprite).length === 0) {
  32790. parent._sprite = { __default: [0, parent._duration * 1e3] };
  32791. }
  32792. if (parent._state !== "loaded") {
  32793. parent._state = "loaded";
  32794. parent._emit("load");
  32795. parent._loadQueue();
  32796. }
  32797. self2._node.removeEventListener(Howler2._canPlayEvent, self2._loadFn, false);
  32798. },
  32799. /**
  32800. * HTML5 Audio ended listener callback.
  32801. */
  32802. _endListener: function() {
  32803. var self2 = this;
  32804. var parent = self2._parent;
  32805. if (parent._duration === Infinity) {
  32806. parent._duration = Math.ceil(self2._node.duration * 10) / 10;
  32807. if (parent._sprite.__default[1] === Infinity) {
  32808. parent._sprite.__default[1] = parent._duration * 1e3;
  32809. }
  32810. parent._ended(self2);
  32811. }
  32812. self2._node.removeEventListener("ended", self2._endFn, false);
  32813. }
  32814. };
  32815. var cache = {};
  32816. var loadBuffer = function(self2) {
  32817. var url2 = self2._src;
  32818. if (cache[url2]) {
  32819. self2._duration = cache[url2].duration;
  32820. loadSound(self2);
  32821. return;
  32822. }
  32823. if (/^data:[^;]+;base64,/.test(url2)) {
  32824. var data = atob(url2.split(",")[1]);
  32825. var dataView = new Uint8Array(data.length);
  32826. for (var i = 0; i < data.length; ++i) {
  32827. dataView[i] = data.charCodeAt(i);
  32828. }
  32829. decodeAudioData(dataView.buffer, self2);
  32830. } else {
  32831. var xhr = new XMLHttpRequest();
  32832. xhr.open(self2._xhr.method, url2, true);
  32833. xhr.withCredentials = self2._xhr.withCredentials;
  32834. xhr.responseType = "arraybuffer";
  32835. if (self2._xhr.headers) {
  32836. Object.keys(self2._xhr.headers).forEach(function(key) {
  32837. xhr.setRequestHeader(key, self2._xhr.headers[key]);
  32838. });
  32839. }
  32840. xhr.onload = function() {
  32841. var code2 = (xhr.status + "")[0];
  32842. if (code2 !== "0" && code2 !== "2" && code2 !== "3") {
  32843. self2._emit("loaderror", null, "Failed loading audio file with status: " + xhr.status + ".");
  32844. return;
  32845. }
  32846. decodeAudioData(xhr.response, self2);
  32847. };
  32848. xhr.onerror = function() {
  32849. if (self2._webAudio) {
  32850. self2._html5 = true;
  32851. self2._webAudio = false;
  32852. self2._sounds = [];
  32853. delete cache[url2];
  32854. self2.load();
  32855. }
  32856. };
  32857. safeXhrSend(xhr);
  32858. }
  32859. };
  32860. var safeXhrSend = function(xhr) {
  32861. try {
  32862. xhr.send();
  32863. } catch (e) {
  32864. xhr.onerror();
  32865. }
  32866. };
  32867. var decodeAudioData = function(arraybuffer, self2) {
  32868. var error2 = function() {
  32869. self2._emit("loaderror", null, "Decoding audio data failed.");
  32870. };
  32871. var success = function(buffer) {
  32872. if (buffer && self2._sounds.length > 0) {
  32873. cache[self2._src] = buffer;
  32874. loadSound(self2, buffer);
  32875. } else {
  32876. error2();
  32877. }
  32878. };
  32879. if (typeof Promise !== "undefined" && Howler2.ctx.decodeAudioData.length === 1) {
  32880. Howler2.ctx.decodeAudioData(arraybuffer).then(success).catch(error2);
  32881. } else {
  32882. Howler2.ctx.decodeAudioData(arraybuffer, success, error2);
  32883. }
  32884. };
  32885. var loadSound = function(self2, buffer) {
  32886. if (buffer && !self2._duration) {
  32887. self2._duration = buffer.duration;
  32888. }
  32889. if (Object.keys(self2._sprite).length === 0) {
  32890. self2._sprite = { __default: [0, self2._duration * 1e3] };
  32891. }
  32892. if (self2._state !== "loaded") {
  32893. self2._state = "loaded";
  32894. self2._emit("load");
  32895. self2._loadQueue();
  32896. }
  32897. };
  32898. var setupAudioContext = function() {
  32899. if (!Howler2.usingWebAudio) {
  32900. return;
  32901. }
  32902. try {
  32903. if (typeof AudioContext !== "undefined") {
  32904. Howler2.ctx = new AudioContext();
  32905. } else if (typeof webkitAudioContext !== "undefined") {
  32906. Howler2.ctx = new webkitAudioContext();
  32907. } else {
  32908. Howler2.usingWebAudio = false;
  32909. }
  32910. } catch (e) {
  32911. Howler2.usingWebAudio = false;
  32912. }
  32913. if (!Howler2.ctx) {
  32914. Howler2.usingWebAudio = false;
  32915. }
  32916. var iOS = /iP(hone|od|ad)/.test(Howler2._navigator && Howler2._navigator.platform);
  32917. var appVersion = Howler2._navigator && Howler2._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
  32918. var version2 = appVersion ? parseInt(appVersion[1], 10) : null;
  32919. if (iOS && version2 && version2 < 9) {
  32920. var safari = /safari/.test(Howler2._navigator && Howler2._navigator.userAgent.toLowerCase());
  32921. if (Howler2._navigator && !safari) {
  32922. Howler2.usingWebAudio = false;
  32923. }
  32924. }
  32925. if (Howler2.usingWebAudio) {
  32926. Howler2.masterGain = typeof Howler2.ctx.createGain === "undefined" ? Howler2.ctx.createGainNode() : Howler2.ctx.createGain();
  32927. Howler2.masterGain.gain.setValueAtTime(Howler2._muted ? 0 : Howler2._volume, Howler2.ctx.currentTime);
  32928. Howler2.masterGain.connect(Howler2.ctx.destination);
  32929. }
  32930. Howler2._setup();
  32931. };
  32932. {
  32933. exports.Howler = Howler2;
  32934. exports.Howl = Howl2;
  32935. }
  32936. if (typeof commonjsGlobal !== "undefined") {
  32937. commonjsGlobal.HowlerGlobal = HowlerGlobal2;
  32938. commonjsGlobal.Howler = Howler2;
  32939. commonjsGlobal.Howl = Howl2;
  32940. commonjsGlobal.Sound = Sound2;
  32941. } else if (typeof window !== "undefined") {
  32942. window.HowlerGlobal = HowlerGlobal2;
  32943. window.Howler = Howler2;
  32944. window.Howl = Howl2;
  32945. window.Sound = Sound2;
  32946. }
  32947. })();
  32948. /*!
  32949. * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
  32950. *
  32951. * howler.js v2.2.4
  32952. * howlerjs.com
  32953. *
  32954. * (c) 2013-2020, James Simpson of GoldFire Studios
  32955. * goldfirestudios.com
  32956. *
  32957. * MIT License
  32958. */
  32959. (function() {
  32960. HowlerGlobal.prototype._pos = [0, 0, 0];
  32961. HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0];
  32962. HowlerGlobal.prototype.stereo = function(pan) {
  32963. var self2 = this;
  32964. if (!self2.ctx || !self2.ctx.listener) {
  32965. return self2;
  32966. }
  32967. for (var i = self2._howls.length - 1; i >= 0; i--) {
  32968. self2._howls[i].stereo(pan);
  32969. }
  32970. return self2;
  32971. };
  32972. HowlerGlobal.prototype.pos = function(x, y, z) {
  32973. var self2 = this;
  32974. if (!self2.ctx || !self2.ctx.listener) {
  32975. return self2;
  32976. }
  32977. y = typeof y !== "number" ? self2._pos[1] : y;
  32978. z = typeof z !== "number" ? self2._pos[2] : z;
  32979. if (typeof x === "number") {
  32980. self2._pos = [x, y, z];
  32981. if (typeof self2.ctx.listener.positionX !== "undefined") {
  32982. self2.ctx.listener.positionX.setTargetAtTime(self2._pos[0], Howler.ctx.currentTime, 0.1);
  32983. self2.ctx.listener.positionY.setTargetAtTime(self2._pos[1], Howler.ctx.currentTime, 0.1);
  32984. self2.ctx.listener.positionZ.setTargetAtTime(self2._pos[2], Howler.ctx.currentTime, 0.1);
  32985. } else {
  32986. self2.ctx.listener.setPosition(self2._pos[0], self2._pos[1], self2._pos[2]);
  32987. }
  32988. } else {
  32989. return self2._pos;
  32990. }
  32991. return self2;
  32992. };
  32993. HowlerGlobal.prototype.orientation = function(x, y, z, xUp, yUp, zUp) {
  32994. var self2 = this;
  32995. if (!self2.ctx || !self2.ctx.listener) {
  32996. return self2;
  32997. }
  32998. var or = self2._orientation;
  32999. y = typeof y !== "number" ? or[1] : y;
  33000. z = typeof z !== "number" ? or[2] : z;
  33001. xUp = typeof xUp !== "number" ? or[3] : xUp;
  33002. yUp = typeof yUp !== "number" ? or[4] : yUp;
  33003. zUp = typeof zUp !== "number" ? or[5] : zUp;
  33004. if (typeof x === "number") {
  33005. self2._orientation = [x, y, z, xUp, yUp, zUp];
  33006. if (typeof self2.ctx.listener.forwardX !== "undefined") {
  33007. self2.ctx.listener.forwardX.setTargetAtTime(x, Howler.ctx.currentTime, 0.1);
  33008. self2.ctx.listener.forwardY.setTargetAtTime(y, Howler.ctx.currentTime, 0.1);
  33009. self2.ctx.listener.forwardZ.setTargetAtTime(z, Howler.ctx.currentTime, 0.1);
  33010. self2.ctx.listener.upX.setTargetAtTime(xUp, Howler.ctx.currentTime, 0.1);
  33011. self2.ctx.listener.upY.setTargetAtTime(yUp, Howler.ctx.currentTime, 0.1);
  33012. self2.ctx.listener.upZ.setTargetAtTime(zUp, Howler.ctx.currentTime, 0.1);
  33013. } else {
  33014. self2.ctx.listener.setOrientation(x, y, z, xUp, yUp, zUp);
  33015. }
  33016. } else {
  33017. return or;
  33018. }
  33019. return self2;
  33020. };
  33021. Howl.prototype.init = /* @__PURE__ */ function(_super) {
  33022. return function(o) {
  33023. var self2 = this;
  33024. self2._orientation = o.orientation || [1, 0, 0];
  33025. self2._stereo = o.stereo || null;
  33026. self2._pos = o.pos || null;
  33027. self2._pannerAttr = {
  33028. coneInnerAngle: typeof o.coneInnerAngle !== "undefined" ? o.coneInnerAngle : 360,
  33029. coneOuterAngle: typeof o.coneOuterAngle !== "undefined" ? o.coneOuterAngle : 360,
  33030. coneOuterGain: typeof o.coneOuterGain !== "undefined" ? o.coneOuterGain : 0,
  33031. distanceModel: typeof o.distanceModel !== "undefined" ? o.distanceModel : "inverse",
  33032. maxDistance: typeof o.maxDistance !== "undefined" ? o.maxDistance : 1e4,
  33033. panningModel: typeof o.panningModel !== "undefined" ? o.panningModel : "HRTF",
  33034. refDistance: typeof o.refDistance !== "undefined" ? o.refDistance : 1,
  33035. rolloffFactor: typeof o.rolloffFactor !== "undefined" ? o.rolloffFactor : 1
  33036. };
  33037. self2._onstereo = o.onstereo ? [{ fn: o.onstereo }] : [];
  33038. self2._onpos = o.onpos ? [{ fn: o.onpos }] : [];
  33039. self2._onorientation = o.onorientation ? [{ fn: o.onorientation }] : [];
  33040. return _super.call(this, o);
  33041. };
  33042. }(Howl.prototype.init);
  33043. Howl.prototype.stereo = function(pan, id) {
  33044. var self2 = this;
  33045. if (!self2._webAudio) {
  33046. return self2;
  33047. }
  33048. if (self2._state !== "loaded") {
  33049. self2._queue.push({
  33050. event: "stereo",
  33051. action: function() {
  33052. self2.stereo(pan, id);
  33053. }
  33054. });
  33055. return self2;
  33056. }
  33057. var pannerType = typeof Howler.ctx.createStereoPanner === "undefined" ? "spatial" : "stereo";
  33058. if (typeof id === "undefined") {
  33059. if (typeof pan === "number") {
  33060. self2._stereo = pan;
  33061. self2._pos = [pan, 0, 0];
  33062. } else {
  33063. return self2._stereo;
  33064. }
  33065. }
  33066. var ids = self2._getSoundIds(id);
  33067. for (var i = 0; i < ids.length; i++) {
  33068. var sound = self2._soundById(ids[i]);
  33069. if (sound) {
  33070. if (typeof pan === "number") {
  33071. sound._stereo = pan;
  33072. sound._pos = [pan, 0, 0];
  33073. if (sound._node) {
  33074. sound._pannerAttr.panningModel = "equalpower";
  33075. if (!sound._panner || !sound._panner.pan) {
  33076. setupPanner(sound, pannerType);
  33077. }
  33078. if (pannerType === "spatial") {
  33079. if (typeof sound._panner.positionX !== "undefined") {
  33080. sound._panner.positionX.setValueAtTime(pan, Howler.ctx.currentTime);
  33081. sound._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime);
  33082. sound._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime);
  33083. } else {
  33084. sound._panner.setPosition(pan, 0, 0);
  33085. }
  33086. } else {
  33087. sound._panner.pan.setValueAtTime(pan, Howler.ctx.currentTime);
  33088. }
  33089. }
  33090. self2._emit("stereo", sound._id);
  33091. } else {
  33092. return sound._stereo;
  33093. }
  33094. }
  33095. }
  33096. return self2;
  33097. };
  33098. Howl.prototype.pos = function(x, y, z, id) {
  33099. var self2 = this;
  33100. if (!self2._webAudio) {
  33101. return self2;
  33102. }
  33103. if (self2._state !== "loaded") {
  33104. self2._queue.push({
  33105. event: "pos",
  33106. action: function() {
  33107. self2.pos(x, y, z, id);
  33108. }
  33109. });
  33110. return self2;
  33111. }
  33112. y = typeof y !== "number" ? 0 : y;
  33113. z = typeof z !== "number" ? -0.5 : z;
  33114. if (typeof id === "undefined") {
  33115. if (typeof x === "number") {
  33116. self2._pos = [x, y, z];
  33117. } else {
  33118. return self2._pos;
  33119. }
  33120. }
  33121. var ids = self2._getSoundIds(id);
  33122. for (var i = 0; i < ids.length; i++) {
  33123. var sound = self2._soundById(ids[i]);
  33124. if (sound) {
  33125. if (typeof x === "number") {
  33126. sound._pos = [x, y, z];
  33127. if (sound._node) {
  33128. if (!sound._panner || sound._panner.pan) {
  33129. setupPanner(sound, "spatial");
  33130. }
  33131. if (typeof sound._panner.positionX !== "undefined") {
  33132. sound._panner.positionX.setValueAtTime(x, Howler.ctx.currentTime);
  33133. sound._panner.positionY.setValueAtTime(y, Howler.ctx.currentTime);
  33134. sound._panner.positionZ.setValueAtTime(z, Howler.ctx.currentTime);
  33135. } else {
  33136. sound._panner.setPosition(x, y, z);
  33137. }
  33138. }
  33139. self2._emit("pos", sound._id);
  33140. } else {
  33141. return sound._pos;
  33142. }
  33143. }
  33144. }
  33145. return self2;
  33146. };
  33147. Howl.prototype.orientation = function(x, y, z, id) {
  33148. var self2 = this;
  33149. if (!self2._webAudio) {
  33150. return self2;
  33151. }
  33152. if (self2._state !== "loaded") {
  33153. self2._queue.push({
  33154. event: "orientation",
  33155. action: function() {
  33156. self2.orientation(x, y, z, id);
  33157. }
  33158. });
  33159. return self2;
  33160. }
  33161. y = typeof y !== "number" ? self2._orientation[1] : y;
  33162. z = typeof z !== "number" ? self2._orientation[2] : z;
  33163. if (typeof id === "undefined") {
  33164. if (typeof x === "number") {
  33165. self2._orientation = [x, y, z];
  33166. } else {
  33167. return self2._orientation;
  33168. }
  33169. }
  33170. var ids = self2._getSoundIds(id);
  33171. for (var i = 0; i < ids.length; i++) {
  33172. var sound = self2._soundById(ids[i]);
  33173. if (sound) {
  33174. if (typeof x === "number") {
  33175. sound._orientation = [x, y, z];
  33176. if (sound._node) {
  33177. if (!sound._panner) {
  33178. if (!sound._pos) {
  33179. sound._pos = self2._pos || [0, 0, -0.5];
  33180. }
  33181. setupPanner(sound, "spatial");
  33182. }
  33183. if (typeof sound._panner.orientationX !== "undefined") {
  33184. sound._panner.orientationX.setValueAtTime(x, Howler.ctx.currentTime);
  33185. sound._panner.orientationY.setValueAtTime(y, Howler.ctx.currentTime);
  33186. sound._panner.orientationZ.setValueAtTime(z, Howler.ctx.currentTime);
  33187. } else {
  33188. sound._panner.setOrientation(x, y, z);
  33189. }
  33190. }
  33191. self2._emit("orientation", sound._id);
  33192. } else {
  33193. return sound._orientation;
  33194. }
  33195. }
  33196. }
  33197. return self2;
  33198. };
  33199. Howl.prototype.pannerAttr = function() {
  33200. var self2 = this;
  33201. var args = arguments;
  33202. var o, id, sound;
  33203. if (!self2._webAudio) {
  33204. return self2;
  33205. }
  33206. if (args.length === 0) {
  33207. return self2._pannerAttr;
  33208. } else if (args.length === 1) {
  33209. if (typeof args[0] === "object") {
  33210. o = args[0];
  33211. if (typeof id === "undefined") {
  33212. if (!o.pannerAttr) {
  33213. o.pannerAttr = {
  33214. coneInnerAngle: o.coneInnerAngle,
  33215. coneOuterAngle: o.coneOuterAngle,
  33216. coneOuterGain: o.coneOuterGain,
  33217. distanceModel: o.distanceModel,
  33218. maxDistance: o.maxDistance,
  33219. refDistance: o.refDistance,
  33220. rolloffFactor: o.rolloffFactor,
  33221. panningModel: o.panningModel
  33222. };
  33223. }
  33224. self2._pannerAttr = {
  33225. coneInnerAngle: typeof o.pannerAttr.coneInnerAngle !== "undefined" ? o.pannerAttr.coneInnerAngle : self2._coneInnerAngle,
  33226. coneOuterAngle: typeof o.pannerAttr.coneOuterAngle !== "undefined" ? o.pannerAttr.coneOuterAngle : self2._coneOuterAngle,
  33227. coneOuterGain: typeof o.pannerAttr.coneOuterGain !== "undefined" ? o.pannerAttr.coneOuterGain : self2._coneOuterGain,
  33228. distanceModel: typeof o.pannerAttr.distanceModel !== "undefined" ? o.pannerAttr.distanceModel : self2._distanceModel,
  33229. maxDistance: typeof o.pannerAttr.maxDistance !== "undefined" ? o.pannerAttr.maxDistance : self2._maxDistance,
  33230. refDistance: typeof o.pannerAttr.refDistance !== "undefined" ? o.pannerAttr.refDistance : self2._refDistance,
  33231. rolloffFactor: typeof o.pannerAttr.rolloffFactor !== "undefined" ? o.pannerAttr.rolloffFactor : self2._rolloffFactor,
  33232. panningModel: typeof o.pannerAttr.panningModel !== "undefined" ? o.pannerAttr.panningModel : self2._panningModel
  33233. };
  33234. }
  33235. } else {
  33236. sound = self2._soundById(parseInt(args[0], 10));
  33237. return sound ? sound._pannerAttr : self2._pannerAttr;
  33238. }
  33239. } else if (args.length === 2) {
  33240. o = args[0];
  33241. id = parseInt(args[1], 10);
  33242. }
  33243. var ids = self2._getSoundIds(id);
  33244. for (var i = 0; i < ids.length; i++) {
  33245. sound = self2._soundById(ids[i]);
  33246. if (sound) {
  33247. var pa = sound._pannerAttr;
  33248. pa = {
  33249. coneInnerAngle: typeof o.coneInnerAngle !== "undefined" ? o.coneInnerAngle : pa.coneInnerAngle,
  33250. coneOuterAngle: typeof o.coneOuterAngle !== "undefined" ? o.coneOuterAngle : pa.coneOuterAngle,
  33251. coneOuterGain: typeof o.coneOuterGain !== "undefined" ? o.coneOuterGain : pa.coneOuterGain,
  33252. distanceModel: typeof o.distanceModel !== "undefined" ? o.distanceModel : pa.distanceModel,
  33253. maxDistance: typeof o.maxDistance !== "undefined" ? o.maxDistance : pa.maxDistance,
  33254. refDistance: typeof o.refDistance !== "undefined" ? o.refDistance : pa.refDistance,
  33255. rolloffFactor: typeof o.rolloffFactor !== "undefined" ? o.rolloffFactor : pa.rolloffFactor,
  33256. panningModel: typeof o.panningModel !== "undefined" ? o.panningModel : pa.panningModel
  33257. };
  33258. var panner = sound._panner;
  33259. if (!panner) {
  33260. if (!sound._pos) {
  33261. sound._pos = self2._pos || [0, 0, -0.5];
  33262. }
  33263. setupPanner(sound, "spatial");
  33264. panner = sound._panner;
  33265. }
  33266. panner.coneInnerAngle = pa.coneInnerAngle;
  33267. panner.coneOuterAngle = pa.coneOuterAngle;
  33268. panner.coneOuterGain = pa.coneOuterGain;
  33269. panner.distanceModel = pa.distanceModel;
  33270. panner.maxDistance = pa.maxDistance;
  33271. panner.refDistance = pa.refDistance;
  33272. panner.rolloffFactor = pa.rolloffFactor;
  33273. panner.panningModel = pa.panningModel;
  33274. }
  33275. }
  33276. return self2;
  33277. };
  33278. Sound.prototype.init = /* @__PURE__ */ function(_super) {
  33279. return function() {
  33280. var self2 = this;
  33281. var parent = self2._parent;
  33282. self2._orientation = parent._orientation;
  33283. self2._stereo = parent._stereo;
  33284. self2._pos = parent._pos;
  33285. self2._pannerAttr = parent._pannerAttr;
  33286. _super.call(this);
  33287. if (self2._stereo) {
  33288. parent.stereo(self2._stereo);
  33289. } else if (self2._pos) {
  33290. parent.pos(self2._pos[0], self2._pos[1], self2._pos[2], self2._id);
  33291. }
  33292. };
  33293. }(Sound.prototype.init);
  33294. Sound.prototype.reset = /* @__PURE__ */ function(_super) {
  33295. return function() {
  33296. var self2 = this;
  33297. var parent = self2._parent;
  33298. self2._orientation = parent._orientation;
  33299. self2._stereo = parent._stereo;
  33300. self2._pos = parent._pos;
  33301. self2._pannerAttr = parent._pannerAttr;
  33302. if (self2._stereo) {
  33303. parent.stereo(self2._stereo);
  33304. } else if (self2._pos) {
  33305. parent.pos(self2._pos[0], self2._pos[1], self2._pos[2], self2._id);
  33306. } else if (self2._panner) {
  33307. self2._panner.disconnect(0);
  33308. self2._panner = void 0;
  33309. parent._refreshBuffer(self2);
  33310. }
  33311. return _super.call(this);
  33312. };
  33313. }(Sound.prototype.reset);
  33314. var setupPanner = function(sound, type2) {
  33315. type2 = type2 || "spatial";
  33316. if (type2 === "spatial") {
  33317. sound._panner = Howler.ctx.createPanner();
  33318. sound._panner.coneInnerAngle = sound._pannerAttr.coneInnerAngle;
  33319. sound._panner.coneOuterAngle = sound._pannerAttr.coneOuterAngle;
  33320. sound._panner.coneOuterGain = sound._pannerAttr.coneOuterGain;
  33321. sound._panner.distanceModel = sound._pannerAttr.distanceModel;
  33322. sound._panner.maxDistance = sound._pannerAttr.maxDistance;
  33323. sound._panner.refDistance = sound._pannerAttr.refDistance;
  33324. sound._panner.rolloffFactor = sound._pannerAttr.rolloffFactor;
  33325. sound._panner.panningModel = sound._pannerAttr.panningModel;
  33326. if (typeof sound._panner.positionX !== "undefined") {
  33327. sound._panner.positionX.setValueAtTime(sound._pos[0], Howler.ctx.currentTime);
  33328. sound._panner.positionY.setValueAtTime(sound._pos[1], Howler.ctx.currentTime);
  33329. sound._panner.positionZ.setValueAtTime(sound._pos[2], Howler.ctx.currentTime);
  33330. } else {
  33331. sound._panner.setPosition(sound._pos[0], sound._pos[1], sound._pos[2]);
  33332. }
  33333. if (typeof sound._panner.orientationX !== "undefined") {
  33334. sound._panner.orientationX.setValueAtTime(sound._orientation[0], Howler.ctx.currentTime);
  33335. sound._panner.orientationY.setValueAtTime(sound._orientation[1], Howler.ctx.currentTime);
  33336. sound._panner.orientationZ.setValueAtTime(sound._orientation[2], Howler.ctx.currentTime);
  33337. } else {
  33338. sound._panner.setOrientation(sound._orientation[0], sound._orientation[1], sound._orientation[2]);
  33339. }
  33340. } else {
  33341. sound._panner = Howler.ctx.createStereoPanner();
  33342. sound._panner.pan.setValueAtTime(sound._stereo, Howler.ctx.currentTime);
  33343. }
  33344. sound._panner.connect(sound._node);
  33345. if (!sound._paused) {
  33346. sound._parent.pause(sound._id, true).play(sound._id, true);
  33347. }
  33348. };
  33349. })();
  33350. })(howler);
  33351. const clickSound = new howler.Howl({
  33352. src: ["./static/bap.mp3"],
  33353. // Use relative path
  33354. html5: true,
  33355. // Force HTML5 Audio to handle mobile playback better
  33356. preload: true,
  33357. // Preload the sound
  33358. volume: 1,
  33359. format: ["mp3"],
  33360. onplay: function() {
  33361. formatAppLog("log", "at config/audioUtil.js:11", "play");
  33362. }
  33363. });
  33364. function playClickSound() {
  33365. formatAppLog("log", "at config/audioUtil.js:16", "Attempting to play click sound");
  33366. if (clickSound.state() === "loaded") {
  33367. clickSound.play();
  33368. } else {
  33369. clickSound.once("load", function() {
  33370. clickSound.play();
  33371. });
  33372. }
  33373. }
  33374. const _sfc_main = {
  33375. __name: "App",
  33376. setup(__props, { expose: __expose }) {
  33377. __expose();
  33378. let touchHandler;
  33379. onLaunch(() => {
  33380. formatAppLog("log", "at App.vue:12", "App Launch");
  33381. if (!store.token) {
  33382. let token = uni.getStorageSync("token");
  33383. if (token) {
  33384. store.setToken(token);
  33385. let userInfo = uni.getStorageSync("userInfo");
  33386. if (userInfo) {
  33387. if (userInfo.userId) {
  33388. store.setUserInfo(userInfo);
  33389. }
  33390. }
  33391. }
  33392. }
  33393. touchHandler = (e) => {
  33394. formatAppLog("log", "at App.vue:29", "touchHandler", e);
  33395. playClickSound();
  33396. };
  33397. var globalEvent = requireNativePlugin("globalEvent");
  33398. globalEvent.addEventListener("touchstart", touchHandler);
  33399. useInit();
  33400. });
  33401. onShow(() => {
  33402. useRouteMonitor((url2, from) => {
  33403. formatAppLog("log", "at App.vue:50", "onShow", url2, from);
  33404. useGlobalEventRemove();
  33405. });
  33406. });
  33407. onHide(() => {
  33408. formatAppLog("log", "at App.vue:60", "App Hide");
  33409. });
  33410. onUnload(() => {
  33411. if (touchHandler) {
  33412. var globalEvent = requireNativePlugin("globalEvent");
  33413. globalEvent.removeEventListener("click", touchHandler);
  33414. touchHandler = null;
  33415. }
  33416. });
  33417. const __returned__ = { get touchHandler() {
  33418. return touchHandler;
  33419. }, set touchHandler(v) {
  33420. touchHandler = v;
  33421. }, get onLaunch() {
  33422. return onLaunch;
  33423. }, get onShow() {
  33424. return onShow;
  33425. }, get onHide() {
  33426. return onHide;
  33427. }, get onUnload() {
  33428. return onUnload;
  33429. }, get store() {
  33430. return store;
  33431. }, get useGlobalEventRemove() {
  33432. return useGlobalEventRemove;
  33433. }, get useInit() {
  33434. return useInit;
  33435. }, get useRouteMonitor() {
  33436. return useRouteMonitor;
  33437. }, get playClickSound() {
  33438. return playClickSound;
  33439. } };
  33440. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  33441. return __returned__;
  33442. }
  33443. };
  33444. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/书嗨项目/shuhi-app-fornt/App.vue"]]);
  33445. const { toString } = Object.prototype;
  33446. function isArray(val) {
  33447. return toString.call(val) === "[object Array]";
  33448. }
  33449. function isObject(val) {
  33450. return val !== null && typeof val === "object";
  33451. }
  33452. function isDate(val) {
  33453. return toString.call(val) === "[object Date]";
  33454. }
  33455. function isURLSearchParams(val) {
  33456. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  33457. }
  33458. function forEach(obj, fn) {
  33459. if (obj === null || typeof obj === "undefined") {
  33460. return;
  33461. }
  33462. if (typeof obj !== "object") {
  33463. obj = [obj];
  33464. }
  33465. if (isArray(obj)) {
  33466. for (let i = 0, l = obj.length; i < l; i++) {
  33467. fn.call(null, obj[i], i, obj);
  33468. }
  33469. } else {
  33470. for (const key in obj) {
  33471. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  33472. fn.call(null, obj[key], key, obj);
  33473. }
  33474. }
  33475. }
  33476. }
  33477. function isPlainObject(obj) {
  33478. return Object.prototype.toString.call(obj) === "[object Object]";
  33479. }
  33480. function deepMerge$1() {
  33481. const result = {};
  33482. function assignValue(val, key) {
  33483. if (typeof result[key] === "object" && typeof val === "object") {
  33484. result[key] = deepMerge$1(result[key], val);
  33485. } else if (typeof val === "object") {
  33486. result[key] = deepMerge$1({}, val);
  33487. } else {
  33488. result[key] = val;
  33489. }
  33490. }
  33491. for (let i = 0, l = arguments.length; i < l; i++) {
  33492. forEach(arguments[i], assignValue);
  33493. }
  33494. return result;
  33495. }
  33496. function isUndefined(val) {
  33497. return typeof val === "undefined";
  33498. }
  33499. function encode(val) {
  33500. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  33501. }
  33502. function buildURL(url2, params) {
  33503. if (!params) {
  33504. return url2;
  33505. }
  33506. let serializedParams;
  33507. if (isURLSearchParams(params)) {
  33508. serializedParams = params.toString();
  33509. } else {
  33510. const parts = [];
  33511. forEach(params, (val, key) => {
  33512. if (val === null || typeof val === "undefined") {
  33513. return;
  33514. }
  33515. if (isArray(val)) {
  33516. key = `${key}[]`;
  33517. } else {
  33518. val = [val];
  33519. }
  33520. forEach(val, (v) => {
  33521. if (isDate(v)) {
  33522. v = v.toISOString();
  33523. } else if (isObject(v)) {
  33524. v = JSON.stringify(v);
  33525. }
  33526. parts.push(`${encode(key)}=${encode(v)}`);
  33527. });
  33528. });
  33529. serializedParams = parts.join("&");
  33530. }
  33531. if (serializedParams) {
  33532. const hashmarkIndex = url2.indexOf("#");
  33533. if (hashmarkIndex !== -1) {
  33534. url2 = url2.slice(0, hashmarkIndex);
  33535. }
  33536. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  33537. }
  33538. return url2;
  33539. }
  33540. function isAbsoluteURL(url2) {
  33541. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  33542. }
  33543. function combineURLs(baseURL, relativeURL) {
  33544. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  33545. }
  33546. function buildFullPath(baseURL, requestedURL) {
  33547. if (baseURL && !isAbsoluteURL(requestedURL)) {
  33548. return combineURLs(baseURL, requestedURL);
  33549. }
  33550. return requestedURL;
  33551. }
  33552. function settle(resolve, reject, response) {
  33553. const { validateStatus } = response.config;
  33554. const status = response.statusCode;
  33555. if (status && (!validateStatus || validateStatus(status))) {
  33556. resolve(response);
  33557. } else {
  33558. reject(response);
  33559. }
  33560. }
  33561. const mergeKeys$1 = (keys, config2) => {
  33562. const config3 = {};
  33563. keys.forEach((prop) => {
  33564. if (!isUndefined(config2[prop])) {
  33565. config3[prop] = config2[prop];
  33566. }
  33567. });
  33568. return config3;
  33569. };
  33570. const adapter = (config2) => new Promise((resolve, reject) => {
  33571. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  33572. const _config = {
  33573. url: fullPath,
  33574. header: config2.header,
  33575. complete: (response) => {
  33576. config2.fullPath = fullPath;
  33577. response.config = config2;
  33578. try {
  33579. if (typeof response.data === "string") {
  33580. response.data = JSON.parse(response.data);
  33581. }
  33582. } catch (e) {
  33583. }
  33584. settle(resolve, reject, response);
  33585. }
  33586. };
  33587. let requestTask;
  33588. if (config2.method === "UPLOAD") {
  33589. delete _config.header["content-type"];
  33590. delete _config.header["Content-Type"];
  33591. const otherConfig = {
  33592. filePath: config2.filePath,
  33593. name: config2.name
  33594. };
  33595. const optionalKeys = [
  33596. "files",
  33597. "timeout",
  33598. "formData"
  33599. ];
  33600. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  33601. } else if (config2.method === "DOWNLOAD") {
  33602. if (!isUndefined(config2.timeout)) {
  33603. _config.timeout = config2.timeout;
  33604. }
  33605. requestTask = uni.downloadFile(_config);
  33606. } else {
  33607. const optionalKeys = [
  33608. "data",
  33609. "method",
  33610. "timeout",
  33611. "dataType",
  33612. "responseType",
  33613. "sslVerify",
  33614. "firstIpv4"
  33615. ];
  33616. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  33617. }
  33618. if (config2.getTask) {
  33619. config2.getTask(requestTask, config2);
  33620. }
  33621. });
  33622. const dispatchRequest = (config2) => adapter(config2);
  33623. function InterceptorManager() {
  33624. this.handlers = [];
  33625. }
  33626. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  33627. this.handlers.push({
  33628. fulfilled,
  33629. rejected
  33630. });
  33631. return this.handlers.length - 1;
  33632. };
  33633. InterceptorManager.prototype.eject = function eject(id) {
  33634. if (this.handlers[id]) {
  33635. this.handlers[id] = null;
  33636. }
  33637. };
  33638. InterceptorManager.prototype.forEach = function forEach2(fn) {
  33639. this.handlers.forEach((h) => {
  33640. if (h !== null) {
  33641. fn(h);
  33642. }
  33643. });
  33644. };
  33645. const mergeKeys = (keys, globalsConfig, config2) => {
  33646. const config3 = {};
  33647. keys.forEach((prop) => {
  33648. if (!isUndefined(config2[prop])) {
  33649. config3[prop] = config2[prop];
  33650. } else if (!isUndefined(globalsConfig[prop])) {
  33651. config3[prop] = globalsConfig[prop];
  33652. }
  33653. });
  33654. return config3;
  33655. };
  33656. const mergeConfig = (globalsConfig, config2 = {}) => {
  33657. const method = config2.method || globalsConfig.method || "GET";
  33658. let config3 = {
  33659. baseURL: globalsConfig.baseURL || "",
  33660. method,
  33661. url: config2.url || "",
  33662. params: config2.params || {},
  33663. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  33664. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  33665. };
  33666. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  33667. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  33668. if (method === "DOWNLOAD") {
  33669. if (!isUndefined(config2.timeout)) {
  33670. config3.timeout = config2.timeout;
  33671. } else if (!isUndefined(globalsConfig.timeout)) {
  33672. config3.timeout = globalsConfig.timeout;
  33673. }
  33674. } else if (method === "UPLOAD") {
  33675. delete config3.header["content-type"];
  33676. delete config3.header["Content-Type"];
  33677. const uploadKeys = [
  33678. "files",
  33679. "filePath",
  33680. "name",
  33681. "timeout",
  33682. "formData"
  33683. ];
  33684. uploadKeys.forEach((prop) => {
  33685. if (!isUndefined(config2[prop])) {
  33686. config3[prop] = config2[prop];
  33687. }
  33688. });
  33689. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  33690. config3.timeout = globalsConfig.timeout;
  33691. }
  33692. } else {
  33693. const defaultsKeys = [
  33694. "data",
  33695. "timeout",
  33696. "dataType",
  33697. "responseType",
  33698. "sslVerify",
  33699. "firstIpv4"
  33700. ];
  33701. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  33702. }
  33703. return config3;
  33704. };
  33705. const defaults = {
  33706. baseURL: "",
  33707. header: {},
  33708. method: "GET",
  33709. dataType: "json",
  33710. responseType: "text",
  33711. custom: {},
  33712. timeout: 6e4,
  33713. sslVerify: true,
  33714. firstIpv4: false,
  33715. validateStatus: function validateStatus(status) {
  33716. return status >= 200 && status < 300;
  33717. }
  33718. };
  33719. var clone = function() {
  33720. function _instanceof(obj, type2) {
  33721. return type2 != null && obj instanceof type2;
  33722. }
  33723. var nativeMap;
  33724. try {
  33725. nativeMap = Map;
  33726. } catch (_) {
  33727. nativeMap = function() {
  33728. };
  33729. }
  33730. var nativeSet;
  33731. try {
  33732. nativeSet = Set;
  33733. } catch (_) {
  33734. nativeSet = function() {
  33735. };
  33736. }
  33737. var nativePromise;
  33738. try {
  33739. nativePromise = Promise;
  33740. } catch (_) {
  33741. nativePromise = function() {
  33742. };
  33743. }
  33744. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  33745. if (typeof circular === "object") {
  33746. depth = circular.depth;
  33747. prototype = circular.prototype;
  33748. includeNonEnumerable = circular.includeNonEnumerable;
  33749. circular = circular.circular;
  33750. }
  33751. var allParents = [];
  33752. var allChildren = [];
  33753. var useBuffer = typeof Buffer != "undefined";
  33754. if (typeof circular == "undefined")
  33755. circular = true;
  33756. if (typeof depth == "undefined")
  33757. depth = Infinity;
  33758. function _clone(parent2, depth2) {
  33759. if (parent2 === null)
  33760. return null;
  33761. if (depth2 === 0)
  33762. return parent2;
  33763. var child;
  33764. var proto;
  33765. if (typeof parent2 != "object") {
  33766. return parent2;
  33767. }
  33768. if (_instanceof(parent2, nativeMap)) {
  33769. child = new nativeMap();
  33770. } else if (_instanceof(parent2, nativeSet)) {
  33771. child = new nativeSet();
  33772. } else if (_instanceof(parent2, nativePromise)) {
  33773. child = new nativePromise(function(resolve, reject) {
  33774. parent2.then(function(value2) {
  33775. resolve(_clone(value2, depth2 - 1));
  33776. }, function(err) {
  33777. reject(_clone(err, depth2 - 1));
  33778. });
  33779. });
  33780. } else if (clone2.__isArray(parent2)) {
  33781. child = [];
  33782. } else if (clone2.__isRegExp(parent2)) {
  33783. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  33784. if (parent2.lastIndex)
  33785. child.lastIndex = parent2.lastIndex;
  33786. } else if (clone2.__isDate(parent2)) {
  33787. child = new Date(parent2.getTime());
  33788. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  33789. if (Buffer.from) {
  33790. child = Buffer.from(parent2);
  33791. } else {
  33792. child = new Buffer(parent2.length);
  33793. parent2.copy(child);
  33794. }
  33795. return child;
  33796. } else if (_instanceof(parent2, Error)) {
  33797. child = Object.create(parent2);
  33798. } else {
  33799. if (typeof prototype == "undefined") {
  33800. proto = Object.getPrototypeOf(parent2);
  33801. child = Object.create(proto);
  33802. } else {
  33803. child = Object.create(prototype);
  33804. proto = prototype;
  33805. }
  33806. }
  33807. if (circular) {
  33808. var index2 = allParents.indexOf(parent2);
  33809. if (index2 != -1) {
  33810. return allChildren[index2];
  33811. }
  33812. allParents.push(parent2);
  33813. allChildren.push(child);
  33814. }
  33815. if (_instanceof(parent2, nativeMap)) {
  33816. parent2.forEach(function(value2, key) {
  33817. var keyChild = _clone(key, depth2 - 1);
  33818. var valueChild = _clone(value2, depth2 - 1);
  33819. child.set(keyChild, valueChild);
  33820. });
  33821. }
  33822. if (_instanceof(parent2, nativeSet)) {
  33823. parent2.forEach(function(value2) {
  33824. var entryChild = _clone(value2, depth2 - 1);
  33825. child.add(entryChild);
  33826. });
  33827. }
  33828. for (var i in parent2) {
  33829. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  33830. if (attrs) {
  33831. child[i] = _clone(parent2[i], depth2 - 1);
  33832. }
  33833. try {
  33834. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  33835. if (objProperty.set === "undefined") {
  33836. continue;
  33837. }
  33838. child[i] = _clone(parent2[i], depth2 - 1);
  33839. } catch (e) {
  33840. if (e instanceof TypeError) {
  33841. continue;
  33842. } else if (e instanceof ReferenceError) {
  33843. continue;
  33844. }
  33845. }
  33846. }
  33847. if (Object.getOwnPropertySymbols) {
  33848. var symbols = Object.getOwnPropertySymbols(parent2);
  33849. for (var i = 0; i < symbols.length; i++) {
  33850. var symbol = symbols[i];
  33851. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  33852. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  33853. continue;
  33854. }
  33855. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  33856. Object.defineProperty(child, symbol, descriptor);
  33857. }
  33858. }
  33859. if (includeNonEnumerable) {
  33860. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  33861. for (var i = 0; i < allPropertyNames.length; i++) {
  33862. var propertyName = allPropertyNames[i];
  33863. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  33864. if (descriptor && descriptor.enumerable) {
  33865. continue;
  33866. }
  33867. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  33868. Object.defineProperty(child, propertyName, descriptor);
  33869. }
  33870. }
  33871. return child;
  33872. }
  33873. return _clone(parent, depth);
  33874. }
  33875. clone2.clonePrototype = function clonePrototype(parent) {
  33876. if (parent === null)
  33877. return null;
  33878. var c = function() {
  33879. };
  33880. c.prototype = parent;
  33881. return new c();
  33882. };
  33883. function __objToStr(o) {
  33884. return Object.prototype.toString.call(o);
  33885. }
  33886. clone2.__objToStr = __objToStr;
  33887. function __isDate(o) {
  33888. return typeof o === "object" && __objToStr(o) === "[object Date]";
  33889. }
  33890. clone2.__isDate = __isDate;
  33891. function __isArray(o) {
  33892. return typeof o === "object" && __objToStr(o) === "[object Array]";
  33893. }
  33894. clone2.__isArray = __isArray;
  33895. function __isRegExp(o) {
  33896. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  33897. }
  33898. clone2.__isRegExp = __isRegExp;
  33899. function __getRegExpFlags(re) {
  33900. var flags = "";
  33901. if (re.global)
  33902. flags += "g";
  33903. if (re.ignoreCase)
  33904. flags += "i";
  33905. if (re.multiline)
  33906. flags += "m";
  33907. return flags;
  33908. }
  33909. clone2.__getRegExpFlags = __getRegExpFlags;
  33910. return clone2;
  33911. }();
  33912. class Request {
  33913. /**
  33914. * @param {Object} arg - 全局配置
  33915. * @param {String} arg.baseURL - 全局根路径
  33916. * @param {Object} arg.header - 全局header
  33917. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  33918. * @param {String} arg.dataType = [json] - 全局默认的dataType
  33919. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  33920. * @param {Object} arg.custom - 全局默认的自定义参数
  33921. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  33922. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  33923. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  33924. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  33925. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  33926. */
  33927. constructor(arg = {}) {
  33928. if (!isPlainObject(arg)) {
  33929. arg = {};
  33930. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  33931. }
  33932. this.config = clone({ ...defaults, ...arg });
  33933. this.interceptors = {
  33934. request: new InterceptorManager(),
  33935. response: new InterceptorManager()
  33936. };
  33937. }
  33938. /**
  33939. * @Function
  33940. * @param {Request~setConfigCallback} f - 设置全局默认配置
  33941. */
  33942. setConfig(f) {
  33943. this.config = f(this.config);
  33944. }
  33945. middleware(config2) {
  33946. config2 = mergeConfig(this.config, config2);
  33947. const chain = [dispatchRequest, void 0];
  33948. let promise2 = Promise.resolve(config2);
  33949. this.interceptors.request.forEach((interceptor) => {
  33950. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  33951. });
  33952. this.interceptors.response.forEach((interceptor) => {
  33953. chain.push(interceptor.fulfilled, interceptor.rejected);
  33954. });
  33955. while (chain.length) {
  33956. promise2 = promise2.then(chain.shift(), chain.shift());
  33957. }
  33958. return promise2;
  33959. }
  33960. /**
  33961. * @Function
  33962. * @param {Object} config - 请求配置项
  33963. * @prop {String} options.url - 请求路径
  33964. * @prop {Object} options.data - 请求参数
  33965. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  33966. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  33967. * @prop {Object} [options.header = config.header] - 请求header
  33968. * @prop {Object} [options.method = config.method] - 请求方法
  33969. * @returns {Promise<unknown>}
  33970. */
  33971. request(config2 = {}) {
  33972. return this.middleware(config2);
  33973. }
  33974. get(url2, options = {}) {
  33975. return this.middleware({
  33976. url: url2,
  33977. method: "GET",
  33978. ...options
  33979. });
  33980. }
  33981. post(url2, data, options = {}) {
  33982. return this.middleware({
  33983. url: url2,
  33984. data,
  33985. method: "POST",
  33986. ...options
  33987. });
  33988. }
  33989. put(url2, data, options = {}) {
  33990. return this.middleware({
  33991. url: url2,
  33992. data,
  33993. method: "PUT",
  33994. ...options
  33995. });
  33996. }
  33997. delete(url2, data, options = {}) {
  33998. return this.middleware({
  33999. url: url2,
  34000. data,
  34001. method: "DELETE",
  34002. ...options
  34003. });
  34004. }
  34005. options(url2, data, options = {}) {
  34006. return this.middleware({
  34007. url: url2,
  34008. data,
  34009. method: "OPTIONS",
  34010. ...options
  34011. });
  34012. }
  34013. upload(url2, config2 = {}) {
  34014. config2.url = url2;
  34015. config2.method = "UPLOAD";
  34016. return this.middleware(config2);
  34017. }
  34018. download(url2, config2 = {}) {
  34019. config2.url = url2;
  34020. config2.method = "DOWNLOAD";
  34021. return this.middleware(config2);
  34022. }
  34023. }
  34024. class Router {
  34025. constructor() {
  34026. this.config = {
  34027. type: "navigateTo",
  34028. url: "",
  34029. delta: 1,
  34030. // navigateBack页面后退时,回退的层数
  34031. params: {},
  34032. // 传递的参数
  34033. animationType: "pop-in",
  34034. // 窗口动画,只在APP有效
  34035. animationDuration: 300,
  34036. // 窗口动画持续时间,单位毫秒,只在APP有效
  34037. intercept: false
  34038. // 是否需要拦截
  34039. };
  34040. this.route = this.route.bind(this);
  34041. }
  34042. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  34043. addRootPath(url2) {
  34044. return url2[0] === "/" ? url2 : `/${url2}`;
  34045. }
  34046. // 整合路由参数
  34047. mixinParam(url2, params) {
  34048. url2 = url2 && this.addRootPath(url2);
  34049. let query = "";
  34050. if (/.*\/.*\?.*=.*/.test(url2)) {
  34051. query = uni.$u.queryParams(params, false);
  34052. return url2 += `&${query}`;
  34053. }
  34054. query = uni.$u.queryParams(params);
  34055. return url2 += query;
  34056. }
  34057. // 对外的方法名称
  34058. async route(options = {}, params = {}) {
  34059. let mergeConfig2 = {};
  34060. if (typeof options === "string") {
  34061. mergeConfig2.url = this.mixinParam(options, params);
  34062. mergeConfig2.type = "navigateTo";
  34063. } else {
  34064. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  34065. mergeConfig2.url = this.mixinParam(options.url, options.params);
  34066. }
  34067. if (mergeConfig2.url === uni.$u.page())
  34068. return;
  34069. if (params.intercept) {
  34070. this.config.intercept = params.intercept;
  34071. }
  34072. mergeConfig2.params = params;
  34073. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  34074. if (typeof uni.$u.routeIntercept === "function") {
  34075. const isNext = await new Promise((resolve, reject) => {
  34076. uni.$u.routeIntercept(mergeConfig2, resolve);
  34077. });
  34078. isNext && this.openPage(mergeConfig2);
  34079. } else {
  34080. this.openPage(mergeConfig2);
  34081. }
  34082. }
  34083. // 执行路由跳转
  34084. openPage(config2) {
  34085. const {
  34086. url: url2,
  34087. type: type2,
  34088. delta,
  34089. animationType,
  34090. animationDuration
  34091. } = config2;
  34092. if (config2.type == "navigateTo" || config2.type == "to") {
  34093. uni.navigateTo({
  34094. url: url2,
  34095. animationType,
  34096. animationDuration
  34097. });
  34098. }
  34099. if (config2.type == "redirectTo" || config2.type == "redirect") {
  34100. uni.redirectTo({
  34101. url: url2
  34102. });
  34103. }
  34104. if (config2.type == "switchTab" || config2.type == "tab") {
  34105. uni.switchTab({
  34106. url: url2
  34107. });
  34108. }
  34109. if (config2.type == "reLaunch" || config2.type == "launch") {
  34110. uni.reLaunch({
  34111. url: url2
  34112. });
  34113. }
  34114. if (config2.type == "navigateBack" || config2.type == "back") {
  34115. uni.navigateBack({
  34116. delta
  34117. });
  34118. }
  34119. }
  34120. }
  34121. const route = new Router().route;
  34122. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  34123. const startRGB = hexToRgb(startColor, false);
  34124. const startR = startRGB[0];
  34125. const startG = startRGB[1];
  34126. const startB = startRGB[2];
  34127. const endRGB = hexToRgb(endColor, false);
  34128. const endR = endRGB[0];
  34129. const endG = endRGB[1];
  34130. const endB = endRGB[2];
  34131. const sR = (endR - startR) / step;
  34132. const sG = (endG - startG) / step;
  34133. const sB = (endB - startB) / step;
  34134. const colorArr = [];
  34135. for (let i = 0; i < step; i++) {
  34136. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  34137. if (i === 0)
  34138. hex = rgbToHex(startColor);
  34139. if (i === step - 1)
  34140. hex = rgbToHex(endColor);
  34141. colorArr.push(hex);
  34142. }
  34143. return colorArr;
  34144. }
  34145. function hexToRgb(sColor, str = true) {
  34146. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  34147. sColor = String(sColor).toLowerCase();
  34148. if (sColor && reg.test(sColor)) {
  34149. if (sColor.length === 4) {
  34150. let sColorNew = "#";
  34151. for (let i = 1; i < 4; i += 1) {
  34152. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  34153. }
  34154. sColor = sColorNew;
  34155. }
  34156. const sColorChange = [];
  34157. for (let i = 1; i < 7; i += 2) {
  34158. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  34159. }
  34160. if (!str) {
  34161. return sColorChange;
  34162. }
  34163. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  34164. }
  34165. if (/^(rgb|RGB)/.test(sColor)) {
  34166. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  34167. return arr.map((val) => Number(val));
  34168. }
  34169. return sColor;
  34170. }
  34171. function rgbToHex(rgb) {
  34172. const _this = rgb;
  34173. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  34174. if (/^(rgb|RGB)/.test(_this)) {
  34175. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  34176. let strHex = "#";
  34177. for (let i = 0; i < aColor.length; i++) {
  34178. let hex = Number(aColor[i]).toString(16);
  34179. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  34180. if (hex === "0") {
  34181. hex += hex;
  34182. }
  34183. strHex += hex;
  34184. }
  34185. if (strHex.length !== 7) {
  34186. strHex = _this;
  34187. }
  34188. return strHex;
  34189. }
  34190. if (reg.test(_this)) {
  34191. const aNum = _this.replace(/#/, "").split("");
  34192. if (aNum.length === 6) {
  34193. return _this;
  34194. }
  34195. if (aNum.length === 3) {
  34196. let numHex = "#";
  34197. for (let i = 0; i < aNum.length; i += 1) {
  34198. numHex += aNum[i] + aNum[i];
  34199. }
  34200. return numHex;
  34201. }
  34202. } else {
  34203. return _this;
  34204. }
  34205. }
  34206. function colorToRgba(color2, alpha) {
  34207. color2 = rgbToHex(color2);
  34208. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  34209. let sColor = String(color2).toLowerCase();
  34210. if (sColor && reg.test(sColor)) {
  34211. if (sColor.length === 4) {
  34212. let sColorNew = "#";
  34213. for (let i = 1; i < 4; i += 1) {
  34214. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  34215. }
  34216. sColor = sColorNew;
  34217. }
  34218. const sColorChange = [];
  34219. for (let i = 1; i < 7; i += 2) {
  34220. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  34221. }
  34222. return `rgba(${sColorChange.join(",")},${alpha})`;
  34223. }
  34224. return sColor;
  34225. }
  34226. const colorGradient$1 = {
  34227. colorGradient,
  34228. hexToRgb,
  34229. rgbToHex,
  34230. colorToRgba
  34231. };
  34232. function email(value2) {
  34233. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  34234. }
  34235. function mobile(value2) {
  34236. return /^1[23456789]\d{9}$/.test(value2);
  34237. }
  34238. function url(value2) {
  34239. 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);
  34240. }
  34241. function date(value2) {
  34242. if (!value2)
  34243. return false;
  34244. if (number(value2))
  34245. value2 = +value2;
  34246. return !/Invalid|NaN/.test(new Date(value2).toString());
  34247. }
  34248. function dateISO(value2) {
  34249. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  34250. }
  34251. function number(value2) {
  34252. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  34253. }
  34254. function string(value2) {
  34255. return typeof value2 === "string";
  34256. }
  34257. function digits(value2) {
  34258. return /^\d+$/.test(value2);
  34259. }
  34260. function idCard(value2) {
  34261. 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(
  34262. value2
  34263. );
  34264. }
  34265. function carNo(value2) {
  34266. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  34267. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  34268. if (value2.length === 7) {
  34269. return creg.test(value2);
  34270. }
  34271. if (value2.length === 8) {
  34272. return xreg.test(value2);
  34273. }
  34274. return false;
  34275. }
  34276. function amount(value2) {
  34277. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  34278. }
  34279. function chinese(value2) {
  34280. const reg = /^[\u4e00-\u9fa5]+$/gi;
  34281. return reg.test(value2);
  34282. }
  34283. function letter(value2) {
  34284. return /^[a-zA-Z]*$/.test(value2);
  34285. }
  34286. function enOrNum(value2) {
  34287. const reg = /^[0-9a-zA-Z]*$/g;
  34288. return reg.test(value2);
  34289. }
  34290. function contains(value2, param) {
  34291. return value2.indexOf(param) >= 0;
  34292. }
  34293. function range$1(value2, param) {
  34294. return value2 >= param[0] && value2 <= param[1];
  34295. }
  34296. function rangeLength(value2, param) {
  34297. return value2.length >= param[0] && value2.length <= param[1];
  34298. }
  34299. function landline(value2) {
  34300. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  34301. return reg.test(value2);
  34302. }
  34303. function empty(value2) {
  34304. switch (typeof value2) {
  34305. case "undefined":
  34306. return true;
  34307. case "string":
  34308. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  34309. return true;
  34310. break;
  34311. case "boolean":
  34312. if (!value2)
  34313. return true;
  34314. break;
  34315. case "number":
  34316. if (value2 === 0 || isNaN(value2))
  34317. return true;
  34318. break;
  34319. case "object":
  34320. if (value2 === null || value2.length === 0)
  34321. return true;
  34322. for (const i in value2) {
  34323. return false;
  34324. }
  34325. return true;
  34326. }
  34327. return false;
  34328. }
  34329. function jsonString(value2) {
  34330. if (typeof value2 === "string") {
  34331. try {
  34332. const obj = JSON.parse(value2);
  34333. if (typeof obj === "object" && obj) {
  34334. return true;
  34335. }
  34336. return false;
  34337. } catch (e) {
  34338. return false;
  34339. }
  34340. }
  34341. return false;
  34342. }
  34343. function array(value2) {
  34344. if (typeof Array.isArray === "function") {
  34345. return Array.isArray(value2);
  34346. }
  34347. return Object.prototype.toString.call(value2) === "[object Array]";
  34348. }
  34349. function object(value2) {
  34350. return Object.prototype.toString.call(value2) === "[object Object]";
  34351. }
  34352. function code$1(value2, len = 6) {
  34353. return new RegExp(`^\\d{${len}}$`).test(value2);
  34354. }
  34355. function func(value2) {
  34356. return typeof value2 === "function";
  34357. }
  34358. function promise(value2) {
  34359. return object(value2) && func(value2.then) && func(value2.catch);
  34360. }
  34361. function image(value2) {
  34362. const newValue = value2.split("?")[0];
  34363. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  34364. return IMAGE_REGEXP.test(newValue);
  34365. }
  34366. function video(value2) {
  34367. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  34368. return VIDEO_REGEXP.test(value2);
  34369. }
  34370. function regExp(o) {
  34371. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  34372. }
  34373. const test = {
  34374. email,
  34375. mobile,
  34376. url,
  34377. date,
  34378. dateISO,
  34379. number,
  34380. digits,
  34381. idCard,
  34382. carNo,
  34383. amount,
  34384. chinese,
  34385. letter,
  34386. enOrNum,
  34387. contains,
  34388. range: range$1,
  34389. rangeLength,
  34390. empty,
  34391. isEmpty: empty,
  34392. jsonString,
  34393. landline,
  34394. object,
  34395. array,
  34396. code: code$1,
  34397. func,
  34398. promise,
  34399. video,
  34400. image,
  34401. regExp,
  34402. string
  34403. };
  34404. let timeout = null;
  34405. function debounce(func2, wait = 500, immediate = false) {
  34406. if (timeout !== null)
  34407. clearTimeout(timeout);
  34408. if (immediate) {
  34409. const callNow = !timeout;
  34410. timeout = setTimeout(() => {
  34411. timeout = null;
  34412. }, wait);
  34413. if (callNow)
  34414. typeof func2 === "function" && func2();
  34415. } else {
  34416. timeout = setTimeout(() => {
  34417. typeof func2 === "function" && func2();
  34418. }, wait);
  34419. }
  34420. }
  34421. let flag;
  34422. function throttle(func2, wait = 500, immediate = true) {
  34423. if (immediate) {
  34424. if (!flag) {
  34425. flag = true;
  34426. typeof func2 === "function" && func2();
  34427. setTimeout(() => {
  34428. flag = false;
  34429. }, wait);
  34430. }
  34431. } else if (!flag) {
  34432. flag = true;
  34433. setTimeout(() => {
  34434. flag = false;
  34435. typeof func2 === "function" && func2();
  34436. }, wait);
  34437. }
  34438. }
  34439. function strip(num, precision = 15) {
  34440. return +parseFloat(Number(num).toPrecision(precision));
  34441. }
  34442. function digitLength(num) {
  34443. const eSplit = num.toString().split(/[eE]/);
  34444. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  34445. return len > 0 ? len : 0;
  34446. }
  34447. function float2Fixed(num) {
  34448. if (num.toString().indexOf("e") === -1) {
  34449. return Number(num.toString().replace(".", ""));
  34450. }
  34451. const dLen = digitLength(num);
  34452. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  34453. }
  34454. function checkBoundary(num) {
  34455. {
  34456. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  34457. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  34458. }
  34459. }
  34460. }
  34461. function iteratorOperation(arr, operation) {
  34462. const [num1, num2, ...others] = arr;
  34463. let res2 = operation(num1, num2);
  34464. others.forEach((num) => {
  34465. res2 = operation(res2, num);
  34466. });
  34467. return res2;
  34468. }
  34469. function times(...nums) {
  34470. if (nums.length > 2) {
  34471. return iteratorOperation(nums, times);
  34472. }
  34473. const [num1, num2] = nums;
  34474. const num1Changed = float2Fixed(num1);
  34475. const num2Changed = float2Fixed(num2);
  34476. const baseNum = digitLength(num1) + digitLength(num2);
  34477. const leftValue = num1Changed * num2Changed;
  34478. checkBoundary(leftValue);
  34479. return leftValue / Math.pow(10, baseNum);
  34480. }
  34481. function divide(...nums) {
  34482. if (nums.length > 2) {
  34483. return iteratorOperation(nums, divide);
  34484. }
  34485. const [num1, num2] = nums;
  34486. const num1Changed = float2Fixed(num1);
  34487. const num2Changed = float2Fixed(num2);
  34488. checkBoundary(num1Changed);
  34489. checkBoundary(num2Changed);
  34490. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  34491. }
  34492. function round(num, ratio) {
  34493. const base = Math.pow(10, ratio);
  34494. let result = divide(Math.round(Math.abs(times(num, base))), base);
  34495. if (num < 0 && result !== 0) {
  34496. result = times(result, -1);
  34497. }
  34498. return result;
  34499. }
  34500. function range(min = 0, max = 0, value2 = 0) {
  34501. return Math.max(min, Math.min(max, Number(value2)));
  34502. }
  34503. function getPx(value2, unit = false) {
  34504. if (test.number(value2)) {
  34505. return unit ? `${value2}px` : Number(value2);
  34506. }
  34507. if (/(rpx|upx)$/.test(value2)) {
  34508. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  34509. }
  34510. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  34511. }
  34512. function sleep(value2 = 30) {
  34513. return new Promise((resolve) => {
  34514. setTimeout(() => {
  34515. resolve();
  34516. }, value2);
  34517. });
  34518. }
  34519. function os() {
  34520. return uni.getSystemInfoSync().platform.toLowerCase();
  34521. }
  34522. function sys() {
  34523. return uni.getSystemInfoSync();
  34524. }
  34525. function random(min, max) {
  34526. if (min >= 0 && max > 0 && max >= min) {
  34527. const gab = max - min + 1;
  34528. return Math.floor(Math.random() * gab + min);
  34529. }
  34530. return 0;
  34531. }
  34532. function guid(len = 32, firstU = true, radix = null) {
  34533. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  34534. const uuid = [];
  34535. radix = radix || chars.length;
  34536. if (len) {
  34537. for (let i = 0; i < len; i++)
  34538. uuid[i] = chars[0 | Math.random() * radix];
  34539. } else {
  34540. let r;
  34541. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  34542. uuid[14] = "4";
  34543. for (let i = 0; i < 36; i++) {
  34544. if (!uuid[i]) {
  34545. r = 0 | Math.random() * 16;
  34546. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  34547. }
  34548. }
  34549. }
  34550. if (firstU) {
  34551. uuid.shift();
  34552. return `u${uuid.join("")}`;
  34553. }
  34554. return uuid.join("");
  34555. }
  34556. function $parent(name = void 0) {
  34557. let parent = this.$parent;
  34558. while (parent) {
  34559. if (parent.$options && parent.$options.name !== name) {
  34560. parent = parent.$parent;
  34561. } else {
  34562. return parent;
  34563. }
  34564. }
  34565. return false;
  34566. }
  34567. function addStyle(customStyle, target = "object") {
  34568. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  34569. return customStyle;
  34570. }
  34571. if (target === "object") {
  34572. customStyle = trim(customStyle);
  34573. const styleArray = customStyle.split(";");
  34574. const style = {};
  34575. for (let i = 0; i < styleArray.length; i++) {
  34576. if (styleArray[i]) {
  34577. const item = styleArray[i].split(":");
  34578. style[trim(item[0])] = trim(item[1]);
  34579. }
  34580. }
  34581. return style;
  34582. }
  34583. let string2 = "";
  34584. for (const i in customStyle) {
  34585. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  34586. string2 += `${key}:${customStyle[i]};`;
  34587. }
  34588. return trim(string2);
  34589. }
  34590. function addUnit(value2 = "auto", unit = "") {
  34591. if (!unit) {
  34592. unit = uni.$u.config.unit || "px";
  34593. }
  34594. value2 = String(value2);
  34595. return test.number(value2) ? `${value2}${unit}` : value2;
  34596. }
  34597. function deepClone(obj) {
  34598. if ([null, void 0, NaN, false].includes(obj))
  34599. return obj;
  34600. if (typeof obj !== "object" && typeof obj !== "function") {
  34601. return obj;
  34602. }
  34603. const o = test.array(obj) ? [] : {};
  34604. for (const i in obj) {
  34605. if (obj.hasOwnProperty(i)) {
  34606. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  34607. }
  34608. }
  34609. return o;
  34610. }
  34611. function deepMerge(target = {}, source = {}) {
  34612. target = deepClone(target);
  34613. if (typeof target !== "object" || typeof source !== "object")
  34614. return false;
  34615. for (const prop in source) {
  34616. if (!source.hasOwnProperty(prop))
  34617. continue;
  34618. if (prop in target) {
  34619. if (typeof target[prop] !== "object") {
  34620. target[prop] = source[prop];
  34621. } else if (typeof source[prop] !== "object") {
  34622. target[prop] = source[prop];
  34623. } else if (target[prop].concat && source[prop].concat) {
  34624. target[prop] = target[prop].concat(source[prop]);
  34625. } else {
  34626. target[prop] = deepMerge(target[prop], source[prop]);
  34627. }
  34628. } else {
  34629. target[prop] = source[prop];
  34630. }
  34631. }
  34632. return target;
  34633. }
  34634. function error(err) {
  34635. {
  34636. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  34637. }
  34638. }
  34639. function randomArray(array3 = []) {
  34640. return array3.sort(() => Math.random() - 0.5);
  34641. }
  34642. if (!String.prototype.padStart) {
  34643. String.prototype.padStart = function(maxLength, fillString = " ") {
  34644. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  34645. throw new TypeError(
  34646. "fillString must be String"
  34647. );
  34648. }
  34649. const str = this;
  34650. if (str.length >= maxLength)
  34651. return String(str);
  34652. const fillLength = maxLength - str.length;
  34653. let times2 = Math.ceil(fillLength / fillString.length);
  34654. while (times2 >>= 1) {
  34655. fillString += fillString;
  34656. if (times2 === 1) {
  34657. fillString += fillString;
  34658. }
  34659. }
  34660. return fillString.slice(0, fillLength) + str;
  34661. };
  34662. }
  34663. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  34664. let date3;
  34665. if (!dateTime) {
  34666. date3 = /* @__PURE__ */ new Date();
  34667. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  34668. date3 = new Date(dateTime * 1e3);
  34669. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  34670. date3 = new Date(Number(dateTime));
  34671. } else {
  34672. date3 = new Date(
  34673. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  34674. );
  34675. }
  34676. const timeSource = {
  34677. "y": date3.getFullYear().toString(),
  34678. // 年
  34679. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  34680. // 月
  34681. "d": date3.getDate().toString().padStart(2, "0"),
  34682. // 日
  34683. "h": date3.getHours().toString().padStart(2, "0"),
  34684. // 时
  34685. "M": date3.getMinutes().toString().padStart(2, "0"),
  34686. // 分
  34687. "s": date3.getSeconds().toString().padStart(2, "0")
  34688. // 秒
  34689. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  34690. };
  34691. for (const key in timeSource) {
  34692. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  34693. if (ret) {
  34694. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  34695. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  34696. }
  34697. }
  34698. return formatStr;
  34699. }
  34700. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  34701. if (timestamp == null)
  34702. timestamp = Number(/* @__PURE__ */ new Date());
  34703. timestamp = parseInt(timestamp);
  34704. if (timestamp.toString().length == 10)
  34705. timestamp *= 1e3;
  34706. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  34707. timer = parseInt(timer / 1e3);
  34708. let tips = "";
  34709. switch (true) {
  34710. case timer < 300:
  34711. tips = "刚刚";
  34712. break;
  34713. case (timer >= 300 && timer < 3600):
  34714. tips = `${parseInt(timer / 60)}分钟前`;
  34715. break;
  34716. case (timer >= 3600 && timer < 86400):
  34717. tips = `${parseInt(timer / 3600)}小时前`;
  34718. break;
  34719. case (timer >= 86400 && timer < 2592e3):
  34720. tips = `${parseInt(timer / 86400)}天前`;
  34721. break;
  34722. default:
  34723. if (format2 === false) {
  34724. if (timer >= 2592e3 && timer < 365 * 86400) {
  34725. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  34726. } else {
  34727. tips = `${parseInt(timer / (86400 * 365))}年前`;
  34728. }
  34729. } else {
  34730. tips = timeFormat(timestamp, format2);
  34731. }
  34732. }
  34733. return tips;
  34734. }
  34735. function trim(str, pos = "both") {
  34736. str = String(str);
  34737. if (pos == "both") {
  34738. return str.replace(/^\s+|\s+$/g, "");
  34739. }
  34740. if (pos == "left") {
  34741. return str.replace(/^\s*/, "");
  34742. }
  34743. if (pos == "right") {
  34744. return str.replace(/(\s*$)/g, "");
  34745. }
  34746. if (pos == "all") {
  34747. return str.replace(/\s+/g, "");
  34748. }
  34749. return str;
  34750. }
  34751. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  34752. const prefix = isPrefix ? "?" : "";
  34753. const _result = [];
  34754. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  34755. arrayFormat = "brackets";
  34756. for (const key in data) {
  34757. const value2 = data[key];
  34758. if (["", void 0, null].indexOf(value2) >= 0) {
  34759. continue;
  34760. }
  34761. if (value2.constructor === Array) {
  34762. switch (arrayFormat) {
  34763. case "indices":
  34764. for (let i = 0; i < value2.length; i++) {
  34765. _result.push(`${key}[${i}]=${value2[i]}`);
  34766. }
  34767. break;
  34768. case "brackets":
  34769. value2.forEach((_value) => {
  34770. _result.push(`${key}[]=${_value}`);
  34771. });
  34772. break;
  34773. case "repeat":
  34774. value2.forEach((_value) => {
  34775. _result.push(`${key}=${_value}`);
  34776. });
  34777. break;
  34778. case "comma":
  34779. let commaStr = "";
  34780. value2.forEach((_value) => {
  34781. commaStr += (commaStr ? "," : "") + _value;
  34782. });
  34783. _result.push(`${key}=${commaStr}`);
  34784. break;
  34785. default:
  34786. value2.forEach((_value) => {
  34787. _result.push(`${key}[]=${_value}`);
  34788. });
  34789. }
  34790. } else {
  34791. _result.push(`${key}=${value2}`);
  34792. }
  34793. }
  34794. return _result.length ? prefix + _result.join("&") : "";
  34795. }
  34796. function toast(title, duration = 2e3) {
  34797. uni.showToast({
  34798. title: String(title),
  34799. icon: "none",
  34800. duration
  34801. });
  34802. }
  34803. function type2icon(type2 = "success", fill = false) {
  34804. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  34805. type2 = "success";
  34806. let iconName = "";
  34807. switch (type2) {
  34808. case "primary":
  34809. iconName = "info-circle";
  34810. break;
  34811. case "info":
  34812. iconName = "info-circle";
  34813. break;
  34814. case "error":
  34815. iconName = "close-circle";
  34816. break;
  34817. case "warning":
  34818. iconName = "error-circle";
  34819. break;
  34820. case "success":
  34821. iconName = "checkmark-circle";
  34822. break;
  34823. default:
  34824. iconName = "checkmark-circle";
  34825. }
  34826. if (fill)
  34827. iconName += "-fill";
  34828. return iconName;
  34829. }
  34830. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  34831. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  34832. const n = !isFinite(+number3) ? 0 : +number3;
  34833. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  34834. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  34835. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  34836. let s = "";
  34837. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  34838. const re = /(-?\d+)(\d{3})/;
  34839. while (re.test(s[0])) {
  34840. s[0] = s[0].replace(re, `$1${sep}$2`);
  34841. }
  34842. if ((s[1] || "").length < prec) {
  34843. s[1] = s[1] || "";
  34844. s[1] += new Array(prec - s[1].length + 1).join("0");
  34845. }
  34846. return s.join(dec);
  34847. }
  34848. function getDuration(value2, unit = true) {
  34849. const valueNum = parseInt(value2);
  34850. if (unit) {
  34851. if (/s$/.test(value2))
  34852. return value2;
  34853. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  34854. }
  34855. if (/ms$/.test(value2))
  34856. return valueNum;
  34857. if (/s$/.test(value2))
  34858. return valueNum > 30 ? valueNum : valueNum * 1e3;
  34859. return valueNum;
  34860. }
  34861. function padZero(value2) {
  34862. return `00${value2}`.slice(-2);
  34863. }
  34864. function formValidate(instance, event) {
  34865. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  34866. const form = uni.$u.$parent.call(instance, "u-form");
  34867. if (formItem && form) {
  34868. form.validateField(formItem.prop, () => {
  34869. }, event);
  34870. }
  34871. }
  34872. function getProperty(obj, key) {
  34873. if (!obj) {
  34874. return;
  34875. }
  34876. if (typeof key !== "string" || key === "") {
  34877. return "";
  34878. }
  34879. if (key.indexOf(".") !== -1) {
  34880. const keys = key.split(".");
  34881. let firstObj = obj[keys[0]] || {};
  34882. for (let i = 1; i < keys.length; i++) {
  34883. if (firstObj) {
  34884. firstObj = firstObj[keys[i]];
  34885. }
  34886. }
  34887. return firstObj;
  34888. }
  34889. return obj[key];
  34890. }
  34891. function setProperty(obj, key, value2) {
  34892. if (!obj) {
  34893. return;
  34894. }
  34895. const inFn = function(_obj, keys, v) {
  34896. if (keys.length === 1) {
  34897. _obj[keys[0]] = v;
  34898. return;
  34899. }
  34900. while (keys.length > 1) {
  34901. const k = keys[0];
  34902. if (!_obj[k] || typeof _obj[k] !== "object") {
  34903. _obj[k] = {};
  34904. }
  34905. keys.shift();
  34906. inFn(_obj[k], keys, v);
  34907. }
  34908. };
  34909. if (typeof key !== "string" || key === "")
  34910. ;
  34911. else if (key.indexOf(".") !== -1) {
  34912. const keys = key.split(".");
  34913. inFn(obj, keys, value2);
  34914. } else {
  34915. obj[key] = value2;
  34916. }
  34917. }
  34918. function page() {
  34919. const pages2 = getCurrentPages();
  34920. return `/${pages2[pages2.length - 1].route || ""}`;
  34921. }
  34922. function pages() {
  34923. const pages2 = getCurrentPages();
  34924. return pages2;
  34925. }
  34926. function setConfig({
  34927. props: props2 = {},
  34928. config: config2 = {},
  34929. color: color2 = {},
  34930. zIndex: zIndex2 = {}
  34931. }) {
  34932. const {
  34933. deepMerge: deepMerge2
  34934. } = uni.$u;
  34935. uni.$u.config = deepMerge2(uni.$u.config, config2);
  34936. uni.$u.props = deepMerge2(uni.$u.props, props2);
  34937. uni.$u.color = deepMerge2(uni.$u.color, color2);
  34938. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  34939. }
  34940. const index = {
  34941. range,
  34942. getPx,
  34943. sleep,
  34944. os,
  34945. sys,
  34946. random,
  34947. guid,
  34948. $parent,
  34949. addStyle,
  34950. addUnit,
  34951. deepClone,
  34952. deepMerge,
  34953. error,
  34954. randomArray,
  34955. timeFormat,
  34956. timeFrom,
  34957. trim,
  34958. queryParams,
  34959. toast,
  34960. type2icon,
  34961. priceFormat,
  34962. getDuration,
  34963. padZero,
  34964. formValidate,
  34965. getProperty,
  34966. setProperty,
  34967. page,
  34968. pages,
  34969. setConfig
  34970. };
  34971. const zIndex = {
  34972. toast: 10090,
  34973. noNetwork: 10080,
  34974. // popup包含popup,actionsheet,keyboard,picker的值
  34975. popup: 10075,
  34976. mask: 10070,
  34977. navbar: 980,
  34978. topTips: 975,
  34979. sticky: 970,
  34980. indexListSticky: 965
  34981. };
  34982. let platform = "none";
  34983. platform = "vue3";
  34984. platform = "plus";
  34985. const platform$1 = platform;
  34986. const $u = {
  34987. route,
  34988. date: index.timeFormat,
  34989. // 另名date
  34990. colorGradient: colorGradient$1.colorGradient,
  34991. hexToRgb: colorGradient$1.hexToRgb,
  34992. rgbToHex: colorGradient$1.rgbToHex,
  34993. colorToRgba: colorGradient$1.colorToRgba,
  34994. test,
  34995. type: ["primary", "success", "error", "warning", "info"],
  34996. http: new Request(),
  34997. config,
  34998. // uView配置信息相关,比如版本号
  34999. zIndex,
  35000. debounce,
  35001. throttle,
  35002. mixin,
  35003. mpMixin,
  35004. props: props$E,
  35005. ...index,
  35006. color,
  35007. platform: platform$1
  35008. };
  35009. uni.$u = $u;
  35010. const install = (Vue2) => {
  35011. Vue2.config.globalProperties.$u = $u;
  35012. Vue2.config.globalProperties.$nextTick = (cb) => {
  35013. cb();
  35014. };
  35015. Vue2.mixin(mixin);
  35016. };
  35017. const uviewPlus = {
  35018. install
  35019. };
  35020. const share = {
  35021. data() {
  35022. return {
  35023. // 默认的全局分享内容
  35024. share: {
  35025. title: "标题",
  35026. path: "/pages/home/home",
  35027. // 这里是分享的页面
  35028. imageUrl: ""
  35029. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  35030. }
  35031. };
  35032. },
  35033. // 定义全局分享
  35034. // 1.发送给朋友
  35035. onShareAppMessage(res2) {
  35036. return {
  35037. title: this.share.title,
  35038. path: this.share.path,
  35039. imageUrl: this.share.imageUrl
  35040. };
  35041. },
  35042. //2.分享到朋友圈
  35043. onShareTimeline(res2) {
  35044. return {
  35045. title: this.share.title,
  35046. path: this.share.path,
  35047. imageUrl: this.share.imageUrl
  35048. };
  35049. }
  35050. };
  35051. let ttsModule = new VolumeTTS();
  35052. useInit();
  35053. uni.$u.ttsModule = ttsModule;
  35054. uni.$u.useGlobalEvent = useGlobalEvent;
  35055. function createApp() {
  35056. const app = vue.createVueApp(App);
  35057. initRequest();
  35058. const pinia2 = createPinia();
  35059. app.use(pinia2).use(uviewPlus);
  35060. app.mixin(share);
  35061. return {
  35062. app,
  35063. pinia: pinia2
  35064. };
  35065. }
  35066. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  35067. uni.Vuex = __Vuex__;
  35068. uni.Pinia = __Pinia__;
  35069. __app__.provide("__globalStyles", __uniConfig.styles);
  35070. __app__._component.mpType = "app";
  35071. __app__._component.render = () => {
  35072. };
  35073. __app__.mount("#app");
  35074. })(Vue);