app-service.js 1.2 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544
  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$24 = {
  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$23(_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$24, [["render", _sfc_render$23], ["__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$23 = {
  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$22(_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$23, [["render", _sfc_render$22], ["__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$22 = {
  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$21(_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$22, [["render", _sfc_render$21], ["__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$21 = {
  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$20(_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$21, [["render", _sfc_render$20], ["__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$20 = {
  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$20, [["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$1_(_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$1_], ["__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$1_ = {
  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$1Z(_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$1_, [["render", _sfc_render$1Z], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  4485. const _sfc_main$1Z = {
  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$1Y(_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$1Z, [["render", _sfc_render$1Y], ["__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$1Y = {
  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 { proxy } = vue.getCurrentInstance();
  4550. const formData = vue.reactive({
  4551. username: "",
  4552. password: "",
  4553. code: ""
  4554. });
  4555. const uForm = vue.ref(null);
  4556. const isCountingDown = vue.ref(false);
  4557. const countdown = vue.ref(60);
  4558. const countDownText = vue.ref("获取验证码");
  4559. const startCountDown = () => {
  4560. isCountingDown.value = true;
  4561. countdown.value = 60;
  4562. countDownText.value = `${countdown.value}秒重发`;
  4563. const timer = setInterval(() => {
  4564. countdown.value--;
  4565. countDownText.value = `${countdown.value}秒重发`;
  4566. if (countdown.value <= 0) {
  4567. clearInterval(timer);
  4568. isCountingDown.value = false;
  4569. countDownText.value = "重新发送";
  4570. }
  4571. }, 1e3);
  4572. };
  4573. const getVerifyCode = () => {
  4574. if (isCountingDown.value)
  4575. return;
  4576. if (!formData.username)
  4577. return uni.$u.toast("请输入用户名");
  4578. if (!formData.password)
  4579. return uni.$u.toast("请输入密码");
  4580. let data = {
  4581. username: formData.username,
  4582. password: formData.password
  4583. };
  4584. uni.showLoading({
  4585. mask: true,
  4586. title: "发送中..."
  4587. });
  4588. uni.$u.http.post("/app/appUser/sendMobileCode", data).then((res2) => {
  4589. if (res2.code == 200) {
  4590. uni.showToast({
  4591. title: "验证码发送成功,请注意查收",
  4592. icon: "none"
  4593. });
  4594. startCountDown();
  4595. } else {
  4596. uni.$u.toast(res2.msg);
  4597. }
  4598. }).finally(() => uni.hideLoading());
  4599. };
  4600. const handleLogin = () => {
  4601. if (!formData.username)
  4602. return uni.$u.toast("请输入用户名");
  4603. if (!formData.password)
  4604. return uni.$u.toast("请输入密码");
  4605. uni.showLoading({
  4606. mask: true,
  4607. title: "登录中..."
  4608. });
  4609. uni.$u.http.post("/app/appUser/login", formData).then((res2) => {
  4610. if (res2.code == 200) {
  4611. uni.setStorageSync("token", res2.data);
  4612. setTimeout(() => {
  4613. getUserInfo();
  4614. uni.$u.http.get("/app/appUser/getRouters").then((resp) => {
  4615. if (resp.code == 200) {
  4616. uni.setStorageSync("menuList", resp.data);
  4617. uni.$u.toast("登录成功");
  4618. uni.switchTab({
  4619. url: "/pages/index/index"
  4620. });
  4621. uni.$u.ttsModule.speak("书嗨,不辜负每一个爱书的人");
  4622. } else {
  4623. uni.$u.toast(resp.msg);
  4624. }
  4625. });
  4626. }, 50);
  4627. } else {
  4628. uni.$u.toast(res2.msg);
  4629. }
  4630. }).catch((error2) => {
  4631. uni.showModal({
  4632. title: "登录失败",
  4633. content: JSON.stringify(error2),
  4634. showCancel: false
  4635. });
  4636. }).finally(() => uni.hideLoading());
  4637. };
  4638. function getUserInfo() {
  4639. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  4640. if (res2.code == 200) {
  4641. uni.setStorageSync("userInfo", res2.data);
  4642. }
  4643. });
  4644. }
  4645. function checkToken() {
  4646. uni.showLoading({
  4647. title: "检测登录状态..."
  4648. });
  4649. uni.$u.http.get("/app/appUser/checkToken").then((res2) => {
  4650. if (res2.code == 200) {
  4651. uni.$u.toast("登录成功");
  4652. uni.switchTab({
  4653. url: "/pages/index/index"
  4654. });
  4655. } else {
  4656. uni.$u.toast("请先登录");
  4657. }
  4658. }).finally(() => uni.hideLoading());
  4659. }
  4660. onLoad(() => {
  4661. let token = uni.getStorageSync("token");
  4662. if (token) {
  4663. checkToken();
  4664. }
  4665. });
  4666. const __returned__ = { prefixIconStyle, placeholderStyle: placeholderStyle$3, customStyle, get proxy() {
  4667. return proxy;
  4668. }, set proxy(v) {
  4669. proxy = v;
  4670. }, formData, uForm, isCountingDown, countdown, countDownText, startCountDown, getVerifyCode, handleLogin, getUserInfo, checkToken, ref: vue.ref, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, get onLoad() {
  4671. return onLoad;
  4672. } };
  4673. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  4674. return __returned__;
  4675. }
  4676. };
  4677. function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
  4678. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  4679. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  4680. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  4681. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
  4682. return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
  4683. vue.createCommentVNode(" Logo和标题区域 "),
  4684. vue.createElementVNode("view", { class: "logo-section" }, [
  4685. vue.createElementVNode("image", {
  4686. class: "logo",
  4687. src: _imports_0$3,
  4688. mode: "aspectFit"
  4689. })
  4690. ]),
  4691. vue.createCommentVNode(" 表单区域 "),
  4692. vue.createElementVNode("view", { class: "form-section" }, [
  4693. vue.createVNode(_component_u__form, {
  4694. model: $setup.formData,
  4695. ref: "uForm"
  4696. }, {
  4697. default: vue.withCtx(() => [
  4698. vue.createVNode(_component_u_form_item, null, {
  4699. default: vue.withCtx(() => [
  4700. vue.createVNode(_component_u_input, {
  4701. prefixIconStyle: $setup.prefixIconStyle,
  4702. "placeholder-style": $setup.placeholderStyle,
  4703. "custom-style": $setup.customStyle,
  4704. modelValue: $setup.formData.username,
  4705. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.username = $event),
  4706. placeholder: "请输入用户名",
  4707. prefixIcon: "account"
  4708. }, null, 8, ["custom-style", "modelValue"])
  4709. ]),
  4710. _: 1
  4711. /* STABLE */
  4712. }),
  4713. vue.createVNode(_component_u_form_item, null, {
  4714. default: vue.withCtx(() => [
  4715. vue.createVNode(_component_u_input, {
  4716. prefixIconStyle: $setup.prefixIconStyle,
  4717. "placeholder-style": $setup.placeholderStyle,
  4718. "custom-style": $setup.customStyle,
  4719. modelValue: $setup.formData.password,
  4720. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.password = $event),
  4721. type: "password",
  4722. placeholder: "请输入密码",
  4723. prefixIcon: "lock"
  4724. }, null, 8, ["custom-style", "modelValue"])
  4725. ]),
  4726. _: 1
  4727. /* STABLE */
  4728. }),
  4729. vue.createVNode(_component_u_form_item, null, {
  4730. default: vue.withCtx(() => [
  4731. vue.createVNode(_component_u_input, {
  4732. prefixIconStyle: $setup.prefixIconStyle,
  4733. "placeholder-style": $setup.placeholderStyle,
  4734. "custom-style": $setup.customStyle,
  4735. modelValue: $setup.formData.code,
  4736. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.code = $event),
  4737. placeholder: "请输入验证码",
  4738. prefixIcon: "chat"
  4739. }, {
  4740. suffix: vue.withCtx(() => [
  4741. vue.createVNode(_component_u_button, {
  4742. "custom-style": "width:200rpx",
  4743. color: "#22ac38",
  4744. size: "small",
  4745. onClick: $setup.getVerifyCode,
  4746. disabled: $setup.isCountingDown
  4747. }, {
  4748. default: vue.withCtx(() => [
  4749. vue.createTextVNode(
  4750. vue.toDisplayString($setup.countDownText),
  4751. 1
  4752. /* TEXT */
  4753. )
  4754. ]),
  4755. _: 1
  4756. /* STABLE */
  4757. }, 8, ["disabled"])
  4758. ]),
  4759. _: 1
  4760. /* STABLE */
  4761. }, 8, ["custom-style", "modelValue"])
  4762. ]),
  4763. _: 1
  4764. /* STABLE */
  4765. })
  4766. ]),
  4767. _: 1
  4768. /* STABLE */
  4769. }, 8, ["model"]),
  4770. vue.createVNode(_component_u_button, {
  4771. "custom-style": "margin-top:5%",
  4772. type: "primary",
  4773. block: "",
  4774. onClick: $setup.handleLogin,
  4775. color: "#22ac38",
  4776. shape: "circle"
  4777. }, {
  4778. default: vue.withCtx(() => [
  4779. vue.createTextVNode("登录")
  4780. ]),
  4781. _: 1
  4782. /* STABLE */
  4783. })
  4784. ])
  4785. ]);
  4786. }
  4787. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__scopeId", "data-v-e4e4508d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/login/login.vue"]]);
  4788. const _sfc_main$1X = {
  4789. __name: "index",
  4790. setup(__props, { expose: __expose }) {
  4791. __expose();
  4792. const menuData = vue.ref([]);
  4793. let menuPromise = null;
  4794. async function getMenuList() {
  4795. if (menuData.value && menuData.value.length > 0) {
  4796. return menuData.value;
  4797. }
  4798. if (menuPromise) {
  4799. return menuPromise;
  4800. }
  4801. menuPromise = uni.$u.http.get("/app/appUser/getRouters").then((res2) => {
  4802. const data = res2.data;
  4803. menuData.value = data.map((item) => {
  4804. item.children = item.children.map((child) => {
  4805. child.query = child.query ? JSON.parse(child.query) : {};
  4806. return child;
  4807. });
  4808. return item;
  4809. });
  4810. return data;
  4811. }).catch((err) => {
  4812. formatAppLog("error", "at pages/index/index.vue:59", "获取菜单数据失败", err);
  4813. return [];
  4814. }).finally(() => {
  4815. menuPromise = null;
  4816. });
  4817. return menuPromise;
  4818. }
  4819. function getButtonList() {
  4820. uni.$u.http.get("/app/appUser/getInfo").then((res2) => {
  4821. if (res2.code == 200) {
  4822. uni.setStorageSync("buttonList", res2.permissions);
  4823. }
  4824. });
  4825. }
  4826. function getAudioConfig() {
  4827. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  4828. if (res2.code == 200) {
  4829. uni.setStorageSync("audioConfig", res2.data);
  4830. }
  4831. });
  4832. }
  4833. onLoad(() => {
  4834. uni.showLoading({
  4835. title: "加载中...",
  4836. mask: true
  4837. });
  4838. Promise.all([getMenuList(), getButtonList()]).finally(() => {
  4839. uni.hideLoading();
  4840. });
  4841. getAudioConfig();
  4842. });
  4843. const formatName = (name) => {
  4844. if (!name)
  4845. return "";
  4846. let result = name;
  4847. if (result.includes("\\n\\r")) {
  4848. result = result.replace(/\\n\\r/g, "\n");
  4849. }
  4850. return result;
  4851. };
  4852. const expressOperations = vue.ref([
  4853. {
  4854. name: "中转\n\r签收",
  4855. path: "/pages/index/express/transfer-sign",
  4856. type: "primary"
  4857. },
  4858. {
  4859. name: "到仓\n\r签收",
  4860. path: "/pages/index/express/warehouse-sign",
  4861. type: "warning"
  4862. },
  4863. {
  4864. name: "重量\n\r修改",
  4865. path: "/pages/index/express/weight-modify",
  4866. type: "primary"
  4867. },
  4868. {
  4869. name: "快递\n\r验收",
  4870. path: "/pages/index/express/quick-check",
  4871. type: "warning"
  4872. },
  4873. {
  4874. name: "路由签收\n\r异常",
  4875. path: "/pages/index/express/route-exception",
  4876. type: "primary"
  4877. },
  4878. {
  4879. name: "快递\n\r拆包",
  4880. path: "/pages/index/express/quick-unpack",
  4881. type: "warning"
  4882. }
  4883. ]);
  4884. const auditOperations = vue.ref([
  4885. {
  4886. name: "确认\n\r收货",
  4887. path: "/pages/index/audit/confirm-receipt",
  4888. type: "primary"
  4889. },
  4890. {
  4891. name: "扫书\n\r查单",
  4892. path: "/pages/index/audit/scan-order",
  4893. type: "warning"
  4894. },
  4895. {
  4896. name: "根据快递单\n\r或订单",
  4897. path: "/pages/index/audit/express-order",
  4898. type: "warning"
  4899. },
  4900. {
  4901. name: "根据\n\r发件人",
  4902. path: "/pages/index/audit/sender",
  4903. type: "primary"
  4904. }
  4905. ]);
  4906. const wmsOperations = vue.ref([
  4907. {
  4908. name: "中等\n\r入库",
  4909. path: "/pages/index/wms/medium-in",
  4910. type: "primary"
  4911. },
  4912. {
  4913. name: "良品\n\r入库",
  4914. path: "/pages/index/wms/good-in",
  4915. type: "warning"
  4916. },
  4917. {
  4918. name: "次品\n\r入库",
  4919. path: "/pages/index/wms/secondary-in",
  4920. type: "primary"
  4921. },
  4922. {
  4923. name: "不良\n\r入库",
  4924. path: "/pages/index/wms/bad-in",
  4925. type: "warning"
  4926. },
  4927. {
  4928. name: "不良\n\r出库",
  4929. path: "/pages/index/wms/bad-out",
  4930. type: "primary"
  4931. },
  4932. {
  4933. name: "不良\n\r下架",
  4934. path: "/pages/index/wms/bad-off",
  4935. type: "warning"
  4936. },
  4937. {
  4938. name: "订单\n\r查询",
  4939. path: "/pages/index/wms/order-query",
  4940. type: "primary"
  4941. },
  4942. {
  4943. name: "库位\n\r订单",
  4944. path: "/pages/index/wms/location-order",
  4945. type: "warning"
  4946. },
  4947. {
  4948. name: "快速盘点",
  4949. path: "/pages/index/wms/speedy-check",
  4950. type: "primary",
  4951. span: 24
  4952. }
  4953. ]);
  4954. const statisticsOperations = vue.ref([
  4955. {
  4956. name: "审核统计",
  4957. path: "/pages/index/statistic/audit",
  4958. type: "warning",
  4959. span: 24
  4960. },
  4961. {
  4962. name: "售后\n\r统计",
  4963. path: "/pages/index/statistic/after-sale",
  4964. type: "primary"
  4965. },
  4966. {
  4967. name: "打包\n\r统计",
  4968. path: "/pages/index/statistic/package",
  4969. type: "warning"
  4970. }
  4971. ]);
  4972. const offlineOperations = vue.ref([
  4973. {
  4974. name: "线下\n\r核单",
  4975. path: "/pages/index/offline/check-order",
  4976. type: "primary"
  4977. },
  4978. {
  4979. name: "核单\n\r记录",
  4980. path: "/pages/index/offline/check-record",
  4981. type: "warning"
  4982. }
  4983. ]);
  4984. const entryOperations = vue.ref([
  4985. {
  4986. name: "扫码\n\r查书",
  4987. path: "/pages/index/entry/scan-book",
  4988. type: "primary"
  4989. },
  4990. {
  4991. name: "录入\n\r书籍重量",
  4992. path: "/pages/index/entry/book-weight",
  4993. type: "warning"
  4994. }
  4995. ]);
  4996. const handleNavigation = (path) => {
  4997. uni.navigateTo({
  4998. url: path,
  4999. fail: () => {
  5000. uni.showToast({
  5001. title: "页面跳转失败",
  5002. icon: "none"
  5003. });
  5004. }
  5005. });
  5006. };
  5007. const __returned__ = { menuData, get menuPromise() {
  5008. return menuPromise;
  5009. }, set menuPromise(v) {
  5010. menuPromise = v;
  5011. }, getMenuList, getButtonList, getAudioConfig, formatName, expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  5012. return onLoad;
  5013. } };
  5014. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  5015. return __returned__;
  5016. }
  5017. };
  5018. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  5019. return vue.openBlock(), vue.createElementBlock("view", { class: "operation-container" }, [
  5020. vue.createCommentVNode(" 直接循环 "),
  5021. (vue.openBlock(true), vue.createElementBlock(
  5022. vue.Fragment,
  5023. null,
  5024. vue.renderList($setup.menuData, (item) => {
  5025. return vue.openBlock(), vue.createElementBlock("view", {
  5026. class: "section",
  5027. key: item.path
  5028. }, [
  5029. vue.createElementVNode(
  5030. "view",
  5031. { class: "section-title" },
  5032. vue.toDisplayString(item.meta.title),
  5033. 1
  5034. /* TEXT */
  5035. ),
  5036. vue.createElementVNode("view", { class: "grid-container" }, [
  5037. (vue.openBlock(true), vue.createElementBlock(
  5038. vue.Fragment,
  5039. null,
  5040. vue.renderList(item.children, (child) => {
  5041. return vue.openBlock(), vue.createElementBlock("view", {
  5042. class: vue.normalizeClass(["grid-item", child.query.type]),
  5043. style: vue.normalizeStyle({ gridColumn: child.query.span ? "span 2" : "span 1" }),
  5044. key: child.path,
  5045. onClick: ($event) => $setup.handleNavigation(child.path)
  5046. }, vue.toDisplayString($setup.formatName(child.meta.title)), 15, ["onClick"]);
  5047. }),
  5048. 128
  5049. /* KEYED_FRAGMENT */
  5050. ))
  5051. ])
  5052. ]);
  5053. }),
  5054. 128
  5055. /* KEYED_FRAGMENT */
  5056. ))
  5057. ]);
  5058. }
  5059. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__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$1W = {
  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$1V(_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$1W, [["render", _sfc_render$1V], ["__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$1V = {
  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$1U(_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$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-0a574502"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  5448. const _sfc_main$1U = {
  5449. name: "u--text",
  5450. mixins: [mpMixin, mixin, props$v],
  5451. components: {
  5452. uvText: __easycom_1$9
  5453. }
  5454. };
  5455. function _sfc_render$1T(_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$1U, [["render", _sfc_render$1T], ["__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$1T = {
  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$1S(_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$1T, [["render", _sfc_render$1S], ["__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$1S = {
  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$1R(_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$1S, [["render", _sfc_render$1R], ["__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$1R = {
  5928. name: "u-cell-group",
  5929. mixins: [mpMixin, mixin, props$s]
  5930. };
  5931. function _sfc_render$1Q(_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$1R, [["render", _sfc_render$1Q], ["__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$1Q = {
  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$1P(_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$1Q, [["render", _sfc_render$1P], ["__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$1P = {
  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$1O(_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$1P, [["render", _sfc_render$1O], ["__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$1O = {
  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$1N(_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$1O, [["render", _sfc_render$1N], ["__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$1N = {
  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$1M(_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$1N);
  7679. if (typeof block1 === "function")
  7680. block1(_sfc_main$1N);
  7681. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__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$1M = {
  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$1L(_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$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-30bc23e1"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/pageScroll/index.vue"]]);
  9320. const _sfc_main$1L = {
  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$1K(_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$1L, [["render", _sfc_render$1K], ["__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$1K = {
  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$1J(_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$1K, [["render", _sfc_render$1J], ["__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$1J = {
  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$1I(_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$1J, [["render", _sfc_render$1I], ["__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$1I = {
  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$1H(_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$1I, [["render", _sfc_render$1H], ["__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$1H = {
  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$1G(_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$1H, [["render", _sfc_render$1G], ["__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$1G = {
  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$1F(_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$1G, [["render", _sfc_render$1F], ["__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$1F = {
  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$1E(_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$1F, [["render", _sfc_render$1E], ["__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$1E = {
  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$1D(_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$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  10834. const baseUrl = "https://bpi.shuhi.com";
  10835. function initRequest() {
  10836. formatAppLog("log", "at config/request.js:6", "初始化了 http 请求代码");
  10837. uni.$u.http.setConfig((config2) => {
  10838. config2.baseURL = baseUrl;
  10839. config2.custom.toast = true;
  10840. config2.sslVerify = false;
  10841. return config2;
  10842. });
  10843. uni.$u.http.interceptors.request.use(
  10844. (config2) => {
  10845. config2.data = config2.data || {};
  10846. let token = uni.getStorageSync("token");
  10847. config2.header.Authorization = token ? `Bearer ${token}` : "";
  10848. return config2;
  10849. },
  10850. (config2) => {
  10851. return Promise.reject(config2);
  10852. }
  10853. );
  10854. uni.$u.http.interceptors.response.use(
  10855. (response) => {
  10856. var _a;
  10857. const data = response.data;
  10858. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  10859. if (data.code !== 200) {
  10860. if (data.code === 401) {
  10861. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  10862. uni.removeStorageSync("token");
  10863. setTimeout(() => {
  10864. uni.$u.route({
  10865. type: "reLaunch",
  10866. url: "/pages/login/login"
  10867. // 跳转到登录页
  10868. });
  10869. }, 1e3);
  10870. } else {
  10871. if (custom.toast !== false) {
  10872. uni.$u.toast(data.msg);
  10873. }
  10874. return data;
  10875. }
  10876. }
  10877. return data;
  10878. },
  10879. (response) => {
  10880. return Promise.reject(response);
  10881. }
  10882. );
  10883. }
  10884. const _sfc_main$1D = {
  10885. __name: "index",
  10886. props: {
  10887. filename: {
  10888. type: [Array, String],
  10889. default: () => []
  10890. },
  10891. url: {
  10892. type: String
  10893. },
  10894. notFile: {
  10895. type: Boolean,
  10896. default: false
  10897. },
  10898. tips: {
  10899. type: String
  10900. },
  10901. disabled: {
  10902. type: Boolean,
  10903. default: false
  10904. },
  10905. isUpdate: {
  10906. type: Boolean,
  10907. default: false
  10908. },
  10909. loading: {
  10910. type: Boolean,
  10911. default: false
  10912. }
  10913. },
  10914. emits: ["update:filename", "update:keyValue", "success", "update:loading"],
  10915. setup(__props, { expose: __expose, emit: __emit }) {
  10916. __expose();
  10917. const emit2 = __emit;
  10918. const props2 = __props;
  10919. const fileList = vue.ref([]);
  10920. vue.watch(() => props2.filename, (filename) => {
  10921. if (!filename)
  10922. return fileList.value = [];
  10923. if (typeof filename == "string") {
  10924. fileList.value = filename.split(",").map((v) => ({
  10925. url: baseUrl + v
  10926. }));
  10927. } else {
  10928. fileList.value = filename && filename.length > 0 ? filename.map((v) => ({
  10929. url: v.url || v
  10930. })) : [];
  10931. }
  10932. }, {
  10933. immediate: true,
  10934. deep: true
  10935. });
  10936. const afterRead = async (e) => {
  10937. const {
  10938. file
  10939. } = e;
  10940. fileList.value.push({
  10941. ...file,
  10942. status: "uploading",
  10943. message: "上传中..."
  10944. });
  10945. emit2("update:loading", true);
  10946. const result = await uploadFilePromise(file.url);
  10947. formatAppLog("log", "at components/cy-upload/index.vue:73", result, "result");
  10948. fileList.value.forEach((v, index2) => {
  10949. if (index2 == fileList.value.length - 1) {
  10950. v.url = result.url;
  10951. v.status = "success";
  10952. v.message = "";
  10953. }
  10954. });
  10955. formatAppLog("log", "at components/cy-upload/index.vue:82", fileList.value, "fileList.value");
  10956. emit2("update:filename", fileList.value.map((v) => v.url));
  10957. emit2("success", result);
  10958. emit2("update:loading", false);
  10959. };
  10960. const deletePic = (event) => {
  10961. fileList.value.splice(event.index, 1);
  10962. };
  10963. const uploadFilePromise = (url2, baseStr = "/app/common/upload") => {
  10964. let token = uni.getStorageSync("token");
  10965. return new Promise((resolve, reject) => {
  10966. uni.uploadFile({
  10967. url: baseUrl + baseStr,
  10968. // 图片上传地址
  10969. filePath: url2,
  10970. name: "file",
  10971. header: {
  10972. "Authorization": token
  10973. },
  10974. success: (res2) => {
  10975. let respic = JSON.parse(res2.data);
  10976. resolve(respic);
  10977. }
  10978. });
  10979. });
  10980. };
  10981. const __returned__ = { emit: emit2, props: props2, fileList, afterRead, deletePic, uploadFilePromise, watch: vue.watch, ref: vue.ref, get baseUrl() {
  10982. return baseUrl;
  10983. } };
  10984. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  10985. return __returned__;
  10986. }
  10987. };
  10988. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  10989. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$7);
  10990. return vue.openBlock(), vue.createElementBlock(
  10991. vue.Fragment,
  10992. null,
  10993. [
  10994. vue.createVNode(_component_u_upload, vue.mergeProps(_ctx.$attrs, {
  10995. fileList: $setup.fileList,
  10996. onAfterRead: $setup.afterRead,
  10997. onDelete: $setup.deletePic,
  10998. notFile: $props.notFile,
  10999. disabled: $props.disabled
  11000. }), null, 16, ["fileList", "notFile", "disabled"]),
  11001. $props.tips ? (vue.openBlock(), vue.createElementBlock(
  11002. "view",
  11003. {
  11004. key: 0,
  11005. class: "tips"
  11006. },
  11007. vue.toDisplayString($props.tips),
  11008. 1
  11009. /* TEXT */
  11010. )) : vue.createCommentVNode("v-if", true)
  11011. ],
  11012. 64
  11013. /* STABLE_FRAGMENT */
  11014. );
  11015. }
  11016. const cyUpload = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-5002576b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/cy-upload/index.vue"]]);
  11017. const _sfc_main$1C = {
  11018. __name: "feedbackPopup",
  11019. emits: ["submit"],
  11020. setup(__props, { expose: __expose, emit: __emit }) {
  11021. const show = vue.ref(false);
  11022. const emit2 = __emit;
  11023. const formRef = vue.ref(null);
  11024. const submitting = vue.ref(false);
  11025. const loading = vue.ref(false);
  11026. const formData = vue.reactive({
  11027. feedbackContent: "",
  11028. imgUrl: [],
  11029. isbn: ""
  11030. });
  11031. const rules2 = {
  11032. feedbackContent: [
  11033. {
  11034. required: true,
  11035. message: "请输入反馈信息",
  11036. trigger: ["blur", "change"]
  11037. }
  11038. ]
  11039. };
  11040. function open2(data) {
  11041. show.value = true;
  11042. formData.isbn = data.isbn;
  11043. }
  11044. function handleCancel() {
  11045. resetForm();
  11046. show.value = false;
  11047. }
  11048. async function handleConfirm() {
  11049. var _a;
  11050. (_a = formRef.value) == null ? void 0 : _a.validate().then((res2) => {
  11051. submitting.value = true;
  11052. let data = JSON.parse(JSON.stringify(formData));
  11053. data.imgUrl = data.imgUrl.join(",");
  11054. uni.$u.http.post("/app/feedback/add", data).then((res3) => {
  11055. if (res3.code == 200) {
  11056. uni.showToast({
  11057. title: "反馈已提交",
  11058. icon: "success"
  11059. });
  11060. emit2("submit", formData);
  11061. show.value = false;
  11062. } else {
  11063. uni.$u.toast(res3.msg);
  11064. }
  11065. }).finally(() => {
  11066. submitting.value = false;
  11067. });
  11068. });
  11069. }
  11070. function resetForm() {
  11071. var _a;
  11072. formData.feedbackContent = "";
  11073. formData.imgUrl = "";
  11074. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  11075. }
  11076. __expose({
  11077. open: open2
  11078. });
  11079. const __returned__ = { show, emit: emit2, formRef, submitting, loading, formData, rules: rules2, open: open2, handleCancel, handleConfirm, resetForm, cyUpload, ref: vue.ref, reactive: vue.reactive };
  11080. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11081. return __returned__;
  11082. }
  11083. };
  11084. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  11085. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11086. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  11087. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11088. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  11089. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11090. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11091. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11092. mode: "center",
  11093. show: $setup.show,
  11094. onClose: $setup.handleCancel,
  11095. closeOnClickOverlay: false
  11096. }, {
  11097. default: vue.withCtx(() => [
  11098. vue.createElementVNode("view", { class: "popup-container" }, [
  11099. vue.createVNode(_component_u_form, {
  11100. ref: "formRef",
  11101. model: $setup.formData,
  11102. rules: $setup.rules,
  11103. labelPosition: "top",
  11104. labelWidth: "100%",
  11105. "error-type": "toast"
  11106. }, {
  11107. default: vue.withCtx(() => [
  11108. vue.createCommentVNode(" 反馈信息 "),
  11109. vue.createVNode(_component_u_form_item, {
  11110. label: "反馈图书信息",
  11111. prop: "feedbackContent",
  11112. borderBottom: true
  11113. }, {
  11114. default: vue.withCtx(() => [
  11115. vue.createVNode(_component_u_input, {
  11116. modelValue: $setup.formData.feedbackContent,
  11117. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackContent = $event),
  11118. type: "textarea",
  11119. placeholder: "请输入反馈信息",
  11120. height: "100"
  11121. }, null, 8, ["modelValue"])
  11122. ]),
  11123. _: 1
  11124. /* STABLE */
  11125. }),
  11126. vue.createCommentVNode(" 图片上传 "),
  11127. vue.createVNode(_component_u_form_item, {
  11128. label: "上传照片",
  11129. prop: "imgUrl",
  11130. borderBottom: false
  11131. }, {
  11132. default: vue.withCtx(() => [
  11133. vue.createVNode($setup["cyUpload"], {
  11134. filename: $setup.formData.imgUrl,
  11135. "onUpdate:filename": _cache[1] || (_cache[1] = ($event) => $setup.formData.imgUrl = $event),
  11136. multiple: "",
  11137. maxCount: 4,
  11138. loading: $setup.loading
  11139. }, {
  11140. default: vue.withCtx(() => [
  11141. vue.createElementVNode("view", { class: "upload-slot" }, [
  11142. vue.createVNode(_component_u_icon, {
  11143. name: "plus",
  11144. size: "30"
  11145. }),
  11146. vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
  11147. ])
  11148. ]),
  11149. _: 1
  11150. /* STABLE */
  11151. }, 8, ["filename", "loading"])
  11152. ]),
  11153. _: 1
  11154. /* STABLE */
  11155. })
  11156. ]),
  11157. _: 1
  11158. /* STABLE */
  11159. }, 8, ["model"]),
  11160. vue.createCommentVNode(" 按钮组 "),
  11161. vue.createElementVNode("view", { class: "button-group" }, [
  11162. vue.createVNode(_component_u_button, {
  11163. type: "info",
  11164. text: "取消",
  11165. plain: true,
  11166. onClick: $setup.handleCancel,
  11167. disabled: $setup.submitting
  11168. }, null, 8, ["disabled"]),
  11169. vue.createVNode(_component_u_button, {
  11170. type: "primary",
  11171. text: "确认",
  11172. onClick: $setup.handleConfirm,
  11173. loading: $setup.submitting,
  11174. disabled: $setup.loading
  11175. }, null, 8, ["loading", "disabled"])
  11176. ])
  11177. ])
  11178. ]),
  11179. _: 1
  11180. /* STABLE */
  11181. }, 8, ["show"]);
  11182. }
  11183. const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-0265fb8a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/components/feedbackPopup.vue"]]);
  11184. const _sfc_main$1B = {
  11185. __name: "index",
  11186. setup(__props, { expose: __expose }) {
  11187. __expose();
  11188. const showFeedback = vue.ref(null);
  11189. function handleFeedbackSubmit(data) {
  11190. formatAppLog("log", "at pages/book/index.vue:48", "反馈数据:", data);
  11191. }
  11192. const searchText = vue.ref("");
  11193. const bookList = vue.ref([]);
  11194. async function handleSearch() {
  11195. if (!searchText.value) {
  11196. uni.showToast({
  11197. title: "请输入ISBN",
  11198. icon: "none"
  11199. });
  11200. return;
  11201. }
  11202. await getSimpleBookInfoByIsbn(searchText.value);
  11203. }
  11204. async function getSimpleBookInfoByIsbn(isbn) {
  11205. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  11206. if (res2.code == 200) {
  11207. let bool = bookList.value.some((v) => v.isbn == isbn);
  11208. if (!bool) {
  11209. bookList.value.push(res2.data);
  11210. }
  11211. } else {
  11212. uni.$u.toast(res2.msg);
  11213. }
  11214. });
  11215. }
  11216. function scanCode() {
  11217. uni.scanCode({
  11218. scanType: ["barCode"],
  11219. success: (res2) => {
  11220. searchText.value = res2.result;
  11221. getSimpleBookInfoByIsbn(res2.result);
  11222. },
  11223. fail: () => {
  11224. uni.showToast({
  11225. title: "扫码失败",
  11226. icon: "none"
  11227. });
  11228. }
  11229. });
  11230. }
  11231. function editBook(book) {
  11232. var _a;
  11233. (_a = showFeedback.value) == null ? void 0 : _a.open(book);
  11234. }
  11235. onLoad(() => {
  11236. uni.$u.useGlobalEvent((e) => {
  11237. if (!e.barcode)
  11238. return;
  11239. getSimpleBookInfoByIsbn(e.barcode);
  11240. });
  11241. });
  11242. onShow(() => {
  11243. uni.$u.updateActivePageOnShow();
  11244. });
  11245. const __returned__ = { showFeedback, handleFeedbackSubmit, searchText, bookList, handleSearch, getSimpleBookInfoByIsbn, scanCode, editBook, ref: vue.ref, computed: vue.computed, get onLoad() {
  11246. return onLoad;
  11247. }, get onShow() {
  11248. return onShow;
  11249. }, FeedbackPopup };
  11250. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11251. return __returned__;
  11252. }
  11253. };
  11254. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  11255. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11256. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11257. return vue.openBlock(), vue.createElementBlock("view", {
  11258. class: "book-list",
  11259. style: { "padding": "0" }
  11260. }, [
  11261. vue.createCommentVNode(" 搜索框 "),
  11262. vue.createElementVNode("view", { class: "search-header" }, [
  11263. vue.createElementVNode("view", { class: "search-box" }, [
  11264. vue.createVNode(_component_u_icon, {
  11265. style: { "margin-right": "16rpx" },
  11266. name: "scan",
  11267. size: "30",
  11268. color: "#ffffff",
  11269. onClick: $setup.scanCode
  11270. }),
  11271. vue.createVNode(_component_u_search, {
  11272. height: "80rpx",
  11273. modelValue: $setup.searchText,
  11274. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  11275. placeholder: "请输入ISBN",
  11276. showAction: false,
  11277. clearabled: true,
  11278. onSearch: $setup.handleSearch,
  11279. bgColor: "#ffffff"
  11280. }, null, 8, ["modelValue"])
  11281. ])
  11282. ]),
  11283. vue.createCommentVNode(" 搜索结果列表 "),
  11284. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11285. key: 0,
  11286. class: "book-list"
  11287. }, [
  11288. (vue.openBlock(true), vue.createElementBlock(
  11289. vue.Fragment,
  11290. null,
  11291. vue.renderList($setup.bookList, (book, index2) => {
  11292. return vue.openBlock(), vue.createElementBlock("view", {
  11293. class: "book-item",
  11294. key: index2
  11295. }, [
  11296. vue.createElementVNode("view", { class: "book-info" }, [
  11297. vue.createElementVNode("image", {
  11298. class: "book-image",
  11299. src: book.cover,
  11300. mode: "aspectFill"
  11301. }, null, 8, ["src"]),
  11302. vue.createElementVNode("view", { class: "book-details" }, [
  11303. vue.createElementVNode(
  11304. "text",
  11305. { class: "book-title" },
  11306. vue.toDisplayString(book.bookName),
  11307. 1
  11308. /* TEXT */
  11309. ),
  11310. vue.createElementVNode(
  11311. "text",
  11312. { class: "book-isbn" },
  11313. "ISBN: " + vue.toDisplayString(book.isbn),
  11314. 1
  11315. /* TEXT */
  11316. ),
  11317. vue.createElementVNode(
  11318. "text",
  11319. { class: "book-price" },
  11320. "定价: " + vue.toDisplayString(book.price),
  11321. 1
  11322. /* TEXT */
  11323. ),
  11324. vue.createElementVNode(
  11325. "text",
  11326. { class: "book-set" },
  11327. "套装: " + vue.toDisplayString(book.suit == 1 ? "是" : "否"),
  11328. 1
  11329. /* TEXT */
  11330. )
  11331. ])
  11332. ]),
  11333. vue.createElementVNode("view", { class: "book-action" }, [
  11334. vue.createVNode(_component_u_icon, {
  11335. name: "edit-pen",
  11336. size: "30",
  11337. color: "#4cd964",
  11338. onClick: ($event) => $setup.editBook(book)
  11339. }, null, 8, ["onClick"])
  11340. ])
  11341. ]);
  11342. }),
  11343. 128
  11344. /* KEYED_FRAGMENT */
  11345. ))
  11346. ])) : vue.createCommentVNode("v-if", true),
  11347. vue.createVNode(
  11348. $setup["FeedbackPopup"],
  11349. {
  11350. ref: "showFeedback",
  11351. onSubmit: $setup.handleFeedbackSubmit
  11352. },
  11353. null,
  11354. 512
  11355. /* NEED_PATCH */
  11356. )
  11357. ]);
  11358. }
  11359. const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-0452ab4c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/index.vue"]]);
  11360. const props$k = {
  11361. props: {
  11362. // 标签类型info、primary、success、warning、error
  11363. type: {
  11364. type: String,
  11365. default: props$E.tag.type
  11366. },
  11367. // 不可用
  11368. disabled: {
  11369. type: [Boolean, String],
  11370. default: props$E.tag.disabled
  11371. },
  11372. // 标签的大小,large,medium,mini
  11373. size: {
  11374. type: String,
  11375. default: props$E.tag.size
  11376. },
  11377. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  11378. shape: {
  11379. type: String,
  11380. default: props$E.tag.shape
  11381. },
  11382. // 标签文字
  11383. text: {
  11384. type: [String, Number],
  11385. default: props$E.tag.text
  11386. },
  11387. // 背景颜色,默认为空字符串,即不处理
  11388. bgColor: {
  11389. type: String,
  11390. default: props$E.tag.bgColor
  11391. },
  11392. // 标签字体颜色,默认为空字符串,即不处理
  11393. color: {
  11394. type: String,
  11395. default: props$E.tag.color
  11396. },
  11397. // 标签的边框颜色
  11398. borderColor: {
  11399. type: String,
  11400. default: props$E.tag.borderColor
  11401. },
  11402. // 关闭按钮图标的颜色
  11403. closeColor: {
  11404. type: String,
  11405. default: props$E.tag.closeColor
  11406. },
  11407. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  11408. name: {
  11409. type: [String, Number],
  11410. default: props$E.tag.name
  11411. },
  11412. // // 模式选择,dark|light|plain
  11413. // mode: {
  11414. // type: String,
  11415. // default: 'light'
  11416. // },
  11417. // 镂空时是否填充背景色
  11418. plainFill: {
  11419. type: Boolean,
  11420. default: props$E.tag.plainFill
  11421. },
  11422. // 是否镂空
  11423. plain: {
  11424. type: Boolean,
  11425. default: props$E.tag.plain
  11426. },
  11427. // 是否可关闭
  11428. closable: {
  11429. type: Boolean,
  11430. default: props$E.tag.closable
  11431. },
  11432. // 是否显示
  11433. show: {
  11434. type: Boolean,
  11435. default: props$E.tag.show
  11436. },
  11437. // 内置图标,或绝对路径的图片
  11438. icon: {
  11439. type: String,
  11440. default: props$E.tag.icon
  11441. }
  11442. }
  11443. };
  11444. const _sfc_main$1A = {
  11445. name: "u-tag",
  11446. mixins: [mpMixin, mixin, props$k],
  11447. data() {
  11448. return {};
  11449. },
  11450. computed: {
  11451. style() {
  11452. const style = {};
  11453. if (this.bgColor) {
  11454. style.backgroundColor = this.bgColor;
  11455. }
  11456. if (this.color) {
  11457. style.color = this.color;
  11458. }
  11459. if (this.borderColor) {
  11460. style.borderColor = this.borderColor;
  11461. }
  11462. return style;
  11463. },
  11464. // nvue下,文本颜色无法继承父元素
  11465. textColor() {
  11466. const style = {};
  11467. if (this.color) {
  11468. style.color = this.color;
  11469. }
  11470. return style;
  11471. },
  11472. imgStyle() {
  11473. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  11474. return {
  11475. width,
  11476. height: width
  11477. };
  11478. },
  11479. // 文本的样式
  11480. closeSize() {
  11481. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  11482. return size;
  11483. },
  11484. // 图标大小
  11485. iconSize() {
  11486. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  11487. return size;
  11488. },
  11489. // 图标颜色
  11490. elIconColor() {
  11491. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  11492. }
  11493. },
  11494. methods: {
  11495. // 点击关闭按钮
  11496. closeHandler() {
  11497. this.$emit("close", this.name);
  11498. },
  11499. // 点击标签
  11500. clickHandler() {
  11501. this.$emit("click", this.name);
  11502. }
  11503. }
  11504. };
  11505. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  11506. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11507. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  11508. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  11509. mode: "fade",
  11510. show: _ctx.show,
  11511. style: { "display": "inline-flex" }
  11512. }, {
  11513. default: vue.withCtx(() => [
  11514. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  11515. vue.createElementVNode(
  11516. "view",
  11517. {
  11518. 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`]]),
  11519. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  11520. style: vue.normalizeStyle([{
  11521. marginRight: _ctx.closable ? "10px" : 0,
  11522. marginTop: _ctx.closable ? "10px" : 0
  11523. }, $options.style])
  11524. },
  11525. [
  11526. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  11527. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  11528. key: 0,
  11529. class: "u-tag__icon"
  11530. }, [
  11531. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  11532. key: 0,
  11533. src: _ctx.icon,
  11534. style: vue.normalizeStyle([$options.imgStyle])
  11535. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  11536. key: 1,
  11537. color: $options.elIconColor,
  11538. name: _ctx.icon,
  11539. size: $options.iconSize
  11540. }, null, 8, ["color", "name", "size"]))
  11541. ])) : vue.createCommentVNode("v-if", true)
  11542. ], true),
  11543. vue.createElementVNode(
  11544. "text",
  11545. {
  11546. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  11547. style: vue.normalizeStyle([$options.textColor])
  11548. },
  11549. vue.toDisplayString(_ctx.text),
  11550. 7
  11551. /* TEXT, CLASS, STYLE */
  11552. )
  11553. ],
  11554. 6
  11555. /* CLASS, STYLE */
  11556. ),
  11557. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  11558. "view",
  11559. {
  11560. key: 0,
  11561. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  11562. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  11563. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  11564. },
  11565. [
  11566. vue.createVNode(_component_u_icon, {
  11567. name: "close",
  11568. size: $options.closeSize,
  11569. color: "#ffffff"
  11570. }, null, 8, ["size"])
  11571. ],
  11572. 6
  11573. /* CLASS, STYLE */
  11574. )) : vue.createCommentVNode("v-if", true)
  11575. ])
  11576. ]),
  11577. _: 3
  11578. /* FORWARDED */
  11579. }, 8, ["show"]);
  11580. }
  11581. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  11582. const _sfc_main$1z = {
  11583. __name: "WarehouseSelector",
  11584. props: {
  11585. show: {
  11586. type: Boolean,
  11587. default: false
  11588. }
  11589. },
  11590. emits: ["update:show", "warehouse-selected"],
  11591. setup(__props, { expose: __expose, emit: __emit }) {
  11592. __expose();
  11593. const props2 = __props;
  11594. const emit2 = __emit;
  11595. const searchKeyword = vue.ref("");
  11596. const searchResults = vue.ref([]);
  11597. const historyWarehouses = vue.ref([""]);
  11598. const selectedWarehouse = vue.ref("");
  11599. const warehouseSearch = (name) => {
  11600. formatAppLog("log", "at pages/index/express/components/WarehouseSelector.vue:68", name);
  11601. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  11602. if (res2.code == 200) {
  11603. searchResults.value = res2.data;
  11604. }
  11605. });
  11606. };
  11607. const getUserBindHistory = () => {
  11608. uni.$u.http.get("/app/appUser/getUserBindGodownReocrd").then((res2) => {
  11609. if (res2.code == 200) {
  11610. historyWarehouses.value = res2.data;
  11611. }
  11612. });
  11613. };
  11614. getUserBindHistory();
  11615. const handleSearch = () => {
  11616. warehouseSearch(searchKeyword.value);
  11617. };
  11618. const selectItem = vue.ref({});
  11619. const selectWarehouse = (item) => {
  11620. selectedWarehouse.value = item.godownName;
  11621. selectItem.value = item;
  11622. };
  11623. const handleClose = () => {
  11624. emit2("update:show", false);
  11625. searchKeyword.value = "";
  11626. };
  11627. const handleConfirm = () => {
  11628. if (selectedWarehouse.value) {
  11629. emit2("warehouse-selected", selectItem.value);
  11630. handleClose();
  11631. }
  11632. };
  11633. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, warehouseSearch, getUserBindHistory, handleSearch, selectItem, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
  11634. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11635. return __returned__;
  11636. }
  11637. };
  11638. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  11639. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11640. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  11641. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11642. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11643. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11644. show: $props.show,
  11645. onClose: $setup.handleClose,
  11646. mode: "bottom",
  11647. round: "10"
  11648. }, {
  11649. default: vue.withCtx(() => [
  11650. vue.createElementVNode("view", { class: "warehouse-selector" }, [
  11651. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  11652. vue.createCommentVNode(" 标题 "),
  11653. vue.createElementVNode("view", { class: "header" }, [
  11654. vue.createElementVNode("text", { class: "title" }, "绑定仓库")
  11655. ]),
  11656. vue.createCommentVNode(" 搜索框 "),
  11657. vue.createElementVNode("view", { class: "search-box" }, [
  11658. vue.createVNode(_component_u_search, {
  11659. inputStyle: { "height": "80rpx", "font-size": "16px" },
  11660. actionStyle: { "font-size": "16px", color: "#22ac38" },
  11661. modelValue: $setup.searchKeyword,
  11662. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  11663. placeholder: "搜索仓库",
  11664. "show-action": true,
  11665. "action-text": "搜索",
  11666. onSearch: $setup.handleSearch,
  11667. onCustom: $setup.handleSearch
  11668. }, null, 8, ["modelValue"])
  11669. ]),
  11670. vue.createCommentVNode(" 搜索结果 "),
  11671. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11672. key: 0,
  11673. class: "search-result"
  11674. }, [
  11675. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  11676. vue.createElementVNode("view", { class: "tag-group" }, [
  11677. (vue.openBlock(true), vue.createElementBlock(
  11678. vue.Fragment,
  11679. null,
  11680. vue.renderList($setup.searchResults, (item) => {
  11681. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11682. key: item,
  11683. text: item.godownName,
  11684. plain: $setup.selectedWarehouse !== item.godownName,
  11685. shape: "circle",
  11686. onClick: ($event) => $setup.selectWarehouse(item),
  11687. size: "large"
  11688. }, null, 8, ["text", "plain", "onClick"]);
  11689. }),
  11690. 128
  11691. /* KEYED_FRAGMENT */
  11692. ))
  11693. ])
  11694. ])) : vue.createCommentVNode("v-if", true),
  11695. vue.createCommentVNode(" 历史绑定 "),
  11696. $setup.historyWarehouses.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11697. key: 1,
  11698. class: "history-section"
  11699. }, [
  11700. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  11701. vue.createElementVNode("view", { class: "tag-group" }, [
  11702. (vue.openBlock(true), vue.createElementBlock(
  11703. vue.Fragment,
  11704. null,
  11705. vue.renderList($setup.historyWarehouses, (item) => {
  11706. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11707. key: item,
  11708. text: item,
  11709. plain: $setup.selectedWarehouse !== item.godownName,
  11710. shape: "circle",
  11711. onClick: ($event) => $setup.selectWarehouse(item),
  11712. size: "large"
  11713. }, null, 8, ["text", "plain", "onClick"]);
  11714. }),
  11715. 128
  11716. /* KEYED_FRAGMENT */
  11717. ))
  11718. ])
  11719. ])) : vue.createCommentVNode("v-if", true)
  11720. ]),
  11721. vue.createCommentVNode(" 底部按钮 "),
  11722. vue.createElementVNode("view", { class: "footer" }, [
  11723. vue.createVNode(_component_u_button, {
  11724. onClick: $setup.handleClose,
  11725. text: "取消",
  11726. plain: "",
  11727. shape: "circle"
  11728. }),
  11729. vue.createVNode(_component_u_button, {
  11730. type: "primary",
  11731. onClick: $setup.handleConfirm,
  11732. text: "确定",
  11733. shape: "circle"
  11734. })
  11735. ])
  11736. ])
  11737. ]),
  11738. _: 1
  11739. /* STABLE */
  11740. }, 8, ["show"]);
  11741. }
  11742. const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-b9bd3f04"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/WarehouseSelector.vue"]]);
  11743. const placeholderStyle$2 = "font-size:32rpx";
  11744. const _sfc_main$1y = {
  11745. __name: "transfer-sign",
  11746. setup(__props, { expose: __expose }) {
  11747. __expose();
  11748. const customStyle = vue.reactive({
  11749. height: "90rpx"
  11750. });
  11751. const selectedWarehouse = vue.ref("");
  11752. const form = vue.ref({
  11753. "packageCode": "",
  11754. "godownId": ""
  11755. });
  11756. const showSelector = vue.ref(false);
  11757. function openWarehouseSelector() {
  11758. showSelector.value = true;
  11759. }
  11760. function handleWarehouseSelected(item) {
  11761. selectedWarehouse.value = item.godownName;
  11762. form.value.godownId = item.id;
  11763. }
  11764. function scanCode() {
  11765. uni.scanCode({
  11766. success: (res2) => {
  11767. form.value.packageCode = res2.result;
  11768. handleBarcode(res2.result);
  11769. },
  11770. fail: (err) => {
  11771. uni.$u.toast("扫码失败");
  11772. }
  11773. });
  11774. }
  11775. function handleBarcode(code2) {
  11776. if (!code2)
  11777. return uni.$u.toast("请输入物流单号");
  11778. uni.$u.http.post("/app/ordersign/transferSign", form.value).then((res2) => {
  11779. if (res2.code == 200) {
  11780. let text = code2 + "签收成功";
  11781. uni.$u.ttsModule.speak(text);
  11782. } else {
  11783. let text = code2 + "订单不存在";
  11784. uni.$u.ttsModule.speak(text);
  11785. }
  11786. });
  11787. }
  11788. function getUserBindWarehouse() {
  11789. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  11790. var _a, _b;
  11791. if (res2.code == 200) {
  11792. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  11793. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  11794. }
  11795. });
  11796. }
  11797. onLoad(() => {
  11798. getUserBindWarehouse();
  11799. uni.$u.useGlobalEvent((e) => {
  11800. form.value.packageCode = e.barcode;
  11801. handleBarcode(e.barcode);
  11802. });
  11803. });
  11804. onShow(() => {
  11805. uni.$u.updateActivePageOnShow();
  11806. });
  11807. const __returned__ = { placeholderStyle: placeholderStyle$2, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  11808. return onLoad;
  11809. }, get onShow() {
  11810. return onShow;
  11811. }, WarehouseSelector };
  11812. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11813. return __returned__;
  11814. }
  11815. };
  11816. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  11817. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11818. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11819. const _directive_permission = vue.resolveDirective("permission");
  11820. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11821. vue.createElementVNode("view", { class: "main-content" }, [
  11822. vue.createElementVNode("view", { class: "input-group" }, [
  11823. vue.createVNode(_component_u_input, {
  11824. customStyle: $setup.customStyle,
  11825. "placeholder-style": $setup.placeholderStyle,
  11826. modelValue: $setup.selectedWarehouse,
  11827. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  11828. placeholder: "请选择仓库",
  11829. readonly: "",
  11830. border: "surround"
  11831. }, null, 8, ["customStyle", "modelValue"]),
  11832. vue.createVNode(_component_u_button, {
  11833. customStyle: $setup.customStyle,
  11834. type: "info",
  11835. color: "#a4adb3",
  11836. onClick: $setup.openWarehouseSelector,
  11837. text: "选择"
  11838. }, null, 8, ["customStyle"])
  11839. ]),
  11840. vue.createElementVNode("view", { class: "input-group" }, [
  11841. vue.createVNode(_component_u_input, {
  11842. customStyle: $setup.customStyle,
  11843. "placeholder-style": $setup.placeholderStyle,
  11844. modelValue: $setup.form.packageCode,
  11845. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  11846. placeholder: "扫描/输入物流单号",
  11847. border: "surround"
  11848. }, null, 8, ["customStyle", "modelValue"]),
  11849. vue.withDirectives(vue.createVNode(_component_u_button, {
  11850. customStyle: $setup.customStyle,
  11851. type: "info",
  11852. color: "#a4adb3",
  11853. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  11854. text: "确定"
  11855. }, null, 8, ["customStyle"]), [
  11856. [_directive_permission, "app:express:transferSign:confirm"]
  11857. ])
  11858. ])
  11859. ]),
  11860. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  11861. vue.createVNode(_component_u_button, {
  11862. size: "large",
  11863. type: "success",
  11864. onClick: $setup.scanCode,
  11865. text: "扫码",
  11866. class: "scan-button"
  11867. })
  11868. ]),
  11869. vue.createVNode($setup["WarehouseSelector"], {
  11870. show: $setup.showSelector,
  11871. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  11872. onWarehouseSelected: $setup.handleWarehouseSelected
  11873. }, null, 8, ["show"])
  11874. ]);
  11875. }
  11876. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-333d344a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/transfer-sign.vue"]]);
  11877. const _sfc_main$1x = {
  11878. __name: "scan",
  11879. setup(__props, { expose: __expose }) {
  11880. __expose();
  11881. const isInitializing = vue.ref(false);
  11882. const isBluetoothOpened = vue.ref(false);
  11883. const isDiscovering = vue.ref(false);
  11884. const isConnecting = vue.ref(false);
  11885. const isConnected = vue.ref(false);
  11886. const devices = vue.ref([]);
  11887. const selectedDevice = vue.ref(null);
  11888. const scanData = vue.ref(null);
  11889. const deviceId = vue.ref("");
  11890. const serviceId = vue.ref("");
  11891. const characteristicId = vue.ref("");
  11892. const initBluetooth = () => {
  11893. isInitializing.value = true;
  11894. uni.openBluetoothAdapter({
  11895. success: (res2) => {
  11896. formatAppLog("log", "at pages/index/express/scan.vue:35", "蓝牙适配器初始化成功");
  11897. isBluetoothOpened.value = true;
  11898. isInitializing.value = false;
  11899. },
  11900. fail: (err) => {
  11901. formatAppLog("log", "at pages/index/express/scan.vue:40", "蓝牙适配器初始化失败:", err);
  11902. isInitializing.value = false;
  11903. }
  11904. });
  11905. };
  11906. const startDiscovery = () => {
  11907. isDiscovering.value = true;
  11908. uni.startBluetoothDevicesDiscovery({
  11909. success: (res2) => {
  11910. formatAppLog("log", "at pages/index/express/scan.vue:50", "开始搜索蓝牙设备成功");
  11911. uni.onBluetoothDeviceFound((devicesRes) => {
  11912. const newDevices = devicesRes.devices;
  11913. devices.value = devices.value.concat(newDevices);
  11914. formatAppLog("log", "at pages/index/express/scan.vue:54", devices.value, "devices.value");
  11915. const scanGunDevice = newDevices.find((device) => device.name.includes("Z0"));
  11916. if (scanGunDevice) {
  11917. selectedDevice.value = scanGunDevice;
  11918. deviceId.value = scanGunDevice.deviceId;
  11919. }
  11920. });
  11921. uni.onBluetoothAdapterStateChange((stateRes) => {
  11922. if (!stateRes.available) {
  11923. isDiscovering.value = false;
  11924. formatAppLog("log", "at pages/index/express/scan.vue:64", "蓝牙适配器不可用,停止搜索");
  11925. }
  11926. });
  11927. },
  11928. fail: (err) => {
  11929. formatAppLog("log", "at pages/index/express/scan.vue:69", "开始搜索蓝牙设备失败:", err);
  11930. isDiscovering.value = false;
  11931. }
  11932. });
  11933. };
  11934. const connectDevice = () => {
  11935. isConnecting.value = true;
  11936. uni.createBLEConnection({
  11937. deviceId: deviceId.value,
  11938. success: (res2) => {
  11939. formatAppLog("log", "at pages/index/express/scan.vue:80", "连接蓝牙设备成功");
  11940. isConnected.value = true;
  11941. isConnecting.value = false;
  11942. getBLEDeviceServices(deviceId.value);
  11943. },
  11944. fail: (err) => {
  11945. formatAppLog("log", "at pages/index/express/scan.vue:86", "连接蓝牙设备失败:", err);
  11946. isConnecting.value = false;
  11947. }
  11948. });
  11949. };
  11950. const getBLEDeviceServices = (deviceId2) => {
  11951. uni.getBLEDeviceServices({
  11952. deviceId: deviceId2,
  11953. success: (res2) => {
  11954. formatAppLog("log", "at pages/index/express/scan.vue:96", "获取服务列表成功:", res2.services);
  11955. const targetService = res2.services.find((service) => service.uuid === "目标服务UUID");
  11956. if (targetService) {
  11957. serviceId.value = targetService.uuid;
  11958. getBLEDeviceCharacteristics(deviceId2, serviceId.value);
  11959. }
  11960. },
  11961. fail: (err) => {
  11962. formatAppLog("log", "at pages/index/express/scan.vue:104", "获取服务列表失败:", err);
  11963. }
  11964. });
  11965. };
  11966. const getBLEDeviceCharacteristics = (deviceId2, serviceId2) => {
  11967. uni.getBLEDeviceCharacteristics({
  11968. deviceId: deviceId2,
  11969. serviceId: serviceId2,
  11970. success: (res2) => {
  11971. formatAppLog("log", "at pages/index/express/scan.vue:114", "获取特征列表成功:", res2.characteristics);
  11972. const targetCharacteristic = res2.characteristics.find((characteristic) => characteristic.properties.read && characteristic.properties.notify);
  11973. if (targetCharacteristic) {
  11974. characteristicId.value = targetCharacteristic.uuid;
  11975. }
  11976. },
  11977. fail: (err) => {
  11978. formatAppLog("log", "at pages/index/express/scan.vue:121", "获取特征列表失败:", err);
  11979. }
  11980. });
  11981. };
  11982. const startDataMonitor = () => {
  11983. uni.onBLECharacteristicValueChange((characteristicRes) => {
  11984. const value2 = characteristicRes.value;
  11985. const data = ab2str(value2);
  11986. formatAppLog("log", "at pages/index/express/scan.vue:130", "获取到扫码枪扫描的数据:", data);
  11987. scanData.value = data;
  11988. });
  11989. uni.notifyBLECharacteristicValueChange({
  11990. state: true,
  11991. deviceId: deviceId.value,
  11992. characteristicId: characteristicId.value,
  11993. success: (res2) => {
  11994. formatAppLog("log", "at pages/index/express/scan.vue:138", "开启特征值通知成功");
  11995. },
  11996. fail: (err) => {
  11997. formatAppLog("log", "at pages/index/express/scan.vue:141", "开启特征值通知失败:", err);
  11998. }
  11999. });
  12000. };
  12001. const ab2str = (buffer) => {
  12002. return String.fromCharCode.apply(null, new Uint8Array(buffer));
  12003. };
  12004. 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() {
  12005. return onLoad;
  12006. } };
  12007. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12008. return __returned__;
  12009. }
  12010. };
  12011. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  12012. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12013. vue.createElementVNode("button", {
  12014. onClick: $setup.initBluetooth,
  12015. disabled: $setup.isInitializing
  12016. }, "初始化蓝牙", 8, ["disabled"]),
  12017. vue.createElementVNode("button", {
  12018. onClick: $setup.startDiscovery,
  12019. disabled: $setup.isDiscovering || !$setup.isBluetoothOpened
  12020. }, "开始搜索设备", 8, ["disabled"]),
  12021. vue.createElementVNode("button", {
  12022. onClick: $setup.connectDevice,
  12023. disabled: !$setup.selectedDevice || $setup.isConnecting
  12024. }, "连接设备", 8, ["disabled"]),
  12025. vue.createElementVNode("button", {
  12026. onClick: $setup.startDataMonitor,
  12027. disabled: !$setup.isConnected
  12028. }, "开始监听数据", 8, ["disabled"]),
  12029. $setup.scanData ? (vue.openBlock(), vue.createElementBlock(
  12030. "view",
  12031. { key: 0 },
  12032. "扫描结果: " + vue.toDisplayString($setup.scanData),
  12033. 1
  12034. /* TEXT */
  12035. )) : vue.createCommentVNode("v-if", true),
  12036. (vue.openBlock(true), vue.createElementBlock(
  12037. vue.Fragment,
  12038. null,
  12039. vue.renderList($setup.devices, (item) => {
  12040. return vue.openBlock(), vue.createElementBlock(
  12041. "view",
  12042. null,
  12043. vue.toDisplayString(item.name),
  12044. 1
  12045. /* TEXT */
  12046. );
  12047. }),
  12048. 256
  12049. /* UNKEYED_FRAGMENT */
  12050. ))
  12051. ]);
  12052. }
  12053. const PagesIndexExpressScan = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/scan.vue"]]);
  12054. const props$j = {
  12055. props: {
  12056. // radio的名称
  12057. name: {
  12058. type: [String, Number, Boolean],
  12059. default: props$E.radio.name
  12060. },
  12061. // 形状,square为方形,circle为圆型
  12062. shape: {
  12063. type: String,
  12064. default: props$E.radio.shape
  12065. },
  12066. // 是否禁用
  12067. disabled: {
  12068. type: [String, Boolean],
  12069. default: props$E.radio.disabled
  12070. },
  12071. // 是否禁止点击提示语选中单选框
  12072. labelDisabled: {
  12073. type: [String, Boolean],
  12074. default: props$E.radio.labelDisabled
  12075. },
  12076. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12077. activeColor: {
  12078. type: String,
  12079. default: props$E.radio.activeColor
  12080. },
  12081. // 未选中的颜色
  12082. inactiveColor: {
  12083. type: String,
  12084. default: props$E.radio.inactiveColor
  12085. },
  12086. // 图标的大小,单位px
  12087. iconSize: {
  12088. type: [String, Number],
  12089. default: props$E.radio.iconSize
  12090. },
  12091. // label的字体大小,px单位
  12092. labelSize: {
  12093. type: [String, Number],
  12094. default: props$E.radio.labelSize
  12095. },
  12096. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  12097. label: {
  12098. type: [String, Number],
  12099. default: props$E.radio.label
  12100. },
  12101. // 整体的大小
  12102. size: {
  12103. type: [String, Number],
  12104. default: props$E.radio.size
  12105. },
  12106. // 图标颜色
  12107. color: {
  12108. type: String,
  12109. default: props$E.radio.color
  12110. },
  12111. // label的颜色
  12112. labelColor: {
  12113. type: String,
  12114. default: props$E.radio.labelColor
  12115. },
  12116. // 图标颜色
  12117. iconColor: {
  12118. type: String,
  12119. default: props$E.radio.iconColor
  12120. }
  12121. }
  12122. };
  12123. const _sfc_main$1w = {
  12124. name: "u-radio",
  12125. mixins: [mpMixin, mixin, props$j],
  12126. data() {
  12127. return {
  12128. checked: false,
  12129. // 当你看到这段代码的时候,
  12130. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  12131. // 故只能使用如此方法
  12132. parentData: {
  12133. iconSize: 12,
  12134. labelDisabled: null,
  12135. disabled: null,
  12136. shape: null,
  12137. activeColor: null,
  12138. inactiveColor: null,
  12139. size: 18,
  12140. value: null,
  12141. modelValue: null,
  12142. iconColor: null,
  12143. placement: "row",
  12144. borderBottom: false,
  12145. iconPlacement: "left"
  12146. }
  12147. };
  12148. },
  12149. computed: {
  12150. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  12151. elDisabled() {
  12152. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  12153. },
  12154. // 是否禁用label点击
  12155. elLabelDisabled() {
  12156. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  12157. },
  12158. // 组件尺寸,对应size的值,默认值为21px
  12159. elSize() {
  12160. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  12161. },
  12162. // 组件的勾选图标的尺寸,默认12px
  12163. elIconSize() {
  12164. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  12165. },
  12166. // 组件选中激活时的颜色
  12167. elActiveColor() {
  12168. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  12169. },
  12170. // 组件选未中激活时的颜色
  12171. elInactiveColor() {
  12172. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  12173. },
  12174. // label的颜色
  12175. elLabelColor() {
  12176. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  12177. },
  12178. // 组件的形状
  12179. elShape() {
  12180. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  12181. },
  12182. // label大小
  12183. elLabelSize() {
  12184. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  12185. },
  12186. elIconColor() {
  12187. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  12188. if (this.elDisabled) {
  12189. return this.checked ? this.elInactiveColor : "transparent";
  12190. } else {
  12191. return this.checked ? iconColor : "transparent";
  12192. }
  12193. },
  12194. iconClasses() {
  12195. let classes = [];
  12196. classes.push("u-radio__icon-wrap--" + this.elShape);
  12197. if (this.elDisabled) {
  12198. classes.push("u-radio__icon-wrap--disabled");
  12199. }
  12200. if (this.checked && this.elDisabled) {
  12201. classes.push("u-radio__icon-wrap--disabled--checked");
  12202. }
  12203. return classes;
  12204. },
  12205. iconWrapStyle() {
  12206. const style = {};
  12207. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  12208. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  12209. style.width = uni.$u.addUnit(this.elSize);
  12210. style.height = uni.$u.addUnit(this.elSize);
  12211. if (this.parentData.iconPlacement === "right") {
  12212. style.marginRight = 0;
  12213. }
  12214. return style;
  12215. },
  12216. radioStyle() {
  12217. const style = {};
  12218. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  12219. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  12220. }
  12221. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  12222. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  12223. }
  12224. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  12225. }
  12226. },
  12227. mounted() {
  12228. this.init();
  12229. },
  12230. methods: {
  12231. init() {
  12232. this.updateParentData();
  12233. if (!this.parent) {
  12234. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  12235. }
  12236. this.checked = this.name === this.parentData.modelValue;
  12237. },
  12238. updateParentData() {
  12239. this.getParentData("u-radio-group");
  12240. },
  12241. // 点击图标
  12242. iconClickHandler(e) {
  12243. this.preventEvent(e);
  12244. if (!this.elDisabled) {
  12245. this.setRadioCheckedStatus();
  12246. }
  12247. },
  12248. // 横向两端排列时,点击组件即可触发选中事件
  12249. wrapperClickHandler(e) {
  12250. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  12251. },
  12252. // 点击label
  12253. labelClickHandler(e) {
  12254. this.preventEvent(e);
  12255. if (!this.elLabelDisabled && !this.elDisabled) {
  12256. this.setRadioCheckedStatus();
  12257. }
  12258. },
  12259. emitEvent() {
  12260. if (!this.checked) {
  12261. this.$emit("change", this.name);
  12262. this.$nextTick(() => {
  12263. uni.$u.formValidate(this, "change");
  12264. });
  12265. }
  12266. },
  12267. // 改变组件选中状态
  12268. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  12269. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  12270. setRadioCheckedStatus() {
  12271. this.emitEvent();
  12272. this.checked = true;
  12273. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  12274. }
  12275. }
  12276. };
  12277. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  12278. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12279. return vue.openBlock(), vue.createElementBlock(
  12280. "view",
  12281. {
  12282. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  12283. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  12284. style: vue.normalizeStyle([$options.radioStyle])
  12285. },
  12286. [
  12287. vue.createElementVNode(
  12288. "view",
  12289. {
  12290. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  12291. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  12292. style: vue.normalizeStyle([$options.iconWrapStyle])
  12293. },
  12294. [
  12295. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  12296. vue.createVNode(_component_u_icon, {
  12297. class: "u-radio__icon-wrap__icon",
  12298. name: "checkbox-mark",
  12299. size: $options.elIconSize,
  12300. color: $options.elIconColor
  12301. }, null, 8, ["size", "color"])
  12302. ], true)
  12303. ],
  12304. 6
  12305. /* CLASS, STYLE */
  12306. ),
  12307. vue.createElementVNode(
  12308. "text",
  12309. {
  12310. class: "u-radio__text",
  12311. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  12312. style: vue.normalizeStyle({
  12313. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  12314. fontSize: $options.elLabelSize,
  12315. lineHeight: $options.elLabelSize
  12316. })
  12317. },
  12318. vue.toDisplayString(_ctx.label),
  12319. 5
  12320. /* TEXT, STYLE */
  12321. )
  12322. ],
  12323. 6
  12324. /* CLASS, STYLE */
  12325. );
  12326. }
  12327. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-83036558"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  12328. const props$i = {
  12329. props: {
  12330. // 绑定的值
  12331. modelValue: {
  12332. type: [String, Number, Boolean],
  12333. default: props$E.radioGroup.value
  12334. },
  12335. // 是否禁用全部radio
  12336. disabled: {
  12337. type: Boolean,
  12338. default: props$E.radioGroup.disabled
  12339. },
  12340. // 形状,circle-圆形,square-方形
  12341. shape: {
  12342. type: String,
  12343. default: props$E.radioGroup.shape
  12344. },
  12345. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12346. activeColor: {
  12347. type: String,
  12348. default: props$E.radioGroup.activeColor
  12349. },
  12350. // 未选中的颜色
  12351. inactiveColor: {
  12352. type: String,
  12353. default: props$E.radioGroup.inactiveColor
  12354. },
  12355. // 标识符
  12356. name: {
  12357. type: String,
  12358. default: props$E.radioGroup.name
  12359. },
  12360. // 整个组件的尺寸,默认px
  12361. size: {
  12362. type: [String, Number],
  12363. default: props$E.radioGroup.size
  12364. },
  12365. // 布局方式,row-横向,column-纵向
  12366. placement: {
  12367. type: String,
  12368. default: props$E.radioGroup.placement
  12369. },
  12370. // label的文本
  12371. label: {
  12372. type: [String],
  12373. default: props$E.radioGroup.label
  12374. },
  12375. // label的颜色 (默认 '#303133' )
  12376. labelColor: {
  12377. type: [String],
  12378. default: props$E.radioGroup.labelColor
  12379. },
  12380. // label的字体大小,px单位
  12381. labelSize: {
  12382. type: [String, Number],
  12383. default: props$E.radioGroup.labelSize
  12384. },
  12385. // 是否禁止点击文本操作checkbox(默认 false )
  12386. labelDisabled: {
  12387. type: Boolean,
  12388. default: props$E.radioGroup.labelDisabled
  12389. },
  12390. // 图标颜色
  12391. iconColor: {
  12392. type: String,
  12393. default: props$E.radioGroup.iconColor
  12394. },
  12395. // 图标的大小,单位px
  12396. iconSize: {
  12397. type: [String, Number],
  12398. default: props$E.radioGroup.iconSize
  12399. },
  12400. // 竖向配列时,是否显示下划线
  12401. borderBottom: {
  12402. type: Boolean,
  12403. default: props$E.radioGroup.borderBottom
  12404. },
  12405. // 图标与文字的对齐方式
  12406. iconPlacement: {
  12407. type: String,
  12408. default: props$E.radio.iconPlacement
  12409. }
  12410. }
  12411. };
  12412. const _sfc_main$1v = {
  12413. name: "u-radio-group",
  12414. mixins: [mpMixin, mixin, props$i],
  12415. computed: {
  12416. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  12417. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  12418. // 拉取父组件新的变化后的参数
  12419. parentData() {
  12420. return [
  12421. this.modelValue,
  12422. this.disabled,
  12423. this.inactiveColor,
  12424. this.activeColor,
  12425. this.size,
  12426. this.labelDisabled,
  12427. this.shape,
  12428. this.iconSize,
  12429. this.borderBottom,
  12430. this.placement
  12431. ];
  12432. },
  12433. bemClass() {
  12434. return this.bem("radio-group", ["placement"]);
  12435. }
  12436. },
  12437. watch: {
  12438. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  12439. parentData() {
  12440. if (this.children.length) {
  12441. this.children.map((child) => {
  12442. typeof child.init === "function" && child.init();
  12443. });
  12444. }
  12445. }
  12446. },
  12447. data() {
  12448. return {};
  12449. },
  12450. created() {
  12451. this.children = [];
  12452. },
  12453. emits: ["update:modelValue", "change"],
  12454. methods: {
  12455. // 将其他的radio设置为未选中的状态
  12456. unCheckedOther(childInstance) {
  12457. this.children.map((child) => {
  12458. if (childInstance !== child) {
  12459. child.checked = false;
  12460. }
  12461. });
  12462. const {
  12463. name
  12464. } = childInstance;
  12465. this.$emit("update:modelValue", name);
  12466. this.$emit("change", name);
  12467. }
  12468. }
  12469. };
  12470. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  12471. return vue.openBlock(), vue.createElementBlock(
  12472. "view",
  12473. {
  12474. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  12475. },
  12476. [
  12477. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  12478. ],
  12479. 2
  12480. /* CLASS */
  12481. );
  12482. }
  12483. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  12484. const props$h = {
  12485. props: {
  12486. // 是否虚线
  12487. dashed: {
  12488. type: Boolean,
  12489. default: props$E.divider.dashed
  12490. },
  12491. // 是否细线
  12492. hairline: {
  12493. type: Boolean,
  12494. default: props$E.divider.hairline
  12495. },
  12496. // 是否以点替代文字,优先于text字段起作用
  12497. dot: {
  12498. type: Boolean,
  12499. default: props$E.divider.dot
  12500. },
  12501. // 内容文本的位置,left-左边,center-中间,right-右边
  12502. textPosition: {
  12503. type: String,
  12504. default: props$E.divider.textPosition
  12505. },
  12506. // 文本内容
  12507. text: {
  12508. type: [String, Number],
  12509. default: props$E.divider.text
  12510. },
  12511. // 文本大小
  12512. textSize: {
  12513. type: [String, Number],
  12514. default: props$E.divider.textSize
  12515. },
  12516. // 文本颜色
  12517. textColor: {
  12518. type: String,
  12519. default: props$E.divider.textColor
  12520. },
  12521. // 线条颜色
  12522. lineColor: {
  12523. type: String,
  12524. default: props$E.divider.lineColor
  12525. }
  12526. }
  12527. };
  12528. const _sfc_main$1u = {
  12529. name: "u-divider",
  12530. mixins: [mpMixin, mixin, props$h],
  12531. computed: {
  12532. textStyle() {
  12533. const style = {};
  12534. style.fontSize = uni.$u.addUnit(this.textSize);
  12535. style.color = this.textColor;
  12536. return style;
  12537. },
  12538. // 左边线条的的样式
  12539. leftLineStyle() {
  12540. const style = {};
  12541. if (this.textPosition === "left") {
  12542. style.width = "80rpx";
  12543. } else {
  12544. style.flex = 1;
  12545. }
  12546. return style;
  12547. },
  12548. // 右边线条的的样式
  12549. rightLineStyle() {
  12550. const style = {};
  12551. if (this.textPosition === "right") {
  12552. style.width = "80rpx";
  12553. } else {
  12554. style.flex = 1;
  12555. }
  12556. return style;
  12557. }
  12558. },
  12559. methods: {
  12560. // divider组件被点击时触发
  12561. click() {
  12562. this.$emit("click");
  12563. }
  12564. }
  12565. };
  12566. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  12567. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  12568. return vue.openBlock(), vue.createElementBlock(
  12569. "view",
  12570. {
  12571. class: "u-divider",
  12572. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  12573. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  12574. },
  12575. [
  12576. vue.createVNode(_component_u_line, {
  12577. color: _ctx.lineColor,
  12578. customStyle: $options.leftLineStyle,
  12579. hairline: _ctx.hairline,
  12580. dashed: _ctx.dashed
  12581. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  12582. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  12583. key: 0,
  12584. class: "u-divider__dot"
  12585. }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  12586. "text",
  12587. {
  12588. key: 1,
  12589. class: "u-divider__text",
  12590. style: vue.normalizeStyle([$options.textStyle])
  12591. },
  12592. vue.toDisplayString(_ctx.text),
  12593. 5
  12594. /* TEXT, STYLE */
  12595. )) : vue.createCommentVNode("v-if", true),
  12596. vue.createVNode(_component_u_line, {
  12597. color: _ctx.lineColor,
  12598. customStyle: $options.rightLineStyle,
  12599. hairline: _ctx.hairline,
  12600. dashed: _ctx.dashed
  12601. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  12602. ],
  12603. 4
  12604. /* STYLE */
  12605. );
  12606. }
  12607. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-ea022cee"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  12608. const _sfc_main$1t = {
  12609. __name: "quick-check",
  12610. setup(__props, { expose: __expose }) {
  12611. __expose();
  12612. const selectedBatchId = vue.ref("");
  12613. const showBatchSelector = vue.ref(false);
  12614. const count = vue.ref(0);
  12615. const formData = vue.ref({
  12616. batchNum: "",
  12617. packageCode: "",
  12618. searchType: "2",
  12619. packageStatus: ""
  12620. });
  12621. const batchList = vue.ref([]);
  12622. function getBatchList() {
  12623. uni.$u.http.get("/app/batchnum/pagelist").then((res2) => {
  12624. batchList.value = res2.rows;
  12625. });
  12626. }
  12627. getBatchList();
  12628. const openBatchSelector = () => {
  12629. showBatchSelector.value = true;
  12630. };
  12631. const selectBatch = (batch) => {
  12632. selectedBatchId.value = batch.id;
  12633. count.value = Number(batch.num);
  12634. formData.value.batchNum = batch.batchNum;
  12635. showBatchSelector.value = false;
  12636. };
  12637. const handleSearch = () => {
  12638. formatAppLog("log", "at pages/index/express/quick-check.vue:117", "查询:", formData.value.packageCode);
  12639. };
  12640. const handleSubmitBatch = () => {
  12641. formatAppLog("log", "at pages/index/express/quick-check.vue:122", "提交批次:", formData.value.batchNum);
  12642. if (!formData.value.batchNum) {
  12643. uni.$u.toast("请选择批次");
  12644. return;
  12645. }
  12646. if (!formData.value.packageCode) {
  12647. uni.$u.toast("请扫描/输入物流单号");
  12648. return;
  12649. }
  12650. uni.$u.http.post("/app/ordersign/deliverySign", formData.value).then((res2) => {
  12651. formatAppLog("log", "at pages/index/express/quick-check.vue:132", res2);
  12652. if (res2.code == 200) {
  12653. let text = code + "快递验收成功";
  12654. uni.$u.ttsModule.speak(text);
  12655. } else {
  12656. let text = code + "订单不存在";
  12657. uni.$u.ttsModule.speak(text);
  12658. }
  12659. });
  12660. };
  12661. const handleScan = () => {
  12662. uni.scanCode({
  12663. success: (res2) => {
  12664. formData.value.packageCode = res2.result;
  12665. handleSubmitBatch();
  12666. }
  12667. });
  12668. };
  12669. const createNewBatch = () => {
  12670. selectedBatchId.value = "new";
  12671. formData.value.batchNum = "新建批次";
  12672. count.value = 0;
  12673. };
  12674. onLoad(() => {
  12675. uni.$u.useGlobalEvent((e) => {
  12676. formData.value.packageCode = e.barcode;
  12677. handleSubmitBatch();
  12678. });
  12679. });
  12680. onShow(() => {
  12681. uni.$u.updateActivePageOnShow();
  12682. });
  12683. const __returned__ = { selectedBatchId, showBatchSelector, count, formData, batchList, getBatchList, openBatchSelector, selectBatch, handleSearch, handleSubmitBatch, handleScan, createNewBatch, ref: vue.ref, get onLoad() {
  12684. return onLoad;
  12685. }, get onShow() {
  12686. return onShow;
  12687. } };
  12688. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12689. return __returned__;
  12690. }
  12691. };
  12692. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  12693. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12694. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12695. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  12696. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  12697. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  12698. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  12699. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  12700. const _directive_permission = vue.resolveDirective("permission");
  12701. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12702. vue.createCommentVNode(" 批次选择区域 "),
  12703. vue.createElementVNode("view", { class: "select-section" }, [
  12704. vue.createElementVNode("view", { class: "batch-select" }, [
  12705. vue.createElementVNode("text", { class: "required" }, "*"),
  12706. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次:"),
  12707. vue.createElementVNode("view", { class: "batch-input" }, [
  12708. vue.createElementVNode("view", {
  12709. class: "batch-input-text",
  12710. onClick: $setup.openBatchSelector
  12711. }),
  12712. vue.createVNode(_component_u_input, {
  12713. modelValue: $setup.formData.batchNum,
  12714. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.batchNum = $event),
  12715. placeholder: "请选择/新建批次",
  12716. readonly: "",
  12717. border: "surround",
  12718. "placeholder-style": "font-size: 32rpx",
  12719. "custom-style": "font-size: 32rpx;height: 88rpx;"
  12720. }, {
  12721. suffix: vue.withCtx(() => [
  12722. vue.createVNode(_component_u_icon, {
  12723. name: "arrow-down",
  12724. size: "18"
  12725. })
  12726. ]),
  12727. _: 1
  12728. /* STABLE */
  12729. }, 8, ["modelValue"])
  12730. ])
  12731. ])
  12732. ]),
  12733. vue.createCommentVNode(" 数量显示 "),
  12734. vue.createElementVNode("view", { class: "count-badge" }, [
  12735. vue.createTextVNode(" 数量 "),
  12736. vue.createElementVNode(
  12737. "text",
  12738. { style: { "font-size": "32rpx" } },
  12739. vue.toDisplayString($setup.count),
  12740. 1
  12741. /* TEXT */
  12742. )
  12743. ]),
  12744. vue.createCommentVNode(" 底部按钮 "),
  12745. vue.createElementVNode("view", { class: "footer" }, [
  12746. vue.createCommentVNode(" 查询区域 "),
  12747. vue.createElementVNode("view", { class: "query-section" }, [
  12748. vue.createVNode(_component_u_radio_group, {
  12749. modelValue: $setup.formData.searchType,
  12750. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.searchType = $event),
  12751. class: "query-radio"
  12752. }, {
  12753. default: vue.withCtx(() => [
  12754. vue.createVNode(_component_u_radio, {
  12755. label: "查订单",
  12756. name: "1",
  12757. labelSize: "16px",
  12758. iconSize: "16px"
  12759. }),
  12760. vue.createVNode(_component_u_radio, {
  12761. label: "查物流",
  12762. "custom-style": "margin-left:20px",
  12763. name: "2",
  12764. labelSize: "16px",
  12765. iconSize: "16px"
  12766. })
  12767. ]),
  12768. _: 1
  12769. /* STABLE */
  12770. }, 8, ["modelValue"]),
  12771. vue.createElementVNode("view", { class: "search-box" }, [
  12772. vue.createVNode(_component_u_input, {
  12773. "custom-style": "font-size: 32rpx;",
  12774. "placeholder-style": "font-size: 32rpx;",
  12775. modelValue: $setup.formData.packageCode,
  12776. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.packageCode = $event),
  12777. adjustPosition: true,
  12778. placeholder: "扫描/输入物流单号",
  12779. border: "surround",
  12780. clearable: ""
  12781. }, null, 8, ["modelValue"]),
  12782. vue.createVNode(_component_u_button, {
  12783. color: "#c8c8c8",
  12784. text: "查询",
  12785. onClick: $setup.handleSearch
  12786. })
  12787. ])
  12788. ]),
  12789. vue.createVNode(_component_u_divider),
  12790. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  12791. vue.createVNode(_component_u_button, {
  12792. size: "large",
  12793. type: "warning",
  12794. text: "验收扫码",
  12795. onClick: $setup.handleScan
  12796. }),
  12797. vue.withDirectives(vue.createVNode(
  12798. _component_u_button,
  12799. {
  12800. size: "large",
  12801. type: "primary",
  12802. text: "提交批次",
  12803. onClick: $setup.handleSubmitBatch
  12804. },
  12805. null,
  12806. 512
  12807. /* NEED_PATCH */
  12808. ), [
  12809. [_directive_permission, "app:express:quickCheck:confirm"]
  12810. ])
  12811. ])
  12812. ]),
  12813. vue.createCommentVNode(" 批次选择弹窗 "),
  12814. vue.createVNode(_component_u_popup, {
  12815. show: $setup.showBatchSelector,
  12816. mode: "bottom",
  12817. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
  12818. }, {
  12819. default: vue.withCtx(() => [
  12820. vue.createElementVNode("view", {
  12821. class: "batch-popup",
  12822. style: { "min-height": "300px" }
  12823. }, [
  12824. vue.createElementVNode("view", { class: "popup-header" }, [
  12825. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次")
  12826. ]),
  12827. vue.createElementVNode("scroll-view", {
  12828. "scroll-y": "",
  12829. class: "batch-list"
  12830. }, [
  12831. vue.createElementVNode(
  12832. "view",
  12833. {
  12834. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === "new" }]),
  12835. onClick: $setup.createNewBatch
  12836. },
  12837. [
  12838. vue.createElementVNode("text", null, "新建批次")
  12839. ],
  12840. 2
  12841. /* CLASS */
  12842. ),
  12843. (vue.openBlock(true), vue.createElementBlock(
  12844. vue.Fragment,
  12845. null,
  12846. vue.renderList($setup.batchList, (batch) => {
  12847. return vue.openBlock(), vue.createElementBlock("view", {
  12848. key: batch.id,
  12849. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
  12850. onClick: ($event) => $setup.selectBatch(batch)
  12851. }, [
  12852. vue.createElementVNode(
  12853. "text",
  12854. null,
  12855. vue.toDisplayString(batch.batchNum),
  12856. 1
  12857. /* TEXT */
  12858. ),
  12859. vue.createElementVNode(
  12860. "text",
  12861. null,
  12862. vue.toDisplayString(batch.num),
  12863. 1
  12864. /* TEXT */
  12865. )
  12866. ], 10, ["onClick"]);
  12867. }),
  12868. 128
  12869. /* KEYED_FRAGMENT */
  12870. ))
  12871. ])
  12872. ])
  12873. ]),
  12874. _: 1
  12875. /* STABLE */
  12876. }, 8, ["show"])
  12877. ]);
  12878. }
  12879. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-61cc11f4"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-check.vue"]]);
  12880. const keymap = {
  12881. "7": "0",
  12882. "8": "1",
  12883. "9": "2",
  12884. "10": "3",
  12885. "11": "4",
  12886. "12": "5",
  12887. "13": "6",
  12888. "14": "7",
  12889. "15": "8",
  12890. "16": "9",
  12891. "29": "A",
  12892. "30": "B",
  12893. "31": "C",
  12894. "32": "D",
  12895. "33": "E",
  12896. "34": "F",
  12897. "35": "G",
  12898. "36": "H",
  12899. "37": "I",
  12900. "38": "J",
  12901. "39": "K",
  12902. "40": "L",
  12903. "41": "M",
  12904. "42": "N",
  12905. "43": "O",
  12906. "44": "P",
  12907. "45": "Q",
  12908. "46": "R",
  12909. "47": "S",
  12910. "48": "T",
  12911. "49": "U",
  12912. "50": "V",
  12913. "51": "W",
  12914. "52": "X",
  12915. "53": "Y",
  12916. "54": "Z",
  12917. "55": ",",
  12918. "56": ".",
  12919. "59": "",
  12920. "69": "-",
  12921. "70": "=",
  12922. "81": "+"
  12923. };
  12924. const _sfc_main$1s = {
  12925. __name: "quick-unpack",
  12926. setup(__props, { expose: __expose }) {
  12927. __expose();
  12928. function goScan() {
  12929. uni.navigateTo({
  12930. url: "/pages/index/express/scan"
  12931. });
  12932. }
  12933. const unpackCode = vue.ref("");
  12934. function confirmTrackingNumber(code2) {
  12935. uni.$u.http.post("/app/ordersign/unpackingSign", {
  12936. packageCode: code2
  12937. }).then((res2) => {
  12938. if (res2.code == 200) {
  12939. let text = code2 + "拆包成功";
  12940. uni.$u.ttsModule.speak(text);
  12941. } else {
  12942. let text = code2 + res2.msg;
  12943. uni.$u.ttsModule.speak(text);
  12944. }
  12945. });
  12946. }
  12947. function scanCode() {
  12948. uni.scanCode({
  12949. success: (res2) => {
  12950. unpackCode.value = res2.result;
  12951. confirmTrackingNumber(res2.result);
  12952. formatAppLog("log", "at pages/index/express/quick-unpack.vue:68", "扫码结果:", res2.result);
  12953. },
  12954. fail: (err) => {
  12955. formatAppLog("error", "at pages/index/express/quick-unpack.vue:71", "扫码失败:", err);
  12956. }
  12957. });
  12958. }
  12959. const inputCache = vue.ref("");
  12960. const keypress = (e) => {
  12961. if (e.keyCode === 66 || e.key == "Enter") {
  12962. unpackCode.value = inputCache.value;
  12963. confirmTrackingNumber(unpackCode.value);
  12964. inputCache.value = "";
  12965. } else {
  12966. inputCache.value += keymap[e.keyCode] || "";
  12967. }
  12968. };
  12969. onLoad(() => {
  12970. uni.$u.useGlobalEvent((e) => {
  12971. unpackCode.value = e.barcode;
  12972. confirmTrackingNumber(e.barcode);
  12973. });
  12974. plus.key.addEventListener("keyup", keypress);
  12975. });
  12976. onUnload(() => {
  12977. plus.key.removeEventListener("keyup", keypress);
  12978. });
  12979. onShow(() => {
  12980. uni.$u.updateActivePageOnShow();
  12981. });
  12982. const __returned__ = { goScan, unpackCode, confirmTrackingNumber, scanCode, inputCache, keypress, ref: vue.ref, get onLoad() {
  12983. return onLoad;
  12984. }, get onUnload() {
  12985. return onUnload;
  12986. }, get onShow() {
  12987. return onShow;
  12988. }, get keymap() {
  12989. return keymap;
  12990. } };
  12991. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12992. return __returned__;
  12993. }
  12994. };
  12995. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  12996. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12997. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  12998. const _directive_permission = vue.resolveDirective("permission");
  12999. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  13000. 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> '),
  13001. vue.createCommentVNode(' <u-button type="primary" @click="goScan" text="扫码" /> '),
  13002. vue.createElementVNode("view", { class: "main-content" }, [
  13003. vue.createElementVNode("view", { class: "input-group" }, [
  13004. vue.createVNode(_component_u_input, {
  13005. "placeholder-style": "font-size:32rpx",
  13006. modelValue: $setup.unpackCode,
  13007. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.unpackCode = $event),
  13008. placeholder: "扫描/输入物流单号",
  13009. border: "surround"
  13010. }, null, 8, ["modelValue"]),
  13011. vue.withDirectives(vue.createVNode(
  13012. _component_u_button,
  13013. {
  13014. type: "primary",
  13015. onClick: _cache[1] || (_cache[1] = ($event) => $setup.confirmTrackingNumber($setup.unpackCode)),
  13016. text: "确定"
  13017. },
  13018. null,
  13019. 512
  13020. /* NEED_PATCH */
  13021. ), [
  13022. [_directive_permission, "app:express:quickUnpack:confirm"]
  13023. ])
  13024. ])
  13025. ]),
  13026. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  13027. vue.createVNode(_component_u_button, {
  13028. size: "large",
  13029. type: "success",
  13030. onClick: $setup.scanCode,
  13031. text: "扫码",
  13032. class: "scan-button"
  13033. })
  13034. ])
  13035. ]);
  13036. }
  13037. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-unpack.vue"]]);
  13038. const props$g = {
  13039. props: {
  13040. // tab的数据
  13041. list: {
  13042. type: Array,
  13043. default: props$E.subsection.list
  13044. },
  13045. // 当前活动的tab的index
  13046. current: {
  13047. type: [String, Number],
  13048. default: props$E.subsection.current
  13049. },
  13050. // 激活的颜色
  13051. activeColor: {
  13052. type: String,
  13053. default: props$E.subsection.activeColor
  13054. },
  13055. // 未激活的颜色
  13056. inactiveColor: {
  13057. type: String,
  13058. default: props$E.subsection.inactiveColor
  13059. },
  13060. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  13061. mode: {
  13062. type: String,
  13063. default: props$E.subsection.mode
  13064. },
  13065. // 字体大小
  13066. fontSize: {
  13067. type: [String, Number],
  13068. default: props$E.subsection.fontSize
  13069. },
  13070. // 激活tab的字体是否加粗
  13071. bold: {
  13072. type: Boolean,
  13073. default: props$E.subsection.bold
  13074. },
  13075. // mode = button时,组件背景颜色
  13076. bgColor: {
  13077. type: String,
  13078. default: props$E.subsection.bgColor
  13079. },
  13080. // 从list元素对象中读取的键名
  13081. keyName: {
  13082. type: String,
  13083. default: props$E.subsection.keyName
  13084. }
  13085. }
  13086. };
  13087. const _sfc_main$1r = {
  13088. name: "u-subsection",
  13089. mixins: [mpMixin, mixin, props$g],
  13090. data() {
  13091. return {
  13092. // 组件尺寸
  13093. itemRect: {
  13094. width: 0,
  13095. height: 0
  13096. }
  13097. };
  13098. },
  13099. watch: {
  13100. list(newValue, oldValue) {
  13101. this.init();
  13102. },
  13103. current: {
  13104. immediate: true,
  13105. handler(n) {
  13106. }
  13107. }
  13108. },
  13109. computed: {
  13110. wrapperStyle() {
  13111. const style = {};
  13112. if (this.mode === "button") {
  13113. style.backgroundColor = this.bgColor;
  13114. }
  13115. return style;
  13116. },
  13117. // 滑块的样式
  13118. barStyle() {
  13119. const style = {};
  13120. style.width = `${this.itemRect.width}px`;
  13121. style.height = `${this.itemRect.height}px`;
  13122. style.transform = `translateX(${this.current * this.itemRect.width}px)`;
  13123. if (this.mode === "subsection") {
  13124. style.backgroundColor = this.activeColor;
  13125. }
  13126. return style;
  13127. },
  13128. // 分段器item的样式
  13129. itemStyle(index2) {
  13130. return (index3) => {
  13131. const style = {};
  13132. if (this.mode === "subsection") {
  13133. style.borderColor = this.activeColor;
  13134. style.borderWidth = "1px";
  13135. style.borderStyle = "solid";
  13136. }
  13137. return style;
  13138. };
  13139. },
  13140. // 分段器文字颜色
  13141. textStyle(index2) {
  13142. return (index3) => {
  13143. const style = {};
  13144. style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
  13145. style.fontSize = uni.$u.addUnit(this.fontSize);
  13146. if (this.mode === "subsection") {
  13147. style.color = this.current === index3 ? "#fff" : this.inactiveColor;
  13148. } else {
  13149. style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
  13150. }
  13151. return style;
  13152. };
  13153. }
  13154. },
  13155. mounted() {
  13156. this.init();
  13157. },
  13158. methods: {
  13159. init() {
  13160. uni.$u.sleep().then(() => this.getRect());
  13161. },
  13162. // 判断展示文本
  13163. getText(item) {
  13164. return typeof item === "object" ? item[this.keyName] : item;
  13165. },
  13166. // 获取组件的尺寸
  13167. getRect() {
  13168. this.$uGetRect(".u-subsection__item--0").then((size) => {
  13169. this.itemRect = size;
  13170. });
  13171. },
  13172. clickHandler(index2) {
  13173. this.$emit("change", index2);
  13174. }
  13175. }
  13176. };
  13177. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  13178. return vue.openBlock(), vue.createElementBlock(
  13179. "view",
  13180. {
  13181. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  13182. ref: "u-subsection",
  13183. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
  13184. },
  13185. [
  13186. vue.createElementVNode(
  13187. "view",
  13188. {
  13189. class: vue.normalizeClass(["u-subsection__bar", [
  13190. _ctx.mode === "button" && "u-subsection--button__bar",
  13191. _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  13192. _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  13193. _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  13194. ]]),
  13195. ref: "u-subsection__bar",
  13196. style: vue.normalizeStyle([$options.barStyle])
  13197. },
  13198. null,
  13199. 6
  13200. /* CLASS, STYLE */
  13201. ),
  13202. (vue.openBlock(true), vue.createElementBlock(
  13203. vue.Fragment,
  13204. null,
  13205. vue.renderList(_ctx.list, (item, index2) => {
  13206. return vue.openBlock(), vue.createElementBlock("view", {
  13207. class: vue.normalizeClass(["u-subsection__item", [
  13208. `u-subsection__item--${index2}`,
  13209. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  13210. index2 === 0 && "u-subsection__item--first",
  13211. index2 === _ctx.list.length - 1 && "u-subsection__item--last"
  13212. ]]),
  13213. ref_for: true,
  13214. ref: `u-subsection__item--${index2}`,
  13215. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  13216. onClick: ($event) => $options.clickHandler(index2),
  13217. key: index2
  13218. }, [
  13219. vue.createElementVNode(
  13220. "text",
  13221. {
  13222. class: "u-subsection__item__text",
  13223. style: vue.normalizeStyle([$options.textStyle(index2)])
  13224. },
  13225. vue.toDisplayString($options.getText(item)),
  13226. 5
  13227. /* TEXT, STYLE */
  13228. )
  13229. ], 14, ["onClick"]);
  13230. }),
  13231. 128
  13232. /* KEYED_FRAGMENT */
  13233. ))
  13234. ],
  13235. 6
  13236. /* CLASS, STYLE */
  13237. );
  13238. }
  13239. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-b5ccb67e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  13240. const props$f = {
  13241. props: {
  13242. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  13243. offsetTop: {
  13244. type: [String, Number],
  13245. default: props$E.sticky.offsetTop
  13246. },
  13247. // 自定义导航栏的高度
  13248. customNavHeight: {
  13249. type: [String, Number],
  13250. default: props$E.sticky.customNavHeight
  13251. },
  13252. // 是否开启吸顶功能
  13253. disabled: {
  13254. type: Boolean,
  13255. default: props$E.sticky.disabled
  13256. },
  13257. // 吸顶区域的背景颜色
  13258. bgColor: {
  13259. type: String,
  13260. default: props$E.sticky.bgColor
  13261. },
  13262. // z-index值
  13263. zIndex: {
  13264. type: [String, Number],
  13265. default: props$E.sticky.zIndex
  13266. },
  13267. // 列表中的索引值
  13268. index: {
  13269. type: [String, Number],
  13270. default: props$E.sticky.index
  13271. }
  13272. }
  13273. };
  13274. const _sfc_main$1q = {
  13275. name: "u-sticky",
  13276. mixins: [mpMixin, mixin, props$f],
  13277. data() {
  13278. return {
  13279. cssSticky: false,
  13280. // 是否使用css的sticky实现
  13281. stickyTop: 0,
  13282. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  13283. elId: uni.$u.guid(),
  13284. left: 0,
  13285. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  13286. width: "auto",
  13287. height: "auto",
  13288. fixed: false
  13289. // js模式时,是否处于吸顶模式
  13290. };
  13291. },
  13292. computed: {
  13293. style() {
  13294. const style = {};
  13295. if (!this.disabled) {
  13296. if (this.cssSticky) {
  13297. style.position = "sticky";
  13298. style.zIndex = this.uZindex;
  13299. style.top = uni.$u.addUnit(this.stickyTop);
  13300. } else {
  13301. style.height = this.fixed ? this.height + "px" : "auto";
  13302. }
  13303. } else {
  13304. style.position = "static";
  13305. }
  13306. style.backgroundColor = this.bgColor;
  13307. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  13308. },
  13309. // 吸顶内容的样式
  13310. stickyContent() {
  13311. const style = {};
  13312. if (!this.cssSticky) {
  13313. style.position = this.fixed ? "fixed" : "static";
  13314. style.top = this.stickyTop + "px";
  13315. style.left = this.left + "px";
  13316. style.width = this.width == "auto" ? "auto" : this.width + "px";
  13317. style.zIndex = this.uZindex;
  13318. }
  13319. return style;
  13320. },
  13321. uZindex() {
  13322. return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
  13323. }
  13324. },
  13325. mounted() {
  13326. this.init();
  13327. },
  13328. methods: {
  13329. init() {
  13330. this.getStickyTop();
  13331. this.checkSupportCssSticky();
  13332. if (!this.cssSticky) {
  13333. !this.disabled && this.initObserveContent();
  13334. }
  13335. },
  13336. initObserveContent() {
  13337. this.$uGetRect("#" + this.elId).then((res2) => {
  13338. this.height = res2.height;
  13339. this.left = res2.left;
  13340. this.width = res2.width;
  13341. this.$nextTick(() => {
  13342. this.observeContent();
  13343. });
  13344. });
  13345. },
  13346. observeContent() {
  13347. this.disconnectObserver("contentObserver");
  13348. const contentObserver = uni.createIntersectionObserver({
  13349. // 检测的区间范围
  13350. thresholds: [0.95, 0.98, 1]
  13351. });
  13352. contentObserver.relativeToViewport({
  13353. top: -this.stickyTop
  13354. });
  13355. contentObserver.observe(`#${this.elId}`, (res2) => {
  13356. this.setFixed(res2.boundingClientRect.top);
  13357. });
  13358. this.contentObserver = contentObserver;
  13359. },
  13360. setFixed(top) {
  13361. const fixed = top <= this.stickyTop;
  13362. this.fixed = fixed;
  13363. },
  13364. disconnectObserver(observerName) {
  13365. const observer = this[observerName];
  13366. observer && observer.disconnect();
  13367. },
  13368. getStickyTop() {
  13369. this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
  13370. },
  13371. async checkSupportCssSticky() {
  13372. if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
  13373. this.cssSticky = true;
  13374. }
  13375. this.cssSticky = await this.checkComputedStyle();
  13376. if (uni.$u.os() === "ios") {
  13377. this.cssSticky = true;
  13378. }
  13379. },
  13380. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  13381. checkComputedStyle() {
  13382. return new Promise((resolve) => {
  13383. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  13384. computedStyle: ["position"]
  13385. }).exec((e) => {
  13386. resolve("sticky" === e[0].position);
  13387. });
  13388. });
  13389. },
  13390. // H5通过创建元素的形式嗅探是否支持css sticky
  13391. // 判断浏览器是否支持sticky属性
  13392. checkCssStickyForH5() {
  13393. }
  13394. },
  13395. beforeDestroy() {
  13396. this.disconnectObserver("contentObserver");
  13397. }
  13398. };
  13399. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  13400. return vue.openBlock(), vue.createElementBlock("view", {
  13401. class: "u-sticky",
  13402. id: $data.elId,
  13403. style: vue.normalizeStyle([$options.style])
  13404. }, [
  13405. vue.createElementVNode(
  13406. "view",
  13407. {
  13408. style: vue.normalizeStyle([$options.stickyContent]),
  13409. class: "u-sticky__content"
  13410. },
  13411. [
  13412. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  13413. ],
  13414. 4
  13415. /* STYLE */
  13416. )
  13417. ], 12, ["id"]);
  13418. }
  13419. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-8b303089"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  13420. const props$e = {
  13421. props: {
  13422. // 是否展示modal
  13423. show: {
  13424. type: Boolean,
  13425. default: props$E.modal.show
  13426. },
  13427. // 标题
  13428. title: {
  13429. type: [String],
  13430. default: props$E.modal.title
  13431. },
  13432. // 弹窗内容
  13433. content: {
  13434. type: String,
  13435. default: props$E.modal.content
  13436. },
  13437. // 确认文案
  13438. confirmText: {
  13439. type: String,
  13440. default: props$E.modal.confirmText
  13441. },
  13442. // 取消文案
  13443. cancelText: {
  13444. type: String,
  13445. default: props$E.modal.cancelText
  13446. },
  13447. // 是否显示确认按钮
  13448. showConfirmButton: {
  13449. type: Boolean,
  13450. default: props$E.modal.showConfirmButton
  13451. },
  13452. // 是否显示取消按钮
  13453. showCancelButton: {
  13454. type: Boolean,
  13455. default: props$E.modal.showCancelButton
  13456. },
  13457. // 确认按钮颜色
  13458. confirmColor: {
  13459. type: String,
  13460. default: props$E.modal.confirmColor
  13461. },
  13462. // 取消文字颜色
  13463. cancelColor: {
  13464. type: String,
  13465. default: props$E.modal.cancelColor
  13466. },
  13467. // 对调确认和取消的位置
  13468. buttonReverse: {
  13469. type: Boolean,
  13470. default: props$E.modal.buttonReverse
  13471. },
  13472. // 是否开启缩放效果
  13473. zoom: {
  13474. type: Boolean,
  13475. default: props$E.modal.zoom
  13476. },
  13477. // 是否异步关闭,只对确定按钮有效
  13478. asyncClose: {
  13479. type: Boolean,
  13480. default: props$E.modal.asyncClose
  13481. },
  13482. // 是否允许点击遮罩关闭modal
  13483. closeOnClickOverlay: {
  13484. type: Boolean,
  13485. default: props$E.modal.closeOnClickOverlay
  13486. },
  13487. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  13488. negativeTop: {
  13489. type: [String, Number],
  13490. default: props$E.modal.negativeTop
  13491. },
  13492. // modal宽度,不支持百分比,可以数值,px,rpx单位
  13493. width: {
  13494. type: [String, Number],
  13495. default: props$E.modal.width
  13496. },
  13497. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  13498. confirmButtonShape: {
  13499. type: String,
  13500. default: props$E.modal.confirmButtonShape
  13501. }
  13502. }
  13503. };
  13504. const _sfc_main$1p = {
  13505. name: "u-modal",
  13506. mixins: [mpMixin, mixin, props$e],
  13507. data() {
  13508. return {
  13509. loading: false
  13510. };
  13511. },
  13512. watch: {
  13513. show(n) {
  13514. if (n && this.loading)
  13515. this.loading = false;
  13516. }
  13517. },
  13518. methods: {
  13519. // 点击确定按钮
  13520. confirmHandler() {
  13521. if (this.asyncClose) {
  13522. this.loading = true;
  13523. }
  13524. this.$emit("confirm");
  13525. },
  13526. // 点击取消按钮
  13527. cancelHandler() {
  13528. this.$emit("cancel");
  13529. },
  13530. // 点击遮罩
  13531. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  13532. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  13533. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  13534. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  13535. clickHandler() {
  13536. if (this.closeOnClickOverlay) {
  13537. this.$emit("close");
  13538. }
  13539. }
  13540. }
  13541. };
  13542. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  13543. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  13544. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  13545. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  13546. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13547. mode: "center",
  13548. zoom: _ctx.zoom,
  13549. show: _ctx.show,
  13550. customStyle: {
  13551. borderRadius: "6px",
  13552. overflow: "hidden",
  13553. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  13554. },
  13555. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  13556. safeAreaInsetBottom: false,
  13557. duration: 400,
  13558. onClick: $options.clickHandler
  13559. }, {
  13560. default: vue.withCtx(() => [
  13561. vue.createElementVNode(
  13562. "view",
  13563. {
  13564. class: "u-modal",
  13565. style: vue.normalizeStyle({
  13566. width: _ctx.$u.addUnit(_ctx.width)
  13567. })
  13568. },
  13569. [
  13570. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13571. "text",
  13572. {
  13573. key: 0,
  13574. class: "u-modal__title"
  13575. },
  13576. vue.toDisplayString(_ctx.title),
  13577. 1
  13578. /* TEXT */
  13579. )) : vue.createCommentVNode("v-if", true),
  13580. vue.createElementVNode(
  13581. "view",
  13582. {
  13583. class: "u-modal__content",
  13584. style: vue.normalizeStyle({
  13585. paddingTop: `${_ctx.title ? 12 : 25}px`
  13586. })
  13587. },
  13588. [
  13589. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  13590. vue.createElementVNode(
  13591. "text",
  13592. { class: "u-modal__content__text" },
  13593. vue.toDisplayString(_ctx.content),
  13594. 1
  13595. /* TEXT */
  13596. )
  13597. ], true)
  13598. ],
  13599. 4
  13600. /* STYLE */
  13601. ),
  13602. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  13603. key: 1,
  13604. class: "u-modal__button-group--confirm-button"
  13605. }, [
  13606. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  13607. ])) : (vue.openBlock(), vue.createElementBlock(
  13608. vue.Fragment,
  13609. { key: 2 },
  13610. [
  13611. vue.createVNode(_component_u_line),
  13612. vue.createElementVNode(
  13613. "view",
  13614. {
  13615. class: "u-modal__button-group",
  13616. style: vue.normalizeStyle({
  13617. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  13618. })
  13619. },
  13620. [
  13621. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  13622. "view",
  13623. {
  13624. key: 0,
  13625. 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"]]),
  13626. "hover-stay-time": 150,
  13627. "hover-class": "u-modal__button-group__wrapper--hover",
  13628. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  13629. },
  13630. [
  13631. vue.createElementVNode(
  13632. "text",
  13633. {
  13634. class: "u-modal__button-group__wrapper__text",
  13635. style: vue.normalizeStyle({
  13636. color: _ctx.cancelColor
  13637. })
  13638. },
  13639. vue.toDisplayString(_ctx.cancelText),
  13640. 5
  13641. /* TEXT, STYLE */
  13642. )
  13643. ],
  13644. 2
  13645. /* CLASS */
  13646. )) : vue.createCommentVNode("v-if", true),
  13647. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  13648. key: 1,
  13649. direction: "column"
  13650. })) : vue.createCommentVNode("v-if", true),
  13651. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  13652. "view",
  13653. {
  13654. key: 2,
  13655. 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"]]),
  13656. "hover-stay-time": 150,
  13657. "hover-class": "u-modal__button-group__wrapper--hover",
  13658. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  13659. },
  13660. [
  13661. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  13662. "text",
  13663. {
  13664. key: 1,
  13665. class: "u-modal__button-group__wrapper__text",
  13666. style: vue.normalizeStyle({
  13667. color: _ctx.confirmColor
  13668. })
  13669. },
  13670. vue.toDisplayString(_ctx.confirmText),
  13671. 5
  13672. /* TEXT, STYLE */
  13673. ))
  13674. ],
  13675. 2
  13676. /* CLASS */
  13677. )) : vue.createCommentVNode("v-if", true)
  13678. ],
  13679. 4
  13680. /* STYLE */
  13681. )
  13682. ],
  13683. 64
  13684. /* STABLE_FRAGMENT */
  13685. ))
  13686. ],
  13687. 4
  13688. /* STYLE */
  13689. )
  13690. ]),
  13691. _: 3
  13692. /* FORWARDED */
  13693. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  13694. }
  13695. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-f667648f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  13696. const _sfc_main$1o = {
  13697. __name: "ApproveButton",
  13698. emits: ["approve"],
  13699. setup(__props, { expose: __expose, emit: __emit }) {
  13700. __expose();
  13701. const emit2 = __emit;
  13702. const showConfirmModal = vue.ref(false);
  13703. const handleApprove = () => {
  13704. showConfirmModal.value = true;
  13705. };
  13706. const confirmApprove = () => {
  13707. emit2("approve");
  13708. showConfirmModal.value = false;
  13709. };
  13710. const __returned__ = { emit: emit2, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
  13711. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13712. return __returned__;
  13713. }
  13714. };
  13715. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  13716. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  13717. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  13718. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  13719. vue.createVNode(
  13720. _component_u_button,
  13721. vue.mergeProps({
  13722. type: "success",
  13723. text: "同意",
  13724. size: "small",
  13725. onClick: $setup.handleApprove
  13726. }, _ctx.$attrs),
  13727. null,
  13728. 16
  13729. /* FULL_PROPS */
  13730. ),
  13731. vue.createCommentVNode(" 确认弹窗 "),
  13732. vue.createVNode(_component_u_modal, {
  13733. show: $setup.showConfirmModal,
  13734. title: "确认",
  13735. content: "确认收到货了吗?",
  13736. onConfirm: $setup.confirmApprove,
  13737. showCancelButton: "",
  13738. "content-style": { textAlign: "center" },
  13739. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
  13740. }, null, 8, ["show"])
  13741. ]);
  13742. }
  13743. const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ApproveButton.vue"]]);
  13744. const props$d = {
  13745. props: {
  13746. // 是否展示工具条
  13747. show: {
  13748. type: Boolean,
  13749. default: props$E.toolbar.show
  13750. },
  13751. // 取消按钮的文字
  13752. cancelText: {
  13753. type: String,
  13754. default: props$E.toolbar.cancelText
  13755. },
  13756. // 确认按钮的文字
  13757. confirmText: {
  13758. type: String,
  13759. default: props$E.toolbar.confirmText
  13760. },
  13761. // 取消按钮的颜色
  13762. cancelColor: {
  13763. type: String,
  13764. default: props$E.toolbar.cancelColor
  13765. },
  13766. // 确认按钮的颜色
  13767. confirmColor: {
  13768. type: String,
  13769. default: props$E.toolbar.confirmColor
  13770. },
  13771. // 标题文字
  13772. title: {
  13773. type: String,
  13774. default: props$E.toolbar.title
  13775. }
  13776. }
  13777. };
  13778. const _sfc_main$1n = {
  13779. name: "u-toolbar",
  13780. mixins: [mpMixin, mixin, props$d],
  13781. methods: {
  13782. // 点击取消按钮
  13783. cancel() {
  13784. this.$emit("cancel");
  13785. },
  13786. // 点击确定按钮
  13787. confirm() {
  13788. this.$emit("confirm");
  13789. }
  13790. }
  13791. };
  13792. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  13793. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  13794. "view",
  13795. {
  13796. key: 0,
  13797. class: "u-toolbar",
  13798. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  13799. },
  13800. [
  13801. vue.createElementVNode("view", {
  13802. class: "u-toolbar__cancel__wrapper",
  13803. "hover-class": "u-hover-class"
  13804. }, [
  13805. vue.createElementVNode(
  13806. "text",
  13807. {
  13808. class: "u-toolbar__wrapper__cancel",
  13809. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  13810. style: vue.normalizeStyle({
  13811. color: _ctx.cancelColor
  13812. })
  13813. },
  13814. vue.toDisplayString(_ctx.cancelText),
  13815. 5
  13816. /* TEXT, STYLE */
  13817. )
  13818. ]),
  13819. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13820. "text",
  13821. {
  13822. key: 0,
  13823. class: "u-toolbar__title u-line-1"
  13824. },
  13825. vue.toDisplayString(_ctx.title),
  13826. 1
  13827. /* TEXT */
  13828. )) : vue.createCommentVNode("v-if", true),
  13829. vue.createElementVNode("view", {
  13830. class: "u-toolbar__confirm__wrapper",
  13831. "hover-class": "u-hover-class"
  13832. }, [
  13833. vue.createElementVNode(
  13834. "text",
  13835. {
  13836. class: "u-toolbar__wrapper__confirm",
  13837. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  13838. style: vue.normalizeStyle({
  13839. color: _ctx.confirmColor
  13840. })
  13841. },
  13842. vue.toDisplayString(_ctx.confirmText),
  13843. 5
  13844. /* TEXT, STYLE */
  13845. )
  13846. ])
  13847. ],
  13848. 32
  13849. /* NEED_HYDRATION */
  13850. )) : vue.createCommentVNode("v-if", true);
  13851. }
  13852. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  13853. const props$c = {
  13854. props: {
  13855. // 是否展示picker弹窗
  13856. show: {
  13857. type: Boolean,
  13858. default: props$E.picker.show
  13859. },
  13860. // 是否展示顶部的操作栏
  13861. showToolbar: {
  13862. type: Boolean,
  13863. default: props$E.picker.showToolbar
  13864. },
  13865. // 顶部标题
  13866. title: {
  13867. type: String,
  13868. default: props$E.picker.title
  13869. },
  13870. // 对象数组,设置每一列的数据
  13871. columns: {
  13872. type: Array,
  13873. default: props$E.picker.columns
  13874. },
  13875. // 是否显示加载中状态
  13876. loading: {
  13877. type: Boolean,
  13878. default: props$E.picker.loading
  13879. },
  13880. // 各列中,单个选项的高度
  13881. itemHeight: {
  13882. type: [String, Number],
  13883. default: props$E.picker.itemHeight
  13884. },
  13885. // 取消按钮的文字
  13886. cancelText: {
  13887. type: String,
  13888. default: props$E.picker.cancelText
  13889. },
  13890. // 确认按钮的文字
  13891. confirmText: {
  13892. type: String,
  13893. default: props$E.picker.confirmText
  13894. },
  13895. // 取消按钮的颜色
  13896. cancelColor: {
  13897. type: String,
  13898. default: props$E.picker.cancelColor
  13899. },
  13900. // 确认按钮的颜色
  13901. confirmColor: {
  13902. type: String,
  13903. default: props$E.picker.confirmColor
  13904. },
  13905. // 每列中可见选项的数量
  13906. visibleItemCount: {
  13907. type: [String, Number],
  13908. default: props$E.picker.visibleItemCount
  13909. },
  13910. // 选项对象中,需要展示的属性键名
  13911. keyName: {
  13912. type: String,
  13913. default: props$E.picker.keyName
  13914. },
  13915. // 是否允许点击遮罩关闭选择器
  13916. closeOnClickOverlay: {
  13917. type: Boolean,
  13918. default: props$E.picker.closeOnClickOverlay
  13919. },
  13920. // 各列的默认索引
  13921. defaultIndex: {
  13922. type: Array,
  13923. default: props$E.picker.defaultIndex
  13924. },
  13925. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  13926. immediateChange: {
  13927. type: Boolean,
  13928. default: props$E.picker.immediateChange
  13929. }
  13930. }
  13931. };
  13932. const _sfc_main$1m = {
  13933. name: "u-picker",
  13934. mixins: [mpMixin, mixin, props$c],
  13935. data() {
  13936. return {
  13937. // 上一次选择的列索引
  13938. lastIndex: [],
  13939. // 索引值 ,对应picker-view的value
  13940. innerIndex: [],
  13941. // 各列的值
  13942. innerColumns: [],
  13943. // 上一次的变化列索引
  13944. columnIndex: 0
  13945. };
  13946. },
  13947. watch: {
  13948. // 监听默认索引的变化,重新设置对应的值
  13949. defaultIndex: {
  13950. immediate: true,
  13951. handler(n) {
  13952. this.setIndexs(n, true);
  13953. }
  13954. },
  13955. // 监听columns参数的变化
  13956. columns: {
  13957. immediate: true,
  13958. deep: true,
  13959. handler(n) {
  13960. this.setColumns(n);
  13961. }
  13962. }
  13963. },
  13964. emits: ["close", "cancel", "confirm", "change"],
  13965. methods: {
  13966. // 获取item需要显示的文字,判别为对象还是文本
  13967. getItemText(item) {
  13968. if (uni.$u.test.object(item)) {
  13969. return item[this.keyName];
  13970. } else {
  13971. return item;
  13972. }
  13973. },
  13974. // 关闭选择器
  13975. closeHandler() {
  13976. if (this.closeOnClickOverlay) {
  13977. this.$emit("close");
  13978. }
  13979. },
  13980. // 点击工具栏的取消按钮
  13981. cancel() {
  13982. this.$emit("cancel");
  13983. },
  13984. // 点击工具栏的确定按钮
  13985. confirm() {
  13986. this.$emit("confirm", {
  13987. indexs: this.innerIndex,
  13988. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  13989. values: this.innerColumns
  13990. });
  13991. },
  13992. // 选择器某一列的数据发生变化时触发
  13993. changeHandler(e) {
  13994. const {
  13995. value: value2
  13996. } = e.detail;
  13997. let index2 = 0, columnIndex = 0;
  13998. for (let i = 0; i < value2.length; i++) {
  13999. let item = value2[i];
  14000. if (item !== (this.lastIndex[i] || 0)) {
  14001. columnIndex = i;
  14002. index2 = item;
  14003. break;
  14004. }
  14005. }
  14006. this.columnIndex = columnIndex;
  14007. const values = this.innerColumns;
  14008. this.setLastIndex(value2);
  14009. this.setIndexs(value2);
  14010. this.$emit("change", {
  14011. // 微信小程序不能传递this,会因为循环引用而报错
  14012. picker: this,
  14013. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  14014. index: index2,
  14015. indexs: value2,
  14016. // values为当前变化列的数组内容
  14017. values,
  14018. columnIndex
  14019. });
  14020. },
  14021. // 设置index索引,此方法可被外部调用设置
  14022. setIndexs(index2, setLastIndex) {
  14023. this.innerIndex = uni.$u.deepClone(index2);
  14024. if (setLastIndex) {
  14025. this.setLastIndex(index2);
  14026. }
  14027. },
  14028. // 记录上一次的各列索引位置
  14029. setLastIndex(index2) {
  14030. this.lastIndex = uni.$u.deepClone(index2);
  14031. },
  14032. // 设置对应列选项的所有值
  14033. setColumnValues(columnIndex, values) {
  14034. this.innerColumns.splice(columnIndex, 1, values);
  14035. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  14036. for (let i = 0; i < this.innerColumns.length; i++) {
  14037. if (i > this.columnIndex) {
  14038. tmpIndex[i] = 0;
  14039. }
  14040. }
  14041. this.setIndexs(tmpIndex);
  14042. },
  14043. // 获取对应列的所有选项
  14044. getColumnValues(columnIndex) {
  14045. (async () => {
  14046. await uni.$u.sleep();
  14047. })();
  14048. return this.innerColumns[columnIndex];
  14049. },
  14050. // 设置整体各列的columns的值
  14051. setColumns(columns) {
  14052. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  14053. this.innerColumns = uni.$u.deepClone(columns);
  14054. if (this.innerIndex.length === 0) {
  14055. this.innerIndex = new Array(columns.length).fill(0);
  14056. }
  14057. },
  14058. // 获取各列选中值对应的索引
  14059. getIndexs() {
  14060. return this.innerIndex;
  14061. },
  14062. // 获取各列选中的值
  14063. getValues() {
  14064. (async () => {
  14065. await uni.$u.sleep();
  14066. })();
  14067. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  14068. }
  14069. }
  14070. };
  14071. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  14072. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$4);
  14073. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  14074. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  14075. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  14076. show: _ctx.show,
  14077. onClose: $options.closeHandler
  14078. }, {
  14079. default: vue.withCtx(() => [
  14080. vue.createElementVNode("view", { class: "u-picker" }, [
  14081. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  14082. key: 0,
  14083. cancelColor: _ctx.cancelColor,
  14084. confirmColor: _ctx.confirmColor,
  14085. cancelText: _ctx.cancelText,
  14086. confirmText: _ctx.confirmText,
  14087. title: _ctx.title,
  14088. onCancel: $options.cancel,
  14089. onConfirm: $options.confirm
  14090. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  14091. vue.createElementVNode("picker-view", {
  14092. class: "u-picker__view",
  14093. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  14094. value: $data.innerIndex,
  14095. immediateChange: _ctx.immediateChange,
  14096. style: vue.normalizeStyle({
  14097. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  14098. }),
  14099. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  14100. }, [
  14101. (vue.openBlock(true), vue.createElementBlock(
  14102. vue.Fragment,
  14103. null,
  14104. vue.renderList($data.innerColumns, (item, index2) => {
  14105. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  14106. key: index2,
  14107. class: "u-picker__view__column"
  14108. }, [
  14109. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  14110. vue.Fragment,
  14111. { key: 0 },
  14112. vue.renderList(item, (item1, index1) => {
  14113. return vue.openBlock(), vue.createElementBlock(
  14114. "text",
  14115. {
  14116. class: "u-picker__view__column__item u-line-1",
  14117. key: index1,
  14118. style: vue.normalizeStyle({
  14119. height: _ctx.$u.addUnit(_ctx.itemHeight),
  14120. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  14121. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  14122. })
  14123. },
  14124. vue.toDisplayString($options.getItemText(item1)),
  14125. 5
  14126. /* TEXT, STYLE */
  14127. );
  14128. }),
  14129. 128
  14130. /* KEYED_FRAGMENT */
  14131. )) : vue.createCommentVNode("v-if", true)
  14132. ]);
  14133. }),
  14134. 128
  14135. /* KEYED_FRAGMENT */
  14136. ))
  14137. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  14138. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  14139. key: 1,
  14140. class: "u-picker--loading"
  14141. }, [
  14142. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  14143. ])) : vue.createCommentVNode("v-if", true)
  14144. ])
  14145. ]),
  14146. _: 1
  14147. /* STABLE */
  14148. }, 8, ["show", "onClose"]);
  14149. }
  14150. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-91b05052"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  14151. const _sfc_main$1l = {
  14152. __name: "RejectButton",
  14153. emits: ["reject"],
  14154. setup(__props, { expose: __expose, emit: __emit }) {
  14155. __expose();
  14156. const emit2 = __emit;
  14157. const showRejectPicker = vue.ref(false);
  14158. const rejectReasons = vue.ref([]);
  14159. const getRejectReason = async () => {
  14160. const res2 = await uni.$u.http.get("/app/sysDict/getDict?key=route_exception_reason ");
  14161. if (res2.code == 200) {
  14162. rejectReasons.value = res2.data.map((item) => item.dictValue);
  14163. }
  14164. };
  14165. getRejectReason();
  14166. const handleReject = () => {
  14167. showRejectPicker.value = true;
  14168. };
  14169. const confirmReject = (e) => {
  14170. const reason = e.value[0];
  14171. emit2("reject", reason);
  14172. showRejectPicker.value = false;
  14173. };
  14174. const __returned__ = { emit: emit2, showRejectPicker, rejectReasons, getRejectReason, handleReject, confirmReject, ref: vue.ref };
  14175. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14176. return __returned__;
  14177. }
  14178. };
  14179. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  14180. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14181. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  14182. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  14183. vue.createVNode(
  14184. _component_u_button,
  14185. vue.mergeProps({
  14186. type: "warning",
  14187. text: "驳回",
  14188. size: "small",
  14189. onClick: $setup.handleReject
  14190. }, _ctx.$attrs),
  14191. null,
  14192. 16
  14193. /* FULL_PROPS */
  14194. ),
  14195. vue.createCommentVNode(" 驳回原因选择器 "),
  14196. vue.createVNode(_component_u_picker, {
  14197. show: $setup.showRejectPicker,
  14198. columns: [$setup.rejectReasons],
  14199. onConfirm: $setup.confirmReject,
  14200. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
  14201. }, null, 8, ["show", "columns"])
  14202. ]);
  14203. }
  14204. const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/RejectButton.vue"]]);
  14205. const _sfc_main$1k = {
  14206. __name: "ExceptionItem",
  14207. props: {
  14208. order: {
  14209. type: Object,
  14210. default: () => ({
  14211. orderNo: "",
  14212. expressNo: "",
  14213. estimatedPrice: "",
  14214. pusher: "",
  14215. pushTime: ""
  14216. })
  14217. }
  14218. },
  14219. emits: ["refresh"],
  14220. setup(__props, { expose: __expose, emit: __emit }) {
  14221. __expose();
  14222. const props2 = __props;
  14223. const emit2 = __emit;
  14224. const handleCheckLogistics = () => {
  14225. uni.navigateTo({
  14226. url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
  14227. });
  14228. };
  14229. function handleButtonClick(checkStatus, reason) {
  14230. uni.$u.http.post("/app/orderexception/update", {
  14231. id: props2.order.id,
  14232. checkStatus,
  14233. refusalReason: reason
  14234. }).then((res2) => {
  14235. if (res2.code == 200) {
  14236. if (checkStatus == 2) {
  14237. let text = props2.order.waybillCode + "签收成功";
  14238. uni.$u.ttsModule.speak(text);
  14239. }
  14240. uni.$u.toast("操作成功");
  14241. emit2("refresh");
  14242. } else {
  14243. uni.$u.toast(res2.msg);
  14244. }
  14245. });
  14246. }
  14247. const __returned__ = { props: props2, emit: emit2, handleCheckLogistics, handleButtonClick, ref: vue.ref, ApproveButton, RejectButton };
  14248. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14249. return __returned__;
  14250. }
  14251. };
  14252. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  14253. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14254. const _directive_permission = vue.resolveDirective("permission");
  14255. return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
  14256. vue.createCommentVNode(" 订单信息 "),
  14257. vue.createElementVNode("view", { class: "info-section flex-1" }, [
  14258. vue.createElementVNode("view", { class: "info-row" }, [
  14259. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  14260. vue.createElementVNode(
  14261. "text",
  14262. { class: "value" },
  14263. vue.toDisplayString($props.order.orderId),
  14264. 1
  14265. /* TEXT */
  14266. )
  14267. ]),
  14268. vue.createElementVNode("view", { class: "info-row" }, [
  14269. vue.createElementVNode("text", { class: "label" }, "快递单号:"),
  14270. vue.createElementVNode(
  14271. "text",
  14272. { class: "value" },
  14273. vue.toDisplayString($props.order.waybillCode),
  14274. 1
  14275. /* TEXT */
  14276. )
  14277. ]),
  14278. vue.createElementVNode("view", { class: "info-row" }, [
  14279. vue.createElementVNode("text", { class: "label" }, "预估单价:"),
  14280. vue.createElementVNode(
  14281. "text",
  14282. { class: "value" },
  14283. vue.toDisplayString($props.order.expectMoney) + "元",
  14284. 1
  14285. /* TEXT */
  14286. )
  14287. ]),
  14288. vue.createElementVNode("view", { class: "info-row" }, [
  14289. vue.createElementVNode("text", { class: "label" }, "推送人:"),
  14290. vue.createElementVNode(
  14291. "text",
  14292. { class: "value" },
  14293. vue.toDisplayString($props.order.createName),
  14294. 1
  14295. /* TEXT */
  14296. )
  14297. ]),
  14298. vue.createElementVNode("view", {
  14299. class: "info-row",
  14300. style: { "margin-bottom": "0" }
  14301. }, [
  14302. vue.createElementVNode("text", { class: "label" }, "推送时间:"),
  14303. vue.createElementVNode(
  14304. "text",
  14305. { class: "value" },
  14306. vue.toDisplayString($props.order.createTime),
  14307. 1
  14308. /* TEXT */
  14309. )
  14310. ])
  14311. ]),
  14312. vue.createCommentVNode(" 操作按钮 "),
  14313. vue.createElementVNode("view", { class: "action-section" }, [
  14314. vue.createVNode(_component_u_button, {
  14315. type: "primary",
  14316. text: "查看物流",
  14317. size: "small",
  14318. onClick: $setup.handleCheckLogistics
  14319. }),
  14320. $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
  14321. $setup["ApproveButton"],
  14322. {
  14323. key: 0,
  14324. onApprove: _cache[0] || (_cache[0] = ($event) => $setup.handleButtonClick(2))
  14325. },
  14326. null,
  14327. 512
  14328. /* NEED_PATCH */
  14329. )), [
  14330. [_directive_permission, "app:express:exception:approve"]
  14331. ]) : vue.createCommentVNode("v-if", true),
  14332. $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
  14333. $setup["RejectButton"],
  14334. {
  14335. key: 1,
  14336. onReject: _cache[1] || (_cache[1] = (reason) => $setup.handleButtonClick(3, reason))
  14337. },
  14338. null,
  14339. 512
  14340. /* NEED_PATCH */
  14341. )), [
  14342. [_directive_permission, "app:express:exception:reject"]
  14343. ]) : vue.createCommentVNode("v-if", true),
  14344. $props.order.checkStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  14345. key: 2,
  14346. style: { "color": "#19be6b" }
  14347. }, "[已签收]")) : vue.createCommentVNode("v-if", true),
  14348. $props.order.checkStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  14349. key: 3,
  14350. style: { "color": "#f00" }
  14351. }, "[已驳回]")) : vue.createCommentVNode("v-if", true)
  14352. ])
  14353. ]);
  14354. }
  14355. const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-e0527396"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ExceptionItem.vue"]]);
  14356. const _sfc_main$1j = {
  14357. __name: "route-exception",
  14358. setup(__props, { expose: __expose }) {
  14359. __expose();
  14360. const tabList = ["待处理订单", "历史异常签收"];
  14361. const curNow = vue.ref(0);
  14362. const exceptionList = vue.ref([]);
  14363. let urlList = ["/app/orderexception/pagelist", "/app/orderexception/getPageLoglist"];
  14364. const requestStr = vue.ref(urlList[0]);
  14365. function sectionChange(index2) {
  14366. curNow.value = index2;
  14367. requestStr.value = urlList[index2];
  14368. handleSearch();
  14369. }
  14370. const pageScrollRef = vue.ref(null);
  14371. const otherParams = vue.ref({ search: "" });
  14372. const updateList = (list) => {
  14373. exceptionList.value = list;
  14374. };
  14375. const handleSearch = () => {
  14376. var _a;
  14377. (_a = pageScrollRef.value) == null ? void 0 : _a.resetUpScroll();
  14378. };
  14379. const handleScan = () => {
  14380. uni.scanCode({
  14381. success: (res2) => {
  14382. otherParams.value.search = res2.result;
  14383. handleSearch();
  14384. }
  14385. });
  14386. };
  14387. onLoad(() => {
  14388. uni.$u.useGlobalEvent((e) => {
  14389. otherParams.value.search = e.barcode;
  14390. handleSearch();
  14391. });
  14392. });
  14393. onShow(() => {
  14394. uni.$u.updateActivePageOnShow();
  14395. });
  14396. const __returned__ = { tabList, curNow, exceptionList, get urlList() {
  14397. return urlList;
  14398. }, set urlList(v) {
  14399. urlList = v;
  14400. }, requestStr, sectionChange, pageScrollRef, otherParams, updateList, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  14401. return onLoad;
  14402. }, get onShow() {
  14403. return onShow;
  14404. }, ExceptionItem, PageScroll: pageScroll };
  14405. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14406. return __returned__;
  14407. }
  14408. };
  14409. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  14410. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  14411. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  14412. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  14413. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14414. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14415. vue.createCommentVNode(" 列表区域 "),
  14416. vue.createVNode($setup["PageScroll"], {
  14417. ref: "pageScrollRef",
  14418. height: "100vh",
  14419. requestStr: $setup.requestStr,
  14420. onUpdateList: $setup.updateList,
  14421. otherParams: $setup.otherParams
  14422. }, {
  14423. default: vue.withCtx(() => [
  14424. vue.createVNode(_component_u_sticky, { "offset-top": 0 }, {
  14425. default: vue.withCtx(() => [
  14426. vue.createCommentVNode(" 顶部标签页 "),
  14427. vue.createVNode(_component_u_subsection, {
  14428. fontSize: "16",
  14429. list: $setup.tabList,
  14430. current: $setup.curNow,
  14431. onChange: $setup.sectionChange,
  14432. mode: "subsection",
  14433. class: "tabs-list"
  14434. }, null, 8, ["current"])
  14435. ]),
  14436. _: 1
  14437. /* STABLE */
  14438. }),
  14439. vue.createElementVNode("view", { class: "list-container" }, [
  14440. (vue.openBlock(true), vue.createElementBlock(
  14441. vue.Fragment,
  14442. null,
  14443. vue.renderList($setup.exceptionList, (item) => {
  14444. return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
  14445. key: item.orderNo,
  14446. order: item,
  14447. onRefresh: $setup.handleSearch
  14448. }, null, 8, ["order"]);
  14449. }),
  14450. 128
  14451. /* KEYED_FRAGMENT */
  14452. ))
  14453. ])
  14454. ]),
  14455. _: 1
  14456. /* STABLE */
  14457. }, 8, ["requestStr", "otherParams"]),
  14458. vue.createCommentVNode(" 底部搜索框 "),
  14459. vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
  14460. vue.createVNode(_component_u_search, {
  14461. modelValue: $setup.otherParams.search,
  14462. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  14463. placeholder: "请输入物流单号/订单编号",
  14464. "show-action": false,
  14465. inputStyle: { fontSize: "32rpx" },
  14466. onSearch: $setup.handleSearch,
  14467. height: "80rpx",
  14468. shape: "round"
  14469. }, null, 8, ["modelValue"]),
  14470. vue.createVNode(_component_u_icon, {
  14471. name: "scan",
  14472. size: "28",
  14473. color: "#19be6b",
  14474. onClick: $setup.handleScan
  14475. })
  14476. ])
  14477. ]);
  14478. }
  14479. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-388e5b84"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/route-exception.vue"]]);
  14480. const placeholderStyle$1 = "font-size:32rpx";
  14481. const _sfc_main$1i = {
  14482. __name: "warehouse-sign",
  14483. setup(__props, { expose: __expose }) {
  14484. __expose();
  14485. const customStyle = vue.reactive({
  14486. height: "90rpx"
  14487. });
  14488. const selectedWarehouse = vue.ref("");
  14489. const form = vue.ref({
  14490. "packageCode": "",
  14491. "godownId": ""
  14492. });
  14493. const showSelector = vue.ref(false);
  14494. function openWarehouseSelector() {
  14495. showSelector.value = true;
  14496. }
  14497. function handleWarehouseSelected(item) {
  14498. selectedWarehouse.value = item.godownName;
  14499. form.value.godownId = item.id;
  14500. }
  14501. function scanCode() {
  14502. uni.scanCode({
  14503. success: (res2) => {
  14504. form.value.packageCode = res2.result;
  14505. handleBarcode(res2.result);
  14506. },
  14507. fail: (err) => {
  14508. uni.$u.toast("扫码失败");
  14509. }
  14510. });
  14511. }
  14512. function handleBarcode(code2) {
  14513. if (!code2)
  14514. return uni.$u.toast("请输入物流单号");
  14515. uni.$u.http.post("/app/ordersign/toGodownSign", form.value).then((res2) => {
  14516. if (res2.code == 200) {
  14517. let text = code2 + "到仓签收成功";
  14518. uni.$u.ttsModule.speak(text);
  14519. } else {
  14520. let text = code2 + "订单不存在";
  14521. uni.$u.ttsModule.speak(text);
  14522. }
  14523. });
  14524. }
  14525. function getUserBindWarehouse() {
  14526. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  14527. var _a, _b;
  14528. if (res2.code == 200) {
  14529. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  14530. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  14531. }
  14532. });
  14533. }
  14534. onLoad(() => {
  14535. getUserBindWarehouse();
  14536. uni.$u.useGlobalEvent((e) => {
  14537. form.value.packageCode = e.barcode;
  14538. handleBarcode(e.barcode);
  14539. });
  14540. });
  14541. onShow(() => {
  14542. uni.$u.updateActivePageOnShow();
  14543. });
  14544. const __returned__ = { placeholderStyle: placeholderStyle$1, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  14545. return onLoad;
  14546. }, get onShow() {
  14547. return onShow;
  14548. }, WarehouseSelector };
  14549. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14550. return __returned__;
  14551. }
  14552. };
  14553. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  14554. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14555. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14556. const _directive_permission = vue.resolveDirective("permission");
  14557. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14558. vue.createElementVNode("view", { class: "main-content" }, [
  14559. vue.createElementVNode("view", { class: "input-group" }, [
  14560. vue.createVNode(_component_u_input, {
  14561. customStyle: $setup.customStyle,
  14562. "placeholder-style": $setup.placeholderStyle,
  14563. modelValue: $setup.selectedWarehouse,
  14564. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  14565. placeholder: "请选择仓库",
  14566. readonly: "",
  14567. border: "surround"
  14568. }, null, 8, ["customStyle", "modelValue"]),
  14569. vue.createVNode(_component_u_button, {
  14570. customStyle: $setup.customStyle,
  14571. type: "info",
  14572. color: "#a4adb3",
  14573. onClick: $setup.openWarehouseSelector,
  14574. text: "选择"
  14575. }, null, 8, ["customStyle"])
  14576. ]),
  14577. vue.createElementVNode("view", { class: "input-group" }, [
  14578. vue.createVNode(_component_u_input, {
  14579. customStyle: $setup.customStyle,
  14580. "placeholder-style": $setup.placeholderStyle,
  14581. modelValue: $setup.form.packageCode,
  14582. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  14583. placeholder: "扫描/输入物流单号",
  14584. border: "surround"
  14585. }, null, 8, ["customStyle", "modelValue"]),
  14586. vue.withDirectives(vue.createVNode(_component_u_button, {
  14587. customStyle: $setup.customStyle,
  14588. type: "info",
  14589. color: "#a4adb3",
  14590. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  14591. text: "确定"
  14592. }, null, 8, ["customStyle"]), [
  14593. [_directive_permission, "app:express:warehouseSign:confirm"]
  14594. ])
  14595. ])
  14596. ]),
  14597. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14598. vue.createVNode(_component_u_button, {
  14599. size: "large",
  14600. type: "success",
  14601. onClick: $setup.scanCode,
  14602. text: "扫码",
  14603. class: "scan-button"
  14604. })
  14605. ]),
  14606. vue.createVNode($setup["WarehouseSelector"], {
  14607. show: $setup.showSelector,
  14608. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  14609. onWarehouseSelected: $setup.handleWarehouseSelected
  14610. }, null, 8, ["show"])
  14611. ]);
  14612. }
  14613. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-7473f06e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/warehouse-sign.vue"]]);
  14614. const placeholderStyle = "font-size:32rpx";
  14615. const _sfc_main$1h = {
  14616. __name: "weight-modify",
  14617. setup(__props, { expose: __expose }) {
  14618. __expose();
  14619. const customStyle = vue.reactive({
  14620. height: "90rpx"
  14621. });
  14622. const formRef = vue.ref(null);
  14623. const form = vue.ref({
  14624. "packageCode": "",
  14625. "batchNum": "",
  14626. "godownId": "",
  14627. "otherInfo": "",
  14628. "actualWeight": "",
  14629. "imgUrlList": []
  14630. });
  14631. const rules2 = {
  14632. packageCode: [{
  14633. required: true,
  14634. message: "请输入物流单号",
  14635. trigger: "blur"
  14636. }],
  14637. actualWeight: [{
  14638. required: true,
  14639. message: "请输入重量",
  14640. trigger: "blur"
  14641. }]
  14642. };
  14643. function scanCode() {
  14644. uni.scanCode({
  14645. success: (res2) => {
  14646. form.value.packageCode = res2.result;
  14647. },
  14648. fail: (err) => {
  14649. uni.$u.toast("扫码失败");
  14650. }
  14651. });
  14652. }
  14653. function submitForm() {
  14654. formRef.value.validate().then((valid) => {
  14655. if (valid) {
  14656. uni.$u.http.post("/app/ordersign/changeWeight", form.value).then((res2) => {
  14657. if (res2.code == 200) {
  14658. uni.$u.toast("重量修改成功");
  14659. let text = code + "已提交审核";
  14660. uni.$u.ttsModule.speak(text);
  14661. } else {
  14662. let text = code + "订单不存在";
  14663. uni.$u.ttsModule.speak(text);
  14664. }
  14665. });
  14666. }
  14667. });
  14668. }
  14669. onLoad(() => {
  14670. uni.$u.useGlobalEvent((e) => {
  14671. form.value.packageCode = e.barcode;
  14672. });
  14673. });
  14674. onShow(() => {
  14675. uni.$u.updateActivePageOnShow();
  14676. });
  14677. const __returned__ = { placeholderStyle, customStyle, formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  14678. return onLoad;
  14679. }, get onShow() {
  14680. return onShow;
  14681. }, cyUpload };
  14682. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14683. return __returned__;
  14684. }
  14685. };
  14686. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  14687. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14688. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  14689. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
  14690. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14691. const _directive_permission = vue.resolveDirective("permission");
  14692. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14693. vue.createVNode(_component_u__form, {
  14694. ref: "formRef",
  14695. model: $setup.form,
  14696. rules: $setup.rules,
  14697. "label-width": "165px",
  14698. "label-position": "top",
  14699. labelStyle: { fontSize: "32rpx" },
  14700. errorType: "toast"
  14701. }, {
  14702. default: vue.withCtx(() => [
  14703. vue.createCommentVNode(" 物流单号输入 "),
  14704. vue.createVNode(_component_u_form_item, {
  14705. label: "",
  14706. prop: "packageCode"
  14707. }, {
  14708. default: vue.withCtx(() => [
  14709. vue.createVNode(_component_u_input, {
  14710. placeholderStyle: $setup.placeholderStyle,
  14711. customStyle: $setup.customStyle,
  14712. modelValue: $setup.form.packageCode,
  14713. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.packageCode = $event),
  14714. placeholder: "扫描/输入物流单号",
  14715. border: "surround",
  14716. name: "packageCode"
  14717. }, null, 8, ["customStyle", "modelValue"])
  14718. ]),
  14719. _: 1
  14720. /* STABLE */
  14721. }),
  14722. vue.createCommentVNode(" 重量输入 "),
  14723. vue.createVNode(_component_u_form_item, {
  14724. label: "重量(kg)",
  14725. prop: "actualWeight"
  14726. }, {
  14727. default: vue.withCtx(() => [
  14728. vue.createVNode(_component_u_input, {
  14729. placeholderStyle: $setup.placeholderStyle,
  14730. customStyle: $setup.customStyle,
  14731. modelValue: $setup.form.actualWeight,
  14732. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.actualWeight = $event),
  14733. placeholder: "请输入重量",
  14734. border: "surround",
  14735. name: "actualWeight",
  14736. type: "number"
  14737. }, null, 8, ["customStyle", "modelValue"])
  14738. ]),
  14739. _: 1
  14740. /* STABLE */
  14741. }),
  14742. vue.createCommentVNode(" 图片上传 "),
  14743. vue.createVNode(_component_u_form_item, {
  14744. label: "上传图片",
  14745. prop: "imgUrlList"
  14746. }, {
  14747. default: vue.withCtx(() => [
  14748. vue.createVNode($setup["cyUpload"], {
  14749. filename: $setup.form.imgUrlList,
  14750. "onUpdate:filename": _cache[2] || (_cache[2] = ($event) => $setup.form.imgUrlList = $event),
  14751. name: "imgUrlList",
  14752. limit: 10,
  14753. "max-size": 1024 * 1024
  14754. }, null, 8, ["filename"])
  14755. ]),
  14756. _: 1
  14757. /* STABLE */
  14758. })
  14759. ]),
  14760. _: 1
  14761. /* STABLE */
  14762. }, 8, ["model"]),
  14763. vue.createCommentVNode(" 底部按钮 "),
  14764. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14765. vue.createVNode(_component_u_button, {
  14766. size: "large",
  14767. type: "warning",
  14768. onClick: $setup.scanCode,
  14769. text: "扫码",
  14770. class: "scan-button"
  14771. }),
  14772. vue.withDirectives(vue.createVNode(
  14773. _component_u_button,
  14774. {
  14775. size: "large",
  14776. type: "success",
  14777. onClick: $setup.submitForm,
  14778. text: "提交",
  14779. class: "submit-button"
  14780. },
  14781. null,
  14782. 512
  14783. /* NEED_PATCH */
  14784. ), [
  14785. [_directive_permission, "app:express:changeWeight:confirm"]
  14786. ])
  14787. ])
  14788. ]);
  14789. }
  14790. const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-e6126507"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/weight-modify.vue"]]);
  14791. const _sfc_main$1g = {
  14792. __name: "confirm-receipt",
  14793. setup(__props, { expose: __expose }) {
  14794. __expose();
  14795. const formData = vue.ref({
  14796. searchType: "2",
  14797. search: ""
  14798. });
  14799. const handleSubmit = () => {
  14800. if (!formData.value.search) {
  14801. uni.$u.toast("请扫描/输入物流单号");
  14802. return;
  14803. }
  14804. uni.$u.http.post("/app/orderinfo/confirmOrder", formData.value).then((res2) => {
  14805. if (res2.code == 200) {
  14806. let text = formData.value.search + "收货成功";
  14807. uni.$u.ttsModule.speak(text);
  14808. } else {
  14809. let text = formData.value.search + "订单不存在";
  14810. uni.$u.ttsModule.speak(text);
  14811. }
  14812. });
  14813. };
  14814. const handleScan = () => {
  14815. uni.scanCode({
  14816. success: (res2) => {
  14817. formData.value.search = res2.result;
  14818. handleSubmit();
  14819. }
  14820. });
  14821. };
  14822. onLoad(() => {
  14823. uni.$u.useGlobalEvent((e) => {
  14824. formData.value.search = e.barcode;
  14825. handleSubmit();
  14826. });
  14827. });
  14828. onShow(() => {
  14829. uni.$u.updateActivePageOnShow();
  14830. });
  14831. const __returned__ = { formData, handleSubmit, handleScan, ref: vue.ref, get onLoad() {
  14832. return onLoad;
  14833. }, get onShow() {
  14834. return onShow;
  14835. } };
  14836. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14837. return __returned__;
  14838. }
  14839. };
  14840. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  14841. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  14842. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  14843. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14844. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14845. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  14846. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14847. vue.createCommentVNode(" 底部按钮 "),
  14848. vue.createElementVNode("view", { class: "footer" }, [
  14849. vue.createCommentVNode(" 查询区域 "),
  14850. vue.createElementVNode("view", { class: "query-section" }, [
  14851. vue.createVNode(_component_u_radio_group, {
  14852. modelValue: $setup.formData.searchType,
  14853. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.searchType = $event)
  14854. }, {
  14855. default: vue.withCtx(() => [
  14856. vue.createVNode(_component_u_radio, {
  14857. label: "查订单",
  14858. name: "1",
  14859. labelSize: "16px",
  14860. iconSize: "16px"
  14861. }),
  14862. vue.createVNode(_component_u_radio, {
  14863. label: "查物流",
  14864. "custom-style": "margin-left:20px",
  14865. name: "2",
  14866. labelSize: "16px",
  14867. iconSize: "16px"
  14868. })
  14869. ]),
  14870. _: 1
  14871. /* STABLE */
  14872. }, 8, ["modelValue"]),
  14873. vue.createElementVNode("view", { class: "search-box" }, [
  14874. vue.createVNode(_component_u_input, {
  14875. "custom-style": "font-size:32rpx",
  14876. "placeholder-style": "fong-size:32rpx",
  14877. modelValue: $setup.formData.search,
  14878. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.search = $event),
  14879. placeholder: $setup.formData.searchType == "1" ? "扫描/输入订单号" : "扫描/输入物流单号",
  14880. border: "surround",
  14881. clearable: ""
  14882. }, null, 8, ["modelValue", "placeholder"]),
  14883. vue.createVNode(_component_u_button, {
  14884. color: "#c8c8c8",
  14885. text: "查询",
  14886. onClick: $setup.handleSubmit
  14887. })
  14888. ])
  14889. ]),
  14890. vue.createVNode(_component_u_divider),
  14891. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  14892. vue.createVNode(_component_u_button, {
  14893. size: "large",
  14894. type: "success",
  14895. text: "确认收货扫码",
  14896. onClick: $setup.handleScan
  14897. })
  14898. ])
  14899. ])
  14900. ]);
  14901. }
  14902. const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-fec7d541"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/confirm-receipt.vue"]]);
  14903. const props$b = {
  14904. props: {
  14905. // 是否开启顶部安全区适配
  14906. safeAreaInsetTop: {
  14907. type: Boolean,
  14908. default: props$E.navbar.safeAreaInsetTop
  14909. },
  14910. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  14911. placeholder: {
  14912. type: Boolean,
  14913. default: props$E.navbar.placeholder
  14914. },
  14915. // 是否固定在顶部
  14916. fixed: {
  14917. type: Boolean,
  14918. default: props$E.navbar.fixed
  14919. },
  14920. // 是否显示下边框
  14921. border: {
  14922. type: Boolean,
  14923. default: props$E.navbar.border
  14924. },
  14925. // 左边的图标
  14926. leftIcon: {
  14927. type: String,
  14928. default: props$E.navbar.leftIcon
  14929. },
  14930. // 左边的提示文字
  14931. leftText: {
  14932. type: String,
  14933. default: props$E.navbar.leftText
  14934. },
  14935. // 左右的提示文字
  14936. rightText: {
  14937. type: String,
  14938. default: props$E.navbar.rightText
  14939. },
  14940. // 右边的图标
  14941. rightIcon: {
  14942. type: String,
  14943. default: props$E.navbar.rightIcon
  14944. },
  14945. // 标题
  14946. title: {
  14947. type: [String, Number],
  14948. default: props$E.navbar.title
  14949. },
  14950. // 背景颜色
  14951. bgColor: {
  14952. type: String,
  14953. default: props$E.navbar.bgColor
  14954. },
  14955. // 标题的宽度
  14956. titleWidth: {
  14957. type: [String, Number],
  14958. default: props$E.navbar.titleWidth
  14959. },
  14960. // 导航栏高度
  14961. height: {
  14962. type: [String, Number],
  14963. default: props$E.navbar.height
  14964. },
  14965. // 左侧返回图标的大小
  14966. leftIconSize: {
  14967. type: [String, Number],
  14968. default: props$E.navbar.leftIconSize
  14969. },
  14970. // 左侧返回图标的颜色
  14971. leftIconColor: {
  14972. type: String,
  14973. default: props$E.navbar.leftIconColor
  14974. },
  14975. // 点击左侧区域(返回图标),是否自动返回上一页
  14976. autoBack: {
  14977. type: Boolean,
  14978. default: props$E.navbar.autoBack
  14979. },
  14980. // 标题的样式,对象或字符串
  14981. titleStyle: {
  14982. type: [String, Object],
  14983. default: props$E.navbar.titleStyle
  14984. }
  14985. }
  14986. };
  14987. const _sfc_main$1f = {
  14988. name: "u-navbar",
  14989. mixins: [mpMixin, mixin, props$b],
  14990. data() {
  14991. return {};
  14992. },
  14993. methods: {
  14994. // 点击左侧区域
  14995. leftClick() {
  14996. this.$emit("leftClick");
  14997. if (this.autoBack) {
  14998. uni.navigateBack();
  14999. }
  15000. },
  15001. // 点击右侧区域
  15002. rightClick() {
  15003. this.$emit("rightClick");
  15004. }
  15005. }
  15006. };
  15007. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  15008. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  15009. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15010. return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
  15011. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  15012. "view",
  15013. {
  15014. key: 0,
  15015. class: "u-navbar__placeholder",
  15016. style: vue.normalizeStyle({
  15017. height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  15018. })
  15019. },
  15020. null,
  15021. 4
  15022. /* STYLE */
  15023. )) : vue.createCommentVNode("v-if", true),
  15024. vue.createElementVNode(
  15025. "view",
  15026. {
  15027. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  15028. },
  15029. [
  15030. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  15031. key: 0,
  15032. bgColor: _ctx.bgColor
  15033. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  15034. vue.createElementVNode(
  15035. "view",
  15036. {
  15037. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  15038. style: vue.normalizeStyle({
  15039. height: _ctx.$u.addUnit(_ctx.height),
  15040. backgroundColor: _ctx.bgColor
  15041. })
  15042. },
  15043. [
  15044. vue.createElementVNode("view", {
  15045. class: "u-navbar__content__left",
  15046. "hover-class": "u-navbar__content__left--hover",
  15047. "hover-start-time": "150",
  15048. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  15049. }, [
  15050. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  15051. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  15052. key: 0,
  15053. name: _ctx.leftIcon,
  15054. size: _ctx.leftIconSize,
  15055. color: _ctx.leftIconColor
  15056. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  15057. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  15058. "text",
  15059. {
  15060. key: 1,
  15061. style: vue.normalizeStyle({
  15062. color: _ctx.leftIconColor
  15063. }),
  15064. class: "u-navbar__content__left__text"
  15065. },
  15066. vue.toDisplayString(_ctx.leftText),
  15067. 5
  15068. /* TEXT, STYLE */
  15069. )) : vue.createCommentVNode("v-if", true)
  15070. ], true)
  15071. ]),
  15072. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  15073. vue.createElementVNode(
  15074. "text",
  15075. {
  15076. class: "u-line-1 u-navbar__content__title",
  15077. style: vue.normalizeStyle([{
  15078. width: _ctx.$u.addUnit(_ctx.titleWidth)
  15079. }, _ctx.$u.addStyle(_ctx.titleStyle)])
  15080. },
  15081. vue.toDisplayString(_ctx.title),
  15082. 5
  15083. /* TEXT, STYLE */
  15084. )
  15085. ], true),
  15086. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  15087. key: 0,
  15088. class: "u-navbar__content__right",
  15089. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  15090. }, [
  15091. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  15092. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  15093. key: 0,
  15094. name: _ctx.rightIcon,
  15095. size: "20"
  15096. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  15097. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  15098. "text",
  15099. {
  15100. key: 1,
  15101. class: "u-navbar__content__right__text"
  15102. },
  15103. vue.toDisplayString(_ctx.rightText),
  15104. 1
  15105. /* TEXT */
  15106. )) : vue.createCommentVNode("v-if", true)
  15107. ], true)
  15108. ])) : vue.createCommentVNode("v-if", true)
  15109. ],
  15110. 6
  15111. /* CLASS, STYLE */
  15112. )
  15113. ],
  15114. 2
  15115. /* CLASS */
  15116. )
  15117. ]);
  15118. }
  15119. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-f631659b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  15120. const props$a = {
  15121. props: {
  15122. // 步进器标识符,在change回调返回
  15123. name: {
  15124. type: [String, Number],
  15125. default: props$E.numberBox.name
  15126. },
  15127. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  15128. modelValue: {
  15129. type: [String, Number],
  15130. default: props$E.numberBox.value
  15131. },
  15132. // 最小值
  15133. min: {
  15134. type: [String, Number],
  15135. default: props$E.numberBox.min
  15136. },
  15137. // 最大值
  15138. max: {
  15139. type: [String, Number],
  15140. default: props$E.numberBox.max
  15141. },
  15142. // 加减的步长,可为小数
  15143. step: {
  15144. type: [String, Number],
  15145. default: props$E.numberBox.step
  15146. },
  15147. // 是否只允许输入整数
  15148. integer: {
  15149. type: Boolean,
  15150. default: props$E.numberBox.integer
  15151. },
  15152. // 是否禁用,包括输入框,加减按钮
  15153. disabled: {
  15154. type: Boolean,
  15155. default: props$E.numberBox.disabled
  15156. },
  15157. // 是否禁用输入框
  15158. disabledInput: {
  15159. type: Boolean,
  15160. default: props$E.numberBox.disabledInput
  15161. },
  15162. // 是否开启异步变更,开启后需要手动控制输入值
  15163. asyncChange: {
  15164. type: Boolean,
  15165. default: props$E.numberBox.asyncChange
  15166. },
  15167. // 输入框宽度,单位为px
  15168. inputWidth: {
  15169. type: [String, Number],
  15170. default: props$E.numberBox.inputWidth
  15171. },
  15172. // 是否显示减少按钮
  15173. showMinus: {
  15174. type: Boolean,
  15175. default: props$E.numberBox.showMinus
  15176. },
  15177. // 是否显示增加按钮
  15178. showPlus: {
  15179. type: Boolean,
  15180. default: props$E.numberBox.showPlus
  15181. },
  15182. // 显示的小数位数
  15183. decimalLength: {
  15184. type: [String, Number, null],
  15185. default: props$E.numberBox.decimalLength
  15186. },
  15187. // 是否开启长按加减手势
  15188. longPress: {
  15189. type: Boolean,
  15190. default: props$E.numberBox.longPress
  15191. },
  15192. // 输入框文字和加减按钮图标的颜色
  15193. color: {
  15194. type: String,
  15195. default: props$E.numberBox.color
  15196. },
  15197. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  15198. buttonSize: {
  15199. type: [String, Number],
  15200. default: props$E.numberBox.buttonSize
  15201. },
  15202. // 输入框和按钮的背景颜色
  15203. bgColor: {
  15204. type: String,
  15205. default: props$E.numberBox.bgColor
  15206. },
  15207. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  15208. cursorSpacing: {
  15209. type: [String, Number],
  15210. default: props$E.numberBox.cursorSpacing
  15211. },
  15212. // 是否禁用增加按钮
  15213. disablePlus: {
  15214. type: Boolean,
  15215. default: props$E.numberBox.disablePlus
  15216. },
  15217. // 是否禁用减少按钮
  15218. disableMinus: {
  15219. type: Boolean,
  15220. default: props$E.numberBox.disableMinus
  15221. },
  15222. // 加减按钮图标的样式
  15223. iconStyle: {
  15224. type: [Object, String],
  15225. default: props$E.numberBox.iconStyle
  15226. }
  15227. }
  15228. };
  15229. const _sfc_main$1e = {
  15230. name: "u-number-box",
  15231. mixins: [mpMixin, mixin, props$a],
  15232. data() {
  15233. return {
  15234. // 输入框实际操作的值
  15235. currentValue: "",
  15236. // 定时器
  15237. longPressTimer: null
  15238. };
  15239. },
  15240. watch: {
  15241. // 多个值之间,只要一个值发生变化,都要重新检查check()函数
  15242. watchChange(n) {
  15243. this.check();
  15244. },
  15245. // 监听v-mode的变化,重新初始化内部的值
  15246. modelValue(n) {
  15247. if (n !== this.currentValue) {
  15248. this.currentValue = this.format(this.modelValue);
  15249. }
  15250. }
  15251. },
  15252. computed: {
  15253. getCursorSpacing() {
  15254. return uni.$u.getPx(this.cursorSpacing);
  15255. },
  15256. // 按钮的样式
  15257. buttonStyle() {
  15258. return (type2) => {
  15259. const style = {
  15260. backgroundColor: this.bgColor,
  15261. height: uni.$u.addUnit(this.buttonSize),
  15262. color: this.color
  15263. };
  15264. if (this.isDisabled(type2)) {
  15265. style.backgroundColor = "#f7f8fa";
  15266. }
  15267. return style;
  15268. };
  15269. },
  15270. // 输入框的样式
  15271. inputStyle() {
  15272. this.disabled || this.disabledInput;
  15273. const style = {
  15274. color: this.color,
  15275. backgroundColor: this.bgColor,
  15276. height: uni.$u.addUnit(this.buttonSize),
  15277. width: uni.$u.addUnit(this.inputWidth)
  15278. };
  15279. return style;
  15280. },
  15281. // 用于监听多个值发生变化
  15282. watchChange() {
  15283. return [this.integer, this.decimalLength, this.min, this.max];
  15284. },
  15285. isDisabled() {
  15286. return (type2) => {
  15287. if (type2 === "plus") {
  15288. return this.disabled || this.disablePlus || this.currentValue >= this.max;
  15289. }
  15290. return this.disabled || this.disableMinus || this.currentValue <= this.min;
  15291. };
  15292. }
  15293. },
  15294. mounted() {
  15295. this.init();
  15296. },
  15297. emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
  15298. methods: {
  15299. init() {
  15300. this.currentValue = this.format(this.modelValue);
  15301. },
  15302. // 格式化整理数据,限制范围
  15303. format(value2) {
  15304. value2 = this.filter(value2);
  15305. value2 = value2 === "" ? 0 : +value2;
  15306. value2 = Math.max(Math.min(this.max, value2), this.min);
  15307. if (this.decimalLength !== null) {
  15308. value2 = value2.toFixed(this.decimalLength);
  15309. }
  15310. return value2;
  15311. },
  15312. // 过滤非法的字符
  15313. filter(value2) {
  15314. value2 = String(value2).replace(/[^0-9.-]/g, "");
  15315. if (this.integer && value2.indexOf(".") !== -1) {
  15316. value2 = value2.split(".")[0];
  15317. }
  15318. return value2;
  15319. },
  15320. check() {
  15321. const val = this.format(this.currentValue);
  15322. if (val !== this.currentValue) {
  15323. this.currentValue = val;
  15324. }
  15325. },
  15326. // 判断是否出于禁止操作状态
  15327. // isDisabled(type) {
  15328. // if (type === 'plus') {
  15329. // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
  15330. // return (
  15331. // this.disabled ||
  15332. // this.disablePlus ||
  15333. // this.currentValue >= this.max
  15334. // )
  15335. // }
  15336. // // 点击减少按钮同理
  15337. // return (
  15338. // this.disabled ||
  15339. // this.disableMinus ||
  15340. // this.currentValue <= this.min
  15341. // )
  15342. // },
  15343. // 输入框活动焦点
  15344. onFocus(event) {
  15345. this.$emit("focus", {
  15346. ...event.detail,
  15347. name: this.name
  15348. });
  15349. },
  15350. // 输入框失去焦点
  15351. onBlur(event) {
  15352. this.format(event.detail.value);
  15353. this.$emit(
  15354. "blur",
  15355. {
  15356. ...event.detail,
  15357. name: this.name
  15358. }
  15359. );
  15360. },
  15361. // 输入框值发生变化
  15362. onInput(e) {
  15363. const {
  15364. value: value2 = ""
  15365. } = e.detail || {};
  15366. if (value2 === "")
  15367. return;
  15368. let formatted = this.filter(value2);
  15369. if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
  15370. const pair = formatted.split(".");
  15371. formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
  15372. }
  15373. formatted = this.format(formatted);
  15374. this.emitChange(formatted);
  15375. },
  15376. // 发出change事件
  15377. emitChange(value2) {
  15378. if (!this.asyncChange) {
  15379. this.$nextTick(() => {
  15380. this.$emit("update:modelValue", value2);
  15381. this.currentValue = value2;
  15382. this.$forceUpdate();
  15383. });
  15384. }
  15385. this.$emit("change", {
  15386. value: value2,
  15387. name: this.name
  15388. });
  15389. },
  15390. onChange() {
  15391. const {
  15392. type: type2
  15393. } = this;
  15394. if (this.isDisabled(type2)) {
  15395. return this.$emit("overlimit", type2);
  15396. }
  15397. const diff = type2 === "minus" ? -this.step : +this.step;
  15398. const value2 = this.format(this.add(+this.currentValue, diff));
  15399. this.emitChange(value2);
  15400. this.$emit(type2);
  15401. },
  15402. // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
  15403. add(num1, num2) {
  15404. const cardinal = Math.pow(10, 10);
  15405. return Math.round((num1 + num2) * cardinal) / cardinal;
  15406. },
  15407. // 点击加减按钮
  15408. clickHandler(type2) {
  15409. this.type = type2;
  15410. this.onChange();
  15411. },
  15412. longPressStep() {
  15413. this.clearTimeout();
  15414. this.longPressTimer = setTimeout(() => {
  15415. this.onChange();
  15416. this.longPressStep();
  15417. }, 250);
  15418. },
  15419. onTouchStart(type2) {
  15420. if (!this.longPress)
  15421. return;
  15422. this.clearTimeout();
  15423. this.type = type2;
  15424. this.longPressTimer = setTimeout(() => {
  15425. this.onChange();
  15426. this.longPressStep();
  15427. }, 600);
  15428. },
  15429. // 触摸结束,清除定时器,停止长按加减
  15430. onTouchEnd() {
  15431. if (!this.longPress)
  15432. return;
  15433. this.clearTimeout();
  15434. },
  15435. // 清除定时器
  15436. clearTimeout() {
  15437. clearTimeout(this.longPressTimer);
  15438. this.longPressTimer = null;
  15439. }
  15440. }
  15441. };
  15442. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  15443. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15444. return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
  15445. _ctx.showMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
  15446. "view",
  15447. {
  15448. key: 0,
  15449. class: "u-number-box__slot",
  15450. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15451. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
  15452. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15453. },
  15454. [
  15455. vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
  15456. ],
  15457. 32
  15458. /* NEED_HYDRATION */
  15459. )) : _ctx.showMinus ? (vue.openBlock(), vue.createElementBlock(
  15460. "view",
  15461. {
  15462. key: 1,
  15463. class: vue.normalizeClass(["u-number-box__minus", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
  15464. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15465. onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
  15466. onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15467. "hover-class": "u-number-box__minus--hover",
  15468. "hover-stay-time": "150",
  15469. style: vue.normalizeStyle([$options.buttonStyle("minus")])
  15470. },
  15471. [
  15472. vue.createVNode(_component_u_icon, {
  15473. name: "minus",
  15474. color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
  15475. size: "15",
  15476. bold: "",
  15477. customStyle: _ctx.iconStyle
  15478. }, null, 8, ["color", "customStyle"])
  15479. ],
  15480. 38
  15481. /* CLASS, STYLE, NEED_HYDRATION */
  15482. )) : vue.createCommentVNode("v-if", true),
  15483. vue.renderSlot(_ctx.$slots, "input", {}, () => [
  15484. vue.withDirectives(vue.createElementVNode("input", {
  15485. disabled: _ctx.disabledInput || _ctx.disabled,
  15486. "cursor-spacing": $options.getCursorSpacing,
  15487. class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
  15488. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
  15489. onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
  15490. onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
  15491. onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
  15492. type: "number",
  15493. style: vue.normalizeStyle([$options.inputStyle])
  15494. }, null, 46, ["disabled", "cursor-spacing"]), [
  15495. [vue.vModelText, $data.currentValue]
  15496. ])
  15497. ], true),
  15498. _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
  15499. "view",
  15500. {
  15501. key: 2,
  15502. class: "u-number-box__slot",
  15503. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15504. onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
  15505. onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15506. },
  15507. [
  15508. vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
  15509. ],
  15510. 32
  15511. /* NEED_HYDRATION */
  15512. )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
  15513. "view",
  15514. {
  15515. key: 3,
  15516. class: vue.normalizeClass(["u-number-box__plus", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
  15517. onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15518. onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
  15519. onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15520. "hover-class": "u-number-box__plus--hover",
  15521. "hover-stay-time": "150",
  15522. style: vue.normalizeStyle([$options.buttonStyle("plus")])
  15523. },
  15524. [
  15525. vue.createVNode(_component_u_icon, {
  15526. name: "plus",
  15527. color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
  15528. size: "15",
  15529. bold: "",
  15530. customStyle: _ctx.iconStyle
  15531. }, null, 8, ["color", "customStyle"])
  15532. ],
  15533. 38
  15534. /* CLASS, STYLE, NEED_HYDRATION */
  15535. )) : vue.createCommentVNode("v-if", true)
  15536. ]);
  15537. }
  15538. const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-eb6f6237"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]);
  15539. const _sfc_main$1d = {
  15540. __name: "scan-order",
  15541. setup(__props, { expose: __expose }) {
  15542. __expose();
  15543. const isbnList = vue.ref([]);
  15544. const showModal = vue.ref(false);
  15545. const newIsbn = vue.ref("");
  15546. const removeItem = (index2) => {
  15547. isbnList.value.splice(index2, 1);
  15548. };
  15549. const goBack = () => {
  15550. uni.navigateBack();
  15551. };
  15552. function clearAll() {
  15553. isbnList.value.length = 0;
  15554. }
  15555. const addOrUpdateIsbn = (isbn) => {
  15556. const existingItem = isbnList.value.find((item) => item.isbn === isbn);
  15557. if (existingItem) {
  15558. existingItem.quantity += 1;
  15559. } else {
  15560. isbnList.value.push({
  15561. isbn,
  15562. quantity: 1
  15563. });
  15564. }
  15565. };
  15566. function handleIsbn(isbn) {
  15567. if (isValidISBN(isbn)) {
  15568. addOrUpdateIsbn(isbn);
  15569. } else {
  15570. uni.$u.ttsModule.speak("不正确的ISBN码");
  15571. }
  15572. }
  15573. const handleScan = () => {
  15574. uni.scanCode({
  15575. success: (res2) => {
  15576. handleIsbn(res2.result);
  15577. }
  15578. });
  15579. };
  15580. const isValidISBN = (isbn) => {
  15581. return /^97[89]\d{10}$/.test(isbn);
  15582. };
  15583. const handleQuery = () => {
  15584. if (isbnList.value.length === 0) {
  15585. uni.showToast({
  15586. title: "请先添加ISBN",
  15587. icon: "none"
  15588. });
  15589. return;
  15590. }
  15591. uni.setStorageSync("isbnList", isbnList.value);
  15592. uni.navigateTo({
  15593. url: "/pages/index/audit/isbn-order"
  15594. });
  15595. };
  15596. const addIsbn = () => {
  15597. if (isValidISBN(newIsbn.value)) {
  15598. addOrUpdateIsbn(newIsbn.value);
  15599. showModal.value = false;
  15600. newIsbn.value = "";
  15601. } else {
  15602. uni.$u.ttsModule.speak("不正确的ISBN码");
  15603. }
  15604. };
  15605. onLoad(() => {
  15606. uni.$u.useGlobalEvent((e) => {
  15607. addOrUpdateIsbn(e.barcode);
  15608. });
  15609. });
  15610. onShow(() => {
  15611. uni.$u.updateActivePageOnShow();
  15612. });
  15613. const __returned__ = { isbnList, showModal, newIsbn, removeItem, goBack, clearAll, addOrUpdateIsbn, handleIsbn, handleScan, isValidISBN, handleQuery, addIsbn, ref: vue.ref, get onLoad() {
  15614. return onLoad;
  15615. }, get onShow() {
  15616. return onShow;
  15617. } };
  15618. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15619. return __returned__;
  15620. }
  15621. };
  15622. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  15623. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15624. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  15625. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  15626. const _component_u_number_box = resolveEasycom(vue.resolveDynamicComponent("u-number-box"), __easycom_3$3);
  15627. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  15628. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15629. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  15630. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  15631. vue.createVNode(_component_u_navbar, {
  15632. title: "扫书查单",
  15633. border: false,
  15634. fixed: "",
  15635. bgColor: "#22ac38",
  15636. leftIconColor: "#fff",
  15637. titleStyle: "font-size:36rpx;color:#fff"
  15638. }, {
  15639. left: vue.withCtx(() => [
  15640. vue.createVNode(_component_u_icon, {
  15641. name: "arrow-left",
  15642. color: "#fff",
  15643. size: "20",
  15644. onClick: $setup.goBack
  15645. })
  15646. ]),
  15647. right: vue.withCtx(() => [
  15648. vue.createElementVNode("text", {
  15649. style: { "color": "#fff", "font-size": "32rpx" },
  15650. type: "primary",
  15651. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true)
  15652. }, "新增")
  15653. ]),
  15654. _: 1
  15655. /* STABLE */
  15656. }),
  15657. vue.createCommentVNode(" 顶部操作栏 "),
  15658. vue.createVNode(_component_u_sticky, null, {
  15659. default: vue.withCtx(() => [
  15660. vue.createElementVNode("view", {
  15661. class: "header",
  15662. onClick: $setup.clearAll
  15663. }, "清除全部"),
  15664. vue.createCommentVNode(" 提示信息 "),
  15665. vue.createElementVNode("view", { class: "tips" }, [
  15666. vue.createElementVNode("text", null, "请勿录入审核为不良的书籍ISBN!"),
  15667. vue.createElementVNode("text", { class: "sub-tips" }, "不良书籍的ISBN可能是错误的!")
  15668. ])
  15669. ]),
  15670. _: 1
  15671. /* STABLE */
  15672. }),
  15673. vue.createCommentVNode(" ISBN列表 "),
  15674. vue.createElementVNode("scroll-view", {
  15675. "scroll-y": "",
  15676. class: "isbn-list"
  15677. }, [
  15678. (vue.openBlock(true), vue.createElementBlock(
  15679. vue.Fragment,
  15680. null,
  15681. vue.renderList($setup.isbnList, (item, index2) => {
  15682. return vue.openBlock(), vue.createElementBlock("view", {
  15683. key: index2,
  15684. class: "isbn-item"
  15685. }, [
  15686. vue.createElementVNode("view", { class: "item-left" }, [
  15687. vue.createVNode(_component_u_icon, {
  15688. name: "minus-circle-fill",
  15689. color: "#dd524d",
  15690. size: "24",
  15691. onClick: ($event) => $setup.removeItem(index2)
  15692. }, null, 8, ["onClick"]),
  15693. vue.createElementVNode(
  15694. "text",
  15695. { class: "index" },
  15696. vue.toDisplayString(index2 + 1) + "、",
  15697. 1
  15698. /* TEXT */
  15699. ),
  15700. vue.createElementVNode(
  15701. "text",
  15702. { class: "isbn" },
  15703. vue.toDisplayString(item.isbn),
  15704. 1
  15705. /* TEXT */
  15706. )
  15707. ]),
  15708. vue.createVNode(_component_u_number_box, {
  15709. modelValue: item.quantity,
  15710. "onUpdate:modelValue": ($event) => item.quantity = $event,
  15711. disableMinus: item.quantity <= 1
  15712. }, null, 8, ["modelValue", "onUpdate:modelValue", "disableMinus"])
  15713. ]);
  15714. }),
  15715. 128
  15716. /* KEYED_FRAGMENT */
  15717. ))
  15718. ]),
  15719. vue.createCommentVNode(" 底部按钮 "),
  15720. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  15721. vue.createVNode(_component_u_button, {
  15722. size: "large",
  15723. type: "warning",
  15724. text: "扫码加书",
  15725. onClick: $setup.handleScan
  15726. }),
  15727. vue.createVNode(_component_u_button, {
  15728. size: "large",
  15729. type: "primary",
  15730. text: "查询",
  15731. onClick: $setup.handleQuery
  15732. })
  15733. ]),
  15734. vue.createCommentVNode(" ISBN Input Modal "),
  15735. vue.createVNode(_component_u_popup, {
  15736. show: $setup.showModal,
  15737. mode: "center",
  15738. customStyle: "width: 84%;border-radius:10px"
  15739. }, {
  15740. default: vue.withCtx(() => [
  15741. vue.createElementVNode("view", { class: "modal-content" }, [
  15742. vue.createElementVNode("text", null, "输入ISBN码"),
  15743. vue.createVNode(_component_u_input, {
  15744. modelValue: $setup.newIsbn,
  15745. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.newIsbn = $event),
  15746. placeholder: "请输入ISBN码",
  15747. "custom-style": "margin:60rpx 0"
  15748. }, null, 8, ["modelValue"]),
  15749. vue.createElementVNode("view", { class: "modal-buttons" }, [
  15750. vue.createVNode(_component_u_button, {
  15751. text: "取消",
  15752. onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false)
  15753. }),
  15754. vue.createVNode(_component_u_button, {
  15755. type: "primary",
  15756. text: "确定",
  15757. onClick: $setup.addIsbn
  15758. })
  15759. ])
  15760. ])
  15761. ]),
  15762. _: 1
  15763. /* STABLE */
  15764. }, 8, ["show"])
  15765. ]);
  15766. }
  15767. const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-1af411ea"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/scan-order.vue"]]);
  15768. const _sfc_main$1c = {
  15769. __name: "orderItem",
  15770. props: {
  15771. item: {
  15772. type: Object,
  15773. default: () => {
  15774. }
  15775. }
  15776. },
  15777. setup(__props, { expose: __expose }) {
  15778. __expose();
  15779. const props2 = __props;
  15780. const statusEnum = {
  15781. 0: "创建",
  15782. 1: "用户删除",
  15783. 2: "下单(待初审)",
  15784. 3: "初审(待取书)",
  15785. 4: "初审未通过",
  15786. 5: "快递取书(待签收)",
  15787. 6: "快递签收(待收货)",
  15788. 7: "物流签收(路由异常)",
  15789. 8: "仓库收货(待审核)",
  15790. 9: "审核中(审核未提交)",
  15791. 10: "已审核(待付款)",
  15792. 11: "已完成"
  15793. };
  15794. const maskedNickName = vue.computed(() => {
  15795. let nickName = props2.item.userNick || props2.item.nickName;
  15796. if (!nickName)
  15797. return "";
  15798. return nickName.charAt(0) + "*".repeat(nickName.length - 1);
  15799. });
  15800. let statusText = vue.computed(() => {
  15801. return props2.item.status ? statusEnum[props2.item.status] : "-";
  15802. });
  15803. const statusColor = vue.ref("#FF4D4F");
  15804. const copyToClipboard = (text) => {
  15805. uni.setClipboardData({
  15806. data: text,
  15807. success: () => {
  15808. uni.showToast({
  15809. title: "复制成功",
  15810. icon: "success"
  15811. });
  15812. }
  15813. });
  15814. };
  15815. const handleAudit = () => {
  15816. uni.navigateTo({
  15817. url: `/pages/index/detail/index?id=${props2.item.orderId}`
  15818. });
  15819. };
  15820. const handleView = () => {
  15821. uni.navigateTo({
  15822. url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
  15823. });
  15824. };
  15825. const __returned__ = { props: props2, statusEnum, maskedNickName, get statusText() {
  15826. return statusText;
  15827. }, set statusText(v) {
  15828. statusText = v;
  15829. }, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref, computed: vue.computed };
  15830. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15831. return __returned__;
  15832. }
  15833. };
  15834. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  15835. var _a, _b, _c;
  15836. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  15837. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  15838. vue.createCommentVNode(" 用户信息 "),
  15839. vue.createElementVNode("view", { class: "user-info" }, [
  15840. vue.createElementVNode("image", {
  15841. class: "avatar",
  15842. src: $props.item.imgPath,
  15843. mode: "aspectFill"
  15844. }, null, 8, ["src"]),
  15845. vue.createElementVNode("view", { class: "user-details" }, [
  15846. vue.createElementVNode(
  15847. "text",
  15848. { class: "username" },
  15849. vue.toDisplayString($props.item.plat == 1 ? "微信用户" : "支付宝用户") + " (" + vue.toDisplayString($setup.maskedNickName) + ")",
  15850. 1
  15851. /* TEXT */
  15852. ),
  15853. vue.createElementVNode(
  15854. "text",
  15855. { class: "date" },
  15856. "共卖出" + vue.toDisplayString($props.item.totalNum) + "本书",
  15857. 1
  15858. /* TEXT */
  15859. ),
  15860. vue.createElementVNode(
  15861. "text",
  15862. { class: "date" },
  15863. "来自" + vue.toDisplayString($props.item.sendSsq),
  15864. 1
  15865. /* TEXT */
  15866. )
  15867. ]),
  15868. vue.createElementVNode("view", { class: "user-details right-items" }, [
  15869. vue.createElementVNode(
  15870. "text",
  15871. { class: "date" },
  15872. vue.toDisplayString($props.item.schedulePickupStartTime),
  15873. 1
  15874. /* TEXT */
  15875. ),
  15876. vue.createElementVNode(
  15877. "text",
  15878. {
  15879. class: "status",
  15880. style: vue.normalizeStyle({ color: $setup.statusColor })
  15881. },
  15882. "[" + vue.toDisplayString($setup.statusText) + "]",
  15883. 5
  15884. /* TEXT, STYLE */
  15885. )
  15886. ])
  15887. ]),
  15888. vue.createCommentVNode(" 订单详情 "),
  15889. vue.createElementVNode("view", { class: "order-details" }, [
  15890. vue.createElementVNode("view", { class: "detail-row flex flex-col" }, [
  15891. vue.createElementVNode("view", { class: "flex-1" }, [
  15892. vue.createElementVNode("text", null, "订单ID:"),
  15893. vue.createElementVNode(
  15894. "text",
  15895. {
  15896. class: "link",
  15897. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.item.orderId))
  15898. },
  15899. vue.toDisplayString($props.item.orderId),
  15900. 1
  15901. /* TEXT */
  15902. )
  15903. ]),
  15904. vue.createElementVNode("view", {
  15905. class: "flex-1",
  15906. style: { "flex": "1.5" }
  15907. }, [
  15908. vue.createElementVNode("text", null, "运单号:"),
  15909. vue.createElementVNode(
  15910. "text",
  15911. {
  15912. class: "link",
  15913. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.item.waybillCode))
  15914. },
  15915. vue.toDisplayString($props.item.waybillCode),
  15916. 1
  15917. /* TEXT */
  15918. )
  15919. ])
  15920. ]),
  15921. vue.createElementVNode("view", { class: "detail-row" }, [
  15922. vue.createElementVNode(
  15923. "text",
  15924. { class: "flex-1" },
  15925. "预估金额:" + vue.toDisplayString($props.item.expectMoney || 0),
  15926. 1
  15927. /* TEXT */
  15928. ),
  15929. vue.createElementVNode(
  15930. "text",
  15931. { class: "flex-1" },
  15932. "审核金额:" + vue.toDisplayString($props.item.finalMoney || "待核算"),
  15933. 1
  15934. /* TEXT */
  15935. )
  15936. ]),
  15937. vue.createElementVNode("view", { class: "detail-row" }, [
  15938. vue.createElementVNode(
  15939. "text",
  15940. null,
  15941. "内部备注:" + 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 : "-"),
  15942. 1
  15943. /* TEXT */
  15944. )
  15945. ])
  15946. ]),
  15947. vue.createCommentVNode(" 操作按钮 "),
  15948. vue.createElementVNode("view", { class: "action-buttons" }, [
  15949. vue.createVNode(_component_u_button, {
  15950. size: "small",
  15951. type: "primary",
  15952. onClick: $setup.handleAudit,
  15953. disabled: $props.item.status != 8 || $props.item.status != 9
  15954. }, {
  15955. default: vue.withCtx(() => [
  15956. vue.createTextVNode("到货审核")
  15957. ]),
  15958. _: 1
  15959. /* STABLE */
  15960. }, 8, ["disabled"]),
  15961. vue.createVNode(_component_u_button, {
  15962. size: "small",
  15963. onClick: $setup.handleView
  15964. }, {
  15965. default: vue.withCtx(() => [
  15966. vue.createTextVNode("查看")
  15967. ]),
  15968. _: 1
  15969. /* STABLE */
  15970. })
  15971. ])
  15972. ]);
  15973. }
  15974. const orderItem = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-12bc2a79"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/components/orderItem.vue"]]);
  15975. const _sfc_main$1b = {
  15976. __name: "isbn-order",
  15977. setup(__props, { expose: __expose }) {
  15978. __expose();
  15979. const otherParams = vue.ref({
  15980. isbnList: ""
  15981. });
  15982. const scrollRef = vue.ref(null);
  15983. const refreshList = () => {
  15984. var _a;
  15985. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  15986. };
  15987. let dataList = vue.ref([]);
  15988. const updateList = (data, page2) => {
  15989. dataList.value = data;
  15990. if (data.length > 0 && page2 == 1) {
  15991. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  15992. }
  15993. if (data.length == 0 && page2 == 1) {
  15994. uni.$u.ttsModule.speak("未查询到数据");
  15995. }
  15996. };
  15997. onLoad(() => {
  15998. const storedList = uni.getStorageSync("isbnList");
  15999. if (storedList) {
  16000. otherParams.value.isbnList = storedList.map((v) => v.isbn);
  16001. refreshList();
  16002. }
  16003. });
  16004. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  16005. return dataList;
  16006. }, set dataList(v) {
  16007. dataList = v;
  16008. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  16009. return onLoad;
  16010. } };
  16011. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16012. return __returned__;
  16013. }
  16014. };
  16015. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  16016. return vue.openBlock(), vue.createElementBlock("view", {
  16017. class: "common-page",
  16018. style: { "padding": "0" }
  16019. }, [
  16020. vue.createVNode($setup["PageScroll"], {
  16021. requestStr: "/app/orderinfo/getOrderListByIsbn",
  16022. onUpdateList: $setup.updateList,
  16023. ref: "scrollRef",
  16024. otherParams: $setup.otherParams,
  16025. method: "post"
  16026. }, {
  16027. default: vue.withCtx(() => [
  16028. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  16029. key: 0,
  16030. class: "list-con"
  16031. }, [
  16032. (vue.openBlock(true), vue.createElementBlock(
  16033. vue.Fragment,
  16034. null,
  16035. vue.renderList($setup.dataList, (cell) => {
  16036. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  16037. key: cell.id,
  16038. item: cell,
  16039. class: "mt-20"
  16040. }, null, 8, ["item"]);
  16041. }),
  16042. 128
  16043. /* KEYED_FRAGMENT */
  16044. ))
  16045. ])) : vue.createCommentVNode("v-if", true)
  16046. ]),
  16047. _: 1
  16048. /* STABLE */
  16049. }, 8, ["otherParams"])
  16050. ]);
  16051. }
  16052. const PagesIndexAuditIsbnOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/isbn-order.vue"]]);
  16053. const _sfc_main$1a = {
  16054. __name: "express-order",
  16055. setup(__props, { expose: __expose }) {
  16056. __expose();
  16057. const form = vue.ref({
  16058. searchType: "2",
  16059. search: ""
  16060. });
  16061. const handleSearch = () => {
  16062. formatAppLog("log", "at pages/index/audit/express-order.vue:47", "查询:", form.value.search);
  16063. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  16064. params: {
  16065. ...form.value
  16066. }
  16067. }).then((res2) => {
  16068. if (res2.code == 200) {
  16069. uni.setStorageSync("orderDetail", res2.data);
  16070. uni.navigateTo({
  16071. url: `/pages/index/detail/index?id=${res2.data.orderId}`
  16072. });
  16073. } else {
  16074. let text = form.value.search + res2.msg;
  16075. uni.$u.ttsModule.speak(text);
  16076. }
  16077. });
  16078. };
  16079. const handleScan = () => {
  16080. uni.scanCode({
  16081. success: (res2) => {
  16082. form.value.search = res2.result;
  16083. handleSearch();
  16084. }
  16085. });
  16086. };
  16087. onLoad(() => {
  16088. uni.$u.useGlobalEvent((e) => {
  16089. form.value.search = e.barcode;
  16090. handleSearch();
  16091. });
  16092. });
  16093. onShow(() => {
  16094. uni.$u.updateActivePageOnShow();
  16095. });
  16096. const __returned__ = { form, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  16097. return onLoad;
  16098. }, get onShow() {
  16099. return onShow;
  16100. } };
  16101. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16102. return __returned__;
  16103. }
  16104. };
  16105. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  16106. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  16107. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  16108. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  16109. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  16110. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  16111. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  16112. vue.createCommentVNode(" 底部按钮 "),
  16113. vue.createElementVNode("view", { class: "footer" }, [
  16114. vue.createCommentVNode(" 查询区域 "),
  16115. vue.createElementVNode("view", { class: "query-section" }, [
  16116. vue.createVNode(_component_u_radio_group, {
  16117. modelValue: $setup.form.searchType,
  16118. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.searchType = $event)
  16119. }, {
  16120. default: vue.withCtx(() => [
  16121. vue.createVNode(_component_u_radio, {
  16122. label: "查订单",
  16123. name: "1",
  16124. "label-size": "17"
  16125. }),
  16126. vue.createVNode(_component_u_radio, {
  16127. label: "查物流",
  16128. "custom-style": "margin-left:20px",
  16129. name: "2",
  16130. "label-size": "17"
  16131. })
  16132. ]),
  16133. _: 1
  16134. /* STABLE */
  16135. }, 8, ["modelValue"]),
  16136. vue.createElementVNode("view", { class: "search-box" }, [
  16137. vue.createVNode(_component_u_input, {
  16138. "custom-style": "width:100rpx",
  16139. modelValue: $setup.form.search,
  16140. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.search = $event),
  16141. placeholder: $setup.form.searchType == "1" ? "扫描/输入订单编号" : "扫描/输入物流单号",
  16142. border: "surround",
  16143. clearable: "",
  16144. "placeholder-style": "font-size:32rpx"
  16145. }, null, 8, ["modelValue", "placeholder"]),
  16146. vue.createVNode(_component_u_button, {
  16147. color: "#c8c8c8",
  16148. text: "查询",
  16149. onClick: $setup.handleSearch
  16150. })
  16151. ])
  16152. ]),
  16153. vue.createVNode(_component_u_divider),
  16154. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  16155. vue.createVNode(_component_u_button, {
  16156. size: "large",
  16157. type: "success",
  16158. text: "扫码",
  16159. onClick: $setup.handleScan
  16160. })
  16161. ])
  16162. ])
  16163. ]);
  16164. }
  16165. const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-b27ee25f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/express-order.vue"]]);
  16166. const _sfc_main$19 = {
  16167. __name: "user-orders",
  16168. setup(__props, { expose: __expose }) {
  16169. __expose();
  16170. const otherParams = vue.ref({
  16171. userId: ""
  16172. });
  16173. const scrollRef = vue.ref(null);
  16174. const refreshList = () => {
  16175. var _a;
  16176. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  16177. };
  16178. let dataList = vue.ref([]);
  16179. const updateList = (data, page2) => {
  16180. dataList.value = data;
  16181. if (data.length > 0 && page2 == 1) {
  16182. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  16183. }
  16184. if (data.length == 0 && page2 == 1) {
  16185. uni.$u.ttsModule.speak("未查询到数据");
  16186. }
  16187. };
  16188. onLoad((options) => {
  16189. otherParams.value.userId = options.userId;
  16190. refreshList();
  16191. });
  16192. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  16193. return dataList;
  16194. }, set dataList(v) {
  16195. dataList = v;
  16196. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  16197. return onLoad;
  16198. } };
  16199. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16200. return __returned__;
  16201. }
  16202. };
  16203. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  16204. return vue.openBlock(), vue.createElementBlock("view", {
  16205. class: "common-page",
  16206. style: { "padding": "0" }
  16207. }, [
  16208. vue.createVNode($setup["PageScroll"], {
  16209. requestStr: "/app/orderinfo/getOrderListByUserId",
  16210. onUpdateList: $setup.updateList,
  16211. ref: "scrollRef",
  16212. otherParams: $setup.otherParams,
  16213. method: "get"
  16214. }, {
  16215. default: vue.withCtx(() => [
  16216. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  16217. key: 0,
  16218. class: "list-con"
  16219. }, [
  16220. (vue.openBlock(true), vue.createElementBlock(
  16221. vue.Fragment,
  16222. null,
  16223. vue.renderList($setup.dataList, (cell) => {
  16224. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  16225. key: cell.id,
  16226. item: cell,
  16227. class: "mt-20"
  16228. }, null, 8, ["item"]);
  16229. }),
  16230. 128
  16231. /* KEYED_FRAGMENT */
  16232. ))
  16233. ])) : vue.createCommentVNode("v-if", true)
  16234. ]),
  16235. _: 1
  16236. /* STABLE */
  16237. }, 8, ["otherParams"])
  16238. ]);
  16239. }
  16240. const PagesIndexDetailUserOrders = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/user-orders.vue"]]);
  16241. const _sfc_main$18 = {
  16242. __name: "AuditorSelector",
  16243. props: {
  16244. show: {
  16245. type: Boolean,
  16246. default: false
  16247. }
  16248. },
  16249. emits: ["update:show", "auditor-selected"],
  16250. setup(__props, { expose: __expose, emit: __emit }) {
  16251. __expose();
  16252. const props2 = __props;
  16253. const emit2 = __emit;
  16254. const searchKeyword = vue.ref("");
  16255. const searchResults = vue.ref([]);
  16256. const historyAuditors = vue.ref(uni.getStorageSync("historyAuditors") || []);
  16257. const checkUserId = vue.ref("");
  16258. const auditorSearch = (name) => {
  16259. formatAppLog("log", "at pages/index/detail/components/AuditorSelector.vue:66", name);
  16260. uni.$u.http.get("/app/appUser/getCheckUser?name=" + name).then((res2) => {
  16261. if (res2.code == 200) {
  16262. searchResults.value = res2.data;
  16263. }
  16264. });
  16265. };
  16266. const handleSearch = () => {
  16267. auditorSearch(searchKeyword.value);
  16268. };
  16269. const selectItem = vue.ref({});
  16270. const selectAuditor = (item) => {
  16271. checkUserId.value = item.userId;
  16272. selectItem.value = item;
  16273. };
  16274. const handleClose = () => {
  16275. emit2("update:show", false);
  16276. searchKeyword.value = "";
  16277. };
  16278. const handleConfirm = () => {
  16279. if (checkUserId.value) {
  16280. emit2("auditor-selected", selectItem.value);
  16281. uni.setStorageSync("checkUserInfo", selectItem.value);
  16282. addToHistory(selectItem.value);
  16283. handleClose();
  16284. }
  16285. };
  16286. const addToHistory = (item) => {
  16287. const existingIndex = historyAuditors.value.findIndex((auditor) => auditor.userId === item.userId);
  16288. if (existingIndex !== -1) {
  16289. historyAuditors.value.splice(existingIndex, 1);
  16290. }
  16291. historyAuditors.value.unshift(item);
  16292. if (historyAuditors.value.length > 10) {
  16293. historyAuditors.value.pop();
  16294. }
  16295. uni.setStorageSync("historyAuditors", historyAuditors.value);
  16296. };
  16297. vue.onMounted(() => {
  16298. const storedHistory = uni.getStorageSync("historyAuditors") || [];
  16299. historyAuditors.value = storedHistory;
  16300. });
  16301. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyAuditors, checkUserId, auditorSearch, handleSearch, selectItem, selectAuditor, handleClose, handleConfirm, addToHistory, ref: vue.ref, onMounted: vue.onMounted };
  16302. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16303. return __returned__;
  16304. }
  16305. };
  16306. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  16307. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  16308. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  16309. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  16310. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  16311. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16312. show: $props.show,
  16313. onClose: $setup.handleClose,
  16314. mode: "bottom",
  16315. round: "10"
  16316. }, {
  16317. default: vue.withCtx(() => [
  16318. vue.createElementVNode("view", { class: "auditor-selector" }, [
  16319. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  16320. vue.createCommentVNode(" Title "),
  16321. vue.createElementVNode("view", { class: "header" }, [
  16322. vue.createElementVNode("text", { class: "title" }, "绑定审核员")
  16323. ]),
  16324. vue.createCommentVNode(" Search Box "),
  16325. vue.createElementVNode("view", { class: "search-box" }, [
  16326. vue.createVNode(_component_u_search, {
  16327. inputStyle: { "height": "80rpx", "font-size": "16px" },
  16328. actionStyle: { "font-size": "16px", color: "#22ac38" },
  16329. modelValue: $setup.searchKeyword,
  16330. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  16331. placeholder: "搜索审核员",
  16332. "show-action": true,
  16333. "action-text": "搜索",
  16334. onSearch: $setup.handleSearch,
  16335. onCustom: $setup.handleSearch
  16336. }, null, 8, ["modelValue"])
  16337. ]),
  16338. vue.createCommentVNode(" Search Results "),
  16339. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16340. key: 0,
  16341. class: "search-result"
  16342. }, [
  16343. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  16344. vue.createElementVNode("view", { class: "tag-group" }, [
  16345. (vue.openBlock(true), vue.createElementBlock(
  16346. vue.Fragment,
  16347. null,
  16348. vue.renderList($setup.searchResults, (item) => {
  16349. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16350. key: item,
  16351. text: item.userName,
  16352. plain: $setup.checkUserId !== item.userId,
  16353. shape: "circle",
  16354. onClick: ($event) => $setup.selectAuditor(item),
  16355. size: "large"
  16356. }, null, 8, ["text", "plain", "onClick"]);
  16357. }),
  16358. 128
  16359. /* KEYED_FRAGMENT */
  16360. ))
  16361. ])
  16362. ])) : vue.createCommentVNode("v-if", true),
  16363. vue.createCommentVNode(" History "),
  16364. $setup.historyAuditors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16365. key: 1,
  16366. class: "history-section"
  16367. }, [
  16368. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  16369. vue.createElementVNode("view", { class: "tag-group" }, [
  16370. (vue.openBlock(true), vue.createElementBlock(
  16371. vue.Fragment,
  16372. null,
  16373. vue.renderList($setup.historyAuditors, (item) => {
  16374. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16375. key: item,
  16376. text: item.userName,
  16377. plain: $setup.checkUserId !== item.userId,
  16378. shape: "circle",
  16379. onClick: ($event) => $setup.selectAuditor(item),
  16380. size: "large"
  16381. }, null, 8, ["text", "plain", "onClick"]);
  16382. }),
  16383. 128
  16384. /* KEYED_FRAGMENT */
  16385. ))
  16386. ])
  16387. ])) : vue.createCommentVNode("v-if", true)
  16388. ]),
  16389. vue.createCommentVNode(" Footer Buttons "),
  16390. vue.createElementVNode("view", { class: "footer" }, [
  16391. vue.createVNode(_component_u_button, {
  16392. onClick: $setup.handleClose,
  16393. text: "取消",
  16394. plain: "",
  16395. shape: "circle"
  16396. }),
  16397. vue.createVNode(_component_u_button, {
  16398. type: "primary",
  16399. onClick: $setup.handleConfirm,
  16400. text: "确定",
  16401. shape: "circle"
  16402. })
  16403. ])
  16404. ])
  16405. ]),
  16406. _: 1
  16407. /* STABLE */
  16408. }, 8, ["show"]);
  16409. }
  16410. 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"]]);
  16411. const props$9 = {
  16412. props: {
  16413. // 输入框的内容
  16414. value: {
  16415. type: [String, Number],
  16416. default: props$E.textarea.value
  16417. },
  16418. // 输入框的内容
  16419. modelValue: {
  16420. type: [String, Number],
  16421. default: props$E.textarea.value
  16422. },
  16423. // 输入框为空时占位符
  16424. placeholder: {
  16425. type: [String, Number],
  16426. default: props$E.textarea.placeholder
  16427. },
  16428. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  16429. placeholderClass: {
  16430. type: String,
  16431. default: props$E.input.placeholderClass
  16432. },
  16433. // 指定placeholder的样式
  16434. placeholderStyle: {
  16435. type: [String, Object],
  16436. default: props$E.input.placeholderStyle
  16437. },
  16438. // 输入框高度
  16439. height: {
  16440. type: [String, Number],
  16441. default: props$E.textarea.height
  16442. },
  16443. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  16444. confirmType: {
  16445. type: String,
  16446. default: props$E.textarea.confirmType
  16447. },
  16448. // 是否禁用
  16449. disabled: {
  16450. type: Boolean,
  16451. default: props$E.textarea.disabled
  16452. },
  16453. // 是否显示统计字数
  16454. count: {
  16455. type: Boolean,
  16456. default: props$E.textarea.count
  16457. },
  16458. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  16459. focus: {
  16460. type: Boolean,
  16461. default: props$E.textarea.focus
  16462. },
  16463. // 是否自动增加高度
  16464. autoHeight: {
  16465. type: Boolean,
  16466. default: props$E.textarea.autoHeight
  16467. },
  16468. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  16469. fixed: {
  16470. type: Boolean,
  16471. default: props$E.textarea.fixed
  16472. },
  16473. // 指定光标与键盘的距离
  16474. cursorSpacing: {
  16475. type: Number,
  16476. default: props$E.textarea.cursorSpacing
  16477. },
  16478. // 指定focus时的光标位置
  16479. cursor: {
  16480. type: [String, Number],
  16481. default: props$E.textarea.cursor
  16482. },
  16483. // 是否显示键盘上方带有”完成“按钮那一栏,
  16484. showConfirmBar: {
  16485. type: Boolean,
  16486. default: props$E.textarea.showConfirmBar
  16487. },
  16488. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  16489. selectionStart: {
  16490. type: Number,
  16491. default: props$E.textarea.selectionStart
  16492. },
  16493. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  16494. selectionEnd: {
  16495. type: Number,
  16496. default: props$E.textarea.selectionEnd
  16497. },
  16498. // 键盘弹起时,是否自动上推页面
  16499. adjustPosition: {
  16500. type: Boolean,
  16501. default: props$E.textarea.adjustPosition
  16502. },
  16503. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  16504. disableDefaultPadding: {
  16505. type: Boolean,
  16506. default: props$E.textarea.disableDefaultPadding
  16507. },
  16508. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  16509. holdKeyboard: {
  16510. type: Boolean,
  16511. default: props$E.textarea.holdKeyboard
  16512. },
  16513. // 最大输入长度,设置为 -1 的时候不限制最大长度
  16514. maxlength: {
  16515. type: [String, Number],
  16516. default: props$E.textarea.maxlength
  16517. },
  16518. // 边框类型,surround-四周边框,bottom-底部边框
  16519. border: {
  16520. type: String,
  16521. default: props$E.textarea.border
  16522. },
  16523. // 用于处理或者过滤输入框内容的方法
  16524. formatter: {
  16525. type: [Function, null],
  16526. default: props$E.textarea.formatter
  16527. },
  16528. // 是否忽略组件内对文本合成系统事件的处理
  16529. ignoreCompositionEvent: {
  16530. type: Boolean,
  16531. default: true
  16532. }
  16533. }
  16534. };
  16535. const _sfc_main$17 = {
  16536. name: "u-textarea",
  16537. mixins: [mpMixin, mixin, props$9],
  16538. data() {
  16539. return {
  16540. // 输入框的值
  16541. innerValue: "",
  16542. // 是否处于获得焦点状态
  16543. focused: false,
  16544. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  16545. firstChange: true,
  16546. // value绑定值的变化是由内部还是外部引起的
  16547. changeFromInner: false,
  16548. // 过滤处理方法
  16549. innerFormatter: (value2) => value2
  16550. };
  16551. },
  16552. created() {
  16553. },
  16554. watch: {
  16555. modelValue: {
  16556. immediate: true,
  16557. handler(newVal, oldVal) {
  16558. this.innerValue = newVal;
  16559. this.firstChange = false;
  16560. this.changeFromInner = false;
  16561. }
  16562. }
  16563. },
  16564. computed: {
  16565. // 组件的类名
  16566. textareaClass() {
  16567. let classes = [], { border, disabled } = this;
  16568. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  16569. border === "bottom" && (classes = classes.concat([
  16570. "u-border-bottom",
  16571. "u-textarea--no-radius"
  16572. ]));
  16573. disabled && classes.push("u-textarea--disabled");
  16574. return classes.join(" ");
  16575. },
  16576. // 组件的样式
  16577. textareaStyle() {
  16578. const style = {};
  16579. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16580. }
  16581. },
  16582. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  16583. methods: {
  16584. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  16585. setFormatter(e) {
  16586. this.innerFormatter = e;
  16587. },
  16588. onFocus(e) {
  16589. this.$emit("focus", e);
  16590. },
  16591. onBlur(e) {
  16592. this.$emit("blur", e);
  16593. uni.$u.formValidate(this, "blur");
  16594. },
  16595. onLinechange(e) {
  16596. this.$emit("linechange", e);
  16597. },
  16598. onInput(e) {
  16599. let { value: value2 = "" } = e.detail || {};
  16600. const formatter = this.formatter || this.innerFormatter;
  16601. const formatValue = formatter(value2);
  16602. this.innerValue = value2;
  16603. this.$nextTick(() => {
  16604. this.innerValue = formatValue;
  16605. this.valueChange();
  16606. });
  16607. },
  16608. // 内容发生变化,进行处理
  16609. valueChange() {
  16610. const value2 = this.innerValue;
  16611. this.$nextTick(() => {
  16612. this.$emit("update:modelValue", value2);
  16613. this.changeFromInner = true;
  16614. this.$emit("change", value2);
  16615. uni.$u.formValidate(this, "change");
  16616. });
  16617. },
  16618. onConfirm(e) {
  16619. this.$emit("confirm", e);
  16620. },
  16621. onKeyboardheightchange(e) {
  16622. this.$emit("keyboardheightchange", e);
  16623. }
  16624. }
  16625. };
  16626. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  16627. return vue.openBlock(), vue.createElementBlock(
  16628. "view",
  16629. {
  16630. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  16631. style: vue.normalizeStyle([$options.textareaStyle])
  16632. },
  16633. [
  16634. vue.createElementVNode("textarea", {
  16635. class: "u-textarea__field",
  16636. value: $data.innerValue,
  16637. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  16638. placeholder: _ctx.placeholder,
  16639. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  16640. "placeholder-class": _ctx.placeholderClass,
  16641. disabled: _ctx.disabled,
  16642. focus: _ctx.focus,
  16643. autoHeight: _ctx.autoHeight,
  16644. fixed: _ctx.fixed,
  16645. cursorSpacing: _ctx.cursorSpacing,
  16646. cursor: _ctx.cursor,
  16647. showConfirmBar: _ctx.showConfirmBar,
  16648. selectionStart: _ctx.selectionStart,
  16649. selectionEnd: _ctx.selectionEnd,
  16650. adjustPosition: _ctx.adjustPosition,
  16651. disableDefaultPadding: _ctx.disableDefaultPadding,
  16652. holdKeyboard: _ctx.holdKeyboard,
  16653. maxlength: _ctx.maxlength,
  16654. "confirm-type": _ctx.confirmType,
  16655. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  16656. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  16657. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  16658. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  16659. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  16660. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  16661. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  16662. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  16663. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  16664. "text",
  16665. {
  16666. key: 0,
  16667. class: "u-textarea__count",
  16668. style: vue.normalizeStyle({
  16669. "background-color": _ctx.disabled ? "transparent" : "#fff"
  16670. })
  16671. },
  16672. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  16673. 5
  16674. /* TEXT, STYLE */
  16675. )) : vue.createCommentVNode("v-if", true)
  16676. ],
  16677. 6
  16678. /* CLASS, STYLE */
  16679. );
  16680. }
  16681. 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"]]);
  16682. const _sfc_main$16 = {
  16683. __name: "OrderInfo",
  16684. props: {
  16685. orderId: String,
  16686. estimatedAmount: Number,
  16687. userNote: String,
  16688. detail: Object
  16689. // Add more props as needed
  16690. },
  16691. emits: ["refresh"],
  16692. setup(__props, { expose: __expose, emit: __emit }) {
  16693. __expose();
  16694. const props2 = __props;
  16695. let finalExpressList = { "1": "顺丰快递", "2": "京东快递", "3": "德邦快递" };
  16696. let finalExpressText = vue.computed(() => {
  16697. return props2.detail.finalExpress ? finalExpressList[props2.detail.finalExpress] : "";
  16698. });
  16699. const statusEnum = {
  16700. 0: "创建",
  16701. 1: "用户删除",
  16702. 2: "下单(待初审)",
  16703. 3: "初审(待取书)",
  16704. 4: "初审未通过",
  16705. 5: "快递取书(待签收)",
  16706. 6: "快递签收(待收货)",
  16707. 7: "物流签收(路由异常)",
  16708. 8: "仓库收货(待审核)",
  16709. 9: "审核中(审核未提交)",
  16710. 10: "已审核(待付款)",
  16711. 11: "已完成"
  16712. };
  16713. let statusText = vue.computed(() => {
  16714. return statusEnum[props2.detail.status] || "未知状态";
  16715. });
  16716. const maskedSendMobile = vue.computed(() => {
  16717. if (props2.detail.sendMobile && props2.detail.sendMobile.length === 11) {
  16718. return props2.detail.sendMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  16719. }
  16720. return props2.detail.sendMobile;
  16721. });
  16722. function copyToClipboard(text) {
  16723. uni.setClipboardData({
  16724. data: text,
  16725. success: function() {
  16726. uni.showToast({
  16727. title: "复制成功",
  16728. icon: "success"
  16729. });
  16730. },
  16731. fail: function(err) {
  16732. formatAppLog("error", "at pages/index/detail/components/OrderInfo.vue:121", "Could not copy text: ", err);
  16733. }
  16734. });
  16735. }
  16736. const showModal = vue.ref(false);
  16737. const internalRemark = vue.ref("");
  16738. function fillRemark(text) {
  16739. internalRemark.value = text;
  16740. }
  16741. const remarkInfo = vue.ref({});
  16742. function handleRemark() {
  16743. var _a;
  16744. showModal.value = true;
  16745. remarkInfo.value = ((_a = props2.detail.manageRemark) == null ? void 0 : _a[0]) || {};
  16746. internalRemark.value = remarkInfo.value.remark || "";
  16747. }
  16748. const emit2 = __emit;
  16749. function confirmRemark() {
  16750. uni.$u.http.post("/app/orderinfo/setManageRemark", {
  16751. orderId: props2.detail.orderId,
  16752. remark: internalRemark.value,
  16753. id: remarkInfo.value.id
  16754. }).then((res2) => {
  16755. if (res2.code == 200) {
  16756. uni.$u.toast("保存成功");
  16757. uni.$u.ttsModule.speak("保存成功");
  16758. showModal.value = false;
  16759. emit2("refresh");
  16760. } else {
  16761. uni.$u.toast(res2.msg);
  16762. }
  16763. });
  16764. }
  16765. const __returned__ = { props: props2, get finalExpressList() {
  16766. return finalExpressList;
  16767. }, set finalExpressList(v) {
  16768. finalExpressList = v;
  16769. }, get finalExpressText() {
  16770. return finalExpressText;
  16771. }, set finalExpressText(v) {
  16772. finalExpressText = v;
  16773. }, statusEnum, get statusText() {
  16774. return statusText;
  16775. }, set statusText(v) {
  16776. statusText = v;
  16777. }, maskedSendMobile, copyToClipboard, showModal, internalRemark, fillRemark, remarkInfo, handleRemark, emit: emit2, confirmRemark, computed: vue.computed, ref: vue.ref, watch: vue.watch };
  16778. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16779. return __returned__;
  16780. }
  16781. };
  16782. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  16783. var _a, _b, _c, _d;
  16784. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  16785. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  16786. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  16787. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  16788. return vue.openBlock(), vue.createElementBlock(
  16789. vue.Fragment,
  16790. null,
  16791. [
  16792. vue.createElementVNode("view", { class: "order-info bg-white" }, [
  16793. vue.createElementVNode("view", { class: "info-item flex" }, [
  16794. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  16795. vue.createElementVNode(
  16796. "text",
  16797. {
  16798. style: { "color": "#22ac38" },
  16799. class: "flex-1 text-center content",
  16800. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.detail.orderId))
  16801. },
  16802. vue.toDisplayString($props.detail.orderId),
  16803. 1
  16804. /* TEXT */
  16805. )
  16806. ]),
  16807. vue.createElementVNode("view", { class: "info-item" }, [
  16808. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  16809. vue.createElementVNode(
  16810. "text",
  16811. { class: "content" },
  16812. vue.toDisplayString($props.detail.expectMoney),
  16813. 1
  16814. /* TEXT */
  16815. ),
  16816. vue.createElementVNode("text", { class: "label border-left" }, "审核金额"),
  16817. vue.createElementVNode(
  16818. "text",
  16819. { class: "content" },
  16820. vue.toDisplayString($props.detail.finalMoney),
  16821. 1
  16822. /* TEXT */
  16823. )
  16824. ]),
  16825. vue.createElementVNode("view", { class: "info-item" }, [
  16826. vue.createElementVNode("text", { class: "label" }, "用户备注"),
  16827. vue.createElementVNode(
  16828. "text",
  16829. { class: "content" },
  16830. vue.toDisplayString($props.detail.userRemark),
  16831. 1
  16832. /* TEXT */
  16833. )
  16834. ]),
  16835. vue.createElementVNode("view", {
  16836. class: "info-item",
  16837. onClick: $setup.handleRemark
  16838. }, [
  16839. vue.createElementVNode("text", { class: "label" }, "内部备注"),
  16840. vue.createElementVNode(
  16841. "text",
  16842. { class: "content" },
  16843. 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 : " " : " "),
  16844. 1
  16845. /* TEXT */
  16846. )
  16847. ]),
  16848. vue.createElementVNode("view", { class: "info-item" }, [
  16849. vue.createElementVNode("text", { class: "label" }, "订单状态"),
  16850. vue.createElementVNode(
  16851. "text",
  16852. {
  16853. class: "content",
  16854. style: { "color": "#c5493e" }
  16855. },
  16856. "[" + vue.toDisplayString($setup.statusText) + "]",
  16857. 1
  16858. /* TEXT */
  16859. )
  16860. ]),
  16861. vue.createElementVNode("view", { class: "info-item" }, [
  16862. vue.createElementVNode("text", { class: "label" }, "快递"),
  16863. vue.createElementVNode(
  16864. "text",
  16865. { class: "content" },
  16866. vue.toDisplayString($setup.finalExpressText) + "(单号:" + vue.toDisplayString($props.detail.waybillCode) + ")",
  16867. 1
  16868. /* TEXT */
  16869. )
  16870. ]),
  16871. vue.createElementVNode("view", { class: "info-item" }, [
  16872. vue.createElementVNode("text", { class: "label" }, [
  16873. vue.createTextVNode("发件人"),
  16874. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  16875. ]),
  16876. vue.createElementVNode("view", { class: "content flex flex-a-c flex-j-c" }, [
  16877. vue.createElementVNode("text", {
  16878. class: "content-text",
  16879. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.detail.sendMobile))
  16880. }, "复制"),
  16881. vue.createElementVNode(
  16882. "text",
  16883. { class: "content-text ml-10 mr-10" },
  16884. vue.toDisplayString($setup.maskedSendMobile),
  16885. 1
  16886. /* TEXT */
  16887. ),
  16888. $props.detail.orderFrom == 1 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16889. key: 0,
  16890. name: "weixin-circle-fill",
  16891. size: "18",
  16892. color: "#22ac38"
  16893. })) : vue.createCommentVNode("v-if", true),
  16894. $props.detail.orderFrom == 2 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16895. key: 1,
  16896. name: "zhifubao-circle-fill",
  16897. size: "18",
  16898. color: "#999"
  16899. })) : vue.createCommentVNode("v-if", true)
  16900. ])
  16901. ]),
  16902. vue.createElementVNode("view", { class: "info-item" }, [
  16903. vue.createElementVNode("text", { class: "label" }, "发货地址"),
  16904. vue.createElementVNode(
  16905. "text",
  16906. { class: "content" },
  16907. vue.toDisplayString($props.detail.sendAddress),
  16908. 1
  16909. /* TEXT */
  16910. )
  16911. ]),
  16912. vue.createElementVNode("view", { class: "info-item" }, [
  16913. vue.createElementVNode("text", { class: "label" }, "收货仓库"),
  16914. vue.createElementVNode(
  16915. "text",
  16916. { class: "content" },
  16917. vue.toDisplayString($props.detail.recipientAddress) + "-" + vue.toDisplayString($props.detail.recipientGodown) + "-" + vue.toDisplayString($props.detail.recipientName),
  16918. 1
  16919. /* TEXT */
  16920. )
  16921. ])
  16922. ]),
  16923. vue.createVNode(_component_u_modal, {
  16924. show: $setup.showModal,
  16925. title: "编辑内部备注",
  16926. showCancelButton: true,
  16927. onConfirm: $setup.confirmRemark,
  16928. onCancel: _cache[8] || (_cache[8] = ($event) => $setup.showModal = false)
  16929. }, {
  16930. default: vue.withCtx(() => [
  16931. vue.createElementVNode("view", { class: "modal-content w100" }, [
  16932. vue.createVNode(_component_u_textarea, {
  16933. modelValue: $setup.internalRemark,
  16934. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.internalRemark = $event),
  16935. placeholder: "编辑内部备注",
  16936. autoHeight: "",
  16937. style: { "min-height": "100px" }
  16938. }, null, 8, ["modelValue"]),
  16939. vue.createElementVNode("view", { class: "mt-20 common-title" }, "快速填入"),
  16940. vue.createElementVNode("view", { class: "quick-fill mt-16" }, [
  16941. vue.createVNode(_component_u_tag, {
  16942. class: "mr-10 mb-10",
  16943. onClick: _cache[3] || (_cache[3] = ($event) => $setup.fillRemark("少书给客服")),
  16944. text: "少书给客服"
  16945. }),
  16946. vue.createVNode(_component_u_tag, {
  16947. class: "mr-10 mb-10",
  16948. onClick: _cache[4] || (_cache[4] = ($event) => $setup.fillRemark("多书给客服")),
  16949. text: "多书给客服"
  16950. }),
  16951. vue.createVNode(_component_u_tag, {
  16952. class: "mr-10 mb-10",
  16953. onClick: _cache[5] || (_cache[5] = ($event) => $setup.fillRemark("子母件")),
  16954. text: "子母件"
  16955. }),
  16956. vue.createVNode(_component_u_tag, {
  16957. class: "mr-10 mb-10",
  16958. onClick: _cache[6] || (_cache[6] = ($event) => $setup.fillRemark("书单不符给客服")),
  16959. text: "书单不符给客服"
  16960. }),
  16961. vue.createVNode(_component_u_tag, {
  16962. class: "mr-10 mb-10",
  16963. onClick: _cache[7] || (_cache[7] = ($event) => $setup.fillRemark("需理赔给客服")),
  16964. text: "需理赔给客服"
  16965. })
  16966. ])
  16967. ])
  16968. ]),
  16969. _: 1
  16970. /* STABLE */
  16971. }, 8, ["show"])
  16972. ],
  16973. 64
  16974. /* STABLE_FRAGMENT */
  16975. );
  16976. }
  16977. 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"]]);
  16978. const _sfc_main$15 = {
  16979. __name: "UserInfoCard",
  16980. props: {
  16981. detail: {
  16982. type: Object,
  16983. default: () => ({})
  16984. }
  16985. },
  16986. setup(__props, { expose: __expose }) {
  16987. __expose();
  16988. const props2 = __props;
  16989. const handleUserOrders = () => {
  16990. uni.navigateTo({
  16991. url: `/pages/index/detail/user-orders?userId=${props2.detail.userId}`
  16992. });
  16993. };
  16994. const formattedName = vue.computed(() => {
  16995. var _a, _b;
  16996. return ((_b = (_a = props2.detail) == null ? void 0 : _a.userNick) == null ? void 0 : _b.charAt(0)) + "**";
  16997. });
  16998. const statusClass = vue.computed(() => {
  16999. return props2.detail.userStatus == 1 ? "color-green" : "color-red";
  17000. });
  17001. const blacklistAction = vue.computed(() => {
  17002. return props2.detail.userStatus == 1 ? "加入黑名单" : "移除黑名单";
  17003. });
  17004. const showModal = vue.ref(false);
  17005. const showBlacklistModal = vue.ref(false);
  17006. const reason = vue.ref("");
  17007. const toggleBlacklist = () => {
  17008. showBlacklistModal.value = true;
  17009. };
  17010. const confirmBlacklist = () => {
  17011. let apiStr = props2.detail.userStatus == 1 ? "/app/appUser/setUserBlack" : "app/appUser/removeUserBlack";
  17012. uni.$u.http.post(apiStr, {
  17013. userId: props2.detail.userId,
  17014. reason: reason.value
  17015. }).then((res2) => {
  17016. if (res2.code == 200) {
  17017. uni.$u.toast("操作成功");
  17018. showBlacklistModal.value = false;
  17019. props2.detail.userStatus = props2.detail.userStatus == 1 ? 2 : 1;
  17020. } else {
  17021. uni.$u.toast(res2.msg);
  17022. }
  17023. });
  17024. };
  17025. const __returned__ = { props: props2, handleUserOrders, formattedName, statusClass, blacklistAction, showModal, showBlacklistModal, reason, toggleBlacklist, confirmBlacklist, ref: vue.ref, computed: vue.computed };
  17026. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17027. return __returned__;
  17028. }
  17029. };
  17030. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  17031. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  17032. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-card bg-white mt-16" }, [
  17033. vue.createElementVNode("view", { class: "header" }, [
  17034. vue.createElementVNode(
  17035. "text",
  17036. { style: { "color": "#666" } },
  17037. vue.toDisplayString($props.detail.orderTime),
  17038. 1
  17039. /* TEXT */
  17040. ),
  17041. vue.createElementVNode("text", {
  17042. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true),
  17043. class: "color-green"
  17044. }, "[查看订单日志]")
  17045. ]),
  17046. vue.createElementVNode("view", { class: "content flex flex-j-b" }, [
  17047. vue.createElementVNode("image", {
  17048. src: $props.detail.imgPath,
  17049. class: "user-image"
  17050. }, null, 8, ["src"]),
  17051. vue.createElementVNode("view", { class: "flex flex-a-e flex-1 ml-12" }, [
  17052. vue.createElementVNode("view", { class: "flex flex-d flex-1" }, [
  17053. vue.createElementVNode("text", {
  17054. class: "color-green",
  17055. onClick: $setup.handleUserOrders
  17056. }, [
  17057. vue.createTextVNode(
  17058. vue.toDisplayString($setup.formattedName),
  17059. 1
  17060. /* TEXT */
  17061. ),
  17062. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  17063. ]),
  17064. vue.createElementVNode(
  17065. "text",
  17066. {
  17067. class: "common-text",
  17068. style: { "margin-top": "10rpx" }
  17069. },
  17070. "共卖出" + vue.toDisplayString($props.detail.totalNum) + "本书",
  17071. 1
  17072. /* TEXT */
  17073. ),
  17074. vue.createElementVNode(
  17075. "text",
  17076. { class: "common-text" },
  17077. "来自" + vue.toDisplayString($props.detail.sendSsq),
  17078. 1
  17079. /* TEXT */
  17080. ),
  17081. vue.createElementVNode("text", {
  17082. class: "common-text",
  17083. style: { "margin-top": "10rpx" }
  17084. }, [
  17085. vue.createTextVNode("用户状态: "),
  17086. vue.createElementVNode(
  17087. "text",
  17088. {
  17089. class: vue.normalizeClass($setup.statusClass)
  17090. },
  17091. vue.toDisplayString($props.detail.userStatus == 1 ? "正常" : $props.detail.userStatus == 2 ? "黑名单" : "-"),
  17092. 3
  17093. /* TEXT, CLASS */
  17094. )
  17095. ])
  17096. ]),
  17097. vue.createElementVNode(
  17098. "text",
  17099. {
  17100. style: { "min-width": "160rpx" },
  17101. onClick: $setup.toggleBlacklist,
  17102. class: "color-red"
  17103. },
  17104. "[" + vue.toDisplayString($setup.blacklistAction) + "]",
  17105. 1
  17106. /* TEXT */
  17107. )
  17108. ])
  17109. ]),
  17110. vue.createVNode(_component_u_modal, {
  17111. show: $setup.showModal,
  17112. "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showModal = $event),
  17113. title: "订单日志",
  17114. showCancelButton: false,
  17115. confirmText: "关闭",
  17116. onConfirm: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false),
  17117. class: "log-modal"
  17118. }, {
  17119. default: vue.withCtx(() => [
  17120. vue.createElementVNode("view", { class: "log-container" }, [
  17121. vue.createElementVNode("view", { class: "log-header" }, [
  17122. vue.createElementVNode("text", null, "描述"),
  17123. vue.createElementVNode("text", null, "操作人"),
  17124. vue.createElementVNode("text", null, "时间")
  17125. ]),
  17126. (vue.openBlock(true), vue.createElementBlock(
  17127. vue.Fragment,
  17128. null,
  17129. vue.renderList($props.detail.logVoList, (log, index2) => {
  17130. return vue.openBlock(), vue.createElementBlock("view", {
  17131. class: "log-item",
  17132. key: index2
  17133. }, [
  17134. vue.createElementVNode(
  17135. "text",
  17136. { class: "log-item-content" },
  17137. vue.toDisplayString(log.statusName),
  17138. 1
  17139. /* TEXT */
  17140. ),
  17141. vue.createElementVNode(
  17142. "text",
  17143. { class: "log-item-name" },
  17144. vue.toDisplayString(log.createName),
  17145. 1
  17146. /* TEXT */
  17147. ),
  17148. vue.createElementVNode(
  17149. "text",
  17150. { class: "log-item-time" },
  17151. vue.toDisplayString(log.createTime),
  17152. 1
  17153. /* TEXT */
  17154. )
  17155. ]);
  17156. }),
  17157. 128
  17158. /* KEYED_FRAGMENT */
  17159. ))
  17160. ])
  17161. ]),
  17162. _: 1
  17163. /* STABLE */
  17164. }, 8, ["show"]),
  17165. vue.createVNode(_component_u_modal, {
  17166. show: $setup.showBlacklistModal,
  17167. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showBlacklistModal = $event),
  17168. title: "拉黑用户",
  17169. showCancelButton: true,
  17170. confirmText: "提交",
  17171. cancelText: "取消",
  17172. onConfirm: $setup.confirmBlacklist,
  17173. onCancel: _cache[5] || (_cache[5] = ($event) => $setup.showBlacklistModal = false)
  17174. }, {
  17175. default: vue.withCtx(() => [
  17176. vue.withDirectives(vue.createElementVNode(
  17177. "textarea",
  17178. {
  17179. class: "reason-textarea",
  17180. placeholder: "请输入拉黑原因...",
  17181. autoHeight: "",
  17182. "bg-color": "#f8f8f8",
  17183. "border-radius": "10rpx",
  17184. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.reason = $event),
  17185. height: "100px"
  17186. },
  17187. null,
  17188. 512
  17189. /* NEED_PATCH */
  17190. ), [
  17191. [vue.vModelText, $setup.reason]
  17192. ])
  17193. ]),
  17194. _: 1
  17195. /* STABLE */
  17196. }, 8, ["show"])
  17197. ]);
  17198. }
  17199. 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"]]);
  17200. const _sfc_main$14 = {
  17201. __name: "LogisticsTimeline",
  17202. props: {
  17203. list: {
  17204. type: Array,
  17205. default: []
  17206. }
  17207. },
  17208. setup(__props, { expose: __expose }) {
  17209. __expose();
  17210. const props2 = __props;
  17211. const __returned__ = { props: props2 };
  17212. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17213. return __returned__;
  17214. }
  17215. };
  17216. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  17217. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  17218. return vue.openBlock(), vue.createElementBlock("view", {
  17219. "scroll-y": "",
  17220. class: "timeline-container"
  17221. }, [
  17222. (vue.openBlock(true), vue.createElementBlock(
  17223. vue.Fragment,
  17224. null,
  17225. vue.renderList($props.list, (item, index2) => {
  17226. return vue.openBlock(), vue.createElementBlock("view", {
  17227. key: index2,
  17228. class: "timeline-item"
  17229. }, [
  17230. vue.createElementVNode("view", { class: "timeline-icon" }, [
  17231. vue.createVNode(_component_u_icon, {
  17232. name: "map-fill",
  17233. color: "#19be6b",
  17234. size: "16"
  17235. })
  17236. ]),
  17237. vue.createElementVNode("view", { class: "timeline-content" }, [
  17238. vue.createElementVNode(
  17239. "text",
  17240. { class: "title" },
  17241. vue.toDisplayString(item.title),
  17242. 1
  17243. /* TEXT */
  17244. ),
  17245. vue.createElementVNode(
  17246. "text",
  17247. { class: "desc" },
  17248. vue.toDisplayString(item.description),
  17249. 1
  17250. /* TEXT */
  17251. ),
  17252. vue.createElementVNode(
  17253. "text",
  17254. { class: "time" },
  17255. vue.toDisplayString(item.time),
  17256. 1
  17257. /* TEXT */
  17258. )
  17259. ]),
  17260. index2 < $props.list.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  17261. key: 0,
  17262. class: "timeline-line"
  17263. })) : vue.createCommentVNode("v-if", true)
  17264. ]);
  17265. }),
  17266. 128
  17267. /* KEYED_FRAGMENT */
  17268. ))
  17269. ]);
  17270. }
  17271. 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"]]);
  17272. const _sfc_main$13 = {
  17273. __name: "BookItem",
  17274. props: {
  17275. item: Object,
  17276. showClose: {
  17277. type: Boolean,
  17278. default: false
  17279. }
  17280. },
  17281. setup(__props, { expose: __expose }) {
  17282. __expose();
  17283. const props2 = __props;
  17284. const goodNum = vue.computed(() => {
  17285. var _a;
  17286. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17287. });
  17288. const badNum = vue.computed(() => {
  17289. var _a;
  17290. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 3).length) || 0;
  17291. });
  17292. const reasons = vue.computed(() => {
  17293. let list = props2.item.auditCommentList;
  17294. if (!list)
  17295. return "";
  17296. if (list.length > 0) {
  17297. let poorList = list.filter((v) => v.sts == 3);
  17298. if (poorList.length == 0)
  17299. return "";
  17300. return poorList.map((v) => v.com).join(";");
  17301. }
  17302. });
  17303. const __returned__ = { props: props2, goodNum, badNum, reasons, computed: vue.computed };
  17304. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17305. return __returned__;
  17306. }
  17307. };
  17308. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  17309. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  17310. vue.createElementVNode("view", { class: "flex w100" }, [
  17311. vue.createElementVNode("view", { class: "flex-d" }, [
  17312. vue.createElementVNode("image", {
  17313. style: { "width": "70px", "height": "90px" },
  17314. src: $props.item.cover,
  17315. mode: "aspectFill"
  17316. }, null, 8, ["src"]),
  17317. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  17318. "view",
  17319. {
  17320. key: 0,
  17321. class: "quantity mt-24"
  17322. },
  17323. "数量: " + vue.toDisplayString($props.item.num),
  17324. 1
  17325. /* TEXT */
  17326. )) : vue.createCommentVNode("v-if", true)
  17327. ]),
  17328. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  17329. vue.createElementVNode(
  17330. "view",
  17331. { class: "common-title mb-20" },
  17332. vue.toDisplayString($props.item.bookName),
  17333. 1
  17334. /* TEXT */
  17335. ),
  17336. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17337. vue.createElementVNode(
  17338. "view",
  17339. { class: "isbn" },
  17340. "ISBN: " + vue.toDisplayString($props.item.isbn),
  17341. 1
  17342. /* TEXT */
  17343. ),
  17344. vue.createElementVNode(
  17345. "view",
  17346. { class: "set" },
  17347. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  17348. 1
  17349. /* TEXT */
  17350. )
  17351. ]),
  17352. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17353. vue.createElementVNode(
  17354. "view",
  17355. { class: "price" },
  17356. "定价: " + vue.toDisplayString($props.item.bookPrice),
  17357. 1
  17358. /* TEXT */
  17359. ),
  17360. vue.createElementVNode(
  17361. "view",
  17362. { class: "estimate" },
  17363. "预估单价: " + vue.toDisplayString(($props.item.recycleDiscount * $props.item.bookPrice * 0.1).toFixed(2)),
  17364. 1
  17365. /* TEXT */
  17366. )
  17367. ]),
  17368. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17369. vue.createElementVNode(
  17370. "view",
  17371. { class: "discount" },
  17372. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  17373. 1
  17374. /* TEXT */
  17375. ),
  17376. vue.createElementVNode("view", { class: "review" }, [
  17377. vue.createTextVNode("审核金额: "),
  17378. vue.createElementVNode(
  17379. "text",
  17380. { class: "color-red" },
  17381. vue.toDisplayString($props.item.finalMoney || 0),
  17382. 1
  17383. /* TEXT */
  17384. )
  17385. ])
  17386. ]),
  17387. vue.createElementVNode("view", { class: "quality mb-10" }, [
  17388. vue.createTextVNode(
  17389. " 品相: 良好(" + vue.toDisplayString($setup.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.averageNum || 0) + ") 、 ",
  17390. 1
  17391. /* TEXT */
  17392. ),
  17393. vue.createElementVNode(
  17394. "text",
  17395. {
  17396. class: vue.normalizeClass($props.item.badNum > 0 ? "color-red" : "")
  17397. },
  17398. "极差(" + vue.toDisplayString($setup.badNum) + ")",
  17399. 3
  17400. /* TEXT, CLASS */
  17401. )
  17402. ]),
  17403. $setup.reasons ? (vue.openBlock(), vue.createElementBlock(
  17404. "view",
  17405. {
  17406. key: 0,
  17407. class: "color-red"
  17408. },
  17409. "原因:" + vue.toDisplayString($setup.reasons),
  17410. 1
  17411. /* TEXT */
  17412. )) : vue.createCommentVNode("v-if", true)
  17413. ])
  17414. ])
  17415. ]);
  17416. }
  17417. 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"]]);
  17418. const pinyin = {
  17419. "a": "啊阿锕",
  17420. "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭",
  17421. "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯",
  17422. "ang": "肮昂盎",
  17423. "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖",
  17424. "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃",
  17425. "bai": "白柏百摆佰败拜稗薜掰鞴",
  17426. "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨",
  17427. "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃",
  17428. "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅",
  17429. "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛",
  17430. "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾",
  17431. "ben": "奔苯本笨畚坌锛",
  17432. "beng": "崩绷甭泵蹦迸唪嘣甏",
  17433. "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀",
  17434. "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊",
  17435. "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔",
  17436. "bie": "鳖憋别瘪蹩鳘",
  17437. "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓",
  17438. "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹",
  17439. "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭",
  17440. "ca": "擦嚓礤",
  17441. "cai": "猜裁材才财睬踩采彩菜蔡",
  17442. "can": "餐参蚕残惭惨灿骖璨粲黪",
  17443. "cang": "苍舱仓沧藏伧",
  17444. "cao": "操糙槽曹草艹嘈漕螬艚",
  17445. "ce": "厕策侧册测刂帻恻",
  17446. "ceng": "层蹭噌",
  17447. "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩",
  17448. "chai": "拆柴豺侪茈瘥虿龇",
  17449. "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔",
  17450. "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳",
  17451. "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖",
  17452. "che": "车扯撤掣彻澈坼屮砗",
  17453. "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀",
  17454. "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲",
  17455. "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑",
  17456. "chong": "充冲虫崇宠茺忡憧铳艟",
  17457. "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋",
  17458. "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜",
  17459. "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡",
  17460. "chuang": "疮窗幢床闯创怆",
  17461. "chui": "吹炊捶锤垂陲棰槌",
  17462. "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽",
  17463. "chuo": "戳绰蔟辶辍镞踔龊",
  17464. "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑",
  17465. "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞",
  17466. "cu": "凑粗醋簇猝殂蹙",
  17467. "cuan": "蹿篡窜汆撺昕爨",
  17468. "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹",
  17469. "cun": "村存寸磋忖皴",
  17470. "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜",
  17471. "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑",
  17472. "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛",
  17473. "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪",
  17474. "dang": "当挡党荡档谠凼菪宕砀铛裆",
  17475. "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛",
  17476. "de": "德得的锝",
  17477. "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦",
  17478. "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶",
  17479. "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮",
  17480. "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂",
  17481. "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎",
  17482. "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊",
  17483. "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫",
  17484. "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡",
  17485. "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩",
  17486. "duan": "端短锻段断缎彖椴煅簖",
  17487. "dui": "堆兑队对怼憝碓",
  17488. "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸",
  17489. "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱",
  17490. "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄",
  17491. "en": "恩蒽摁唔嗯",
  17492. "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕",
  17493. "fa": "发罚筏伐乏阀法珐垡砝",
  17494. "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯",
  17495. "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂",
  17496. "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱",
  17497. "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢",
  17498. "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜",
  17499. "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆",
  17500. "ga": "噶嘎蛤尬呷尕尜旮钆",
  17501. "gai": "该改概钙盖溉丐陔垓戤赅胲",
  17502. "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐",
  17503. "gang": "冈刚钢缸肛纲岗港戆罡颃筻",
  17504. "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥",
  17505. "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆",
  17506. "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂",
  17507. "gei": "给",
  17508. "gen": "根跟亘茛哏艮",
  17509. "geng": "耕更庚羹埂耿梗哽赓鲠",
  17510. "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲",
  17511. "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘",
  17512. "gua": "刮瓜剐寡挂褂卦诖呱栝鸹",
  17513. "guai": "乖拐怪哙",
  17514. "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏",
  17515. "guang": "光广逛犷桄胱疒",
  17516. "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜",
  17517. "gun": "辊滚棍丨衮绲磙鲧",
  17518. "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈",
  17519. "ha": "哈",
  17520. "hai": "骸孩海氦亥害骇咴嗨颏醢",
  17521. "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾",
  17522. "hen": "夯痕很狠恨",
  17523. "hang": "杭航沆绗珩桁",
  17524. "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝",
  17525. "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮",
  17526. "hei": "嘿黑",
  17527. "heng": "哼亨横衡恒訇蘅",
  17528. "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓",
  17529. "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺",
  17530. "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛",
  17531. "hua": "花哗华猾滑画划化话劐浍骅桦铧稞",
  17532. "huai": "槐徊怀淮坏还踝",
  17533. "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟",
  17534. "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇",
  17535. "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾",
  17536. "hun": "荤昏婚魂浑混诨馄阍溷缗",
  17537. "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖",
  17538. "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂",
  17539. "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏",
  17540. "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯",
  17541. "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇",
  17542. "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛",
  17543. "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫",
  17544. "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜",
  17545. "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌",
  17546. "jiong": "炯窘冂迥扃",
  17547. "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏",
  17548. "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫",
  17549. "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽",
  17550. "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖",
  17551. "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇",
  17552. "ka": "喀咖卡佧咔胩",
  17553. "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁",
  17554. "kai": "开揩楷凯慨剀垲蒈忾恺铠锎",
  17555. "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰",
  17556. "kang": "康慷糠扛抗亢炕坑伉闶钪",
  17557. "kao": "考拷烤靠尻栲犒铐",
  17558. "ken": "肯啃垦恳垠裉颀",
  17559. "keng": "吭忐铿",
  17560. "kong": "空恐孔控倥崆箜",
  17561. "kou": "抠口扣寇芤蔻叩眍筘",
  17562. "ku": "枯哭窟苦酷库裤刳堀喾绔骷",
  17563. "kua": "夸垮挎跨胯侉",
  17564. "kuai": "块筷侩快蒯郐蒉狯脍",
  17565. "kuan": "宽款髋",
  17566. "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶",
  17567. "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬",
  17568. "kun": "坤昆捆困悃阃琨锟醌鲲髡",
  17569. "kuo": "括扩廓阔蛞",
  17570. "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌",
  17571. "lai": "莱来赖崃徕涞濑赉睐铼癞籁",
  17572. "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴",
  17573. "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂",
  17574. "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪",
  17575. "le": "勒乐肋仂叻嘞泐鳓",
  17576. "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹",
  17577. "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮",
  17578. "leng": "楞愣",
  17579. "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧",
  17580. "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢",
  17581. "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉",
  17582. "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢",
  17583. "lie": "列裂烈劣猎冽埒洌趔躐鬣",
  17584. "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟",
  17585. "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏",
  17586. "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃",
  17587. "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅",
  17588. "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈",
  17589. "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛",
  17590. "luan": "峦孪滦卵乱栾鸾銮",
  17591. "lue": "掠略锊",
  17592. "lun": "轮伦仑沦纶论囵",
  17593. "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒",
  17594. "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽",
  17595. "mai": "埋买麦卖迈脉劢荬咪霾",
  17596. "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔",
  17597. "mang": "芒茫盲忙莽邙漭朦硭蟒",
  17598. "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾",
  17599. "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱",
  17600. "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦",
  17601. "me": "么",
  17602. "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅",
  17603. "men": "门闷们扪玟焖懑钔",
  17604. "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋",
  17605. "mian": "棉眠绵冕免勉娩缅面沔湎腼眄",
  17606. "mie": "蔑灭咩蠛篾",
  17607. "min": "民抿皿敏悯闽苠岷闵泯珉",
  17608. "ming": "明螟鸣铭名命冥茗溟暝瞑酩",
  17609. "miu": "谬",
  17610. "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘",
  17611. "mou": "谋牟某厶哞婺眸鍪",
  17612. "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼",
  17613. "na": "拿哪呐钠那娜纳内捺肭镎衲箬",
  17614. "nai": "氖乃奶耐奈鼐艿萘柰",
  17615. "nan": "南男难囊喃囡楠腩蝻赧",
  17616. "nao": "挠脑恼闹孬垴猱瑙硇铙蛲",
  17617. "ne": "淖呢讷",
  17618. "nei": "馁",
  17619. "nen": "嫩能枘恁",
  17620. "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵",
  17621. "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶",
  17622. "niang": "娘酿",
  17623. "niao": "鸟尿茑嬲脲袅",
  17624. "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑",
  17625. "nin": "您柠",
  17626. "ning": "狞凝宁拧泞佞蓥咛甯聍",
  17627. "niu": "牛扭钮纽狃忸妞蚴",
  17628. "nong": "脓浓农侬",
  17629. "nu": "奴努怒呶帑弩胬孥驽",
  17630. "nv": "女恧钕衄",
  17631. "nuan": "暖",
  17632. "nuenue": "虐",
  17633. "nue": "疟谑",
  17634. "nuo": "挪懦糯诺傩搦喏锘",
  17635. "ou": "哦欧鸥殴藕呕偶沤怄瓯耦",
  17636. "pa": "啪趴爬帕怕琶葩筢",
  17637. "pai": "拍排牌徘湃派俳蒎",
  17638. "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒",
  17639. "pang": "乓庞旁耪胖滂逄",
  17640. "pao": "抛咆刨炮袍跑泡匏狍庖脬疱",
  17641. "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈",
  17642. "pen": "喷盆湓",
  17643. "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛",
  17644. "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔",
  17645. "pian": "篇偏片骗谝骈犏胼褊翩蹁",
  17646. "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵",
  17647. "pie": "撇瞥丿苤氕",
  17648. "pin": "拼频贫品聘拚姘嫔榀牝颦",
  17649. "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆",
  17650. "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸",
  17651. "pou": "剖裒踣",
  17652. "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼",
  17653. "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒",
  17654. "qia": "掐恰洽葜",
  17655. "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝",
  17656. "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄",
  17657. "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒",
  17658. "qie": "切茄且怯窃郄唼惬妾挈锲箧",
  17659. "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾",
  17660. "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥",
  17661. "qiong": "琼穷邛茕穹筇銎",
  17662. "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽",
  17663. "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢",
  17664. "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈",
  17665. "que": "缺炔瘸却鹊榷确雀阙悫",
  17666. "qun": "裙群逡",
  17667. "ran": "然燃冉染苒髯",
  17668. "rang": "瓤壤攘嚷让禳穰",
  17669. "rao": "饶扰绕荛娆桡",
  17670. "ruo": "惹若弱",
  17671. "re": "热偌",
  17672. "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽",
  17673. "reng": "扔仍",
  17674. "ri": "日",
  17675. "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾",
  17676. "rou": "揉柔肉糅蹂鞣",
  17677. "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥",
  17678. "ruan": "软阮朊",
  17679. "rui": "蕊瑞锐芮蕤睿蚋",
  17680. "run": "闰润",
  17681. "sa": "撒洒萨卅仨挲飒",
  17682. "sai": "腮鳃塞赛噻",
  17683. "san": "三叁伞散彡馓氵毵糁霰",
  17684. "sang": "桑嗓丧搡磉颡",
  17685. "sao": "搔骚扫嫂埽臊瘙鳋",
  17686. "se": "瑟色涩啬铩铯穑",
  17687. "sen": "森",
  17688. "seng": "僧",
  17689. "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨",
  17690. "shai": "筛晒酾",
  17691. "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝",
  17692. "shang": "墒伤商赏晌上尚裳垧绱殇熵觞",
  17693. "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄",
  17694. "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝",
  17695. "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃",
  17696. "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙",
  17697. "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺",
  17698. "shou": "收手首守寿授售受瘦兽扌狩绶艏",
  17699. "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬",
  17700. "shua": "刷耍唰涮",
  17701. "shuai": "摔衰甩帅蟀",
  17702. "shuan": "栓拴闩",
  17703. "shuang": "霜双爽孀",
  17704. "shui": "谁水睡税",
  17705. "shun": "吮瞬顺舜恂",
  17706. "shuo": "说硕朔烁蒴搠嗍濯妁槊铄",
  17707. "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥",
  17708. "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦",
  17709. "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋",
  17710. "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣",
  17711. "suan": "酸蒜算",
  17712. "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢",
  17713. "sun": "孙损笋荪狲飧榫跣隼",
  17714. "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧",
  17715. "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓",
  17716. "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐",
  17717. "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃",
  17718. "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣",
  17719. "thang": "倘躺淌",
  17720. "theng": "趟烫",
  17721. "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕",
  17722. "te": "特",
  17723. "teng": "藤腾疼誊滕",
  17724. "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍",
  17725. "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺",
  17726. "tiao": "条迢眺跳佻祧铫窕龆鲦",
  17727. "tie": "贴铁帖萜餮",
  17728. "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆",
  17729. "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼",
  17730. "tou": "偷投头透亠",
  17731. "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴",
  17732. "tuan": "湍团疃",
  17733. "tui": "推颓腿蜕褪退忒煺",
  17734. "tun": "吞屯臀饨暾豚窀",
  17735. "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍",
  17736. "wa": "挖哇蛙洼娃瓦袜佤娲腽",
  17737. "wai": "歪外",
  17738. "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢",
  17739. "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍",
  17740. "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔",
  17741. "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯",
  17742. "weng": "嗡翁瓮蓊蕹",
  17743. "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌",
  17744. "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯",
  17745. "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷",
  17746. "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠",
  17747. "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹",
  17748. "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨",
  17749. "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈",
  17750. "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞",
  17751. "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫",
  17752. "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎",
  17753. "xiong": "兄凶胸匈汹雄熊芎",
  17754. "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹",
  17755. "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑",
  17756. "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃",
  17757. "xue": "靴薛学穴雪血噱泶鳕",
  17758. "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟",
  17759. "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖",
  17760. "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹",
  17761. "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅",
  17762. "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐",
  17763. "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘",
  17764. "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟",
  17765. "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈",
  17766. "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂",
  17767. "yo": "哟唷",
  17768. "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔",
  17769. "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬",
  17770. "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉",
  17771. "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋",
  17772. "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺",
  17773. "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲",
  17774. "za": "匝砸杂拶咂",
  17775. "zai": "栽哉灾宰载再在咱崽甾",
  17776. "zan": "攒暂赞瓒昝簪糌趱錾",
  17777. "zang": "赃脏葬奘戕臧",
  17778. "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫",
  17779. "ze": "责择则泽仄赜啧迮昃笮箦舴",
  17780. "zei": "贼",
  17781. "zen": "怎谮",
  17782. "zeng": "增憎曾赠缯甑罾锃",
  17783. "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄",
  17784. "zhai": "摘斋宅窄债寨砦",
  17785. "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃",
  17786. "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑",
  17787. "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊",
  17788. "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭",
  17789. "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩",
  17790. "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝",
  17791. "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯",
  17792. "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵",
  17793. "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷",
  17794. "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈",
  17795. "zhua": "抓",
  17796. "zhuai": "拽",
  17797. "zhuan": "专砖转撰赚篆抟啭颛",
  17798. "zhuang": "桩庄装妆撞壮状丬",
  17799. "zhui": "椎锥追赘坠缀萑骓缒",
  17800. "zhun": "谆准",
  17801. "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫",
  17802. "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭",
  17803. "zong": "鬃棕踪宗综总纵腙粽",
  17804. "zou": "邹走奏揍鄹鲰",
  17805. "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴",
  17806. "zuan": "钻纂攥缵",
  17807. "zui": "嘴醉最罪",
  17808. "zun": "尊遵撙樽鳟",
  17809. "zuo": "昨左佐柞做作坐座阝阼胙祚酢",
  17810. "cou": "薮楱辏腠",
  17811. "nang": "攮哝囔馕曩",
  17812. "o": "喔",
  17813. "dia": "嗲",
  17814. "chuai": "嘬膪踹",
  17815. "cen": "岑涔",
  17816. "diu": "铥",
  17817. "nou": "耨",
  17818. "fou": "缶",
  17819. "bia": "髟"
  17820. };
  17821. const _ToPinyin = class _ToPinyin {
  17822. constructor() {
  17823. }
  17824. static getInstance() {
  17825. if (!this.instance) {
  17826. this.instance = new _ToPinyin();
  17827. }
  17828. return this.instance;
  17829. }
  17830. // 转首字母 this.chineseToInitials(this.chineseToPinYin('你好')) this.chineseToInitials('NiHao')
  17831. chineseToInitials(word) {
  17832. let SX = "";
  17833. for (var i = 0; i < word.length; i++) {
  17834. var c = word.charAt(i);
  17835. if (/^[A-Z]+$/.test(c)) {
  17836. SX += c;
  17837. }
  17838. }
  17839. return SX;
  17840. }
  17841. // 转拼音
  17842. chineseToPinYin(l1) {
  17843. var l2 = l1.length;
  17844. var I1 = "";
  17845. var reg = new RegExp("[a-zA-Z0-9]");
  17846. for (var i = 0; i < l2; i++) {
  17847. var val = l1.substr(i, 1);
  17848. var name = this.arraySearch(val, pinyin);
  17849. if (reg.test(val)) {
  17850. I1 += val.toLocaleUpperCase();
  17851. } else if (name !== false) {
  17852. I1 += name;
  17853. }
  17854. }
  17855. I1 = I1.replace(/ /g, "-");
  17856. while (I1.indexOf("--") > 0) {
  17857. I1 = I1.replace("--", "-");
  17858. }
  17859. return I1;
  17860. }
  17861. arraySearch(l1, l2) {
  17862. for (var name in pinyin) {
  17863. if (pinyin[name].indexOf(l1) !== -1) {
  17864. return this.ucfirst(name);
  17865. }
  17866. }
  17867. return false;
  17868. }
  17869. ucfirst(l1) {
  17870. if (l1.length > 0) {
  17871. var first = l1.substr(0, 1).toUpperCase();
  17872. var spare = l1.substr(1, l1.length);
  17873. return first + spare;
  17874. }
  17875. }
  17876. };
  17877. __publicField(_ToPinyin, "instance");
  17878. let ToPinyin = _ToPinyin;
  17879. const toPinyin = ToPinyin.getInstance();
  17880. const _sfc_main$12 = {
  17881. __name: "BookInfo",
  17882. props: {
  17883. bookList: {
  17884. type: Array,
  17885. default: () => []
  17886. },
  17887. detail: {
  17888. type: Object,
  17889. default: () => ({})
  17890. },
  17891. isShow: {
  17892. type: Boolean,
  17893. default: true
  17894. }
  17895. },
  17896. emits: ["get-all-firstLetter"],
  17897. setup(__props, { expose: __expose, emit: __emit }) {
  17898. __expose();
  17899. const props2 = __props;
  17900. const emit2 = __emit;
  17901. const auditNum = vue.computed(() => {
  17902. return props2.bookList.reduce((total, item) => {
  17903. var _a;
  17904. let num = ((_a = item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts != 0).length) || 0;
  17905. return total + num;
  17906. }, 0);
  17907. });
  17908. function handleBookClick(book) {
  17909. if (props2.detail.status >= 10) {
  17910. uni.$u.ttsModule.speak("订单已审核完成");
  17911. return;
  17912. }
  17913. uni.navigateTo({
  17914. url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
  17915. });
  17916. uni.setStorageSync("auditBook", book);
  17917. }
  17918. function getAuditCateNum(cate) {
  17919. let auditList = [];
  17920. props2.bookList.forEach((v) => {
  17921. auditList.push(...v.auditCommentList || []);
  17922. });
  17923. return auditList.filter((v) => v.sts == cate).length;
  17924. }
  17925. const formatBookList = (list) => {
  17926. const poorBooks = { title: "极差", list: [], backgroundColor: "#de868f", id: "poor" };
  17927. const goodBooks = { title: "良好", list: [], backgroundColor: "#81b337", id: "good" };
  17928. const otherBooks = [];
  17929. const allFirstLetter = [];
  17930. const handleBookCategorization = (book) => {
  17931. let firstLetter;
  17932. let firstChineseChar = null;
  17933. for (let i = 0; i < book.bookName.length; i++) {
  17934. const char = book.bookName.charAt(i);
  17935. if (/^[\u4E00-\u9FA5]$/.test(char)) {
  17936. firstChineseChar = char;
  17937. break;
  17938. }
  17939. }
  17940. if (firstChineseChar) {
  17941. firstLetter = toPinyin.chineseToInitials(toPinyin.chineseToPinYin(firstChineseChar));
  17942. } else {
  17943. const char = book.bookName.charAt(0);
  17944. if (/^[A-Za-z]$/.test(char)) {
  17945. firstLetter = char.toUpperCase();
  17946. } else {
  17947. firstLetter = char;
  17948. }
  17949. }
  17950. let bool = otherBooks.some((item) => item.title == firstLetter);
  17951. if (!bool) {
  17952. otherBooks.push({ id: firstLetter, title: firstLetter, list: [{ ...book }] });
  17953. allFirstLetter.push(firstLetter);
  17954. emit2("get-all-firstLetter", allFirstLetter);
  17955. } else {
  17956. otherBooks.find((item) => item.title == firstLetter).list.push(book);
  17957. }
  17958. };
  17959. list.forEach((book) => {
  17960. var _a, _b, _c;
  17961. book.goodNum = ((_a = book.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17962. book.badNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((v) => v.sts == 3).length) || 0;
  17963. const totalAudited = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((v) => v.sts !== 0).length) || 0;
  17964. const isFullyAudited = totalAudited === book.num;
  17965. if (isFullyAudited) {
  17966. if (book.auditCommentList.some((v) => v.sts === 3)) {
  17967. poorBooks.list.push(book);
  17968. } else if (book.auditCommentList.every((v) => v.sts === 1)) {
  17969. goodBooks.list.push(book);
  17970. } else {
  17971. handleBookCategorization(book);
  17972. }
  17973. } else {
  17974. handleBookCategorization(book);
  17975. }
  17976. });
  17977. return { poorBooks, goodBooks, otherBooks };
  17978. };
  17979. const formatList = vue.ref([]);
  17980. vue.watch(
  17981. () => props2.bookList,
  17982. (newVal) => {
  17983. let { poorBooks, goodBooks, otherBooks } = formatBookList(newVal);
  17984. otherBooks.sort((a, b) => a.id.localeCompare(b.id));
  17985. let poor = poorBooks.list.length > 0 ? poorBooks : {};
  17986. let good = goodBooks.list.length > 0 ? goodBooks : {};
  17987. formatList.value = [...otherBooks, poor, good];
  17988. },
  17989. { immediate: true, deep: true }
  17990. );
  17991. 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() {
  17992. return toPinyin;
  17993. } };
  17994. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17995. return __returned__;
  17996. }
  17997. };
  17998. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  17999. return vue.openBlock(), vue.createElementBlock("view", { class: "book-info" }, [
  18000. $props.isShow ? (vue.openBlock(), vue.createElementBlock(
  18001. vue.Fragment,
  18002. { key: 0 },
  18003. [
  18004. vue.createElementVNode(
  18005. "view",
  18006. {
  18007. class: "font-bold mt-12 mb-10",
  18008. style: { "padding": "0 20rpx" }
  18009. },
  18010. vue.toDisplayString($props.bookList.length) + "条记录,共" + vue.toDisplayString($props.detail.totalNum) + "本,已审" + vue.toDisplayString($setup.auditNum || 0) + "本 ",
  18011. 1
  18012. /* TEXT */
  18013. ),
  18014. vue.createElementVNode(
  18015. "view",
  18016. {
  18017. class: "font-light",
  18018. style: { "padding": "0 20rpx" }
  18019. },
  18020. " 其中已审:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般0本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  18021. 1
  18022. /* TEXT */
  18023. )
  18024. ],
  18025. 64
  18026. /* STABLE_FRAGMENT */
  18027. )) : vue.createCommentVNode("v-if", true),
  18028. (vue.openBlock(true), vue.createElementBlock(
  18029. vue.Fragment,
  18030. null,
  18031. vue.renderList($setup.formatList, (item) => {
  18032. return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
  18033. class: "book-info-item bg-white mt-12",
  18034. style: vue.normalizeStyle({ backgroundColor: item.backgroundColor }),
  18035. key: item.title,
  18036. id: item.id
  18037. }, [
  18038. vue.createElementVNode(
  18039. "view",
  18040. { class: "book-info-item-title" },
  18041. vue.toDisplayString(item.title),
  18042. 1
  18043. /* TEXT */
  18044. ),
  18045. vue.createElementVNode("view", { class: "book-info-item-list" }, [
  18046. (vue.openBlock(true), vue.createElementBlock(
  18047. vue.Fragment,
  18048. null,
  18049. vue.renderList(item.list, (book) => {
  18050. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  18051. key: book.bookId,
  18052. item: book,
  18053. onClick: ($event) => $setup.handleBookClick(book)
  18054. }, null, 8, ["item", "onClick"]);
  18055. }),
  18056. 128
  18057. /* KEYED_FRAGMENT */
  18058. ))
  18059. ])
  18060. ], 12, ["id"])), [
  18061. [vue.vShow, item == null ? void 0 : item.title]
  18062. ]);
  18063. }),
  18064. 128
  18065. /* KEYED_FRAGMENT */
  18066. ))
  18067. ]);
  18068. }
  18069. 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"]]);
  18070. const props$8 = {
  18071. props: {
  18072. // 图片地址
  18073. src: {
  18074. type: String,
  18075. default: props$E.image.src
  18076. },
  18077. // 裁剪模式
  18078. mode: {
  18079. type: String,
  18080. default: props$E.image.mode
  18081. },
  18082. // 宽度,单位任意
  18083. width: {
  18084. type: [String, Number],
  18085. default: props$E.image.width
  18086. },
  18087. // 高度,单位任意
  18088. height: {
  18089. type: [String, Number],
  18090. default: props$E.image.height
  18091. },
  18092. // 图片形状,circle-圆形,square-方形
  18093. shape: {
  18094. type: String,
  18095. default: props$E.image.shape
  18096. },
  18097. // 圆角,单位任意
  18098. radius: {
  18099. type: [String, Number],
  18100. default: props$E.image.radius
  18101. },
  18102. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  18103. lazyLoad: {
  18104. type: Boolean,
  18105. default: props$E.image.lazyLoad
  18106. },
  18107. // 开启长按图片显示识别微信小程序码菜单
  18108. showMenuByLongpress: {
  18109. type: Boolean,
  18110. default: props$E.image.showMenuByLongpress
  18111. },
  18112. // 加载中的图标,或者小图片
  18113. loadingIcon: {
  18114. type: String,
  18115. default: props$E.image.loadingIcon
  18116. },
  18117. // 加载失败的图标,或者小图片
  18118. errorIcon: {
  18119. type: String,
  18120. default: props$E.image.errorIcon
  18121. },
  18122. // 是否显示加载中的图标或者自定义的slot
  18123. showLoading: {
  18124. type: Boolean,
  18125. default: props$E.image.showLoading
  18126. },
  18127. // 是否显示加载错误的图标或者自定义的slot
  18128. showError: {
  18129. type: Boolean,
  18130. default: props$E.image.showError
  18131. },
  18132. // 是否需要淡入效果
  18133. fade: {
  18134. type: Boolean,
  18135. default: props$E.image.fade
  18136. },
  18137. // 只支持网络资源,只对微信小程序有效
  18138. webp: {
  18139. type: Boolean,
  18140. default: props$E.image.webp
  18141. },
  18142. // 过渡时间,单位ms
  18143. duration: {
  18144. type: [String, Number],
  18145. default: props$E.image.duration
  18146. },
  18147. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  18148. bgColor: {
  18149. type: String,
  18150. default: props$E.image.bgColor
  18151. }
  18152. }
  18153. };
  18154. const _sfc_main$11 = {
  18155. name: "u-image",
  18156. mixins: [mpMixin, mixin, props$8],
  18157. data() {
  18158. return {
  18159. // 图片是否加载错误,如果是,则显示错误占位图
  18160. isError: false,
  18161. // 初始化组件时,默认为加载中状态
  18162. loading: true,
  18163. // 不透明度,为了实现淡入淡出的效果
  18164. opacity: 1,
  18165. // 过渡时间,因为props的值无法修改,故需要一个中间值
  18166. durationTime: this.duration,
  18167. // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
  18168. backgroundStyle: {},
  18169. // 用于fade模式的控制组件显示与否
  18170. show: false
  18171. };
  18172. },
  18173. watch: {
  18174. src: {
  18175. immediate: true,
  18176. handler(n) {
  18177. if (!n) {
  18178. this.isError = true;
  18179. } else {
  18180. this.isError = false;
  18181. this.loading = true;
  18182. }
  18183. }
  18184. }
  18185. },
  18186. computed: {
  18187. wrapStyle() {
  18188. let style = {};
  18189. style.width = this.$u.addUnit(this.width);
  18190. style.height = this.$u.addUnit(this.height);
  18191. style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius);
  18192. style.overflow = this.radius > 0 ? "hidden" : "visible";
  18193. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  18194. }
  18195. },
  18196. mounted() {
  18197. this.show = true;
  18198. },
  18199. emits: ["click", "error", "load"],
  18200. methods: {
  18201. // 点击图片
  18202. onClick() {
  18203. this.$emit("click");
  18204. },
  18205. // 图片加载失败
  18206. onErrorHandler(err) {
  18207. this.loading = false;
  18208. this.isError = true;
  18209. this.$emit("error", err);
  18210. },
  18211. // 图片加载完成,标记loading结束
  18212. onLoadHandler(event) {
  18213. this.loading = false;
  18214. this.isError = false;
  18215. this.$emit("load", event);
  18216. this.removeBgColor();
  18217. },
  18218. // 移除图片的背景色
  18219. removeBgColor() {
  18220. this.backgroundStyle = {
  18221. backgroundColor: "transparent"
  18222. };
  18223. }
  18224. }
  18225. };
  18226. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  18227. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18228. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  18229. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  18230. mode: "fade",
  18231. show: $data.show,
  18232. duration: _ctx.fade ? 1e3 : 0
  18233. }, {
  18234. default: vue.withCtx(() => [
  18235. vue.createElementVNode(
  18236. "view",
  18237. {
  18238. class: "u-image",
  18239. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
  18240. style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
  18241. },
  18242. [
  18243. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  18244. key: 0,
  18245. src: _ctx.src,
  18246. mode: _ctx.mode,
  18247. onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
  18248. onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
  18249. "show-menu-by-longpress": _ctx.showMenuByLongpress,
  18250. "lazy-load": _ctx.lazyLoad,
  18251. class: "u-image__image",
  18252. style: vue.normalizeStyle({
  18253. borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius),
  18254. width: _ctx.$u.addUnit(_ctx.width),
  18255. height: _ctx.$u.addUnit(_ctx.height)
  18256. })
  18257. }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
  18258. _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  18259. "view",
  18260. {
  18261. key: 1,
  18262. class: "u-image__loading",
  18263. style: vue.normalizeStyle({
  18264. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18265. backgroundColor: this.bgColor,
  18266. width: _ctx.$u.addUnit(_ctx.width),
  18267. height: _ctx.$u.addUnit(_ctx.height)
  18268. })
  18269. },
  18270. [
  18271. vue.renderSlot(_ctx.$slots, "loading", {}, () => [
  18272. vue.createVNode(_component_u_icon, {
  18273. name: _ctx.loadingIcon,
  18274. width: _ctx.width,
  18275. height: _ctx.height
  18276. }, null, 8, ["name", "width", "height"])
  18277. ], true)
  18278. ],
  18279. 4
  18280. /* STYLE */
  18281. )) : vue.createCommentVNode("v-if", true),
  18282. _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
  18283. "view",
  18284. {
  18285. key: 2,
  18286. class: "u-image__error",
  18287. style: vue.normalizeStyle({
  18288. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18289. width: _ctx.$u.addUnit(_ctx.width),
  18290. height: _ctx.$u.addUnit(_ctx.height)
  18291. })
  18292. },
  18293. [
  18294. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  18295. vue.createVNode(_component_u_icon, {
  18296. name: _ctx.errorIcon,
  18297. width: _ctx.width,
  18298. height: _ctx.height
  18299. }, null, 8, ["name", "width", "height"])
  18300. ], true)
  18301. ],
  18302. 4
  18303. /* STYLE */
  18304. )) : vue.createCommentVNode("v-if", true)
  18305. ],
  18306. 4
  18307. /* STYLE */
  18308. )
  18309. ]),
  18310. _: 3
  18311. /* FORWARDED */
  18312. }, 8, ["show", "duration"]);
  18313. }
  18314. 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"]]);
  18315. const _sfc_main$10 = {
  18316. __name: "FileInfo",
  18317. props: {
  18318. orderId: {
  18319. type: String,
  18320. default: ""
  18321. },
  18322. annexType: {
  18323. type: Number,
  18324. default: 1
  18325. },
  18326. isbn: {
  18327. type: String,
  18328. default: ""
  18329. }
  18330. },
  18331. setup(__props, { expose: __expose }) {
  18332. __expose();
  18333. const form = vue.ref({
  18334. imgInfo: [],
  18335. remark: ""
  18336. });
  18337. const props2 = __props;
  18338. const fileList = vue.ref([]);
  18339. function getFileList() {
  18340. uni.$u.http.get("/app/orderinfo/getOrderAnnexList", {
  18341. params: {
  18342. orderId: props2.orderId,
  18343. annexType: props2.annexType,
  18344. isbn: props2.isbn
  18345. }
  18346. }).then((res2) => {
  18347. if (res2.code == 200) {
  18348. fileList.value = res2.data;
  18349. }
  18350. });
  18351. }
  18352. getFileList();
  18353. const handleUpload = () => {
  18354. formatAppLog("log", "at pages/index/detail/components/FileInfo.vue:73", form.value);
  18355. let data = {
  18356. orderId: props2.orderId,
  18357. annexType: props2.annexType,
  18358. isbn: props2.isbn,
  18359. ...form.value
  18360. };
  18361. uni.$u.http.post("/app/orderinfo/setOrderAnnex", data).then((res2) => {
  18362. if (res2.code == 200) {
  18363. uni.$u.toast("上传成功");
  18364. form.value.imgInfo = [];
  18365. form.value.remark = "";
  18366. getFileList();
  18367. } else {
  18368. uni.$u.toast(res2.msg);
  18369. }
  18370. });
  18371. };
  18372. const __returned__ = { form, props: props2, fileList, getFileList, handleUpload, ref: vue.ref, cyUpload };
  18373. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18374. return __returned__;
  18375. }
  18376. };
  18377. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  18378. var _a;
  18379. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  18380. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  18381. const _component_u_image = resolveEasycom(vue.resolveDynamicComponent("u-image"), __easycom_2$1);
  18382. return vue.openBlock(), vue.createElementBlock("view", { class: "file-info bg-white" }, [
  18383. vue.createElementVNode("view", { class: "file-info-container" }, [
  18384. vue.createVNode($setup["cyUpload"], {
  18385. filename: $setup.form.imgInfo,
  18386. "onUpdate:filename": _cache[0] || (_cache[0] = ($event) => $setup.form.imgInfo = $event),
  18387. limit: 3
  18388. }, null, 8, ["filename"]),
  18389. vue.createVNode(_component_u_textarea, {
  18390. modelValue: $setup.form.remark,
  18391. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  18392. placeholder: "上传说明...",
  18393. autoHeight: "",
  18394. style: { "min-height": "60px" }
  18395. }, null, 8, ["modelValue"]),
  18396. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-c" }, [
  18397. vue.createVNode(_component_u_button, {
  18398. class: "mt-24",
  18399. type: "primary",
  18400. onClick: $setup.handleUpload
  18401. }, {
  18402. default: vue.withCtx(() => [
  18403. vue.createTextVNode("上传(最多上传3张)")
  18404. ]),
  18405. _: 1
  18406. /* STABLE */
  18407. })
  18408. ])
  18409. ]),
  18410. vue.createElementVNode("view", { class: "file-info-list" }, [
  18411. vue.createElementVNode("view", { class: "file-info-list-title text-center" }, "已上传记录"),
  18412. !((_a = $setup.fileList) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  18413. key: 0,
  18414. class: "file-info-list-content mt-24 mb-24 text-center"
  18415. }, "还没有上传记录")) : (vue.openBlock(true), vue.createElementBlock(
  18416. vue.Fragment,
  18417. { key: 1 },
  18418. vue.renderList($setup.fileList, (item) => {
  18419. return vue.openBlock(), vue.createElementBlock("view", {
  18420. class: "file-info-item",
  18421. key: item.id
  18422. }, [
  18423. vue.createElementVNode("view", { class: "file-info-item-img flex flex-a-c" }, [
  18424. (vue.openBlock(true), vue.createElementBlock(
  18425. vue.Fragment,
  18426. null,
  18427. vue.renderList(item.imgInfo, (img) => {
  18428. return vue.openBlock(), vue.createBlock(_component_u_image, {
  18429. src: img,
  18430. width: "90",
  18431. height: "90",
  18432. style: { "margin-right": "10px" }
  18433. }, null, 8, ["src"]);
  18434. }),
  18435. 256
  18436. /* UNKEYED_FRAGMENT */
  18437. ))
  18438. ]),
  18439. vue.createElementVNode("view", { class: "file-info-item-info mt-10 font-14" }, [
  18440. vue.createElementVNode(
  18441. "view",
  18442. { class: "file-info-item-info-name" },
  18443. "上传说明:" + vue.toDisplayString(item.remark),
  18444. 1
  18445. /* TEXT */
  18446. ),
  18447. vue.createElementVNode("view", { class: "file-info-item-info-name mt-10" }, [
  18448. vue.createElementVNode(
  18449. "text",
  18450. null,
  18451. vue.toDisplayString(item.createTime),
  18452. 1
  18453. /* TEXT */
  18454. ),
  18455. vue.createElementVNode(
  18456. "text",
  18457. { class: "ml-20" },
  18458. vue.toDisplayString(item.createName),
  18459. 1
  18460. /* TEXT */
  18461. )
  18462. ])
  18463. ])
  18464. ]);
  18465. }),
  18466. 128
  18467. /* KEYED_FRAGMENT */
  18468. ))
  18469. ])
  18470. ]);
  18471. }
  18472. 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"]]);
  18473. const _sfc_main$$ = {
  18474. __name: "index",
  18475. setup(__props, { expose: __expose }) {
  18476. __expose();
  18477. const showAuditorSelector = vue.ref(false);
  18478. const selectedAuditor = vue.ref({});
  18479. const handleAuditorSelected = (auditor) => {
  18480. selectedAuditor.value = auditor;
  18481. orderDetail.value.auditUserId = auditor.userId;
  18482. orderDetail.value.auditUserName = auditor.userName;
  18483. uni.setStorageSync("checkUserInfo", {
  18484. userName: auditor.userName,
  18485. userId: auditor.userId
  18486. });
  18487. };
  18488. const toView = vue.ref("");
  18489. function scrollToView(to) {
  18490. toView.value = to;
  18491. uni.pageScrollTo({
  18492. selector: "#" + to,
  18493. duration: 200
  18494. });
  18495. }
  18496. function scrollToTop() {
  18497. uni.pageScrollTo({
  18498. top: 0,
  18499. duration: 200
  18500. });
  18501. }
  18502. function handleBindCode() {
  18503. uni.$u.toast("暂无开发");
  18504. }
  18505. const list = vue.ref(["图书清单", "物流信息", "上传附件"]);
  18506. const current = vue.ref(0);
  18507. const handleSectionChange = (index2) => {
  18508. current.value = index2;
  18509. };
  18510. const allLetters = vue.ref([]);
  18511. function onGetAllFirstLetter(data) {
  18512. allLetters.value = data;
  18513. }
  18514. function handleLogisticsConfirm() {
  18515. uni.showModal({
  18516. title: "提示",
  18517. content: "是否确认物流签收?",
  18518. success: (res2) => {
  18519. if (res2.confirm) {
  18520. uni.showLoading({ title: "加载中...", mask: true });
  18521. uni.$u.http.post("/app/orderinfo/signLogistics", {
  18522. searchType: 1,
  18523. search: orderDetail.value.orderId
  18524. }).then((res3) => {
  18525. if (res3.code == 200) {
  18526. uni.showToast({ title: "签收成功", icon: "none" });
  18527. uni.$u.ttsModule.speak("签收成功");
  18528. uni.navigateBack();
  18529. }
  18530. }).finally(() => {
  18531. uni.hideLoading();
  18532. });
  18533. }
  18534. }
  18535. });
  18536. }
  18537. function handleConfirm() {
  18538. uni.showLoading({ title: "加载中...", mask: true });
  18539. uni.$u.http.post("/app/orderinfo/confirmOrder", {
  18540. searchType: 1,
  18541. search: orderDetail.value.orderId
  18542. }).then((res2) => {
  18543. if (res2.code == 200) {
  18544. uni.showToast({ title: "确认收货成功", icon: "none" });
  18545. uni.$u.ttsModule.speak("确认收货成功");
  18546. getOrderDetail();
  18547. }
  18548. }).finally(() => {
  18549. uni.hideLoading();
  18550. });
  18551. }
  18552. function handleComplete() {
  18553. let bookList = orderDetail.value.detailVoList;
  18554. let bool = bookList.some((item) => {
  18555. var _a;
  18556. return ((_a = item.auditCommentList) == null ? void 0 : _a.length) < item.num;
  18557. });
  18558. if (bool) {
  18559. let text = "还有未审核的书";
  18560. uni.$u.toast(text);
  18561. uni.$u.ttsModule.speak(text);
  18562. return;
  18563. } else {
  18564. uni.$u.http.post("/app/orderinfo/checkOrderFinish", {
  18565. checkUserId: orderDetail.value.auditUserId,
  18566. orderId: orderDetail.value.orderId
  18567. }).then((res2) => {
  18568. if (res2.code == 200) {
  18569. uni.showToast({ title: "审核完成", icon: "none" });
  18570. uni.$u.ttsModule.speak("审核完成");
  18571. uni.navigateBack();
  18572. }
  18573. });
  18574. }
  18575. }
  18576. const orderDetail = vue.ref({ status: 0 });
  18577. function getOrderDetail() {
  18578. if (!orderId.value)
  18579. return;
  18580. uni.showLoading({
  18581. title: "加载中...",
  18582. mask: true
  18583. });
  18584. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  18585. params: {
  18586. searchType: 1,
  18587. search: orderId.value
  18588. }
  18589. }).then((res2) => {
  18590. if (res2.code == 200) {
  18591. orderDetail.value = res2.data;
  18592. getCheckUserInfo();
  18593. if (res2.data.auditUserId) {
  18594. let auditUserInfo = {
  18595. userName: res2.data.auditUserName,
  18596. userId: res2.data.auditUserId
  18597. };
  18598. uni.setStorageSync("checkUserInfo", auditUserInfo);
  18599. } else {
  18600. let userInfo = uni.getStorageSync("checkUserInfo");
  18601. orderDetail.value.auditUserName = userInfo.userName;
  18602. orderDetail.value.auditUserId = userInfo.userId;
  18603. }
  18604. if (isOnLoad.value) {
  18605. if (res2.data.manageRemark.length > 0 && res2.data.status < 10) {
  18606. uni.$u.ttsModule.speak("此订单有备注信息,请注意查看");
  18607. }
  18608. if (res2.data.warnArea && res2.data.warnArea.length > 0) {
  18609. let text = `此订单来源于${res2.data.warnArea}`;
  18610. uni.$u.ttsModule.speak(text);
  18611. }
  18612. isOnLoad.value = false;
  18613. }
  18614. } else {
  18615. uni.$u.toast(res2.msg);
  18616. }
  18617. }).finally(() => {
  18618. uni.hideLoading();
  18619. });
  18620. }
  18621. function getCheckUserInfo() {
  18622. uni.$u.http.get("/app/orderinfo/getCheckUser").then((res2) => {
  18623. if (res2.code == 200) {
  18624. let userInfo = res2.data;
  18625. orderDetail.value.auditUserName = userInfo.userName;
  18626. orderDetail.value.auditUserId = userInfo.userId;
  18627. uni.setStorageSync("checkUserInfo", {
  18628. userName: userInfo.userName,
  18629. userId: userInfo.userId
  18630. });
  18631. }
  18632. });
  18633. }
  18634. function checkIsbn(isbn) {
  18635. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  18636. if (isbn13Regex.test(isbn)) {
  18637. return true;
  18638. }
  18639. return false;
  18640. }
  18641. function handleScan(isbn) {
  18642. if (!checkIsbn(isbn)) {
  18643. let text = `不是正确的ISBN码`;
  18644. uni.$u.ttsModule.speak(text);
  18645. return;
  18646. }
  18647. if (orderDetail.value.status >= 10) {
  18648. uni.$u.ttsModule.speak("订单已审核完成");
  18649. return;
  18650. }
  18651. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  18652. if (isbns.includes(isbn)) {
  18653. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  18654. if (book.suit == 1) {
  18655. let text = `${isbn}请注意套装书是否齐全`;
  18656. uni.$u.ttsModule.speak(text);
  18657. }
  18658. if (book.bookWarn == 1) {
  18659. let text = `请注意${isbn}需要取出`;
  18660. uni.$u.ttsModule.speak(text);
  18661. }
  18662. uni.navigateTo({
  18663. url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
  18664. });
  18665. uni.setStorageSync("auditBook", book);
  18666. uni.setStorageSync("orderDetail", orderDetail.value);
  18667. } else {
  18668. let text = `此订单中不存在${isbn}这本书 `;
  18669. uni.$u.ttsModule.speak(text);
  18670. }
  18671. }
  18672. function handleScanCode() {
  18673. uni.scanCode({
  18674. success: (res2) => {
  18675. res2.result && handleScan(res2.result);
  18676. }
  18677. });
  18678. }
  18679. const orderId = vue.ref("");
  18680. const isOnLoad = vue.ref(false);
  18681. const type2 = vue.ref(1);
  18682. onLoad((option) => {
  18683. orderId.value = option.id;
  18684. getOrderDetail();
  18685. isOnLoad.value = true;
  18686. type2.value = option.type || 1;
  18687. uni.removeStorageSync("scannedBooks");
  18688. uni.$u.useGlobalEvent((e) => {
  18689. if (e.barcode) {
  18690. handleScan(e.barcode);
  18691. }
  18692. });
  18693. });
  18694. onShow(() => {
  18695. uni.$u.updateActivePageOnShow();
  18696. getOrderDetail();
  18697. });
  18698. const __returned__ = { showAuditorSelector, selectedAuditor, handleAuditorSelected, toView, scrollToView, scrollToTop, handleBindCode, list, current, handleSectionChange, allLetters, onGetAllFirstLetter, handleLogisticsConfirm, handleConfirm, handleComplete, orderDetail, getOrderDetail, getCheckUserInfo, checkIsbn, handleScan, handleScanCode, orderId, isOnLoad, type: type2, ref: vue.ref, get onLoad() {
  18699. return onLoad;
  18700. }, get onShow() {
  18701. return onShow;
  18702. }, AuditorSelector, OrderInfo, UserInfoCard, LogisticsTimeline, BookInfo, FileInfo };
  18703. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18704. return __returned__;
  18705. }
  18706. };
  18707. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  18708. var _a;
  18709. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  18710. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18711. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  18712. return vue.openBlock(), vue.createElementBlock(
  18713. "view",
  18714. {
  18715. class: vue.normalizeClass(["order-detail", { "fixed-bottom-2": $setup.type == 2 }])
  18716. },
  18717. [
  18718. vue.createElementVNode("scroll-view", {
  18719. class: "scroller",
  18720. "scroll-into-view": $setup.toView,
  18721. "scroll-y": "true",
  18722. "scroll-with-animation": "true"
  18723. }, [
  18724. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-b bg-white bind-audit mb-16" }, [
  18725. vue.createElementVNode("text", null, "绑定审核员"),
  18726. vue.createElementVNode(
  18727. "text",
  18728. { class: "text-center flex-1" },
  18729. vue.toDisplayString($setup.orderDetail.auditUserName || ((_a = $setup.selectedAuditor) == null ? void 0 : _a.userName) || ""),
  18730. 1
  18731. /* TEXT */
  18732. ),
  18733. vue.createElementVNode("text", {
  18734. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showAuditorSelector = true),
  18735. class: "color-primary"
  18736. }, "绑定")
  18737. ]),
  18738. vue.createVNode($setup["OrderInfo"], {
  18739. detail: $setup.orderDetail,
  18740. onRefresh: $setup.getOrderDetail
  18741. }, null, 8, ["detail"]),
  18742. vue.createVNode($setup["UserInfoCard"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  18743. vue.createElementVNode("view", {
  18744. class: "mt-16",
  18745. style: { "padding": "0 6rpx" }
  18746. }, [
  18747. vue.createVNode(_component_u_subsection, {
  18748. list: $setup.list,
  18749. mode: "subsection",
  18750. current: $setup.current,
  18751. onChange: $setup.handleSectionChange
  18752. }, null, 8, ["list", "current"]),
  18753. $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["BookInfo"], {
  18754. key: 0,
  18755. bookList: $setup.orderDetail.detailVoList,
  18756. detail: $setup.orderDetail,
  18757. onGetAllFirstLetter: $setup.onGetAllFirstLetter
  18758. }, null, 8, ["bookList", "detail"])) : vue.createCommentVNode("v-if", true),
  18759. $setup.current == 1 ? (vue.openBlock(), vue.createBlock($setup["LogisticsTimeline"], {
  18760. key: 1,
  18761. list: $setup.orderDetail.trackingVoList
  18762. }, null, 8, ["list"])) : vue.createCommentVNode("v-if", true),
  18763. $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
  18764. key: 2,
  18765. orderId: $setup.orderDetail.orderId
  18766. }, null, 8, ["orderId"])) : vue.createCommentVNode("v-if", true)
  18767. ])
  18768. ], 8, ["scroll-into-view"]),
  18769. vue.createElementVNode("view", { class: "fixed-left" }, [
  18770. vue.createElementVNode("view", {
  18771. class: "bind-code common-bg",
  18772. style: { "margin-bottom": "30px", "padding": "20rpx" },
  18773. onClick: $setup.handleBindCode
  18774. }, "绑码 "),
  18775. vue.createElementVNode("view", { class: "common-bg flex flex-a-c flex-j-c flex-d" }, [
  18776. vue.createElementVNode("view", {
  18777. class: "book-status-item",
  18778. onClick: _cache[1] || (_cache[1] = ($event) => $setup.scrollToView("good"))
  18779. }, "良好"),
  18780. vue.createElementVNode("view", {
  18781. class: "book-status-item item-center",
  18782. onClick: _cache[2] || (_cache[2] = ($event) => $setup.scrollToView("average"))
  18783. }, "一般"),
  18784. vue.createElementVNode("view", {
  18785. class: "book-status-item",
  18786. onClick: _cache[3] || (_cache[3] = ($event) => $setup.scrollToView("poor"))
  18787. }, "极差")
  18788. ])
  18789. ]),
  18790. vue.createElementVNode("view", { class: "fixed-right" }, [
  18791. vue.createElementVNode("view", { class: "letter-bg flex flex-a-c flex-j-c flex-d" }, [
  18792. vue.createElementVNode("view", { class: "letter-item" }, [
  18793. vue.createVNode(_component_u_icon, {
  18794. name: "arrow-up-fill",
  18795. size: "20",
  18796. color: "#ffffff",
  18797. onClick: $setup.scrollToTop
  18798. })
  18799. ]),
  18800. (vue.openBlock(true), vue.createElementBlock(
  18801. vue.Fragment,
  18802. null,
  18803. vue.renderList($setup.allLetters, (item) => {
  18804. return vue.openBlock(), vue.createElementBlock("view", {
  18805. class: "letter-item",
  18806. onClick: ($event) => $setup.scrollToView(item)
  18807. }, vue.toDisplayString(item), 9, ["onClick"]);
  18808. }),
  18809. 256
  18810. /* UNKEYED_FRAGMENT */
  18811. ))
  18812. ])
  18813. ]),
  18814. $setup.type != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  18815. key: 0,
  18816. class: "common-bg fixed-bottom"
  18817. }, [
  18818. $setup.orderDetail.status == 5 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18819. key: 0,
  18820. type: "warning",
  18821. size: "large",
  18822. onClick: $setup.handleLogisticsConfirm
  18823. }, {
  18824. default: vue.withCtx(() => [
  18825. vue.createTextVNode("物流签收")
  18826. ]),
  18827. _: 1
  18828. /* STABLE */
  18829. })) : vue.createCommentVNode("v-if", true),
  18830. $setup.orderDetail.status == 6 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18831. key: 1,
  18832. type: "primary",
  18833. size: "large",
  18834. onClick: $setup.handleConfirm
  18835. }, {
  18836. default: vue.withCtx(() => [
  18837. vue.createTextVNode("确认收货")
  18838. ]),
  18839. _: 1
  18840. /* STABLE */
  18841. })) : vue.createCommentVNode("v-if", true),
  18842. $setup.orderDetail.status == 8 || $setup.orderDetail.status == 9 || $setup.orderDetail.status == 10 ? (vue.openBlock(), vue.createElementBlock(
  18843. vue.Fragment,
  18844. { key: 2 },
  18845. [
  18846. vue.createVNode(_component_u_button, {
  18847. type: "warning",
  18848. size: "large",
  18849. onClick: $setup.handleScanCode
  18850. }, {
  18851. default: vue.withCtx(() => [
  18852. vue.createTextVNode("扫码")
  18853. ]),
  18854. _: 1
  18855. /* STABLE */
  18856. }),
  18857. vue.createVNode(_component_u_button, {
  18858. type: "primary",
  18859. size: "large",
  18860. onClick: $setup.handleComplete
  18861. }, {
  18862. default: vue.withCtx(() => [
  18863. vue.createTextVNode("完成")
  18864. ]),
  18865. _: 1
  18866. /* STABLE */
  18867. })
  18868. ],
  18869. 64
  18870. /* STABLE_FRAGMENT */
  18871. )) : vue.createCommentVNode("v-if", true)
  18872. ])) : vue.createCommentVNode("v-if", true),
  18873. vue.createVNode($setup["AuditorSelector"], {
  18874. show: $setup.showAuditorSelector,
  18875. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showAuditorSelector = $event),
  18876. onAuditorSelected: $setup.handleAuditorSelected
  18877. }, null, 8, ["show"])
  18878. ],
  18879. 2
  18880. /* CLASS */
  18881. );
  18882. }
  18883. const PagesIndexDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-8b10f148"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/index.vue"]]);
  18884. const _sfc_main$_ = {
  18885. __name: "AuditInfo",
  18886. props: {
  18887. detail: {
  18888. type: Object,
  18889. default: () => ({})
  18890. },
  18891. auditList: {
  18892. type: Array,
  18893. default: () => []
  18894. }
  18895. },
  18896. emits: ["selected"],
  18897. setup(__props, { expose: __expose, emit: __emit }) {
  18898. const props2 = __props;
  18899. const auditCommentList = vue.ref([]);
  18900. const initAuditList = (detail) => {
  18901. if (!(detail == null ? void 0 : detail.auditCommentList))
  18902. return;
  18903. auditCommentList.value = detail.auditCommentList.map((item, index2) => ({
  18904. ...item,
  18905. idx: index2,
  18906. isbn: detail.isbn,
  18907. comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
  18908. }));
  18909. sortByAuditStatus();
  18910. };
  18911. vue.watch(
  18912. () => props2.detail,
  18913. () => {
  18914. initAuditList(props2.detail);
  18915. },
  18916. { deep: true, immediate: true }
  18917. );
  18918. const auditList = vue.ref([
  18919. { sts: 1, label: "品相良好" },
  18920. { sts: 2, label: "品相一般", disabled: true },
  18921. { sts: 3, label: "品相极差" }
  18922. ]);
  18923. const emit2 = __emit;
  18924. const radioClick = (audit, index2, sts) => {
  18925. if (sts == 2)
  18926. return;
  18927. audit.sts = sts;
  18928. if (sts == 1) {
  18929. audit.comList = [];
  18930. }
  18931. auditCommentList.value[index2] = audit;
  18932. formatReason();
  18933. };
  18934. const getAuditCateNum = (cate) => {
  18935. var _a, _b;
  18936. return ((_b = (_a = props2.detail.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == cate)) == null ? void 0 : _b.length) || 0;
  18937. };
  18938. let reasonList = vue.ref([
  18939. { sts: 3, label: "明显泛黄水印/发霉/明显异味" },
  18940. { sts: 3, label: "老化泛黄褪色/污渍" },
  18941. { sts: 3, label: "明显破损/脱胶缺页/书籍变型" },
  18942. { sts: 3, label: "无此书" },
  18943. { sts: 3, label: "印刷不清晰" },
  18944. { sts: 3, label: "无防伪" },
  18945. { sts: 3, label: "无外护封/无ISBN" },
  18946. { sts: 3, label: "无此书多其他书" },
  18947. { sts: 3, label: "笔记杂乱/习题做完" },
  18948. { sts: 3, label: "有笔记贴" },
  18949. { sts: 3, label: "套装缺册" },
  18950. { sts: 3, label: "听力无光盘" },
  18951. { sts: 3, label: "图书馆/藏书印章" }
  18952. ]);
  18953. const formatReason = () => {
  18954. let list = auditCommentList.value.map((item, index2) => ({
  18955. ...item,
  18956. idx: index2,
  18957. com: item.comList.join(",")
  18958. }));
  18959. return list;
  18960. };
  18961. const toggleReason = (audit, index2, item) => {
  18962. const idx = audit.comList.indexOf(item.label);
  18963. if (idx > -1) {
  18964. audit.comList.splice(idx, 1);
  18965. } else {
  18966. audit.comList.push(item.label);
  18967. }
  18968. auditCommentList.value[index2] = audit;
  18969. };
  18970. const sortByAuditStatus = () => {
  18971. const sortedList = [...auditCommentList.value];
  18972. sortedList.sort((a, b) => {
  18973. if (a.sts === 0 && (b.sts === 1 || b.sts === 3)) {
  18974. return -1;
  18975. }
  18976. if (b.sts === 0 && (a.sts === 1 || a.sts === 3)) {
  18977. return 1;
  18978. }
  18979. return 0;
  18980. });
  18981. auditCommentList.value = sortedList;
  18982. return sortedList;
  18983. };
  18984. __expose({
  18985. formatReason,
  18986. initAuditList,
  18987. sortByAuditStatus
  18988. });
  18989. const __returned__ = { props: props2, auditCommentList, initAuditList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
  18990. return reasonList;
  18991. }, set reasonList(v) {
  18992. reasonList = v;
  18993. }, formatReason, toggleReason, sortByAuditStatus, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, onMounted: vue.onMounted };
  18994. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18995. return __returned__;
  18996. }
  18997. };
  18998. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  18999. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  19000. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19001. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-info" }, [
  19002. vue.createElementVNode(
  19003. "view",
  19004. {
  19005. class: "font-bold mt-16",
  19006. style: { "padding": "0 20rpx" }
  19007. },
  19008. " 该书共" + vue.toDisplayString($props.detail.num) + "本,其中:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般" + vue.toDisplayString($setup.getAuditCateNum(2)) + "本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  19009. 1
  19010. /* TEXT */
  19011. ),
  19012. $setup.auditCommentList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  19013. vue.Fragment,
  19014. { key: 0 },
  19015. vue.renderList($setup.auditCommentList, (audit, index2) => {
  19016. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  19017. vue.createElementVNode(
  19018. "view",
  19019. {
  19020. class: "mt-10 bind-code",
  19021. style: { "padding": "10rpx 20rpx" }
  19022. },
  19023. " 第" + vue.toDisplayString(index2 + 1) + "本的审核意见 ",
  19024. 1
  19025. /* TEXT */
  19026. ),
  19027. vue.createElementVNode("view", {
  19028. class: "mt-20 bg-white flex flex-j-a flex-a-c",
  19029. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19030. }, [
  19031. (vue.openBlock(true), vue.createElementBlock(
  19032. vue.Fragment,
  19033. null,
  19034. vue.renderList($setup.auditList, (item, idx) => {
  19035. return vue.openBlock(), vue.createElementBlock("view", {
  19036. class: "u-page__tag-item",
  19037. key: idx
  19038. }, [
  19039. vue.createVNode(_component_u_tag, {
  19040. size: "large",
  19041. text: item.label,
  19042. plain: audit.sts != item.sts,
  19043. type: "primary",
  19044. name: item.sts,
  19045. class: vue.normalizeClass({ disabled: item.sts == 2 }),
  19046. onClick: ($event) => $setup.radioClick(audit, index2, item.sts)
  19047. }, null, 8, ["text", "plain", "name", "class", "onClick"])
  19048. ]);
  19049. }),
  19050. 128
  19051. /* KEYED_FRAGMENT */
  19052. ))
  19053. ]),
  19054. audit.sts == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  19055. key: 0,
  19056. class: "mt-20 bg-white",
  19057. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19058. }, [
  19059. vue.createElementVNode("view", { class: "flex flex-a-c flex-wrap" }, [
  19060. (vue.openBlock(true), vue.createElementBlock(
  19061. vue.Fragment,
  19062. null,
  19063. vue.renderList($setup.reasonList, (item, idx) => {
  19064. return vue.openBlock(), vue.createElementBlock("view", {
  19065. class: vue.normalizeClass(["mr-10 reason-item", { selected: audit.comList.includes(item.label) }]),
  19066. key: idx,
  19067. onClick: ($event) => $setup.toggleReason(audit, index2, item)
  19068. }, vue.toDisplayString(item.label), 11, ["onClick"]);
  19069. }),
  19070. 128
  19071. /* KEYED_FRAGMENT */
  19072. ))
  19073. ])
  19074. ])) : vue.createCommentVNode("v-if", true)
  19075. ]);
  19076. }),
  19077. 128
  19078. /* KEYED_FRAGMENT */
  19079. )) : vue.createCommentVNode("v-if", true),
  19080. vue.createCommentVNode(" 悬浮排序按钮 "),
  19081. vue.createElementVNode("view", {
  19082. class: "floating-sort-btn",
  19083. onClick: $setup.sortByAuditStatus
  19084. }, [
  19085. vue.createVNode(_component_u_icon, {
  19086. name: "list",
  19087. color: "#FFFFFF",
  19088. size: "22"
  19089. }),
  19090. vue.createElementVNode("text", { class: "btn-text" }, "排序")
  19091. ])
  19092. ]);
  19093. }
  19094. 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"]]);
  19095. const _sfc_main$Z = {
  19096. __name: "book-audit",
  19097. setup(__props, { expose: __expose }) {
  19098. __expose();
  19099. const detail = vue.ref({});
  19100. const getBookInfo = (isbn) => {
  19101. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  19102. if (res2.code == 200) {
  19103. detail.value = res2.data;
  19104. }
  19105. });
  19106. };
  19107. const auditBook = vue.ref({});
  19108. const getBookInfoAndAuditInfo = (isbn, orderId2) => {
  19109. uni.$u.http.get(`/app/orderinfo/getBookCheckInfo?isbn=${isbn}&&orderId=${orderId2}`).then((res2) => {
  19110. if (res2.code == 200) {
  19111. auditBook.value = res2.data;
  19112. vue.nextTick(() => {
  19113. var _a;
  19114. (_a = auditInfoRef.value) == null ? void 0 : _a.initAuditList(auditBook.value);
  19115. });
  19116. }
  19117. });
  19118. };
  19119. const list = vue.ref(["图书审核", "绑码", "附件信息"]);
  19120. const current = vue.ref(0);
  19121. const handleSectionChange = (index2) => {
  19122. current.value = index2;
  19123. };
  19124. const auditData = vue.ref([]);
  19125. const handleAuditSelected = (data) => {
  19126. auditData.value = data.map((item, index2) => {
  19127. item.idx = index2;
  19128. item.com = Array.isArray(item.com) ? item.com.join(",") : item.com;
  19129. return item;
  19130. });
  19131. };
  19132. const scannedBooks = vue.ref([]);
  19133. function checkIsbn(isbn) {
  19134. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19135. if (isbn13Regex.test(isbn)) {
  19136. return true;
  19137. }
  19138. return false;
  19139. }
  19140. function handleScan(isbn) {
  19141. var _a;
  19142. if (!checkIsbn(isbn)) {
  19143. let text = `不是正确的ISBN码`;
  19144. uni.$u.ttsModule.speak(text);
  19145. return;
  19146. }
  19147. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19148. if (isbns.includes(isbn)) {
  19149. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19150. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  19151. let noAuditNum = book.auditCommentList.filter((item) => item.sts == 0).length;
  19152. formatAppLog("log", "at pages/index/detail/book-audit.vue:136", noAuditNum, "noAuditNum");
  19153. if (noAuditNum == 0) {
  19154. let text = `${isbn}已超出订单中的数量`;
  19155. uni.$u.ttsModule.speak(text);
  19156. return;
  19157. }
  19158. if (book.suit == 1) {
  19159. let text = `${isbn}请注意套装书是否齐全`;
  19160. uni.$u.ttsModule.speak(text);
  19161. }
  19162. if (book.bookWarn == 1) {
  19163. let text = `请注意${isbn}需要取出`;
  19164. uni.$u.ttsModule.speak(text);
  19165. }
  19166. scannedBooks.value.push(isbn);
  19167. uni.setStorageSync("scannedBooks", scannedBooks.value);
  19168. uni.navigateTo({
  19169. url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
  19170. });
  19171. }
  19172. } else {
  19173. let text = `此订单中不存在${isbn}这本书 `;
  19174. uni.$u.ttsModule.speak(text);
  19175. }
  19176. }
  19177. function handleScanCode() {
  19178. uni.scanCode({
  19179. success: (res2) => {
  19180. handleScan(res2.result);
  19181. }
  19182. });
  19183. }
  19184. const auditInfoRef = vue.ref();
  19185. const handleAudit = () => {
  19186. var _a;
  19187. let checkList = (_a = auditInfoRef.value) == null ? void 0 : _a.formatReason(auditData.value);
  19188. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19189. if (checkUserInfo.userId) {
  19190. checkUserId.value = checkUserInfo.userId;
  19191. } else {
  19192. uni.$u.toast("请先选择审核人");
  19193. }
  19194. let poorList = checkList.filter((item) => item.sts == 3);
  19195. if (poorList.length > 0 && !poorList.every((item) => item.com)) {
  19196. uni.$u.ttsModule.speak("请选择品相");
  19197. return;
  19198. }
  19199. uni.$u.http.post("/app/orderinfo/checkOrder", {
  19200. checkUserId: checkUserId.value,
  19201. orderId: orderId.value,
  19202. checkList
  19203. }).then((res2) => {
  19204. if (res2.code == 200) {
  19205. uni.showToast({ title: "审核成功", icon: "none" });
  19206. uni.$u.ttsModule.speak("审核成功");
  19207. uni.navigateBack();
  19208. } else {
  19209. uni.$u.toast(res2.msg);
  19210. }
  19211. });
  19212. };
  19213. const checkUserId = vue.ref();
  19214. const orderId = vue.ref();
  19215. const orderDetail = vue.ref({});
  19216. let isbnScan = vue.ref("");
  19217. onLoad((options) => {
  19218. options.isbn && getBookInfo(options.isbn);
  19219. scannedBooks.value = [options.isbn];
  19220. isbnScan.value = options.isbn;
  19221. orderId.value = options.orderId;
  19222. getBookInfoAndAuditInfo(options.isbn, options.orderId);
  19223. orderDetail.value = uni.getStorageSync("orderDetail");
  19224. uni.$u.useGlobalEvent((e) => {
  19225. if (e.barcode) {
  19226. handleScan(e.barcode);
  19227. }
  19228. });
  19229. });
  19230. onShow(() => {
  19231. var _a;
  19232. if (isbnScan.value) {
  19233. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  19234. orderDetail.value = uni.getStorageSync("orderDetail");
  19235. }
  19236. uni.$u.updateActivePageOnShow();
  19237. });
  19238. const __returned__ = { detail, getBookInfo, auditBook, getBookInfoAndAuditInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, checkUserId, orderId, orderDetail, get isbnScan() {
  19239. return isbnScan;
  19240. }, set isbnScan(v) {
  19241. isbnScan = v;
  19242. }, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
  19243. return onLoad;
  19244. }, get onShow() {
  19245. return onShow;
  19246. }, AuditInfo, FileInfo };
  19247. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19248. return __returned__;
  19249. }
  19250. };
  19251. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  19252. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  19253. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  19254. return vue.openBlock(), vue.createElementBlock("view", { class: "book-audit" }, [
  19255. vue.createElementVNode("view", {
  19256. class: "bg-white flex flex-a-c",
  19257. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19258. }, [
  19259. vue.createElementVNode("image", {
  19260. src: $setup.detail.cover,
  19261. mode: "aspectFill",
  19262. style: { "width": "80px", "height": "100px" }
  19263. }, null, 8, ["src"]),
  19264. vue.createElementVNode("view", { class: "flex flex-d flex-1 ml-20" }, [
  19265. vue.createElementVNode(
  19266. "text",
  19267. { class: "common-title mb-20" },
  19268. vue.toDisplayString($setup.detail.bookName),
  19269. 1
  19270. /* TEXT */
  19271. ),
  19272. vue.createElementVNode("text", { class: "text-sm" }, [
  19273. vue.createTextVNode("ISBN: "),
  19274. vue.createElementVNode(
  19275. "text",
  19276. { class: "color-primary" },
  19277. vue.toDisplayString($setup.detail.isbn),
  19278. 1
  19279. /* TEXT */
  19280. )
  19281. ]),
  19282. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  19283. vue.createTextVNode("作者: "),
  19284. vue.createElementVNode(
  19285. "text",
  19286. null,
  19287. vue.toDisplayString($setup.detail.author),
  19288. 1
  19289. /* TEXT */
  19290. )
  19291. ]),
  19292. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  19293. vue.createTextVNode("出版社: "),
  19294. vue.createElementVNode(
  19295. "text",
  19296. null,
  19297. vue.toDisplayString($setup.detail.publish),
  19298. 1
  19299. /* TEXT */
  19300. )
  19301. ])
  19302. ])
  19303. ]),
  19304. vue.createElementVNode("view", {
  19305. class: "mt-20 bg-white price-info",
  19306. style: { "border-radius": "10rpx" }
  19307. }, [
  19308. vue.createElementVNode("view", { class: "flex" }, [
  19309. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19310. vue.createElementVNode("text", { class: "label" }, "定价"),
  19311. vue.createElementVNode(
  19312. "text",
  19313. { class: "content" },
  19314. "¥" + vue.toDisplayString($setup.detail.price),
  19315. 1
  19316. /* TEXT */
  19317. )
  19318. ]),
  19319. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19320. vue.createElementVNode("text", { class: "label" }, "回收折扣"),
  19321. vue.createElementVNode(
  19322. "text",
  19323. { class: "content" },
  19324. vue.toDisplayString($setup.detail.recycleDiscount) + "折",
  19325. 1
  19326. /* TEXT */
  19327. )
  19328. ])
  19329. ]),
  19330. vue.createElementVNode("view", { class: "flex flex-a-c" }, [
  19331. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19332. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  19333. vue.createElementVNode(
  19334. "text",
  19335. { class: "content" },
  19336. "¥" + vue.toDisplayString($setup.auditBook.expectMoney),
  19337. 1
  19338. /* TEXT */
  19339. )
  19340. ]),
  19341. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19342. vue.createElementVNode("text", { class: "label" }, "审核金额"),
  19343. vue.createElementVNode(
  19344. "text",
  19345. { class: "content" },
  19346. "¥" + vue.toDisplayString($setup.auditBook.finalMoney || 0),
  19347. 1
  19348. /* TEXT */
  19349. )
  19350. ])
  19351. ])
  19352. ]),
  19353. vue.createElementVNode("view", { class: "mt-20" }, [
  19354. vue.createVNode(_component_u_subsection, {
  19355. list: $setup.list,
  19356. mode: "subsection",
  19357. current: $setup.current,
  19358. onChange: $setup.handleSectionChange
  19359. }, null, 8, ["list", "current"]),
  19360. vue.withDirectives(vue.createVNode($setup["AuditInfo"], {
  19361. detail: $setup.auditBook,
  19362. auditList: $setup.auditBook.auditCommentList,
  19363. ref: "auditInfoRef"
  19364. }, null, 8, ["detail", "auditList"]), [
  19365. [vue.vShow, $setup.current == 0]
  19366. ]),
  19367. vue.withDirectives(vue.createVNode($setup["FileInfo"], {
  19368. orderId: $setup.orderId,
  19369. annexType: 2,
  19370. isbn: $setup.isbnScan
  19371. }, null, 8, ["orderId", "isbn"]), [
  19372. [vue.vShow, $setup.current == 2]
  19373. ])
  19374. ]),
  19375. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19376. vue.createVNode(_component_u_button, {
  19377. type: "warning",
  19378. size: "large",
  19379. onClick: $setup.handleScanCode
  19380. }, {
  19381. default: vue.withCtx(() => [
  19382. vue.createTextVNode("扫码")
  19383. ]),
  19384. _: 1
  19385. /* STABLE */
  19386. }),
  19387. vue.createVNode(_component_u_button, {
  19388. type: "primary",
  19389. size: "large",
  19390. onClick: $setup.handleAudit
  19391. }, {
  19392. default: vue.withCtx(() => [
  19393. vue.createTextVNode("确定")
  19394. ]),
  19395. _: 1
  19396. /* STABLE */
  19397. })
  19398. ])
  19399. ]);
  19400. }
  19401. 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"]]);
  19402. const _sfc_main$Y = {
  19403. __name: "BookItem2",
  19404. props: {
  19405. item: Object,
  19406. showClose: {
  19407. type: Boolean,
  19408. default: false
  19409. }
  19410. },
  19411. emits: ["close"],
  19412. setup(__props, { expose: __expose, emit: __emit }) {
  19413. __expose();
  19414. const props2 = __props;
  19415. const emit2 = __emit;
  19416. const handleClose = () => {
  19417. emit2("close", props2.item.isbn);
  19418. };
  19419. const __returned__ = { props: props2, emit: emit2, handleClose, computed: vue.computed };
  19420. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19421. return __returned__;
  19422. }
  19423. };
  19424. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  19425. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19426. return vue.openBlock(), vue.createElementBlock(
  19427. "view",
  19428. {
  19429. class: vue.normalizeClass(["card", { "card-close": $props.showClose }])
  19430. },
  19431. [
  19432. vue.createElementVNode("view", { class: "flex w100" }, [
  19433. vue.createElementVNode("view", { class: "flex-d" }, [
  19434. vue.createElementVNode("image", {
  19435. style: { "width": "70px", "height": "90px" },
  19436. src: $props.item.cover,
  19437. mode: "aspectFill"
  19438. }, null, 8, ["src"]),
  19439. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  19440. "view",
  19441. {
  19442. key: 0,
  19443. class: "quantity mt-24"
  19444. },
  19445. "数量: " + vue.toDisplayString($props.item.num),
  19446. 1
  19447. /* TEXT */
  19448. )) : vue.createCommentVNode("v-if", true)
  19449. ]),
  19450. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  19451. vue.createElementVNode(
  19452. "view",
  19453. { class: "common-title mb-20" },
  19454. vue.toDisplayString($props.item.bookName),
  19455. 1
  19456. /* TEXT */
  19457. ),
  19458. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19459. vue.createElementVNode(
  19460. "view",
  19461. { class: "isbn" },
  19462. "ISBN: " + vue.toDisplayString($props.item.isbn),
  19463. 1
  19464. /* TEXT */
  19465. ),
  19466. vue.createElementVNode(
  19467. "view",
  19468. { class: "set" },
  19469. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  19470. 1
  19471. /* TEXT */
  19472. )
  19473. ]),
  19474. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19475. vue.createElementVNode(
  19476. "view",
  19477. { class: "price" },
  19478. "定价: " + vue.toDisplayString($props.item.price),
  19479. 1
  19480. /* TEXT */
  19481. ),
  19482. vue.createElementVNode(
  19483. "view",
  19484. { class: "estimate" },
  19485. "预估单价: " + vue.toDisplayString($props.item.expectMoney || 0),
  19486. 1
  19487. /* TEXT */
  19488. )
  19489. ]),
  19490. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19491. vue.createElementVNode(
  19492. "view",
  19493. { class: "discount" },
  19494. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  19495. 1
  19496. /* TEXT */
  19497. ),
  19498. vue.createElementVNode("view", { class: "review" }, [
  19499. vue.createTextVNode("审核金额: "),
  19500. vue.createElementVNode(
  19501. "text",
  19502. { class: "color-red" },
  19503. vue.toDisplayString($props.item.review || 0),
  19504. 1
  19505. /* TEXT */
  19506. )
  19507. ])
  19508. ])
  19509. ])
  19510. ]),
  19511. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  19512. key: 0,
  19513. class: "quantity-icon mt-24"
  19514. }, [
  19515. vue.createVNode(_component_u_icon, {
  19516. name: "close-circle-fill",
  19517. size: "18",
  19518. color: "#999",
  19519. onClick: $setup.handleClose
  19520. })
  19521. ])) : vue.createCommentVNode("v-if", true)
  19522. ],
  19523. 2
  19524. /* CLASS */
  19525. );
  19526. }
  19527. 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"]]);
  19528. const _sfc_main$X = {
  19529. __name: "batch-audit",
  19530. setup(__props, { expose: __expose }) {
  19531. __expose();
  19532. const detailMap = vue.ref({});
  19533. const scannedBooksDetail = vue.ref([]);
  19534. const getBookInfo = (isbn) => {
  19535. if (detailMap.value[isbn]) {
  19536. scannedBooksDetail.value.push(detailMap.value[isbn]);
  19537. return;
  19538. }
  19539. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  19540. if (res2.code == 200) {
  19541. detailMap.value[isbn] = res2.data;
  19542. scannedBooksDetail.value.push(res2.data);
  19543. }
  19544. });
  19545. };
  19546. const handleClose = (index2, isbn) => {
  19547. scannedBooksDetail.value.splice(index2, 1);
  19548. scannedBooks.value = scannedBooks.value.filter((item) => item != isbn);
  19549. };
  19550. function checkIsbn(isbn) {
  19551. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19552. if (isbn13Regex.test(isbn)) {
  19553. return true;
  19554. }
  19555. return false;
  19556. }
  19557. const scannedBooks = vue.ref([]);
  19558. function handleScan(isbn) {
  19559. var _a;
  19560. if (!checkIsbn(isbn)) {
  19561. let text = `不是正确的ISBN码`;
  19562. uni.$u.ttsModule.speak(text);
  19563. return;
  19564. }
  19565. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19566. if (isbns.includes(isbn)) {
  19567. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19568. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  19569. let notAuditNum = book.auditCommentList.filter((item) => item.sts === 0).length || 0;
  19570. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  19571. if (scannedNum >= notAuditNum) {
  19572. let text = `${isbn}已超出订单中的数量`;
  19573. return uni.$u.ttsModule.speak(text);
  19574. } else {
  19575. if (book.suit == 1) {
  19576. let text = `${isbn}请注意套装书是否齐全`;
  19577. uni.$u.ttsModule.speak(text);
  19578. }
  19579. if (book.bookWarn == 1) {
  19580. let text = `请注意${isbn}需要取出`;
  19581. uni.$u.ttsModule.speak(text);
  19582. }
  19583. scannedBooks.value.push(isbn);
  19584. getBookInfo(isbn);
  19585. }
  19586. }
  19587. } else {
  19588. let text = `此订单中不存在${isbn}这本书 `;
  19589. uni.$u.ttsModule.speak(text);
  19590. }
  19591. }
  19592. function handleScanCode() {
  19593. uni.scanCode({
  19594. success: (res2) => {
  19595. handleScan(res2.result);
  19596. }
  19597. });
  19598. }
  19599. const checkUserId = vue.ref();
  19600. const orderId = vue.ref();
  19601. const orderDetail = vue.ref({});
  19602. const showModal = vue.ref(false);
  19603. const isQualitySelected = vue.ref(false);
  19604. const showQualityModal = () => {
  19605. showModal.value = true;
  19606. };
  19607. const closeModal = () => {
  19608. showModal.value = false;
  19609. };
  19610. const toggleQuality = () => {
  19611. isQualitySelected.value = !isQualitySelected.value;
  19612. };
  19613. const handleAudit = () => {
  19614. if (!isQualitySelected.value) {
  19615. uni.$u.toast("请选择品相");
  19616. uni.$u.ttsModule.speak("请选择品相");
  19617. return;
  19618. }
  19619. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19620. if (checkUserInfo.userId) {
  19621. checkUserId.value = checkUserInfo.userId;
  19622. }
  19623. uni.$u.http.post("/app/orderinfo/checkOrderBatch", {
  19624. checkUserId: checkUserId.value,
  19625. orderId: orderId.value,
  19626. checkList: scannedBooks.value.map((isbn) => ({ sts: 1, com: "", isbn }))
  19627. }).then((res2) => {
  19628. if (res2.code == 200) {
  19629. uni.showToast({ title: "审核成功", icon: "none" });
  19630. uni.$u.ttsModule.speak("审核成功");
  19631. uni.navigateBack({ delta: 2 });
  19632. } else {
  19633. uni.$u.toast(res2.msg);
  19634. }
  19635. });
  19636. };
  19637. onLoad((options) => {
  19638. orderId.value = options.orderId;
  19639. orderDetail.value = uni.getStorageSync("orderDetail");
  19640. scannedBooks.value = uni.getStorageSync("scannedBooks");
  19641. scannedBooks.value.forEach((isbn) => {
  19642. getBookInfo(isbn);
  19643. });
  19644. uni.$u.useGlobalEvent((e) => {
  19645. if (e.barcode) {
  19646. handleScan(e.barcode);
  19647. }
  19648. });
  19649. });
  19650. onShow(() => {
  19651. var _a;
  19652. uni.$u.updateActivePageOnShow();
  19653. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  19654. orderDetail.value = uni.getStorageSync("orderDetail");
  19655. });
  19656. const __returned__ = { detailMap, scannedBooksDetail, getBookInfo, handleClose, checkIsbn, scannedBooks, handleScan, handleScanCode, checkUserId, orderId, orderDetail, showModal, isQualitySelected, showQualityModal, closeModal, toggleQuality, handleAudit, ref: vue.ref, get onLoad() {
  19657. return onLoad;
  19658. }, get onShow() {
  19659. return onShow;
  19660. }, BookItem: BookItem$1 };
  19661. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19662. return __returned__;
  19663. }
  19664. };
  19665. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  19666. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  19667. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  19668. return vue.openBlock(), vue.createElementBlock("view", { class: "batch-audit" }, [
  19669. (vue.openBlock(true), vue.createElementBlock(
  19670. vue.Fragment,
  19671. null,
  19672. vue.renderList($setup.scannedBooksDetail, (item, index2) => {
  19673. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  19674. key: item.isbn,
  19675. item,
  19676. showClose: "",
  19677. onClose: (isbn) => $setup.handleClose(index2, isbn)
  19678. }, null, 8, ["item", "onClose"]);
  19679. }),
  19680. 128
  19681. /* KEYED_FRAGMENT */
  19682. )),
  19683. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19684. vue.createVNode(_component_u_button, {
  19685. type: "warning",
  19686. size: "large",
  19687. onClick: $setup.handleScanCode
  19688. }, {
  19689. default: vue.withCtx(() => [
  19690. vue.createTextVNode("扫码")
  19691. ]),
  19692. _: 1
  19693. /* STABLE */
  19694. }),
  19695. vue.createVNode(_component_u_button, {
  19696. type: "primary",
  19697. size: "large",
  19698. onClick: $setup.showQualityModal
  19699. }, {
  19700. default: vue.withCtx(() => [
  19701. vue.createTextVNode("确定")
  19702. ]),
  19703. _: 1
  19704. /* STABLE */
  19705. })
  19706. ]),
  19707. vue.createVNode(_component_u_modal, {
  19708. show: $setup.showModal,
  19709. title: "品相选择",
  19710. onCancel: $setup.closeModal,
  19711. showCancelButton: true,
  19712. closeOnClickOverlay: true,
  19713. onConfirm: $setup.handleAudit
  19714. }, {
  19715. default: vue.withCtx(() => [
  19716. vue.createElementVNode("view", { class: "quality-selector" }, [
  19717. vue.createElementVNode(
  19718. "view",
  19719. {
  19720. class: vue.normalizeClass(["quality-circle", { selected: $setup.isQualitySelected }]),
  19721. onClick: $setup.toggleQuality
  19722. },
  19723. [
  19724. vue.createElementVNode("text", null, "良好")
  19725. ],
  19726. 2
  19727. /* CLASS */
  19728. )
  19729. ])
  19730. ]),
  19731. _: 1
  19732. /* STABLE */
  19733. }, 8, ["show"])
  19734. ]);
  19735. }
  19736. 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"]]);
  19737. const _sfc_main$W = {
  19738. __name: "sender",
  19739. setup(__props, { expose: __expose }) {
  19740. __expose();
  19741. const otherParams = vue.ref({
  19742. search: ""
  19743. });
  19744. const scrollRef = vue.ref(null);
  19745. const refreshList = () => {
  19746. var _a;
  19747. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19748. };
  19749. let dataList = vue.ref([]);
  19750. const updateList = (data, page2) => {
  19751. dataList.value = data;
  19752. if (!isSearch.value)
  19753. return;
  19754. if (data.length > 0) {
  19755. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  19756. } else {
  19757. uni.$u.ttsModule.speak("未查询到数据");
  19758. }
  19759. isSearch.value = false;
  19760. };
  19761. const isSearch = vue.ref(false);
  19762. const handleSearch = () => {
  19763. isSearch.value = true;
  19764. refreshList();
  19765. };
  19766. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19767. return dataList;
  19768. }, set dataList(v) {
  19769. dataList = v;
  19770. }, updateList, isSearch, handleSearch, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  19771. return onLoad;
  19772. } };
  19773. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19774. return __returned__;
  19775. }
  19776. };
  19777. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  19778. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  19779. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  19780. return vue.openBlock(), vue.createElementBlock("view", {
  19781. class: "common-page",
  19782. style: { "padding": "0" }
  19783. }, [
  19784. vue.createVNode($setup["PageScroll"], {
  19785. requestStr: "/app/orderinfo/getOrderListByUserInfo",
  19786. onUpdateList: $setup.updateList,
  19787. ref: "scrollRef",
  19788. otherParams: $setup.otherParams,
  19789. immediate: false
  19790. }, {
  19791. default: vue.withCtx(() => [
  19792. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19793. default: vue.withCtx(() => [
  19794. vue.createElementVNode("view", { class: "search-area" }, [
  19795. vue.createVNode(_component_u_search, {
  19796. placeholder: "请输入发件人姓名或电话",
  19797. searchIconSize: 18,
  19798. bgColor: "#f6f7f6",
  19799. onSearch: $setup.handleSearch,
  19800. modelValue: $setup.otherParams.search,
  19801. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  19802. "custom-style": "font-size:32rpx",
  19803. "placeholder-style": "font-size:32rpx",
  19804. clearabled: true,
  19805. focus: false,
  19806. showAction: false,
  19807. height: 36
  19808. }, null, 8, ["modelValue"])
  19809. ])
  19810. ]),
  19811. _: 1
  19812. /* STABLE */
  19813. }),
  19814. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  19815. key: 0,
  19816. class: "list-con"
  19817. }, [
  19818. (vue.openBlock(true), vue.createElementBlock(
  19819. vue.Fragment,
  19820. null,
  19821. vue.renderList($setup.dataList, (cell) => {
  19822. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  19823. key: cell.id,
  19824. item: cell,
  19825. class: "mt-20"
  19826. }, null, 8, ["item"]);
  19827. }),
  19828. 128
  19829. /* KEYED_FRAGMENT */
  19830. ))
  19831. ])) : vue.createCommentVNode("v-if", true)
  19832. ]),
  19833. _: 1
  19834. /* STABLE */
  19835. }, 8, ["otherParams"])
  19836. ]);
  19837. }
  19838. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/sender.vue"]]);
  19839. const _sfc_main$V = {
  19840. __name: "audit",
  19841. setup(__props, { expose: __expose }) {
  19842. __expose();
  19843. const otherParams = vue.ref({
  19844. sender: ""
  19845. });
  19846. const scrollRef = vue.ref(null);
  19847. const refreshList = () => {
  19848. var _a;
  19849. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19850. };
  19851. let dataList = vue.ref([{
  19852. date: "2024-10-24",
  19853. orderNum: 423,
  19854. auditNum: 293,
  19855. trueNum: 323
  19856. }, {
  19857. date: "2024-10-24",
  19858. orderNum: 423,
  19859. auditNum: 293,
  19860. trueNum: 323
  19861. }, {
  19862. date: "2024-10-24",
  19863. orderNum: 423,
  19864. auditNum: 293,
  19865. trueNum: 323
  19866. }]);
  19867. const updateList = (data) => {
  19868. dataList.value = data;
  19869. };
  19870. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19871. return dataList;
  19872. }, set dataList(v) {
  19873. dataList = v;
  19874. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  19875. return onLoad;
  19876. } };
  19877. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19878. return __returned__;
  19879. }
  19880. };
  19881. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  19882. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  19883. return vue.openBlock(), vue.createElementBlock("view", {
  19884. class: "common-page",
  19885. style: { "padding": "0" }
  19886. }, [
  19887. vue.createVNode($setup["PageScroll"], {
  19888. requestStr: "/team/token/shop/invite/page",
  19889. onUpdateList: $setup.updateList,
  19890. ref: "scrollRef",
  19891. otherParams: $setup.otherParams
  19892. }, {
  19893. default: vue.withCtx(() => [
  19894. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19895. default: vue.withCtx(() => [
  19896. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  19897. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  19898. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  19899. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  19900. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  19901. ])
  19902. ]),
  19903. _: 1
  19904. /* STABLE */
  19905. }),
  19906. vue.createElementVNode("view", { class: "list-con" }, [
  19907. (vue.openBlock(true), vue.createElementBlock(
  19908. vue.Fragment,
  19909. null,
  19910. vue.renderList($setup.dataList, (item, index2) => {
  19911. return vue.openBlock(), vue.createElementBlock("view", {
  19912. key: index2,
  19913. class: "flex-a"
  19914. }, [
  19915. vue.createElementVNode(
  19916. "view",
  19917. { class: "text-item flex-1" },
  19918. vue.toDisplayString(item.date),
  19919. 1
  19920. /* TEXT */
  19921. ),
  19922. vue.createElementVNode(
  19923. "view",
  19924. { class: "text-item flex-1" },
  19925. vue.toDisplayString(item.orderNum),
  19926. 1
  19927. /* TEXT */
  19928. ),
  19929. vue.createElementVNode(
  19930. "view",
  19931. { class: "text-item flex-1" },
  19932. vue.toDisplayString(item.auditNum),
  19933. 1
  19934. /* TEXT */
  19935. ),
  19936. vue.createElementVNode(
  19937. "view",
  19938. { class: "text-item flex-1" },
  19939. vue.toDisplayString(item.trueNum),
  19940. 1
  19941. /* TEXT */
  19942. )
  19943. ]);
  19944. }),
  19945. 128
  19946. /* KEYED_FRAGMENT */
  19947. ))
  19948. ])
  19949. ]),
  19950. _: 1
  19951. /* STABLE */
  19952. }, 8, ["otherParams"])
  19953. ]);
  19954. }
  19955. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/audit.vue"]]);
  19956. const icons = {
  19957. "id": "2852637",
  19958. "name": "uniui图标库",
  19959. "font_family": "uniicons",
  19960. "css_prefix_text": "uniui-",
  19961. "description": "",
  19962. "glyphs": [
  19963. {
  19964. "icon_id": "25027049",
  19965. "name": "yanse",
  19966. "font_class": "color",
  19967. "unicode": "e6cf",
  19968. "unicode_decimal": 59087
  19969. },
  19970. {
  19971. "icon_id": "25027048",
  19972. "name": "wallet",
  19973. "font_class": "wallet",
  19974. "unicode": "e6b1",
  19975. "unicode_decimal": 59057
  19976. },
  19977. {
  19978. "icon_id": "25015720",
  19979. "name": "settings-filled",
  19980. "font_class": "settings-filled",
  19981. "unicode": "e6ce",
  19982. "unicode_decimal": 59086
  19983. },
  19984. {
  19985. "icon_id": "25015434",
  19986. "name": "shimingrenzheng-filled",
  19987. "font_class": "auth-filled",
  19988. "unicode": "e6cc",
  19989. "unicode_decimal": 59084
  19990. },
  19991. {
  19992. "icon_id": "24934246",
  19993. "name": "shop-filled",
  19994. "font_class": "shop-filled",
  19995. "unicode": "e6cd",
  19996. "unicode_decimal": 59085
  19997. },
  19998. {
  19999. "icon_id": "24934159",
  20000. "name": "staff-filled-01",
  20001. "font_class": "staff-filled",
  20002. "unicode": "e6cb",
  20003. "unicode_decimal": 59083
  20004. },
  20005. {
  20006. "icon_id": "24932461",
  20007. "name": "VIP-filled",
  20008. "font_class": "vip-filled",
  20009. "unicode": "e6c6",
  20010. "unicode_decimal": 59078
  20011. },
  20012. {
  20013. "icon_id": "24932462",
  20014. "name": "plus_circle_fill",
  20015. "font_class": "plus-filled",
  20016. "unicode": "e6c7",
  20017. "unicode_decimal": 59079
  20018. },
  20019. {
  20020. "icon_id": "24932463",
  20021. "name": "folder_add-filled",
  20022. "font_class": "folder-add-filled",
  20023. "unicode": "e6c8",
  20024. "unicode_decimal": 59080
  20025. },
  20026. {
  20027. "icon_id": "24932464",
  20028. "name": "yanse-filled",
  20029. "font_class": "color-filled",
  20030. "unicode": "e6c9",
  20031. "unicode_decimal": 59081
  20032. },
  20033. {
  20034. "icon_id": "24932465",
  20035. "name": "tune-filled",
  20036. "font_class": "tune-filled",
  20037. "unicode": "e6ca",
  20038. "unicode_decimal": 59082
  20039. },
  20040. {
  20041. "icon_id": "24932455",
  20042. "name": "a-rilidaka-filled",
  20043. "font_class": "calendar-filled",
  20044. "unicode": "e6c0",
  20045. "unicode_decimal": 59072
  20046. },
  20047. {
  20048. "icon_id": "24932456",
  20049. "name": "notification-filled",
  20050. "font_class": "notification-filled",
  20051. "unicode": "e6c1",
  20052. "unicode_decimal": 59073
  20053. },
  20054. {
  20055. "icon_id": "24932457",
  20056. "name": "wallet-filled",
  20057. "font_class": "wallet-filled",
  20058. "unicode": "e6c2",
  20059. "unicode_decimal": 59074
  20060. },
  20061. {
  20062. "icon_id": "24932458",
  20063. "name": "paihangbang-filled",
  20064. "font_class": "medal-filled",
  20065. "unicode": "e6c3",
  20066. "unicode_decimal": 59075
  20067. },
  20068. {
  20069. "icon_id": "24932459",
  20070. "name": "gift-filled",
  20071. "font_class": "gift-filled",
  20072. "unicode": "e6c4",
  20073. "unicode_decimal": 59076
  20074. },
  20075. {
  20076. "icon_id": "24932460",
  20077. "name": "fire-filled",
  20078. "font_class": "fire-filled",
  20079. "unicode": "e6c5",
  20080. "unicode_decimal": 59077
  20081. },
  20082. {
  20083. "icon_id": "24928001",
  20084. "name": "refreshempty",
  20085. "font_class": "refreshempty",
  20086. "unicode": "e6bf",
  20087. "unicode_decimal": 59071
  20088. },
  20089. {
  20090. "icon_id": "24926853",
  20091. "name": "location-ellipse",
  20092. "font_class": "location-filled",
  20093. "unicode": "e6af",
  20094. "unicode_decimal": 59055
  20095. },
  20096. {
  20097. "icon_id": "24926735",
  20098. "name": "person-filled",
  20099. "font_class": "person-filled",
  20100. "unicode": "e69d",
  20101. "unicode_decimal": 59037
  20102. },
  20103. {
  20104. "icon_id": "24926703",
  20105. "name": "personadd-filled",
  20106. "font_class": "personadd-filled",
  20107. "unicode": "e698",
  20108. "unicode_decimal": 59032
  20109. },
  20110. {
  20111. "icon_id": "24923351",
  20112. "name": "back",
  20113. "font_class": "back",
  20114. "unicode": "e6b9",
  20115. "unicode_decimal": 59065
  20116. },
  20117. {
  20118. "icon_id": "24923352",
  20119. "name": "forward",
  20120. "font_class": "forward",
  20121. "unicode": "e6ba",
  20122. "unicode_decimal": 59066
  20123. },
  20124. {
  20125. "icon_id": "24923353",
  20126. "name": "arrowthinright",
  20127. "font_class": "arrow-right",
  20128. "unicode": "e6bb",
  20129. "unicode_decimal": 59067
  20130. },
  20131. {
  20132. "icon_id": "24923353",
  20133. "name": "arrowthinright",
  20134. "font_class": "arrowthinright",
  20135. "unicode": "e6bb",
  20136. "unicode_decimal": 59067
  20137. },
  20138. {
  20139. "icon_id": "24923354",
  20140. "name": "arrowthinleft",
  20141. "font_class": "arrow-left",
  20142. "unicode": "e6bc",
  20143. "unicode_decimal": 59068
  20144. },
  20145. {
  20146. "icon_id": "24923354",
  20147. "name": "arrowthinleft",
  20148. "font_class": "arrowthinleft",
  20149. "unicode": "e6bc",
  20150. "unicode_decimal": 59068
  20151. },
  20152. {
  20153. "icon_id": "24923355",
  20154. "name": "arrowthinup",
  20155. "font_class": "arrow-up",
  20156. "unicode": "e6bd",
  20157. "unicode_decimal": 59069
  20158. },
  20159. {
  20160. "icon_id": "24923355",
  20161. "name": "arrowthinup",
  20162. "font_class": "arrowthinup",
  20163. "unicode": "e6bd",
  20164. "unicode_decimal": 59069
  20165. },
  20166. {
  20167. "icon_id": "24923356",
  20168. "name": "arrowthindown",
  20169. "font_class": "arrow-down",
  20170. "unicode": "e6be",
  20171. "unicode_decimal": 59070
  20172. },
  20173. {
  20174. "icon_id": "24923356",
  20175. "name": "arrowthindown",
  20176. "font_class": "arrowthindown",
  20177. "unicode": "e6be",
  20178. "unicode_decimal": 59070
  20179. },
  20180. {
  20181. "icon_id": "24923349",
  20182. "name": "arrowdown",
  20183. "font_class": "bottom",
  20184. "unicode": "e6b8",
  20185. "unicode_decimal": 59064
  20186. },
  20187. {
  20188. "icon_id": "24923349",
  20189. "name": "arrowdown",
  20190. "font_class": "arrowdown",
  20191. "unicode": "e6b8",
  20192. "unicode_decimal": 59064
  20193. },
  20194. {
  20195. "icon_id": "24923346",
  20196. "name": "arrowright",
  20197. "font_class": "right",
  20198. "unicode": "e6b5",
  20199. "unicode_decimal": 59061
  20200. },
  20201. {
  20202. "icon_id": "24923346",
  20203. "name": "arrowright",
  20204. "font_class": "arrowright",
  20205. "unicode": "e6b5",
  20206. "unicode_decimal": 59061
  20207. },
  20208. {
  20209. "icon_id": "24923347",
  20210. "name": "arrowup",
  20211. "font_class": "top",
  20212. "unicode": "e6b6",
  20213. "unicode_decimal": 59062
  20214. },
  20215. {
  20216. "icon_id": "24923347",
  20217. "name": "arrowup",
  20218. "font_class": "arrowup",
  20219. "unicode": "e6b6",
  20220. "unicode_decimal": 59062
  20221. },
  20222. {
  20223. "icon_id": "24923348",
  20224. "name": "arrowleft",
  20225. "font_class": "left",
  20226. "unicode": "e6b7",
  20227. "unicode_decimal": 59063
  20228. },
  20229. {
  20230. "icon_id": "24923348",
  20231. "name": "arrowleft",
  20232. "font_class": "arrowleft",
  20233. "unicode": "e6b7",
  20234. "unicode_decimal": 59063
  20235. },
  20236. {
  20237. "icon_id": "24923334",
  20238. "name": "eye",
  20239. "font_class": "eye",
  20240. "unicode": "e651",
  20241. "unicode_decimal": 58961
  20242. },
  20243. {
  20244. "icon_id": "24923335",
  20245. "name": "eye-filled",
  20246. "font_class": "eye-filled",
  20247. "unicode": "e66a",
  20248. "unicode_decimal": 58986
  20249. },
  20250. {
  20251. "icon_id": "24923336",
  20252. "name": "eye-slash",
  20253. "font_class": "eye-slash",
  20254. "unicode": "e6b3",
  20255. "unicode_decimal": 59059
  20256. },
  20257. {
  20258. "icon_id": "24923337",
  20259. "name": "eye-slash-filled",
  20260. "font_class": "eye-slash-filled",
  20261. "unicode": "e6b4",
  20262. "unicode_decimal": 59060
  20263. },
  20264. {
  20265. "icon_id": "24923305",
  20266. "name": "info-filled",
  20267. "font_class": "info-filled",
  20268. "unicode": "e649",
  20269. "unicode_decimal": 58953
  20270. },
  20271. {
  20272. "icon_id": "24923299",
  20273. "name": "reload-01",
  20274. "font_class": "reload",
  20275. "unicode": "e6b2",
  20276. "unicode_decimal": 59058
  20277. },
  20278. {
  20279. "icon_id": "24923195",
  20280. "name": "mic_slash_fill",
  20281. "font_class": "micoff-filled",
  20282. "unicode": "e6b0",
  20283. "unicode_decimal": 59056
  20284. },
  20285. {
  20286. "icon_id": "24923165",
  20287. "name": "map-pin-ellipse",
  20288. "font_class": "map-pin-ellipse",
  20289. "unicode": "e6ac",
  20290. "unicode_decimal": 59052
  20291. },
  20292. {
  20293. "icon_id": "24923166",
  20294. "name": "map-pin",
  20295. "font_class": "map-pin",
  20296. "unicode": "e6ad",
  20297. "unicode_decimal": 59053
  20298. },
  20299. {
  20300. "icon_id": "24923167",
  20301. "name": "location",
  20302. "font_class": "location",
  20303. "unicode": "e6ae",
  20304. "unicode_decimal": 59054
  20305. },
  20306. {
  20307. "icon_id": "24923064",
  20308. "name": "starhalf",
  20309. "font_class": "starhalf",
  20310. "unicode": "e683",
  20311. "unicode_decimal": 59011
  20312. },
  20313. {
  20314. "icon_id": "24923065",
  20315. "name": "star",
  20316. "font_class": "star",
  20317. "unicode": "e688",
  20318. "unicode_decimal": 59016
  20319. },
  20320. {
  20321. "icon_id": "24923066",
  20322. "name": "star-filled",
  20323. "font_class": "star-filled",
  20324. "unicode": "e68f",
  20325. "unicode_decimal": 59023
  20326. },
  20327. {
  20328. "icon_id": "24899646",
  20329. "name": "a-rilidaka",
  20330. "font_class": "calendar",
  20331. "unicode": "e6a0",
  20332. "unicode_decimal": 59040
  20333. },
  20334. {
  20335. "icon_id": "24899647",
  20336. "name": "fire",
  20337. "font_class": "fire",
  20338. "unicode": "e6a1",
  20339. "unicode_decimal": 59041
  20340. },
  20341. {
  20342. "icon_id": "24899648",
  20343. "name": "paihangbang",
  20344. "font_class": "medal",
  20345. "unicode": "e6a2",
  20346. "unicode_decimal": 59042
  20347. },
  20348. {
  20349. "icon_id": "24899649",
  20350. "name": "font",
  20351. "font_class": "font",
  20352. "unicode": "e6a3",
  20353. "unicode_decimal": 59043
  20354. },
  20355. {
  20356. "icon_id": "24899650",
  20357. "name": "gift",
  20358. "font_class": "gift",
  20359. "unicode": "e6a4",
  20360. "unicode_decimal": 59044
  20361. },
  20362. {
  20363. "icon_id": "24899651",
  20364. "name": "link",
  20365. "font_class": "link",
  20366. "unicode": "e6a5",
  20367. "unicode_decimal": 59045
  20368. },
  20369. {
  20370. "icon_id": "24899652",
  20371. "name": "notification",
  20372. "font_class": "notification",
  20373. "unicode": "e6a6",
  20374. "unicode_decimal": 59046
  20375. },
  20376. {
  20377. "icon_id": "24899653",
  20378. "name": "staff",
  20379. "font_class": "staff",
  20380. "unicode": "e6a7",
  20381. "unicode_decimal": 59047
  20382. },
  20383. {
  20384. "icon_id": "24899654",
  20385. "name": "VIP",
  20386. "font_class": "vip",
  20387. "unicode": "e6a8",
  20388. "unicode_decimal": 59048
  20389. },
  20390. {
  20391. "icon_id": "24899655",
  20392. "name": "folder_add",
  20393. "font_class": "folder-add",
  20394. "unicode": "e6a9",
  20395. "unicode_decimal": 59049
  20396. },
  20397. {
  20398. "icon_id": "24899656",
  20399. "name": "tune",
  20400. "font_class": "tune",
  20401. "unicode": "e6aa",
  20402. "unicode_decimal": 59050
  20403. },
  20404. {
  20405. "icon_id": "24899657",
  20406. "name": "shimingrenzheng",
  20407. "font_class": "auth",
  20408. "unicode": "e6ab",
  20409. "unicode_decimal": 59051
  20410. },
  20411. {
  20412. "icon_id": "24899565",
  20413. "name": "person",
  20414. "font_class": "person",
  20415. "unicode": "e699",
  20416. "unicode_decimal": 59033
  20417. },
  20418. {
  20419. "icon_id": "24899566",
  20420. "name": "email-filled",
  20421. "font_class": "email-filled",
  20422. "unicode": "e69a",
  20423. "unicode_decimal": 59034
  20424. },
  20425. {
  20426. "icon_id": "24899567",
  20427. "name": "phone-filled",
  20428. "font_class": "phone-filled",
  20429. "unicode": "e69b",
  20430. "unicode_decimal": 59035
  20431. },
  20432. {
  20433. "icon_id": "24899568",
  20434. "name": "phone",
  20435. "font_class": "phone",
  20436. "unicode": "e69c",
  20437. "unicode_decimal": 59036
  20438. },
  20439. {
  20440. "icon_id": "24899570",
  20441. "name": "email",
  20442. "font_class": "email",
  20443. "unicode": "e69e",
  20444. "unicode_decimal": 59038
  20445. },
  20446. {
  20447. "icon_id": "24899571",
  20448. "name": "personadd",
  20449. "font_class": "personadd",
  20450. "unicode": "e69f",
  20451. "unicode_decimal": 59039
  20452. },
  20453. {
  20454. "icon_id": "24899558",
  20455. "name": "chatboxes-filled",
  20456. "font_class": "chatboxes-filled",
  20457. "unicode": "e692",
  20458. "unicode_decimal": 59026
  20459. },
  20460. {
  20461. "icon_id": "24899559",
  20462. "name": "contact",
  20463. "font_class": "contact",
  20464. "unicode": "e693",
  20465. "unicode_decimal": 59027
  20466. },
  20467. {
  20468. "icon_id": "24899560",
  20469. "name": "chatbubble-filled",
  20470. "font_class": "chatbubble-filled",
  20471. "unicode": "e694",
  20472. "unicode_decimal": 59028
  20473. },
  20474. {
  20475. "icon_id": "24899561",
  20476. "name": "contact-filled",
  20477. "font_class": "contact-filled",
  20478. "unicode": "e695",
  20479. "unicode_decimal": 59029
  20480. },
  20481. {
  20482. "icon_id": "24899562",
  20483. "name": "chatboxes",
  20484. "font_class": "chatboxes",
  20485. "unicode": "e696",
  20486. "unicode_decimal": 59030
  20487. },
  20488. {
  20489. "icon_id": "24899563",
  20490. "name": "chatbubble",
  20491. "font_class": "chatbubble",
  20492. "unicode": "e697",
  20493. "unicode_decimal": 59031
  20494. },
  20495. {
  20496. "icon_id": "24881290",
  20497. "name": "upload-filled",
  20498. "font_class": "upload-filled",
  20499. "unicode": "e68e",
  20500. "unicode_decimal": 59022
  20501. },
  20502. {
  20503. "icon_id": "24881292",
  20504. "name": "upload",
  20505. "font_class": "upload",
  20506. "unicode": "e690",
  20507. "unicode_decimal": 59024
  20508. },
  20509. {
  20510. "icon_id": "24881293",
  20511. "name": "weixin",
  20512. "font_class": "weixin",
  20513. "unicode": "e691",
  20514. "unicode_decimal": 59025
  20515. },
  20516. {
  20517. "icon_id": "24881274",
  20518. "name": "compose",
  20519. "font_class": "compose",
  20520. "unicode": "e67f",
  20521. "unicode_decimal": 59007
  20522. },
  20523. {
  20524. "icon_id": "24881275",
  20525. "name": "qq",
  20526. "font_class": "qq",
  20527. "unicode": "e680",
  20528. "unicode_decimal": 59008
  20529. },
  20530. {
  20531. "icon_id": "24881276",
  20532. "name": "download-filled",
  20533. "font_class": "download-filled",
  20534. "unicode": "e681",
  20535. "unicode_decimal": 59009
  20536. },
  20537. {
  20538. "icon_id": "24881277",
  20539. "name": "pengyouquan",
  20540. "font_class": "pyq",
  20541. "unicode": "e682",
  20542. "unicode_decimal": 59010
  20543. },
  20544. {
  20545. "icon_id": "24881279",
  20546. "name": "sound",
  20547. "font_class": "sound",
  20548. "unicode": "e684",
  20549. "unicode_decimal": 59012
  20550. },
  20551. {
  20552. "icon_id": "24881280",
  20553. "name": "trash-filled",
  20554. "font_class": "trash-filled",
  20555. "unicode": "e685",
  20556. "unicode_decimal": 59013
  20557. },
  20558. {
  20559. "icon_id": "24881281",
  20560. "name": "sound-filled",
  20561. "font_class": "sound-filled",
  20562. "unicode": "e686",
  20563. "unicode_decimal": 59014
  20564. },
  20565. {
  20566. "icon_id": "24881282",
  20567. "name": "trash",
  20568. "font_class": "trash",
  20569. "unicode": "e687",
  20570. "unicode_decimal": 59015
  20571. },
  20572. {
  20573. "icon_id": "24881284",
  20574. "name": "videocam-filled",
  20575. "font_class": "videocam-filled",
  20576. "unicode": "e689",
  20577. "unicode_decimal": 59017
  20578. },
  20579. {
  20580. "icon_id": "24881285",
  20581. "name": "spinner-cycle",
  20582. "font_class": "spinner-cycle",
  20583. "unicode": "e68a",
  20584. "unicode_decimal": 59018
  20585. },
  20586. {
  20587. "icon_id": "24881286",
  20588. "name": "weibo",
  20589. "font_class": "weibo",
  20590. "unicode": "e68b",
  20591. "unicode_decimal": 59019
  20592. },
  20593. {
  20594. "icon_id": "24881288",
  20595. "name": "videocam",
  20596. "font_class": "videocam",
  20597. "unicode": "e68c",
  20598. "unicode_decimal": 59020
  20599. },
  20600. {
  20601. "icon_id": "24881289",
  20602. "name": "download",
  20603. "font_class": "download",
  20604. "unicode": "e68d",
  20605. "unicode_decimal": 59021
  20606. },
  20607. {
  20608. "icon_id": "24879601",
  20609. "name": "help",
  20610. "font_class": "help",
  20611. "unicode": "e679",
  20612. "unicode_decimal": 59001
  20613. },
  20614. {
  20615. "icon_id": "24879602",
  20616. "name": "navigate-filled",
  20617. "font_class": "navigate-filled",
  20618. "unicode": "e67a",
  20619. "unicode_decimal": 59002
  20620. },
  20621. {
  20622. "icon_id": "24879603",
  20623. "name": "plusempty",
  20624. "font_class": "plusempty",
  20625. "unicode": "e67b",
  20626. "unicode_decimal": 59003
  20627. },
  20628. {
  20629. "icon_id": "24879604",
  20630. "name": "smallcircle",
  20631. "font_class": "smallcircle",
  20632. "unicode": "e67c",
  20633. "unicode_decimal": 59004
  20634. },
  20635. {
  20636. "icon_id": "24879605",
  20637. "name": "minus-filled",
  20638. "font_class": "minus-filled",
  20639. "unicode": "e67d",
  20640. "unicode_decimal": 59005
  20641. },
  20642. {
  20643. "icon_id": "24879606",
  20644. "name": "micoff",
  20645. "font_class": "micoff",
  20646. "unicode": "e67e",
  20647. "unicode_decimal": 59006
  20648. },
  20649. {
  20650. "icon_id": "24879588",
  20651. "name": "closeempty",
  20652. "font_class": "closeempty",
  20653. "unicode": "e66c",
  20654. "unicode_decimal": 58988
  20655. },
  20656. {
  20657. "icon_id": "24879589",
  20658. "name": "clear",
  20659. "font_class": "clear",
  20660. "unicode": "e66d",
  20661. "unicode_decimal": 58989
  20662. },
  20663. {
  20664. "icon_id": "24879590",
  20665. "name": "navigate",
  20666. "font_class": "navigate",
  20667. "unicode": "e66e",
  20668. "unicode_decimal": 58990
  20669. },
  20670. {
  20671. "icon_id": "24879591",
  20672. "name": "minus",
  20673. "font_class": "minus",
  20674. "unicode": "e66f",
  20675. "unicode_decimal": 58991
  20676. },
  20677. {
  20678. "icon_id": "24879592",
  20679. "name": "image",
  20680. "font_class": "image",
  20681. "unicode": "e670",
  20682. "unicode_decimal": 58992
  20683. },
  20684. {
  20685. "icon_id": "24879593",
  20686. "name": "mic",
  20687. "font_class": "mic",
  20688. "unicode": "e671",
  20689. "unicode_decimal": 58993
  20690. },
  20691. {
  20692. "icon_id": "24879594",
  20693. "name": "paperplane",
  20694. "font_class": "paperplane",
  20695. "unicode": "e672",
  20696. "unicode_decimal": 58994
  20697. },
  20698. {
  20699. "icon_id": "24879595",
  20700. "name": "close",
  20701. "font_class": "close",
  20702. "unicode": "e673",
  20703. "unicode_decimal": 58995
  20704. },
  20705. {
  20706. "icon_id": "24879596",
  20707. "name": "help-filled",
  20708. "font_class": "help-filled",
  20709. "unicode": "e674",
  20710. "unicode_decimal": 58996
  20711. },
  20712. {
  20713. "icon_id": "24879597",
  20714. "name": "plus-filled",
  20715. "font_class": "paperplane-filled",
  20716. "unicode": "e675",
  20717. "unicode_decimal": 58997
  20718. },
  20719. {
  20720. "icon_id": "24879598",
  20721. "name": "plus",
  20722. "font_class": "plus",
  20723. "unicode": "e676",
  20724. "unicode_decimal": 58998
  20725. },
  20726. {
  20727. "icon_id": "24879599",
  20728. "name": "mic-filled",
  20729. "font_class": "mic-filled",
  20730. "unicode": "e677",
  20731. "unicode_decimal": 58999
  20732. },
  20733. {
  20734. "icon_id": "24879600",
  20735. "name": "image-filled",
  20736. "font_class": "image-filled",
  20737. "unicode": "e678",
  20738. "unicode_decimal": 59e3
  20739. },
  20740. {
  20741. "icon_id": "24855900",
  20742. "name": "locked-filled",
  20743. "font_class": "locked-filled",
  20744. "unicode": "e668",
  20745. "unicode_decimal": 58984
  20746. },
  20747. {
  20748. "icon_id": "24855901",
  20749. "name": "info",
  20750. "font_class": "info",
  20751. "unicode": "e669",
  20752. "unicode_decimal": 58985
  20753. },
  20754. {
  20755. "icon_id": "24855903",
  20756. "name": "locked",
  20757. "font_class": "locked",
  20758. "unicode": "e66b",
  20759. "unicode_decimal": 58987
  20760. },
  20761. {
  20762. "icon_id": "24855884",
  20763. "name": "camera-filled",
  20764. "font_class": "camera-filled",
  20765. "unicode": "e658",
  20766. "unicode_decimal": 58968
  20767. },
  20768. {
  20769. "icon_id": "24855885",
  20770. "name": "chat-filled",
  20771. "font_class": "chat-filled",
  20772. "unicode": "e659",
  20773. "unicode_decimal": 58969
  20774. },
  20775. {
  20776. "icon_id": "24855886",
  20777. "name": "camera",
  20778. "font_class": "camera",
  20779. "unicode": "e65a",
  20780. "unicode_decimal": 58970
  20781. },
  20782. {
  20783. "icon_id": "24855887",
  20784. "name": "circle",
  20785. "font_class": "circle",
  20786. "unicode": "e65b",
  20787. "unicode_decimal": 58971
  20788. },
  20789. {
  20790. "icon_id": "24855888",
  20791. "name": "checkmarkempty",
  20792. "font_class": "checkmarkempty",
  20793. "unicode": "e65c",
  20794. "unicode_decimal": 58972
  20795. },
  20796. {
  20797. "icon_id": "24855889",
  20798. "name": "chat",
  20799. "font_class": "chat",
  20800. "unicode": "e65d",
  20801. "unicode_decimal": 58973
  20802. },
  20803. {
  20804. "icon_id": "24855890",
  20805. "name": "circle-filled",
  20806. "font_class": "circle-filled",
  20807. "unicode": "e65e",
  20808. "unicode_decimal": 58974
  20809. },
  20810. {
  20811. "icon_id": "24855891",
  20812. "name": "flag",
  20813. "font_class": "flag",
  20814. "unicode": "e65f",
  20815. "unicode_decimal": 58975
  20816. },
  20817. {
  20818. "icon_id": "24855892",
  20819. "name": "flag-filled",
  20820. "font_class": "flag-filled",
  20821. "unicode": "e660",
  20822. "unicode_decimal": 58976
  20823. },
  20824. {
  20825. "icon_id": "24855893",
  20826. "name": "gear-filled",
  20827. "font_class": "gear-filled",
  20828. "unicode": "e661",
  20829. "unicode_decimal": 58977
  20830. },
  20831. {
  20832. "icon_id": "24855894",
  20833. "name": "home",
  20834. "font_class": "home",
  20835. "unicode": "e662",
  20836. "unicode_decimal": 58978
  20837. },
  20838. {
  20839. "icon_id": "24855895",
  20840. "name": "home-filled",
  20841. "font_class": "home-filled",
  20842. "unicode": "e663",
  20843. "unicode_decimal": 58979
  20844. },
  20845. {
  20846. "icon_id": "24855896",
  20847. "name": "gear",
  20848. "font_class": "gear",
  20849. "unicode": "e664",
  20850. "unicode_decimal": 58980
  20851. },
  20852. {
  20853. "icon_id": "24855897",
  20854. "name": "smallcircle-filled",
  20855. "font_class": "smallcircle-filled",
  20856. "unicode": "e665",
  20857. "unicode_decimal": 58981
  20858. },
  20859. {
  20860. "icon_id": "24855898",
  20861. "name": "map-filled",
  20862. "font_class": "map-filled",
  20863. "unicode": "e666",
  20864. "unicode_decimal": 58982
  20865. },
  20866. {
  20867. "icon_id": "24855899",
  20868. "name": "map",
  20869. "font_class": "map",
  20870. "unicode": "e667",
  20871. "unicode_decimal": 58983
  20872. },
  20873. {
  20874. "icon_id": "24855825",
  20875. "name": "refresh-filled",
  20876. "font_class": "refresh-filled",
  20877. "unicode": "e656",
  20878. "unicode_decimal": 58966
  20879. },
  20880. {
  20881. "icon_id": "24855826",
  20882. "name": "refresh",
  20883. "font_class": "refresh",
  20884. "unicode": "e657",
  20885. "unicode_decimal": 58967
  20886. },
  20887. {
  20888. "icon_id": "24855808",
  20889. "name": "cloud-upload",
  20890. "font_class": "cloud-upload",
  20891. "unicode": "e645",
  20892. "unicode_decimal": 58949
  20893. },
  20894. {
  20895. "icon_id": "24855809",
  20896. "name": "cloud-download-filled",
  20897. "font_class": "cloud-download-filled",
  20898. "unicode": "e646",
  20899. "unicode_decimal": 58950
  20900. },
  20901. {
  20902. "icon_id": "24855810",
  20903. "name": "cloud-download",
  20904. "font_class": "cloud-download",
  20905. "unicode": "e647",
  20906. "unicode_decimal": 58951
  20907. },
  20908. {
  20909. "icon_id": "24855811",
  20910. "name": "cloud-upload-filled",
  20911. "font_class": "cloud-upload-filled",
  20912. "unicode": "e648",
  20913. "unicode_decimal": 58952
  20914. },
  20915. {
  20916. "icon_id": "24855813",
  20917. "name": "redo",
  20918. "font_class": "redo",
  20919. "unicode": "e64a",
  20920. "unicode_decimal": 58954
  20921. },
  20922. {
  20923. "icon_id": "24855814",
  20924. "name": "images-filled",
  20925. "font_class": "images-filled",
  20926. "unicode": "e64b",
  20927. "unicode_decimal": 58955
  20928. },
  20929. {
  20930. "icon_id": "24855815",
  20931. "name": "undo-filled",
  20932. "font_class": "undo-filled",
  20933. "unicode": "e64c",
  20934. "unicode_decimal": 58956
  20935. },
  20936. {
  20937. "icon_id": "24855816",
  20938. "name": "more",
  20939. "font_class": "more",
  20940. "unicode": "e64d",
  20941. "unicode_decimal": 58957
  20942. },
  20943. {
  20944. "icon_id": "24855817",
  20945. "name": "more-filled",
  20946. "font_class": "more-filled",
  20947. "unicode": "e64e",
  20948. "unicode_decimal": 58958
  20949. },
  20950. {
  20951. "icon_id": "24855818",
  20952. "name": "undo",
  20953. "font_class": "undo",
  20954. "unicode": "e64f",
  20955. "unicode_decimal": 58959
  20956. },
  20957. {
  20958. "icon_id": "24855819",
  20959. "name": "images",
  20960. "font_class": "images",
  20961. "unicode": "e650",
  20962. "unicode_decimal": 58960
  20963. },
  20964. {
  20965. "icon_id": "24855821",
  20966. "name": "paperclip",
  20967. "font_class": "paperclip",
  20968. "unicode": "e652",
  20969. "unicode_decimal": 58962
  20970. },
  20971. {
  20972. "icon_id": "24855822",
  20973. "name": "settings",
  20974. "font_class": "settings",
  20975. "unicode": "e653",
  20976. "unicode_decimal": 58963
  20977. },
  20978. {
  20979. "icon_id": "24855823",
  20980. "name": "search",
  20981. "font_class": "search",
  20982. "unicode": "e654",
  20983. "unicode_decimal": 58964
  20984. },
  20985. {
  20986. "icon_id": "24855824",
  20987. "name": "redo-filled",
  20988. "font_class": "redo-filled",
  20989. "unicode": "e655",
  20990. "unicode_decimal": 58965
  20991. },
  20992. {
  20993. "icon_id": "24841702",
  20994. "name": "list",
  20995. "font_class": "list",
  20996. "unicode": "e644",
  20997. "unicode_decimal": 58948
  20998. },
  20999. {
  21000. "icon_id": "24841489",
  21001. "name": "mail-open-filled",
  21002. "font_class": "mail-open-filled",
  21003. "unicode": "e63a",
  21004. "unicode_decimal": 58938
  21005. },
  21006. {
  21007. "icon_id": "24841491",
  21008. "name": "hand-thumbsdown-filled",
  21009. "font_class": "hand-down-filled",
  21010. "unicode": "e63c",
  21011. "unicode_decimal": 58940
  21012. },
  21013. {
  21014. "icon_id": "24841492",
  21015. "name": "hand-thumbsdown",
  21016. "font_class": "hand-down",
  21017. "unicode": "e63d",
  21018. "unicode_decimal": 58941
  21019. },
  21020. {
  21021. "icon_id": "24841493",
  21022. "name": "hand-thumbsup-filled",
  21023. "font_class": "hand-up-filled",
  21024. "unicode": "e63e",
  21025. "unicode_decimal": 58942
  21026. },
  21027. {
  21028. "icon_id": "24841494",
  21029. "name": "hand-thumbsup",
  21030. "font_class": "hand-up",
  21031. "unicode": "e63f",
  21032. "unicode_decimal": 58943
  21033. },
  21034. {
  21035. "icon_id": "24841496",
  21036. "name": "heart-filled",
  21037. "font_class": "heart-filled",
  21038. "unicode": "e641",
  21039. "unicode_decimal": 58945
  21040. },
  21041. {
  21042. "icon_id": "24841498",
  21043. "name": "mail-open",
  21044. "font_class": "mail-open",
  21045. "unicode": "e643",
  21046. "unicode_decimal": 58947
  21047. },
  21048. {
  21049. "icon_id": "24841488",
  21050. "name": "heart",
  21051. "font_class": "heart",
  21052. "unicode": "e639",
  21053. "unicode_decimal": 58937
  21054. },
  21055. {
  21056. "icon_id": "24839963",
  21057. "name": "loop",
  21058. "font_class": "loop",
  21059. "unicode": "e633",
  21060. "unicode_decimal": 58931
  21061. },
  21062. {
  21063. "icon_id": "24839866",
  21064. "name": "pulldown",
  21065. "font_class": "pulldown",
  21066. "unicode": "e632",
  21067. "unicode_decimal": 58930
  21068. },
  21069. {
  21070. "icon_id": "24813798",
  21071. "name": "scan",
  21072. "font_class": "scan",
  21073. "unicode": "e62a",
  21074. "unicode_decimal": 58922
  21075. },
  21076. {
  21077. "icon_id": "24813786",
  21078. "name": "bars",
  21079. "font_class": "bars",
  21080. "unicode": "e627",
  21081. "unicode_decimal": 58919
  21082. },
  21083. {
  21084. "icon_id": "24813788",
  21085. "name": "cart-filled",
  21086. "font_class": "cart-filled",
  21087. "unicode": "e629",
  21088. "unicode_decimal": 58921
  21089. },
  21090. {
  21091. "icon_id": "24813790",
  21092. "name": "checkbox",
  21093. "font_class": "checkbox",
  21094. "unicode": "e62b",
  21095. "unicode_decimal": 58923
  21096. },
  21097. {
  21098. "icon_id": "24813791",
  21099. "name": "checkbox-filled",
  21100. "font_class": "checkbox-filled",
  21101. "unicode": "e62c",
  21102. "unicode_decimal": 58924
  21103. },
  21104. {
  21105. "icon_id": "24813794",
  21106. "name": "shop",
  21107. "font_class": "shop",
  21108. "unicode": "e62f",
  21109. "unicode_decimal": 58927
  21110. },
  21111. {
  21112. "icon_id": "24813795",
  21113. "name": "headphones",
  21114. "font_class": "headphones",
  21115. "unicode": "e630",
  21116. "unicode_decimal": 58928
  21117. },
  21118. {
  21119. "icon_id": "24813796",
  21120. "name": "cart",
  21121. "font_class": "cart",
  21122. "unicode": "e631",
  21123. "unicode_decimal": 58929
  21124. }
  21125. ]
  21126. };
  21127. const getVal = (val) => {
  21128. const reg = /^[0-9]*$/g;
  21129. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  21130. };
  21131. const _sfc_main$U = {
  21132. name: "UniIcons",
  21133. emits: ["click"],
  21134. props: {
  21135. type: {
  21136. type: String,
  21137. default: ""
  21138. },
  21139. color: {
  21140. type: String,
  21141. default: "#333333"
  21142. },
  21143. size: {
  21144. type: [Number, String],
  21145. default: 16
  21146. },
  21147. customPrefix: {
  21148. type: String,
  21149. default: ""
  21150. }
  21151. },
  21152. data() {
  21153. return {
  21154. icons: icons.glyphs
  21155. };
  21156. },
  21157. computed: {
  21158. unicode() {
  21159. let code2 = this.icons.find((v) => v.font_class === this.type);
  21160. if (code2) {
  21161. return unescape(`%u${code2.unicode}`);
  21162. }
  21163. return "";
  21164. },
  21165. iconSize() {
  21166. return getVal(this.size);
  21167. }
  21168. },
  21169. methods: {
  21170. _onClick() {
  21171. this.$emit("click");
  21172. }
  21173. }
  21174. };
  21175. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  21176. return vue.openBlock(), vue.createElementBlock(
  21177. "text",
  21178. {
  21179. style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
  21180. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  21181. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  21182. },
  21183. null,
  21184. 6
  21185. /* CLASS, STYLE */
  21186. );
  21187. }
  21188. 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"]]);
  21189. let Calendar$1 = class Calendar {
  21190. constructor({
  21191. selected,
  21192. startDate,
  21193. endDate,
  21194. range: range2
  21195. } = {}) {
  21196. this.date = this.getDateObj(/* @__PURE__ */ new Date());
  21197. this.selected = selected || [];
  21198. this.startDate = startDate;
  21199. this.endDate = endDate;
  21200. this.range = range2;
  21201. this.cleanMultipleStatus();
  21202. this.weeks = {};
  21203. this.lastHover = false;
  21204. }
  21205. /**
  21206. * 设置日期
  21207. * @param {Object} date
  21208. */
  21209. setDate(date3) {
  21210. const selectDate = this.getDateObj(date3);
  21211. this.getWeeks(selectDate.fullDate);
  21212. }
  21213. /**
  21214. * 清理多选状态
  21215. */
  21216. cleanMultipleStatus() {
  21217. this.multipleStatus = {
  21218. before: "",
  21219. after: "",
  21220. data: []
  21221. };
  21222. }
  21223. setStartDate(startDate) {
  21224. this.startDate = startDate;
  21225. }
  21226. setEndDate(endDate) {
  21227. this.endDate = endDate;
  21228. }
  21229. getPreMonthObj(date3) {
  21230. date3 = fixIosDateFormat(date3);
  21231. date3 = new Date(date3);
  21232. const oldMonth = date3.getMonth();
  21233. date3.setMonth(oldMonth - 1);
  21234. const newMonth = date3.getMonth();
  21235. if (oldMonth !== 0 && newMonth - oldMonth === 0) {
  21236. date3.setMonth(newMonth - 1);
  21237. }
  21238. return this.getDateObj(date3);
  21239. }
  21240. getNextMonthObj(date3) {
  21241. date3 = fixIosDateFormat(date3);
  21242. date3 = new Date(date3);
  21243. const oldMonth = date3.getMonth();
  21244. date3.setMonth(oldMonth + 1);
  21245. const newMonth = date3.getMonth();
  21246. if (newMonth - oldMonth > 1) {
  21247. date3.setMonth(newMonth - 1);
  21248. }
  21249. return this.getDateObj(date3);
  21250. }
  21251. /**
  21252. * 获取指定格式Date对象
  21253. */
  21254. getDateObj(date3) {
  21255. date3 = fixIosDateFormat(date3);
  21256. date3 = new Date(date3);
  21257. return {
  21258. fullDate: getDate(date3),
  21259. year: date3.getFullYear(),
  21260. month: addZero(date3.getMonth() + 1),
  21261. date: addZero(date3.getDate()),
  21262. day: date3.getDay()
  21263. };
  21264. }
  21265. /**
  21266. * 获取上一个月日期集合
  21267. */
  21268. getPreMonthDays(amount2, dateObj) {
  21269. const result = [];
  21270. for (let i = amount2 - 1; i >= 0; i--) {
  21271. const month = dateObj.month > 1 ? dateObj.month - 1 : 12;
  21272. const year = month === 12 ? dateObj.year - 1 : dateObj.year;
  21273. const date3 = new Date(year, month, -i).getDate();
  21274. const fullDate = `${year}-${addZero(month)}-${addZero(date3)}`;
  21275. let multiples = this.multipleStatus.data;
  21276. let multiplesStatus = -1;
  21277. if (this.range && multiples) {
  21278. multiplesStatus = multiples.findIndex((item) => {
  21279. return this.dateEqual(item, fullDate);
  21280. });
  21281. }
  21282. const checked = multiplesStatus !== -1;
  21283. const extraInfo = this.selected && this.selected.find((item) => {
  21284. if (this.dateEqual(fullDate, item.date)) {
  21285. return item;
  21286. }
  21287. });
  21288. result.push({
  21289. fullDate,
  21290. year,
  21291. month,
  21292. date: date3,
  21293. multiple: this.range ? checked : false,
  21294. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21295. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21296. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21297. isToday: fullDate === this.date.fullDate,
  21298. userChecked: false,
  21299. extraInfo
  21300. });
  21301. }
  21302. return result;
  21303. }
  21304. /**
  21305. * 获取本月日期集合
  21306. */
  21307. getCurrentMonthDays(amount2, dateObj) {
  21308. const result = [];
  21309. const fullDate = this.date.fullDate;
  21310. for (let i = 1; i <= amount2; i++) {
  21311. const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
  21312. const isToday = fullDate === currentDate;
  21313. const extraInfo = this.selected && this.selected.find((item) => {
  21314. if (this.dateEqual(currentDate, item.date)) {
  21315. return item;
  21316. }
  21317. });
  21318. if (this.startDate) {
  21319. dateCompare(this.startDate, currentDate);
  21320. }
  21321. if (this.endDate) {
  21322. dateCompare(currentDate, this.endDate);
  21323. }
  21324. let multiples = this.multipleStatus.data;
  21325. let multiplesStatus = -1;
  21326. if (this.range && multiples) {
  21327. multiplesStatus = multiples.findIndex((item) => {
  21328. return this.dateEqual(item, currentDate);
  21329. });
  21330. }
  21331. const checked = multiplesStatus !== -1;
  21332. result.push({
  21333. fullDate: currentDate,
  21334. year: dateObj.year,
  21335. month: dateObj.month,
  21336. date: i,
  21337. multiple: this.range ? checked : false,
  21338. beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21339. afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21340. disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
  21341. isToday,
  21342. userChecked: false,
  21343. extraInfo
  21344. });
  21345. }
  21346. return result;
  21347. }
  21348. /**
  21349. * 获取下一个月日期集合
  21350. */
  21351. _getNextMonthDays(amount2, dateObj) {
  21352. const result = [];
  21353. dateObj.month + 1;
  21354. for (let i = 1; i <= amount2; i++) {
  21355. const month = dateObj.month === 12 ? 1 : dateObj.month * 1 + 1;
  21356. const year = month === 1 ? dateObj.year + 1 : dateObj.year;
  21357. const fullDate = `${year}-${addZero(month)}-${addZero(i)}`;
  21358. let multiples = this.multipleStatus.data;
  21359. let multiplesStatus = -1;
  21360. if (this.range && multiples) {
  21361. multiplesStatus = multiples.findIndex((item) => {
  21362. return this.dateEqual(item, fullDate);
  21363. });
  21364. }
  21365. const checked = multiplesStatus !== -1;
  21366. const extraInfo = this.selected && this.selected.find((item) => {
  21367. if (this.dateEqual(fullDate, item.date)) {
  21368. return item;
  21369. }
  21370. });
  21371. result.push({
  21372. fullDate,
  21373. year,
  21374. date: i,
  21375. month,
  21376. multiple: this.range ? checked : false,
  21377. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21378. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21379. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21380. isToday: fullDate === this.date.fullDate,
  21381. userChecked: false,
  21382. extraInfo
  21383. });
  21384. }
  21385. return result;
  21386. }
  21387. /**
  21388. * 获取当前日期详情
  21389. * @param {Object} date
  21390. */
  21391. getInfo(date3) {
  21392. if (!date3) {
  21393. date3 = /* @__PURE__ */ new Date();
  21394. }
  21395. return this.calendar.find((item) => item.fullDate === this.getDateObj(date3).fullDate);
  21396. }
  21397. /**
  21398. * 比较时间是否相等
  21399. */
  21400. dateEqual(before, after) {
  21401. before = new Date(fixIosDateFormat(before));
  21402. after = new Date(fixIosDateFormat(after));
  21403. return before.valueOf() === after.valueOf();
  21404. }
  21405. /**
  21406. * 比较真实起始日期
  21407. */
  21408. isLogicBefore(currentDate, before, after) {
  21409. let logicBefore = before;
  21410. if (before && after) {
  21411. logicBefore = dateCompare(before, after) ? before : after;
  21412. }
  21413. return this.dateEqual(logicBefore, currentDate);
  21414. }
  21415. isLogicAfter(currentDate, before, after) {
  21416. let logicAfter = after;
  21417. if (before && after) {
  21418. logicAfter = dateCompare(before, after) ? after : before;
  21419. }
  21420. return this.dateEqual(logicAfter, currentDate);
  21421. }
  21422. /**
  21423. * 获取日期范围内所有日期
  21424. * @param {Object} begin
  21425. * @param {Object} end
  21426. */
  21427. geDateAll(begin, end) {
  21428. var arr = [];
  21429. var ab = begin.split("-");
  21430. var ae = end.split("-");
  21431. var db = /* @__PURE__ */ new Date();
  21432. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  21433. var de = /* @__PURE__ */ new Date();
  21434. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  21435. var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
  21436. var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
  21437. for (var k = unixDb; k <= unixDe; ) {
  21438. k = k + 24 * 60 * 60 * 1e3;
  21439. arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
  21440. }
  21441. return arr;
  21442. }
  21443. /**
  21444. * 获取多选状态
  21445. */
  21446. setMultiple(fullDate) {
  21447. if (!this.range)
  21448. return;
  21449. let {
  21450. before,
  21451. after
  21452. } = this.multipleStatus;
  21453. if (before && after) {
  21454. if (!this.lastHover) {
  21455. this.lastHover = true;
  21456. return;
  21457. }
  21458. this.multipleStatus.before = fullDate;
  21459. this.multipleStatus.after = "";
  21460. this.multipleStatus.data = [];
  21461. this.multipleStatus.fulldate = "";
  21462. this.lastHover = false;
  21463. } else {
  21464. if (!before) {
  21465. this.multipleStatus.before = fullDate;
  21466. this.lastHover = false;
  21467. } else {
  21468. this.multipleStatus.after = fullDate;
  21469. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21470. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21471. } else {
  21472. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21473. }
  21474. this.lastHover = true;
  21475. }
  21476. }
  21477. this.getWeeks(fullDate);
  21478. }
  21479. /**
  21480. * 鼠标 hover 更新多选状态
  21481. */
  21482. setHoverMultiple(fullDate) {
  21483. if (!this.range || this.lastHover)
  21484. return;
  21485. const { before } = this.multipleStatus;
  21486. if (!before) {
  21487. this.multipleStatus.before = fullDate;
  21488. } else {
  21489. this.multipleStatus.after = fullDate;
  21490. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21491. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21492. } else {
  21493. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21494. }
  21495. }
  21496. this.getWeeks(fullDate);
  21497. }
  21498. /**
  21499. * 更新默认值多选状态
  21500. */
  21501. setDefaultMultiple(before, after) {
  21502. this.multipleStatus.before = before;
  21503. this.multipleStatus.after = after;
  21504. if (before && after) {
  21505. if (dateCompare(before, after)) {
  21506. this.multipleStatus.data = this.geDateAll(before, after);
  21507. this.getWeeks(after);
  21508. } else {
  21509. this.multipleStatus.data = this.geDateAll(after, before);
  21510. this.getWeeks(before);
  21511. }
  21512. }
  21513. }
  21514. /**
  21515. * 获取每周数据
  21516. * @param {Object} dateData
  21517. */
  21518. getWeeks(dateData) {
  21519. const {
  21520. year,
  21521. month
  21522. } = this.getDateObj(dateData);
  21523. const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
  21524. const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
  21525. const currentMonthDayAmount = new Date(year, month, 0).getDate();
  21526. const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
  21527. const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
  21528. const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
  21529. const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
  21530. const weeks = new Array(6);
  21531. for (let i = 0; i < calendarDays.length; i++) {
  21532. const index2 = Math.floor(i / 7);
  21533. if (!weeks[index2]) {
  21534. weeks[index2] = new Array(7);
  21535. }
  21536. weeks[index2][i % 7] = calendarDays[i];
  21537. }
  21538. this.calendar = calendarDays;
  21539. this.weeks = weeks;
  21540. }
  21541. };
  21542. function getDateTime(date3, hideSecond) {
  21543. return `${getDate(date3)} ${getTime(date3, hideSecond)}`;
  21544. }
  21545. function getDate(date3) {
  21546. date3 = fixIosDateFormat(date3);
  21547. date3 = new Date(date3);
  21548. const year = date3.getFullYear();
  21549. const month = date3.getMonth() + 1;
  21550. const day = date3.getDate();
  21551. return `${year}-${addZero(month)}-${addZero(day)}`;
  21552. }
  21553. function getTime(date3, hideSecond) {
  21554. date3 = fixIosDateFormat(date3);
  21555. date3 = new Date(date3);
  21556. const hour = date3.getHours();
  21557. const minute = date3.getMinutes();
  21558. const second = date3.getSeconds();
  21559. return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
  21560. }
  21561. function addZero(num) {
  21562. if (num < 10) {
  21563. num = `0${num}`;
  21564. }
  21565. return num;
  21566. }
  21567. function getDefaultSecond(hideSecond) {
  21568. return hideSecond ? "00:00" : "00:00:00";
  21569. }
  21570. function dateCompare(startDate, endDate) {
  21571. startDate = new Date(fixIosDateFormat(startDate));
  21572. endDate = new Date(fixIosDateFormat(endDate));
  21573. return startDate <= endDate;
  21574. }
  21575. function checkDate(date3) {
  21576. const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
  21577. return date3.match(dateReg);
  21578. }
  21579. 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])?$/;
  21580. function fixIosDateFormat(value2) {
  21581. if (typeof value2 === "string" && dateTimeReg.test(value2)) {
  21582. value2 = value2.replace(/-/g, "/");
  21583. }
  21584. return value2;
  21585. }
  21586. const _sfc_main$T = {
  21587. props: {
  21588. weeks: {
  21589. type: Object,
  21590. default() {
  21591. return {};
  21592. }
  21593. },
  21594. calendar: {
  21595. type: Object,
  21596. default: () => {
  21597. return {};
  21598. }
  21599. },
  21600. selected: {
  21601. type: Array,
  21602. default: () => {
  21603. return [];
  21604. }
  21605. },
  21606. checkHover: {
  21607. type: Boolean,
  21608. default: false
  21609. }
  21610. },
  21611. methods: {
  21612. choiceDate(weeks) {
  21613. this.$emit("change", weeks);
  21614. },
  21615. handleMousemove(weeks) {
  21616. this.$emit("handleMouse", weeks);
  21617. }
  21618. }
  21619. };
  21620. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  21621. return vue.openBlock(), vue.createElementBlock(
  21622. "view",
  21623. {
  21624. class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
  21625. "uni-calendar-item--disable": $props.weeks.disable,
  21626. "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
  21627. "uni-calendar-item--multiple": $props.weeks.multiple,
  21628. "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
  21629. }]),
  21630. onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
  21631. onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
  21632. },
  21633. [
  21634. vue.createElementVNode(
  21635. "view",
  21636. {
  21637. class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
  21638. "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
  21639. "uni-calendar-item--checked-range-text": $props.checkHover,
  21640. "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
  21641. "uni-calendar-item--multiple": $props.weeks.multiple,
  21642. "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
  21643. "uni-calendar-item--disable": $props.weeks.disable
  21644. }])
  21645. },
  21646. [
  21647. $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  21648. key: 0,
  21649. class: "uni-calendar-item__weeks-box-circle"
  21650. })) : vue.createCommentVNode("v-if", true),
  21651. vue.createElementVNode(
  21652. "text",
  21653. { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
  21654. vue.toDisplayString($props.weeks.date),
  21655. 1
  21656. /* TEXT */
  21657. )
  21658. ],
  21659. 2
  21660. /* CLASS */
  21661. ),
  21662. vue.createElementVNode(
  21663. "view",
  21664. {
  21665. class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday })
  21666. },
  21667. null,
  21668. 2
  21669. /* CLASS */
  21670. )
  21671. ],
  21672. 34
  21673. /* CLASS, NEED_HYDRATION */
  21674. );
  21675. }
  21676. 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"]]);
  21677. const isObject$1 = (val) => val !== null && typeof val === "object";
  21678. const defaultDelimiters = ["{", "}"];
  21679. class BaseFormatter {
  21680. constructor() {
  21681. this._caches = /* @__PURE__ */ Object.create(null);
  21682. }
  21683. interpolate(message, values, delimiters = defaultDelimiters) {
  21684. if (!values) {
  21685. return [message];
  21686. }
  21687. let tokens = this._caches[message];
  21688. if (!tokens) {
  21689. tokens = parse(message, delimiters);
  21690. this._caches[message] = tokens;
  21691. }
  21692. return compile(tokens, values);
  21693. }
  21694. }
  21695. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  21696. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  21697. function parse(format2, [startDelimiter, endDelimiter]) {
  21698. const tokens = [];
  21699. let position = 0;
  21700. let text = "";
  21701. while (position < format2.length) {
  21702. let char = format2[position++];
  21703. if (char === startDelimiter) {
  21704. if (text) {
  21705. tokens.push({ type: "text", value: text });
  21706. }
  21707. text = "";
  21708. let sub = "";
  21709. char = format2[position++];
  21710. while (char !== void 0 && char !== endDelimiter) {
  21711. sub += char;
  21712. char = format2[position++];
  21713. }
  21714. const isClosed = char === endDelimiter;
  21715. const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  21716. tokens.push({ value: sub, type: type2 });
  21717. } else {
  21718. text += char;
  21719. }
  21720. }
  21721. text && tokens.push({ type: "text", value: text });
  21722. return tokens;
  21723. }
  21724. function compile(tokens, values) {
  21725. const compiled = [];
  21726. let index2 = 0;
  21727. const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
  21728. if (mode === "unknown") {
  21729. return compiled;
  21730. }
  21731. while (index2 < tokens.length) {
  21732. const token = tokens[index2];
  21733. switch (token.type) {
  21734. case "text":
  21735. compiled.push(token.value);
  21736. break;
  21737. case "list":
  21738. compiled.push(values[parseInt(token.value, 10)]);
  21739. break;
  21740. case "named":
  21741. if (mode === "named") {
  21742. compiled.push(values[token.value]);
  21743. } else {
  21744. {
  21745. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  21746. }
  21747. }
  21748. break;
  21749. case "unknown":
  21750. {
  21751. console.warn(`Detect 'unknown' type of token!`);
  21752. }
  21753. break;
  21754. }
  21755. index2++;
  21756. }
  21757. return compiled;
  21758. }
  21759. const LOCALE_ZH_HANS = "zh-Hans";
  21760. const LOCALE_ZH_HANT = "zh-Hant";
  21761. const LOCALE_EN = "en";
  21762. const LOCALE_FR = "fr";
  21763. const LOCALE_ES = "es";
  21764. const hasOwnProperty = Object.prototype.hasOwnProperty;
  21765. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  21766. const defaultFormatter = new BaseFormatter();
  21767. function include(str, parts) {
  21768. return !!parts.find((part) => str.indexOf(part) !== -1);
  21769. }
  21770. function startsWith(str, parts) {
  21771. return parts.find((part) => str.indexOf(part) === 0);
  21772. }
  21773. function normalizeLocale(locale, messages2) {
  21774. if (!locale) {
  21775. return;
  21776. }
  21777. locale = locale.trim().replace(/_/g, "-");
  21778. if (messages2 && messages2[locale]) {
  21779. return locale;
  21780. }
  21781. locale = locale.toLowerCase();
  21782. if (locale === "chinese") {
  21783. return LOCALE_ZH_HANS;
  21784. }
  21785. if (locale.indexOf("zh") === 0) {
  21786. if (locale.indexOf("-hans") > -1) {
  21787. return LOCALE_ZH_HANS;
  21788. }
  21789. if (locale.indexOf("-hant") > -1) {
  21790. return LOCALE_ZH_HANT;
  21791. }
  21792. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  21793. return LOCALE_ZH_HANT;
  21794. }
  21795. return LOCALE_ZH_HANS;
  21796. }
  21797. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  21798. if (messages2 && Object.keys(messages2).length > 0) {
  21799. locales = Object.keys(messages2);
  21800. }
  21801. const lang = startsWith(locale, locales);
  21802. if (lang) {
  21803. return lang;
  21804. }
  21805. }
  21806. class I18n {
  21807. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  21808. this.locale = LOCALE_EN;
  21809. this.fallbackLocale = LOCALE_EN;
  21810. this.message = {};
  21811. this.messages = {};
  21812. this.watchers = [];
  21813. if (fallbackLocale) {
  21814. this.fallbackLocale = fallbackLocale;
  21815. }
  21816. this.formater = formater2 || defaultFormatter;
  21817. this.messages = messages2 || {};
  21818. this.setLocale(locale || LOCALE_EN);
  21819. if (watcher) {
  21820. this.watchLocale(watcher);
  21821. }
  21822. }
  21823. setLocale(locale) {
  21824. const oldLocale = this.locale;
  21825. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  21826. if (!this.messages[this.locale]) {
  21827. this.messages[this.locale] = {};
  21828. }
  21829. this.message = this.messages[this.locale];
  21830. if (oldLocale !== this.locale) {
  21831. this.watchers.forEach((watcher) => {
  21832. watcher(this.locale, oldLocale);
  21833. });
  21834. }
  21835. }
  21836. getLocale() {
  21837. return this.locale;
  21838. }
  21839. watchLocale(fn) {
  21840. const index2 = this.watchers.push(fn) - 1;
  21841. return () => {
  21842. this.watchers.splice(index2, 1);
  21843. };
  21844. }
  21845. add(locale, message, override = true) {
  21846. const curMessages = this.messages[locale];
  21847. if (curMessages) {
  21848. if (override) {
  21849. Object.assign(curMessages, message);
  21850. } else {
  21851. Object.keys(message).forEach((key) => {
  21852. if (!hasOwn(curMessages, key)) {
  21853. curMessages[key] = message[key];
  21854. }
  21855. });
  21856. }
  21857. } else {
  21858. this.messages[locale] = message;
  21859. }
  21860. }
  21861. f(message, values, delimiters) {
  21862. return this.formater.interpolate(message, values, delimiters).join("");
  21863. }
  21864. t(key, locale, values) {
  21865. let message = this.message;
  21866. if (typeof locale === "string") {
  21867. locale = normalizeLocale(locale, this.messages);
  21868. locale && (message = this.messages[locale]);
  21869. } else {
  21870. values = locale;
  21871. }
  21872. if (!hasOwn(message, key)) {
  21873. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  21874. return key;
  21875. }
  21876. return this.formater.interpolate(message[key], values).join("");
  21877. }
  21878. }
  21879. function watchAppLocale(appVm, i18n) {
  21880. if (appVm.$watchLocale) {
  21881. appVm.$watchLocale((newLocale) => {
  21882. i18n.setLocale(newLocale);
  21883. });
  21884. } else {
  21885. appVm.$watch(() => appVm.$locale, (newLocale) => {
  21886. i18n.setLocale(newLocale);
  21887. });
  21888. }
  21889. }
  21890. function getDefaultLocale() {
  21891. if (typeof uni !== "undefined" && uni.getLocale) {
  21892. return uni.getLocale();
  21893. }
  21894. if (typeof global !== "undefined" && global.getLocale) {
  21895. return global.getLocale();
  21896. }
  21897. return LOCALE_EN;
  21898. }
  21899. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  21900. if (typeof locale !== "string") {
  21901. const options = [
  21902. messages2,
  21903. locale
  21904. ];
  21905. locale = options[0];
  21906. messages2 = options[1];
  21907. }
  21908. if (typeof locale !== "string") {
  21909. locale = getDefaultLocale();
  21910. }
  21911. if (typeof fallbackLocale !== "string") {
  21912. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  21913. }
  21914. const i18n = new I18n({
  21915. locale,
  21916. fallbackLocale,
  21917. messages: messages2,
  21918. watcher
  21919. });
  21920. let t2 = (key, values) => {
  21921. if (typeof getApp !== "function") {
  21922. t2 = function(key2, values2) {
  21923. return i18n.t(key2, values2);
  21924. };
  21925. } else {
  21926. let isWatchedAppLocale = false;
  21927. t2 = function(key2, values2) {
  21928. const appVm = getApp().$vm;
  21929. if (appVm) {
  21930. appVm.$locale;
  21931. if (!isWatchedAppLocale) {
  21932. isWatchedAppLocale = true;
  21933. watchAppLocale(appVm, i18n);
  21934. }
  21935. }
  21936. return i18n.t(key2, values2);
  21937. };
  21938. }
  21939. return t2(key, values);
  21940. };
  21941. return {
  21942. i18n,
  21943. f(message, values, delimiters) {
  21944. return i18n.f(message, values, delimiters);
  21945. },
  21946. t(key, values) {
  21947. return t2(key, values);
  21948. },
  21949. add(locale2, message, override = true) {
  21950. return i18n.add(locale2, message, override);
  21951. },
  21952. watch(fn) {
  21953. return i18n.watchLocale(fn);
  21954. },
  21955. getLocale() {
  21956. return i18n.getLocale();
  21957. },
  21958. setLocale(newLocale) {
  21959. return i18n.setLocale(newLocale);
  21960. }
  21961. };
  21962. }
  21963. const en = {
  21964. "uni-datetime-picker.selectDate": "select date",
  21965. "uni-datetime-picker.selectTime": "select time",
  21966. "uni-datetime-picker.selectDateTime": "select date and time",
  21967. "uni-datetime-picker.startDate": "start date",
  21968. "uni-datetime-picker.endDate": "end date",
  21969. "uni-datetime-picker.startTime": "start time",
  21970. "uni-datetime-picker.endTime": "end time",
  21971. "uni-datetime-picker.ok": "ok",
  21972. "uni-datetime-picker.clear": "clear",
  21973. "uni-datetime-picker.cancel": "cancel",
  21974. "uni-datetime-picker.year": "-",
  21975. "uni-datetime-picker.month": "",
  21976. "uni-calender.MON": "MON",
  21977. "uni-calender.TUE": "TUE",
  21978. "uni-calender.WED": "WED",
  21979. "uni-calender.THU": "THU",
  21980. "uni-calender.FRI": "FRI",
  21981. "uni-calender.SAT": "SAT",
  21982. "uni-calender.SUN": "SUN",
  21983. "uni-calender.confirm": "confirm"
  21984. };
  21985. const zhHans = {
  21986. "uni-datetime-picker.selectDate": "选择日期",
  21987. "uni-datetime-picker.selectTime": "选择时间",
  21988. "uni-datetime-picker.selectDateTime": "选择日期时间",
  21989. "uni-datetime-picker.startDate": "开始日期",
  21990. "uni-datetime-picker.endDate": "结束日期",
  21991. "uni-datetime-picker.startTime": "开始时间",
  21992. "uni-datetime-picker.endTime": "结束时间",
  21993. "uni-datetime-picker.ok": "确定",
  21994. "uni-datetime-picker.clear": "清除",
  21995. "uni-datetime-picker.cancel": "取消",
  21996. "uni-datetime-picker.year": "年",
  21997. "uni-datetime-picker.month": "月",
  21998. "uni-calender.SUN": "日",
  21999. "uni-calender.MON": "一",
  22000. "uni-calender.TUE": "二",
  22001. "uni-calender.WED": "三",
  22002. "uni-calender.THU": "四",
  22003. "uni-calender.FRI": "五",
  22004. "uni-calender.SAT": "六",
  22005. "uni-calender.confirm": "确认"
  22006. };
  22007. const zhHant = {
  22008. "uni-datetime-picker.selectDate": "選擇日期",
  22009. "uni-datetime-picker.selectTime": "選擇時間",
  22010. "uni-datetime-picker.selectDateTime": "選擇日期時間",
  22011. "uni-datetime-picker.startDate": "開始日期",
  22012. "uni-datetime-picker.endDate": "結束日期",
  22013. "uni-datetime-picker.startTime": "開始时间",
  22014. "uni-datetime-picker.endTime": "結束时间",
  22015. "uni-datetime-picker.ok": "確定",
  22016. "uni-datetime-picker.clear": "清除",
  22017. "uni-datetime-picker.cancel": "取消",
  22018. "uni-datetime-picker.year": "年",
  22019. "uni-datetime-picker.month": "月",
  22020. "uni-calender.SUN": "日",
  22021. "uni-calender.MON": "一",
  22022. "uni-calender.TUE": "二",
  22023. "uni-calender.WED": "三",
  22024. "uni-calender.THU": "四",
  22025. "uni-calender.FRI": "五",
  22026. "uni-calender.SAT": "六",
  22027. "uni-calender.confirm": "確認"
  22028. };
  22029. const i18nMessages = {
  22030. en,
  22031. "zh-Hans": zhHans,
  22032. "zh-Hant": zhHant
  22033. };
  22034. const { t: t$1 } = initVueI18n(i18nMessages);
  22035. const _sfc_main$S = {
  22036. name: "UniDatetimePicker",
  22037. data() {
  22038. return {
  22039. indicatorStyle: `height: 50px;`,
  22040. visible: false,
  22041. fixNvueBug: {},
  22042. dateShow: true,
  22043. timeShow: true,
  22044. title: "日期和时间",
  22045. // 输入框当前时间
  22046. time: "",
  22047. // 当前的年月日时分秒
  22048. year: 1920,
  22049. month: 0,
  22050. day: 0,
  22051. hour: 0,
  22052. minute: 0,
  22053. second: 0,
  22054. // 起始时间
  22055. startYear: 1920,
  22056. startMonth: 1,
  22057. startDay: 1,
  22058. startHour: 0,
  22059. startMinute: 0,
  22060. startSecond: 0,
  22061. // 结束时间
  22062. endYear: 2120,
  22063. endMonth: 12,
  22064. endDay: 31,
  22065. endHour: 23,
  22066. endMinute: 59,
  22067. endSecond: 59
  22068. };
  22069. },
  22070. props: {
  22071. type: {
  22072. type: String,
  22073. default: "datetime"
  22074. },
  22075. value: {
  22076. type: [String, Number],
  22077. default: ""
  22078. },
  22079. modelValue: {
  22080. type: [String, Number],
  22081. default: ""
  22082. },
  22083. start: {
  22084. type: [Number, String],
  22085. default: ""
  22086. },
  22087. end: {
  22088. type: [Number, String],
  22089. default: ""
  22090. },
  22091. returnType: {
  22092. type: String,
  22093. default: "string"
  22094. },
  22095. disabled: {
  22096. type: [Boolean, String],
  22097. default: false
  22098. },
  22099. border: {
  22100. type: [Boolean, String],
  22101. default: true
  22102. },
  22103. hideSecond: {
  22104. type: [Boolean, String],
  22105. default: false
  22106. }
  22107. },
  22108. watch: {
  22109. modelValue: {
  22110. handler(newVal) {
  22111. if (newVal) {
  22112. this.parseValue(fixIosDateFormat(newVal));
  22113. this.initTime(false);
  22114. } else {
  22115. this.time = "";
  22116. this.parseValue(Date.now());
  22117. }
  22118. },
  22119. immediate: true
  22120. },
  22121. type: {
  22122. handler(newValue) {
  22123. if (newValue === "date") {
  22124. this.dateShow = true;
  22125. this.timeShow = false;
  22126. this.title = "日期";
  22127. } else if (newValue === "time") {
  22128. this.dateShow = false;
  22129. this.timeShow = true;
  22130. this.title = "时间";
  22131. } else {
  22132. this.dateShow = true;
  22133. this.timeShow = true;
  22134. this.title = "日期和时间";
  22135. }
  22136. },
  22137. immediate: true
  22138. },
  22139. start: {
  22140. handler(newVal) {
  22141. this.parseDatetimeRange(fixIosDateFormat(newVal), "start");
  22142. },
  22143. immediate: true
  22144. },
  22145. end: {
  22146. handler(newVal) {
  22147. this.parseDatetimeRange(fixIosDateFormat(newVal), "end");
  22148. },
  22149. immediate: true
  22150. },
  22151. // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22152. months(newVal) {
  22153. this.checkValue("month", this.month, newVal);
  22154. },
  22155. days(newVal) {
  22156. this.checkValue("day", this.day, newVal);
  22157. },
  22158. hours(newVal) {
  22159. this.checkValue("hour", this.hour, newVal);
  22160. },
  22161. minutes(newVal) {
  22162. this.checkValue("minute", this.minute, newVal);
  22163. },
  22164. seconds(newVal) {
  22165. this.checkValue("second", this.second, newVal);
  22166. }
  22167. },
  22168. computed: {
  22169. // 当前年、月、日、时、分、秒选择范围
  22170. years() {
  22171. return this.getCurrentRange("year");
  22172. },
  22173. months() {
  22174. return this.getCurrentRange("month");
  22175. },
  22176. days() {
  22177. return this.getCurrentRange("day");
  22178. },
  22179. hours() {
  22180. return this.getCurrentRange("hour");
  22181. },
  22182. minutes() {
  22183. return this.getCurrentRange("minute");
  22184. },
  22185. seconds() {
  22186. return this.getCurrentRange("second");
  22187. },
  22188. // picker 当前值数组
  22189. ymd() {
  22190. return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
  22191. },
  22192. hms() {
  22193. return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
  22194. },
  22195. // 当前 date 是 start
  22196. currentDateIsStart() {
  22197. return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
  22198. },
  22199. // 当前 date 是 end
  22200. currentDateIsEnd() {
  22201. return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
  22202. },
  22203. // 当前年、月、日、时、分、秒的最小值和最大值
  22204. minYear() {
  22205. return this.startYear;
  22206. },
  22207. maxYear() {
  22208. return this.endYear;
  22209. },
  22210. minMonth() {
  22211. if (this.year === this.startYear) {
  22212. return this.startMonth;
  22213. } else {
  22214. return 1;
  22215. }
  22216. },
  22217. maxMonth() {
  22218. if (this.year === this.endYear) {
  22219. return this.endMonth;
  22220. } else {
  22221. return 12;
  22222. }
  22223. },
  22224. minDay() {
  22225. if (this.year === this.startYear && this.month === this.startMonth) {
  22226. return this.startDay;
  22227. } else {
  22228. return 1;
  22229. }
  22230. },
  22231. maxDay() {
  22232. if (this.year === this.endYear && this.month === this.endMonth) {
  22233. return this.endDay;
  22234. } else {
  22235. return this.daysInMonth(this.year, this.month);
  22236. }
  22237. },
  22238. minHour() {
  22239. if (this.type === "datetime") {
  22240. if (this.currentDateIsStart) {
  22241. return this.startHour;
  22242. } else {
  22243. return 0;
  22244. }
  22245. }
  22246. if (this.type === "time") {
  22247. return this.startHour;
  22248. }
  22249. },
  22250. maxHour() {
  22251. if (this.type === "datetime") {
  22252. if (this.currentDateIsEnd) {
  22253. return this.endHour;
  22254. } else {
  22255. return 23;
  22256. }
  22257. }
  22258. if (this.type === "time") {
  22259. return this.endHour;
  22260. }
  22261. },
  22262. minMinute() {
  22263. if (this.type === "datetime") {
  22264. if (this.currentDateIsStart && this.hour === this.startHour) {
  22265. return this.startMinute;
  22266. } else {
  22267. return 0;
  22268. }
  22269. }
  22270. if (this.type === "time") {
  22271. if (this.hour === this.startHour) {
  22272. return this.startMinute;
  22273. } else {
  22274. return 0;
  22275. }
  22276. }
  22277. },
  22278. maxMinute() {
  22279. if (this.type === "datetime") {
  22280. if (this.currentDateIsEnd && this.hour === this.endHour) {
  22281. return this.endMinute;
  22282. } else {
  22283. return 59;
  22284. }
  22285. }
  22286. if (this.type === "time") {
  22287. if (this.hour === this.endHour) {
  22288. return this.endMinute;
  22289. } else {
  22290. return 59;
  22291. }
  22292. }
  22293. },
  22294. minSecond() {
  22295. if (this.type === "datetime") {
  22296. if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
  22297. return this.startSecond;
  22298. } else {
  22299. return 0;
  22300. }
  22301. }
  22302. if (this.type === "time") {
  22303. if (this.hour === this.startHour && this.minute === this.startMinute) {
  22304. return this.startSecond;
  22305. } else {
  22306. return 0;
  22307. }
  22308. }
  22309. },
  22310. maxSecond() {
  22311. if (this.type === "datetime") {
  22312. if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
  22313. return this.endSecond;
  22314. } else {
  22315. return 59;
  22316. }
  22317. }
  22318. if (this.type === "time") {
  22319. if (this.hour === this.endHour && this.minute === this.endMinute) {
  22320. return this.endSecond;
  22321. } else {
  22322. return 59;
  22323. }
  22324. }
  22325. },
  22326. /**
  22327. * for i18n
  22328. */
  22329. selectTimeText() {
  22330. return t$1("uni-datetime-picker.selectTime");
  22331. },
  22332. okText() {
  22333. return t$1("uni-datetime-picker.ok");
  22334. },
  22335. clearText() {
  22336. return t$1("uni-datetime-picker.clear");
  22337. },
  22338. cancelText() {
  22339. return t$1("uni-datetime-picker.cancel");
  22340. }
  22341. },
  22342. mounted() {
  22343. },
  22344. methods: {
  22345. /**
  22346. * @param {Object} item
  22347. * 小于 10 在前面加个 0
  22348. */
  22349. lessThanTen(item) {
  22350. return item < 10 ? "0" + item : item;
  22351. },
  22352. /**
  22353. * 解析时分秒字符串,例如:00:00:00
  22354. * @param {String} timeString
  22355. */
  22356. parseTimeType(timeString) {
  22357. if (timeString) {
  22358. let timeArr = timeString.split(":");
  22359. this.hour = Number(timeArr[0]);
  22360. this.minute = Number(timeArr[1]);
  22361. this.second = Number(timeArr[2]);
  22362. }
  22363. },
  22364. /**
  22365. * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
  22366. * @param {String | Number} datetime
  22367. */
  22368. initPickerValue(datetime) {
  22369. let defaultValue = null;
  22370. if (datetime) {
  22371. defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
  22372. } else {
  22373. defaultValue = Date.now();
  22374. defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
  22375. }
  22376. this.parseValue(defaultValue);
  22377. },
  22378. /**
  22379. * 初始值规则:
  22380. * - 用户设置初始值 value
  22381. * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
  22382. * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
  22383. * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
  22384. * - 无起始终止时间,则初始值为 value
  22385. * - 无初始值 value,则初始值为当前本地时间 Date.now()
  22386. * @param {Object} value
  22387. * @param {Object} dateBase
  22388. */
  22389. compareValueWithStartAndEnd(value2, start, end) {
  22390. let winner = null;
  22391. value2 = this.superTimeStamp(value2);
  22392. start = this.superTimeStamp(start);
  22393. end = this.superTimeStamp(end);
  22394. if (start && end) {
  22395. if (value2 < start) {
  22396. winner = new Date(start);
  22397. } else if (value2 > end) {
  22398. winner = new Date(end);
  22399. } else {
  22400. winner = new Date(value2);
  22401. }
  22402. } else if (start && !end) {
  22403. winner = start <= value2 ? new Date(value2) : new Date(start);
  22404. } else if (!start && end) {
  22405. winner = value2 <= end ? new Date(value2) : new Date(end);
  22406. } else {
  22407. winner = new Date(value2);
  22408. }
  22409. return winner;
  22410. },
  22411. /**
  22412. * 转换为可比较的时间戳,接受日期、时分秒、时间戳
  22413. * @param {Object} value
  22414. */
  22415. superTimeStamp(value2) {
  22416. let dateBase = "";
  22417. if (this.type === "time" && value2 && typeof value2 === "string") {
  22418. const now2 = /* @__PURE__ */ new Date();
  22419. const year = now2.getFullYear();
  22420. const month = now2.getMonth() + 1;
  22421. const day = now2.getDate();
  22422. dateBase = year + "/" + month + "/" + day + " ";
  22423. }
  22424. if (Number(value2)) {
  22425. value2 = parseInt(value2);
  22426. dateBase = 0;
  22427. }
  22428. return this.createTimeStamp(dateBase + value2);
  22429. },
  22430. /**
  22431. * 解析默认值 value,字符串、时间戳
  22432. * @param {Object} defaultTime
  22433. */
  22434. parseValue(value2) {
  22435. if (!value2) {
  22436. return;
  22437. }
  22438. if (this.type === "time" && typeof value2 === "string") {
  22439. this.parseTimeType(value2);
  22440. } else {
  22441. let defaultDate = null;
  22442. defaultDate = new Date(value2);
  22443. if (this.type !== "time") {
  22444. this.year = defaultDate.getFullYear();
  22445. this.month = defaultDate.getMonth() + 1;
  22446. this.day = defaultDate.getDate();
  22447. }
  22448. if (this.type !== "date") {
  22449. this.hour = defaultDate.getHours();
  22450. this.minute = defaultDate.getMinutes();
  22451. this.second = defaultDate.getSeconds();
  22452. }
  22453. }
  22454. if (this.hideSecond) {
  22455. this.second = 0;
  22456. }
  22457. },
  22458. /**
  22459. * 解析可选择时间范围 start、end,年月日字符串、时间戳
  22460. * @param {Object} defaultTime
  22461. */
  22462. parseDatetimeRange(point, pointType) {
  22463. if (!point) {
  22464. if (pointType === "start") {
  22465. this.startYear = 1920;
  22466. this.startMonth = 1;
  22467. this.startDay = 1;
  22468. this.startHour = 0;
  22469. this.startMinute = 0;
  22470. this.startSecond = 0;
  22471. }
  22472. if (pointType === "end") {
  22473. this.endYear = 2120;
  22474. this.endMonth = 12;
  22475. this.endDay = 31;
  22476. this.endHour = 23;
  22477. this.endMinute = 59;
  22478. this.endSecond = 59;
  22479. }
  22480. return;
  22481. }
  22482. if (this.type === "time") {
  22483. const pointArr = point.split(":");
  22484. this[pointType + "Hour"] = Number(pointArr[0]);
  22485. this[pointType + "Minute"] = Number(pointArr[1]);
  22486. this[pointType + "Second"] = Number(pointArr[2]);
  22487. } else {
  22488. if (!point) {
  22489. pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
  22490. return;
  22491. }
  22492. if (Number(point)) {
  22493. point = parseInt(point);
  22494. }
  22495. const hasTime = /[0-9]:[0-9]/;
  22496. if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
  22497. point
  22498. )) {
  22499. point = point + " 23:59:59";
  22500. }
  22501. const pointDate = new Date(point);
  22502. this[pointType + "Year"] = pointDate.getFullYear();
  22503. this[pointType + "Month"] = pointDate.getMonth() + 1;
  22504. this[pointType + "Day"] = pointDate.getDate();
  22505. if (this.type === "datetime") {
  22506. this[pointType + "Hour"] = pointDate.getHours();
  22507. this[pointType + "Minute"] = pointDate.getMinutes();
  22508. this[pointType + "Second"] = pointDate.getSeconds();
  22509. }
  22510. }
  22511. },
  22512. // 获取 年、月、日、时、分、秒 当前可选范围
  22513. getCurrentRange(value2) {
  22514. const range2 = [];
  22515. for (let i = this["min" + this.capitalize(value2)]; i <= this["max" + this.capitalize(value2)]; i++) {
  22516. range2.push(i);
  22517. }
  22518. return range2;
  22519. },
  22520. // 字符串首字母大写
  22521. capitalize(str) {
  22522. return str.charAt(0).toUpperCase() + str.slice(1);
  22523. },
  22524. // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22525. checkValue(name, value2, values) {
  22526. if (values.indexOf(value2) === -1) {
  22527. this[name] = values[0];
  22528. }
  22529. },
  22530. // 每个月的实际天数
  22531. daysInMonth(year, month) {
  22532. return new Date(year, month, 0).getDate();
  22533. },
  22534. //兼容 iOS、safari 日期格式
  22535. fixIosDateFormat(value2) {
  22536. if (typeof value2 === "string") {
  22537. value2 = value2.replace(/-/g, "/");
  22538. }
  22539. return value2;
  22540. },
  22541. /**
  22542. * 生成时间戳
  22543. * @param {Object} time
  22544. */
  22545. createTimeStamp(time) {
  22546. if (!time)
  22547. return;
  22548. if (typeof time === "number") {
  22549. return time;
  22550. } else {
  22551. time = time.replace(/-/g, "/");
  22552. if (this.type === "date") {
  22553. time = time + " 00:00:00";
  22554. }
  22555. return Date.parse(time);
  22556. }
  22557. },
  22558. /**
  22559. * 生成日期或时间的字符串
  22560. */
  22561. createDomSting() {
  22562. const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
  22563. let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
  22564. if (!this.hideSecond) {
  22565. hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
  22566. }
  22567. if (this.type === "date") {
  22568. return yymmdd;
  22569. } else if (this.type === "time") {
  22570. return hhmmss;
  22571. } else {
  22572. return yymmdd + " " + hhmmss;
  22573. }
  22574. },
  22575. /**
  22576. * 初始化返回值,并抛出 change 事件
  22577. */
  22578. initTime(emit2 = true) {
  22579. this.time = this.createDomSting();
  22580. if (!emit2)
  22581. return;
  22582. if (this.returnType === "timestamp" && this.type !== "time") {
  22583. this.$emit("change", this.createTimeStamp(this.time));
  22584. this.$emit("input", this.createTimeStamp(this.time));
  22585. this.$emit("update:modelValue", this.createTimeStamp(this.time));
  22586. } else {
  22587. this.$emit("change", this.time);
  22588. this.$emit("input", this.time);
  22589. this.$emit("update:modelValue", this.time);
  22590. }
  22591. },
  22592. /**
  22593. * 用户选择日期或时间更新 data
  22594. * @param {Object} e
  22595. */
  22596. bindDateChange(e) {
  22597. const val = e.detail.value;
  22598. this.year = this.years[val[0]];
  22599. this.month = this.months[val[1]];
  22600. this.day = this.days[val[2]];
  22601. },
  22602. bindTimeChange(e) {
  22603. const val = e.detail.value;
  22604. this.hour = this.hours[val[0]];
  22605. this.minute = this.minutes[val[1]];
  22606. this.second = this.seconds[val[2]];
  22607. },
  22608. /**
  22609. * 初始化弹出层
  22610. */
  22611. initTimePicker() {
  22612. if (this.disabled)
  22613. return;
  22614. const value2 = fixIosDateFormat(this.time);
  22615. this.initPickerValue(value2);
  22616. this.visible = !this.visible;
  22617. },
  22618. /**
  22619. * 触发或关闭弹框
  22620. */
  22621. tiggerTimePicker(e) {
  22622. this.visible = !this.visible;
  22623. },
  22624. /**
  22625. * 用户点击“清空”按钮,清空当前值
  22626. */
  22627. clearTime() {
  22628. this.time = "";
  22629. this.$emit("change", this.time);
  22630. this.$emit("input", this.time);
  22631. this.$emit("update:modelValue", this.time);
  22632. this.tiggerTimePicker();
  22633. },
  22634. /**
  22635. * 用户点击“确定”按钮
  22636. */
  22637. setTime() {
  22638. this.initTime();
  22639. this.tiggerTimePicker();
  22640. }
  22641. }
  22642. };
  22643. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  22644. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
  22645. vue.createElementVNode("view", {
  22646. onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
  22647. }, [
  22648. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  22649. vue.createElementVNode(
  22650. "view",
  22651. {
  22652. class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
  22653. },
  22654. [
  22655. vue.createElementVNode(
  22656. "text",
  22657. { class: "uni-datetime-picker-text" },
  22658. vue.toDisplayString($data.time),
  22659. 1
  22660. /* TEXT */
  22661. ),
  22662. !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
  22663. key: 0,
  22664. class: "uni-datetime-picker-time"
  22665. }, [
  22666. vue.createElementVNode(
  22667. "text",
  22668. { class: "uni-datetime-picker-text" },
  22669. vue.toDisplayString($options.selectTimeText),
  22670. 1
  22671. /* TEXT */
  22672. )
  22673. ])) : vue.createCommentVNode("v-if", true)
  22674. ],
  22675. 2
  22676. /* CLASS */
  22677. )
  22678. ], true)
  22679. ]),
  22680. $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  22681. key: 0,
  22682. id: "mask",
  22683. class: "uni-datetime-picker-mask",
  22684. onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22685. })) : vue.createCommentVNode("v-if", true),
  22686. $data.visible ? (vue.openBlock(), vue.createElementBlock(
  22687. "view",
  22688. {
  22689. key: 1,
  22690. class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
  22691. style: vue.normalizeStyle($data.fixNvueBug)
  22692. },
  22693. [
  22694. vue.createElementVNode("view", { class: "uni-title" }, [
  22695. vue.createElementVNode(
  22696. "text",
  22697. { class: "uni-datetime-picker-text" },
  22698. vue.toDisplayString($options.selectTimeText),
  22699. 1
  22700. /* TEXT */
  22701. )
  22702. ]),
  22703. $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22704. key: 0,
  22705. class: "uni-datetime-picker__container-box"
  22706. }, [
  22707. vue.createElementVNode("picker-view", {
  22708. class: "uni-datetime-picker-view",
  22709. "indicator-style": $data.indicatorStyle,
  22710. value: $options.ymd,
  22711. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  22712. }, [
  22713. vue.createElementVNode("picker-view-column", null, [
  22714. (vue.openBlock(true), vue.createElementBlock(
  22715. vue.Fragment,
  22716. null,
  22717. vue.renderList($options.years, (item, index2) => {
  22718. return vue.openBlock(), vue.createElementBlock("view", {
  22719. class: "uni-datetime-picker-item",
  22720. key: index2
  22721. }, [
  22722. vue.createElementVNode(
  22723. "text",
  22724. { class: "uni-datetime-picker-item" },
  22725. vue.toDisplayString($options.lessThanTen(item)),
  22726. 1
  22727. /* TEXT */
  22728. )
  22729. ]);
  22730. }),
  22731. 128
  22732. /* KEYED_FRAGMENT */
  22733. ))
  22734. ]),
  22735. vue.createElementVNode("picker-view-column", null, [
  22736. (vue.openBlock(true), vue.createElementBlock(
  22737. vue.Fragment,
  22738. null,
  22739. vue.renderList($options.months, (item, index2) => {
  22740. return vue.openBlock(), vue.createElementBlock("view", {
  22741. class: "uni-datetime-picker-item",
  22742. key: index2
  22743. }, [
  22744. vue.createElementVNode(
  22745. "text",
  22746. { class: "uni-datetime-picker-item" },
  22747. vue.toDisplayString($options.lessThanTen(item)),
  22748. 1
  22749. /* TEXT */
  22750. )
  22751. ]);
  22752. }),
  22753. 128
  22754. /* KEYED_FRAGMENT */
  22755. ))
  22756. ]),
  22757. vue.createElementVNode("picker-view-column", null, [
  22758. (vue.openBlock(true), vue.createElementBlock(
  22759. vue.Fragment,
  22760. null,
  22761. vue.renderList($options.days, (item, index2) => {
  22762. return vue.openBlock(), vue.createElementBlock("view", {
  22763. class: "uni-datetime-picker-item",
  22764. key: index2
  22765. }, [
  22766. vue.createElementVNode(
  22767. "text",
  22768. { class: "uni-datetime-picker-item" },
  22769. vue.toDisplayString($options.lessThanTen(item)),
  22770. 1
  22771. /* TEXT */
  22772. )
  22773. ]);
  22774. }),
  22775. 128
  22776. /* KEYED_FRAGMENT */
  22777. ))
  22778. ])
  22779. ], 40, ["indicator-style", "value"]),
  22780. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22781. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
  22782. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
  22783. ])) : vue.createCommentVNode("v-if", true),
  22784. $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22785. key: 1,
  22786. class: "uni-datetime-picker__container-box"
  22787. }, [
  22788. vue.createElementVNode("picker-view", {
  22789. class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
  22790. "indicator-style": $data.indicatorStyle,
  22791. value: $options.hms,
  22792. onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
  22793. }, [
  22794. vue.createElementVNode("picker-view-column", null, [
  22795. (vue.openBlock(true), vue.createElementBlock(
  22796. vue.Fragment,
  22797. null,
  22798. vue.renderList($options.hours, (item, index2) => {
  22799. return vue.openBlock(), vue.createElementBlock("view", {
  22800. class: "uni-datetime-picker-item",
  22801. key: index2
  22802. }, [
  22803. vue.createElementVNode(
  22804. "text",
  22805. { class: "uni-datetime-picker-item" },
  22806. vue.toDisplayString($options.lessThanTen(item)),
  22807. 1
  22808. /* TEXT */
  22809. )
  22810. ]);
  22811. }),
  22812. 128
  22813. /* KEYED_FRAGMENT */
  22814. ))
  22815. ]),
  22816. vue.createElementVNode("picker-view-column", null, [
  22817. (vue.openBlock(true), vue.createElementBlock(
  22818. vue.Fragment,
  22819. null,
  22820. vue.renderList($options.minutes, (item, index2) => {
  22821. return vue.openBlock(), vue.createElementBlock("view", {
  22822. class: "uni-datetime-picker-item",
  22823. key: index2
  22824. }, [
  22825. vue.createElementVNode(
  22826. "text",
  22827. { class: "uni-datetime-picker-item" },
  22828. vue.toDisplayString($options.lessThanTen(item)),
  22829. 1
  22830. /* TEXT */
  22831. )
  22832. ]);
  22833. }),
  22834. 128
  22835. /* KEYED_FRAGMENT */
  22836. ))
  22837. ]),
  22838. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
  22839. (vue.openBlock(true), vue.createElementBlock(
  22840. vue.Fragment,
  22841. null,
  22842. vue.renderList($options.seconds, (item, index2) => {
  22843. return vue.openBlock(), vue.createElementBlock("view", {
  22844. class: "uni-datetime-picker-item",
  22845. key: index2
  22846. }, [
  22847. vue.createElementVNode(
  22848. "text",
  22849. { class: "uni-datetime-picker-item" },
  22850. vue.toDisplayString($options.lessThanTen(item)),
  22851. 1
  22852. /* TEXT */
  22853. )
  22854. ]);
  22855. }),
  22856. 128
  22857. /* KEYED_FRAGMENT */
  22858. ))
  22859. ])) : vue.createCommentVNode("v-if", true)
  22860. ], 42, ["indicator-style", "value"]),
  22861. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22862. vue.createElementVNode(
  22863. "text",
  22864. {
  22865. class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
  22866. },
  22867. ":",
  22868. 2
  22869. /* CLASS */
  22870. ),
  22871. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
  22872. key: 0,
  22873. class: "uni-datetime-picker-sign sign-right"
  22874. }, ":")) : vue.createCommentVNode("v-if", true)
  22875. ])) : vue.createCommentVNode("v-if", true),
  22876. vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
  22877. vue.createElementVNode("view", {
  22878. onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
  22879. }, [
  22880. vue.createElementVNode(
  22881. "text",
  22882. { class: "uni-datetime-picker-btn-text" },
  22883. vue.toDisplayString($options.clearText),
  22884. 1
  22885. /* TEXT */
  22886. )
  22887. ]),
  22888. vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
  22889. vue.createElementVNode("view", {
  22890. class: "uni-datetime-picker-cancel",
  22891. onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22892. }, [
  22893. vue.createElementVNode(
  22894. "text",
  22895. { class: "uni-datetime-picker-btn-text" },
  22896. vue.toDisplayString($options.cancelText),
  22897. 1
  22898. /* TEXT */
  22899. )
  22900. ]),
  22901. vue.createElementVNode("view", {
  22902. onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
  22903. }, [
  22904. vue.createElementVNode(
  22905. "text",
  22906. { class: "uni-datetime-picker-btn-text" },
  22907. vue.toDisplayString($options.okText),
  22908. 1
  22909. /* TEXT */
  22910. )
  22911. ])
  22912. ])
  22913. ])
  22914. ],
  22915. 6
  22916. /* CLASS, STYLE */
  22917. )) : vue.createCommentVNode("v-if", true)
  22918. ]);
  22919. }
  22920. 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"]]);
  22921. const { t } = initVueI18n(i18nMessages);
  22922. const _sfc_main$R = {
  22923. components: {
  22924. calendarItem,
  22925. timePicker: TimePicker
  22926. },
  22927. props: {
  22928. date: {
  22929. type: String,
  22930. default: ""
  22931. },
  22932. defTime: {
  22933. type: [String, Object],
  22934. default: ""
  22935. },
  22936. selectableTimes: {
  22937. type: [Object],
  22938. default() {
  22939. return {};
  22940. }
  22941. },
  22942. selected: {
  22943. type: Array,
  22944. default() {
  22945. return [];
  22946. }
  22947. },
  22948. startDate: {
  22949. type: String,
  22950. default: ""
  22951. },
  22952. endDate: {
  22953. type: String,
  22954. default: ""
  22955. },
  22956. startPlaceholder: {
  22957. type: String,
  22958. default: ""
  22959. },
  22960. endPlaceholder: {
  22961. type: String,
  22962. default: ""
  22963. },
  22964. range: {
  22965. type: Boolean,
  22966. default: false
  22967. },
  22968. hasTime: {
  22969. type: Boolean,
  22970. default: false
  22971. },
  22972. insert: {
  22973. type: Boolean,
  22974. default: true
  22975. },
  22976. showMonth: {
  22977. type: Boolean,
  22978. default: true
  22979. },
  22980. clearDate: {
  22981. type: Boolean,
  22982. default: true
  22983. },
  22984. checkHover: {
  22985. type: Boolean,
  22986. default: true
  22987. },
  22988. hideSecond: {
  22989. type: [Boolean],
  22990. default: false
  22991. },
  22992. pleStatus: {
  22993. type: Object,
  22994. default() {
  22995. return {
  22996. before: "",
  22997. after: "",
  22998. data: [],
  22999. fulldate: ""
  23000. };
  23001. }
  23002. },
  23003. defaultValue: {
  23004. type: [String, Object, Array],
  23005. default: ""
  23006. }
  23007. },
  23008. data() {
  23009. return {
  23010. show: false,
  23011. weeks: [],
  23012. calendar: {},
  23013. nowDate: {},
  23014. aniMaskShow: false,
  23015. firstEnter: true,
  23016. time: "",
  23017. timeRange: {
  23018. startTime: "",
  23019. endTime: ""
  23020. },
  23021. tempSingleDate: "",
  23022. tempRange: {
  23023. before: "",
  23024. after: ""
  23025. }
  23026. };
  23027. },
  23028. watch: {
  23029. date: {
  23030. immediate: true,
  23031. handler(newVal) {
  23032. if (!this.range) {
  23033. this.tempSingleDate = newVal;
  23034. setTimeout(() => {
  23035. this.init(newVal);
  23036. }, 100);
  23037. }
  23038. }
  23039. },
  23040. defTime: {
  23041. immediate: true,
  23042. handler(newVal) {
  23043. if (!this.range) {
  23044. this.time = newVal;
  23045. } else {
  23046. this.timeRange.startTime = newVal.start;
  23047. this.timeRange.endTime = newVal.end;
  23048. }
  23049. }
  23050. },
  23051. startDate(val) {
  23052. if (!this.cale) {
  23053. return;
  23054. }
  23055. this.cale.setStartDate(val);
  23056. this.cale.setDate(this.nowDate.fullDate);
  23057. this.weeks = this.cale.weeks;
  23058. },
  23059. endDate(val) {
  23060. if (!this.cale) {
  23061. return;
  23062. }
  23063. this.cale.setEndDate(val);
  23064. this.cale.setDate(this.nowDate.fullDate);
  23065. this.weeks = this.cale.weeks;
  23066. },
  23067. selected(newVal) {
  23068. if (!this.cale) {
  23069. return;
  23070. }
  23071. this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
  23072. this.weeks = this.cale.weeks;
  23073. },
  23074. pleStatus: {
  23075. immediate: true,
  23076. handler(newVal) {
  23077. const {
  23078. before,
  23079. after,
  23080. fulldate,
  23081. which
  23082. } = newVal;
  23083. this.tempRange.before = before;
  23084. this.tempRange.after = after;
  23085. setTimeout(() => {
  23086. if (fulldate) {
  23087. this.cale.setHoverMultiple(fulldate);
  23088. if (before && after) {
  23089. this.cale.lastHover = true;
  23090. if (this.rangeWithinMonth(after, before))
  23091. return;
  23092. this.setDate(before);
  23093. } else {
  23094. this.cale.setMultiple(fulldate);
  23095. this.setDate(this.nowDate.fullDate);
  23096. this.calendar.fullDate = "";
  23097. this.cale.lastHover = false;
  23098. }
  23099. } else {
  23100. if (!this.cale) {
  23101. return;
  23102. }
  23103. this.cale.setDefaultMultiple(before, after);
  23104. if (which === "left" && before) {
  23105. this.setDate(before);
  23106. this.weeks = this.cale.weeks;
  23107. } else if (after) {
  23108. this.setDate(after);
  23109. this.weeks = this.cale.weeks;
  23110. }
  23111. this.cale.lastHover = true;
  23112. }
  23113. }, 16);
  23114. }
  23115. }
  23116. },
  23117. computed: {
  23118. timepickerStartTime() {
  23119. const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
  23120. return activeDate === this.startDate ? this.selectableTimes.start : "";
  23121. },
  23122. timepickerEndTime() {
  23123. const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
  23124. return activeDate === this.endDate ? this.selectableTimes.end : "";
  23125. },
  23126. /**
  23127. * for i18n
  23128. */
  23129. selectDateText() {
  23130. return t("uni-datetime-picker.selectDate");
  23131. },
  23132. startDateText() {
  23133. return this.startPlaceholder || t("uni-datetime-picker.startDate");
  23134. },
  23135. endDateText() {
  23136. return this.endPlaceholder || t("uni-datetime-picker.endDate");
  23137. },
  23138. okText() {
  23139. return t("uni-datetime-picker.ok");
  23140. },
  23141. yearText() {
  23142. return t("uni-datetime-picker.year");
  23143. },
  23144. monthText() {
  23145. return t("uni-datetime-picker.month");
  23146. },
  23147. MONText() {
  23148. return t("uni-calender.MON");
  23149. },
  23150. TUEText() {
  23151. return t("uni-calender.TUE");
  23152. },
  23153. WEDText() {
  23154. return t("uni-calender.WED");
  23155. },
  23156. THUText() {
  23157. return t("uni-calender.THU");
  23158. },
  23159. FRIText() {
  23160. return t("uni-calender.FRI");
  23161. },
  23162. SATText() {
  23163. return t("uni-calender.SAT");
  23164. },
  23165. SUNText() {
  23166. return t("uni-calender.SUN");
  23167. },
  23168. confirmText() {
  23169. return t("uni-calender.confirm");
  23170. }
  23171. },
  23172. created() {
  23173. this.cale = new Calendar$1({
  23174. selected: this.selected,
  23175. startDate: this.startDate,
  23176. endDate: this.endDate,
  23177. range: this.range
  23178. });
  23179. this.init(this.date);
  23180. },
  23181. methods: {
  23182. leaveCale() {
  23183. this.firstEnter = true;
  23184. },
  23185. handleMouse(weeks) {
  23186. if (weeks.disable)
  23187. return;
  23188. if (this.cale.lastHover)
  23189. return;
  23190. let {
  23191. before,
  23192. after
  23193. } = this.cale.multipleStatus;
  23194. if (!before)
  23195. return;
  23196. this.calendar = weeks;
  23197. this.cale.setHoverMultiple(this.calendar.fullDate);
  23198. this.weeks = this.cale.weeks;
  23199. if (this.firstEnter) {
  23200. this.$emit("firstEnterCale", this.cale.multipleStatus);
  23201. this.firstEnter = false;
  23202. }
  23203. },
  23204. rangeWithinMonth(A, B) {
  23205. const [yearA, monthA] = A.split("-");
  23206. const [yearB, monthB] = B.split("-");
  23207. return yearA === yearB && monthA === monthB;
  23208. },
  23209. // 蒙版点击事件
  23210. maskClick() {
  23211. this.close();
  23212. this.$emit("maskClose");
  23213. },
  23214. clearCalender() {
  23215. if (this.range) {
  23216. this.timeRange.startTime = "";
  23217. this.timeRange.endTime = "";
  23218. this.tempRange.before = "";
  23219. this.tempRange.after = "";
  23220. this.cale.multipleStatus.before = "";
  23221. this.cale.multipleStatus.after = "";
  23222. this.cale.multipleStatus.data = [];
  23223. this.cale.lastHover = false;
  23224. } else {
  23225. this.time = "";
  23226. this.tempSingleDate = "";
  23227. }
  23228. this.calendar.fullDate = "";
  23229. this.setDate(/* @__PURE__ */ new Date());
  23230. },
  23231. bindDateChange(e) {
  23232. const value2 = e.detail.value + "-1";
  23233. this.setDate(value2);
  23234. },
  23235. /**
  23236. * 初始化日期显示
  23237. * @param {Object} date
  23238. */
  23239. init(date3) {
  23240. if (!this.cale) {
  23241. return;
  23242. }
  23243. this.cale.setDate(date3 || /* @__PURE__ */ new Date());
  23244. this.weeks = this.cale.weeks;
  23245. this.nowDate = this.cale.getInfo(date3);
  23246. this.calendar = { ...this.nowDate };
  23247. if (!date3) {
  23248. this.calendar.fullDate = "";
  23249. if (this.defaultValue && !this.range) {
  23250. const defaultDate = new Date(this.defaultValue);
  23251. const fullDate = getDate(defaultDate);
  23252. const year = defaultDate.getFullYear();
  23253. const month = defaultDate.getMonth() + 1;
  23254. const date4 = defaultDate.getDate();
  23255. const day = defaultDate.getDay();
  23256. this.calendar = {
  23257. fullDate,
  23258. year,
  23259. month,
  23260. date: date4,
  23261. day
  23262. }, this.tempSingleDate = fullDate;
  23263. this.time = getTime(defaultDate, this.hideSecond);
  23264. }
  23265. }
  23266. },
  23267. /**
  23268. * 打开日历弹窗
  23269. */
  23270. open() {
  23271. if (this.clearDate && !this.insert) {
  23272. this.cale.cleanMultipleStatus();
  23273. this.init(this.date);
  23274. }
  23275. this.show = true;
  23276. this.$nextTick(() => {
  23277. setTimeout(() => {
  23278. this.aniMaskShow = true;
  23279. }, 50);
  23280. });
  23281. },
  23282. /**
  23283. * 关闭日历弹窗
  23284. */
  23285. close() {
  23286. this.aniMaskShow = false;
  23287. this.$nextTick(() => {
  23288. setTimeout(() => {
  23289. this.show = false;
  23290. this.$emit("close");
  23291. }, 300);
  23292. });
  23293. },
  23294. /**
  23295. * 确认按钮
  23296. */
  23297. confirm() {
  23298. this.setEmit("confirm");
  23299. this.close();
  23300. },
  23301. /**
  23302. * 变化触发
  23303. */
  23304. change() {
  23305. if (!this.insert)
  23306. return;
  23307. this.setEmit("change");
  23308. },
  23309. /**
  23310. * 选择月份触发
  23311. */
  23312. monthSwitch() {
  23313. let {
  23314. year,
  23315. month
  23316. } = this.nowDate;
  23317. this.$emit("monthSwitch", {
  23318. year,
  23319. month: Number(month)
  23320. });
  23321. },
  23322. /**
  23323. * 派发事件
  23324. * @param {Object} name
  23325. */
  23326. setEmit(name) {
  23327. if (!this.range) {
  23328. if (!this.calendar.fullDate) {
  23329. this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
  23330. this.tempSingleDate = this.calendar.fullDate;
  23331. }
  23332. if (this.hasTime && !this.time) {
  23333. this.time = getTime(/* @__PURE__ */ new Date(), this.hideSecond);
  23334. }
  23335. }
  23336. let {
  23337. year,
  23338. month,
  23339. date: date3,
  23340. fullDate,
  23341. extraInfo
  23342. } = this.calendar;
  23343. this.$emit(name, {
  23344. range: this.cale.multipleStatus,
  23345. year,
  23346. month,
  23347. date: date3,
  23348. time: this.time,
  23349. timeRange: this.timeRange,
  23350. fulldate: fullDate,
  23351. extraInfo: extraInfo || {}
  23352. });
  23353. },
  23354. /**
  23355. * 选择天触发
  23356. * @param {Object} weeks
  23357. */
  23358. choiceDate(weeks) {
  23359. if (weeks.disable)
  23360. return;
  23361. this.calendar = weeks;
  23362. this.calendar.userChecked = true;
  23363. this.cale.setMultiple(this.calendar.fullDate, true);
  23364. this.weeks = this.cale.weeks;
  23365. this.tempSingleDate = this.calendar.fullDate;
  23366. const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
  23367. const afterDate = new Date(this.cale.multipleStatus.after).getTime();
  23368. if (beforeDate > afterDate && afterDate) {
  23369. this.tempRange.before = this.cale.multipleStatus.after;
  23370. this.tempRange.after = this.cale.multipleStatus.before;
  23371. } else {
  23372. this.tempRange.before = this.cale.multipleStatus.before;
  23373. this.tempRange.after = this.cale.multipleStatus.after;
  23374. }
  23375. this.change();
  23376. },
  23377. changeMonth(type2) {
  23378. let newDate;
  23379. if (type2 === "pre") {
  23380. newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
  23381. } else if (type2 === "next") {
  23382. newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
  23383. }
  23384. this.setDate(newDate);
  23385. this.monthSwitch();
  23386. },
  23387. /**
  23388. * 设置日期
  23389. * @param {Object} date
  23390. */
  23391. setDate(date3) {
  23392. this.cale.setDate(date3);
  23393. this.weeks = this.cale.weeks;
  23394. this.nowDate = this.cale.getInfo(date3);
  23395. }
  23396. }
  23397. };
  23398. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  23399. const _component_calendar_item = vue.resolveComponent("calendar-item");
  23400. const _component_time_picker = vue.resolveComponent("time-picker");
  23401. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  23402. return vue.openBlock(), vue.createElementBlock(
  23403. "view",
  23404. {
  23405. class: "uni-calendar",
  23406. onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
  23407. },
  23408. [
  23409. !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
  23410. "view",
  23411. {
  23412. key: 0,
  23413. class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
  23414. onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args))
  23415. },
  23416. null,
  23417. 2
  23418. /* CLASS */
  23419. )) : vue.createCommentVNode("v-if", true),
  23420. $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
  23421. "view",
  23422. {
  23423. key: 1,
  23424. class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
  23425. },
  23426. [
  23427. vue.createElementVNode(
  23428. "view",
  23429. {
  23430. class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
  23431. },
  23432. [
  23433. vue.createElementVNode("view", {
  23434. class: "uni-calendar__header-btn-box",
  23435. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"]))
  23436. }, [
  23437. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
  23438. ]),
  23439. vue.createElementVNode("picker", {
  23440. mode: "date",
  23441. value: $props.date,
  23442. fields: "month",
  23443. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  23444. }, [
  23445. vue.createElementVNode(
  23446. "text",
  23447. { class: "uni-calendar__header-text" },
  23448. vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
  23449. 1
  23450. /* TEXT */
  23451. )
  23452. ], 40, ["value"]),
  23453. vue.createElementVNode("view", {
  23454. class: "uni-calendar__header-btn-box",
  23455. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"]))
  23456. }, [
  23457. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
  23458. ]),
  23459. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23460. key: 0,
  23461. class: "dialog-close",
  23462. onClick: _cache[4] || (_cache[4] = (...args) => $options.close && $options.close(...args))
  23463. }, [
  23464. vue.createElementVNode("view", {
  23465. class: "dialog-close-plus",
  23466. "data-id": "close"
  23467. }),
  23468. vue.createElementVNode("view", {
  23469. class: "dialog-close-plus dialog-close-rotate",
  23470. "data-id": "close"
  23471. })
  23472. ])) : vue.createCommentVNode("v-if", true)
  23473. ],
  23474. 2
  23475. /* CLASS */
  23476. ),
  23477. vue.createElementVNode("view", { class: "uni-calendar__box" }, [
  23478. $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
  23479. key: 0,
  23480. class: "uni-calendar__box-bg"
  23481. }, [
  23482. vue.createElementVNode(
  23483. "text",
  23484. { class: "uni-calendar__box-bg-text" },
  23485. vue.toDisplayString($data.nowDate.month),
  23486. 1
  23487. /* TEXT */
  23488. )
  23489. ])) : vue.createCommentVNode("v-if", true),
  23490. vue.createElementVNode("view", {
  23491. class: "uni-calendar__weeks",
  23492. style: { "padding-bottom": "7px" }
  23493. }, [
  23494. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23495. vue.createElementVNode(
  23496. "text",
  23497. { class: "uni-calendar__weeks-day-text" },
  23498. vue.toDisplayString($options.SUNText),
  23499. 1
  23500. /* TEXT */
  23501. )
  23502. ]),
  23503. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23504. vue.createElementVNode(
  23505. "text",
  23506. { class: "uni-calendar__weeks-day-text" },
  23507. vue.toDisplayString($options.MONText),
  23508. 1
  23509. /* TEXT */
  23510. )
  23511. ]),
  23512. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23513. vue.createElementVNode(
  23514. "text",
  23515. { class: "uni-calendar__weeks-day-text" },
  23516. vue.toDisplayString($options.TUEText),
  23517. 1
  23518. /* TEXT */
  23519. )
  23520. ]),
  23521. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23522. vue.createElementVNode(
  23523. "text",
  23524. { class: "uni-calendar__weeks-day-text" },
  23525. vue.toDisplayString($options.WEDText),
  23526. 1
  23527. /* TEXT */
  23528. )
  23529. ]),
  23530. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23531. vue.createElementVNode(
  23532. "text",
  23533. { class: "uni-calendar__weeks-day-text" },
  23534. vue.toDisplayString($options.THUText),
  23535. 1
  23536. /* TEXT */
  23537. )
  23538. ]),
  23539. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23540. vue.createElementVNode(
  23541. "text",
  23542. { class: "uni-calendar__weeks-day-text" },
  23543. vue.toDisplayString($options.FRIText),
  23544. 1
  23545. /* TEXT */
  23546. )
  23547. ]),
  23548. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23549. vue.createElementVNode(
  23550. "text",
  23551. { class: "uni-calendar__weeks-day-text" },
  23552. vue.toDisplayString($options.SATText),
  23553. 1
  23554. /* TEXT */
  23555. )
  23556. ])
  23557. ]),
  23558. (vue.openBlock(true), vue.createElementBlock(
  23559. vue.Fragment,
  23560. null,
  23561. vue.renderList($data.weeks, (item, weekIndex) => {
  23562. return vue.openBlock(), vue.createElementBlock("view", {
  23563. class: "uni-calendar__weeks",
  23564. key: weekIndex
  23565. }, [
  23566. (vue.openBlock(true), vue.createElementBlock(
  23567. vue.Fragment,
  23568. null,
  23569. vue.renderList(item, (weeks, weeksIndex) => {
  23570. return vue.openBlock(), vue.createElementBlock("view", {
  23571. class: "uni-calendar__weeks-item",
  23572. key: weeksIndex
  23573. }, [
  23574. vue.createVNode(_component_calendar_item, {
  23575. class: "uni-calendar-item--hook",
  23576. weeks,
  23577. calendar: $data.calendar,
  23578. selected: $props.selected,
  23579. checkHover: $props.range,
  23580. onChange: $options.choiceDate,
  23581. onHandleMouse: $options.handleMouse
  23582. }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"])
  23583. ]);
  23584. }),
  23585. 128
  23586. /* KEYED_FRAGMENT */
  23587. ))
  23588. ]);
  23589. }),
  23590. 128
  23591. /* KEYED_FRAGMENT */
  23592. ))
  23593. ]),
  23594. !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23595. key: 0,
  23596. class: "uni-date-changed uni-calendar--fixed-top",
  23597. style: { "padding": "0 80px" }
  23598. }, [
  23599. vue.createElementVNode(
  23600. "view",
  23601. { class: "uni-date-changed--time-date" },
  23602. vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
  23603. 1
  23604. /* TEXT */
  23605. ),
  23606. vue.createVNode(_component_time_picker, {
  23607. type: "time",
  23608. start: $options.timepickerStartTime,
  23609. end: $options.timepickerEndTime,
  23610. modelValue: $data.time,
  23611. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
  23612. disabled: !$data.tempSingleDate,
  23613. border: false,
  23614. "hide-second": $props.hideSecond,
  23615. class: "time-picker-style"
  23616. }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
  23617. ])) : vue.createCommentVNode("v-if", true),
  23618. !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23619. key: 1,
  23620. class: "uni-date-changed uni-calendar--fixed-top"
  23621. }, [
  23622. vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
  23623. vue.createElementVNode(
  23624. "view",
  23625. { class: "uni-date-changed--time-date" },
  23626. vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
  23627. 1
  23628. /* TEXT */
  23629. ),
  23630. vue.createVNode(_component_time_picker, {
  23631. type: "time",
  23632. start: $options.timepickerStartTime,
  23633. modelValue: $data.timeRange.startTime,
  23634. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
  23635. border: false,
  23636. "hide-second": $props.hideSecond,
  23637. disabled: !$data.tempRange.before,
  23638. class: "time-picker-style"
  23639. }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
  23640. ]),
  23641. vue.createElementVNode("view", { style: { "line-height": "50px" } }, [
  23642. vue.createVNode(_component_uni_icons, {
  23643. type: "arrowthinright",
  23644. color: "#999"
  23645. })
  23646. ]),
  23647. vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
  23648. vue.createElementVNode(
  23649. "view",
  23650. { class: "uni-date-changed--time-date" },
  23651. vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
  23652. 1
  23653. /* TEXT */
  23654. ),
  23655. vue.createVNode(_component_time_picker, {
  23656. type: "time",
  23657. end: $options.timepickerEndTime,
  23658. modelValue: $data.timeRange.endTime,
  23659. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
  23660. border: false,
  23661. "hide-second": $props.hideSecond,
  23662. disabled: !$data.tempRange.after,
  23663. class: "time-picker-style"
  23664. }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
  23665. ])
  23666. ])) : vue.createCommentVNode("v-if", true),
  23667. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23668. key: 2,
  23669. class: "uni-date-changed uni-date-btn--ok"
  23670. }, [
  23671. vue.createElementVNode(
  23672. "view",
  23673. {
  23674. class: "uni-datetime-picker--btn",
  23675. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
  23676. },
  23677. vue.toDisplayString($options.confirmText),
  23678. 1
  23679. /* TEXT */
  23680. )
  23681. ])) : vue.createCommentVNode("v-if", true)
  23682. ],
  23683. 2
  23684. /* CLASS */
  23685. )) : vue.createCommentVNode("v-if", true)
  23686. ],
  23687. 32
  23688. /* NEED_HYDRATION */
  23689. );
  23690. }
  23691. 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"]]);
  23692. const _sfc_main$Q = {
  23693. name: "UniDatetimePicker",
  23694. options: {
  23695. virtualHost: true
  23696. },
  23697. components: {
  23698. Calendar,
  23699. TimePicker
  23700. },
  23701. data() {
  23702. return {
  23703. isRange: false,
  23704. hasTime: false,
  23705. displayValue: "",
  23706. inputDate: "",
  23707. calendarDate: "",
  23708. pickerTime: "",
  23709. calendarRange: {
  23710. startDate: "",
  23711. startTime: "",
  23712. endDate: "",
  23713. endTime: ""
  23714. },
  23715. displayRangeValue: {
  23716. startDate: "",
  23717. endDate: ""
  23718. },
  23719. tempRange: {
  23720. startDate: "",
  23721. startTime: "",
  23722. endDate: "",
  23723. endTime: ""
  23724. },
  23725. // 左右日历同步数据
  23726. startMultipleStatus: {
  23727. before: "",
  23728. after: "",
  23729. data: [],
  23730. fulldate: ""
  23731. },
  23732. endMultipleStatus: {
  23733. before: "",
  23734. after: "",
  23735. data: [],
  23736. fulldate: ""
  23737. },
  23738. pickerVisible: false,
  23739. pickerPositionStyle: null,
  23740. isEmitValue: false,
  23741. isPhone: false,
  23742. isFirstShow: true,
  23743. i18nT: () => {
  23744. }
  23745. };
  23746. },
  23747. props: {
  23748. type: {
  23749. type: String,
  23750. default: "datetime"
  23751. },
  23752. value: {
  23753. type: [String, Number, Array, Date],
  23754. default: ""
  23755. },
  23756. modelValue: {
  23757. type: [String, Number, Array, Date],
  23758. default: ""
  23759. },
  23760. start: {
  23761. type: [Number, String],
  23762. default: ""
  23763. },
  23764. end: {
  23765. type: [Number, String],
  23766. default: ""
  23767. },
  23768. returnType: {
  23769. type: String,
  23770. default: "string"
  23771. },
  23772. placeholder: {
  23773. type: String,
  23774. default: ""
  23775. },
  23776. startPlaceholder: {
  23777. type: String,
  23778. default: ""
  23779. },
  23780. endPlaceholder: {
  23781. type: String,
  23782. default: ""
  23783. },
  23784. rangeSeparator: {
  23785. type: String,
  23786. default: "-"
  23787. },
  23788. border: {
  23789. type: [Boolean],
  23790. default: true
  23791. },
  23792. disabled: {
  23793. type: [Boolean],
  23794. default: false
  23795. },
  23796. clearIcon: {
  23797. type: [Boolean],
  23798. default: true
  23799. },
  23800. hideSecond: {
  23801. type: [Boolean],
  23802. default: false
  23803. },
  23804. defaultValue: {
  23805. type: [String, Object, Array],
  23806. default: ""
  23807. }
  23808. },
  23809. watch: {
  23810. type: {
  23811. immediate: true,
  23812. handler(newVal) {
  23813. this.hasTime = newVal.indexOf("time") !== -1;
  23814. this.isRange = newVal.indexOf("range") !== -1;
  23815. }
  23816. },
  23817. modelValue: {
  23818. immediate: true,
  23819. handler(newVal) {
  23820. if (this.isEmitValue) {
  23821. this.isEmitValue = false;
  23822. return;
  23823. }
  23824. this.initPicker(newVal);
  23825. }
  23826. },
  23827. start: {
  23828. immediate: true,
  23829. handler(newVal) {
  23830. if (!newVal)
  23831. return;
  23832. this.calendarRange.startDate = getDate(newVal);
  23833. if (this.hasTime) {
  23834. this.calendarRange.startTime = getTime(newVal);
  23835. }
  23836. }
  23837. },
  23838. end: {
  23839. immediate: true,
  23840. handler(newVal) {
  23841. if (!newVal)
  23842. return;
  23843. this.calendarRange.endDate = getDate(newVal);
  23844. if (this.hasTime) {
  23845. this.calendarRange.endTime = getTime(newVal, this.hideSecond);
  23846. }
  23847. }
  23848. }
  23849. },
  23850. computed: {
  23851. timepickerStartTime() {
  23852. const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
  23853. return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
  23854. },
  23855. timepickerEndTime() {
  23856. const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
  23857. return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
  23858. },
  23859. mobileCalendarTime() {
  23860. const timeRange = {
  23861. start: this.tempRange.startTime,
  23862. end: this.tempRange.endTime
  23863. };
  23864. return this.isRange ? timeRange : this.pickerTime;
  23865. },
  23866. mobSelectableTime() {
  23867. return {
  23868. start: this.calendarRange.startTime,
  23869. end: this.calendarRange.endTime
  23870. };
  23871. },
  23872. datePopupWidth() {
  23873. return this.isRange ? 653 : 301;
  23874. },
  23875. /**
  23876. * for i18n
  23877. */
  23878. singlePlaceholderText() {
  23879. return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
  23880. },
  23881. startPlaceholderText() {
  23882. return this.startPlaceholder || this.startDateText;
  23883. },
  23884. endPlaceholderText() {
  23885. return this.endPlaceholder || this.endDateText;
  23886. },
  23887. selectDateText() {
  23888. return this.i18nT("uni-datetime-picker.selectDate");
  23889. },
  23890. selectDateTimeText() {
  23891. return this.i18nT("uni-datetime-picker.selectDateTime");
  23892. },
  23893. selectTimeText() {
  23894. return this.i18nT("uni-datetime-picker.selectTime");
  23895. },
  23896. startDateText() {
  23897. return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
  23898. },
  23899. startTimeText() {
  23900. return this.i18nT("uni-datetime-picker.startTime");
  23901. },
  23902. endDateText() {
  23903. return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
  23904. },
  23905. endTimeText() {
  23906. return this.i18nT("uni-datetime-picker.endTime");
  23907. },
  23908. okText() {
  23909. return this.i18nT("uni-datetime-picker.ok");
  23910. },
  23911. clearText() {
  23912. return this.i18nT("uni-datetime-picker.clear");
  23913. },
  23914. showClearIcon() {
  23915. return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
  23916. }
  23917. },
  23918. created() {
  23919. this.initI18nT();
  23920. this.platform();
  23921. },
  23922. methods: {
  23923. initI18nT() {
  23924. const vueI18n = initVueI18n(i18nMessages);
  23925. this.i18nT = vueI18n.t;
  23926. },
  23927. initPicker(newVal) {
  23928. if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
  23929. this.$nextTick(() => {
  23930. this.clear(false);
  23931. });
  23932. return;
  23933. }
  23934. if (!Array.isArray(newVal) && !this.isRange) {
  23935. if (newVal) {
  23936. this.displayValue = this.inputDate = this.calendarDate = getDate(newVal);
  23937. if (this.hasTime) {
  23938. this.pickerTime = getTime(newVal, this.hideSecond);
  23939. this.displayValue = `${this.displayValue} ${this.pickerTime}`;
  23940. }
  23941. } else if (this.defaultValue) {
  23942. this.inputDate = this.calendarDate = getDate(this.defaultValue);
  23943. if (this.hasTime) {
  23944. this.pickerTime = getTime(this.defaultValue, this.hideSecond);
  23945. }
  23946. }
  23947. } else {
  23948. const [before, after] = newVal;
  23949. if (!before && !after)
  23950. return;
  23951. const beforeDate = getDate(before);
  23952. const beforeTime = getTime(before, this.hideSecond);
  23953. const afterDate = getDate(after);
  23954. const afterTime = getTime(after, this.hideSecond);
  23955. const startDate = beforeDate;
  23956. const endDate = afterDate;
  23957. this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
  23958. this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
  23959. if (this.hasTime) {
  23960. this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
  23961. this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
  23962. this.tempRange.startTime = beforeTime;
  23963. this.tempRange.endTime = afterTime;
  23964. }
  23965. const defaultRange = {
  23966. before: beforeDate,
  23967. after: afterDate
  23968. };
  23969. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
  23970. which: "right"
  23971. });
  23972. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
  23973. which: "left"
  23974. });
  23975. }
  23976. },
  23977. updateLeftCale(e) {
  23978. const left = this.$refs.left;
  23979. left.cale.setHoverMultiple(e.after);
  23980. left.setDate(this.$refs.left.nowDate.fullDate);
  23981. },
  23982. updateRightCale(e) {
  23983. const right = this.$refs.right;
  23984. right.cale.setHoverMultiple(e.after);
  23985. right.setDate(this.$refs.right.nowDate.fullDate);
  23986. },
  23987. platform() {
  23988. if (typeof navigator !== "undefined") {
  23989. this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1;
  23990. return;
  23991. }
  23992. const { windowWidth } = uni.getSystemInfoSync();
  23993. this.isPhone = windowWidth <= 500;
  23994. this.windowWidth = windowWidth;
  23995. },
  23996. show() {
  23997. if (this.disabled) {
  23998. return;
  23999. }
  24000. this.platform();
  24001. if (this.isPhone) {
  24002. setTimeout(() => {
  24003. this.$refs.mobile.open();
  24004. }, 0);
  24005. return;
  24006. }
  24007. this.pickerPositionStyle = {
  24008. top: "10px"
  24009. };
  24010. const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
  24011. dateEditor.boundingClientRect((rect) => {
  24012. if (this.windowWidth - rect.left < this.datePopupWidth) {
  24013. this.pickerPositionStyle.right = 0;
  24014. }
  24015. }).exec();
  24016. setTimeout(() => {
  24017. this.pickerVisible = !this.pickerVisible;
  24018. if (!this.isPhone && this.isRange && this.isFirstShow) {
  24019. this.isFirstShow = false;
  24020. const {
  24021. startDate,
  24022. endDate
  24023. } = this.calendarRange;
  24024. if (startDate && endDate) {
  24025. if (this.diffDate(startDate, endDate) < 30) {
  24026. this.$refs.right.changeMonth("pre");
  24027. }
  24028. } else {
  24029. this.$refs.right.changeMonth("next");
  24030. this.$refs.right.cale.lastHover = false;
  24031. }
  24032. }
  24033. }, 50);
  24034. },
  24035. close() {
  24036. setTimeout(() => {
  24037. this.pickerVisible = false;
  24038. this.$emit("maskClick", this.value);
  24039. this.$refs.mobile && this.$refs.mobile.close();
  24040. }, 20);
  24041. },
  24042. setEmit(value2) {
  24043. if (this.returnType === "timestamp" || this.returnType === "date") {
  24044. if (!Array.isArray(value2)) {
  24045. if (!this.hasTime) {
  24046. value2 = value2 + " 00:00:00";
  24047. }
  24048. value2 = this.createTimestamp(value2);
  24049. if (this.returnType === "date") {
  24050. value2 = new Date(value2);
  24051. }
  24052. } else {
  24053. if (!this.hasTime) {
  24054. value2[0] = value2[0] + " 00:00:00";
  24055. value2[1] = value2[1] + " 00:00:00";
  24056. }
  24057. value2[0] = this.createTimestamp(value2[0]);
  24058. value2[1] = this.createTimestamp(value2[1]);
  24059. if (this.returnType === "date") {
  24060. value2[0] = new Date(value2[0]);
  24061. value2[1] = new Date(value2[1]);
  24062. }
  24063. }
  24064. }
  24065. this.$emit("update:modelValue", value2);
  24066. this.$emit("input", value2);
  24067. this.$emit("change", value2);
  24068. this.isEmitValue = true;
  24069. },
  24070. createTimestamp(date3) {
  24071. date3 = fixIosDateFormat(date3);
  24072. return Date.parse(new Date(date3));
  24073. },
  24074. singleChange(e) {
  24075. this.calendarDate = this.inputDate = e.fulldate;
  24076. if (this.hasTime)
  24077. return;
  24078. this.confirmSingleChange();
  24079. },
  24080. confirmSingleChange() {
  24081. if (!checkDate(this.inputDate)) {
  24082. const now2 = /* @__PURE__ */ new Date();
  24083. this.calendarDate = this.inputDate = getDate(now2);
  24084. this.pickerTime = getTime(now2, this.hideSecond);
  24085. }
  24086. let startLaterInputDate = false;
  24087. let startDate, startTime;
  24088. if (this.start) {
  24089. let startString = this.start;
  24090. if (typeof this.start === "number") {
  24091. startString = getDateTime(this.start, this.hideSecond);
  24092. }
  24093. [startDate, startTime] = startString.split(" ");
  24094. if (this.start && !dateCompare(startDate, this.inputDate)) {
  24095. startLaterInputDate = true;
  24096. this.inputDate = startDate;
  24097. }
  24098. }
  24099. let endEarlierInputDate = false;
  24100. let endDate, endTime;
  24101. if (this.end) {
  24102. let endString = this.end;
  24103. if (typeof this.end === "number") {
  24104. endString = getDateTime(this.end, this.hideSecond);
  24105. }
  24106. [endDate, endTime] = endString.split(" ");
  24107. if (this.end && !dateCompare(this.inputDate, endDate)) {
  24108. endEarlierInputDate = true;
  24109. this.inputDate = endDate;
  24110. }
  24111. }
  24112. if (this.hasTime) {
  24113. if (startLaterInputDate) {
  24114. this.pickerTime = startTime || getDefaultSecond(this.hideSecond);
  24115. }
  24116. if (endEarlierInputDate) {
  24117. this.pickerTime = endTime || getDefaultSecond(this.hideSecond);
  24118. }
  24119. if (!this.pickerTime) {
  24120. this.pickerTime = getTime(Date.now(), this.hideSecond);
  24121. }
  24122. this.displayValue = `${this.inputDate} ${this.pickerTime}`;
  24123. } else {
  24124. this.displayValue = this.inputDate;
  24125. }
  24126. this.setEmit(this.displayValue);
  24127. this.pickerVisible = false;
  24128. },
  24129. leftChange(e) {
  24130. const {
  24131. before,
  24132. after
  24133. } = e.range;
  24134. this.rangeChange(before, after);
  24135. const obj = {
  24136. before: e.range.before,
  24137. after: e.range.after,
  24138. data: e.range.data,
  24139. fulldate: e.fulldate
  24140. };
  24141. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
  24142. },
  24143. rightChange(e) {
  24144. const {
  24145. before,
  24146. after
  24147. } = e.range;
  24148. this.rangeChange(before, after);
  24149. const obj = {
  24150. before: e.range.before,
  24151. after: e.range.after,
  24152. data: e.range.data,
  24153. fulldate: e.fulldate
  24154. };
  24155. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
  24156. },
  24157. mobileChange(e) {
  24158. if (this.isRange) {
  24159. const { before, after } = e.range;
  24160. if (!before || !after) {
  24161. return;
  24162. }
  24163. this.handleStartAndEnd(before, after, true);
  24164. if (this.hasTime) {
  24165. const {
  24166. startTime,
  24167. endTime
  24168. } = e.timeRange;
  24169. this.tempRange.startTime = startTime;
  24170. this.tempRange.endTime = endTime;
  24171. }
  24172. this.confirmRangeChange();
  24173. } else {
  24174. if (this.hasTime) {
  24175. this.displayValue = e.fulldate + " " + e.time;
  24176. } else {
  24177. this.displayValue = e.fulldate;
  24178. }
  24179. this.setEmit(this.displayValue);
  24180. }
  24181. this.$refs.mobile.close();
  24182. },
  24183. rangeChange(before, after) {
  24184. if (!(before && after))
  24185. return;
  24186. this.handleStartAndEnd(before, after, true);
  24187. if (this.hasTime)
  24188. return;
  24189. this.confirmRangeChange();
  24190. },
  24191. confirmRangeChange() {
  24192. if (!this.tempRange.startDate || !this.tempRange.endDate) {
  24193. this.pickerVisible = false;
  24194. return;
  24195. }
  24196. if (!checkDate(this.tempRange.startDate)) {
  24197. this.tempRange.startDate = getDate(Date.now());
  24198. }
  24199. if (!checkDate(this.tempRange.endDate)) {
  24200. this.tempRange.endDate = getDate(Date.now());
  24201. }
  24202. let start, end;
  24203. let startDateLaterRangeStartDate = false;
  24204. let startDateLaterRangeEndDate = false;
  24205. let startDate, startTime;
  24206. if (this.start) {
  24207. let startString = this.start;
  24208. if (typeof this.start === "number") {
  24209. startString = getDateTime(this.start, this.hideSecond);
  24210. }
  24211. [startDate, startTime] = startString.split(" ");
  24212. if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
  24213. startDateLaterRangeStartDate = true;
  24214. this.tempRange.startDate = startDate;
  24215. }
  24216. if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
  24217. startDateLaterRangeEndDate = true;
  24218. this.tempRange.endDate = startDate;
  24219. }
  24220. }
  24221. let endDateEarlierRangeStartDate = false;
  24222. let endDateEarlierRangeEndDate = false;
  24223. let endDate, endTime;
  24224. if (this.end) {
  24225. let endString = this.end;
  24226. if (typeof this.end === "number") {
  24227. endString = getDateTime(this.end, this.hideSecond);
  24228. }
  24229. [endDate, endTime] = endString.split(" ");
  24230. if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
  24231. endDateEarlierRangeStartDate = true;
  24232. this.tempRange.startDate = endDate;
  24233. }
  24234. if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
  24235. endDateEarlierRangeEndDate = true;
  24236. this.tempRange.endDate = endDate;
  24237. }
  24238. }
  24239. if (!this.hasTime) {
  24240. start = this.displayRangeValue.startDate = this.tempRange.startDate;
  24241. end = this.displayRangeValue.endDate = this.tempRange.endDate;
  24242. } else {
  24243. if (startDateLaterRangeStartDate) {
  24244. this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond);
  24245. } else if (endDateEarlierRangeStartDate) {
  24246. this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond);
  24247. }
  24248. if (!this.tempRange.startTime) {
  24249. this.tempRange.startTime = getTime(Date.now(), this.hideSecond);
  24250. }
  24251. if (startDateLaterRangeEndDate) {
  24252. this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond);
  24253. } else if (endDateEarlierRangeEndDate) {
  24254. this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond);
  24255. }
  24256. if (!this.tempRange.endTime) {
  24257. this.tempRange.endTime = getTime(Date.now(), this.hideSecond);
  24258. }
  24259. start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
  24260. end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
  24261. }
  24262. if (!dateCompare(start, end)) {
  24263. [start, end] = [end, start];
  24264. }
  24265. this.displayRangeValue.startDate = start;
  24266. this.displayRangeValue.endDate = end;
  24267. const displayRange = [start, end];
  24268. this.setEmit(displayRange);
  24269. this.pickerVisible = false;
  24270. },
  24271. handleStartAndEnd(before, after, temp = false) {
  24272. if (!(before && after))
  24273. return;
  24274. const type2 = temp ? "tempRange" : "range";
  24275. const isStartEarlierEnd = dateCompare(before, after);
  24276. this[type2].startDate = isStartEarlierEnd ? before : after;
  24277. this[type2].endDate = isStartEarlierEnd ? after : before;
  24278. },
  24279. /**
  24280. * 比较时间大小
  24281. */
  24282. dateCompare(startDate, endDate) {
  24283. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24284. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24285. return startDate <= endDate;
  24286. },
  24287. /**
  24288. * 比较时间差
  24289. */
  24290. diffDate(startDate, endDate) {
  24291. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24292. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24293. const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
  24294. return Math.abs(diff);
  24295. },
  24296. clear(needEmit = true) {
  24297. if (!this.isRange) {
  24298. this.displayValue = "";
  24299. this.inputDate = "";
  24300. this.pickerTime = "";
  24301. if (this.isPhone) {
  24302. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24303. } else {
  24304. this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
  24305. }
  24306. if (needEmit) {
  24307. this.$emit("change", "");
  24308. this.$emit("input", "");
  24309. this.$emit("update:modelValue", "");
  24310. }
  24311. } else {
  24312. this.displayRangeValue.startDate = "";
  24313. this.displayRangeValue.endDate = "";
  24314. this.tempRange.startDate = "";
  24315. this.tempRange.startTime = "";
  24316. this.tempRange.endDate = "";
  24317. this.tempRange.endTime = "";
  24318. if (this.isPhone) {
  24319. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24320. } else {
  24321. this.$refs.left && this.$refs.left.clearCalender();
  24322. this.$refs.right && this.$refs.right.clearCalender();
  24323. this.$refs.right && this.$refs.right.changeMonth("next");
  24324. }
  24325. if (needEmit) {
  24326. this.$emit("change", []);
  24327. this.$emit("input", []);
  24328. this.$emit("update:modelValue", []);
  24329. }
  24330. }
  24331. }
  24332. }
  24333. };
  24334. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  24335. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  24336. const _component_time_picker = vue.resolveComponent("time-picker");
  24337. const _component_Calendar = vue.resolveComponent("Calendar");
  24338. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
  24339. vue.createElementVNode("view", {
  24340. class: "uni-date-editor",
  24341. onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args))
  24342. }, [
  24343. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  24344. vue.createElementVNode(
  24345. "view",
  24346. {
  24347. class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }])
  24348. },
  24349. [
  24350. !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
  24351. key: 0,
  24352. class: "uni-date-x uni-date-single"
  24353. }, [
  24354. vue.createVNode(_component_uni_icons, {
  24355. class: "icon-calendar",
  24356. type: "calendar",
  24357. color: "#c0c4cc",
  24358. size: "22"
  24359. }),
  24360. vue.createElementVNode(
  24361. "view",
  24362. { class: "uni-date__x-input" },
  24363. vue.toDisplayString($data.displayValue || $options.singlePlaceholderText),
  24364. 1
  24365. /* TEXT */
  24366. )
  24367. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  24368. key: 1,
  24369. class: "uni-date-x uni-date-range"
  24370. }, [
  24371. vue.createVNode(_component_uni_icons, {
  24372. class: "icon-calendar",
  24373. type: "calendar",
  24374. color: "#c0c4cc",
  24375. size: "22"
  24376. }),
  24377. vue.createElementVNode(
  24378. "view",
  24379. { class: "uni-date__x-input text-center" },
  24380. vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText),
  24381. 1
  24382. /* TEXT */
  24383. ),
  24384. vue.createElementVNode(
  24385. "view",
  24386. { class: "range-separator" },
  24387. vue.toDisplayString($props.rangeSeparator),
  24388. 1
  24389. /* TEXT */
  24390. ),
  24391. vue.createElementVNode(
  24392. "view",
  24393. { class: "uni-date__x-input text-center" },
  24394. vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText),
  24395. 1
  24396. /* TEXT */
  24397. )
  24398. ])),
  24399. $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  24400. key: 2,
  24401. class: "uni-date__icon-clear",
  24402. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  24403. }, [
  24404. vue.createVNode(_component_uni_icons, {
  24405. type: "clear",
  24406. color: "#c0c4cc",
  24407. size: "22"
  24408. })
  24409. ])) : vue.createCommentVNode("v-if", true)
  24410. ],
  24411. 2
  24412. /* CLASS */
  24413. )
  24414. ], true)
  24415. ]),
  24416. vue.withDirectives(vue.createElementVNode(
  24417. "view",
  24418. {
  24419. class: "uni-date-mask--pc",
  24420. onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
  24421. },
  24422. null,
  24423. 512
  24424. /* NEED_PATCH */
  24425. ), [
  24426. [vue.vShow, $data.pickerVisible]
  24427. ]),
  24428. !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  24429. "view",
  24430. {
  24431. key: 0,
  24432. ref: "datePicker",
  24433. class: "uni-date-picker__container"
  24434. },
  24435. [
  24436. !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
  24437. "view",
  24438. {
  24439. key: 0,
  24440. class: "uni-date-single--x",
  24441. style: vue.normalizeStyle($data.pickerPositionStyle)
  24442. },
  24443. [
  24444. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24445. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24446. key: 0,
  24447. class: "uni-date-changed popup-x-header"
  24448. }, [
  24449. vue.withDirectives(vue.createElementVNode("input", {
  24450. class: "uni-date__input text-center",
  24451. type: "text",
  24452. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event),
  24453. placeholder: $options.selectDateText
  24454. }, null, 8, ["placeholder"]), [
  24455. [vue.vModelText, $data.inputDate]
  24456. ]),
  24457. vue.createVNode(_component_time_picker, {
  24458. type: "time",
  24459. modelValue: $data.pickerTime,
  24460. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event),
  24461. border: false,
  24462. disabled: !$data.inputDate,
  24463. start: $options.timepickerStartTime,
  24464. end: $options.timepickerEndTime,
  24465. hideSecond: $props.hideSecond,
  24466. style: { "width": "100%" }
  24467. }, {
  24468. default: vue.withCtx(() => [
  24469. vue.withDirectives(vue.createElementVNode("input", {
  24470. class: "uni-date__input text-center",
  24471. type: "text",
  24472. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event),
  24473. placeholder: $options.selectTimeText,
  24474. disabled: !$data.inputDate
  24475. }, null, 8, ["placeholder", "disabled"]), [
  24476. [vue.vModelText, $data.pickerTime]
  24477. ])
  24478. ]),
  24479. _: 1
  24480. /* STABLE */
  24481. }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
  24482. ])) : vue.createCommentVNode("v-if", true),
  24483. vue.createVNode(_component_Calendar, {
  24484. ref: "pcSingle",
  24485. showMonth: false,
  24486. "start-date": $data.calendarRange.startDate,
  24487. "end-date": $data.calendarRange.endDate,
  24488. date: $data.calendarDate,
  24489. onChange: $options.singleChange,
  24490. "default-value": $props.defaultValue,
  24491. style: { "padding": "0 8px" }
  24492. }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]),
  24493. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24494. key: 1,
  24495. class: "popup-x-footer"
  24496. }, [
  24497. vue.createElementVNode(
  24498. "text",
  24499. {
  24500. class: "confirm-text",
  24501. onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
  24502. },
  24503. vue.toDisplayString($options.okText),
  24504. 1
  24505. /* TEXT */
  24506. )
  24507. ])) : vue.createCommentVNode("v-if", true)
  24508. ],
  24509. 4
  24510. /* STYLE */
  24511. )) : (vue.openBlock(), vue.createElementBlock(
  24512. "view",
  24513. {
  24514. key: 1,
  24515. class: "uni-date-range--x",
  24516. style: vue.normalizeStyle($data.pickerPositionStyle)
  24517. },
  24518. [
  24519. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24520. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24521. key: 0,
  24522. class: "popup-x-header uni-date-changed"
  24523. }, [
  24524. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24525. vue.withDirectives(vue.createElementVNode("input", {
  24526. class: "uni-date__input uni-date-range__input",
  24527. type: "text",
  24528. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event),
  24529. placeholder: $options.startDateText
  24530. }, null, 8, ["placeholder"]), [
  24531. [vue.vModelText, $data.tempRange.startDate]
  24532. ]),
  24533. vue.createVNode(_component_time_picker, {
  24534. type: "time",
  24535. modelValue: $data.tempRange.startTime,
  24536. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event),
  24537. start: $options.timepickerStartTime,
  24538. border: false,
  24539. disabled: !$data.tempRange.startDate,
  24540. hideSecond: $props.hideSecond
  24541. }, {
  24542. default: vue.withCtx(() => [
  24543. vue.withDirectives(vue.createElementVNode("input", {
  24544. class: "uni-date__input uni-date-range__input",
  24545. type: "text",
  24546. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event),
  24547. placeholder: $options.startTimeText,
  24548. disabled: !$data.tempRange.startDate
  24549. }, null, 8, ["placeholder", "disabled"]), [
  24550. [vue.vModelText, $data.tempRange.startTime]
  24551. ])
  24552. ]),
  24553. _: 1
  24554. /* STABLE */
  24555. }, 8, ["modelValue", "start", "disabled", "hideSecond"])
  24556. ]),
  24557. vue.createVNode(_component_uni_icons, {
  24558. type: "arrowthinright",
  24559. color: "#999",
  24560. style: { "line-height": "40px" }
  24561. }),
  24562. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24563. vue.withDirectives(vue.createElementVNode("input", {
  24564. class: "uni-date__input uni-date-range__input",
  24565. type: "text",
  24566. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event),
  24567. placeholder: $options.endDateText
  24568. }, null, 8, ["placeholder"]), [
  24569. [vue.vModelText, $data.tempRange.endDate]
  24570. ]),
  24571. vue.createVNode(_component_time_picker, {
  24572. type: "time",
  24573. modelValue: $data.tempRange.endTime,
  24574. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event),
  24575. end: $options.timepickerEndTime,
  24576. border: false,
  24577. disabled: !$data.tempRange.endDate,
  24578. hideSecond: $props.hideSecond
  24579. }, {
  24580. default: vue.withCtx(() => [
  24581. vue.withDirectives(vue.createElementVNode("input", {
  24582. class: "uni-date__input uni-date-range__input",
  24583. type: "text",
  24584. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event),
  24585. placeholder: $options.endTimeText,
  24586. disabled: !$data.tempRange.endDate
  24587. }, null, 8, ["placeholder", "disabled"]), [
  24588. [vue.vModelText, $data.tempRange.endTime]
  24589. ])
  24590. ]),
  24591. _: 1
  24592. /* STABLE */
  24593. }, 8, ["modelValue", "end", "disabled", "hideSecond"])
  24594. ])
  24595. ])) : vue.createCommentVNode("v-if", true),
  24596. vue.createElementVNode("view", { class: "popup-x-body" }, [
  24597. vue.createVNode(_component_Calendar, {
  24598. ref: "left",
  24599. showMonth: false,
  24600. "start-date": $data.calendarRange.startDate,
  24601. "end-date": $data.calendarRange.endDate,
  24602. range: true,
  24603. pleStatus: $data.endMultipleStatus,
  24604. onChange: $options.leftChange,
  24605. onFirstEnterCale: $options.updateRightCale,
  24606. style: { "padding": "0 8px" }
  24607. }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]),
  24608. vue.createVNode(_component_Calendar, {
  24609. ref: "right",
  24610. showMonth: false,
  24611. "start-date": $data.calendarRange.startDate,
  24612. "end-date": $data.calendarRange.endDate,
  24613. range: true,
  24614. onChange: $options.rightChange,
  24615. pleStatus: $data.startMultipleStatus,
  24616. onFirstEnterCale: $options.updateLeftCale,
  24617. style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
  24618. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"])
  24619. ]),
  24620. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24621. key: 1,
  24622. class: "popup-x-footer"
  24623. }, [
  24624. vue.createElementVNode(
  24625. "text",
  24626. {
  24627. onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args))
  24628. },
  24629. vue.toDisplayString($options.clearText),
  24630. 1
  24631. /* TEXT */
  24632. ),
  24633. vue.createElementVNode(
  24634. "text",
  24635. {
  24636. class: "confirm-text",
  24637. onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
  24638. },
  24639. vue.toDisplayString($options.okText),
  24640. 1
  24641. /* TEXT */
  24642. )
  24643. ])) : vue.createCommentVNode("v-if", true)
  24644. ],
  24645. 4
  24646. /* STYLE */
  24647. ))
  24648. ],
  24649. 512
  24650. /* NEED_PATCH */
  24651. )), [
  24652. [vue.vShow, $data.pickerVisible]
  24653. ]) : vue.createCommentVNode("v-if", true),
  24654. $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, {
  24655. key: 1,
  24656. ref: "mobile",
  24657. clearDate: false,
  24658. date: $data.calendarDate,
  24659. defTime: $options.mobileCalendarTime,
  24660. "start-date": $data.calendarRange.startDate,
  24661. "end-date": $data.calendarRange.endDate,
  24662. selectableTimes: $options.mobSelectableTime,
  24663. startPlaceholder: $props.startPlaceholder,
  24664. endPlaceholder: $props.endPlaceholder,
  24665. "default-value": $props.defaultValue,
  24666. pleStatus: $data.endMultipleStatus,
  24667. showMonth: false,
  24668. range: $data.isRange,
  24669. hasTime: $data.hasTime,
  24670. insert: false,
  24671. hideSecond: $props.hideSecond,
  24672. onConfirm: $options.mobileChange,
  24673. onMaskClose: $options.close
  24674. }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose"])) : vue.createCommentVNode("v-if", true)
  24675. ]);
  24676. }
  24677. 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"]]);
  24678. const _sfc_main$P = {
  24679. __name: "after-sale",
  24680. setup(__props, { expose: __expose }) {
  24681. __expose();
  24682. const otherParams = vue.ref({
  24683. sender: ""
  24684. });
  24685. const scrollRef = vue.ref(null);
  24686. const refreshList = () => {
  24687. var _a;
  24688. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24689. };
  24690. let dataList = vue.ref([{
  24691. date: "2024-10-24",
  24692. orderNum: 423,
  24693. auditNum: 293,
  24694. trueNum: 323
  24695. }, {
  24696. date: "2024-10-24",
  24697. orderNum: 423,
  24698. auditNum: 293,
  24699. trueNum: 323
  24700. }, {
  24701. date: "2024-10-24",
  24702. orderNum: 423,
  24703. auditNum: 293,
  24704. trueNum: 323
  24705. }]);
  24706. const updateList = (data) => {
  24707. dataList.value = data;
  24708. };
  24709. const form = vue.reactive({
  24710. startTime: "",
  24711. endTime: ""
  24712. });
  24713. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24714. return dataList;
  24715. }, set dataList(v) {
  24716. dataList = v;
  24717. }, updateList, form, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  24718. return onLoad;
  24719. } };
  24720. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24721. return __returned__;
  24722. }
  24723. };
  24724. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  24725. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$2);
  24726. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  24727. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  24728. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  24729. return vue.openBlock(), vue.createElementBlock("view", {
  24730. class: "common-page",
  24731. style: { "padding": "0" }
  24732. }, [
  24733. vue.createVNode($setup["PageScroll"], {
  24734. requestStr: "/team/token/shop/invite/page",
  24735. onUpdateList: $setup.updateList,
  24736. ref: "scrollRef",
  24737. otherParams: $setup.otherParams
  24738. }, {
  24739. default: vue.withCtx(() => [
  24740. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24741. default: vue.withCtx(() => [
  24742. vue.createElementVNode("view", { class: "search-area flex-d" }, [
  24743. vue.createElementVNode("view", { class: "flex-a mb-12" }, [
  24744. vue.createElementVNode("text", { class: "font-13 mr-10" }, "开始时间:"),
  24745. vue.createVNode(_component_uni_datetime_picker, {
  24746. type: "datetime",
  24747. modelValue: $setup.form.startTime,
  24748. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.startTime = $event)
  24749. }, null, 8, ["modelValue"])
  24750. ]),
  24751. vue.createElementVNode("view", { class: "flex-a" }, [
  24752. vue.createElementVNode("text", { class: "font-13 mr-10" }, "结束时间:"),
  24753. vue.createVNode(_component_uni_datetime_picker, {
  24754. type: "datetime",
  24755. modelValue: $setup.form.endTime,
  24756. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.endTime = $event)
  24757. }, null, 8, ["modelValue"]),
  24758. vue.createVNode(_component_u_button, {
  24759. type: "primary",
  24760. "custom-style": "width:160rpx;height:72rpx;margin-left:10px"
  24761. }, {
  24762. default: vue.withCtx(() => [
  24763. vue.createTextVNode("查询")
  24764. ]),
  24765. _: 1
  24766. /* STABLE */
  24767. })
  24768. ]),
  24769. vue.createVNode(_component_u_divider),
  24770. vue.createElementVNode("view", { class: "flex-a" }, [
  24771. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24772. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  24773. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  24774. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  24775. ])
  24776. ])
  24777. ]),
  24778. _: 1
  24779. /* STABLE */
  24780. }),
  24781. vue.createElementVNode("view", { class: "list-con" }, [
  24782. (vue.openBlock(true), vue.createElementBlock(
  24783. vue.Fragment,
  24784. null,
  24785. vue.renderList($setup.dataList, (item, index2) => {
  24786. return vue.openBlock(), vue.createElementBlock("view", {
  24787. key: index2,
  24788. class: "flex-a"
  24789. }, [
  24790. vue.createElementVNode(
  24791. "view",
  24792. { class: "text-item flex-1" },
  24793. vue.toDisplayString(item.date),
  24794. 1
  24795. /* TEXT */
  24796. ),
  24797. vue.createElementVNode(
  24798. "view",
  24799. { class: "text-item flex-1" },
  24800. vue.toDisplayString(item.orderNum),
  24801. 1
  24802. /* TEXT */
  24803. ),
  24804. vue.createElementVNode(
  24805. "view",
  24806. { class: "text-item flex-1" },
  24807. vue.toDisplayString(item.auditNum),
  24808. 1
  24809. /* TEXT */
  24810. ),
  24811. vue.createElementVNode(
  24812. "view",
  24813. { class: "text-item flex-1" },
  24814. vue.toDisplayString(item.trueNum),
  24815. 1
  24816. /* TEXT */
  24817. )
  24818. ]);
  24819. }),
  24820. 128
  24821. /* KEYED_FRAGMENT */
  24822. ))
  24823. ])
  24824. ]),
  24825. _: 1
  24826. /* STABLE */
  24827. }, 8, ["otherParams"])
  24828. ]);
  24829. }
  24830. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/after-sale.vue"]]);
  24831. const _sfc_main$O = {
  24832. __name: "package",
  24833. setup(__props, { expose: __expose }) {
  24834. __expose();
  24835. const otherParams = vue.ref({
  24836. sender: ""
  24837. });
  24838. const scrollRef = vue.ref(null);
  24839. const refreshList = () => {
  24840. var _a;
  24841. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24842. };
  24843. let dataList = vue.ref([{
  24844. date: "2024-10-24",
  24845. orderNum: 423
  24846. }, {
  24847. date: "2024-10-24",
  24848. orderNum: 423
  24849. }, {
  24850. date: "2024-10-24",
  24851. orderNum: 423
  24852. }]);
  24853. const updateList = (data) => {
  24854. dataList.value = data;
  24855. };
  24856. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24857. return dataList;
  24858. }, set dataList(v) {
  24859. dataList = v;
  24860. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  24861. return onLoad;
  24862. } };
  24863. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24864. return __returned__;
  24865. }
  24866. };
  24867. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  24868. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  24869. return vue.openBlock(), vue.createElementBlock("view", {
  24870. class: "common-page",
  24871. style: { "padding": "0" }
  24872. }, [
  24873. vue.createVNode($setup["PageScroll"], {
  24874. requestStr: "/team/token/shop/invite/page",
  24875. onUpdateList: $setup.updateList,
  24876. ref: "scrollRef",
  24877. otherParams: $setup.otherParams
  24878. }, {
  24879. default: vue.withCtx(() => [
  24880. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24881. default: vue.withCtx(() => [
  24882. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  24883. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24884. vue.createElementVNode("view", { class: "text-item flex-1" }, "数量")
  24885. ])
  24886. ]),
  24887. _: 1
  24888. /* STABLE */
  24889. }),
  24890. vue.createElementVNode("view", { class: "list-con" }, [
  24891. (vue.openBlock(true), vue.createElementBlock(
  24892. vue.Fragment,
  24893. null,
  24894. vue.renderList($setup.dataList, (item, index2) => {
  24895. return vue.openBlock(), vue.createElementBlock("view", {
  24896. key: index2,
  24897. class: "flex-a"
  24898. }, [
  24899. vue.createElementVNode(
  24900. "view",
  24901. { class: "text-item flex-1" },
  24902. vue.toDisplayString(item.date),
  24903. 1
  24904. /* TEXT */
  24905. ),
  24906. vue.createElementVNode(
  24907. "view",
  24908. { class: "text-item flex-1" },
  24909. vue.toDisplayString(item.orderNum),
  24910. 1
  24911. /* TEXT */
  24912. )
  24913. ]);
  24914. }),
  24915. 128
  24916. /* KEYED_FRAGMENT */
  24917. ))
  24918. ])
  24919. ]),
  24920. _: 1
  24921. /* STABLE */
  24922. }, 8, ["otherParams"])
  24923. ]);
  24924. }
  24925. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/package.vue"]]);
  24926. const _sfc_main$N = {
  24927. name: "GoodIn"
  24928. };
  24929. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  24930. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24931. vue.createCommentVNode(" 开发中提示 "),
  24932. vue.createElementVNode("view", { class: "developing" }, [
  24933. vue.createElementVNode("text", null, "开发中")
  24934. ])
  24935. ]);
  24936. }
  24937. 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"]]);
  24938. const _sfc_main$M = {
  24939. name: "GoodIn"
  24940. };
  24941. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  24942. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24943. vue.createCommentVNode(" 开发中提示 "),
  24944. vue.createElementVNode("view", { class: "developing" }, [
  24945. vue.createElementVNode("text", null, "开发中")
  24946. ])
  24947. ]);
  24948. }
  24949. 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"]]);
  24950. const _sfc_main$L = {
  24951. name: "GoodIn"
  24952. };
  24953. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  24954. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24955. vue.createCommentVNode(" 开发中提示 "),
  24956. vue.createElementVNode("view", { class: "developing" }, [
  24957. vue.createElementVNode("text", null, "开发中")
  24958. ])
  24959. ]);
  24960. }
  24961. 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"]]);
  24962. const MIN_DISTANCE = 10;
  24963. function getDirection(x, y) {
  24964. if (x > y && x > MIN_DISTANCE) {
  24965. return "horizontal";
  24966. }
  24967. if (y > x && y > MIN_DISTANCE) {
  24968. return "vertical";
  24969. }
  24970. return "";
  24971. }
  24972. const touch = {
  24973. methods: {
  24974. getTouchPoint(e) {
  24975. if (!e) {
  24976. return {
  24977. x: 0,
  24978. y: 0
  24979. };
  24980. }
  24981. if (e.touches && e.touches[0]) {
  24982. return {
  24983. x: e.touches[0].pageX,
  24984. y: e.touches[0].pageY
  24985. };
  24986. }
  24987. if (e.changedTouches && e.changedTouches[0]) {
  24988. return {
  24989. x: e.changedTouches[0].pageX,
  24990. y: e.changedTouches[0].pageY
  24991. };
  24992. }
  24993. return {
  24994. x: e.clientX || 0,
  24995. y: e.clientY || 0
  24996. };
  24997. },
  24998. resetTouchStatus() {
  24999. this.direction = "";
  25000. this.deltaX = 0;
  25001. this.deltaY = 0;
  25002. this.offsetX = 0;
  25003. this.offsetY = 0;
  25004. },
  25005. touchStart(event) {
  25006. this.resetTouchStatus();
  25007. const touch2 = this.getTouchPoint(event);
  25008. this.startX = touch2.x;
  25009. this.startY = touch2.y;
  25010. },
  25011. touchMove(event) {
  25012. const touch2 = this.getTouchPoint(event);
  25013. this.deltaX = touch2.x - this.startX;
  25014. this.deltaY = touch2.y - this.startY;
  25015. this.offsetX = Math.abs(this.deltaX);
  25016. this.offsetY = Math.abs(this.deltaY);
  25017. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  25018. }
  25019. }
  25020. };
  25021. const props$7 = {
  25022. props: {
  25023. // 控制打开或者关闭
  25024. show: {
  25025. type: Boolean,
  25026. default: props$E.swipeActionItem.show
  25027. },
  25028. // 标识符,如果是v-for,可用index索引值
  25029. name: {
  25030. type: [String, Number],
  25031. default: props$E.swipeActionItem.name
  25032. },
  25033. // 是否禁用
  25034. disabled: {
  25035. type: Boolean,
  25036. default: props$E.swipeActionItem.disabled
  25037. },
  25038. // 是否自动关闭其他swipe按钮组
  25039. autoClose: {
  25040. type: Boolean,
  25041. default: props$E.swipeActionItem.autoClose
  25042. },
  25043. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  25044. threshold: {
  25045. type: Number,
  25046. default: props$E.swipeActionItem.threshold
  25047. },
  25048. // 右侧按钮内容
  25049. options: {
  25050. type: Array,
  25051. default() {
  25052. return uni.$u.props.swipeActionItem.rightOptions;
  25053. }
  25054. },
  25055. // 动画过渡时间,单位ms
  25056. duration: {
  25057. type: [String, Number],
  25058. default: props$E.swipeActionItem.duration
  25059. }
  25060. }
  25061. };
  25062. const wxs = {
  25063. methods: {
  25064. // 关闭时执行
  25065. closeHandler() {
  25066. this.status = "close";
  25067. },
  25068. setState(status) {
  25069. this.status = status;
  25070. },
  25071. closeOther() {
  25072. this.parent && this.parent.closeOther(this);
  25073. }
  25074. }
  25075. };
  25076. const block0 = (Comp) => {
  25077. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  25078. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
  25079. };
  25080. const _sfc_main$K = {
  25081. name: "u-swipe-action-item",
  25082. emits: ["click"],
  25083. mixins: [mpMixin, mixin, props$7, touch],
  25084. mixins: [mpMixin, mixin, props$7, touch, wxs],
  25085. data() {
  25086. return {
  25087. // 按钮的尺寸信息
  25088. size: {},
  25089. // 父组件u-swipe-action的参数
  25090. parentData: {
  25091. autoClose: true
  25092. },
  25093. // 当前状态,open-打开,close-关闭
  25094. status: "close"
  25095. };
  25096. },
  25097. watch: {
  25098. // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
  25099. wxsInit(newValue, oldValue) {
  25100. this.queryRect();
  25101. }
  25102. },
  25103. computed: {
  25104. wxsInit() {
  25105. return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
  25106. }
  25107. },
  25108. mounted() {
  25109. this.init();
  25110. },
  25111. methods: {
  25112. init() {
  25113. this.updateParentData();
  25114. uni.$u.sleep().then(() => {
  25115. this.queryRect();
  25116. });
  25117. },
  25118. updateParentData() {
  25119. this.getParentData("u-swipe-action");
  25120. },
  25121. // 查询节点
  25122. queryRect() {
  25123. this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
  25124. this.size = {
  25125. buttons,
  25126. show: this.show,
  25127. disabled: this.disabled,
  25128. threshold: this.threshold,
  25129. duration: this.duration
  25130. };
  25131. });
  25132. },
  25133. // 按钮被点击
  25134. buttonClickHandler(item, index2) {
  25135. this.$emit("click", {
  25136. index: index2,
  25137. name: this.name
  25138. });
  25139. }
  25140. }
  25141. };
  25142. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  25143. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25144. return vue.openBlock(), vue.createElementBlock(
  25145. "view",
  25146. {
  25147. class: "u-swipe-action-item",
  25148. ref: "u-swipe-action-item"
  25149. },
  25150. [
  25151. vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
  25152. vue.renderSlot(_ctx.$slots, "button", {}, () => [
  25153. (vue.openBlock(true), vue.createElementBlock(
  25154. vue.Fragment,
  25155. null,
  25156. vue.renderList(_ctx.options, (item, index2) => {
  25157. return vue.openBlock(), vue.createElementBlock("view", {
  25158. key: index2,
  25159. class: "u-swipe-action-item__right__button",
  25160. ref_for: true,
  25161. ref: `u-swipe-action-item__right__button-${index2}`,
  25162. style: vue.normalizeStyle([{
  25163. alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
  25164. }]),
  25165. onClick: ($event) => $options.buttonClickHandler(item, index2)
  25166. }, [
  25167. vue.createElementVNode(
  25168. "view",
  25169. {
  25170. class: "u-swipe-action-item__right__button__wrapper",
  25171. style: vue.normalizeStyle([{
  25172. backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
  25173. borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
  25174. padding: item.style && item.style.borderRadius ? "0" : "0 15px"
  25175. }, item.style])
  25176. },
  25177. [
  25178. item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  25179. key: 0,
  25180. name: item.icon,
  25181. color: item.style && item.style.color ? item.style.color : "#ffffff",
  25182. size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17,
  25183. customStyle: {
  25184. marginRight: item.text ? "2px" : 0
  25185. }
  25186. }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
  25187. item.text ? (vue.openBlock(), vue.createElementBlock(
  25188. "text",
  25189. {
  25190. key: 1,
  25191. class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
  25192. style: vue.normalizeStyle([{
  25193. color: item.style && item.style.color ? item.style.color : "#ffffff",
  25194. fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
  25195. lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
  25196. }])
  25197. },
  25198. vue.toDisplayString(item.text),
  25199. 5
  25200. /* TEXT, STYLE */
  25201. )) : vue.createCommentVNode("v-if", true)
  25202. ],
  25203. 4
  25204. /* STYLE */
  25205. )
  25206. ], 12, ["onClick"]);
  25207. }),
  25208. 128
  25209. /* KEYED_FRAGMENT */
  25210. ))
  25211. ], true)
  25212. ]),
  25213. vue.createElementVNode("view", {
  25214. class: "u-swipe-action-item__content",
  25215. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
  25216. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
  25217. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
  25218. status: vue.wp($data.status),
  25219. "change:status": _ctx.wxs.statusChange,
  25220. size: vue.wp($data.size),
  25221. "change:size": _ctx.wxs.sizeChange
  25222. }, [
  25223. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  25224. ], 40, ["status", "change:status", "size", "change:size"])
  25225. ],
  25226. 512
  25227. /* NEED_PATCH */
  25228. );
  25229. }
  25230. if (typeof block0 === "function")
  25231. block0(_sfc_main$K);
  25232. 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"]]);
  25233. const props$6 = {
  25234. props: {
  25235. // 是否自动关闭其他swipe按钮组
  25236. autoClose: {
  25237. type: Boolean,
  25238. default: props$E.swipeAction.autoClose
  25239. }
  25240. }
  25241. };
  25242. const _sfc_main$J = {
  25243. name: "u-swipe-action",
  25244. mixins: [mpMixin, mixin, props$6],
  25245. data() {
  25246. return {};
  25247. },
  25248. provide() {
  25249. return {
  25250. swipeAction: this
  25251. };
  25252. },
  25253. computed: {
  25254. // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  25255. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
  25256. // 拉取父组件新的变化后的参数
  25257. parentData() {
  25258. return [this.autoClose];
  25259. }
  25260. },
  25261. watch: {
  25262. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  25263. parentData() {
  25264. if (this.children.length) {
  25265. this.children.map((child) => {
  25266. typeof child.updateParentData === "function" && child.updateParentData();
  25267. });
  25268. }
  25269. }
  25270. },
  25271. created() {
  25272. this.children = [];
  25273. },
  25274. methods: {
  25275. closeOther(child) {
  25276. if (this.autoClose) {
  25277. this.children.map((item, index2) => {
  25278. if (child !== item) {
  25279. item.closeHandler();
  25280. }
  25281. });
  25282. }
  25283. }
  25284. }
  25285. };
  25286. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  25287. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
  25288. vue.renderSlot(_ctx.$slots, "default")
  25289. ]);
  25290. }
  25291. 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"]]);
  25292. const _sfc_main$I = {
  25293. __name: "BadItem",
  25294. props: {
  25295. data: {
  25296. type: Object,
  25297. required: true,
  25298. default: () => ({
  25299. orderNo: "",
  25300. badCount: "",
  25301. logisticsNo: "",
  25302. checkDate: "",
  25303. operator: ""
  25304. })
  25305. }
  25306. },
  25307. emits: ["delete", "edit"],
  25308. setup(__props, { expose: __expose, emit: __emit }) {
  25309. __expose();
  25310. const props2 = __props;
  25311. const emit2 = __emit;
  25312. const options = vue.ref([
  25313. {
  25314. text: "删除",
  25315. style: {
  25316. backgroundColor: "#ff4444"
  25317. }
  25318. }
  25319. ]);
  25320. const handleAction = (e) => {
  25321. if (e.index === 0) {
  25322. uni.showModal({
  25323. title: "提示",
  25324. content: "确定要删除该订单吗?",
  25325. success: (res2) => {
  25326. if (res2.confirm) {
  25327. emit2("delete");
  25328. }
  25329. }
  25330. });
  25331. }
  25332. };
  25333. const __returned__ = { props: props2, emit: emit2, options, handleAction, ref: vue.ref };
  25334. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25335. return __returned__;
  25336. }
  25337. };
  25338. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  25339. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25340. const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1);
  25341. const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2);
  25342. return vue.openBlock(), vue.createElementBlock("view", { class: "bad-item" }, [
  25343. vue.createVNode(_component_u_swipe_action, null, {
  25344. default: vue.withCtx(() => [
  25345. vue.createVNode(_component_u_swipe_action_item, {
  25346. options: $setup.options,
  25347. onClick: $setup.handleAction
  25348. }, {
  25349. default: vue.withCtx(() => [
  25350. vue.createElementVNode("view", { class: "item-content" }, [
  25351. vue.createElementVNode("view", { class: "item-row" }, [
  25352. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  25353. vue.createElementVNode(
  25354. "text",
  25355. { class: "value" },
  25356. vue.toDisplayString($props.data.orderId),
  25357. 1
  25358. /* TEXT */
  25359. ),
  25360. vue.createVNode(_component_u_icon, {
  25361. name: "edit-pen",
  25362. color: "#4CAF50",
  25363. size: "20",
  25364. class: "edit-icon",
  25365. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
  25366. })
  25367. ]),
  25368. vue.createElementVNode("view", { class: "item-row" }, [
  25369. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  25370. vue.createElementVNode(
  25371. "text",
  25372. { class: "value" },
  25373. vue.toDisplayString($props.data.badNum),
  25374. 1
  25375. /* TEXT */
  25376. )
  25377. ]),
  25378. vue.createElementVNode("view", { class: "item-row" }, [
  25379. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  25380. vue.createElementVNode(
  25381. "text",
  25382. { class: "value" },
  25383. vue.toDisplayString($props.data.waybillCode),
  25384. 1
  25385. /* TEXT */
  25386. )
  25387. ]),
  25388. vue.createElementVNode("view", { class: "item-row" }, [
  25389. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  25390. vue.createElementVNode(
  25391. "text",
  25392. { class: "value" },
  25393. vue.toDisplayString($props.data.auditFinishTime),
  25394. 1
  25395. /* TEXT */
  25396. )
  25397. ]),
  25398. vue.createElementVNode("view", { class: "item-row" }, [
  25399. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  25400. vue.createElementVNode(
  25401. "text",
  25402. { class: "value" },
  25403. vue.toDisplayString($props.data.auditUserName),
  25404. 1
  25405. /* TEXT */
  25406. )
  25407. ])
  25408. ])
  25409. ]),
  25410. _: 1
  25411. /* STABLE */
  25412. }, 8, ["options"])
  25413. ]),
  25414. _: 1
  25415. /* STABLE */
  25416. })
  25417. ]);
  25418. }
  25419. 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"]]);
  25420. class VolumeTTS {
  25421. constructor(opts) {
  25422. __publicField(this, "ttsParams", {
  25423. lang: "zh-CN",
  25424. speed: 1,
  25425. // 将 0-10 转换为 0-1
  25426. pitch: 1,
  25427. // 将 0-10 转换为 0-1
  25428. volume: 1
  25429. });
  25430. __publicField(this, "TTSModule");
  25431. __publicField(this, "platform", uni.getSystemInfoSync().platform);
  25432. let audioConfig = uni.getStorageSync("audioConfig");
  25433. if (opts) {
  25434. this.ttsParams = opts;
  25435. } else if (audioConfig) {
  25436. this.ttsParams = {
  25437. lang: "zh-CN",
  25438. speed: audioConfig.audioSpeed / 10,
  25439. pitch: audioConfig.audioVolume,
  25440. volume: 1
  25441. };
  25442. }
  25443. this.init();
  25444. }
  25445. init() {
  25446. this.TTSModule = requireNativePlugin("nrb-tts-plugin");
  25447. this.TTSModule && this.TTSModule.init(
  25448. {
  25449. lang: "zh",
  25450. country: "CN"
  25451. },
  25452. (res2) => {
  25453. if (res2.success == 0) {
  25454. formatAppLog("log", "at utils/VolumeTTS.js:39", "TTS初始化成功");
  25455. }
  25456. }
  25457. );
  25458. }
  25459. //加一个text的预处理,将text中的数字替换成 零一二三四五六七八九十
  25460. preprocessText(text) {
  25461. const digitMap = {
  25462. 0: "零",
  25463. 1: "一",
  25464. 2: "二",
  25465. 3: "三",
  25466. 4: "四",
  25467. 5: "五",
  25468. 6: "六",
  25469. 7: "七",
  25470. 8: "八",
  25471. 9: "九"
  25472. };
  25473. return text.replace(/\d+/g, (match) => {
  25474. return match.split("").map((digit) => digitMap[digit] || digit).join("");
  25475. });
  25476. }
  25477. speak(text) {
  25478. text = this.preprocessText(text);
  25479. let opts = this.platform == "ios" ? {
  25480. rate: this.ttsParams.speed,
  25481. lang: "zh-CN",
  25482. volume: 1
  25483. } : {
  25484. pitch: this.ttsParams.pitch,
  25485. speechRate: this.ttsParams.speed,
  25486. queueMode: 1
  25487. };
  25488. this.TTSModule.speak(text, opts, (e) => {
  25489. formatAppLog("log", "at utils/VolumeTTS.js:98", e, "读取成功");
  25490. });
  25491. }
  25492. stop() {
  25493. if (this.TTSModule) {
  25494. this.TTSModule.stop();
  25495. }
  25496. }
  25497. }
  25498. const _sfc_main$H = {
  25499. __name: "RemarkDialog",
  25500. props: {
  25501. visible: {
  25502. type: Boolean,
  25503. default: false
  25504. },
  25505. initialValue: {
  25506. type: String,
  25507. default: ""
  25508. }
  25509. },
  25510. emits: ["update:visible", "confirm"],
  25511. setup(__props, { expose: __expose, emit: __emit }) {
  25512. __expose();
  25513. const props2 = __props;
  25514. const emit2 = __emit;
  25515. const remarkText = vue.ref("");
  25516. const quickTags = vue.ref(["少书", "多书", "子母件", "书单不符"]);
  25517. vue.watch(() => props2.visible, (newVal) => {
  25518. if (newVal) {
  25519. remarkText.value = props2.initialValue;
  25520. }
  25521. });
  25522. const appendTag = (tag) => {
  25523. remarkText.value += remarkText.value ? " " + tag : tag;
  25524. };
  25525. const onClose = () => {
  25526. emit2("update:visible", false);
  25527. };
  25528. const onConfirm = () => {
  25529. emit2("confirm", remarkText.value);
  25530. onClose();
  25531. };
  25532. const __returned__ = { props: props2, emit: emit2, remarkText, quickTags, appendTag, onClose, onConfirm, ref: vue.ref, watch: vue.watch };
  25533. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25534. return __returned__;
  25535. }
  25536. };
  25537. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  25538. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  25539. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  25540. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  25541. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  25542. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  25543. show: $props.visible,
  25544. onClose: $setup.onClose,
  25545. mode: "center",
  25546. round: "10",
  25547. closeOnClickOverlay: false
  25548. }, {
  25549. default: vue.withCtx(() => [
  25550. vue.createElementVNode("view", { class: "remark-dialog" }, [
  25551. vue.createElementVNode("view", { class: "dialog-title" }, "编辑备注"),
  25552. vue.createCommentVNode(" 备注输入框 "),
  25553. vue.createElementVNode("view", { class: "dialog-content mb-30" }, [
  25554. vue.createVNode(_component_u_textarea, {
  25555. modelValue: $setup.remarkText,
  25556. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.remarkText = $event),
  25557. placeholder: "请输入",
  25558. maxlength: 200,
  25559. height: "100",
  25560. count: ""
  25561. }, null, 8, ["modelValue"]),
  25562. vue.createCommentVNode(" 快速输入标签 "),
  25563. vue.createElementVNode("view", { class: "quick-tags mt-10" }, [
  25564. vue.createElementVNode("text", { class: "common-title" }, "快速填入"),
  25565. vue.createElementVNode("view", { class: "tags-container flex-w mt-20" }, [
  25566. (vue.openBlock(true), vue.createElementBlock(
  25567. vue.Fragment,
  25568. null,
  25569. vue.renderList($setup.quickTags, (tag, index2) => {
  25570. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  25571. key: index2,
  25572. text: tag,
  25573. plain: "",
  25574. size: "mini",
  25575. type: "primary",
  25576. onClick: ($event) => $setup.appendTag(tag),
  25577. class: "tag-item"
  25578. }, null, 8, ["text", "onClick"]);
  25579. }),
  25580. 128
  25581. /* KEYED_FRAGMENT */
  25582. ))
  25583. ])
  25584. ])
  25585. ]),
  25586. vue.createCommentVNode(" 底部按钮 "),
  25587. vue.createElementVNode("view", { class: "dialog-footer" }, [
  25588. vue.createVNode(_component_u_button, {
  25589. plain: "",
  25590. onClick: $setup.onClose,
  25591. class: "footer-btn"
  25592. }, {
  25593. default: vue.withCtx(() => [
  25594. vue.createTextVNode("取消")
  25595. ]),
  25596. _: 1
  25597. /* STABLE */
  25598. }),
  25599. vue.createVNode(_component_u_button, {
  25600. type: "primary",
  25601. onClick: $setup.onConfirm,
  25602. class: "footer-btn"
  25603. }, {
  25604. default: vue.withCtx(() => [
  25605. vue.createTextVNode("确定")
  25606. ]),
  25607. _: 1
  25608. /* STABLE */
  25609. })
  25610. ])
  25611. ])
  25612. ]),
  25613. _: 1
  25614. /* STABLE */
  25615. }, 8, ["show"]);
  25616. }
  25617. 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"]]);
  25618. const _sfc_main$G = {
  25619. __name: "bad-in",
  25620. setup(__props, { expose: __expose }) {
  25621. __expose();
  25622. const waybillCode = vue.ref();
  25623. const formData = vue.reactive({
  25624. godownName: "",
  25625. godownId: "",
  25626. positionCode: ""
  25627. });
  25628. const ordersMap = vue.ref([]);
  25629. const codeMap = vue.ref([]);
  25630. function getDetailByCode2(code2) {
  25631. if (codeMap.value.includes(code2)) {
  25632. uni.$u.ttsModule.speak("重复扫描");
  25633. return;
  25634. }
  25635. uni.$u.http.get("/app/stock/searchOrder?waybillCode=" + code2).then((res2) => {
  25636. if (res2.code == 200) {
  25637. ordersMap.value.unshift(res2.data);
  25638. codeMap.value.push(code2);
  25639. } else if (res2.code == 601) {
  25640. uni.$u.ttsModule.speak(res2.msg);
  25641. uni.showModal({
  25642. title: "提示",
  25643. content: res2.msg,
  25644. showCancel: false
  25645. });
  25646. } else {
  25647. uni.$u.toast(res2.msg);
  25648. }
  25649. });
  25650. }
  25651. const remarkVisible = vue.ref(false);
  25652. const currentRemark = vue.ref("");
  25653. const currentEditIndex = vue.ref(-1);
  25654. const goBack = () => {
  25655. if (ordersMap.value.length > 0) {
  25656. uni.showModal({
  25657. title: "退出确认",
  25658. content: "是否确认放弃本次入库?",
  25659. success: (res2) => {
  25660. if (res2.confirm) {
  25661. uni.navigateBack();
  25662. }
  25663. }
  25664. });
  25665. } else {
  25666. uni.navigateBack();
  25667. }
  25668. };
  25669. const onSubmit = () => {
  25670. if (!formData.godownId || !formData.positionCode) {
  25671. uni.$u.toast("请先选择仓库和库位");
  25672. uni.$u.ttsModule.speak("请先选择仓库和库位");
  25673. return;
  25674. }
  25675. uni.showModal({
  25676. title: "提交确认",
  25677. content: "是否确认提交本次入库?",
  25678. success: (res2) => {
  25679. if (res2.confirm) {
  25680. handleSubmitConfirm();
  25681. }
  25682. }
  25683. });
  25684. };
  25685. const handleSubmitConfirm = async () => {
  25686. uni.showLoading({
  25687. title: "提交中..."
  25688. });
  25689. let orderInfo = ordersMap.value.map((item) => {
  25690. return {
  25691. orderId: item.orderId,
  25692. waybillCode: item.waybillCode,
  25693. bookNum: item.badNum,
  25694. remark: item.remark
  25695. };
  25696. });
  25697. if (orderInfo.length == 0) {
  25698. uni.hideLoading();
  25699. uni.$u.ttsModule.speak("请添加订单数据");
  25700. return;
  25701. }
  25702. uni.$u.http.post("/app/stock/addBatch", {
  25703. godownId: formData.godownId,
  25704. positionCode: formData.positionCode,
  25705. orderInfo
  25706. }).then((res2) => {
  25707. if (res2.code == 200) {
  25708. uni.$u.toast("入库成功");
  25709. uni.$u.ttsModule.speak("入库成功");
  25710. clearData();
  25711. } else {
  25712. uni.$u.toast(res2.msg);
  25713. }
  25714. }).finally(() => {
  25715. uni.hideLoading();
  25716. });
  25717. };
  25718. const clearData = () => {
  25719. ordersMap.value.length = 0;
  25720. waybillCode.value = "";
  25721. formData.godownName = "";
  25722. formData.positionCode = "";
  25723. formData.godownId = "";
  25724. };
  25725. const editOrder = (index2) => {
  25726. openRemarkDialog(index2);
  25727. };
  25728. const openScan = () => {
  25729. uni.scanCode({
  25730. success: (res2) => {
  25731. waybillCode.value = res2.result;
  25732. getDetailByCode2(res2.result);
  25733. },
  25734. fail: (err) => {
  25735. uni.showToast({
  25736. title: "扫码失败",
  25737. icon: "error"
  25738. });
  25739. }
  25740. });
  25741. };
  25742. function selectLocation() {
  25743. if (!formData.godownId) {
  25744. uni.$u.toast("请先选择仓库");
  25745. uni.$u.ttsModule.speak("请先选择仓库");
  25746. return;
  25747. }
  25748. uni.navigateTo({
  25749. url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
  25750. });
  25751. }
  25752. const deleteOrder = (index2) => {
  25753. ordersMap.value.splice(index2, 1);
  25754. };
  25755. vue.onMounted(() => {
  25756. uni.$u.useGlobalEvent((e) => {
  25757. if (e.barcode) {
  25758. waybillCode.value = e.barcode;
  25759. getDetailByCode2(e.barcode);
  25760. }
  25761. });
  25762. uni.$on("updateLocation", (locationCode) => {
  25763. formData.positionCode = locationCode;
  25764. });
  25765. uni.$on("updateWarehouse", (data) => {
  25766. formData.godownName = data.godownName;
  25767. formData.godownId = data.id;
  25768. });
  25769. });
  25770. onShow(() => {
  25771. uni.$u.updateActivePageOnShow();
  25772. });
  25773. vue.onUnmounted(() => {
  25774. uni.$off("updateLocation");
  25775. uni.$off("updateWarehouse");
  25776. });
  25777. const openRemarkDialog = (index2, remark = "") => {
  25778. currentEditIndex.value = index2;
  25779. currentRemark.value = remark;
  25780. remarkVisible.value = true;
  25781. };
  25782. const handleRemarkConfirm = (remark) => {
  25783. if (currentEditIndex.value >= 0) {
  25784. ordersMap.value[currentEditIndex.value].remark = remark;
  25785. }
  25786. currentEditIndex.value = -1;
  25787. currentRemark.value = "";
  25788. };
  25789. const selectWarehouse = () => {
  25790. uni.navigateTo({
  25791. url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
  25792. });
  25793. };
  25794. 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, get onShow() {
  25795. return onShow;
  25796. }, BadItem, get VolumeTTS() {
  25797. return VolumeTTS;
  25798. }, RemarkDialog };
  25799. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25800. return __returned__;
  25801. }
  25802. };
  25803. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  25804. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25805. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  25806. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  25807. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  25808. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  25809. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  25810. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25811. const _directive_permission = vue.resolveDirective("permission");
  25812. return vue.openBlock(), vue.createElementBlock("view", {
  25813. class: "common-page",
  25814. style: { "padding": "0" }
  25815. }, [
  25816. vue.createCommentVNode(" 顶部导航栏 "),
  25817. vue.createElementVNode("view", { class: "header" }, [
  25818. vue.createVNode(_component_u_navbar, {
  25819. title: "不良入库",
  25820. border: false,
  25821. fixed: "",
  25822. "safe-area-inset-top": ""
  25823. }, {
  25824. left: vue.withCtx(() => [
  25825. vue.createVNode(_component_u_icon, {
  25826. name: "arrow-left",
  25827. color: "#333333",
  25828. size: "20",
  25829. onClick: $setup.goBack
  25830. })
  25831. ]),
  25832. right: vue.withCtx(() => [
  25833. vue.withDirectives(vue.createVNode(
  25834. _component_u_text,
  25835. {
  25836. type: "primary",
  25837. text: "提交",
  25838. onClick: $setup.onSubmit
  25839. },
  25840. null,
  25841. 512
  25842. /* NEED_PATCH */
  25843. ), [
  25844. [_directive_permission, "app:wms:badIn:submit"]
  25845. ])
  25846. ]),
  25847. _: 1
  25848. /* STABLE */
  25849. })
  25850. ]),
  25851. vue.createCommentVNode(" 主要内容区域 "),
  25852. vue.createElementVNode("view", { class: "content" }, [
  25853. vue.createCommentVNode(" 订单基本信息 "),
  25854. vue.createElementVNode("view", { class: "info-section" }, [
  25855. vue.createVNode(_component_u_form, {
  25856. model: $setup.formData,
  25857. ref: "formRef",
  25858. "label-width": "80px",
  25859. "label-position": "left"
  25860. }, {
  25861. default: vue.withCtx(() => [
  25862. vue.createVNode(_component_u_form_item, {
  25863. label: "订单总数",
  25864. required: ""
  25865. }, {
  25866. default: vue.withCtx(() => [
  25867. vue.createElementVNode(
  25868. "span",
  25869. null,
  25870. vue.toDisplayString($setup.ordersMap.length),
  25871. 1
  25872. /* TEXT */
  25873. )
  25874. ]),
  25875. _: 1
  25876. /* STABLE */
  25877. }),
  25878. vue.createVNode(_component_u_form_item, {
  25879. label: "仓库",
  25880. required: ""
  25881. }, {
  25882. default: vue.withCtx(() => [
  25883. vue.createElementVNode("view", {
  25884. onClick: $setup.selectWarehouse,
  25885. style: { "width": "100%" }
  25886. }, [
  25887. vue.createVNode(_component_u_input, {
  25888. modelValue: $setup.formData.godownName,
  25889. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.godownName = $event),
  25890. readonly: "",
  25891. "custom-style": "font-size:32rpx",
  25892. placeholder: "请选择仓库",
  25893. suffixIcon: "arrow-right"
  25894. }, null, 8, ["modelValue"])
  25895. ])
  25896. ]),
  25897. _: 1
  25898. /* STABLE */
  25899. }),
  25900. vue.createVNode(_component_u_form_item, {
  25901. label: "库位",
  25902. required: ""
  25903. }, {
  25904. default: vue.withCtx(() => [
  25905. vue.createElementVNode("view", {
  25906. onClick: $setup.selectLocation,
  25907. style: { "width": "100%" }
  25908. }, [
  25909. vue.createVNode(_component_u_input, {
  25910. modelValue: $setup.formData.positionCode,
  25911. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.positionCode = $event),
  25912. readonly: "",
  25913. "custom-style": "font-size:32rpx",
  25914. placeholder: "请选择库位",
  25915. suffixIcon: "arrow-right"
  25916. }, null, 8, ["modelValue"])
  25917. ])
  25918. ]),
  25919. _: 1
  25920. /* STABLE */
  25921. })
  25922. ]),
  25923. _: 1
  25924. /* STABLE */
  25925. }, 8, ["model"])
  25926. ]),
  25927. vue.createCommentVNode(" 订单列表 "),
  25928. vue.createElementVNode("view", { class: "order-list" }, [
  25929. (vue.openBlock(true), vue.createElementBlock(
  25930. vue.Fragment,
  25931. null,
  25932. vue.renderList($setup.ordersMap, (order, index2) => {
  25933. return vue.openBlock(), vue.createBlock($setup["BadItem"], {
  25934. key: index2,
  25935. data: order,
  25936. onDelete: ($event) => $setup.deleteOrder(index2),
  25937. onEdit: ($event) => $setup.editOrder(index2)
  25938. }, null, 8, ["data", "onDelete", "onEdit"]);
  25939. }),
  25940. 128
  25941. /* KEYED_FRAGMENT */
  25942. ))
  25943. ]),
  25944. vue.createCommentVNode(" 底部扫码输入框 "),
  25945. vue.createElementVNode("view", {
  25946. class: "fixed-bottom pad-20",
  25947. style: { "background": "#ffffff" }
  25948. }, [
  25949. vue.createVNode(_component_u_search, {
  25950. placeholder: "请输入物流单号",
  25951. searchIconSize: 24,
  25952. bgColor: "#f6f7f6",
  25953. onSearch: _cache[2] || (_cache[2] = ($event) => $setup.getDetailByCode($setup.waybillCode)),
  25954. modelValue: $setup.waybillCode,
  25955. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.waybillCode = $event),
  25956. "custom-style": "font-size:32rpx",
  25957. "placeholder-style": "font-size:32rpx",
  25958. clearabled: true,
  25959. focus: false,
  25960. showAction: false,
  25961. height: 42
  25962. }, null, 8, ["modelValue"]),
  25963. vue.createVNode(_component_u_icon, {
  25964. name: "scan",
  25965. size: "32",
  25966. color: "#19be6b",
  25967. onClick: $setup.openScan
  25968. })
  25969. ])
  25970. ]),
  25971. vue.createCommentVNode(" 备注弹窗 "),
  25972. vue.createVNode($setup["RemarkDialog"], {
  25973. visible: $setup.remarkVisible,
  25974. "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => $setup.remarkVisible = $event),
  25975. "initial-value": $setup.currentRemark,
  25976. onConfirm: $setup.handleRemarkConfirm
  25977. }, null, 8, ["visible", "initial-value"])
  25978. ]);
  25979. }
  25980. 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"]]);
  25981. const _sfc_main$F = {
  25982. __name: "bad-out",
  25983. setup(__props, { expose: __expose }) {
  25984. __expose();
  25985. const searchText = vue.ref("");
  25986. const searchType = vue.ref("1");
  25987. const onSearch = () => {
  25988. uni.navigateTo({
  25989. url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}&searchType=${searchType.value}`
  25990. });
  25991. };
  25992. const openScan = () => {
  25993. uni.scanCode({
  25994. success: (res2) => {
  25995. searchText.value = res2.result;
  25996. onSearch();
  25997. },
  25998. fail: (err) => {
  25999. uni.showToast({
  26000. title: "扫码失败",
  26001. icon: "error"
  26002. });
  26003. }
  26004. });
  26005. };
  26006. onLoad(() => {
  26007. uni.$u.useGlobalEvent((e) => {
  26008. if (e.barcode) {
  26009. searchText.value = e.barcode;
  26010. onSearch();
  26011. }
  26012. });
  26013. });
  26014. onShow(() => {
  26015. uni.$u.updateActivePageOnShow();
  26016. });
  26017. const __returned__ = { searchText, searchType, onSearch, openScan, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  26018. return onLoad;
  26019. }, get onShow() {
  26020. return onShow;
  26021. } };
  26022. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26023. return __returned__;
  26024. }
  26025. };
  26026. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  26027. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  26028. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  26029. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26030. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26031. return vue.openBlock(), vue.createElementBlock("view", { class: "container flex-d h100" }, [
  26032. vue.createCommentVNode(" 库位列表 "),
  26033. vue.createElementVNode("view", { class: "location-list flex-1" }, [
  26034. vue.createElementVNode("view", { class: "no-data flex-c mt-60" }, "请输入快递单号/订单编号")
  26035. ]),
  26036. vue.createCommentVNode(" 底部搜索框 "),
  26037. vue.createElementVNode("view", {
  26038. class: "pad-20 flex flex-column",
  26039. style: { "background": "#ffffff" }
  26040. }, [
  26041. vue.createVNode(_component_u_radio_group, {
  26042. modelValue: $setup.searchType,
  26043. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchType = $event),
  26044. class: "mb-20 ml-20"
  26045. }, {
  26046. default: vue.withCtx(() => [
  26047. vue.createVNode(_component_u_radio, {
  26048. label: "查订单",
  26049. name: "1",
  26050. "label-size": "17"
  26051. }),
  26052. vue.createVNode(_component_u_radio, {
  26053. label: "查物流",
  26054. "custom-style": "margin-left:20px",
  26055. name: "2",
  26056. "label-size": "17"
  26057. })
  26058. ]),
  26059. _: 1
  26060. /* STABLE */
  26061. }, 8, ["modelValue"]),
  26062. vue.createElementVNode("view", { class: "flex-a" }, [
  26063. vue.createVNode(_component_u_search, {
  26064. modelValue: $setup.searchText,
  26065. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchText = $event),
  26066. placeholder: "请输入快递单号/订单编号",
  26067. "show-action": false,
  26068. clearabled: true,
  26069. onSearch: $setup.onSearch,
  26070. height: "40"
  26071. }, null, 8, ["modelValue"]),
  26072. vue.createVNode(_component_u_icon, {
  26073. name: "scan",
  26074. size: "28",
  26075. color: "#19be6b",
  26076. onClick: $setup.openScan
  26077. })
  26078. ])
  26079. ])
  26080. ]);
  26081. }
  26082. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out.vue"]]);
  26083. const _sfc_main$E = {
  26084. __name: "BadOutCard",
  26085. props: {
  26086. item: Object
  26087. },
  26088. setup(__props, { expose: __expose }) {
  26089. __expose();
  26090. const props2 = __props;
  26091. const __returned__ = { props: props2 };
  26092. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26093. return __returned__;
  26094. }
  26095. };
  26096. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  26097. var _a;
  26098. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  26099. vue.createElementVNode("view", { class: "flex w100" }, [
  26100. vue.createElementVNode("view", { class: "flex-d" }, [
  26101. vue.createElementVNode("image", {
  26102. style: { "width": "80px", "height": "100px" },
  26103. src: $props.item.cover,
  26104. mode: "aspectFill"
  26105. }, null, 8, ["src"]),
  26106. vue.createElementVNode(
  26107. "view",
  26108. { class: "quantity mt-20" },
  26109. "数量: " + vue.toDisplayString($props.item.num),
  26110. 1
  26111. /* TEXT */
  26112. )
  26113. ]),
  26114. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  26115. vue.createElementVNode(
  26116. "view",
  26117. { class: "common-title mb-20" },
  26118. vue.toDisplayString($props.item.bookName),
  26119. 1
  26120. /* TEXT */
  26121. ),
  26122. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26123. vue.createElementVNode(
  26124. "view",
  26125. { class: "isbn" },
  26126. "ISBN: " + vue.toDisplayString($props.item.isbn),
  26127. 1
  26128. /* TEXT */
  26129. ),
  26130. vue.createElementVNode(
  26131. "view",
  26132. { class: "set" },
  26133. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "否"),
  26134. 1
  26135. /* TEXT */
  26136. )
  26137. ]),
  26138. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26139. vue.createElementVNode(
  26140. "view",
  26141. { class: "discount" },
  26142. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  26143. 1
  26144. /* TEXT */
  26145. ),
  26146. vue.createElementVNode(
  26147. "view",
  26148. { class: "review" },
  26149. "审核金额: " + vue.toDisplayString($props.item.finalMoney),
  26150. 1
  26151. /* TEXT */
  26152. )
  26153. ]),
  26154. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26155. vue.createElementVNode(
  26156. "view",
  26157. { class: "price" },
  26158. "定价: " + vue.toDisplayString($props.item.bookPrice),
  26159. 1
  26160. /* TEXT */
  26161. ),
  26162. vue.createElementVNode(
  26163. "view",
  26164. { class: "estimate" },
  26165. "预估单价: " + vue.toDisplayString($props.item.expectMoney),
  26166. 1
  26167. /* TEXT */
  26168. )
  26169. ]),
  26170. vue.createElementVNode(
  26171. "view",
  26172. { class: "quality mb-10" },
  26173. " 品相: 良好(" + vue.toDisplayString($props.item.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.generalNum) + ") 、 极差(" + vue.toDisplayString($props.item.badNum) + ") ",
  26174. 1
  26175. /* TEXT */
  26176. ),
  26177. vue.createElementVNode(
  26178. "view",
  26179. { class: "reason color-red" },
  26180. "原因: " + vue.toDisplayString((_a = $props.item.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == 3).map((item) => item.com).join(";")),
  26181. 1
  26182. /* TEXT */
  26183. )
  26184. ])
  26185. ])
  26186. ]);
  26187. }
  26188. 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"]]);
  26189. const _sfc_main$D = {
  26190. __name: "bad-out-order",
  26191. setup(__props, { expose: __expose }) {
  26192. __expose();
  26193. const searchText = vue.ref("");
  26194. const searchType = vue.ref("1");
  26195. const errorMsg = vue.ref("");
  26196. const hasData = vue.ref(false);
  26197. const locationInfo = vue.ref({
  26198. positionCode: "",
  26199. waybillCode: "",
  26200. orderId: "",
  26201. badNum: "",
  26202. remark: "",
  26203. refundWaybillCode: ""
  26204. });
  26205. const badList = vue.ref([]);
  26206. onLoad((options) => {
  26207. searchType.value = options.searchType || "1";
  26208. if (options.searchText) {
  26209. searchText.value = options.searchText;
  26210. onSearch();
  26211. }
  26212. uni.$u.useGlobalEvent((e) => {
  26213. if (e.barcode) {
  26214. searchText.value = e.barcode;
  26215. onSearch();
  26216. }
  26217. });
  26218. });
  26219. const getSearchType = (text) => {
  26220. return /^[0-9]+$/.test(text) ? 1 : 2;
  26221. };
  26222. const onSearch = async () => {
  26223. if (!searchText.value) {
  26224. errorMsg.value = "请输入运单号或订单编号";
  26225. hasData.value = false;
  26226. return;
  26227. }
  26228. try {
  26229. const res2 = await uni.$u.http.post("/app/stock/findOrderOutStock", {
  26230. search: searchText.value,
  26231. searchType: searchType.value
  26232. });
  26233. if (res2.code == 200) {
  26234. const data = res2.data;
  26235. errorMsg.value = "";
  26236. hasData.value = true;
  26237. locationInfo.value = {
  26238. positionCode: data.positionCode || "",
  26239. waybillCode: data.waybillCode || "",
  26240. orderId: data.orderId || "",
  26241. badNum: data.badNum || "",
  26242. remark: data.remark || "",
  26243. refundWaybillCode: data.refundWaybillCode || ""
  26244. };
  26245. badList.value = data.detailVoList || [];
  26246. } else {
  26247. errorMsg.value = res2.msg || "未找到相关数据";
  26248. hasData.value = false;
  26249. return;
  26250. }
  26251. } catch (error2) {
  26252. errorMsg.value = error2.message || "获取数据失败";
  26253. hasData.value = false;
  26254. uni.showToast({
  26255. title: "获取数据失败",
  26256. icon: "none"
  26257. });
  26258. }
  26259. };
  26260. const openScan = () => {
  26261. uni.scanCode({
  26262. success: (res2) => {
  26263. searchText.value = res2.result;
  26264. onSearch();
  26265. },
  26266. fail: (err) => {
  26267. uni.showToast({
  26268. title: "扫码失败",
  26269. icon: "error"
  26270. });
  26271. }
  26272. });
  26273. };
  26274. onShow(() => {
  26275. uni.$u.updateActivePageOnShow();
  26276. });
  26277. const onConfirm = () => {
  26278. uni.showModal({
  26279. title: "确认提示",
  26280. content: "是否确认出库?",
  26281. success: async (res2) => {
  26282. if (res2.confirm) {
  26283. uni.$u.http.post("/app/stock/outStock", {
  26284. orderId: locationInfo.value.orderId,
  26285. positionCode: locationInfo.value.positionCode,
  26286. outputRemark: locationInfo.value.remark
  26287. }).then((res3) => {
  26288. if (res3.code == 200) {
  26289. uni.showToast({
  26290. title: "出库成功",
  26291. icon: "success"
  26292. });
  26293. uni.$u.ttsModule.speak("出库成功");
  26294. searchText.value = "";
  26295. locationInfo.value = {
  26296. positionCode: "",
  26297. waybillCode: "",
  26298. orderId: "",
  26299. badNum: "",
  26300. remark: ""
  26301. };
  26302. badList.value = [];
  26303. } else {
  26304. uni.showToast({
  26305. title: res3.msg,
  26306. icon: "none"
  26307. });
  26308. uni.$u.ttsModule.speak(res3.msg);
  26309. }
  26310. });
  26311. }
  26312. }
  26313. });
  26314. };
  26315. const remarkVisible = vue.ref(false);
  26316. const currentRemark = vue.ref("");
  26317. const currentEditIndex = vue.ref(-1);
  26318. const openRemarkDialog = (index2, remark = "") => {
  26319. currentEditIndex.value = index2;
  26320. currentRemark.value = remark;
  26321. remarkVisible.value = true;
  26322. };
  26323. const handleRemarkConfirm = (remark) => {
  26324. if (currentEditIndex.value >= 0) {
  26325. orders.value[currentEditIndex.value].remark = remark;
  26326. }
  26327. currentEditIndex.value = -1;
  26328. currentRemark.value = "";
  26329. };
  26330. const __returned__ = { searchText, searchType, errorMsg, hasData, locationInfo, badList, getSearchType, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, RemarkDialog, get onLoad() {
  26331. return onLoad;
  26332. }, get onShow() {
  26333. return onShow;
  26334. } };
  26335. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26336. return __returned__;
  26337. }
  26338. };
  26339. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  26340. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26341. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26342. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  26343. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  26344. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26345. vue.createCommentVNode(" 搜索框 "),
  26346. vue.createVNode(_component_u_sticky, null, {
  26347. default: vue.withCtx(() => [
  26348. vue.createElementVNode("view", { class: "search-area flex-c mb-20" }, [
  26349. vue.createVNode(_component_u_search, {
  26350. modelValue: $setup.searchText,
  26351. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  26352. placeholder: $setup.searchType == "1" ? "请输入订单编号" : "请输入运单号",
  26353. "show-action": false,
  26354. clearabled: true,
  26355. onSearch: $setup.onSearch,
  26356. height: "40"
  26357. }, null, 8, ["modelValue", "placeholder"]),
  26358. vue.createVNode(_component_u_icon, {
  26359. name: "scan",
  26360. size: "28",
  26361. color: "#19be6b",
  26362. onClick: $setup.openScan
  26363. })
  26364. ])
  26365. ]),
  26366. _: 1
  26367. /* STABLE */
  26368. }),
  26369. vue.createElementVNode("view", { class: "content" }, [
  26370. vue.createCommentVNode(" 错误提示 "),
  26371. $setup.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", {
  26372. key: 0,
  26373. class: "error-section"
  26374. }, [
  26375. vue.createVNode(_component_u_icon, {
  26376. name: "info-circle",
  26377. color: "#fa3534",
  26378. size: "20"
  26379. }),
  26380. vue.createElementVNode(
  26381. "text",
  26382. { class: "error-text" },
  26383. vue.toDisplayString($setup.errorMsg),
  26384. 1
  26385. /* TEXT */
  26386. )
  26387. ])) : vue.createCommentVNode("v-if", true),
  26388. vue.createCommentVNode(" 基本信息 "),
  26389. $setup.hasData ? (vue.openBlock(), vue.createElementBlock(
  26390. vue.Fragment,
  26391. { key: 1 },
  26392. [
  26393. vue.createElementVNode("view", { class: "info-section" }, [
  26394. vue.createElementVNode(
  26395. "view",
  26396. { class: "info-item" },
  26397. "库位:" + vue.toDisplayString($setup.locationInfo.positionCode),
  26398. 1
  26399. /* TEXT */
  26400. ),
  26401. vue.createElementVNode(
  26402. "view",
  26403. { class: "info-item" },
  26404. "物流单号:" + vue.toDisplayString($setup.locationInfo.waybillCode || "-"),
  26405. 1
  26406. /* TEXT */
  26407. ),
  26408. vue.createElementVNode(
  26409. "view",
  26410. { class: "info-item" },
  26411. "退回物流:" + vue.toDisplayString($setup.locationInfo.refundWaybillCode || "-"),
  26412. 1
  26413. /* TEXT */
  26414. ),
  26415. vue.createElementVNode(
  26416. "view",
  26417. { class: "info-item" },
  26418. "订单编号:" + vue.toDisplayString($setup.locationInfo.orderId),
  26419. 1
  26420. /* TEXT */
  26421. ),
  26422. vue.createElementVNode(
  26423. "view",
  26424. { class: "info-item" },
  26425. "订单商品:" + vue.toDisplayString($setup.locationInfo.badNum),
  26426. 1
  26427. /* TEXT */
  26428. ),
  26429. vue.createElementVNode(
  26430. "view",
  26431. { class: "info-item" },
  26432. "备注信息:" + vue.toDisplayString($setup.locationInfo.remark || "-"),
  26433. 1
  26434. /* TEXT */
  26435. )
  26436. ]),
  26437. vue.createCommentVNode(" 极差商品列表 "),
  26438. vue.createElementVNode("view", { class: "bad-list" }, [
  26439. vue.createElementVNode("view", { class: "list-title mb-6" }, "极差"),
  26440. (vue.openBlock(true), vue.createElementBlock(
  26441. vue.Fragment,
  26442. null,
  26443. vue.renderList($setup.badList, (item, index2) => {
  26444. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  26445. vue.createVNode($setup["BadOutCard"], {
  26446. item,
  26447. index: index2
  26448. }, null, 8, ["item", "index"])
  26449. ]);
  26450. }),
  26451. 128
  26452. /* KEYED_FRAGMENT */
  26453. ))
  26454. ])
  26455. ],
  26456. 64
  26457. /* STABLE_FRAGMENT */
  26458. )) : vue.createCommentVNode("v-if", true)
  26459. ]),
  26460. vue.createCommentVNode(" 底部按钮 "),
  26461. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  26462. vue.createVNode(_component_u_button, {
  26463. size: "large",
  26464. type: "warning",
  26465. text: "反馈",
  26466. onClick: $setup.openRemarkDialog
  26467. }),
  26468. vue.createVNode(_component_u_button, {
  26469. size: "large",
  26470. type: "primary",
  26471. text: "确定出库",
  26472. onClick: $setup.onConfirm
  26473. })
  26474. ]),
  26475. vue.createCommentVNode(" 备注弹窗 "),
  26476. vue.createVNode($setup["RemarkDialog"], {
  26477. visible: $setup.remarkVisible,
  26478. "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $setup.remarkVisible = $event),
  26479. "initial-value": $setup.currentRemark,
  26480. onConfirm: $setup.handleRemarkConfirm
  26481. }, null, 8, ["visible", "initial-value"])
  26482. ]);
  26483. }
  26484. 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"]]);
  26485. const _sfc_main$C = {
  26486. __name: "bad-off",
  26487. setup(__props, { expose: __expose }) {
  26488. __expose();
  26489. const searchText = vue.ref("");
  26490. const taskList = vue.ref([]);
  26491. const loading = vue.ref(false);
  26492. const taskStatusEnum = {
  26493. 1: "待作业",
  26494. 2: "作业中",
  26495. 3: "已完成",
  26496. 4: "已关闭"
  26497. };
  26498. const getTaskStatusText = (status) => {
  26499. return taskStatusEnum[status] || "未知状态";
  26500. };
  26501. const fetchTaskList = async () => {
  26502. loading.value = true;
  26503. try {
  26504. const response = await uni.$u.http.post("/app/appstock/getNeedStockList");
  26505. formatAppLog("log", "at pages/index/wms/bad-off.vue:77", response);
  26506. taskList.value = response;
  26507. if (response.code === 200) {
  26508. taskList.value = response.data || [];
  26509. } else {
  26510. uni.showToast({
  26511. title: response.msg || "获取任务列表失败",
  26512. icon: "none"
  26513. });
  26514. }
  26515. } catch (error2) {
  26516. uni.showToast({
  26517. title: "获取任务列表失败",
  26518. icon: "none"
  26519. });
  26520. } finally {
  26521. loading.value = false;
  26522. }
  26523. };
  26524. const onSearch = () => {
  26525. fetchTaskList();
  26526. };
  26527. const openScan = () => {
  26528. uni.scanCode({
  26529. success: (res2) => {
  26530. searchText.value = res2.result;
  26531. onSearch();
  26532. },
  26533. fail: (err) => {
  26534. uni.showToast({
  26535. title: "扫码失败",
  26536. icon: "error"
  26537. });
  26538. }
  26539. });
  26540. };
  26541. const handleTaskClick = (task) => {
  26542. uni.showModal({
  26543. title: "领取确认",
  26544. content: "是否确认领取下架任务?",
  26545. cancelText: "取消",
  26546. confirmText: "确认",
  26547. success: async (res2) => {
  26548. if (res2.confirm) {
  26549. try {
  26550. const response = await uni.$u.http.post(`/app/appstock/lockStockTask?taskCode=${task.taskCode}`);
  26551. if (response.code === 200) {
  26552. uni.navigateTo({
  26553. url: `/pages/index/wms/task-detail?taskCode=${task.taskCode}`
  26554. });
  26555. } else {
  26556. uni.showToast({
  26557. title: response.msg || "任务锁定失败",
  26558. icon: "none"
  26559. });
  26560. }
  26561. } catch (error2) {
  26562. uni.showToast({
  26563. title: error2,
  26564. icon: "none"
  26565. });
  26566. }
  26567. }
  26568. }
  26569. });
  26570. };
  26571. vue.onMounted(() => {
  26572. fetchTaskList();
  26573. });
  26574. const __returned__ = { searchText, taskList, loading, taskStatusEnum, getTaskStatusText, fetchTaskList, onSearch, openScan, handleTaskClick, ref: vue.ref, onMounted: vue.onMounted };
  26575. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26576. return __returned__;
  26577. }
  26578. };
  26579. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  26580. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  26581. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26582. vue.createCommentVNode(" 任务列表 "),
  26583. vue.createElementVNode("view", { class: "task-list" }, [
  26584. !$setup.loading ? (vue.openBlock(), vue.createElementBlock(
  26585. vue.Fragment,
  26586. { key: 0 },
  26587. [
  26588. $setup.taskList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  26589. vue.Fragment,
  26590. { key: 0 },
  26591. vue.renderList($setup.taskList, (item, index2) => {
  26592. return vue.openBlock(), vue.createElementBlock("view", {
  26593. key: index2,
  26594. class: "task-card",
  26595. onClick: ($event) => $setup.handleTaskClick(item)
  26596. }, [
  26597. vue.createElementVNode("view", { class: "task-header" }, [
  26598. vue.createElementVNode(
  26599. "text",
  26600. { class: "task-no" },
  26601. "作业单号:" + vue.toDisplayString(item.taskCode),
  26602. 1
  26603. /* TEXT */
  26604. )
  26605. ]),
  26606. vue.createElementVNode("view", { class: "task-content" }, [
  26607. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26608. vue.createElementVNode("text", { class: "label" }, "仓库:"),
  26609. vue.createElementVNode(
  26610. "text",
  26611. { class: "value" },
  26612. vue.toDisplayString(item.godownName),
  26613. 1
  26614. /* TEXT */
  26615. )
  26616. ]),
  26617. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26618. vue.createElementVNode("text", { class: "label" }, "订单数量:"),
  26619. vue.createElementVNode(
  26620. "text",
  26621. { class: "value" },
  26622. vue.toDisplayString(item.orderNum),
  26623. 1
  26624. /* TEXT */
  26625. )
  26626. ]),
  26627. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26628. vue.createElementVNode("text", { class: "label" }, "创建时间:"),
  26629. vue.createElementVNode(
  26630. "text",
  26631. { class: "value" },
  26632. vue.toDisplayString(item.createTime),
  26633. 1
  26634. /* TEXT */
  26635. )
  26636. ]),
  26637. vue.createElementVNode("view", { class: "flex-a" }, [
  26638. vue.createElementVNode("text", { class: "label" }, "作业状态:"),
  26639. vue.createElementVNode(
  26640. "text",
  26641. { class: "value" },
  26642. vue.toDisplayString($setup.getTaskStatusText(item.taskStatus)),
  26643. 1
  26644. /* TEXT */
  26645. )
  26646. ])
  26647. ])
  26648. ], 8, ["onClick"]);
  26649. }),
  26650. 128
  26651. /* KEYED_FRAGMENT */
  26652. )) : (vue.openBlock(), vue.createElementBlock("view", {
  26653. key: 1,
  26654. class: "empty-state"
  26655. }, [
  26656. vue.createElementVNode("text", null, "暂无任务数据")
  26657. ]))
  26658. ],
  26659. 64
  26660. /* STABLE_FRAGMENT */
  26661. )) : (vue.openBlock(), vue.createElementBlock("view", {
  26662. key: 1,
  26663. class: "loading-state"
  26664. }, [
  26665. vue.createVNode(_component_u_loading_icon),
  26666. vue.createElementVNode("text", null, "加载中...")
  26667. ]))
  26668. ])
  26669. ]);
  26670. }
  26671. 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"]]);
  26672. const _sfc_main$B = {
  26673. __name: "order-query",
  26674. setup(__props, { expose: __expose }) {
  26675. __expose();
  26676. const query = vue.reactive({
  26677. searchType: 2,
  26678. search: ""
  26679. });
  26680. const orderQuery = () => {
  26681. if (!query.search) {
  26682. uni.$u.toast("请输入快递单号/订单编号");
  26683. return;
  26684. }
  26685. uni.navigateTo({
  26686. url: `/pages/index/wms/order-query-list?id=${query.search}`
  26687. });
  26688. };
  26689. function openScan() {
  26690. uni.scanCode({
  26691. success: (res2) => {
  26692. query.search = res2.result;
  26693. orderQuery();
  26694. }
  26695. });
  26696. }
  26697. onLoad(() => {
  26698. uni.$u.useGlobalEvent((e) => {
  26699. if (e.barcode) {
  26700. query.search = e.barcode;
  26701. orderQuery();
  26702. }
  26703. });
  26704. });
  26705. onShow(() => {
  26706. uni.$u.updateActivePageOnShow();
  26707. });
  26708. const __returned__ = { query, orderQuery, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  26709. return onLoad;
  26710. }, get onShow() {
  26711. return onShow;
  26712. } };
  26713. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26714. return __returned__;
  26715. }
  26716. };
  26717. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  26718. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26719. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26720. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26721. vue.createCommentVNode(" 底部扫码输入框 "),
  26722. vue.createElementVNode("view", {
  26723. class: "fixed-bottom pad-20",
  26724. style: { "background": "#ffffff" }
  26725. }, [
  26726. vue.createVNode(_component_u_search, {
  26727. placeholder: "请输入快递单号/订单编号",
  26728. searchIconSize: 24,
  26729. bgColor: "#f6f7f6",
  26730. onSearch: $setup.orderQuery,
  26731. modelValue: $setup.query.search,
  26732. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.query.search = $event),
  26733. "custom-style": "font-size:32rpx",
  26734. "placeholder-style": "font-size:32rpx",
  26735. clearabled: true,
  26736. focus: false,
  26737. showAction: false,
  26738. height: 42
  26739. }, null, 8, ["modelValue"]),
  26740. vue.createVNode(_component_u_icon, {
  26741. name: "scan",
  26742. size: "34",
  26743. color: "#19be6b",
  26744. onClick: $setup.openScan
  26745. })
  26746. ])
  26747. ]);
  26748. }
  26749. 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"]]);
  26750. const props$5 = {
  26751. props: {
  26752. // 是否显示圆点
  26753. isDot: {
  26754. type: Boolean,
  26755. default: props$E.badge.isDot
  26756. },
  26757. // 显示的内容
  26758. value: {
  26759. type: [Number, String],
  26760. default: props$E.badge.value
  26761. },
  26762. // 显示的内容
  26763. modelValue: {
  26764. type: [Number, String],
  26765. default: props$E.badge.modelValue
  26766. },
  26767. // 是否显示
  26768. show: {
  26769. type: Boolean,
  26770. default: props$E.badge.show
  26771. },
  26772. // 最大值,超过最大值会显示 '{max}+'
  26773. max: {
  26774. type: [Number, String],
  26775. default: props$E.badge.max
  26776. },
  26777. // 主题类型,error|warning|success|primary
  26778. type: {
  26779. type: String,
  26780. default: props$E.badge.type
  26781. },
  26782. // 当数值为 0 时,是否展示 Badge
  26783. showZero: {
  26784. type: Boolean,
  26785. default: props$E.badge.showZero
  26786. },
  26787. // 背景颜色,优先级比type高,如设置,type参数会失效
  26788. bgColor: {
  26789. type: [String, null],
  26790. default: props$E.badge.bgColor
  26791. },
  26792. // 字体颜色
  26793. color: {
  26794. type: [String, null],
  26795. default: props$E.badge.color
  26796. },
  26797. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  26798. shape: {
  26799. type: String,
  26800. default: props$E.badge.shape
  26801. },
  26802. // 设置数字的显示方式,overflow|ellipsis|limit
  26803. // overflow会根据max字段判断,超出显示`${max}+`
  26804. // ellipsis会根据max判断,超出显示`${max}...`
  26805. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  26806. numberType: {
  26807. type: String,
  26808. default: props$E.badge.numberType
  26809. },
  26810. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  26811. offset: {
  26812. type: Array,
  26813. default: props$E.badge.offset
  26814. },
  26815. // 是否反转背景和字体颜色
  26816. inverted: {
  26817. type: Boolean,
  26818. default: props$E.badge.inverted
  26819. },
  26820. // 是否绝对定位
  26821. absolute: {
  26822. type: Boolean,
  26823. default: props$E.badge.absolute
  26824. }
  26825. }
  26826. };
  26827. const _sfc_main$A = {
  26828. name: "u-badge",
  26829. mixins: [mpMixin, props$5, mixin],
  26830. computed: {
  26831. // 是否将badge中心与父组件右上角重合
  26832. boxStyle() {
  26833. let style = {};
  26834. return style;
  26835. },
  26836. // 整个组件的样式
  26837. badgeStyle() {
  26838. const style = {};
  26839. if (this.color) {
  26840. style.color = this.color;
  26841. }
  26842. if (this.bgColor && !this.inverted) {
  26843. style.backgroundColor = this.bgColor;
  26844. }
  26845. if (this.absolute) {
  26846. style.position = "absolute";
  26847. if (this.offset.length) {
  26848. const top = this.offset[0];
  26849. const right = this.offset[1] || top;
  26850. style.top = uni.$u.addUnit(top);
  26851. style.right = uni.$u.addUnit(right);
  26852. }
  26853. }
  26854. return style;
  26855. },
  26856. showValue() {
  26857. switch (this.numberType) {
  26858. case "overflow":
  26859. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  26860. case "ellipsis":
  26861. return Number(this.value) > Number(this.max) ? "..." : this.value;
  26862. case "limit":
  26863. 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;
  26864. default:
  26865. return Number(this.value);
  26866. }
  26867. }
  26868. }
  26869. };
  26870. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  26871. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  26872. "text",
  26873. {
  26874. key: 0,
  26875. 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"]),
  26876. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
  26877. },
  26878. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  26879. 7
  26880. /* TEXT, CLASS, STYLE */
  26881. )) : vue.createCommentVNode("v-if", true);
  26882. }
  26883. 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"]]);
  26884. const props$4 = {
  26885. props: {
  26886. // 滑块的移动过渡时间,单位ms
  26887. duration: {
  26888. type: Number,
  26889. default: props$E.tabs.duration
  26890. },
  26891. // tabs标签数组
  26892. list: {
  26893. type: Array,
  26894. default: props$E.tabs.list
  26895. },
  26896. // 滑块颜色
  26897. lineColor: {
  26898. type: String,
  26899. default: props$E.tabs.lineColor
  26900. },
  26901. // 菜单选择中时的样式
  26902. activeStyle: {
  26903. type: [String, Object],
  26904. default: props$E.tabs.activeStyle
  26905. },
  26906. // 菜单非选中时的样式
  26907. inactiveStyle: {
  26908. type: [String, Object],
  26909. default: props$E.tabs.inactiveStyle
  26910. },
  26911. // 滑块长度
  26912. lineWidth: {
  26913. type: [String, Number],
  26914. default: props$E.tabs.lineWidth
  26915. },
  26916. // 滑块高度
  26917. lineHeight: {
  26918. type: [String, Number],
  26919. default: props$E.tabs.lineHeight
  26920. },
  26921. // 滑块背景显示大小,当滑块背景设置为图片时使用
  26922. lineBgSize: {
  26923. type: String,
  26924. default: props$E.tabs.lineBgSize
  26925. },
  26926. // 菜单item的样式
  26927. itemStyle: {
  26928. type: [String, Object],
  26929. default: props$E.tabs.itemStyle
  26930. },
  26931. // 菜单是否可滚动
  26932. scrollable: {
  26933. type: Boolean,
  26934. default: props$E.tabs.scrollable
  26935. },
  26936. // 当前选中标签的索引
  26937. current: {
  26938. type: [Number, String],
  26939. default: props$E.tabs.current
  26940. },
  26941. // 默认读取的键名
  26942. keyName: {
  26943. type: String,
  26944. default: props$E.tabs.keyName
  26945. }
  26946. }
  26947. };
  26948. const _sfc_main$z = {
  26949. name: "u-tabs",
  26950. mixins: [mpMixin, mixin, props$4],
  26951. data() {
  26952. return {
  26953. firstTime: true,
  26954. scrollLeft: 0,
  26955. scrollViewWidth: 0,
  26956. lineOffsetLeft: 0,
  26957. tabsRect: {
  26958. left: 0
  26959. },
  26960. innerCurrent: 0,
  26961. moving: false
  26962. };
  26963. },
  26964. watch: {
  26965. current: {
  26966. immediate: true,
  26967. handler(newValue, oldValue) {
  26968. if (newValue !== this.innerCurrent) {
  26969. this.innerCurrent = newValue;
  26970. this.$nextTick(() => {
  26971. this.resize();
  26972. });
  26973. }
  26974. }
  26975. },
  26976. // list变化时,重新渲染list各项信息
  26977. list() {
  26978. this.$nextTick(() => {
  26979. this.resize();
  26980. });
  26981. }
  26982. },
  26983. computed: {
  26984. textStyle() {
  26985. return (index2) => {
  26986. const style = {};
  26987. const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
  26988. this.inactiveStyle
  26989. );
  26990. if (this.list[index2].disabled) {
  26991. style.color = "#c8c9cc";
  26992. }
  26993. return uni.$u.deepMerge(customeStyle, style);
  26994. };
  26995. },
  26996. propsBadge() {
  26997. return uni.$u.props.badge;
  26998. }
  26999. },
  27000. async mounted() {
  27001. this.init();
  27002. },
  27003. emits: ["click", "change"],
  27004. methods: {
  27005. setLineLeft() {
  27006. const tabItem = this.list[this.innerCurrent];
  27007. if (!tabItem) {
  27008. return;
  27009. }
  27010. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  27011. const lineWidth = uni.$u.getPx(this.lineWidth);
  27012. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  27013. if (this.firstTime) {
  27014. setTimeout(() => {
  27015. this.firstTime = false;
  27016. }, 10);
  27017. }
  27018. },
  27019. // nvue下设置滑块的位置
  27020. animation(x, duration = 0) {
  27021. },
  27022. // 点击某一个标签
  27023. clickHandler(item, index2) {
  27024. this.$emit("click", {
  27025. ...item,
  27026. index: index2
  27027. });
  27028. if (item.disabled)
  27029. return;
  27030. this.innerCurrent = index2;
  27031. this.resize();
  27032. this.$emit("change", {
  27033. ...item,
  27034. index: index2
  27035. });
  27036. },
  27037. init() {
  27038. uni.$u.sleep().then(() => {
  27039. this.resize();
  27040. });
  27041. },
  27042. setScrollLeft() {
  27043. const tabRect = this.list[this.innerCurrent];
  27044. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  27045. return total + curr.rect.width;
  27046. }, 0);
  27047. const windowWidth = uni.$u.sys().windowWidth;
  27048. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  27049. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  27050. this.scrollLeft = Math.max(0, scrollLeft);
  27051. },
  27052. // 获取所有标签的尺寸
  27053. resize() {
  27054. if (this.list.length === 0) {
  27055. return;
  27056. }
  27057. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  27058. this.tabsRect = tabsRect;
  27059. this.scrollViewWidth = 0;
  27060. itemRect.map((item, index2) => {
  27061. this.scrollViewWidth += item.width;
  27062. this.list[index2].rect = item;
  27063. });
  27064. this.setLineLeft();
  27065. this.setScrollLeft();
  27066. });
  27067. },
  27068. // 获取导航菜单的尺寸
  27069. getTabsRect() {
  27070. return new Promise((resolve) => {
  27071. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  27072. });
  27073. },
  27074. // 获取所有标签的尺寸
  27075. getAllItemRect() {
  27076. return new Promise((resolve) => {
  27077. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  27078. `u-tabs__wrapper__nav__item-${index2}`,
  27079. true
  27080. ));
  27081. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  27082. });
  27083. },
  27084. // 获取各个标签的尺寸
  27085. queryRect(el, item) {
  27086. return new Promise((resolve) => {
  27087. this.$uGetRect(`.${el}`).then((size) => {
  27088. resolve(size);
  27089. });
  27090. });
  27091. }
  27092. }
  27093. };
  27094. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  27095. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$1);
  27096. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  27097. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  27098. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  27099. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  27100. vue.createElementVNode("scroll-view", {
  27101. "scroll-x": _ctx.scrollable,
  27102. "scroll-left": $data.scrollLeft,
  27103. "scroll-with-animation": "",
  27104. class: "u-tabs__wrapper__scroll-view",
  27105. "show-scrollbar": false,
  27106. ref: "u-tabs__wrapper__scroll-view"
  27107. }, [
  27108. vue.createElementVNode(
  27109. "view",
  27110. {
  27111. class: "u-tabs__wrapper__nav",
  27112. ref: "u-tabs__wrapper__nav"
  27113. },
  27114. [
  27115. (vue.openBlock(true), vue.createElementBlock(
  27116. vue.Fragment,
  27117. null,
  27118. vue.renderList(_ctx.list, (item, index2) => {
  27119. return vue.openBlock(), vue.createElementBlock("view", {
  27120. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
  27121. key: index2,
  27122. onClick: ($event) => $options.clickHandler(item, index2),
  27123. ref_for: true,
  27124. ref: `u-tabs__wrapper__nav__item-${index2}`,
  27125. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  27126. }, [
  27127. vue.createElementVNode(
  27128. "text",
  27129. {
  27130. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  27131. style: vue.normalizeStyle([$options.textStyle(index2)])
  27132. },
  27133. vue.toDisplayString(item[_ctx.keyName]),
  27134. 7
  27135. /* TEXT, CLASS, STYLE */
  27136. ),
  27137. vue.createVNode(_component_u_badge, {
  27138. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  27139. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  27140. value: item.badge && item.badge.value || $options.propsBadge.value,
  27141. max: item.badge && item.badge.max || $options.propsBadge.max,
  27142. type: item.badge && item.badge.type || $options.propsBadge.type,
  27143. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  27144. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  27145. color: item.badge && item.badge.color || $options.propsBadge.color,
  27146. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  27147. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  27148. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  27149. customStyle: "margin-left: 4px;"
  27150. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  27151. ], 14, ["onClick"]);
  27152. }),
  27153. 128
  27154. /* KEYED_FRAGMENT */
  27155. )),
  27156. vue.createElementVNode(
  27157. "view",
  27158. {
  27159. class: "u-tabs__wrapper__nav__line",
  27160. ref: "u-tabs__wrapper__nav__line",
  27161. style: vue.normalizeStyle([{
  27162. width: _ctx.$u.addUnit(_ctx.lineWidth),
  27163. transform: `translate(${$data.lineOffsetLeft}px)`,
  27164. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  27165. height: _ctx.$u.addUnit(_ctx.lineHeight),
  27166. background: _ctx.lineColor,
  27167. backgroundSize: _ctx.lineBgSize
  27168. }])
  27169. },
  27170. null,
  27171. 4
  27172. /* STYLE */
  27173. )
  27174. ],
  27175. 512
  27176. /* NEED_PATCH */
  27177. )
  27178. ], 8, ["scroll-x", "scroll-left"])
  27179. ]),
  27180. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  27181. ])
  27182. ]);
  27183. }
  27184. 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"]]);
  27185. const _sfc_main$y = {
  27186. __name: "order-query-list",
  27187. setup(__props, { expose: __expose }) {
  27188. __expose();
  27189. const list1 = vue.reactive([{
  27190. name: "商品明细"
  27191. }, {
  27192. name: "操作记录"
  27193. }]);
  27194. const activeTab = vue.ref(0);
  27195. const query = vue.reactive({
  27196. searchType: 2,
  27197. search: ""
  27198. });
  27199. const determineSearchType = (search) => {
  27200. const isNumberString = /^\d+$/.test(search.toString());
  27201. return isNumberString ? 1 : 2;
  27202. };
  27203. const detail = vue.ref({});
  27204. const orderQuery = () => {
  27205. if (!query.search) {
  27206. uni.$u.toast("请输入快递单号/订单编号");
  27207. uni.$u.ttsModule.speak("请输入快递单号/订单编号");
  27208. return;
  27209. }
  27210. query.searchType = determineSearchType(query.search);
  27211. uni.$u.http.get("/app/stock/findOrder", { params: query }).then((res2) => {
  27212. if (res2.code == 200) {
  27213. detail.value = res2.data;
  27214. uni.$u.ttsModule.speak("查询成功");
  27215. getOperationLogs(res2.data.orderId);
  27216. } else {
  27217. uni.$u.toast(res2.msg);
  27218. uni.$u.ttsModule.speak(res2.msg);
  27219. }
  27220. });
  27221. };
  27222. const operationLogs = vue.ref([]);
  27223. const getOperationLogs = (orderId) => {
  27224. uni.$u.http.get("/app/stock/getGodownStocklog", { params: { orderId } }).then((res2) => {
  27225. if (res2.code == 200) {
  27226. operationLogs.value = res2.data;
  27227. }
  27228. });
  27229. };
  27230. function handleTabChange(tab) {
  27231. activeTab.value = tab.index;
  27232. }
  27233. function openScan() {
  27234. uni.scanCode({
  27235. success: (res2) => {
  27236. query.search = res2.result;
  27237. orderQuery();
  27238. }
  27239. });
  27240. }
  27241. onLoad((options) => {
  27242. if (options.id) {
  27243. query.search = options.id;
  27244. orderQuery();
  27245. }
  27246. uni.$u.useGlobalEvent((e) => {
  27247. if (e.barcode) {
  27248. getDetailByCode(e.barcode);
  27249. }
  27250. });
  27251. });
  27252. onShow(() => {
  27253. uni.$u.updateActivePageOnShow();
  27254. });
  27255. const __returned__ = { list1, activeTab, query, determineSearchType, detail, orderQuery, operationLogs, getOperationLogs, handleTabChange, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27256. return onLoad;
  27257. }, get onShow() {
  27258. return onShow;
  27259. }, BookInfo };
  27260. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27261. return __returned__;
  27262. }
  27263. };
  27264. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  27265. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  27266. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27267. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27268. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27269. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  27270. key: 0,
  27271. class: "header"
  27272. }, [
  27273. vue.createElementVNode("view", { class: "flex-d" }, [
  27274. vue.createElementVNode(
  27275. "text",
  27276. null,
  27277. "订单编号: " + vue.toDisplayString($setup.detail.orderId),
  27278. 1
  27279. /* TEXT */
  27280. ),
  27281. vue.createElementVNode(
  27282. "text",
  27283. { class: "mt-16" },
  27284. "库位: " + vue.toDisplayString($setup.detail.positionCode),
  27285. 1
  27286. /* TEXT */
  27287. )
  27288. ]),
  27289. vue.createElementVNode("view", { class: "status" }, [
  27290. vue.createElementVNode(
  27291. "text",
  27292. null,
  27293. vue.toDisplayString($setup.detail.stockStatus == 1 ? "已入库" : "已出库"),
  27294. 1
  27295. /* TEXT */
  27296. )
  27297. ])
  27298. ])) : vue.createCommentVNode("v-if", true),
  27299. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  27300. key: 1,
  27301. style: { "background-color": "#ffffff" },
  27302. class: "pad-5 mt-20 content-info"
  27303. }, [
  27304. vue.createVNode(_component_u_tabs, {
  27305. list: $setup.list1,
  27306. modelValue: $setup.activeTab,
  27307. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.activeTab = $event),
  27308. itemStyle: { height: "44px", width: "48%" },
  27309. onChange: $setup.handleTabChange
  27310. }, null, 8, ["list", "modelValue"]),
  27311. $setup.activeTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  27312. key: 0,
  27313. class: "product-details"
  27314. }, [
  27315. vue.createVNode($setup["BookInfo"], {
  27316. bookList: $setup.detail.detailVoList,
  27317. detail: $setup.detail,
  27318. isShow: false
  27319. }, null, 8, ["bookList", "detail"])
  27320. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  27321. key: 1,
  27322. class: "operation-logs mt-20"
  27323. }, [
  27324. (vue.openBlock(true), vue.createElementBlock(
  27325. vue.Fragment,
  27326. null,
  27327. vue.renderList($setup.operationLogs, (log, index2) => {
  27328. return vue.openBlock(), vue.createElementBlock("view", {
  27329. key: index2,
  27330. class: "log-item"
  27331. }, [
  27332. vue.createElementVNode(
  27333. "text",
  27334. null,
  27335. vue.toDisplayString(log.createTime),
  27336. 1
  27337. /* TEXT */
  27338. ),
  27339. vue.createElementVNode(
  27340. "text",
  27341. null,
  27342. vue.toDisplayString(log.createName),
  27343. 1
  27344. /* TEXT */
  27345. ),
  27346. vue.createElementVNode(
  27347. "text",
  27348. null,
  27349. vue.toDisplayString(log.content),
  27350. 1
  27351. /* TEXT */
  27352. )
  27353. ]);
  27354. }),
  27355. 128
  27356. /* KEYED_FRAGMENT */
  27357. ))
  27358. ]))
  27359. ])) : vue.createCommentVNode("v-if", true),
  27360. vue.createCommentVNode(" 底部扫码输入框 "),
  27361. vue.createElementVNode("view", {
  27362. class: "fixed-bottom pad-20",
  27363. style: { "background": "#ffffff" }
  27364. }, [
  27365. vue.createVNode(_component_u_search, {
  27366. placeholder: "请输入快递单号/订单编号",
  27367. searchIconSize: 24,
  27368. bgColor: "#f6f7f6",
  27369. onSearch: $setup.orderQuery,
  27370. modelValue: $setup.query.search,
  27371. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.query.search = $event),
  27372. "custom-style": "font-size:32rpx",
  27373. "placeholder-style": "font-size:32rpx",
  27374. clearabled: true,
  27375. focus: false,
  27376. showAction: false,
  27377. height: 42
  27378. }, null, 8, ["modelValue"]),
  27379. vue.createVNode(_component_u_icon, {
  27380. name: "scan",
  27381. size: "34",
  27382. color: "#19be6b",
  27383. onClick: $setup.openScan
  27384. })
  27385. ])
  27386. ]);
  27387. }
  27388. 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"]]);
  27389. const _sfc_main$x = {
  27390. __name: "location-order",
  27391. setup(__props, { expose: __expose }) {
  27392. __expose();
  27393. const positionCode = vue.ref("");
  27394. const onSearch = () => {
  27395. if (positionCode.value) {
  27396. uni.navigateTo({
  27397. url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
  27398. });
  27399. } else {
  27400. uni.$u.toast("请输入库位编号");
  27401. }
  27402. };
  27403. function openScan() {
  27404. uni.scanCode({
  27405. success: (res2) => {
  27406. positionCode.value = res2.result;
  27407. onSearch();
  27408. }
  27409. });
  27410. }
  27411. onLoad(() => {
  27412. uni.$u.useGlobalEvent((e) => {
  27413. if (e.barcode) {
  27414. positionCode.value = e.barcode;
  27415. onSearch();
  27416. }
  27417. });
  27418. });
  27419. onShow(() => {
  27420. uni.$u.updateActivePageOnShow();
  27421. });
  27422. const __returned__ = { positionCode, onSearch, openScan, ref: vue.ref, get onLoad() {
  27423. return onLoad;
  27424. }, get onShow() {
  27425. return onShow;
  27426. } };
  27427. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27428. return __returned__;
  27429. }
  27430. };
  27431. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  27432. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27433. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27434. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27435. vue.createCommentVNode(" 底部扫码输入框 "),
  27436. vue.createElementVNode("view", {
  27437. class: "fixed-bottom pad-20",
  27438. style: { "background": "#ffffff" }
  27439. }, [
  27440. vue.createVNode(_component_u_search, {
  27441. placeholder: "请输入库位编号",
  27442. searchIconSize: 24,
  27443. bgColor: "#f6f7f6",
  27444. onSearch: $setup.onSearch,
  27445. modelValue: $setup.positionCode,
  27446. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.positionCode = $event),
  27447. clearabled: true,
  27448. focus: false,
  27449. showAction: false,
  27450. height: 42
  27451. }, null, 8, ["modelValue"]),
  27452. vue.createVNode(_component_u_icon, {
  27453. name: "scan",
  27454. size: "32",
  27455. color: "#19be6b",
  27456. onClick: $setup.openScan
  27457. })
  27458. ])
  27459. ]);
  27460. }
  27461. 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"]]);
  27462. const _imports_0$1 = "/static/img/share.png";
  27463. const _sfc_main$w = {
  27464. __name: "LocationOrderItem",
  27465. props: {
  27466. item: {
  27467. type: Object,
  27468. required: true
  27469. },
  27470. isCheck: {
  27471. type: Boolean,
  27472. default: false
  27473. },
  27474. isLink: {
  27475. type: Boolean,
  27476. default: true
  27477. }
  27478. },
  27479. emits: ["select"],
  27480. setup(__props, { expose: __expose, emit: __emit }) {
  27481. __expose();
  27482. const props2 = __props;
  27483. const emit2 = __emit;
  27484. const toggleSelect = () => {
  27485. emit2("select", props2.item);
  27486. };
  27487. const handleQuickJump = () => {
  27488. uni.navigateTo({
  27489. url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
  27490. });
  27491. };
  27492. const __returned__ = { props: props2, emit: emit2, toggleSelect, handleQuickJump };
  27493. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27494. return __returned__;
  27495. }
  27496. };
  27497. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  27498. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27499. return vue.openBlock(), vue.createElementBlock("view", { class: "order-item" }, [
  27500. vue.createElementVNode("view", { class: "order-header" }, [
  27501. vue.createElementVNode("view", { class: "order-info" }, [
  27502. vue.createElementVNode("view", { class: "info-row" }, [
  27503. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  27504. vue.createElementVNode(
  27505. "text",
  27506. { class: "value" },
  27507. vue.toDisplayString($props.item.orderId),
  27508. 1
  27509. /* TEXT */
  27510. )
  27511. ]),
  27512. vue.createElementVNode("view", { class: "info-row" }, [
  27513. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  27514. vue.createElementVNode(
  27515. "text",
  27516. { class: "value" },
  27517. vue.toDisplayString($props.item.badNum),
  27518. 1
  27519. /* TEXT */
  27520. )
  27521. ]),
  27522. vue.createElementVNode("view", { class: "info-row" }, [
  27523. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  27524. vue.createElementVNode(
  27525. "text",
  27526. { class: "value" },
  27527. vue.toDisplayString($props.item.waybillCode),
  27528. 1
  27529. /* TEXT */
  27530. )
  27531. ]),
  27532. vue.createElementVNode("view", { class: "info-row" }, [
  27533. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  27534. vue.createElementVNode(
  27535. "text",
  27536. { class: "value" },
  27537. vue.toDisplayString($props.item.auditFinishTime),
  27538. 1
  27539. /* TEXT */
  27540. )
  27541. ]),
  27542. vue.createElementVNode("view", { class: "info-row" }, [
  27543. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  27544. vue.createElementVNode(
  27545. "text",
  27546. { class: "value" },
  27547. vue.toDisplayString($props.item.auditUserName),
  27548. 1
  27549. /* TEXT */
  27550. )
  27551. ])
  27552. ]),
  27553. $props.isCheck ? (vue.openBlock(), vue.createElementBlock("view", {
  27554. key: 0,
  27555. class: "check-icon"
  27556. }, [
  27557. vue.createVNode(_component_u_icon, {
  27558. name: $props.item.checked ? "checkmark-circle-fill" : "checkmark-circle",
  27559. color: $props.item.checked ? "#19be6b" : "#c8c9cc",
  27560. size: "28",
  27561. onClick: $setup.toggleSelect
  27562. }, null, 8, ["name", "color"])
  27563. ])) : vue.createCommentVNode("v-if", true),
  27564. $props.isLink ? (vue.openBlock(), vue.createElementBlock("view", {
  27565. key: 1,
  27566. class: "flex flex-d flex-a-c flex-j-c quick-jump",
  27567. onClick: $setup.handleQuickJump
  27568. }, [
  27569. vue.createElementVNode("image", {
  27570. src: _imports_0$1,
  27571. mode: "widthFix",
  27572. style: { "width": "30px" }
  27573. }),
  27574. vue.createElementVNode("text", { style: { "font-size": "28rpx", "color": "#19be6b" } }, "快速跳转")
  27575. ])) : vue.createCommentVNode("v-if", true)
  27576. ])
  27577. ]);
  27578. }
  27579. 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"]]);
  27580. const _sfc_main$v = {
  27581. __name: "location-order-list",
  27582. setup(__props, { expose: __expose }) {
  27583. __expose();
  27584. const orderCode = vue.ref("");
  27585. const originList = vue.ref([]);
  27586. const orderList = vue.ref([]);
  27587. const detail = vue.ref({});
  27588. const getOrderListByPositionCode = (positionCode) => {
  27589. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  27590. if (res2.code == 200) {
  27591. detail.value = res2.data;
  27592. orderList.value = res2.data.godownStockLogResults;
  27593. originList.value = res2.data.godownStockLogResults;
  27594. if (originList.value.length > 0) {
  27595. uni.$u.ttsModule.speak("查询到" + originList.value.length + "条订单");
  27596. } else {
  27597. uni.$u.toast("暂无订单");
  27598. uni.$u.ttsModule.speak("暂无订单");
  27599. }
  27600. } else {
  27601. uni.$u.toast(res2.msg);
  27602. uni.$u.ttsModule.speak(res2.msg);
  27603. }
  27604. });
  27605. };
  27606. const onSearch = () => {
  27607. if (!orderCode.value) {
  27608. orderList.value = originList.value;
  27609. uni.$u.toast("请输入订单号或物流单号");
  27610. return;
  27611. }
  27612. const searchValue = String(orderCode.value).trim();
  27613. const isNumeric = /^[0-9]+$/.test(searchValue);
  27614. const result = originList.value.filter((item) => {
  27615. if (isNumeric) {
  27616. return item.orderId === orderCode.value;
  27617. } else {
  27618. return item.waybillCode === orderCode.value;
  27619. }
  27620. });
  27621. orderList.value = result;
  27622. };
  27623. function openScan() {
  27624. uni.scanCode({
  27625. success: (res2) => {
  27626. orderCode.value = res2.result;
  27627. onSearch();
  27628. }
  27629. });
  27630. }
  27631. onLoad((options) => {
  27632. if (options.positionCode) {
  27633. getOrderListByPositionCode(options.positionCode);
  27634. }
  27635. uni.$u.useGlobalEvent((e) => {
  27636. if (e.barcode) {
  27637. orderCode.value = res.result;
  27638. onSearch();
  27639. }
  27640. });
  27641. });
  27642. onShow(() => {
  27643. uni.$u.updateActivePageOnShow();
  27644. });
  27645. const __returned__ = { orderCode, originList, orderList, detail, getOrderListByPositionCode, onSearch, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27646. return onLoad;
  27647. }, get onShow() {
  27648. return onShow;
  27649. }, LocationOrderItem };
  27650. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27651. return __returned__;
  27652. }
  27653. };
  27654. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  27655. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27656. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27657. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27658. vue.createElementVNode("view", { class: "header" }, [
  27659. vue.createElementVNode("view", { class: "flex-d" }, [
  27660. vue.createElementVNode(
  27661. "text",
  27662. null,
  27663. "仓库: " + vue.toDisplayString($setup.detail.godownName),
  27664. 1
  27665. /* TEXT */
  27666. ),
  27667. vue.createElementVNode(
  27668. "text",
  27669. { class: "mt-16" },
  27670. "库位编号: " + vue.toDisplayString($setup.detail.positionCode),
  27671. 1
  27672. /* TEXT */
  27673. ),
  27674. vue.createElementVNode(
  27675. "text",
  27676. { class: "mt-16" },
  27677. "订单数量: " + vue.toDisplayString($setup.originList.length),
  27678. 1
  27679. /* TEXT */
  27680. )
  27681. ])
  27682. ]),
  27683. vue.createElementVNode("view", { class: "product-details" }, [
  27684. (vue.openBlock(true), vue.createElementBlock(
  27685. vue.Fragment,
  27686. null,
  27687. vue.renderList($setup.orderList, (item, index2) => {
  27688. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  27689. key: index2,
  27690. item
  27691. }, null, 8, ["item"]);
  27692. }),
  27693. 128
  27694. /* KEYED_FRAGMENT */
  27695. ))
  27696. ]),
  27697. vue.createCommentVNode(" 底部扫码输入框 "),
  27698. vue.createElementVNode("view", {
  27699. class: "fixed-bottom pad-20",
  27700. style: { "background": "#ffffff" }
  27701. }, [
  27702. vue.createVNode(_component_u_search, {
  27703. placeholder: "请输入快递单号/订单编号",
  27704. searchIconSize: 24,
  27705. bgColor: "#f6f7f6",
  27706. onSearch: $setup.onSearch,
  27707. modelValue: $setup.orderCode,
  27708. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.orderCode = $event),
  27709. clearabled: true,
  27710. focus: false,
  27711. showAction: false,
  27712. height: 42
  27713. }, null, 8, ["modelValue"]),
  27714. vue.createVNode(_component_u_icon, {
  27715. name: "scan",
  27716. size: "36",
  27717. color: "#19be6b",
  27718. onClick: $setup.openScan
  27719. })
  27720. ])
  27721. ]);
  27722. }
  27723. 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"]]);
  27724. const _sfc_main$u = {
  27725. __name: "location-select",
  27726. setup(__props, { expose: __expose }) {
  27727. __expose();
  27728. const searchText = vue.ref("");
  27729. const locations = vue.ref([]);
  27730. function getLocationListByGodownId(godownId2, code2 = "", type2 = "") {
  27731. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + godownId2 + "&code=" + code2).then((res2) => {
  27732. if (res2.code == 200) {
  27733. locations.value = res2.data;
  27734. if (type2 == "select") {
  27735. setTimeout(() => {
  27736. locations.value.forEach((item) => {
  27737. if (item == code2) {
  27738. selectLocation(item);
  27739. }
  27740. });
  27741. }, 500);
  27742. }
  27743. }
  27744. });
  27745. }
  27746. const scrollHeight = vue.ref(0);
  27747. const onSearch = () => {
  27748. getLocationListByGodownId(godownId.value, searchText.value);
  27749. };
  27750. const openScan = () => {
  27751. uni.scanCode({
  27752. success: (res2) => {
  27753. searchText.value = res2.result;
  27754. onSearch();
  27755. },
  27756. fail: (err) => {
  27757. uni.showToast({
  27758. title: "扫码失败",
  27759. icon: "error"
  27760. });
  27761. }
  27762. });
  27763. };
  27764. const selectLocation = (item) => {
  27765. uni.$emit("updateLocation", item);
  27766. uni.navigateBack();
  27767. };
  27768. const godownId = vue.ref("");
  27769. const positionCode = vue.ref("");
  27770. onLoad((opts) => {
  27771. godownId.value = opts.godownId;
  27772. positionCode.value = opts.positionCode;
  27773. getLocationListByGodownId(godownId.value);
  27774. scrollHeight.value = uni.getSystemInfoSync().windowHeight - 44 - 60;
  27775. uni.$u.useGlobalEvent((e) => {
  27776. if (e.barcode) {
  27777. searchText.value = e.barcode;
  27778. getLocationListByGodownId(godownId.value, e.barcode, "select");
  27779. }
  27780. });
  27781. });
  27782. onShow(() => {
  27783. uni.$u.updateActivePageOnShow();
  27784. });
  27785. const __returned__ = { searchText, locations, getLocationListByGodownId, scrollHeight, onSearch, openScan, selectLocation, godownId, positionCode, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  27786. return onLoad;
  27787. }, get onShow() {
  27788. return onShow;
  27789. } };
  27790. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27791. return __returned__;
  27792. }
  27793. };
  27794. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  27795. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27796. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27797. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27798. vue.createCommentVNode(" 库位列表 "),
  27799. vue.createElementVNode(
  27800. "scroll-view",
  27801. {
  27802. "scroll-y": "",
  27803. class: "location-list",
  27804. style: vue.normalizeStyle({ height: $setup.scrollHeight + "px" })
  27805. },
  27806. [
  27807. (vue.openBlock(true), vue.createElementBlock(
  27808. vue.Fragment,
  27809. null,
  27810. vue.renderList($setup.locations, (item, index2) => {
  27811. return vue.openBlock(), vue.createElementBlock("view", {
  27812. key: index2,
  27813. class: vue.normalizeClass(["location-item", item === $setup.positionCode ? "location-item-selected" : ""]),
  27814. "hover-class": "location-item-hover",
  27815. onClick: ($event) => $setup.selectLocation(item)
  27816. }, [
  27817. vue.createElementVNode(
  27818. "text",
  27819. null,
  27820. vue.toDisplayString(item),
  27821. 1
  27822. /* TEXT */
  27823. )
  27824. ], 10, ["onClick"]);
  27825. }),
  27826. 128
  27827. /* KEYED_FRAGMENT */
  27828. ))
  27829. ],
  27830. 4
  27831. /* STYLE */
  27832. ),
  27833. vue.createCommentVNode(" 底部搜索框 "),
  27834. vue.createElementVNode("view", {
  27835. class: "fixed-bottom pad-20",
  27836. style: { "background": "#ffffff" }
  27837. }, [
  27838. vue.createVNode(_component_u_search, {
  27839. modelValue: $setup.searchText,
  27840. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27841. placeholder: "请输入库位条码",
  27842. "show-action": false,
  27843. clearabled: true,
  27844. onSearch: $setup.onSearch,
  27845. height: "40",
  27846. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  27847. }, null, 8, ["modelValue"]),
  27848. vue.createVNode(_component_u_icon, {
  27849. name: "scan",
  27850. size: "28",
  27851. color: "#19be6b",
  27852. onClick: $setup.openScan
  27853. })
  27854. ])
  27855. ]);
  27856. }
  27857. 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"]]);
  27858. const _sfc_main$t = {
  27859. __name: "warehouse-select",
  27860. setup(__props, { expose: __expose }) {
  27861. __expose();
  27862. const searchText = vue.ref("");
  27863. const warehouses = vue.ref([]);
  27864. function getGodownListByName(name = "") {
  27865. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  27866. if (res2.code == 200) {
  27867. warehouses.value = res2.data;
  27868. }
  27869. });
  27870. }
  27871. getGodownListByName();
  27872. const onSearch = () => {
  27873. getGodownListByName(searchText.value);
  27874. };
  27875. const selectWarehouse = (item) => {
  27876. uni.$emit("updateWarehouse", item);
  27877. uni.navigateBack();
  27878. };
  27879. const selectedId = vue.ref();
  27880. onLoad((options) => {
  27881. if (options.godownId) {
  27882. selectedId.value = options.godownId;
  27883. }
  27884. });
  27885. const __returned__ = { searchText, warehouses, getGodownListByName, onSearch, selectWarehouse, selectedId, ref: vue.ref, computed: vue.computed, get onLoad() {
  27886. return onLoad;
  27887. } };
  27888. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27889. return __returned__;
  27890. }
  27891. };
  27892. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  27893. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27894. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27895. vue.createCommentVNode(" 搜索框 "),
  27896. vue.createElementVNode("view", { class: "search-area" }, [
  27897. vue.createVNode(_component_u_search, {
  27898. modelValue: $setup.searchText,
  27899. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27900. placeholder: "请输入仓库名称",
  27901. "show-action": false,
  27902. clearabled: true,
  27903. onChange: $setup.onSearch,
  27904. height: "40",
  27905. "placeholder-style": "font-size:16px"
  27906. }, null, 8, ["modelValue"])
  27907. ]),
  27908. vue.createCommentVNode(" 仓库列表 "),
  27909. vue.createElementVNode("view", { class: "warehouse-list" }, [
  27910. (vue.openBlock(true), vue.createElementBlock(
  27911. vue.Fragment,
  27912. null,
  27913. vue.renderList($setup.warehouses, (item, index2) => {
  27914. return vue.openBlock(), vue.createElementBlock("view", {
  27915. key: index2,
  27916. class: vue.normalizeClass(["warehouse-item", { "warehouse-item-active": item.id == $setup.selectedId }]),
  27917. "hover-class": "warehouse-item-hover",
  27918. onClick: ($event) => $setup.selectWarehouse(item)
  27919. }, [
  27920. vue.createElementVNode(
  27921. "text",
  27922. null,
  27923. vue.toDisplayString(index2 + 1) + "." + vue.toDisplayString(item.godownName),
  27924. 1
  27925. /* TEXT */
  27926. )
  27927. ], 10, ["onClick"]);
  27928. }),
  27929. 128
  27930. /* KEYED_FRAGMENT */
  27931. ))
  27932. ])
  27933. ]);
  27934. }
  27935. 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"]]);
  27936. const _sfc_main$s = {
  27937. __name: "speedy-check",
  27938. setup(__props, { expose: __expose }) {
  27939. __expose();
  27940. const goBack = () => {
  27941. uni.navigateBack();
  27942. };
  27943. const showCheckMethodPicker = vue.ref(false);
  27944. const checkMethod = vue.ref("增加数量");
  27945. const resetType = vue.ref(0);
  27946. const checkMethodOptions = ["增加数量", "减少数量", "实际数量"];
  27947. const getUserDefaultWarehouse = () => {
  27948. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  27949. if (res2.code == 200) {
  27950. getWarehouseLocationList(res2.data.id);
  27951. }
  27952. });
  27953. };
  27954. const location2 = vue.ref("");
  27955. const showLocationPopup = vue.ref(false);
  27956. const locationList = vue.ref([]);
  27957. const selectedLocation = vue.ref("");
  27958. const godownId = vue.ref();
  27959. const getWarehouseLocationList = (id) => {
  27960. godownId.value = id;
  27961. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + id).then((res2) => {
  27962. if (res2.code == 200) {
  27963. locationList.value = res2.data;
  27964. }
  27965. });
  27966. };
  27967. const searchValue = vue.ref("");
  27968. const products = vue.ref([]);
  27969. const onCheckMethodConfirm = (e) => {
  27970. checkMethod.value = e.value[0];
  27971. showCheckMethodPicker.value = false;
  27972. resetType.value = e.indexs[0] + 1;
  27973. };
  27974. const handleLocationSelect = () => {
  27975. showLocationPopup.value = true;
  27976. selectedLocation.value = location2.value;
  27977. };
  27978. const onLocationConfirm = () => {
  27979. if (selectedLocation.value) {
  27980. location2.value = selectedLocation.value;
  27981. showLocationPopup.value = false;
  27982. selectedLocation.value = "";
  27983. } else {
  27984. uni.$u.toast("请选择库位");
  27985. }
  27986. };
  27987. const selectLocation = (item) => {
  27988. selectedLocation.value = item;
  27989. };
  27990. const onSubmit = () => {
  27991. if (products.value.length === 0) {
  27992. uni.$u.toast("请添加盘点订单");
  27993. return;
  27994. }
  27995. const params = {
  27996. godownId: godownId.value,
  27997. positionCode: location2.value,
  27998. orderInfo: products.value.map((item) => ({
  27999. orderId: item.orderId,
  28000. waybillCode: item.waybillCode,
  28001. bookNum: item.badNum,
  28002. remark: item.remark || ""
  28003. })),
  28004. resetType: resetType.value
  28005. };
  28006. uni.$u.http.post("/app/stock/resetStock", params).then((res2) => {
  28007. if (res2.code === 200) {
  28008. uni.$u.toast("盘点成功");
  28009. location2.value = "";
  28010. products.value = [];
  28011. searchValue.value = "";
  28012. } else {
  28013. uni.$u.toast(res2.msg || "提交失败");
  28014. }
  28015. }).catch((err) => {
  28016. uni.$u.toast("提交失败");
  28017. formatAppLog("error", "at pages/index/wms/speedy-check.vue:229", err);
  28018. });
  28019. };
  28020. const onSearch = () => {
  28021. if (!searchValue.value) {
  28022. uni.$u.toast("请输入快递单号或订单编号");
  28023. return;
  28024. }
  28025. const searchType = /^[0-9]+$/.test(searchValue.value) ? 1 : 2;
  28026. uni.$u.http.get("/app/stock/searchBadOrderForReset", {
  28027. params: {
  28028. searchType,
  28029. search: searchValue.value
  28030. }
  28031. }).then((res2) => {
  28032. if (res2.code === 200) {
  28033. const exists = products.value.some(
  28034. (item) => item.orderId === res2.data.orderId || item.waybillCode === res2.data.waybillCode
  28035. );
  28036. if (exists) {
  28037. uni.$u.toast("该订单已添加");
  28038. return;
  28039. }
  28040. products.value.push(res2.data);
  28041. searchValue.value = "";
  28042. } else {
  28043. uni.$u.toast(res2.msg || "查询失败");
  28044. }
  28045. }).catch((err) => {
  28046. uni.$u.toast("查询失败");
  28047. formatAppLog("error", "at pages/index/wms/speedy-check.vue:271", err);
  28048. });
  28049. };
  28050. const dealScanText = (scanText) => {
  28051. let isLocation = scanText.indexOf("-") > -1 && scanText.length == 9;
  28052. if (isLocation) {
  28053. if (locationList.value.includes(scanText)) {
  28054. location2.value = scanText;
  28055. } else {
  28056. uni.$u.toast("库位不存在");
  28057. }
  28058. } else {
  28059. searchValue.value = scanText;
  28060. onSearch();
  28061. }
  28062. };
  28063. const openScan = () => {
  28064. uni.scanCode({
  28065. success: (res2) => {
  28066. dealScanText(res2.result);
  28067. },
  28068. fail: (err) => {
  28069. uni.showToast({
  28070. title: "扫码失败",
  28071. icon: "error"
  28072. });
  28073. }
  28074. });
  28075. };
  28076. function handleAdd() {
  28077. if (!location2.value) {
  28078. uni.$u.toast("请选择库位");
  28079. return;
  28080. }
  28081. uni.navigateTo({
  28082. url: "/pages/index/wms/speedy-check-add?location=" + location2.value
  28083. });
  28084. }
  28085. const close = () => {
  28086. showLocationPopup.value = false;
  28087. };
  28088. const open2 = () => {
  28089. showLocationPopup.value = true;
  28090. };
  28091. onLoad(() => {
  28092. getUserDefaultWarehouse();
  28093. uni.$on("selectedProducts", (list) => {
  28094. products.value = list;
  28095. });
  28096. uni.$u.useGlobalEvent((e) => {
  28097. if (e.barcode) {
  28098. dealScanText(e.barcode);
  28099. }
  28100. });
  28101. });
  28102. onShow(() => {
  28103. uni.$u.updateActivePageOnShow();
  28104. });
  28105. onUnload(() => {
  28106. uni.$off("selectedProducts");
  28107. });
  28108. const __returned__ = { goBack, showCheckMethodPicker, checkMethod, resetType, checkMethodOptions, getUserDefaultWarehouse, location: location2, showLocationPopup, locationList, selectedLocation, godownId, getWarehouseLocationList, searchValue, products, onCheckMethodConfirm, handleLocationSelect, onLocationConfirm, selectLocation, onSubmit, onSearch, dealScanText, openScan, handleAdd, close, open: open2, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  28109. return onLoad;
  28110. }, get onUnload() {
  28111. return onUnload;
  28112. }, get onShow() {
  28113. return onShow;
  28114. }, LocationOrderItem };
  28115. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28116. return __returned__;
  28117. }
  28118. };
  28119. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  28120. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28121. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  28122. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  28123. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  28124. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  28125. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  28126. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  28127. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  28128. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28129. const _directive_permission = vue.resolveDirective("permission");
  28130. return vue.openBlock(), vue.createElementBlock("view", {
  28131. class: "container",
  28132. style: { "padding-top": "44px", "padding-bottom": "10px" }
  28133. }, [
  28134. vue.createVNode(_component_u_navbar, {
  28135. title: "快速盘点",
  28136. border: false,
  28137. fixed: "",
  28138. "safe-area-inset-top": "",
  28139. bgColor: "#22ac38",
  28140. titleStyle: "font-size:36rpx;color:#fff"
  28141. }, {
  28142. left: vue.withCtx(() => [
  28143. vue.createVNode(_component_u_icon, {
  28144. name: "arrow-left",
  28145. color: "#fff",
  28146. size: "20",
  28147. onClick: $setup.goBack
  28148. })
  28149. ]),
  28150. right: vue.withCtx(() => [
  28151. vue.withDirectives((vue.openBlock(), vue.createElementBlock("text", {
  28152. style: { "color": "#ffffff" },
  28153. onClick: $setup.onSubmit
  28154. }, [
  28155. vue.createTextVNode("提交")
  28156. ])), [
  28157. [_directive_permission, "app:wms:speedyCheck:confirm"]
  28158. ])
  28159. ]),
  28160. _: 1
  28161. /* STABLE */
  28162. }),
  28163. vue.createCommentVNode(" 盘点信息选择区域 "),
  28164. vue.createElementVNode("view", {
  28165. class: "select-area",
  28166. style: { "margin-top": "44px" }
  28167. }, [
  28168. vue.createVNode(_component_u_cell_group, { border: true }, {
  28169. default: vue.withCtx(() => [
  28170. vue.createVNode(_component_u_cell, {
  28171. title: "盘点方式",
  28172. value: $setup.checkMethod,
  28173. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showCheckMethodPicker = true),
  28174. isLink: true,
  28175. border: true
  28176. }, null, 8, ["value"]),
  28177. vue.createVNode(_component_u_cell, {
  28178. title: "目标库位",
  28179. value: $setup.location,
  28180. onClick: $setup.handleLocationSelect,
  28181. isLink: true,
  28182. border: true
  28183. }, null, 8, ["value"])
  28184. ]),
  28185. _: 1
  28186. /* STABLE */
  28187. })
  28188. ]),
  28189. vue.createCommentVNode(" 盘点方式选择器 "),
  28190. vue.createVNode(_component_u_picker, {
  28191. show: $setup.showCheckMethodPicker,
  28192. columns: [$setup.checkMethodOptions],
  28193. onConfirm: $setup.onCheckMethodConfirm,
  28194. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showCheckMethodPicker = false),
  28195. showToolbar: true,
  28196. title: "选择盘点方式",
  28197. closeOnClickOverlay: true,
  28198. cancelText: "取消",
  28199. confirmText: "确定",
  28200. itemHeight: 44,
  28201. visibleItemCount: 5
  28202. }, null, 8, ["show", "columns"]),
  28203. vue.createCommentVNode(" 库位选择弹出层 "),
  28204. vue.createVNode(_component_u_popup, {
  28205. show: $setup.showLocationPopup,
  28206. mode: "bottom",
  28207. onClose: $setup.close,
  28208. onOpen: $setup.open,
  28209. closeOnClickOverlay: true,
  28210. round: 10,
  28211. safeAreaInsetBottom: true
  28212. }, {
  28213. default: vue.withCtx(() => [
  28214. vue.createElementVNode("view", { class: "location-popup" }, [
  28215. vue.createElementVNode("view", { class: "location-popup-header" }, [
  28216. vue.createElementVNode("text", { style: { "flex": "1" } }, "选择库位"),
  28217. vue.createVNode(_component_u_text, {
  28218. style: { "width": "40px", "flex": "none" },
  28219. type: "primary",
  28220. text: "确定",
  28221. onClick: $setup.onLocationConfirm
  28222. })
  28223. ]),
  28224. vue.createElementVNode("view", { class: "location-popup-content" }, [
  28225. vue.createVNode(_component_u_input, {
  28226. modelValue: $setup.selectedLocation,
  28227. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.selectedLocation = $event),
  28228. placeholder: "请输入库位",
  28229. customStyle: "background-color: #f6f6f6; border-radius: 4px;"
  28230. }, null, 8, ["modelValue"]),
  28231. vue.createElementVNode("view", { class: "location-list" }, [
  28232. (vue.openBlock(true), vue.createElementBlock(
  28233. vue.Fragment,
  28234. null,
  28235. vue.renderList($setup.locationList, (item, index2) => {
  28236. return vue.openBlock(), vue.createElementBlock("view", {
  28237. class: vue.normalizeClass(["location-item", { "location-item--selected": $setup.selectedLocation === item }]),
  28238. key: index2,
  28239. onClick: ($event) => $setup.selectLocation(item)
  28240. }, [
  28241. vue.createElementVNode(
  28242. "text",
  28243. null,
  28244. vue.toDisplayString(item),
  28245. 1
  28246. /* TEXT */
  28247. ),
  28248. $setup.selectedLocation === item ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28249. key: 0,
  28250. name: "checkmark",
  28251. color: "#19be6b",
  28252. size: "16"
  28253. })) : vue.createCommentVNode("v-if", true)
  28254. ], 10, ["onClick"]);
  28255. }),
  28256. 128
  28257. /* KEYED_FRAGMENT */
  28258. ))
  28259. ])
  28260. ])
  28261. ])
  28262. ]),
  28263. _: 1
  28264. /* STABLE */
  28265. }, 8, ["show"]),
  28266. vue.createCommentVNode(" 订单列表 "),
  28267. vue.createElementVNode("view", { class: "product-details" }, [
  28268. (vue.openBlock(true), vue.createElementBlock(
  28269. vue.Fragment,
  28270. null,
  28271. vue.renderList($setup.products, (item, index2) => {
  28272. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  28273. isLink: _ctx.isLink,
  28274. key: index2,
  28275. item
  28276. }, null, 8, ["isLink", "item"]);
  28277. }),
  28278. 128
  28279. /* KEYED_FRAGMENT */
  28280. ))
  28281. ]),
  28282. vue.createElementVNode("view", {
  28283. class: "add-btn",
  28284. onClick: $setup.handleAdd
  28285. }, [
  28286. vue.createVNode(_component_u_icon, {
  28287. name: "plus-circle",
  28288. size: "40",
  28289. color: "#19be6b"
  28290. })
  28291. ]),
  28292. vue.createCommentVNode(" 底部扫码输入框 "),
  28293. vue.createElementVNode("view", {
  28294. class: "fixed-bottom pad-20",
  28295. style: { "background": "#ffffff" }
  28296. }, [
  28297. vue.createVNode(_component_u_search, {
  28298. placeholder: "请输入快递单号/订单编号",
  28299. modelValue: $setup.searchValue,
  28300. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.searchValue = $event),
  28301. onSearch: $setup.onSearch,
  28302. "show-action": false,
  28303. "custom-style": "margin-right:10px"
  28304. }, null, 8, ["modelValue"]),
  28305. vue.createVNode(_component_u_icon, {
  28306. name: "scan",
  28307. size: "28",
  28308. color: "#19be6b",
  28309. onClick: $setup.openScan
  28310. })
  28311. ])
  28312. ]);
  28313. }
  28314. 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"]]);
  28315. const _sfc_main$r = {
  28316. __name: "BookItemOrder",
  28317. props: {
  28318. book: Object,
  28319. index: Number
  28320. },
  28321. emits: ["remove"],
  28322. setup(__props, { expose: __expose, emit: __emit }) {
  28323. __expose();
  28324. const props2 = __props;
  28325. const emit2 = __emit;
  28326. const removeBook = () => {
  28327. emit2("remove", { book: props2.book, index: props2.index });
  28328. };
  28329. const __returned__ = { props: props2, emit: emit2, removeBook };
  28330. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28331. return __returned__;
  28332. }
  28333. };
  28334. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  28335. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28336. return vue.openBlock(), vue.createElementBlock("view", { class: "book-item" }, [
  28337. vue.createElementVNode("image", {
  28338. class: "book-image",
  28339. src: $props.book.cover,
  28340. mode: "aspectFill"
  28341. }, null, 8, ["src"]),
  28342. vue.createElementVNode("view", { class: "book-info" }, [
  28343. vue.createElementVNode("view", { class: "book-title" }, [
  28344. vue.createElementVNode(
  28345. "text",
  28346. null,
  28347. vue.toDisplayString($props.book.bookName),
  28348. 1
  28349. /* TEXT */
  28350. ),
  28351. vue.createVNode(_component_u_icon, {
  28352. name: "close",
  28353. size: "18",
  28354. onClick: $setup.removeBook
  28355. })
  28356. ]),
  28357. vue.createElementVNode("view", { class: "flex-a flex-1" }, [
  28358. vue.createElementVNode("view", { class: "book-details flex-d" }, [
  28359. vue.createElementVNode(
  28360. "text",
  28361. null,
  28362. "ISBN: " + vue.toDisplayString($props.book.isbn),
  28363. 1
  28364. /* TEXT */
  28365. ),
  28366. vue.createElementVNode(
  28367. "text",
  28368. null,
  28369. "定价: " + vue.toDisplayString($props.book.price),
  28370. 1
  28371. /* TEXT */
  28372. ),
  28373. vue.createElementVNode(
  28374. "text",
  28375. null,
  28376. "折扣: " + vue.toDisplayString($props.book.recycleDiscount),
  28377. 1
  28378. /* TEXT */
  28379. )
  28380. ]),
  28381. vue.createElementVNode("view", { class: "book-stats flex-d ml-20" }, [
  28382. vue.createElementVNode(
  28383. "text",
  28384. null,
  28385. "数量: " + vue.toDisplayString($props.book.quantity),
  28386. 1
  28387. /* TEXT */
  28388. ),
  28389. vue.createElementVNode(
  28390. "text",
  28391. null,
  28392. "预估单价: " + vue.toDisplayString($props.book.expectPrice),
  28393. 1
  28394. /* TEXT */
  28395. ),
  28396. vue.createElementVNode(
  28397. "text",
  28398. { style: { "color": "#ff0000" } },
  28399. "审核金额: " + vue.toDisplayString($props.book.auditPrice),
  28400. 1
  28401. /* TEXT */
  28402. )
  28403. ])
  28404. ])
  28405. ])
  28406. ]);
  28407. }
  28408. 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"]]);
  28409. const _sfc_main$q = {
  28410. __name: "check-order",
  28411. setup(__props, { expose: __expose }) {
  28412. __expose();
  28413. const bookList = vue.ref([]);
  28414. const totalBooks = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.quantity), 0));
  28415. const totalPrice = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.auditPrice), 0).toFixed(2));
  28416. const removeBook = ({ book, index: index2 }) => {
  28417. bookList.value.splice(index2, 1);
  28418. };
  28419. const handleSubmit = () => {
  28420. if (bookList.value.length === 0) {
  28421. uni.$u.toast("请先添加书籍");
  28422. return;
  28423. }
  28424. uni.$u.http.post("/app/offlineorder/submitOfflineOrder", bookList.value).then((res2) => {
  28425. if (res2.code == 200) {
  28426. uni.$u.toast("提交成功");
  28427. bookList.value.length = 0;
  28428. }
  28429. });
  28430. };
  28431. const handleScan = () => {
  28432. uni.scanCode({
  28433. success: (res2) => {
  28434. handleBarcode(res2.result);
  28435. formatAppLog("log", "at pages/index/offline/check-order.vue:52", "扫码结果:", res2.result);
  28436. },
  28437. fail: (res2) => {
  28438. formatAppLog("log", "at pages/index/offline/check-order.vue:56", "扫码失败:", res2);
  28439. uni.$u.toast("扫码失败");
  28440. }
  28441. });
  28442. };
  28443. const handleBarcode = (barcode) => {
  28444. formatAppLog("log", "at pages/index/offline/check-order.vue:63", "扫码结果:", barcode);
  28445. uni.$u.http.get(`/app/offlineorder/getBookInfo/${barcode}`).then((res2) => {
  28446. if (res2.code == 200) {
  28447. res2.data.quantity = 1;
  28448. let item = bookList.value.find((item2) => item2.isbn === res2.data.isbn);
  28449. if (item) {
  28450. item.quantity += 1;
  28451. item.auditPrice = (item.expectPrice * item.quantity).toFixed(2);
  28452. return;
  28453. } else {
  28454. res2.data.auditPrice = (res2.data.expectPrice * res2.data.quantity).toFixed(2);
  28455. bookList.value.push(res2.data);
  28456. }
  28457. }
  28458. });
  28459. };
  28460. onLoad(() => {
  28461. uni.$u.useGlobalEvent((e) => {
  28462. handleBarcode(e.barcode);
  28463. });
  28464. });
  28465. onShow(() => {
  28466. uni.$u.updateActivePageOnShow();
  28467. });
  28468. const __returned__ = { bookList, totalBooks, totalPrice, removeBook, handleSubmit, handleScan, handleBarcode, ref: vue.ref, computed: vue.computed, get onLoad() {
  28469. return onLoad;
  28470. }, get onShow() {
  28471. return onShow;
  28472. }, BookItem };
  28473. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28474. return __returned__;
  28475. }
  28476. };
  28477. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  28478. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  28479. const _directive_permission = vue.resolveDirective("permission");
  28480. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28481. vue.createElementVNode("view", { class: "book-list" }, [
  28482. (vue.openBlock(true), vue.createElementBlock(
  28483. vue.Fragment,
  28484. null,
  28485. vue.renderList($setup.bookList, (book, index2) => {
  28486. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  28487. key: index2,
  28488. book,
  28489. onRemove: $setup.removeBook
  28490. }, null, 8, ["book"]);
  28491. }),
  28492. 128
  28493. /* KEYED_FRAGMENT */
  28494. ))
  28495. ]),
  28496. vue.createCommentVNode(" 底部信息和按钮 "),
  28497. vue.createElementVNode("view", {
  28498. class: "footer fixed-bottom flex-d",
  28499. style: { "padding-top": "10rpx" }
  28500. }, [
  28501. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  28502. key: 0,
  28503. class: "pad-10"
  28504. }, [
  28505. vue.createTextVNode("共 "),
  28506. vue.createElementVNode(
  28507. "text",
  28508. { style: { "color": "#ff0000" } },
  28509. vue.toDisplayString($setup.totalBooks),
  28510. 1
  28511. /* TEXT */
  28512. ),
  28513. vue.createTextVNode(" 本,预估回收价 "),
  28514. vue.createElementVNode(
  28515. "text",
  28516. { style: { "color": "#ff0000" } },
  28517. "¥" + vue.toDisplayString($setup.totalPrice),
  28518. 1
  28519. /* TEXT */
  28520. )
  28521. ])) : vue.createCommentVNode("v-if", true),
  28522. vue.createElementVNode("view", { class: "flex-a mt-12" }, [
  28523. vue.withDirectives(vue.createVNode(
  28524. _component_u_button,
  28525. {
  28526. size: "large",
  28527. type: "primary",
  28528. text: "提交",
  28529. onClick: $setup.handleSubmit
  28530. },
  28531. null,
  28532. 512
  28533. /* NEED_PATCH */
  28534. ), [
  28535. [_directive_permission, "app:offline:checkOrder:confirm"]
  28536. ]),
  28537. vue.createVNode(_component_u_button, {
  28538. size: "large",
  28539. type: "warning",
  28540. text: "扫码",
  28541. onClick: $setup.handleScan
  28542. })
  28543. ])
  28544. ])
  28545. ]);
  28546. }
  28547. 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"]]);
  28548. const _sfc_main$p = {
  28549. __name: "check-record",
  28550. setup(__props, { expose: __expose }) {
  28551. __expose();
  28552. const scrollRef = vue.ref(null);
  28553. const refreshList = () => {
  28554. var _a;
  28555. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  28556. };
  28557. let dataList = vue.ref([]);
  28558. const updateList = (data) => {
  28559. dataList.value = data;
  28560. };
  28561. const __returned__ = { scrollRef, refreshList, get dataList() {
  28562. return dataList;
  28563. }, set dataList(v) {
  28564. dataList = v;
  28565. }, updateList, PageScroll: pageScroll, ref: vue.ref };
  28566. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28567. return __returned__;
  28568. }
  28569. };
  28570. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  28571. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  28572. return vue.openBlock(), vue.createElementBlock("view", {
  28573. class: "common-page",
  28574. style: { "padding": "0" }
  28575. }, [
  28576. vue.createVNode(
  28577. $setup["PageScroll"],
  28578. {
  28579. requestStr: "/app/offlineorder/getUserStat",
  28580. onUpdateList: $setup.updateList,
  28581. ref: "scrollRef"
  28582. },
  28583. {
  28584. default: vue.withCtx(() => [
  28585. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  28586. default: vue.withCtx(() => [
  28587. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  28588. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单时间"),
  28589. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单数量"),
  28590. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单本数"),
  28591. vue.createElementVNode("view", { class: "text-item flex-1" }, "预估金额")
  28592. ])
  28593. ]),
  28594. _: 1
  28595. /* STABLE */
  28596. }),
  28597. vue.createElementVNode("view", { class: "list-con" }, [
  28598. (vue.openBlock(true), vue.createElementBlock(
  28599. vue.Fragment,
  28600. null,
  28601. vue.renderList($setup.dataList, (item, index2) => {
  28602. return vue.openBlock(), vue.createElementBlock("view", {
  28603. key: index2,
  28604. class: "flex-a"
  28605. }, [
  28606. vue.createElementVNode(
  28607. "view",
  28608. { class: "text-item flex-1" },
  28609. vue.toDisplayString(item.statDate),
  28610. 1
  28611. /* TEXT */
  28612. ),
  28613. vue.createElementVNode(
  28614. "view",
  28615. { class: "text-item flex-1" },
  28616. vue.toDisplayString(item.totalNum),
  28617. 1
  28618. /* TEXT */
  28619. ),
  28620. vue.createElementVNode(
  28621. "view",
  28622. { class: "text-item flex-1" },
  28623. vue.toDisplayString(item.bookNum),
  28624. 1
  28625. /* TEXT */
  28626. ),
  28627. vue.createElementVNode(
  28628. "view",
  28629. { class: "text-item flex-1" },
  28630. vue.toDisplayString(item.expectAmount),
  28631. 1
  28632. /* TEXT */
  28633. )
  28634. ]);
  28635. }),
  28636. 128
  28637. /* KEYED_FRAGMENT */
  28638. ))
  28639. ])
  28640. ]),
  28641. _: 1
  28642. /* STABLE */
  28643. },
  28644. 512
  28645. /* NEED_PATCH */
  28646. )
  28647. ]);
  28648. }
  28649. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-record.vue"]]);
  28650. const props$3 = {
  28651. props: {
  28652. // 内置图标名称,或图片路径,建议绝对路径
  28653. icon: {
  28654. type: String,
  28655. default: props$E.empty.icon
  28656. },
  28657. // 提示文字
  28658. text: {
  28659. type: String,
  28660. default: props$E.empty.text
  28661. },
  28662. // 文字颜色
  28663. textColor: {
  28664. type: String,
  28665. default: props$E.empty.textColor
  28666. },
  28667. // 文字大小
  28668. textSize: {
  28669. type: [String, Number],
  28670. default: props$E.empty.textSize
  28671. },
  28672. // 图标的颜色
  28673. iconColor: {
  28674. type: String,
  28675. default: props$E.empty.iconColor
  28676. },
  28677. // 图标的大小
  28678. iconSize: {
  28679. type: [String, Number],
  28680. default: props$E.empty.iconSize
  28681. },
  28682. // 选择预置的图标类型
  28683. mode: {
  28684. type: String,
  28685. default: props$E.empty.mode
  28686. },
  28687. // 图标宽度,单位px
  28688. width: {
  28689. type: [String, Number],
  28690. default: props$E.empty.width
  28691. },
  28692. // 图标高度,单位px
  28693. height: {
  28694. type: [String, Number],
  28695. default: props$E.empty.height
  28696. },
  28697. // 是否显示组件
  28698. show: {
  28699. type: Boolean,
  28700. default: props$E.empty.show
  28701. },
  28702. // 组件距离上一个元素之间的距离,默认px单位
  28703. marginTop: {
  28704. type: [String, Number],
  28705. default: props$E.empty.marginTop
  28706. }
  28707. }
  28708. };
  28709. const _sfc_main$o = {
  28710. name: "u-empty",
  28711. mixins: [mpMixin, mixin, props$3],
  28712. data() {
  28713. return {
  28714. icons: {
  28715. car: "购物车为空",
  28716. page: "页面不存在",
  28717. search: "没有搜索结果",
  28718. address: "没有收货地址",
  28719. wifi: "没有WiFi",
  28720. order: "订单为空",
  28721. coupon: "没有优惠券",
  28722. favor: "暂无收藏",
  28723. permission: "无权限",
  28724. history: "无历史记录",
  28725. news: "无新闻列表",
  28726. message: "消息列表为空",
  28727. list: "列表为空",
  28728. data: "数据为空",
  28729. comment: "暂无评论"
  28730. }
  28731. };
  28732. },
  28733. computed: {
  28734. // 组件样式
  28735. emptyStyle() {
  28736. const style = {};
  28737. style.marginTop = uni.$u.addUnit(this.marginTop);
  28738. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  28739. },
  28740. // 文本样式
  28741. textStyle() {
  28742. const style = {};
  28743. style.color = this.textColor;
  28744. style.fontSize = uni.$u.addUnit(this.textSize);
  28745. return style;
  28746. },
  28747. // 判断icon是否图片路径
  28748. isSrc() {
  28749. return this.icon.indexOf("/") >= 0;
  28750. }
  28751. }
  28752. };
  28753. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  28754. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28755. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  28756. "view",
  28757. {
  28758. key: 0,
  28759. class: "u-empty",
  28760. style: vue.normalizeStyle([$options.emptyStyle])
  28761. },
  28762. [
  28763. !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28764. key: 0,
  28765. name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
  28766. size: _ctx.iconSize,
  28767. color: _ctx.iconColor,
  28768. "margin-top": "14"
  28769. }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  28770. key: 1,
  28771. style: vue.normalizeStyle({
  28772. width: _ctx.$u.addUnit(_ctx.width),
  28773. height: _ctx.$u.addUnit(_ctx.height)
  28774. }),
  28775. src: _ctx.icon,
  28776. mode: "widthFix"
  28777. }, null, 12, ["src"])),
  28778. vue.createElementVNode(
  28779. "text",
  28780. {
  28781. class: "u-empty__text",
  28782. style: vue.normalizeStyle([$options.textStyle])
  28783. },
  28784. vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
  28785. 5
  28786. /* TEXT, STYLE */
  28787. ),
  28788. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  28789. key: 2,
  28790. class: "u-empty__wrap"
  28791. }, [
  28792. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  28793. ])) : vue.createCommentVNode("v-if", true)
  28794. ],
  28795. 4
  28796. /* STYLE */
  28797. )) : vue.createCommentVNode("v-if", true);
  28798. }
  28799. 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"]]);
  28800. const _sfc_main$n = {
  28801. __name: "scan-book",
  28802. setup(__props, { expose: __expose }) {
  28803. __expose();
  28804. const searchValue = vue.ref("");
  28805. const scannedISBN = vue.ref("");
  28806. const currentTab = vue.ref(0);
  28807. const tabsList = [
  28808. {
  28809. name: "简介"
  28810. },
  28811. {
  28812. name: "轨迹"
  28813. }
  28814. ];
  28815. const bookInfo = vue.ref(null);
  28816. const handleSearch = () => {
  28817. if (!searchValue.value)
  28818. return;
  28819. loadBookInfo(searchValue.value);
  28820. };
  28821. const handleScan = () => {
  28822. uni.scanCode({
  28823. success: (res2) => {
  28824. searchValue.value = res2.result;
  28825. scannedISBN.value = res2.result;
  28826. loadBookInfo(res2.result);
  28827. }
  28828. });
  28829. };
  28830. const loadBookInfo = (isbn) => {
  28831. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  28832. if (res2.code == 200) {
  28833. bookInfo.value = res2.data;
  28834. }
  28835. });
  28836. };
  28837. onLoad(() => {
  28838. uni.$u.useGlobalEvent((e) => {
  28839. searchValue.value = e.barcode;
  28840. scannedISBN.value = e.barcode;
  28841. loadBookInfo(e.barcode);
  28842. });
  28843. });
  28844. onShow(() => {
  28845. uni.$u.updateActivePageOnShow();
  28846. });
  28847. const __returned__ = { searchValue, scannedISBN, currentTab, tabsList, bookInfo, handleSearch, handleScan, loadBookInfo, ref: vue.ref, get onLoad() {
  28848. return onLoad;
  28849. }, get onShow() {
  28850. return onShow;
  28851. } };
  28852. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28853. return __returned__;
  28854. }
  28855. };
  28856. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  28857. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28858. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28859. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  28860. const _component_u_empty = resolveEasycom(vue.resolveDynamicComponent("u-empty"), __easycom_3$1);
  28861. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  28862. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  28863. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28864. vue.createCommentVNode(" 顶部搜索框 "),
  28865. vue.createVNode(_component_u_sticky, null, {
  28866. default: vue.withCtx(() => [
  28867. vue.createElementVNode("view", { class: "search-area" }, [
  28868. vue.createVNode(_component_u_search, {
  28869. modelValue: $setup.searchValue,
  28870. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchValue = $event),
  28871. placeholder: "扫描/输入ISBN或SH码",
  28872. "show-action": true,
  28873. actionText: "查询",
  28874. onSearch: $setup.handleSearch,
  28875. onCustom: $setup.handleSearch
  28876. }, {
  28877. suffixIcon: vue.withCtx(() => [
  28878. $setup.searchValue ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28879. key: 0,
  28880. name: "close",
  28881. size: "20",
  28882. onClick: _cache[0] || (_cache[0] = ($event) => $setup.searchValue = "")
  28883. })) : vue.createCommentVNode("v-if", true)
  28884. ]),
  28885. _: 1
  28886. /* STABLE */
  28887. }, 8, ["modelValue"])
  28888. ])
  28889. ]),
  28890. _: 1
  28891. /* STABLE */
  28892. }),
  28893. vue.createCommentVNode(" 已扫描ISBN显示 "),
  28894. $setup.scannedISBN ? (vue.openBlock(), vue.createElementBlock("view", {
  28895. key: 0,
  28896. class: "isbn-display"
  28897. }, [
  28898. vue.createElementVNode(
  28899. "text",
  28900. null,
  28901. "已查询ISBN:" + vue.toDisplayString($setup.scannedISBN),
  28902. 1
  28903. /* TEXT */
  28904. )
  28905. ])) : vue.createCommentVNode("v-if", true),
  28906. vue.createCommentVNode(" 内容区域 "),
  28907. vue.createElementVNode("view", { class: "content" }, [
  28908. vue.createCommentVNode(" 空状态 "),
  28909. !$setup.bookInfo ? (vue.openBlock(), vue.createElementBlock("view", {
  28910. key: 0,
  28911. class: "empty-state"
  28912. }, [
  28913. vue.createVNode(_component_u_empty, {
  28914. mode: "data",
  28915. text: "暂无扫描数据",
  28916. "margin-top": "100"
  28917. })
  28918. ])) : (vue.openBlock(), vue.createElementBlock(
  28919. vue.Fragment,
  28920. { key: 1 },
  28921. [
  28922. vue.createCommentVNode(" 书籍详情 "),
  28923. vue.createElementVNode("view", { class: "book-detail" }, [
  28924. vue.createElementVNode("view", { class: "common-card mb-20" }, [
  28925. vue.createElementVNode("view", { class: "flex flex-d flex-a-c" }, [
  28926. vue.createElementVNode("image", {
  28927. class: "book-image",
  28928. src: $setup.bookInfo.cover,
  28929. mode: "heightFix"
  28930. }, null, 8, ["src"]),
  28931. vue.createElementVNode(
  28932. "text",
  28933. { class: "ml-20 font-15" },
  28934. vue.toDisplayString($setup.bookInfo.bookName),
  28935. 1
  28936. /* TEXT */
  28937. )
  28938. ]),
  28939. vue.createElementVNode("view", { class: "book-status" }, [
  28940. vue.createElementVNode(
  28941. "text",
  28942. { class: "status-text" },
  28943. "状态:" + vue.toDisplayString($setup.bookInfo.recycleStatus ? "已加入回收书单" : "未加入回收书单"),
  28944. 1
  28945. /* TEXT */
  28946. ),
  28947. $setup.bookInfo.recycleTime ? (vue.openBlock(), vue.createElementBlock(
  28948. "text",
  28949. {
  28950. key: 0,
  28951. class: "time-text"
  28952. },
  28953. "加入时间:" + vue.toDisplayString($setup.bookInfo.recycleTime),
  28954. 1
  28955. /* TEXT */
  28956. )) : vue.createCommentVNode("v-if", true)
  28957. ])
  28958. ]),
  28959. vue.createCommentVNode(" 基本信息 "),
  28960. vue.createElementVNode("view", { class: "common-card info-section mb-20" }, [
  28961. vue.createElementVNode("view", { class: "price-info" }, [
  28962. vue.createElementVNode("text", { class: "label" }, "定价:"),
  28963. vue.createElementVNode(
  28964. "text",
  28965. { class: "price" },
  28966. "¥" + vue.toDisplayString($setup.bookInfo.price),
  28967. 1
  28968. /* TEXT */
  28969. ),
  28970. vue.createElementVNode(
  28971. "text",
  28972. { class: "recycle-price" },
  28973. "回收价:¥" + vue.toDisplayString($setup.bookInfo.expectPrice),
  28974. 1
  28975. /* TEXT */
  28976. )
  28977. ]),
  28978. vue.createElementVNode("view", { class: "book-info" }, [
  28979. vue.createElementVNode("view", { class: "info-item" }, [
  28980. vue.createElementVNode("text", { class: "label" }, "ISBN:"),
  28981. vue.createElementVNode(
  28982. "text",
  28983. null,
  28984. vue.toDisplayString($setup.bookInfo.isbn),
  28985. 1
  28986. /* TEXT */
  28987. )
  28988. ]),
  28989. vue.createElementVNode("view", { class: "info-item" }, [
  28990. vue.createElementVNode("text", { class: "label" }, "语言:"),
  28991. vue.createElementVNode(
  28992. "text",
  28993. null,
  28994. vue.toDisplayString($setup.bookInfo.lang || "-"),
  28995. 1
  28996. /* TEXT */
  28997. )
  28998. ]),
  28999. vue.createElementVNode("view", { class: "info-item" }, [
  29000. vue.createElementVNode("text", { class: "label" }, "作者:"),
  29001. vue.createElementVNode(
  29002. "text",
  29003. null,
  29004. vue.toDisplayString($setup.bookInfo.author),
  29005. 1
  29006. /* TEXT */
  29007. )
  29008. ]),
  29009. vue.createElementVNode("view", { class: "info-item" }, [
  29010. vue.createElementVNode("text", { class: "label" }, "出版社:"),
  29011. vue.createElementVNode(
  29012. "text",
  29013. null,
  29014. vue.toDisplayString($setup.bookInfo.publish),
  29015. 1
  29016. /* TEXT */
  29017. )
  29018. ]),
  29019. vue.createElementVNode("view", { class: "info-item" }, [
  29020. vue.createElementVNode("text", { class: "label" }, "出版时间:"),
  29021. vue.createElementVNode(
  29022. "text",
  29023. null,
  29024. vue.toDisplayString($setup.bookInfo.pubDate),
  29025. 1
  29026. /* TEXT */
  29027. )
  29028. ])
  29029. ])
  29030. ]),
  29031. vue.createCommentVNode(" 简介和轨迹 "),
  29032. vue.createElementVNode("view", {
  29033. class: "common-card tabs-section",
  29034. style: { "padding": "0" }
  29035. }, [
  29036. vue.createVNode(_component_u_tabs, {
  29037. list: $setup.tabsList,
  29038. modelValue: $setup.currentTab,
  29039. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.currentTab = $event),
  29040. lineColor: "#19be6b"
  29041. }, null, 8, ["modelValue"]),
  29042. vue.createElementVNode("view", { class: "tab-content" }, [
  29043. $setup.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  29044. key: 0,
  29045. class: "intro-content"
  29046. }, [
  29047. vue.createElementVNode("text", { class: "section-title" }, "内容简介:"),
  29048. vue.createElementVNode(
  29049. "text",
  29050. { class: "content-text" },
  29051. vue.toDisplayString($setup.bookInfo.contentBlurb),
  29052. 1
  29053. /* TEXT */
  29054. ),
  29055. vue.createElementVNode("text", { class: "section-title" }, "作者简介:"),
  29056. vue.createElementVNode(
  29057. "text",
  29058. { class: "content-text" },
  29059. vue.toDisplayString($setup.bookInfo.anthorBlurb),
  29060. 1
  29061. /* TEXT */
  29062. ),
  29063. vue.createElementVNode(
  29064. "text",
  29065. { class: "content-text" },
  29066. vue.toDisplayString($setup.bookInfo.catalog),
  29067. 1
  29068. /* TEXT */
  29069. )
  29070. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  29071. key: 1,
  29072. class: "track-content"
  29073. }, [
  29074. vue.createElementVNode(
  29075. "text",
  29076. null,
  29077. vue.toDisplayString($setup.bookInfo.track),
  29078. 1
  29079. /* TEXT */
  29080. )
  29081. ]))
  29082. ])
  29083. ])
  29084. ])
  29085. ],
  29086. 2112
  29087. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  29088. ))
  29089. ]),
  29090. vue.createCommentVNode(" 底部扫描按钮 "),
  29091. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29092. vue.createVNode(_component_u_button, {
  29093. size: "large",
  29094. type: "primary",
  29095. text: "扫码(ISBN或SH码)",
  29096. onClick: $setup.handleScan
  29097. })
  29098. ])
  29099. ]);
  29100. }
  29101. 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"]]);
  29102. const _sfc_main$m = {
  29103. __name: "book-weight",
  29104. setup(__props, { expose: __expose }) {
  29105. __expose();
  29106. const customStyle = {
  29107. height: "100rpx",
  29108. fontSize: "32rpx"
  29109. };
  29110. const labelStyle = {
  29111. fontSize: "32rpx"
  29112. };
  29113. const placeholderStyle2 = vue.ref("fontSize: 32rpx");
  29114. const form = vue.ref({
  29115. weight: "",
  29116. isbn: ""
  29117. });
  29118. const rules2 = {
  29119. weight: [
  29120. {
  29121. required: true,
  29122. message: "请输入重量",
  29123. trigger: "blur"
  29124. },
  29125. {
  29126. type: "number",
  29127. message: "重量必须是数字",
  29128. trigger: "blur"
  29129. }
  29130. ],
  29131. isbn: [{
  29132. required: true,
  29133. message: "请输入ISBN",
  29134. trigger: "blur"
  29135. }]
  29136. };
  29137. function handleScan() {
  29138. uni.scanCode({
  29139. success: (res2) => {
  29140. form.value.isbn = res2.result;
  29141. }
  29142. });
  29143. }
  29144. const formRef = vue.ref(null);
  29145. const submitForm = () => {
  29146. formRef.value.validate().then((valid) => {
  29147. if (valid) {
  29148. uni.$u.http.post("/app/weighChangeLog/add", form.value).then((res2) => {
  29149. if (res2.code == 200) {
  29150. uni.$u.toast("修改成功");
  29151. form.value.isbn = "";
  29152. form.value.weight = "";
  29153. } else {
  29154. uni.$u.toast(res2.msg);
  29155. }
  29156. });
  29157. }
  29158. });
  29159. };
  29160. onLoad(() => {
  29161. uni.$u.useGlobalEvent((e) => {
  29162. form.value.isbn = e.barcode;
  29163. });
  29164. });
  29165. onShow(() => {
  29166. uni.$u.updateActivePageOnShow();
  29167. });
  29168. const __returned__ = { customStyle, labelStyle, placeholderStyle: placeholderStyle2, form, rules: rules2, handleScan, formRef, submitForm, ref: vue.ref, get onLoad() {
  29169. return onLoad;
  29170. }, get onShow() {
  29171. return onShow;
  29172. } };
  29173. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29174. return __returned__;
  29175. }
  29176. };
  29177. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  29178. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  29179. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  29180. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  29181. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  29182. const _directive_permission = vue.resolveDirective("permission");
  29183. return vue.openBlock(), vue.createElementBlock("view", { class: "common-page" }, [
  29184. vue.createVNode(_component_u_form, {
  29185. model: $setup.form,
  29186. rules: $setup.rules,
  29187. ref: "formRef",
  29188. labelWidth: "90px",
  29189. errorType: "toast",
  29190. labelStyle: $setup.labelStyle
  29191. }, {
  29192. default: vue.withCtx(() => [
  29193. vue.createVNode(_component_u_form_item, {
  29194. label: "重量(克)",
  29195. prop: "weight",
  29196. required: ""
  29197. }, {
  29198. default: vue.withCtx(() => [
  29199. vue.createVNode(_component_u_input, {
  29200. placeholderStyle: $setup.placeholderStyle,
  29201. customStyle: $setup.customStyle,
  29202. modelValue: $setup.form.weight,
  29203. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.weight = $event),
  29204. placeholder: "请输入数值",
  29205. clearable: ""
  29206. }, null, 8, ["placeholderStyle", "modelValue"])
  29207. ]),
  29208. _: 1
  29209. /* STABLE */
  29210. }),
  29211. vue.createVNode(_component_u_form_item, {
  29212. label: "ISBN",
  29213. prop: "isbn",
  29214. required: ""
  29215. }, {
  29216. default: vue.withCtx(() => [
  29217. vue.createVNode(_component_u_input, {
  29218. placeholderStyle: $setup.placeholderStyle,
  29219. customStyle: $setup.customStyle,
  29220. modelValue: $setup.form.isbn,
  29221. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.isbn = $event),
  29222. placeholder: "请输入编码",
  29223. clearable: ""
  29224. }, null, 8, ["placeholderStyle", "modelValue"])
  29225. ]),
  29226. _: 1
  29227. /* STABLE */
  29228. })
  29229. ]),
  29230. _: 1
  29231. /* STABLE */
  29232. }, 8, ["model"]),
  29233. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29234. vue.createVNode(_component_u_button, {
  29235. size: "large",
  29236. type: "warning",
  29237. text: "扫码",
  29238. onClick: $setup.handleScan
  29239. }),
  29240. vue.withDirectives(vue.createVNode(
  29241. _component_u_button,
  29242. {
  29243. size: "large",
  29244. type: "success",
  29245. text: "提交",
  29246. onClick: $setup.submitForm
  29247. },
  29248. null,
  29249. 512
  29250. /* NEED_PATCH */
  29251. ), [
  29252. [_directive_permission, "app:entry:bookWeight:confirm"]
  29253. ])
  29254. ])
  29255. ]);
  29256. }
  29257. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/book-weight.vue"]]);
  29258. const props$2 = {
  29259. props: {
  29260. // 显示文字
  29261. title: {
  29262. type: String,
  29263. default: props$E.alert.title
  29264. },
  29265. // 主题,success/warning/info/error
  29266. type: {
  29267. type: String,
  29268. default: props$E.alert.type
  29269. },
  29270. // 辅助性文字
  29271. description: {
  29272. type: String,
  29273. default: props$E.alert.description
  29274. },
  29275. // 是否可关闭
  29276. closable: {
  29277. type: Boolean,
  29278. default: props$E.alert.closable
  29279. },
  29280. // 是否显示图标
  29281. showIcon: {
  29282. type: Boolean,
  29283. default: props$E.alert.showIcon
  29284. },
  29285. // 浅或深色调,light-浅色,dark-深色
  29286. effect: {
  29287. type: String,
  29288. default: props$E.alert.effect
  29289. },
  29290. // 文字是否居中
  29291. center: {
  29292. type: Boolean,
  29293. default: props$E.alert.center
  29294. },
  29295. // 字体大小
  29296. fontSize: {
  29297. type: [String, Number],
  29298. default: props$E.alert.fontSize
  29299. }
  29300. }
  29301. };
  29302. const _sfc_main$l = {
  29303. name: "u-alert",
  29304. mixins: [mpMixin, mixin, props$2],
  29305. data() {
  29306. return {
  29307. show: true
  29308. };
  29309. },
  29310. computed: {
  29311. iconColor() {
  29312. return this.effect === "light" ? this.type : "#fff";
  29313. },
  29314. // 不同主题对应不同的图标
  29315. iconName() {
  29316. switch (this.type) {
  29317. case "success":
  29318. return "checkmark-circle-fill";
  29319. case "error":
  29320. return "close-circle-fill";
  29321. case "warning":
  29322. return "error-circle-fill";
  29323. case "info":
  29324. return "info-circle-fill";
  29325. case "primary":
  29326. return "more-circle-fill";
  29327. default:
  29328. return "error-circle-fill";
  29329. }
  29330. }
  29331. },
  29332. methods: {
  29333. // 点击内容
  29334. clickHandler() {
  29335. this.$emit("click");
  29336. },
  29337. // 点击关闭按钮
  29338. closeHandler() {
  29339. this.show = false;
  29340. }
  29341. }
  29342. };
  29343. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  29344. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29345. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  29346. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  29347. mode: "fade",
  29348. show: $data.show
  29349. }, {
  29350. default: vue.withCtx(() => [
  29351. vue.createElementVNode(
  29352. "view",
  29353. {
  29354. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  29355. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  29356. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  29357. },
  29358. [
  29359. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  29360. key: 0,
  29361. class: "u-alert__icon"
  29362. }, [
  29363. vue.createVNode(_component_u_icon, {
  29364. name: $options.iconName,
  29365. size: "18",
  29366. color: $options.iconColor
  29367. }, null, 8, ["name", "color"])
  29368. ])) : vue.createCommentVNode("v-if", true),
  29369. vue.createElementVNode(
  29370. "view",
  29371. {
  29372. class: "u-alert__content",
  29373. style: vue.normalizeStyle([{
  29374. paddingRight: _ctx.closable ? "20px" : 0
  29375. }])
  29376. },
  29377. [
  29378. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  29379. "text",
  29380. {
  29381. key: 0,
  29382. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  29383. style: vue.normalizeStyle([{
  29384. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  29385. textAlign: _ctx.center ? "center" : "left"
  29386. }])
  29387. },
  29388. vue.toDisplayString(_ctx.title),
  29389. 7
  29390. /* TEXT, CLASS, STYLE */
  29391. )) : vue.createCommentVNode("v-if", true),
  29392. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  29393. "text",
  29394. {
  29395. key: 1,
  29396. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  29397. style: vue.normalizeStyle([{
  29398. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  29399. textAlign: _ctx.center ? "center" : "left"
  29400. }])
  29401. },
  29402. vue.toDisplayString(_ctx.description),
  29403. 7
  29404. /* TEXT, CLASS, STYLE */
  29405. )) : vue.createCommentVNode("v-if", true)
  29406. ],
  29407. 4
  29408. /* STYLE */
  29409. ),
  29410. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  29411. key: 1,
  29412. class: "u-alert__close",
  29413. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  29414. }, [
  29415. vue.createVNode(_component_u_icon, {
  29416. name: "close",
  29417. color: $options.iconColor,
  29418. size: "15"
  29419. }, null, 8, ["color"])
  29420. ])) : vue.createCommentVNode("v-if", true)
  29421. ],
  29422. 6
  29423. /* CLASS, STYLE */
  29424. )
  29425. ]),
  29426. _: 1
  29427. /* STABLE */
  29428. }, 8, ["show"]);
  29429. }
  29430. 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"]]);
  29431. const _sfc_main$k = {
  29432. __name: "logistics-detail",
  29433. setup(__props, { expose: __expose }) {
  29434. __expose();
  29435. const logisticsInfo = vue.ref([]);
  29436. function getLogisticsDetail(orderId) {
  29437. uni.$u.http.get(`/app/orderinfo/getOrderExpressList?orderId=${orderId}`).then((res2) => {
  29438. if (res2.code == 200) {
  29439. logisticsInfo.value = res2.data;
  29440. }
  29441. });
  29442. }
  29443. function handleButtonClick(status, reason) {
  29444. uni.$u.http.post("/app/orderexception/update", {
  29445. id: id.value,
  29446. checkStatus: status,
  29447. refusalReason: reason
  29448. }).then((res2) => {
  29449. if (res2.code == 200) {
  29450. checkStatus.value = status;
  29451. uni.$u.toast("操作成功");
  29452. emit("refresh");
  29453. } else {
  29454. uni.$u.toast(res2.msg);
  29455. }
  29456. });
  29457. }
  29458. const checkStatus = vue.ref(0);
  29459. const id = vue.ref(0);
  29460. onLoad((e) => {
  29461. checkStatus.value = e.status;
  29462. id.value = e.id;
  29463. getLogisticsDetail(e.orderId);
  29464. });
  29465. const __returned__ = { logisticsInfo, getLogisticsDetail, handleButtonClick, checkStatus, id, ref: vue.ref, get onLoad() {
  29466. return onLoad;
  29467. }, ApproveButton, RejectButton };
  29468. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29469. return __returned__;
  29470. }
  29471. };
  29472. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  29473. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  29474. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  29475. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29476. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29477. vue.createCommentVNode(" 物流公司信息 "),
  29478. vue.createVNode(_component_u_sticky, null, {
  29479. default: vue.withCtx(() => [
  29480. vue.createVNode(_component_u_alert, {
  29481. title: `物流公司:京东快递`,
  29482. type: "warning"
  29483. })
  29484. ]),
  29485. _: 1
  29486. /* STABLE */
  29487. }),
  29488. vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
  29489. vue.createElementVNode("scroll-view", {
  29490. "scroll-y": "",
  29491. class: "timeline-container"
  29492. }, [
  29493. (vue.openBlock(true), vue.createElementBlock(
  29494. vue.Fragment,
  29495. null,
  29496. vue.renderList($setup.logisticsInfo, (item, index2) => {
  29497. return vue.openBlock(), vue.createElementBlock("view", {
  29498. key: index2,
  29499. class: "timeline-item"
  29500. }, [
  29501. vue.createElementVNode("view", { class: "timeline-icon" }, [
  29502. vue.createVNode(_component_u_icon, {
  29503. name: "map-fill",
  29504. color: "#19be6b",
  29505. size: "16"
  29506. })
  29507. ]),
  29508. vue.createElementVNode("view", { class: "timeline-content" }, [
  29509. vue.createElementVNode(
  29510. "text",
  29511. { class: "title" },
  29512. vue.toDisplayString(item.title),
  29513. 1
  29514. /* TEXT */
  29515. ),
  29516. vue.createElementVNode(
  29517. "text",
  29518. { class: "desc" },
  29519. vue.toDisplayString(item.description),
  29520. 1
  29521. /* TEXT */
  29522. ),
  29523. vue.createElementVNode(
  29524. "text",
  29525. { class: "time" },
  29526. vue.toDisplayString(item.time),
  29527. 1
  29528. /* TEXT */
  29529. )
  29530. ]),
  29531. index2 < $setup.logisticsInfo.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  29532. key: 0,
  29533. class: "timeline-line"
  29534. })) : vue.createCommentVNode("v-if", true)
  29535. ]);
  29536. }),
  29537. 128
  29538. /* KEYED_FRAGMENT */
  29539. ))
  29540. ]),
  29541. vue.createCommentVNode(" 底部操作按钮 "),
  29542. $setup.checkStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  29543. key: 0,
  29544. class: "fixed-bottom"
  29545. }, [
  29546. vue.createVNode($setup["RejectButton"], {
  29547. size: "large",
  29548. onReject: _cache[0] || (_cache[0] = (reason) => $setup.handleButtonClick(3, reason))
  29549. }),
  29550. vue.createVNode($setup["ApproveButton"], {
  29551. size: "large",
  29552. onApprove: _cache[1] || (_cache[1] = ($event) => $setup.handleButtonClick(2))
  29553. })
  29554. ])) : vue.createCommentVNode("v-if", true)
  29555. ]);
  29556. }
  29557. 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"]]);
  29558. const _imports_0 = "/static/img/location.png";
  29559. const _imports_1 = "/static/img/location-active.png";
  29560. const _sfc_main$j = {
  29561. __name: "task-detail",
  29562. setup(__props, { expose: __expose }) {
  29563. __expose();
  29564. const currentTask = vue.ref(0);
  29565. const totalTasks = vue.ref(0);
  29566. const curTaskInfo = vue.ref({});
  29567. const nextLocation = vue.ref("");
  29568. const orderList = vue.ref([]);
  29569. const ttsModule2 = vue.ref(null);
  29570. const taskCode = vue.ref("");
  29571. onUnload(() => {
  29572. ttsModule2.value.stop();
  29573. });
  29574. const searchText = vue.ref("");
  29575. const badList = vue.ref([]);
  29576. const handleNextTask = () => {
  29577. if (currentTask.value < totalTasks.value) {
  29578. currentTask.value++;
  29579. if (currentTask.value == totalTasks.value) {
  29580. ttsModule2.value.speak("任务完成");
  29581. } else {
  29582. curTaskInfo.value = orderList.value[currentTask.value];
  29583. badList.value = curTaskInfo.value.detailVoList || [];
  29584. let nextInfo = orderList.value[currentTask.value + 1];
  29585. nextLocation.value = nextInfo.positionCode;
  29586. }
  29587. }
  29588. };
  29589. const onSearch = () => {
  29590. uni.$u.http.get(`/app/appstock/getStockTaskDetail?taskCode=${taskCode.value}`).then((res2) => {
  29591. if (res2.code == 200) {
  29592. orderList.value = res2.data;
  29593. totalTasks.value = res2.data.length;
  29594. curTaskInfo.value = res2.data[currentTask.value];
  29595. badList.value = curTaskInfo.value.detailVoList || [];
  29596. }
  29597. });
  29598. };
  29599. const confirmStockTask = () => {
  29600. const params = {
  29601. positionCode: curTaskInfo.value.positionCode,
  29602. orderId: curTaskInfo.value.orderId,
  29603. taskCode: taskCode.value
  29604. };
  29605. uni.$u.http.post("/app/appstock/setStockTask", params).then((res2) => {
  29606. if (res2.code === 200) {
  29607. curTaskInfo.value.isCompleted = true;
  29608. orderList.value[currentTask.value] = curTaskInfo.value;
  29609. handleNextTask();
  29610. isFirstScan.value = false;
  29611. ttsModule2.value.speak("下架成功");
  29612. } else {
  29613. uni.showToast({
  29614. title: res2.msg,
  29615. icon: "error"
  29616. });
  29617. }
  29618. });
  29619. };
  29620. const unlockTask = () => {
  29621. uni.$u.http.post("/app/appstock/unlockStockTask?taskCode=" + taskCode.value).then((res2) => {
  29622. if (res2.code == 200) {
  29623. uni.showToast({
  29624. title: "解锁成功",
  29625. icon: "success"
  29626. });
  29627. } else {
  29628. uni.showToast({
  29629. title: res2.msg || "解锁失败",
  29630. icon: "error"
  29631. });
  29632. }
  29633. });
  29634. };
  29635. const onSubmit = () => {
  29636. uni.showModal({
  29637. title: "确认提示",
  29638. content: "是否确认提交本次下架?",
  29639. success: (res2) => {
  29640. if (res2.confirm) {
  29641. uni.navigateBack();
  29642. ttsModule2.value.speak("任务已提交");
  29643. unlockTask();
  29644. }
  29645. }
  29646. });
  29647. };
  29648. function goBack() {
  29649. uni.showModal({
  29650. title: "确认提示",
  29651. content: "是否确认放弃本次下架?",
  29652. success: (res2) => {
  29653. if (res2.confirm) {
  29654. uni.navigateBack();
  29655. ttsModule2.value.speak("任务已放弃");
  29656. unlockTask();
  29657. }
  29658. }
  29659. });
  29660. }
  29661. let isFirstScan = vue.ref(false);
  29662. const checkScanText = (scanText) => {
  29663. formatAppLog("log", "at pages/index/wms/task-detail.vue:220", scanText, "scanText");
  29664. let length = scanText ? scanText.length : 0;
  29665. let isPositionCode = scanText.indexOf("-") > -1 && length == 9;
  29666. let isWaybillCode = /^(?=.*[A-Z])(?=.*\d)[A-Z0-9]+$/.test(scanText);
  29667. let isOrderId = /^\d+$/.test(scanText);
  29668. if (isPositionCode) {
  29669. let positionCode = curTaskInfo.value.positionCode;
  29670. if (positionCode != scanText) {
  29671. uni.showToast({
  29672. title: "库位号不正确",
  29673. icon: "error"
  29674. });
  29675. } else {
  29676. isFirstScan.value = true;
  29677. curTaskInfo.value.isValid = true;
  29678. }
  29679. }
  29680. if (!isFirstScan.value) {
  29681. ttsModule2.value.speak("请先校验库位号");
  29682. return;
  29683. }
  29684. if (isWaybillCode || isOrderId) {
  29685. let waybillCode = curTaskInfo.value.waybillCode;
  29686. let orderId = curTaskInfo.value.orderId;
  29687. if (waybillCode == scanText || orderId == scanText) {
  29688. confirmStockTask();
  29689. } else {
  29690. uni.showToast({
  29691. title: "订单号或物流号不匹配",
  29692. icon: "error"
  29693. });
  29694. curTaskInfo.value.isValid = true;
  29695. }
  29696. }
  29697. };
  29698. const openScan = () => {
  29699. uni.scanCode({
  29700. success: (res2) => {
  29701. searchText.value = res2.result;
  29702. checkScanText(res2.result);
  29703. },
  29704. fail: (err) => {
  29705. uni.showToast({
  29706. title: "扫码失败",
  29707. icon: "error"
  29708. });
  29709. }
  29710. });
  29711. };
  29712. onLoad((opts) => {
  29713. taskCode.value = opts.taskCode;
  29714. onSearch();
  29715. ttsModule2.value = new VolumeTTS();
  29716. uni.$u.useGlobalEvent((e) => {
  29717. if (e.barcode) {
  29718. searchText.value = e.barcode;
  29719. checkScanText(e.barcode);
  29720. }
  29721. });
  29722. });
  29723. onShow(() => {
  29724. uni.$u.updateActivePageOnShow();
  29725. });
  29726. const __returned__ = { currentTask, totalTasks, curTaskInfo, nextLocation, orderList, ttsModule: ttsModule2, taskCode, searchText, badList, handleNextTask, onSearch, confirmStockTask, unlockTask, onSubmit, goBack, get isFirstScan() {
  29727. return isFirstScan;
  29728. }, set isFirstScan(v) {
  29729. isFirstScan = v;
  29730. }, checkScanText, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get VolumeTTS() {
  29731. return VolumeTTS;
  29732. }, get onLoad() {
  29733. return onLoad;
  29734. }, get onUnload() {
  29735. return onUnload;
  29736. }, get onShow() {
  29737. return onShow;
  29738. } };
  29739. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29740. return __returned__;
  29741. }
  29742. };
  29743. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  29744. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29745. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  29746. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  29747. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  29748. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  29749. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29750. vue.createCommentVNode(" 顶部导航栏 "),
  29751. vue.createVNode(_component_u_navbar, {
  29752. title: "下架任务",
  29753. border: false,
  29754. fixed: "",
  29755. "safe-area-inset-top": ""
  29756. }, {
  29757. left: vue.withCtx(() => [
  29758. vue.createVNode(_component_u_icon, {
  29759. name: "arrow-left",
  29760. color: "#333333",
  29761. size: "20",
  29762. onClick: $setup.goBack
  29763. })
  29764. ]),
  29765. right: vue.withCtx(() => [
  29766. vue.createVNode(_component_u_text, {
  29767. type: "primary",
  29768. text: "提交",
  29769. onClick: $setup.onSubmit
  29770. })
  29771. ]),
  29772. _: 1
  29773. /* STABLE */
  29774. }),
  29775. vue.createCommentVNode(" 任务进度 "),
  29776. vue.createElementVNode("view", { class: "progress-section" }, [
  29777. vue.createVNode(_component_u_alert, {
  29778. title: "当前任务",
  29779. type: "info",
  29780. center: ""
  29781. }),
  29782. vue.createElementVNode("view", {
  29783. class: "flex flex-j-c pad-10",
  29784. style: { "padding-right": "40rpx" }
  29785. }, [
  29786. vue.createCommentVNode(' <view class="next-task" @click="handleNextTask">\r\n <text>上一个</text>\r\n </view> '),
  29787. vue.createElementVNode("view", { class: "flex-c" }, [
  29788. vue.createElementVNode("text", null, [
  29789. vue.createTextVNode(
  29790. vue.toDisplayString($setup.currentTask),
  29791. 1
  29792. /* TEXT */
  29793. ),
  29794. vue.createElementVNode(
  29795. "text",
  29796. { class: "progress-text font-20 color-green" },
  29797. "/" + vue.toDisplayString($setup.totalTasks),
  29798. 1
  29799. /* TEXT */
  29800. )
  29801. ])
  29802. ]),
  29803. vue.createCommentVNode(' <view class="color-green" @click="handleNextTask">\r\n <text>下一个</text>\r\n </view> ')
  29804. ])
  29805. ]),
  29806. vue.createCommentVNode(" 库位信息 "),
  29807. vue.createElementVNode("view", {
  29808. class: "flex flex-j-b pad-10 next-location",
  29809. style: { "padding-right": "40rpx", "align-items": "center" }
  29810. }, [
  29811. vue.createElementVNode(
  29812. "view",
  29813. { class: "font-14 mb-20" },
  29814. vue.toDisplayString($setup.currentTask + 1) + "/" + vue.toDisplayString($setup.totalTasks),
  29815. 1
  29816. /* TEXT */
  29817. ),
  29818. vue.createElementVNode("view", { class: "flex-d" }, [
  29819. vue.createElementVNode(
  29820. "view",
  29821. { class: "font-20 text-center" },
  29822. vue.toDisplayString($setup.curTaskInfo.positionCode),
  29823. 1
  29824. /* TEXT */
  29825. ),
  29826. $setup.nextLocation ? (vue.openBlock(), vue.createElementBlock(
  29827. "view",
  29828. {
  29829. key: 0,
  29830. class: "location-detail font-13 mt-10"
  29831. },
  29832. "下一库位 " + vue.toDisplayString($setup.nextLocation || "无"),
  29833. 1
  29834. /* TEXT */
  29835. )) : vue.createCommentVNode("v-if", true)
  29836. ]),
  29837. !$setup.curTaskInfo.isValid ? (vue.openBlock(), vue.createElementBlock("image", {
  29838. key: 0,
  29839. src: _imports_0,
  29840. mode: "widthFix",
  29841. style: { "width": "70rpx", "height": "70rpx" }
  29842. })) : (vue.openBlock(), vue.createElementBlock("image", {
  29843. key: 1,
  29844. src: _imports_1,
  29845. mode: "widthFix",
  29846. style: { "width": "70rpx", "height": "70rpx" }
  29847. }))
  29848. ]),
  29849. vue.createCommentVNode(" 订单信息 "),
  29850. vue.createElementVNode("view", { class: "order-info" }, [
  29851. vue.createElementVNode(
  29852. "view",
  29853. { class: "info-item" },
  29854. "订单编号:" + vue.toDisplayString($setup.curTaskInfo.orderId),
  29855. 1
  29856. /* TEXT */
  29857. ),
  29858. vue.createElementVNode(
  29859. "view",
  29860. { class: "info-item" },
  29861. "物流单号:" + vue.toDisplayString($setup.curTaskInfo.waybillCode || "-"),
  29862. 1
  29863. /* TEXT */
  29864. ),
  29865. vue.createElementVNode(
  29866. "view",
  29867. { class: "info-item" },
  29868. "不良数量:" + vue.toDisplayString($setup.curTaskInfo.badNum),
  29869. 1
  29870. /* TEXT */
  29871. )
  29872. ]),
  29873. vue.createCommentVNode(" 极差商品列表 "),
  29874. vue.createElementVNode("view", { class: "bad-list" }, [
  29875. vue.createElementVNode("view", { class: "list-title mb-6 mt-20" }, "极差"),
  29876. (vue.openBlock(true), vue.createElementBlock(
  29877. vue.Fragment,
  29878. null,
  29879. vue.renderList($setup.badList, (item, index2) => {
  29880. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  29881. vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
  29882. ]);
  29883. }),
  29884. 128
  29885. /* KEYED_FRAGMENT */
  29886. ))
  29887. ]),
  29888. vue.createCommentVNode(" 底部搜索框 "),
  29889. vue.createElementVNode("view", {
  29890. class: "fixed-bottom pad-20",
  29891. style: { "background": "#ffffff" }
  29892. }, [
  29893. vue.createVNode(_component_u_search, {
  29894. modelValue: $setup.searchText,
  29895. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  29896. placeholder: "请输入订单编号/物流单号/库位号",
  29897. "show-action": false,
  29898. clearabled: true,
  29899. onSearch: _cache[1] || (_cache[1] = ($event) => $setup.checkScanText($setup.searchText)),
  29900. height: "40"
  29901. }, null, 8, ["modelValue"]),
  29902. vue.createVNode(_component_u_icon, {
  29903. name: "scan",
  29904. size: "28",
  29905. color: "#19be6b",
  29906. onClick: $setup.openScan
  29907. })
  29908. ])
  29909. ]);
  29910. }
  29911. 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"]]);
  29912. const _sfc_main$i = {
  29913. __name: "speedy-check-add",
  29914. setup(__props, { expose: __expose }) {
  29915. __expose();
  29916. const location2 = vue.ref("");
  29917. const products = vue.ref([]);
  29918. const orderNum = vue.ref("");
  29919. const godownName = vue.ref("");
  29920. const getOrderByPositionCode = (positionCode) => {
  29921. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  29922. if (res2.code === 200) {
  29923. const data = res2.data;
  29924. orderNum.value = data.orderNum;
  29925. godownName.value = data.godownName;
  29926. products.value = data.godownStockLogResults || [];
  29927. products.value.forEach((item) => {
  29928. item.checked = false;
  29929. });
  29930. } else {
  29931. uni.$u.toast(res2.msg);
  29932. }
  29933. });
  29934. };
  29935. onLoad((options) => {
  29936. if (options.location) {
  29937. location2.value = options.location;
  29938. getOrderByPositionCode(options.location);
  29939. }
  29940. });
  29941. const isAllSelected = vue.computed(() => {
  29942. return products.value.length > 0 && products.value.every((item) => item.checked);
  29943. });
  29944. const toggleItemSelect = (item) => {
  29945. item.checked = !item.checked;
  29946. };
  29947. const toggleSelectAll = () => {
  29948. const newState = !isAllSelected.value;
  29949. products.value.forEach((item) => {
  29950. item.checked = newState;
  29951. });
  29952. };
  29953. const onSubmit = () => {
  29954. const selectedItems = products.value.filter((item) => item.checked);
  29955. uni.$emit("selectedProducts", selectedItems);
  29956. goBack();
  29957. };
  29958. const goBack = () => {
  29959. uni.navigateBack({
  29960. delta: 1
  29961. });
  29962. };
  29963. const __returned__ = { location: location2, products, orderNum, godownName, getOrderByPositionCode, isAllSelected, toggleItemSelect, toggleSelectAll, onSubmit, goBack, ref: vue.ref, computed: vue.computed, get onLoad() {
  29964. return onLoad;
  29965. }, get onUnload() {
  29966. return onUnload;
  29967. }, LocationOrderItem };
  29968. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29969. return __returned__;
  29970. }
  29971. };
  29972. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  29973. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29974. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  29975. return vue.openBlock(), vue.createElementBlock("view", {
  29976. class: "container",
  29977. style: { "padding-top": "84px", "padding-bottom": "10px" }
  29978. }, [
  29979. vue.createVNode(_component_u_navbar, {
  29980. title: "选择商品",
  29981. border: false,
  29982. fixed: "",
  29983. "safe-area-inset-top": "",
  29984. bgColor: "#22ac38",
  29985. titleStyle: "font-size:36rpx;color:#fff"
  29986. }, {
  29987. left: vue.withCtx(() => [
  29988. vue.createVNode(_component_u_icon, {
  29989. name: "arrow-left",
  29990. color: "#fff",
  29991. size: "20",
  29992. onClick: $setup.goBack
  29993. })
  29994. ]),
  29995. right: vue.withCtx(() => [
  29996. vue.createElementVNode("text", {
  29997. style: { "color": "#ffffff" },
  29998. onClick: $setup.onSubmit
  29999. }, "确定")
  30000. ]),
  30001. _: 1
  30002. /* STABLE */
  30003. }),
  30004. vue.createCommentVNode(" 库位显示 "),
  30005. vue.createElementVNode("view", { class: "location-info" }, [
  30006. vue.createElementVNode(
  30007. "text",
  30008. null,
  30009. "库位: " + vue.toDisplayString($setup.location),
  30010. 1
  30011. /* TEXT */
  30012. ),
  30013. $setup.godownName ? (vue.openBlock(), vue.createElementBlock(
  30014. "text",
  30015. { key: 0 },
  30016. "仓库: " + vue.toDisplayString($setup.godownName),
  30017. 1
  30018. /* TEXT */
  30019. )) : vue.createCommentVNode("v-if", true),
  30020. $setup.orderNum ? (vue.openBlock(), vue.createElementBlock(
  30021. "text",
  30022. { key: 1 },
  30023. "订单号: " + vue.toDisplayString($setup.orderNum),
  30024. 1
  30025. /* TEXT */
  30026. )) : vue.createCommentVNode("v-if", true)
  30027. ]),
  30028. vue.createCommentVNode(" 订单列表 "),
  30029. vue.createElementVNode("view", { class: "product-details" }, [
  30030. (vue.openBlock(true), vue.createElementBlock(
  30031. vue.Fragment,
  30032. null,
  30033. vue.renderList($setup.products, (item, index2) => {
  30034. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  30035. isCheck: "",
  30036. key: index2,
  30037. item,
  30038. onSelect: $setup.toggleItemSelect,
  30039. isLink: false
  30040. }, null, 8, ["item"]);
  30041. }),
  30042. 128
  30043. /* KEYED_FRAGMENT */
  30044. ))
  30045. ]),
  30046. vue.createCommentVNode(" 底部全选栏 "),
  30047. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30048. vue.createElementVNode("view", {
  30049. class: "select-all",
  30050. onClick: $setup.toggleSelectAll
  30051. }, [
  30052. vue.createVNode(_component_u_icon, {
  30053. name: $setup.isAllSelected ? "checkmark-circle-fill" : "checkmark-circle",
  30054. color: $setup.isAllSelected ? "#19be6b" : "#c8c9cc",
  30055. size: "28"
  30056. }, null, 8, ["name", "color"]),
  30057. vue.createElementVNode("text", { class: "select-text" }, "全选")
  30058. ]),
  30059. vue.createElementVNode(
  30060. "text",
  30061. { class: "order-count" },
  30062. "订单总数: " + vue.toDisplayString($setup.products.length),
  30063. 1
  30064. /* TEXT */
  30065. )
  30066. ])
  30067. ]);
  30068. }
  30069. 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"]]);
  30070. const _sfc_main$h = {
  30071. __name: "user-info",
  30072. setup(__props, { expose: __expose }) {
  30073. __expose();
  30074. const userInfo = vue.ref({
  30075. avatar: "/static/images/avatar.jpg",
  30076. name: "无",
  30077. gender: "无",
  30078. birthday: "无",
  30079. education: "无",
  30080. school: "无",
  30081. username: "用户账号",
  30082. account: "fxt",
  30083. createTime: "2024-06-12 12:00:00",
  30084. lastLogin: "",
  30085. company: "无",
  30086. employeeId: "无",
  30087. position: "无",
  30088. phone: "18888888888",
  30089. email: "无",
  30090. address: "无"
  30091. });
  30092. function getUserInfo() {
  30093. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  30094. if (res2.code == 200) {
  30095. userInfo.value = res2.data;
  30096. }
  30097. });
  30098. }
  30099. getUserInfo();
  30100. function setAvatar(avatarfile) {
  30101. uni.$u.http.post("/app/appUser/setAvatar?avatarfile=" + avatarfile).then((res2) => {
  30102. if (res2.code == 200) {
  30103. userInfo.value.avatar = avatarfile;
  30104. uni.showToast({
  30105. title: "头像设置成功",
  30106. icon: "success"
  30107. });
  30108. }
  30109. });
  30110. }
  30111. const handleEditAvatar = () => {
  30112. const token = uni.getStorageSync("token");
  30113. uni.chooseImage({
  30114. count: 1,
  30115. success: (res2) => {
  30116. const filePath = res2.tempFilePaths[0];
  30117. uni.uploadFile({
  30118. url: `${baseUrl}/common/upload`,
  30119. filePath,
  30120. name: "file",
  30121. header: {
  30122. "Authorization": token
  30123. },
  30124. success: (uploadRes) => {
  30125. const data = JSON.parse(uploadRes.data);
  30126. if (data.code === 200) {
  30127. setAvatar(data.url);
  30128. } else {
  30129. uni.showToast({
  30130. title: "上传失败",
  30131. icon: "none"
  30132. });
  30133. }
  30134. },
  30135. fail: () => {
  30136. uni.showToast({
  30137. title: "上传失败",
  30138. icon: "none"
  30139. });
  30140. }
  30141. });
  30142. }
  30143. });
  30144. };
  30145. const __returned__ = { userInfo, getUserInfo, setAvatar, handleEditAvatar, ref: vue.ref, get baseUrl() {
  30146. return baseUrl;
  30147. } };
  30148. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30149. return __returned__;
  30150. }
  30151. };
  30152. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  30153. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  30154. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30155. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  30156. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  30157. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  30158. vue.createCommentVNode(" 头像区域 "),
  30159. vue.createElementVNode("view", { class: "avatar-section" }, [
  30160. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  30161. vue.createElementVNode("text", null, "头像:"),
  30162. vue.createVNode(_component_u_avatar, {
  30163. size: 50,
  30164. src: $setup.userInfo.avatar
  30165. }, null, 8, ["src"]),
  30166. vue.createVNode(_component_u_button, {
  30167. type: "success",
  30168. style: { "width": "200rpx" },
  30169. size: "small",
  30170. onClick: $setup.handleEditAvatar
  30171. }, {
  30172. default: vue.withCtx(() => [
  30173. vue.createTextVNode("去修改")
  30174. ]),
  30175. _: 1
  30176. /* STABLE */
  30177. })
  30178. ])
  30179. ]),
  30180. vue.createCommentVNode(" 基本信息区域 "),
  30181. vue.createElementVNode("view", { class: "info-section" }, [
  30182. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  30183. vue.createElementVNode("view", { class: "info-card" }, [
  30184. vue.createVNode(_component_u_cell_group, { border: false }, {
  30185. default: vue.withCtx(() => [
  30186. vue.createVNode(_component_u_cell, {
  30187. title: "姓名",
  30188. value: $setup.userInfo.nickName || "无"
  30189. }, null, 8, ["value"]),
  30190. vue.createVNode(_component_u_cell, {
  30191. title: "性别",
  30192. value: $setup.userInfo.sex == 0 ? "男" : $setup.userInfo.sex == 1 ? "女" : "未知"
  30193. }, null, 8, ["value"]),
  30194. vue.createVNode(_component_u_cell, {
  30195. title: "生日",
  30196. value: $setup.userInfo.birthday || "无"
  30197. }, null, 8, ["value"]),
  30198. vue.createVNode(_component_u_cell, {
  30199. title: "学历",
  30200. value: $setup.userInfo.education || "无"
  30201. }, null, 8, ["value"]),
  30202. vue.createVNode(_component_u_cell, {
  30203. title: "毕业学校",
  30204. value: $setup.userInfo.school || "无",
  30205. border: false
  30206. }, null, 8, ["value"])
  30207. ]),
  30208. _: 1
  30209. /* STABLE */
  30210. })
  30211. ])
  30212. ]),
  30213. vue.createCommentVNode(" 账号信息区域 "),
  30214. vue.createElementVNode("view", { class: "info-section" }, [
  30215. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  30216. vue.createElementVNode("view", { class: "info-card" }, [
  30217. vue.createVNode(_component_u_cell_group, { border: false }, {
  30218. default: vue.withCtx(() => [
  30219. vue.createVNode(_component_u_cell, {
  30220. title: "账号",
  30221. value: $setup.userInfo.userName
  30222. }, null, 8, ["value"]),
  30223. vue.createVNode(_component_u_cell, {
  30224. title: "创建日期",
  30225. value: $setup.userInfo.createTime
  30226. }, null, 8, ["value"]),
  30227. vue.createVNode(_component_u_cell, {
  30228. title: "最近登录",
  30229. value: $setup.userInfo.loginDate || "--",
  30230. border: false
  30231. }, null, 8, ["value"])
  30232. ]),
  30233. _: 1
  30234. /* STABLE */
  30235. })
  30236. ])
  30237. ]),
  30238. vue.createCommentVNode(" 员工资料区域 "),
  30239. vue.createElementVNode("view", { class: "info-section" }, [
  30240. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  30241. vue.createElementVNode("view", { class: "info-card" }, [
  30242. vue.createVNode(_component_u_cell_group, { border: false }, {
  30243. default: vue.withCtx(() => [
  30244. vue.createVNode(_component_u_cell, {
  30245. title: "公司",
  30246. value: $setup.userInfo.company || "无"
  30247. }, null, 8, ["value"]),
  30248. vue.createVNode(_component_u_cell, {
  30249. title: "员工编号",
  30250. value: $setup.userInfo.employeeId || "无"
  30251. }, null, 8, ["value"]),
  30252. vue.createVNode(_component_u_cell, {
  30253. title: "职位",
  30254. value: $setup.userInfo.position || "无",
  30255. border: false
  30256. }, null, 8, ["value"])
  30257. ]),
  30258. _: 1
  30259. /* STABLE */
  30260. })
  30261. ])
  30262. ]),
  30263. vue.createCommentVNode(" 联系方式区域 "),
  30264. vue.createElementVNode("view", { class: "info-section" }, [
  30265. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  30266. vue.createElementVNode("view", { class: "info-card" }, [
  30267. vue.createVNode(_component_u_cell_group, { border: false }, {
  30268. default: vue.withCtx(() => [
  30269. vue.createVNode(_component_u_cell, {
  30270. title: "电话",
  30271. value: $setup.userInfo.phonenumber
  30272. }, null, 8, ["value"]),
  30273. vue.createVNode(_component_u_cell, {
  30274. title: "邮箱",
  30275. value: $setup.userInfo.email || "无"
  30276. }, null, 8, ["value"]),
  30277. vue.createVNode(_component_u_cell, {
  30278. title: "住址",
  30279. value: $setup.userInfo.address || "无",
  30280. border: false
  30281. }, null, 8, ["value"])
  30282. ]),
  30283. _: 1
  30284. /* STABLE */
  30285. })
  30286. ])
  30287. ])
  30288. ]);
  30289. }
  30290. 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"]]);
  30291. const _sfc_main$g = {
  30292. __name: "warehouse",
  30293. setup(__props, { expose: __expose }) {
  30294. __expose();
  30295. const showPicker = vue.ref(false);
  30296. const selectedWarehouse = vue.ref("");
  30297. const warehouseList = vue.ref([]);
  30298. const getWarehouseList = () => {
  30299. uni.$u.http.post("/app/appUser/searchGodown?name=").then((res2) => {
  30300. if (res2.code == 200) {
  30301. warehouseList.value = res2.data.filter((v) => v.useStatus == 1).map((v) => ({
  30302. text: v.godownName,
  30303. value: v.id
  30304. }));
  30305. }
  30306. });
  30307. };
  30308. getWarehouseList();
  30309. const getWarehouse = () => {
  30310. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  30311. var _a;
  30312. if (res2.code == 200) {
  30313. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  30314. }
  30315. });
  30316. };
  30317. getWarehouse();
  30318. const saveWarehouse = (godownId) => {
  30319. uni.$u.http.post("/app/appUser/bingowGodown?godownId=" + godownId).then((res2) => {
  30320. if (res2.code == 200) {
  30321. uni.showToast({
  30322. title: "设置默认仓库成功",
  30323. icon: "success"
  30324. });
  30325. }
  30326. });
  30327. };
  30328. const onConfirm = (e) => {
  30329. const [{
  30330. value: value2,
  30331. text
  30332. }] = e.value;
  30333. selectedWarehouse.value = text;
  30334. showPicker.value = false;
  30335. formatAppLog("log", "at pages/my/page/warehouse.vue:75", e, "xxxxxx");
  30336. saveWarehouse(value2);
  30337. };
  30338. const __returned__ = { showPicker, selectedWarehouse, warehouseList, getWarehouseList, getWarehouse, saveWarehouse, onConfirm, ref: vue.ref };
  30339. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30340. return __returned__;
  30341. }
  30342. };
  30343. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  30344. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30345. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  30346. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  30347. vue.createElementVNode("view", {
  30348. class: "select-wrap",
  30349. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  30350. }, [
  30351. vue.createElementVNode("text", { class: "required-label" }, "*"),
  30352. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  30353. vue.createElementVNode("view", { class: "picker-value" }, [
  30354. vue.createElementVNode(
  30355. "text",
  30356. {
  30357. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  30358. },
  30359. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  30360. 3
  30361. /* TEXT, CLASS */
  30362. ),
  30363. vue.createVNode(_component_u_icon, {
  30364. name: "arrow-right",
  30365. color: "#999",
  30366. size: "16"
  30367. })
  30368. ])
  30369. ]),
  30370. vue.createCommentVNode(" 仓库选择器 "),
  30371. vue.createVNode(_component_u_picker, {
  30372. show: $setup.showPicker,
  30373. columns: [$setup.warehouseList],
  30374. onConfirm: $setup.onConfirm,
  30375. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  30376. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  30377. title: "选择仓库",
  30378. confirmText: "确定",
  30379. cancelText: "取消"
  30380. }, null, 8, ["show", "columns"])
  30381. ]);
  30382. }
  30383. 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"]]);
  30384. const _sfc_main$f = {
  30385. __name: "school",
  30386. setup(__props, { expose: __expose }) {
  30387. __expose();
  30388. const schoolName = vue.ref("");
  30389. const schoolList = vue.ref([]);
  30390. const getSchoolList = () => {
  30391. uni.$u.http.get("/app/appConf/getPadSchoolBroadcast").then((res2) => {
  30392. if (res2.code == 200) {
  30393. schoolList.value = res2.data;
  30394. }
  30395. });
  30396. };
  30397. getSchoolList();
  30398. const handleSubmit = () => {
  30399. if (schoolList.value.length === 0) {
  30400. uni.$u.toast("请至少添加一所学校");
  30401. return;
  30402. }
  30403. uni.$u.http.post("/app/appConf/setPadSchoolBroadcast", schoolList.value).then((res2) => {
  30404. if (res2.code == 200) {
  30405. uni.showToast({
  30406. title: "设置成功",
  30407. icon: "success"
  30408. });
  30409. }
  30410. });
  30411. };
  30412. const handleAddSchool = () => {
  30413. if (!schoolName.value.trim()) {
  30414. uni.$u.toast("请输入学校名称");
  30415. return;
  30416. }
  30417. schoolList.value.push({
  30418. schoolName: schoolName.value,
  30419. id: ""
  30420. });
  30421. schoolName.value = "";
  30422. };
  30423. const handleRemoveSchool = (index2) => {
  30424. schoolList.value.splice(index2, 1);
  30425. };
  30426. const __returned__ = { schoolName, schoolList, getSchoolList, handleSubmit, handleAddSchool, handleRemoveSchool, ref: vue.ref };
  30427. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30428. return __returned__;
  30429. }
  30430. };
  30431. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  30432. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30433. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  30434. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  30435. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30436. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  30437. vue.createCommentVNode(" 输入区域 "),
  30438. vue.createElementVNode("view", { class: "input-section" }, [
  30439. vue.createElementVNode("view", { class: "input-header" }, [
  30440. vue.createElementVNode("text", { class: "required" }, "*"),
  30441. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  30442. vue.createVNode(_component_u_input, {
  30443. modelValue: $setup.schoolName,
  30444. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  30445. placeholder: "请输入一个学校名称",
  30446. border: "false",
  30447. class: "input"
  30448. }, {
  30449. suffix: vue.withCtx(() => [
  30450. vue.createVNode(_component_u_icon, {
  30451. name: "plus",
  30452. size: "24",
  30453. color: "#666",
  30454. onClick: $setup.handleAddSchool
  30455. })
  30456. ]),
  30457. _: 1
  30458. /* STABLE */
  30459. }, 8, ["modelValue"])
  30460. ])
  30461. ]),
  30462. vue.createCommentVNode(" 学校列表 "),
  30463. vue.createElementVNode("view", { class: "school-list" }, [
  30464. (vue.openBlock(true), vue.createElementBlock(
  30465. vue.Fragment,
  30466. null,
  30467. vue.renderList($setup.schoolList, (item, index2) => {
  30468. return vue.openBlock(), vue.createElementBlock("view", {
  30469. class: "school-item",
  30470. key: index2
  30471. }, [
  30472. vue.createVNode(_component_u_tag, {
  30473. text: item.schoolName,
  30474. closable: "",
  30475. size: "large"
  30476. }, null, 8, ["text"])
  30477. ]);
  30478. }),
  30479. 128
  30480. /* KEYED_FRAGMENT */
  30481. ))
  30482. ]),
  30483. vue.createCommentVNode(" 底部提交按钮 "),
  30484. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30485. vue.createVNode(_component_u_button, {
  30486. size: "large",
  30487. type: "success",
  30488. block: "",
  30489. onClick: $setup.handleSubmit
  30490. }, {
  30491. default: vue.withCtx(() => [
  30492. vue.createTextVNode("提交")
  30493. ]),
  30494. _: 1
  30495. /* STABLE */
  30496. })
  30497. ])
  30498. ]);
  30499. }
  30500. 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"]]);
  30501. const _sfc_main$e = {
  30502. __name: "audit-unfinished",
  30503. setup(__props, { expose: __expose }) {
  30504. __expose();
  30505. const list = vue.ref([]);
  30506. const updateList = (newList) => {
  30507. list.value = newList;
  30508. };
  30509. const __returned__ = { list, updateList, orderItem, pageScroll, ref: vue.ref };
  30510. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30511. return __returned__;
  30512. }
  30513. };
  30514. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  30515. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  30516. vue.createVNode($setup["pageScroll"], {
  30517. requestStr: "/app/orderinfo/myNeedCheckOrder",
  30518. onUpdateList: $setup.updateList
  30519. }, {
  30520. default: vue.withCtx(() => [
  30521. (vue.openBlock(true), vue.createElementBlock(
  30522. vue.Fragment,
  30523. null,
  30524. vue.renderList($setup.list, (item, index2) => {
  30525. return vue.openBlock(), vue.createBlock($setup["orderItem"], {
  30526. key: index2,
  30527. item
  30528. }, null, 8, ["item"]);
  30529. }),
  30530. 128
  30531. /* KEYED_FRAGMENT */
  30532. ))
  30533. ]),
  30534. _: 1
  30535. /* STABLE */
  30536. })
  30537. ]);
  30538. }
  30539. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/audit-unfinished.vue"]]);
  30540. const _sfc_main$d = {
  30541. __name: "version",
  30542. setup(__props, { expose: __expose }) {
  30543. __expose();
  30544. const userInfo = vue.reactive({
  30545. version: "v_2024050400_1",
  30546. // Example version number
  30547. updateStatus: "已经是新版本"
  30548. // Example update status
  30549. });
  30550. function checkForUpdates() {
  30551. setTimeout(() => {
  30552. {
  30553. userInfo.updateStatus = "发现新版本,正在下载...";
  30554. downloadNewVersion();
  30555. }
  30556. }, 1e3);
  30557. }
  30558. function downloadNewVersion() {
  30559. setTimeout(() => {
  30560. userInfo.updateStatus = "下载完成,准备安装";
  30561. }, 2e3);
  30562. }
  30563. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  30564. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30565. return __returned__;
  30566. }
  30567. };
  30568. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  30569. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  30570. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  30571. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  30572. vue.createVNode(_component_u_cell_group, {
  30573. border: false,
  30574. customStyle: "background:#ffffff"
  30575. }, {
  30576. default: vue.withCtx(() => [
  30577. vue.createVNode(_component_u_cell, {
  30578. title: "当前版本号(正式版)",
  30579. value: $setup.userInfo.version || "无"
  30580. }, null, 8, ["value"]),
  30581. vue.createVNode(_component_u_cell, {
  30582. title: "检测更新",
  30583. value: $setup.userInfo.updateStatus || "无",
  30584. border: false,
  30585. onClick: $setup.checkForUpdates
  30586. }, null, 8, ["value"])
  30587. ]),
  30588. _: 1
  30589. /* STABLE */
  30590. })
  30591. ]);
  30592. }
  30593. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/version.vue"]]);
  30594. const props$1 = {
  30595. props: {
  30596. // 是否为加载中状态
  30597. loading: {
  30598. type: Boolean,
  30599. default: props$E.switch.loading
  30600. },
  30601. // 是否为禁用装填
  30602. disabled: {
  30603. type: Boolean,
  30604. default: props$E.switch.disabled
  30605. },
  30606. // 开关尺寸,单位px
  30607. size: {
  30608. type: [String, Number],
  30609. default: props$E.switch.size
  30610. },
  30611. // 打开时的背景颜色
  30612. activeColor: {
  30613. type: String,
  30614. default: props$E.switch.activeColor
  30615. },
  30616. // 关闭时的背景颜色
  30617. inactiveColor: {
  30618. type: String,
  30619. default: props$E.switch.inactiveColor
  30620. },
  30621. // 通过v-model双向绑定的值
  30622. modelValue: {
  30623. type: [Boolean, String, Number],
  30624. default: props$E.switch.value
  30625. },
  30626. // switch打开时的值
  30627. activeValue: {
  30628. type: [String, Number, Boolean],
  30629. default: props$E.switch.activeValue
  30630. },
  30631. // switch关闭时的值
  30632. inactiveValue: {
  30633. type: [String, Number, Boolean],
  30634. default: props$E.switch.inactiveValue
  30635. },
  30636. // 是否开启异步变更,开启后需要手动控制输入值
  30637. asyncChange: {
  30638. type: Boolean,
  30639. default: props$E.switch.asyncChange
  30640. },
  30641. // 圆点与外边框的距离
  30642. space: {
  30643. type: [String, Number],
  30644. default: props$E.switch.space
  30645. }
  30646. }
  30647. };
  30648. const _sfc_main$c = {
  30649. name: "u-switch",
  30650. mixins: [mpMixin, mixin, props$1],
  30651. watch: {
  30652. modelValue: {
  30653. immediate: true,
  30654. handler(n) {
  30655. if (n !== this.inactiveValue && n !== this.activeValue) {
  30656. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  30657. }
  30658. }
  30659. }
  30660. },
  30661. data() {
  30662. return {
  30663. bgColor: "#ffffff"
  30664. };
  30665. },
  30666. computed: {
  30667. isActive() {
  30668. return this.modelValue === this.activeValue;
  30669. },
  30670. switchStyle() {
  30671. let style = {};
  30672. style.width = uni.$u.addUnit(this.size * 2 + 2);
  30673. style.height = uni.$u.addUnit(Number(this.size) + 2);
  30674. if (this.customInactiveColor) {
  30675. style.borderColor = "rgba(0, 0, 0, 0)";
  30676. }
  30677. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  30678. return style;
  30679. },
  30680. nodeStyle() {
  30681. let style = {};
  30682. style.width = uni.$u.addUnit(this.size - this.space);
  30683. style.height = uni.$u.addUnit(this.size - this.space);
  30684. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  30685. style.transform = `translateX(-${translateX})`;
  30686. return style;
  30687. },
  30688. bgStyle() {
  30689. let style = {};
  30690. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  30691. style.height = uni.$u.addUnit(this.size);
  30692. style.backgroundColor = this.inactiveColor;
  30693. style.transform = `scale(${this.isActive ? 0 : 1})`;
  30694. return style;
  30695. },
  30696. customInactiveColor() {
  30697. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  30698. }
  30699. },
  30700. emits: ["update:modelValue", "change"],
  30701. methods: {
  30702. clickHandler() {
  30703. if (!this.disabled && !this.loading) {
  30704. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  30705. if (!this.asyncChange) {
  30706. this.$emit("update:modelValue", oldValue);
  30707. }
  30708. this.$nextTick(() => {
  30709. this.$emit("change", oldValue);
  30710. });
  30711. }
  30712. }
  30713. }
  30714. };
  30715. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  30716. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  30717. return vue.openBlock(), vue.createElementBlock(
  30718. "view",
  30719. {
  30720. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  30721. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  30722. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  30723. },
  30724. [
  30725. vue.createElementVNode(
  30726. "view",
  30727. {
  30728. class: "u-switch__bg",
  30729. style: vue.normalizeStyle([$options.bgStyle])
  30730. },
  30731. null,
  30732. 4
  30733. /* STYLE */
  30734. ),
  30735. vue.createElementVNode(
  30736. "view",
  30737. {
  30738. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  30739. style: vue.normalizeStyle([$options.nodeStyle]),
  30740. ref: "u-switch__node"
  30741. },
  30742. [
  30743. vue.createVNode(_component_u_loading_icon, {
  30744. show: _ctx.loading,
  30745. mode: "circle",
  30746. timingFunction: "linear",
  30747. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  30748. size: _ctx.size * 0.6
  30749. }, null, 8, ["show", "color", "size"])
  30750. ],
  30751. 6
  30752. /* CLASS, STYLE */
  30753. )
  30754. ],
  30755. 6
  30756. /* CLASS, STYLE */
  30757. );
  30758. }
  30759. 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"]]);
  30760. const props = {
  30761. props: {
  30762. // 最小可选值
  30763. min: {
  30764. type: [Number, String],
  30765. default: props$E.slider.min
  30766. },
  30767. // 最大可选值
  30768. max: {
  30769. type: [Number, String],
  30770. default: props$E.slider.max
  30771. },
  30772. // 步长,取值必须大于 0,并且可被(max - min)整除
  30773. step: {
  30774. type: [Number, String],
  30775. default: props$E.slider.step
  30776. },
  30777. // 当前取值
  30778. value: {
  30779. type: [Number, String],
  30780. default: props$E.slider.value
  30781. },
  30782. // 滑块右侧已选择部分的背景色
  30783. activeColor: {
  30784. type: String,
  30785. default: props$E.slider.activeColor
  30786. },
  30787. // 滑块左侧未选择部分的背景色
  30788. inactiveColor: {
  30789. type: String,
  30790. default: props$E.slider.inactiveColor
  30791. },
  30792. // 滑块的大小,取值范围为 12 - 28
  30793. blockSize: {
  30794. type: [Number, String],
  30795. default: props$E.slider.blockSize
  30796. },
  30797. // 滑块的颜色
  30798. blockColor: {
  30799. type: String,
  30800. default: props$E.slider.blockColor
  30801. },
  30802. // 禁用状态
  30803. disabled: {
  30804. type: Boolean,
  30805. default: props$E.slider.disabled
  30806. },
  30807. // 是否显示当前的选择值
  30808. showValue: {
  30809. type: Boolean,
  30810. default: props$E.slider.showValue
  30811. }
  30812. }
  30813. };
  30814. const _sfc_main$b = {
  30815. name: "u--slider",
  30816. mixins: [mpMixin, mixin, props],
  30817. methods: {
  30818. // 拖动过程中触发
  30819. changingHandler(e) {
  30820. const {
  30821. value: value2
  30822. } = e.detail;
  30823. this.$emit("input", value2);
  30824. this.$emit("changing", value2);
  30825. },
  30826. // 滑动结束时触发
  30827. changeHandler(e) {
  30828. const {
  30829. value: value2
  30830. } = e.detail;
  30831. this.$emit("input", value2);
  30832. this.$emit("change", value2);
  30833. }
  30834. }
  30835. };
  30836. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  30837. return vue.openBlock(), vue.createElementBlock(
  30838. "view",
  30839. {
  30840. class: "u-slider",
  30841. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  30842. },
  30843. [
  30844. vue.createElementVNode("slider", {
  30845. min: _ctx.min,
  30846. max: _ctx.max,
  30847. step: _ctx.step,
  30848. value: _ctx.value,
  30849. activeColor: _ctx.activeColor,
  30850. inactiveColor: _ctx.inactiveColor,
  30851. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  30852. blockColor: _ctx.blockColor,
  30853. showValue: _ctx.showValue,
  30854. disabled: _ctx.disabled,
  30855. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  30856. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  30857. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  30858. ],
  30859. 4
  30860. /* STYLE */
  30861. );
  30862. }
  30863. 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"]]);
  30864. const _sfc_main$a = {
  30865. __name: "volume",
  30866. setup(__props, { expose: __expose }) {
  30867. __expose();
  30868. const settings = vue.ref({
  30869. audioStartSwitch: true,
  30870. audioStart: "书嗨,不辜负每一个爱书的人",
  30871. audioSpeed: 10,
  30872. audioVolume: 5,
  30873. "audioPlay": false,
  30874. "audioClick": false
  30875. });
  30876. function changeSpeed(value2) {
  30877. settings.value.audioSpeed = value2;
  30878. }
  30879. function changeVolume(value2) {
  30880. settings.value.audioVolume = value2;
  30881. }
  30882. const getVoiceBroadcast = () => {
  30883. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  30884. if (res2.code == 200) {
  30885. settings.value = res2.data;
  30886. }
  30887. });
  30888. };
  30889. getVoiceBroadcast();
  30890. const saveVoiceBroadcast = () => {
  30891. uni.$u.http.post("/app/appConf/setAudioConfig", settings.value).then((res2) => {
  30892. if (res2.code == 200) {
  30893. uni.showToast({
  30894. title: "设置成功",
  30895. icon: "success"
  30896. });
  30897. initTTS();
  30898. }
  30899. });
  30900. };
  30901. const tts = vue.ref(null);
  30902. const initTTS = () => {
  30903. let params = {
  30904. speed: settings.value.audioSpeed / 10,
  30905. // 将 0-10 转换为 0-1
  30906. pitch: settings.value.audioVolume,
  30907. // 将 0-10 转换为 0-1
  30908. volume: 1
  30909. };
  30910. tts.value = new VolumeTTS(params);
  30911. settings.value.audioStartSwitch && tts.value.speak(settings.value.audioStart);
  30912. };
  30913. function stopPlayback() {
  30914. tts.value && tts.value.stop();
  30915. uni.showToast({
  30916. title: "已停止播放",
  30917. icon: "none"
  30918. });
  30919. }
  30920. function restartApp() {
  30921. uni.showModal({
  30922. title: "提示",
  30923. content: "确定要重启应用吗?",
  30924. success: function(res2) {
  30925. if (res2.confirm) {
  30926. plus.runtime.restart();
  30927. }
  30928. }
  30929. });
  30930. }
  30931. function loadSettings() {
  30932. try {
  30933. const savedSettings = uni.getStorageSync("tts_settings");
  30934. if (savedSettings) {
  30935. Object.assign(settings, savedSettings);
  30936. }
  30937. } catch (error2) {
  30938. formatAppLog("error", "at pages/my/page/volume.vue:161", "加载设置失败:", error2);
  30939. }
  30940. }
  30941. function playClickSound2() {
  30942. if (!settings.audioClick)
  30943. return;
  30944. const audio = uni.createInnerAudioContext();
  30945. audio.src = "/static/audio/click.mp3";
  30946. audio.play();
  30947. }
  30948. vue.onMounted(async () => {
  30949. loadSettings();
  30950. });
  30951. 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() {
  30952. return VolumeTTS;
  30953. } };
  30954. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30955. return __returned__;
  30956. }
  30957. };
  30958. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  30959. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  30960. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  30961. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  30962. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  30963. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  30964. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30965. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  30966. vue.createCommentVNode(" 设置选项组 "),
  30967. vue.createElementVNode("view", { class: "settings-section" }, [
  30968. vue.createVNode(_component_u_cell_group, { border: false }, {
  30969. default: vue.withCtx(() => [
  30970. vue.createCommentVNode(" 语音播报设置 "),
  30971. vue.createVNode(_component_u_cell, {
  30972. title: "语音播报",
  30973. label: "控制除app启动提示外所有语音播报的开关",
  30974. "border-bottom": true
  30975. }, {
  30976. "right-icon": vue.withCtx(() => [
  30977. vue.createVNode(_component_u_switch, {
  30978. modelValue: $setup.settings.audioPlay,
  30979. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.audioPlay = $event),
  30980. activeColor: "#4cd964"
  30981. }, null, 8, ["modelValue"])
  30982. ]),
  30983. _: 1
  30984. /* STABLE */
  30985. }),
  30986. vue.createCommentVNode(" 点击音效设置 "),
  30987. vue.createVNode(_component_u_cell, {
  30988. title: "点击音效",
  30989. "border-bottom": true
  30990. }, {
  30991. "right-icon": vue.withCtx(() => [
  30992. vue.createVNode(_component_u_switch, {
  30993. modelValue: $setup.settings.audioClick,
  30994. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.audioClick = $event),
  30995. activeColor: "#4cd964"
  30996. }, null, 8, ["modelValue"])
  30997. ]),
  30998. _: 1
  30999. /* STABLE */
  31000. }),
  31001. vue.createCommentVNode(" 启动提示语设置 "),
  31002. vue.createVNode(_component_u_cell, {
  31003. title: "启动提示语",
  31004. "border-bottom": true
  31005. }, {
  31006. "right-icon": vue.withCtx(() => [
  31007. vue.createVNode(_component_u_switch, {
  31008. modelValue: $setup.settings.audioStartSwitch,
  31009. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.audioStartSwitch = $event),
  31010. activeColor: "#4cd964"
  31011. }, null, 8, ["modelValue"])
  31012. ]),
  31013. _: 1
  31014. /* STABLE */
  31015. })
  31016. ]),
  31017. _: 1
  31018. /* STABLE */
  31019. }),
  31020. vue.createCommentVNode(" 启动提示语输入框 "),
  31021. vue.createElementVNode("view", { class: "input-section" }, [
  31022. vue.createVNode(_component_u_textarea, {
  31023. modelValue: $setup.settings.audioStart,
  31024. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.audioStart = $event),
  31025. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  31026. height: "100"
  31027. }, null, 8, ["modelValue"])
  31028. ]),
  31029. vue.createCommentVNode(" 语速设置 "),
  31030. vue.createElementVNode("view", { class: "slider-section" }, [
  31031. vue.createElementVNode("view", { class: "slider-title" }, [
  31032. vue.createElementVNode("text", null, "设置语速"),
  31033. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  31034. ]),
  31035. vue.createVNode(_component_u_slider, {
  31036. value: $setup.settings.audioSpeed,
  31037. max: 20,
  31038. min: 5,
  31039. step: 1,
  31040. showValue: "",
  31041. onChange: $setup.changeSpeed
  31042. }, null, 8, ["value"])
  31043. ]),
  31044. vue.createCommentVNode(" 音调设置 "),
  31045. vue.createElementVNode("view", { class: "slider-section" }, [
  31046. vue.createElementVNode("view", { class: "slider-title" }, [
  31047. vue.createElementVNode("text", null, "设置音调"),
  31048. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  31049. ]),
  31050. vue.createVNode(_component_u_slider, {
  31051. value: $setup.settings.audioVolume,
  31052. max: 10,
  31053. min: 1,
  31054. step: 1,
  31055. showValue: "",
  31056. onChange: $setup.changeVolume
  31057. }, null, 8, ["value"])
  31058. ]),
  31059. vue.createCommentVNode(" 操作按钮 "),
  31060. vue.createElementVNode("view", { class: "button-group" }, [
  31061. vue.createVNode(_component_u_button, {
  31062. type: "primary",
  31063. text: "保存设置并试听",
  31064. onClick: $setup.saveVoiceBroadcast
  31065. }),
  31066. vue.createVNode(_component_u_button, {
  31067. type: "warning",
  31068. text: "停止播放",
  31069. onClick: $setup.stopPlayback,
  31070. plain: true
  31071. }),
  31072. vue.createVNode(_component_u_button, {
  31073. type: "error",
  31074. text: "重启app",
  31075. onClick: $setup.restartApp,
  31076. plain: true
  31077. })
  31078. ])
  31079. ])
  31080. ]);
  31081. }
  31082. 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"]]);
  31083. const _sfc_main$9 = {
  31084. __name: "book-display",
  31085. setup(__props, { expose: __expose }) {
  31086. __expose();
  31087. const settings = vue.reactive({
  31088. showRecyclePrice: false,
  31089. showRecycleStatus: false,
  31090. showStock: false,
  31091. showDetail: false
  31092. });
  31093. function loadSettings() {
  31094. uni.$u.http.get("/app/appConf/getBookShowConfig").then((res2) => {
  31095. if (res2.code == 200) {
  31096. Object.assign(settings, res2.data);
  31097. }
  31098. });
  31099. }
  31100. function saveSettings() {
  31101. uni.$u.http.post("/app/appConf/setBookShowConfig", settings).then((res2) => {
  31102. if (res2.code == 200) {
  31103. uni.showToast({
  31104. title: "设置已保存",
  31105. icon: "success"
  31106. });
  31107. } else {
  31108. uni.showToast({
  31109. title: "保存设置失败",
  31110. icon: "error"
  31111. });
  31112. }
  31113. });
  31114. }
  31115. vue.onMounted(() => {
  31116. loadSettings();
  31117. });
  31118. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  31119. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31120. return __returned__;
  31121. }
  31122. };
  31123. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  31124. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  31125. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  31126. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  31127. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  31128. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  31129. vue.createCommentVNode(" 设置列表 "),
  31130. vue.createVNode(_component_u_cell_group, {
  31131. border: false,
  31132. class: "settings-group"
  31133. }, {
  31134. default: vue.withCtx(() => [
  31135. vue.createVNode(_component_u_cell, {
  31136. title: "是否展示回收价",
  31137. "border-bottom": true
  31138. }, {
  31139. "right-icon": vue.withCtx(() => [
  31140. vue.createVNode(_component_u_switch, {
  31141. modelValue: $setup.settings.showRecyclePrice,
  31142. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  31143. activeColor: "#4cd964"
  31144. }, null, 8, ["modelValue"])
  31145. ]),
  31146. _: 1
  31147. /* STABLE */
  31148. }),
  31149. vue.createVNode(_component_u_cell, {
  31150. title: "是否展示回收状态",
  31151. "border-bottom": true
  31152. }, {
  31153. "right-icon": vue.withCtx(() => [
  31154. vue.createVNode(_component_u_switch, {
  31155. modelValue: $setup.settings.showRecycleStatus,
  31156. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  31157. activeColor: "#4cd964"
  31158. }, null, 8, ["modelValue"])
  31159. ]),
  31160. _: 1
  31161. /* STABLE */
  31162. }),
  31163. vue.createVNode(_component_u_cell, {
  31164. title: "是否展示库存信息",
  31165. "border-bottom": true
  31166. }, {
  31167. "right-icon": vue.withCtx(() => [
  31168. vue.createVNode(_component_u_switch, {
  31169. modelValue: $setup.settings.showStock,
  31170. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showStock = $event),
  31171. activeColor: "#4cd964"
  31172. }, null, 8, ["modelValue"])
  31173. ]),
  31174. _: 1
  31175. /* STABLE */
  31176. }),
  31177. vue.createVNode(_component_u_cell, {
  31178. title: "是否默认展开商品详情",
  31179. "border-bottom": false
  31180. }, {
  31181. "right-icon": vue.withCtx(() => [
  31182. vue.createVNode(_component_u_switch, {
  31183. modelValue: $setup.settings.showDetail,
  31184. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.showDetail = $event),
  31185. activeColor: "#4cd964"
  31186. }, null, 8, ["modelValue"])
  31187. ]),
  31188. _: 1
  31189. /* STABLE */
  31190. })
  31191. ]),
  31192. _: 1
  31193. /* STABLE */
  31194. }),
  31195. vue.createVNode(_component_u_button, {
  31196. class: "mt-40",
  31197. type: "primary",
  31198. onClick: $setup.saveSettings
  31199. }, {
  31200. default: vue.withCtx(() => [
  31201. vue.createTextVNode("保存")
  31202. ]),
  31203. _: 1
  31204. /* STABLE */
  31205. })
  31206. ]);
  31207. }
  31208. 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"]]);
  31209. const _sfc_main$8 = {
  31210. __name: "password",
  31211. setup(__props, { expose: __expose }) {
  31212. __expose();
  31213. const formRef = vue.ref(null);
  31214. const loading = vue.ref(false);
  31215. const showPassword = vue.reactive({
  31216. old: false,
  31217. new: false,
  31218. confirm: false
  31219. });
  31220. const formData = vue.reactive({
  31221. oldPassword: "",
  31222. newPassword: "",
  31223. confirmPassword: ""
  31224. });
  31225. const rules2 = {
  31226. oldPassword: [{
  31227. required: true,
  31228. message: "请输入原密码",
  31229. trigger: ["blur", "change"]
  31230. }, {
  31231. min: 6,
  31232. message: "密码长度不能小于6位",
  31233. trigger: ["blur", "change"]
  31234. }],
  31235. newPassword: [{
  31236. required: true,
  31237. message: "请输入新密码",
  31238. trigger: ["blur", "change"]
  31239. }, {
  31240. min: 6,
  31241. message: "密码长度不能小于6位",
  31242. trigger: ["blur", "change"]
  31243. }, {
  31244. validator: (rule, value2, callback) => {
  31245. if (value2 === formData.oldPassword) {
  31246. callback(new Error("新密码不能与原密码相同"));
  31247. } else {
  31248. callback();
  31249. }
  31250. },
  31251. trigger: ["blur", "change"]
  31252. }],
  31253. confirmPassword: [{
  31254. required: true,
  31255. message: "请再次输入新密码",
  31256. trigger: ["blur", "change"]
  31257. }, {
  31258. validator: (rule, value2, callback) => {
  31259. if (value2 !== formData.newPassword) {
  31260. callback(new Error("两次输入的密码不一致"));
  31261. } else {
  31262. callback();
  31263. }
  31264. },
  31265. trigger: ["blur", "change"]
  31266. }]
  31267. };
  31268. function submitForm() {
  31269. if (!formRef.value)
  31270. return;
  31271. formRef.value.validate().then((valid) => {
  31272. if (valid) {
  31273. loading.value = true;
  31274. uni.$u.http.post("/app/appUser/updatePwd", formData).then((res2) => {
  31275. if (res2.code == 200) {
  31276. uni.showModal({
  31277. title: "提示",
  31278. content: "密码修改成功,是否确定要退出重新登录?",
  31279. success: (res3) => {
  31280. if (res3.confirm) {
  31281. uni.clearStorageSync();
  31282. uni.reLaunch({
  31283. url: "/pages/login/login"
  31284. });
  31285. } else {
  31286. uni.navigateBack({
  31287. delta: 1
  31288. });
  31289. }
  31290. }
  31291. });
  31292. }
  31293. }).finally(() => {
  31294. loading.value = false;
  31295. });
  31296. }
  31297. });
  31298. }
  31299. function resetForm() {
  31300. if (!formRef.value)
  31301. return;
  31302. formRef.value.resetFields();
  31303. }
  31304. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  31305. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31306. return __returned__;
  31307. }
  31308. };
  31309. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  31310. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  31311. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  31312. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  31313. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  31314. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  31315. vue.createVNode(_component_u_form, {
  31316. model: $setup.formData,
  31317. rules: $setup.rules,
  31318. ref: "formRef",
  31319. labelPosition: "top",
  31320. borderBottom: true,
  31321. labelWidth: "300px",
  31322. "error-type": "toast"
  31323. }, {
  31324. default: vue.withCtx(() => [
  31325. vue.createVNode(_component_u_form_item, {
  31326. label: "原密码",
  31327. prop: "oldPassword",
  31328. borderBottom: ""
  31329. }, {
  31330. default: vue.withCtx(() => [
  31331. vue.createVNode(_component_u_input, {
  31332. modelValue: $setup.formData.oldPassword,
  31333. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.oldPassword = $event),
  31334. type: "password",
  31335. placeholder: "请输入原密码",
  31336. border: false
  31337. }, null, 8, ["modelValue"])
  31338. ]),
  31339. _: 1
  31340. /* STABLE */
  31341. }),
  31342. vue.createVNode(_component_u_form_item, {
  31343. label: "新密码",
  31344. prop: "newPassword",
  31345. borderBottom: ""
  31346. }, {
  31347. default: vue.withCtx(() => [
  31348. vue.createVNode(_component_u_input, {
  31349. modelValue: $setup.formData.newPassword,
  31350. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.newPassword = $event),
  31351. type: "password",
  31352. placeholder: "请输入新密码",
  31353. border: false
  31354. }, null, 8, ["modelValue"])
  31355. ]),
  31356. _: 1
  31357. /* STABLE */
  31358. }),
  31359. vue.createVNode(_component_u_form_item, {
  31360. label: "确认新密码",
  31361. prop: "confirmPassword",
  31362. borderBottom: ""
  31363. }, {
  31364. default: vue.withCtx(() => [
  31365. vue.createVNode(_component_u_input, {
  31366. modelValue: $setup.formData.confirmPassword,
  31367. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.confirmPassword = $event),
  31368. type: "password",
  31369. placeholder: "请再次输入新密码",
  31370. border: false
  31371. }, null, 8, ["modelValue"])
  31372. ]),
  31373. _: 1
  31374. /* STABLE */
  31375. })
  31376. ]),
  31377. _: 1
  31378. /* STABLE */
  31379. }, 8, ["model"]),
  31380. vue.createElementVNode("view", { class: "submit-btn" }, [
  31381. vue.createVNode(_component_u_button, {
  31382. type: "primary",
  31383. text: "修改密码",
  31384. onClick: $setup.submitForm,
  31385. loading: $setup.loading
  31386. }, null, 8, ["loading"])
  31387. ])
  31388. ]);
  31389. }
  31390. 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"]]);
  31391. const _sfc_main$7 = {};
  31392. function _sfc_render$6(_ctx, _cache) {
  31393. return vue.openBlock(), vue.createElementBlock("view");
  31394. }
  31395. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-review.vue"]]);
  31396. const _sfc_main$6 = {};
  31397. function _sfc_render$5(_ctx, _cache) {
  31398. return vue.openBlock(), vue.createElementBlock("view");
  31399. }
  31400. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-pick.vue"]]);
  31401. const _sfc_main$5 = {};
  31402. function _sfc_render$4(_ctx, _cache) {
  31403. return vue.openBlock(), vue.createElementBlock("view");
  31404. }
  31405. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-sign.vue"]]);
  31406. const _sfc_main$4 = {};
  31407. function _sfc_render$3(_ctx, _cache) {
  31408. return vue.openBlock(), vue.createElementBlock("view");
  31409. }
  31410. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-confirm.vue"]]);
  31411. const _sfc_main$3 = {};
  31412. function _sfc_render$2(_ctx, _cache) {
  31413. return vue.openBlock(), vue.createElementBlock("view");
  31414. }
  31415. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-audit.vue"]]);
  31416. const _sfc_main$2 = {};
  31417. function _sfc_render$1(_ctx, _cache) {
  31418. return vue.openBlock(), vue.createElementBlock("view");
  31419. }
  31420. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-payment.vue"]]);
  31421. const _sfc_main$1 = {};
  31422. function _sfc_render(_ctx, _cache) {
  31423. return vue.openBlock(), vue.createElementBlock("view");
  31424. }
  31425. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/receive-stat.vue"]]);
  31426. __definePage("pages/login/login", PagesLoginLogin);
  31427. __definePage("pages/index/index", PagesIndexIndex);
  31428. __definePage("pages/my/my", PagesMyMy);
  31429. __definePage("pages/order/index", PagesOrderIndex);
  31430. __definePage("pages/book/index", PagesBookIndex);
  31431. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  31432. __definePage("pages/index/express/scan", PagesIndexExpressScan);
  31433. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  31434. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  31435. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  31436. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  31437. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  31438. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  31439. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  31440. __definePage("pages/index/audit/isbn-order", PagesIndexAuditIsbnOrder);
  31441. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  31442. __definePage("pages/index/detail/user-orders", PagesIndexDetailUserOrders);
  31443. __definePage("pages/index/detail/index", PagesIndexDetailIndex);
  31444. __definePage("pages/index/detail/book-audit", PagesIndexDetailBookAudit);
  31445. __definePage("pages/index/detail/batch-audit", PagesIndexDetailBatchAudit);
  31446. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  31447. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  31448. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  31449. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  31450. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  31451. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  31452. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  31453. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  31454. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  31455. __definePage("pages/index/wms/bad-out-order", PagesIndexWmsBadOutOrder);
  31456. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  31457. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  31458. __definePage("pages/index/wms/order-query-list", PagesIndexWmsOrderQueryList);
  31459. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  31460. __definePage("pages/index/wms/location-order-list", PagesIndexWmsLocationOrderList);
  31461. __definePage("pages/index/wms/location-select", PagesIndexWmsLocationSelect);
  31462. __definePage("pages/index/wms/warehouse-select", PagesIndexWmsWarehouseSelect);
  31463. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  31464. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  31465. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  31466. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  31467. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  31468. __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
  31469. __definePage("pages/index/wms/task-detail", PagesIndexWmsTaskDetail);
  31470. __definePage("pages/index/wms/speedy-check-add", PagesIndexWmsSpeedyCheckAdd);
  31471. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  31472. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  31473. __definePage("pages/my/page/school", PagesMyPageSchool);
  31474. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  31475. __definePage("pages/my/page/version", PagesMyPageVersion);
  31476. __definePage("pages/my/page/volume", PagesMyPageVolume);
  31477. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  31478. __definePage("pages/my/page/password", PagesMyPagePassword);
  31479. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  31480. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  31481. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  31482. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  31483. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  31484. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  31485. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  31486. function useInit() {
  31487. var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
  31488. barcodeModel.initScan((ret) => {
  31489. formatAppLog("log", "at utils/useBarcodeModule.js:9", "初始化扫描", ret);
  31490. });
  31491. }
  31492. const callbackRegistry = {
  31493. activePagePath: null,
  31494. callbacks: /* @__PURE__ */ new Map()
  31495. // 使用Map存储每个页面路径对应的回调函数
  31496. };
  31497. const globalEventHandler = function(e) {
  31498. if (!callbackRegistry.activePagePath)
  31499. return;
  31500. const callback = callbackRegistry.callbacks.get(callbackRegistry.activePagePath);
  31501. if (callback) {
  31502. callback(e);
  31503. }
  31504. };
  31505. let isGlobalListenerInitialized = false;
  31506. function initGlobalListener() {
  31507. if (isGlobalListenerInitialized)
  31508. return;
  31509. const globalEvent = requireNativePlugin("globalEvent");
  31510. globalEvent.removeEventListener("iDataBarcodeEvent", globalEventHandler);
  31511. globalEvent.addEventListener("iDataBarcodeEvent", globalEventHandler);
  31512. isGlobalListenerInitialized = true;
  31513. }
  31514. function useGlobalEvent(onChange) {
  31515. initGlobalListener();
  31516. const pages2 = getCurrentPages();
  31517. const currentPage = pages2[pages2.length - 1];
  31518. const pagePath = currentPage ? currentPage.route : null;
  31519. if (!pagePath) {
  31520. formatAppLog("error", "at utils/useBarcodeModule.js:62", "无法获取当前页面路径");
  31521. return () => {
  31522. };
  31523. }
  31524. callbackRegistry.activePagePath = pagePath;
  31525. callbackRegistry.callbacks.set(pagePath, onChange);
  31526. formatAppLog("log", "at utils/useBarcodeModule.js:72", `页面 ${pagePath} 已注册扫描回调`);
  31527. return () => {
  31528. callbackRegistry.callbacks.delete(pagePath);
  31529. formatAppLog("log", "at utils/useBarcodeModule.js:77", `页面 ${pagePath} 的扫描回调已移除`);
  31530. };
  31531. }
  31532. function updateActivePageOnShow() {
  31533. const pages2 = getCurrentPages();
  31534. const currentPage = pages2[pages2.length - 1];
  31535. const pagePath = currentPage ? currentPage.route : null;
  31536. if (!pagePath) {
  31537. formatAppLog("error", "at utils/useBarcodeModule.js:91", "无法获取当前页面路径");
  31538. return;
  31539. }
  31540. callbackRegistry.activePagePath = pagePath;
  31541. formatAppLog("log", "at utils/useBarcodeModule.js:97", `当前活跃页面已更新为: ${pagePath}`);
  31542. }
  31543. function useGlobalEventRemove() {
  31544. const globalEvent = requireNativePlugin("globalEvent");
  31545. globalEvent.removeEventListener("iDataBarcodeEvent", globalEventHandler);
  31546. isGlobalListenerInitialized = false;
  31547. callbackRegistry.callbacks.clear();
  31548. callbackRegistry.activePagePath = null;
  31549. formatAppLog("log", "at utils/useBarcodeModule.js:110", "全局扫描监听器已完全移除");
  31550. }
  31551. function useRouteMonitor(onChange) {
  31552. uni.addInterceptor("navigateTo", {
  31553. invoke(e) {
  31554. var _a;
  31555. const pages2 = getCurrentPages();
  31556. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31557. onChange && onChange(e.url, from);
  31558. formatAppLog("log", "at utils/useRouteMonitor.js:18", "navigateTo", e.url, from);
  31559. return e;
  31560. }
  31561. });
  31562. uni.addInterceptor("redirectTo", {
  31563. invoke(e) {
  31564. var _a;
  31565. const pages2 = getCurrentPages();
  31566. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31567. onChange && onChange(e.url, from);
  31568. formatAppLog("log", "at utils/useRouteMonitor.js:28", "redirectTo", e.url, from);
  31569. return e;
  31570. }
  31571. });
  31572. uni.addInterceptor("reLaunch", {
  31573. invoke(e) {
  31574. var _a;
  31575. const pages2 = getCurrentPages();
  31576. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31577. onChange && onChange(e.url, from);
  31578. formatAppLog("log", "at utils/useRouteMonitor.js:38", "reLaunch", e.url, from);
  31579. return e;
  31580. }
  31581. });
  31582. uni.addInterceptor("switchTab", {
  31583. invoke(e) {
  31584. var _a;
  31585. const pages2 = getCurrentPages();
  31586. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31587. onChange && onChange(e.url, from);
  31588. formatAppLog("log", "at utils/useRouteMonitor.js:48", "switchTab", e.url, from);
  31589. return e;
  31590. }
  31591. });
  31592. }
  31593. var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  31594. var howler = {};
  31595. (function(exports) {
  31596. (function() {
  31597. var HowlerGlobal2 = function() {
  31598. this.init();
  31599. };
  31600. HowlerGlobal2.prototype = {
  31601. /**
  31602. * Initialize the global Howler object.
  31603. * @return {Howler}
  31604. */
  31605. init: function() {
  31606. var self2 = this || Howler2;
  31607. self2._counter = 1e3;
  31608. self2._html5AudioPool = [];
  31609. self2.html5PoolSize = 10;
  31610. self2._codecs = {};
  31611. self2._howls = [];
  31612. self2._muted = false;
  31613. self2._volume = 1;
  31614. self2._canPlayEvent = "canplaythrough";
  31615. self2._navigator = typeof window !== "undefined" && window.navigator ? window.navigator : null;
  31616. self2.masterGain = null;
  31617. self2.noAudio = false;
  31618. self2.usingWebAudio = true;
  31619. self2.autoSuspend = true;
  31620. self2.ctx = null;
  31621. self2.autoUnlock = true;
  31622. self2._setup();
  31623. return self2;
  31624. },
  31625. /**
  31626. * Get/set the global volume for all sounds.
  31627. * @param {Float} vol Volume from 0.0 to 1.0.
  31628. * @return {Howler/Float} Returns self or current volume.
  31629. */
  31630. volume: function(vol) {
  31631. var self2 = this || Howler2;
  31632. vol = parseFloat(vol);
  31633. if (!self2.ctx) {
  31634. setupAudioContext();
  31635. }
  31636. if (typeof vol !== "undefined" && vol >= 0 && vol <= 1) {
  31637. self2._volume = vol;
  31638. if (self2._muted) {
  31639. return self2;
  31640. }
  31641. if (self2.usingWebAudio) {
  31642. self2.masterGain.gain.setValueAtTime(vol, Howler2.ctx.currentTime);
  31643. }
  31644. for (var i = 0; i < self2._howls.length; i++) {
  31645. if (!self2._howls[i]._webAudio) {
  31646. var ids = self2._howls[i]._getSoundIds();
  31647. for (var j = 0; j < ids.length; j++) {
  31648. var sound = self2._howls[i]._soundById(ids[j]);
  31649. if (sound && sound._node) {
  31650. sound._node.volume = sound._volume * vol;
  31651. }
  31652. }
  31653. }
  31654. }
  31655. return self2;
  31656. }
  31657. return self2._volume;
  31658. },
  31659. /**
  31660. * Handle muting and unmuting globally.
  31661. * @param {Boolean} muted Is muted or not.
  31662. */
  31663. mute: function(muted) {
  31664. var self2 = this || Howler2;
  31665. if (!self2.ctx) {
  31666. setupAudioContext();
  31667. }
  31668. self2._muted = muted;
  31669. if (self2.usingWebAudio) {
  31670. self2.masterGain.gain.setValueAtTime(muted ? 0 : self2._volume, Howler2.ctx.currentTime);
  31671. }
  31672. for (var i = 0; i < self2._howls.length; i++) {
  31673. if (!self2._howls[i]._webAudio) {
  31674. var ids = self2._howls[i]._getSoundIds();
  31675. for (var j = 0; j < ids.length; j++) {
  31676. var sound = self2._howls[i]._soundById(ids[j]);
  31677. if (sound && sound._node) {
  31678. sound._node.muted = muted ? true : sound._muted;
  31679. }
  31680. }
  31681. }
  31682. }
  31683. return self2;
  31684. },
  31685. /**
  31686. * Handle stopping all sounds globally.
  31687. */
  31688. stop: function() {
  31689. var self2 = this || Howler2;
  31690. for (var i = 0; i < self2._howls.length; i++) {
  31691. self2._howls[i].stop();
  31692. }
  31693. return self2;
  31694. },
  31695. /**
  31696. * Unload and destroy all currently loaded Howl objects.
  31697. * @return {Howler}
  31698. */
  31699. unload: function() {
  31700. var self2 = this || Howler2;
  31701. for (var i = self2._howls.length - 1; i >= 0; i--) {
  31702. self2._howls[i].unload();
  31703. }
  31704. if (self2.usingWebAudio && self2.ctx && typeof self2.ctx.close !== "undefined") {
  31705. self2.ctx.close();
  31706. self2.ctx = null;
  31707. setupAudioContext();
  31708. }
  31709. return self2;
  31710. },
  31711. /**
  31712. * Check for codec support of specific extension.
  31713. * @param {String} ext Audio file extention.
  31714. * @return {Boolean}
  31715. */
  31716. codecs: function(ext) {
  31717. return (this || Howler2)._codecs[ext.replace(/^x-/, "")];
  31718. },
  31719. /**
  31720. * Setup various state values for global tracking.
  31721. * @return {Howler}
  31722. */
  31723. _setup: function() {
  31724. var self2 = this || Howler2;
  31725. self2.state = self2.ctx ? self2.ctx.state || "suspended" : "suspended";
  31726. self2._autoSuspend();
  31727. if (!self2.usingWebAudio) {
  31728. if (typeof Audio !== "undefined") {
  31729. try {
  31730. var test2 = new Audio();
  31731. if (typeof test2.oncanplaythrough === "undefined") {
  31732. self2._canPlayEvent = "canplay";
  31733. }
  31734. } catch (e) {
  31735. self2.noAudio = true;
  31736. }
  31737. } else {
  31738. self2.noAudio = true;
  31739. }
  31740. }
  31741. try {
  31742. var test2 = new Audio();
  31743. if (test2.muted) {
  31744. self2.noAudio = true;
  31745. }
  31746. } catch (e) {
  31747. }
  31748. if (!self2.noAudio) {
  31749. self2._setupCodecs();
  31750. }
  31751. return self2;
  31752. },
  31753. /**
  31754. * Check for browser support for various codecs and cache the results.
  31755. * @return {Howler}
  31756. */
  31757. _setupCodecs: function() {
  31758. var self2 = this || Howler2;
  31759. var audioTest = null;
  31760. try {
  31761. audioTest = typeof Audio !== "undefined" ? new Audio() : null;
  31762. } catch (err) {
  31763. return self2;
  31764. }
  31765. if (!audioTest || typeof audioTest.canPlayType !== "function") {
  31766. return self2;
  31767. }
  31768. var mpegTest = audioTest.canPlayType("audio/mpeg;").replace(/^no$/, "");
  31769. var ua = self2._navigator ? self2._navigator.userAgent : "";
  31770. var checkOpera = ua.match(/OPR\/(\d+)/g);
  31771. var isOldOpera = checkOpera && parseInt(checkOpera[0].split("/")[1], 10) < 33;
  31772. var checkSafari = ua.indexOf("Safari") !== -1 && ua.indexOf("Chrome") === -1;
  31773. var safariVersion = ua.match(/Version\/(.*?) /);
  31774. var isOldSafari = checkSafari && safariVersion && parseInt(safariVersion[1], 10) < 15;
  31775. self2._codecs = {
  31776. mp3: !!(!isOldOpera && (mpegTest || audioTest.canPlayType("audio/mp3;").replace(/^no$/, ""))),
  31777. mpeg: !!mpegTest,
  31778. opus: !!audioTest.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""),
  31779. ogg: !!audioTest.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
  31780. oga: !!audioTest.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
  31781. wav: !!(audioTest.canPlayType('audio/wav; codecs="1"') || audioTest.canPlayType("audio/wav")).replace(/^no$/, ""),
  31782. aac: !!audioTest.canPlayType("audio/aac;").replace(/^no$/, ""),
  31783. caf: !!audioTest.canPlayType("audio/x-caf;").replace(/^no$/, ""),
  31784. m4a: !!(audioTest.canPlayType("audio/x-m4a;") || audioTest.canPlayType("audio/m4a;") || audioTest.canPlayType("audio/aac;")).replace(/^no$/, ""),
  31785. m4b: !!(audioTest.canPlayType("audio/x-m4b;") || audioTest.canPlayType("audio/m4b;") || audioTest.canPlayType("audio/aac;")).replace(/^no$/, ""),
  31786. mp4: !!(audioTest.canPlayType("audio/x-mp4;") || audioTest.canPlayType("audio/mp4;") || audioTest.canPlayType("audio/aac;")).replace(/^no$/, ""),
  31787. weba: !!(!isOldSafari && audioTest.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")),
  31788. webm: !!(!isOldSafari && audioTest.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")),
  31789. dolby: !!audioTest.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ""),
  31790. flac: !!(audioTest.canPlayType("audio/x-flac;") || audioTest.canPlayType("audio/flac;")).replace(/^no$/, "")
  31791. };
  31792. return self2;
  31793. },
  31794. /**
  31795. * Some browsers/devices will only allow audio to be played after a user interaction.
  31796. * Attempt to automatically unlock audio on the first user interaction.
  31797. * Concept from: http://paulbakaus.com/tutorials/html5/web-audio-on-ios/
  31798. * @return {Howler}
  31799. */
  31800. _unlockAudio: function() {
  31801. var self2 = this || Howler2;
  31802. if (self2._audioUnlocked || !self2.ctx) {
  31803. return;
  31804. }
  31805. self2._audioUnlocked = false;
  31806. self2.autoUnlock = false;
  31807. if (!self2._mobileUnloaded && self2.ctx.sampleRate !== 44100) {
  31808. self2._mobileUnloaded = true;
  31809. self2.unload();
  31810. }
  31811. self2._scratchBuffer = self2.ctx.createBuffer(1, 1, 22050);
  31812. var unlock = function(e) {
  31813. while (self2._html5AudioPool.length < self2.html5PoolSize) {
  31814. try {
  31815. var audioNode = new Audio();
  31816. audioNode._unlocked = true;
  31817. self2._releaseHtml5Audio(audioNode);
  31818. } catch (e2) {
  31819. self2.noAudio = true;
  31820. break;
  31821. }
  31822. }
  31823. for (var i = 0; i < self2._howls.length; i++) {
  31824. if (!self2._howls[i]._webAudio) {
  31825. var ids = self2._howls[i]._getSoundIds();
  31826. for (var j = 0; j < ids.length; j++) {
  31827. var sound = self2._howls[i]._soundById(ids[j]);
  31828. if (sound && sound._node && !sound._node._unlocked) {
  31829. sound._node._unlocked = true;
  31830. sound._node.load();
  31831. }
  31832. }
  31833. }
  31834. }
  31835. self2._autoResume();
  31836. var source = self2.ctx.createBufferSource();
  31837. source.buffer = self2._scratchBuffer;
  31838. source.connect(self2.ctx.destination);
  31839. if (typeof source.start === "undefined") {
  31840. source.noteOn(0);
  31841. } else {
  31842. source.start(0);
  31843. }
  31844. if (typeof self2.ctx.resume === "function") {
  31845. self2.ctx.resume();
  31846. }
  31847. source.onended = function() {
  31848. source.disconnect(0);
  31849. self2._audioUnlocked = true;
  31850. document.removeEventListener("touchstart", unlock, true);
  31851. document.removeEventListener("touchend", unlock, true);
  31852. document.removeEventListener("click", unlock, true);
  31853. document.removeEventListener("keydown", unlock, true);
  31854. for (var i2 = 0; i2 < self2._howls.length; i2++) {
  31855. self2._howls[i2]._emit("unlock");
  31856. }
  31857. };
  31858. };
  31859. document.addEventListener("touchstart", unlock, true);
  31860. document.addEventListener("touchend", unlock, true);
  31861. document.addEventListener("click", unlock, true);
  31862. document.addEventListener("keydown", unlock, true);
  31863. return self2;
  31864. },
  31865. /**
  31866. * Get an unlocked HTML5 Audio object from the pool. If none are left,
  31867. * return a new Audio object and throw a warning.
  31868. * @return {Audio} HTML5 Audio object.
  31869. */
  31870. _obtainHtml5Audio: function() {
  31871. var self2 = this || Howler2;
  31872. if (self2._html5AudioPool.length) {
  31873. return self2._html5AudioPool.pop();
  31874. }
  31875. var testPlay = new Audio().play();
  31876. if (testPlay && typeof Promise !== "undefined" && (testPlay instanceof Promise || typeof testPlay.then === "function")) {
  31877. testPlay.catch(function() {
  31878. formatAppLog("warn", "at node_modules/howler/dist/howler.js:434", "HTML5 Audio pool exhausted, returning potentially locked audio object.");
  31879. });
  31880. }
  31881. return new Audio();
  31882. },
  31883. /**
  31884. * Return an activated HTML5 Audio object to the pool.
  31885. * @return {Howler}
  31886. */
  31887. _releaseHtml5Audio: function(audio) {
  31888. var self2 = this || Howler2;
  31889. if (audio._unlocked) {
  31890. self2._html5AudioPool.push(audio);
  31891. }
  31892. return self2;
  31893. },
  31894. /**
  31895. * Automatically suspend the Web Audio AudioContext after no sound has played for 30 seconds.
  31896. * This saves processing/energy and fixes various browser-specific bugs with audio getting stuck.
  31897. * @return {Howler}
  31898. */
  31899. _autoSuspend: function() {
  31900. var self2 = this;
  31901. if (!self2.autoSuspend || !self2.ctx || typeof self2.ctx.suspend === "undefined" || !Howler2.usingWebAudio) {
  31902. return;
  31903. }
  31904. for (var i = 0; i < self2._howls.length; i++) {
  31905. if (self2._howls[i]._webAudio) {
  31906. for (var j = 0; j < self2._howls[i]._sounds.length; j++) {
  31907. if (!self2._howls[i]._sounds[j]._paused) {
  31908. return self2;
  31909. }
  31910. }
  31911. }
  31912. }
  31913. if (self2._suspendTimer) {
  31914. clearTimeout(self2._suspendTimer);
  31915. }
  31916. self2._suspendTimer = setTimeout(function() {
  31917. if (!self2.autoSuspend) {
  31918. return;
  31919. }
  31920. self2._suspendTimer = null;
  31921. self2.state = "suspending";
  31922. var handleSuspension = function() {
  31923. self2.state = "suspended";
  31924. if (self2._resumeAfterSuspend) {
  31925. delete self2._resumeAfterSuspend;
  31926. self2._autoResume();
  31927. }
  31928. };
  31929. self2.ctx.suspend().then(handleSuspension, handleSuspension);
  31930. }, 3e4);
  31931. return self2;
  31932. },
  31933. /**
  31934. * Automatically resume the Web Audio AudioContext when a new sound is played.
  31935. * @return {Howler}
  31936. */
  31937. _autoResume: function() {
  31938. var self2 = this;
  31939. if (!self2.ctx || typeof self2.ctx.resume === "undefined" || !Howler2.usingWebAudio) {
  31940. return;
  31941. }
  31942. if (self2.state === "running" && self2.ctx.state !== "interrupted" && self2._suspendTimer) {
  31943. clearTimeout(self2._suspendTimer);
  31944. self2._suspendTimer = null;
  31945. } else if (self2.state === "suspended" || self2.state === "running" && self2.ctx.state === "interrupted") {
  31946. self2.ctx.resume().then(function() {
  31947. self2.state = "running";
  31948. for (var i = 0; i < self2._howls.length; i++) {
  31949. self2._howls[i]._emit("resume");
  31950. }
  31951. });
  31952. if (self2._suspendTimer) {
  31953. clearTimeout(self2._suspendTimer);
  31954. self2._suspendTimer = null;
  31955. }
  31956. } else if (self2.state === "suspending") {
  31957. self2._resumeAfterSuspend = true;
  31958. }
  31959. return self2;
  31960. }
  31961. };
  31962. var Howler2 = new HowlerGlobal2();
  31963. var Howl2 = function(o) {
  31964. var self2 = this;
  31965. if (!o.src || o.src.length === 0) {
  31966. formatAppLog("error", "at node_modules/howler/dist/howler.js:561", "An array of source files must be passed with any new Howl.");
  31967. return;
  31968. }
  31969. self2.init(o);
  31970. };
  31971. Howl2.prototype = {
  31972. /**
  31973. * Initialize a new Howl group object.
  31974. * @param {Object} o Passed in properties for this group.
  31975. * @return {Howl}
  31976. */
  31977. init: function(o) {
  31978. var self2 = this;
  31979. if (!Howler2.ctx) {
  31980. setupAudioContext();
  31981. }
  31982. self2._autoplay = o.autoplay || false;
  31983. self2._format = typeof o.format !== "string" ? o.format : [o.format];
  31984. self2._html5 = o.html5 || false;
  31985. self2._muted = o.mute || false;
  31986. self2._loop = o.loop || false;
  31987. self2._pool = o.pool || 5;
  31988. self2._preload = typeof o.preload === "boolean" || o.preload === "metadata" ? o.preload : true;
  31989. self2._rate = o.rate || 1;
  31990. self2._sprite = o.sprite || {};
  31991. self2._src = typeof o.src !== "string" ? o.src : [o.src];
  31992. self2._volume = o.volume !== void 0 ? o.volume : 1;
  31993. self2._xhr = {
  31994. method: o.xhr && o.xhr.method ? o.xhr.method : "GET",
  31995. headers: o.xhr && o.xhr.headers ? o.xhr.headers : null,
  31996. withCredentials: o.xhr && o.xhr.withCredentials ? o.xhr.withCredentials : false
  31997. };
  31998. self2._duration = 0;
  31999. self2._state = "unloaded";
  32000. self2._sounds = [];
  32001. self2._endTimers = {};
  32002. self2._queue = [];
  32003. self2._playLock = false;
  32004. self2._onend = o.onend ? [{ fn: o.onend }] : [];
  32005. self2._onfade = o.onfade ? [{ fn: o.onfade }] : [];
  32006. self2._onload = o.onload ? [{ fn: o.onload }] : [];
  32007. self2._onloaderror = o.onloaderror ? [{ fn: o.onloaderror }] : [];
  32008. self2._onplayerror = o.onplayerror ? [{ fn: o.onplayerror }] : [];
  32009. self2._onpause = o.onpause ? [{ fn: o.onpause }] : [];
  32010. self2._onplay = o.onplay ? [{ fn: o.onplay }] : [];
  32011. self2._onstop = o.onstop ? [{ fn: o.onstop }] : [];
  32012. self2._onmute = o.onmute ? [{ fn: o.onmute }] : [];
  32013. self2._onvolume = o.onvolume ? [{ fn: o.onvolume }] : [];
  32014. self2._onrate = o.onrate ? [{ fn: o.onrate }] : [];
  32015. self2._onseek = o.onseek ? [{ fn: o.onseek }] : [];
  32016. self2._onunlock = o.onunlock ? [{ fn: o.onunlock }] : [];
  32017. self2._onresume = [];
  32018. self2._webAudio = Howler2.usingWebAudio && !self2._html5;
  32019. if (typeof Howler2.ctx !== "undefined" && Howler2.ctx && Howler2.autoUnlock) {
  32020. Howler2._unlockAudio();
  32021. }
  32022. Howler2._howls.push(self2);
  32023. if (self2._autoplay) {
  32024. self2._queue.push({
  32025. event: "play",
  32026. action: function() {
  32027. self2.play();
  32028. }
  32029. });
  32030. }
  32031. if (self2._preload && self2._preload !== "none") {
  32032. self2.load();
  32033. }
  32034. return self2;
  32035. },
  32036. /**
  32037. * Load the audio file.
  32038. * @return {Howler}
  32039. */
  32040. load: function() {
  32041. var self2 = this;
  32042. var url2 = null;
  32043. if (Howler2.noAudio) {
  32044. self2._emit("loaderror", null, "No audio support.");
  32045. return;
  32046. }
  32047. if (typeof self2._src === "string") {
  32048. self2._src = [self2._src];
  32049. }
  32050. for (var i = 0; i < self2._src.length; i++) {
  32051. var ext, str;
  32052. if (self2._format && self2._format[i]) {
  32053. ext = self2._format[i];
  32054. } else {
  32055. str = self2._src[i];
  32056. if (typeof str !== "string") {
  32057. self2._emit("loaderror", null, "Non-string found in selected audio sources - ignoring.");
  32058. continue;
  32059. }
  32060. ext = /^data:audio\/([^;,]+);/i.exec(str);
  32061. if (!ext) {
  32062. ext = /\.([^.]+)$/.exec(str.split("?", 1)[0]);
  32063. }
  32064. if (ext) {
  32065. ext = ext[1].toLowerCase();
  32066. }
  32067. }
  32068. if (!ext) {
  32069. formatAppLog("warn", "at node_modules/howler/dist/howler.js:699", 'No file extension was found. Consider using the "format" property or specify an extension.');
  32070. }
  32071. if (ext && Howler2.codecs(ext)) {
  32072. url2 = self2._src[i];
  32073. break;
  32074. }
  32075. }
  32076. if (!url2) {
  32077. self2._emit("loaderror", null, "No codec support for selected audio sources.");
  32078. return;
  32079. }
  32080. self2._src = url2;
  32081. self2._state = "loading";
  32082. if (window.location.protocol === "https:" && url2.slice(0, 5) === "http:") {
  32083. self2._html5 = true;
  32084. self2._webAudio = false;
  32085. }
  32086. new Sound2(self2);
  32087. if (self2._webAudio) {
  32088. loadBuffer(self2);
  32089. }
  32090. return self2;
  32091. },
  32092. /**
  32093. * Play a sound or resume previous playback.
  32094. * @param {String/Number} sprite Sprite name for sprite playback or sound id to continue previous.
  32095. * @param {Boolean} internal Internal Use: true prevents event firing.
  32096. * @return {Number} Sound ID.
  32097. */
  32098. play: function(sprite, internal) {
  32099. var self2 = this;
  32100. var id = null;
  32101. if (typeof sprite === "number") {
  32102. id = sprite;
  32103. sprite = null;
  32104. } else if (typeof sprite === "string" && self2._state === "loaded" && !self2._sprite[sprite]) {
  32105. return null;
  32106. } else if (typeof sprite === "undefined") {
  32107. sprite = "__default";
  32108. if (!self2._playLock) {
  32109. var num = 0;
  32110. for (var i = 0; i < self2._sounds.length; i++) {
  32111. if (self2._sounds[i]._paused && !self2._sounds[i]._ended) {
  32112. num++;
  32113. id = self2._sounds[i]._id;
  32114. }
  32115. }
  32116. if (num === 1) {
  32117. sprite = null;
  32118. } else {
  32119. id = null;
  32120. }
  32121. }
  32122. }
  32123. var sound = id ? self2._soundById(id) : self2._inactiveSound();
  32124. if (!sound) {
  32125. return null;
  32126. }
  32127. if (id && !sprite) {
  32128. sprite = sound._sprite || "__default";
  32129. }
  32130. if (self2._state !== "loaded") {
  32131. sound._sprite = sprite;
  32132. sound._ended = false;
  32133. var soundId = sound._id;
  32134. self2._queue.push({
  32135. event: "play",
  32136. action: function() {
  32137. self2.play(soundId);
  32138. }
  32139. });
  32140. return soundId;
  32141. }
  32142. if (id && !sound._paused) {
  32143. if (!internal) {
  32144. self2._loadQueue("play");
  32145. }
  32146. return sound._id;
  32147. }
  32148. if (self2._webAudio) {
  32149. Howler2._autoResume();
  32150. }
  32151. var seek = Math.max(0, sound._seek > 0 ? sound._seek : self2._sprite[sprite][0] / 1e3);
  32152. var duration = Math.max(0, (self2._sprite[sprite][0] + self2._sprite[sprite][1]) / 1e3 - seek);
  32153. var timeout2 = duration * 1e3 / Math.abs(sound._rate);
  32154. var start = self2._sprite[sprite][0] / 1e3;
  32155. var stop = (self2._sprite[sprite][0] + self2._sprite[sprite][1]) / 1e3;
  32156. sound._sprite = sprite;
  32157. sound._ended = false;
  32158. var setParams = function() {
  32159. sound._paused = false;
  32160. sound._seek = seek;
  32161. sound._start = start;
  32162. sound._stop = stop;
  32163. sound._loop = !!(sound._loop || self2._sprite[sprite][2]);
  32164. };
  32165. if (seek >= stop) {
  32166. self2._ended(sound);
  32167. return;
  32168. }
  32169. var node = sound._node;
  32170. if (self2._webAudio) {
  32171. var playWebAudio = function() {
  32172. self2._playLock = false;
  32173. setParams();
  32174. self2._refreshBuffer(sound);
  32175. var vol = sound._muted || self2._muted ? 0 : sound._volume;
  32176. node.gain.setValueAtTime(vol, Howler2.ctx.currentTime);
  32177. sound._playStart = Howler2.ctx.currentTime;
  32178. if (typeof node.bufferSource.start === "undefined") {
  32179. sound._loop ? node.bufferSource.noteGrainOn(0, seek, 86400) : node.bufferSource.noteGrainOn(0, seek, duration);
  32180. } else {
  32181. sound._loop ? node.bufferSource.start(0, seek, 86400) : node.bufferSource.start(0, seek, duration);
  32182. }
  32183. if (timeout2 !== Infinity) {
  32184. self2._endTimers[sound._id] = setTimeout(self2._ended.bind(self2, sound), timeout2);
  32185. }
  32186. if (!internal) {
  32187. setTimeout(function() {
  32188. self2._emit("play", sound._id);
  32189. self2._loadQueue();
  32190. }, 0);
  32191. }
  32192. };
  32193. if (Howler2.state === "running" && Howler2.ctx.state !== "interrupted") {
  32194. playWebAudio();
  32195. } else {
  32196. self2._playLock = true;
  32197. self2.once("resume", playWebAudio);
  32198. self2._clearTimer(sound._id);
  32199. }
  32200. } else {
  32201. var playHtml5 = function() {
  32202. node.currentTime = seek;
  32203. node.muted = sound._muted || self2._muted || Howler2._muted || node.muted;
  32204. node.volume = sound._volume * Howler2.volume();
  32205. node.playbackRate = sound._rate;
  32206. try {
  32207. var play = node.play();
  32208. if (play && typeof Promise !== "undefined" && (play instanceof Promise || typeof play.then === "function")) {
  32209. self2._playLock = true;
  32210. setParams();
  32211. play.then(function() {
  32212. self2._playLock = false;
  32213. node._unlocked = true;
  32214. if (!internal) {
  32215. self2._emit("play", sound._id);
  32216. } else {
  32217. self2._loadQueue();
  32218. }
  32219. }).catch(function() {
  32220. self2._playLock = false;
  32221. 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.");
  32222. sound._ended = true;
  32223. sound._paused = true;
  32224. });
  32225. } else if (!internal) {
  32226. self2._playLock = false;
  32227. setParams();
  32228. self2._emit("play", sound._id);
  32229. }
  32230. node.playbackRate = sound._rate;
  32231. if (node.paused) {
  32232. 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.");
  32233. return;
  32234. }
  32235. if (sprite !== "__default" || sound._loop) {
  32236. self2._endTimers[sound._id] = setTimeout(self2._ended.bind(self2, sound), timeout2);
  32237. } else {
  32238. self2._endTimers[sound._id] = function() {
  32239. self2._ended(sound);
  32240. node.removeEventListener("ended", self2._endTimers[sound._id], false);
  32241. };
  32242. node.addEventListener("ended", self2._endTimers[sound._id], false);
  32243. }
  32244. } catch (err) {
  32245. self2._emit("playerror", sound._id, err);
  32246. }
  32247. };
  32248. if (node.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA") {
  32249. node.src = self2._src;
  32250. node.load();
  32251. }
  32252. var loadedNoReadyState = window && window.ejecta || !node.readyState && Howler2._navigator.isCocoonJS;
  32253. if (node.readyState >= 3 || loadedNoReadyState) {
  32254. playHtml5();
  32255. } else {
  32256. self2._playLock = true;
  32257. self2._state = "loading";
  32258. var listener = function() {
  32259. self2._state = "loaded";
  32260. playHtml5();
  32261. node.removeEventListener(Howler2._canPlayEvent, listener, false);
  32262. };
  32263. node.addEventListener(Howler2._canPlayEvent, listener, false);
  32264. self2._clearTimer(sound._id);
  32265. }
  32266. }
  32267. return sound._id;
  32268. },
  32269. /**
  32270. * Pause playback and save current position.
  32271. * @param {Number} id The sound ID (empty to pause all in group).
  32272. * @return {Howl}
  32273. */
  32274. pause: function(id) {
  32275. var self2 = this;
  32276. if (self2._state !== "loaded" || self2._playLock) {
  32277. self2._queue.push({
  32278. event: "pause",
  32279. action: function() {
  32280. self2.pause(id);
  32281. }
  32282. });
  32283. return self2;
  32284. }
  32285. var ids = self2._getSoundIds(id);
  32286. for (var i = 0; i < ids.length; i++) {
  32287. self2._clearTimer(ids[i]);
  32288. var sound = self2._soundById(ids[i]);
  32289. if (sound && !sound._paused) {
  32290. sound._seek = self2.seek(ids[i]);
  32291. sound._rateSeek = 0;
  32292. sound._paused = true;
  32293. self2._stopFade(ids[i]);
  32294. if (sound._node) {
  32295. if (self2._webAudio) {
  32296. if (!sound._node.bufferSource) {
  32297. continue;
  32298. }
  32299. if (typeof sound._node.bufferSource.stop === "undefined") {
  32300. sound._node.bufferSource.noteOff(0);
  32301. } else {
  32302. sound._node.bufferSource.stop(0);
  32303. }
  32304. self2._cleanBuffer(sound._node);
  32305. } else if (!isNaN(sound._node.duration) || sound._node.duration === Infinity) {
  32306. sound._node.pause();
  32307. }
  32308. }
  32309. }
  32310. if (!arguments[1]) {
  32311. self2._emit("pause", sound ? sound._id : null);
  32312. }
  32313. }
  32314. return self2;
  32315. },
  32316. /**
  32317. * Stop playback and reset to start.
  32318. * @param {Number} id The sound ID (empty to stop all in group).
  32319. * @param {Boolean} internal Internal Use: true prevents event firing.
  32320. * @return {Howl}
  32321. */
  32322. stop: function(id, internal) {
  32323. var self2 = this;
  32324. if (self2._state !== "loaded" || self2._playLock) {
  32325. self2._queue.push({
  32326. event: "stop",
  32327. action: function() {
  32328. self2.stop(id);
  32329. }
  32330. });
  32331. return self2;
  32332. }
  32333. var ids = self2._getSoundIds(id);
  32334. for (var i = 0; i < ids.length; i++) {
  32335. self2._clearTimer(ids[i]);
  32336. var sound = self2._soundById(ids[i]);
  32337. if (sound) {
  32338. sound._seek = sound._start || 0;
  32339. sound._rateSeek = 0;
  32340. sound._paused = true;
  32341. sound._ended = true;
  32342. self2._stopFade(ids[i]);
  32343. if (sound._node) {
  32344. if (self2._webAudio) {
  32345. if (sound._node.bufferSource) {
  32346. if (typeof sound._node.bufferSource.stop === "undefined") {
  32347. sound._node.bufferSource.noteOff(0);
  32348. } else {
  32349. sound._node.bufferSource.stop(0);
  32350. }
  32351. self2._cleanBuffer(sound._node);
  32352. }
  32353. } else if (!isNaN(sound._node.duration) || sound._node.duration === Infinity) {
  32354. sound._node.currentTime = sound._start || 0;
  32355. sound._node.pause();
  32356. if (sound._node.duration === Infinity) {
  32357. self2._clearSound(sound._node);
  32358. }
  32359. }
  32360. }
  32361. if (!internal) {
  32362. self2._emit("stop", sound._id);
  32363. }
  32364. }
  32365. }
  32366. return self2;
  32367. },
  32368. /**
  32369. * Mute/unmute a single sound or all sounds in this Howl group.
  32370. * @param {Boolean} muted Set to true to mute and false to unmute.
  32371. * @param {Number} id The sound ID to update (omit to mute/unmute all).
  32372. * @return {Howl}
  32373. */
  32374. mute: function(muted, id) {
  32375. var self2 = this;
  32376. if (self2._state !== "loaded" || self2._playLock) {
  32377. self2._queue.push({
  32378. event: "mute",
  32379. action: function() {
  32380. self2.mute(muted, id);
  32381. }
  32382. });
  32383. return self2;
  32384. }
  32385. if (typeof id === "undefined") {
  32386. if (typeof muted === "boolean") {
  32387. self2._muted = muted;
  32388. } else {
  32389. return self2._muted;
  32390. }
  32391. }
  32392. var ids = self2._getSoundIds(id);
  32393. for (var i = 0; i < ids.length; i++) {
  32394. var sound = self2._soundById(ids[i]);
  32395. if (sound) {
  32396. sound._muted = muted;
  32397. if (sound._interval) {
  32398. self2._stopFade(sound._id);
  32399. }
  32400. if (self2._webAudio && sound._node) {
  32401. sound._node.gain.setValueAtTime(muted ? 0 : sound._volume, Howler2.ctx.currentTime);
  32402. } else if (sound._node) {
  32403. sound._node.muted = Howler2._muted ? true : muted;
  32404. }
  32405. self2._emit("mute", sound._id);
  32406. }
  32407. }
  32408. return self2;
  32409. },
  32410. /**
  32411. * Get/set the volume of this sound or of the Howl group. This method can optionally take 0, 1 or 2 arguments.
  32412. * volume() -> Returns the group's volume value.
  32413. * volume(id) -> Returns the sound id's current volume.
  32414. * volume(vol) -> Sets the volume of all sounds in this Howl group.
  32415. * volume(vol, id) -> Sets the volume of passed sound id.
  32416. * @return {Howl/Number} Returns self or current volume.
  32417. */
  32418. volume: function() {
  32419. var self2 = this;
  32420. var args = arguments;
  32421. var vol, id;
  32422. if (args.length === 0) {
  32423. return self2._volume;
  32424. } else if (args.length === 1 || args.length === 2 && typeof args[1] === "undefined") {
  32425. var ids = self2._getSoundIds();
  32426. var index2 = ids.indexOf(args[0]);
  32427. if (index2 >= 0) {
  32428. id = parseInt(args[0], 10);
  32429. } else {
  32430. vol = parseFloat(args[0]);
  32431. }
  32432. } else if (args.length >= 2) {
  32433. vol = parseFloat(args[0]);
  32434. id = parseInt(args[1], 10);
  32435. }
  32436. var sound;
  32437. if (typeof vol !== "undefined" && vol >= 0 && vol <= 1) {
  32438. if (self2._state !== "loaded" || self2._playLock) {
  32439. self2._queue.push({
  32440. event: "volume",
  32441. action: function() {
  32442. self2.volume.apply(self2, args);
  32443. }
  32444. });
  32445. return self2;
  32446. }
  32447. if (typeof id === "undefined") {
  32448. self2._volume = vol;
  32449. }
  32450. id = self2._getSoundIds(id);
  32451. for (var i = 0; i < id.length; i++) {
  32452. sound = self2._soundById(id[i]);
  32453. if (sound) {
  32454. sound._volume = vol;
  32455. if (!args[2]) {
  32456. self2._stopFade(id[i]);
  32457. }
  32458. if (self2._webAudio && sound._node && !sound._muted) {
  32459. sound._node.gain.setValueAtTime(vol, Howler2.ctx.currentTime);
  32460. } else if (sound._node && !sound._muted) {
  32461. sound._node.volume = vol * Howler2.volume();
  32462. }
  32463. self2._emit("volume", sound._id);
  32464. }
  32465. }
  32466. } else {
  32467. sound = id ? self2._soundById(id) : self2._sounds[0];
  32468. return sound ? sound._volume : 0;
  32469. }
  32470. return self2;
  32471. },
  32472. /**
  32473. * Fade a currently playing sound between two volumes (if no id is passed, all sounds will fade).
  32474. * @param {Number} from The value to fade from (0.0 to 1.0).
  32475. * @param {Number} to The volume to fade to (0.0 to 1.0).
  32476. * @param {Number} len Time in milliseconds to fade.
  32477. * @param {Number} id The sound id (omit to fade all sounds).
  32478. * @return {Howl}
  32479. */
  32480. fade: function(from, to, len, id) {
  32481. var self2 = this;
  32482. if (self2._state !== "loaded" || self2._playLock) {
  32483. self2._queue.push({
  32484. event: "fade",
  32485. action: function() {
  32486. self2.fade(from, to, len, id);
  32487. }
  32488. });
  32489. return self2;
  32490. }
  32491. from = Math.min(Math.max(0, parseFloat(from)), 1);
  32492. to = Math.min(Math.max(0, parseFloat(to)), 1);
  32493. len = parseFloat(len);
  32494. self2.volume(from, id);
  32495. var ids = self2._getSoundIds(id);
  32496. for (var i = 0; i < ids.length; i++) {
  32497. var sound = self2._soundById(ids[i]);
  32498. if (sound) {
  32499. if (!id) {
  32500. self2._stopFade(ids[i]);
  32501. }
  32502. if (self2._webAudio && !sound._muted) {
  32503. var currentTime = Howler2.ctx.currentTime;
  32504. var end = currentTime + len / 1e3;
  32505. sound._volume = from;
  32506. sound._node.gain.setValueAtTime(from, currentTime);
  32507. sound._node.gain.linearRampToValueAtTime(to, end);
  32508. }
  32509. self2._startFadeInterval(sound, from, to, len, ids[i], typeof id === "undefined");
  32510. }
  32511. }
  32512. return self2;
  32513. },
  32514. /**
  32515. * Starts the internal interval to fade a sound.
  32516. * @param {Object} sound Reference to sound to fade.
  32517. * @param {Number} from The value to fade from (0.0 to 1.0).
  32518. * @param {Number} to The volume to fade to (0.0 to 1.0).
  32519. * @param {Number} len Time in milliseconds to fade.
  32520. * @param {Number} id The sound id to fade.
  32521. * @param {Boolean} isGroup If true, set the volume on the group.
  32522. */
  32523. _startFadeInterval: function(sound, from, to, len, id, isGroup) {
  32524. var self2 = this;
  32525. var vol = from;
  32526. var diff = to - from;
  32527. var steps = Math.abs(diff / 0.01);
  32528. var stepLen = Math.max(4, steps > 0 ? len / steps : len);
  32529. var lastTick = Date.now();
  32530. sound._fadeTo = to;
  32531. sound._interval = setInterval(function() {
  32532. var tick = (Date.now() - lastTick) / len;
  32533. lastTick = Date.now();
  32534. vol += diff * tick;
  32535. vol = Math.round(vol * 100) / 100;
  32536. if (diff < 0) {
  32537. vol = Math.max(to, vol);
  32538. } else {
  32539. vol = Math.min(to, vol);
  32540. }
  32541. if (self2._webAudio) {
  32542. sound._volume = vol;
  32543. } else {
  32544. self2.volume(vol, sound._id, true);
  32545. }
  32546. if (isGroup) {
  32547. self2._volume = vol;
  32548. }
  32549. if (to < from && vol <= to || to > from && vol >= to) {
  32550. clearInterval(sound._interval);
  32551. sound._interval = null;
  32552. sound._fadeTo = null;
  32553. self2.volume(to, sound._id);
  32554. self2._emit("fade", sound._id);
  32555. }
  32556. }, stepLen);
  32557. },
  32558. /**
  32559. * Internal method that stops the currently playing fade when
  32560. * a new fade starts, volume is changed or the sound is stopped.
  32561. * @param {Number} id The sound id.
  32562. * @return {Howl}
  32563. */
  32564. _stopFade: function(id) {
  32565. var self2 = this;
  32566. var sound = self2._soundById(id);
  32567. if (sound && sound._interval) {
  32568. if (self2._webAudio) {
  32569. sound._node.gain.cancelScheduledValues(Howler2.ctx.currentTime);
  32570. }
  32571. clearInterval(sound._interval);
  32572. sound._interval = null;
  32573. self2.volume(sound._fadeTo, id);
  32574. sound._fadeTo = null;
  32575. self2._emit("fade", id);
  32576. }
  32577. return self2;
  32578. },
  32579. /**
  32580. * Get/set the loop parameter on a sound. This method can optionally take 0, 1 or 2 arguments.
  32581. * loop() -> Returns the group's loop value.
  32582. * loop(id) -> Returns the sound id's loop value.
  32583. * loop(loop) -> Sets the loop value for all sounds in this Howl group.
  32584. * loop(loop, id) -> Sets the loop value of passed sound id.
  32585. * @return {Howl/Boolean} Returns self or current loop value.
  32586. */
  32587. loop: function() {
  32588. var self2 = this;
  32589. var args = arguments;
  32590. var loop, id, sound;
  32591. if (args.length === 0) {
  32592. return self2._loop;
  32593. } else if (args.length === 1) {
  32594. if (typeof args[0] === "boolean") {
  32595. loop = args[0];
  32596. self2._loop = loop;
  32597. } else {
  32598. sound = self2._soundById(parseInt(args[0], 10));
  32599. return sound ? sound._loop : false;
  32600. }
  32601. } else if (args.length === 2) {
  32602. loop = args[0];
  32603. id = parseInt(args[1], 10);
  32604. }
  32605. var ids = self2._getSoundIds(id);
  32606. for (var i = 0; i < ids.length; i++) {
  32607. sound = self2._soundById(ids[i]);
  32608. if (sound) {
  32609. sound._loop = loop;
  32610. if (self2._webAudio && sound._node && sound._node.bufferSource) {
  32611. sound._node.bufferSource.loop = loop;
  32612. if (loop) {
  32613. sound._node.bufferSource.loopStart = sound._start || 0;
  32614. sound._node.bufferSource.loopEnd = sound._stop;
  32615. if (self2.playing(ids[i])) {
  32616. self2.pause(ids[i], true);
  32617. self2.play(ids[i], true);
  32618. }
  32619. }
  32620. }
  32621. }
  32622. }
  32623. return self2;
  32624. },
  32625. /**
  32626. * Get/set the playback rate of a sound. This method can optionally take 0, 1 or 2 arguments.
  32627. * rate() -> Returns the first sound node's current playback rate.
  32628. * rate(id) -> Returns the sound id's current playback rate.
  32629. * rate(rate) -> Sets the playback rate of all sounds in this Howl group.
  32630. * rate(rate, id) -> Sets the playback rate of passed sound id.
  32631. * @return {Howl/Number} Returns self or the current playback rate.
  32632. */
  32633. rate: function() {
  32634. var self2 = this;
  32635. var args = arguments;
  32636. var rate, id;
  32637. if (args.length === 0) {
  32638. id = self2._sounds[0]._id;
  32639. } else if (args.length === 1) {
  32640. var ids = self2._getSoundIds();
  32641. var index2 = ids.indexOf(args[0]);
  32642. if (index2 >= 0) {
  32643. id = parseInt(args[0], 10);
  32644. } else {
  32645. rate = parseFloat(args[0]);
  32646. }
  32647. } else if (args.length === 2) {
  32648. rate = parseFloat(args[0]);
  32649. id = parseInt(args[1], 10);
  32650. }
  32651. var sound;
  32652. if (typeof rate === "number") {
  32653. if (self2._state !== "loaded" || self2._playLock) {
  32654. self2._queue.push({
  32655. event: "rate",
  32656. action: function() {
  32657. self2.rate.apply(self2, args);
  32658. }
  32659. });
  32660. return self2;
  32661. }
  32662. if (typeof id === "undefined") {
  32663. self2._rate = rate;
  32664. }
  32665. id = self2._getSoundIds(id);
  32666. for (var i = 0; i < id.length; i++) {
  32667. sound = self2._soundById(id[i]);
  32668. if (sound) {
  32669. if (self2.playing(id[i])) {
  32670. sound._rateSeek = self2.seek(id[i]);
  32671. sound._playStart = self2._webAudio ? Howler2.ctx.currentTime : sound._playStart;
  32672. }
  32673. sound._rate = rate;
  32674. if (self2._webAudio && sound._node && sound._node.bufferSource) {
  32675. sound._node.bufferSource.playbackRate.setValueAtTime(rate, Howler2.ctx.currentTime);
  32676. } else if (sound._node) {
  32677. sound._node.playbackRate = rate;
  32678. }
  32679. var seek = self2.seek(id[i]);
  32680. var duration = (self2._sprite[sound._sprite][0] + self2._sprite[sound._sprite][1]) / 1e3 - seek;
  32681. var timeout2 = duration * 1e3 / Math.abs(sound._rate);
  32682. if (self2._endTimers[id[i]] || !sound._paused) {
  32683. self2._clearTimer(id[i]);
  32684. self2._endTimers[id[i]] = setTimeout(self2._ended.bind(self2, sound), timeout2);
  32685. }
  32686. self2._emit("rate", sound._id);
  32687. }
  32688. }
  32689. } else {
  32690. sound = self2._soundById(id);
  32691. return sound ? sound._rate : self2._rate;
  32692. }
  32693. return self2;
  32694. },
  32695. /**
  32696. * Get/set the seek position of a sound. This method can optionally take 0, 1 or 2 arguments.
  32697. * seek() -> Returns the first sound node's current seek position.
  32698. * seek(id) -> Returns the sound id's current seek position.
  32699. * seek(seek) -> Sets the seek position of the first sound node.
  32700. * seek(seek, id) -> Sets the seek position of passed sound id.
  32701. * @return {Howl/Number} Returns self or the current seek position.
  32702. */
  32703. seek: function() {
  32704. var self2 = this;
  32705. var args = arguments;
  32706. var seek, id;
  32707. if (args.length === 0) {
  32708. if (self2._sounds.length) {
  32709. id = self2._sounds[0]._id;
  32710. }
  32711. } else if (args.length === 1) {
  32712. var ids = self2._getSoundIds();
  32713. var index2 = ids.indexOf(args[0]);
  32714. if (index2 >= 0) {
  32715. id = parseInt(args[0], 10);
  32716. } else if (self2._sounds.length) {
  32717. id = self2._sounds[0]._id;
  32718. seek = parseFloat(args[0]);
  32719. }
  32720. } else if (args.length === 2) {
  32721. seek = parseFloat(args[0]);
  32722. id = parseInt(args[1], 10);
  32723. }
  32724. if (typeof id === "undefined") {
  32725. return 0;
  32726. }
  32727. if (typeof seek === "number" && (self2._state !== "loaded" || self2._playLock)) {
  32728. self2._queue.push({
  32729. event: "seek",
  32730. action: function() {
  32731. self2.seek.apply(self2, args);
  32732. }
  32733. });
  32734. return self2;
  32735. }
  32736. var sound = self2._soundById(id);
  32737. if (sound) {
  32738. if (typeof seek === "number" && seek >= 0) {
  32739. var playing = self2.playing(id);
  32740. if (playing) {
  32741. self2.pause(id, true);
  32742. }
  32743. sound._seek = seek;
  32744. sound._ended = false;
  32745. self2._clearTimer(id);
  32746. if (!self2._webAudio && sound._node && !isNaN(sound._node.duration)) {
  32747. sound._node.currentTime = seek;
  32748. }
  32749. var seekAndEmit = function() {
  32750. if (playing) {
  32751. self2.play(id, true);
  32752. }
  32753. self2._emit("seek", id);
  32754. };
  32755. if (playing && !self2._webAudio) {
  32756. var emitSeek = function() {
  32757. if (!self2._playLock) {
  32758. seekAndEmit();
  32759. } else {
  32760. setTimeout(emitSeek, 0);
  32761. }
  32762. };
  32763. setTimeout(emitSeek, 0);
  32764. } else {
  32765. seekAndEmit();
  32766. }
  32767. } else {
  32768. if (self2._webAudio) {
  32769. var realTime = self2.playing(id) ? Howler2.ctx.currentTime - sound._playStart : 0;
  32770. var rateSeek = sound._rateSeek ? sound._rateSeek - sound._seek : 0;
  32771. return sound._seek + (rateSeek + realTime * Math.abs(sound._rate));
  32772. } else {
  32773. return sound._node.currentTime;
  32774. }
  32775. }
  32776. }
  32777. return self2;
  32778. },
  32779. /**
  32780. * 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.
  32781. * @param {Number} id The sound id to check. If none is passed, the whole sound group is checked.
  32782. * @return {Boolean} True if playing and false if not.
  32783. */
  32784. playing: function(id) {
  32785. var self2 = this;
  32786. if (typeof id === "number") {
  32787. var sound = self2._soundById(id);
  32788. return sound ? !sound._paused : false;
  32789. }
  32790. for (var i = 0; i < self2._sounds.length; i++) {
  32791. if (!self2._sounds[i]._paused) {
  32792. return true;
  32793. }
  32794. }
  32795. return false;
  32796. },
  32797. /**
  32798. * Get the duration of this sound. Passing a sound id will return the sprite duration.
  32799. * @param {Number} id The sound id to check. If none is passed, return full source duration.
  32800. * @return {Number} Audio duration in seconds.
  32801. */
  32802. duration: function(id) {
  32803. var self2 = this;
  32804. var duration = self2._duration;
  32805. var sound = self2._soundById(id);
  32806. if (sound) {
  32807. duration = self2._sprite[sound._sprite][1] / 1e3;
  32808. }
  32809. return duration;
  32810. },
  32811. /**
  32812. * Returns the current loaded state of this Howl.
  32813. * @return {String} 'unloaded', 'loading', 'loaded'
  32814. */
  32815. state: function() {
  32816. return this._state;
  32817. },
  32818. /**
  32819. * Unload and destroy the current Howl object.
  32820. * This will immediately stop all sound instances attached to this group.
  32821. */
  32822. unload: function() {
  32823. var self2 = this;
  32824. var sounds = self2._sounds;
  32825. for (var i = 0; i < sounds.length; i++) {
  32826. if (!sounds[i]._paused) {
  32827. self2.stop(sounds[i]._id);
  32828. }
  32829. if (!self2._webAudio) {
  32830. self2._clearSound(sounds[i]._node);
  32831. sounds[i]._node.removeEventListener("error", sounds[i]._errorFn, false);
  32832. sounds[i]._node.removeEventListener(Howler2._canPlayEvent, sounds[i]._loadFn, false);
  32833. sounds[i]._node.removeEventListener("ended", sounds[i]._endFn, false);
  32834. Howler2._releaseHtml5Audio(sounds[i]._node);
  32835. }
  32836. delete sounds[i]._node;
  32837. self2._clearTimer(sounds[i]._id);
  32838. }
  32839. var index2 = Howler2._howls.indexOf(self2);
  32840. if (index2 >= 0) {
  32841. Howler2._howls.splice(index2, 1);
  32842. }
  32843. var remCache = true;
  32844. for (i = 0; i < Howler2._howls.length; i++) {
  32845. if (Howler2._howls[i]._src === self2._src || self2._src.indexOf(Howler2._howls[i]._src) >= 0) {
  32846. remCache = false;
  32847. break;
  32848. }
  32849. }
  32850. if (cache && remCache) {
  32851. delete cache[self2._src];
  32852. }
  32853. Howler2.noAudio = false;
  32854. self2._state = "unloaded";
  32855. self2._sounds = [];
  32856. self2 = null;
  32857. return null;
  32858. },
  32859. /**
  32860. * Listen to a custom event.
  32861. * @param {String} event Event name.
  32862. * @param {Function} fn Listener to call.
  32863. * @param {Number} id (optional) Only listen to events for this sound.
  32864. * @param {Number} once (INTERNAL) Marks event to fire only once.
  32865. * @return {Howl}
  32866. */
  32867. on: function(event, fn, id, once) {
  32868. var self2 = this;
  32869. var events = self2["_on" + event];
  32870. if (typeof fn === "function") {
  32871. events.push(once ? { id, fn, once } : { id, fn });
  32872. }
  32873. return self2;
  32874. },
  32875. /**
  32876. * Remove a custom event. Call without parameters to remove all events.
  32877. * @param {String} event Event name.
  32878. * @param {Function} fn Listener to remove. Leave empty to remove all.
  32879. * @param {Number} id (optional) Only remove events for this sound.
  32880. * @return {Howl}
  32881. */
  32882. off: function(event, fn, id) {
  32883. var self2 = this;
  32884. var events = self2["_on" + event];
  32885. var i = 0;
  32886. if (typeof fn === "number") {
  32887. id = fn;
  32888. fn = null;
  32889. }
  32890. if (fn || id) {
  32891. for (i = 0; i < events.length; i++) {
  32892. var isId = id === events[i].id;
  32893. if (fn === events[i].fn && isId || !fn && isId) {
  32894. events.splice(i, 1);
  32895. break;
  32896. }
  32897. }
  32898. } else if (event) {
  32899. self2["_on" + event] = [];
  32900. } else {
  32901. var keys = Object.keys(self2);
  32902. for (i = 0; i < keys.length; i++) {
  32903. if (keys[i].indexOf("_on") === 0 && Array.isArray(self2[keys[i]])) {
  32904. self2[keys[i]] = [];
  32905. }
  32906. }
  32907. }
  32908. return self2;
  32909. },
  32910. /**
  32911. * Listen to a custom event and remove it once fired.
  32912. * @param {String} event Event name.
  32913. * @param {Function} fn Listener to call.
  32914. * @param {Number} id (optional) Only listen to events for this sound.
  32915. * @return {Howl}
  32916. */
  32917. once: function(event, fn, id) {
  32918. var self2 = this;
  32919. self2.on(event, fn, id, 1);
  32920. return self2;
  32921. },
  32922. /**
  32923. * Emit all events of a specific type and pass the sound id.
  32924. * @param {String} event Event name.
  32925. * @param {Number} id Sound ID.
  32926. * @param {Number} msg Message to go with event.
  32927. * @return {Howl}
  32928. */
  32929. _emit: function(event, id, msg) {
  32930. var self2 = this;
  32931. var events = self2["_on" + event];
  32932. for (var i = events.length - 1; i >= 0; i--) {
  32933. if (!events[i].id || events[i].id === id || event === "load") {
  32934. setTimeout((function(fn) {
  32935. fn.call(this, id, msg);
  32936. }).bind(self2, events[i].fn), 0);
  32937. if (events[i].once) {
  32938. self2.off(event, events[i].fn, events[i].id);
  32939. }
  32940. }
  32941. }
  32942. self2._loadQueue(event);
  32943. return self2;
  32944. },
  32945. /**
  32946. * Queue of actions initiated before the sound has loaded.
  32947. * These will be called in sequence, with the next only firing
  32948. * after the previous has finished executing (even if async like play).
  32949. * @return {Howl}
  32950. */
  32951. _loadQueue: function(event) {
  32952. var self2 = this;
  32953. if (self2._queue.length > 0) {
  32954. var task = self2._queue[0];
  32955. if (task.event === event) {
  32956. self2._queue.shift();
  32957. self2._loadQueue();
  32958. }
  32959. if (!event) {
  32960. task.action();
  32961. }
  32962. }
  32963. return self2;
  32964. },
  32965. /**
  32966. * Fired when playback ends at the end of the duration.
  32967. * @param {Sound} sound The sound object to work with.
  32968. * @return {Howl}
  32969. */
  32970. _ended: function(sound) {
  32971. var self2 = this;
  32972. var sprite = sound._sprite;
  32973. if (!self2._webAudio && sound._node && !sound._node.paused && !sound._node.ended && sound._node.currentTime < sound._stop) {
  32974. setTimeout(self2._ended.bind(self2, sound), 100);
  32975. return self2;
  32976. }
  32977. var loop = !!(sound._loop || self2._sprite[sprite][2]);
  32978. self2._emit("end", sound._id);
  32979. if (!self2._webAudio && loop) {
  32980. self2.stop(sound._id, true).play(sound._id);
  32981. }
  32982. if (self2._webAudio && loop) {
  32983. self2._emit("play", sound._id);
  32984. sound._seek = sound._start || 0;
  32985. sound._rateSeek = 0;
  32986. sound._playStart = Howler2.ctx.currentTime;
  32987. var timeout2 = (sound._stop - sound._start) * 1e3 / Math.abs(sound._rate);
  32988. self2._endTimers[sound._id] = setTimeout(self2._ended.bind(self2, sound), timeout2);
  32989. }
  32990. if (self2._webAudio && !loop) {
  32991. sound._paused = true;
  32992. sound._ended = true;
  32993. sound._seek = sound._start || 0;
  32994. sound._rateSeek = 0;
  32995. self2._clearTimer(sound._id);
  32996. self2._cleanBuffer(sound._node);
  32997. Howler2._autoSuspend();
  32998. }
  32999. if (!self2._webAudio && !loop) {
  33000. self2.stop(sound._id, true);
  33001. }
  33002. return self2;
  33003. },
  33004. /**
  33005. * Clear the end timer for a sound playback.
  33006. * @param {Number} id The sound ID.
  33007. * @return {Howl}
  33008. */
  33009. _clearTimer: function(id) {
  33010. var self2 = this;
  33011. if (self2._endTimers[id]) {
  33012. if (typeof self2._endTimers[id] !== "function") {
  33013. clearTimeout(self2._endTimers[id]);
  33014. } else {
  33015. var sound = self2._soundById(id);
  33016. if (sound && sound._node) {
  33017. sound._node.removeEventListener("ended", self2._endTimers[id], false);
  33018. }
  33019. }
  33020. delete self2._endTimers[id];
  33021. }
  33022. return self2;
  33023. },
  33024. /**
  33025. * Return the sound identified by this ID, or return null.
  33026. * @param {Number} id Sound ID
  33027. * @return {Object} Sound object or null.
  33028. */
  33029. _soundById: function(id) {
  33030. var self2 = this;
  33031. for (var i = 0; i < self2._sounds.length; i++) {
  33032. if (id === self2._sounds[i]._id) {
  33033. return self2._sounds[i];
  33034. }
  33035. }
  33036. return null;
  33037. },
  33038. /**
  33039. * Return an inactive sound from the pool or create a new one.
  33040. * @return {Sound} Sound playback object.
  33041. */
  33042. _inactiveSound: function() {
  33043. var self2 = this;
  33044. self2._drain();
  33045. for (var i = 0; i < self2._sounds.length; i++) {
  33046. if (self2._sounds[i]._ended) {
  33047. return self2._sounds[i].reset();
  33048. }
  33049. }
  33050. return new Sound2(self2);
  33051. },
  33052. /**
  33053. * Drain excess inactive sounds from the pool.
  33054. */
  33055. _drain: function() {
  33056. var self2 = this;
  33057. var limit = self2._pool;
  33058. var cnt = 0;
  33059. var i = 0;
  33060. if (self2._sounds.length < limit) {
  33061. return;
  33062. }
  33063. for (i = 0; i < self2._sounds.length; i++) {
  33064. if (self2._sounds[i]._ended) {
  33065. cnt++;
  33066. }
  33067. }
  33068. for (i = self2._sounds.length - 1; i >= 0; i--) {
  33069. if (cnt <= limit) {
  33070. return;
  33071. }
  33072. if (self2._sounds[i]._ended) {
  33073. if (self2._webAudio && self2._sounds[i]._node) {
  33074. self2._sounds[i]._node.disconnect(0);
  33075. }
  33076. self2._sounds.splice(i, 1);
  33077. cnt--;
  33078. }
  33079. }
  33080. },
  33081. /**
  33082. * Get all ID's from the sounds pool.
  33083. * @param {Number} id Only return one ID if one is passed.
  33084. * @return {Array} Array of IDs.
  33085. */
  33086. _getSoundIds: function(id) {
  33087. var self2 = this;
  33088. if (typeof id === "undefined") {
  33089. var ids = [];
  33090. for (var i = 0; i < self2._sounds.length; i++) {
  33091. ids.push(self2._sounds[i]._id);
  33092. }
  33093. return ids;
  33094. } else {
  33095. return [id];
  33096. }
  33097. },
  33098. /**
  33099. * Load the sound back into the buffer source.
  33100. * @param {Sound} sound The sound object to work with.
  33101. * @return {Howl}
  33102. */
  33103. _refreshBuffer: function(sound) {
  33104. var self2 = this;
  33105. sound._node.bufferSource = Howler2.ctx.createBufferSource();
  33106. sound._node.bufferSource.buffer = cache[self2._src];
  33107. if (sound._panner) {
  33108. sound._node.bufferSource.connect(sound._panner);
  33109. } else {
  33110. sound._node.bufferSource.connect(sound._node);
  33111. }
  33112. sound._node.bufferSource.loop = sound._loop;
  33113. if (sound._loop) {
  33114. sound._node.bufferSource.loopStart = sound._start || 0;
  33115. sound._node.bufferSource.loopEnd = sound._stop || 0;
  33116. }
  33117. sound._node.bufferSource.playbackRate.setValueAtTime(sound._rate, Howler2.ctx.currentTime);
  33118. return self2;
  33119. },
  33120. /**
  33121. * Prevent memory leaks by cleaning up the buffer source after playback.
  33122. * @param {Object} node Sound's audio node containing the buffer source.
  33123. * @return {Howl}
  33124. */
  33125. _cleanBuffer: function(node) {
  33126. var self2 = this;
  33127. var isIOS = Howler2._navigator && Howler2._navigator.vendor.indexOf("Apple") >= 0;
  33128. if (!node.bufferSource) {
  33129. return self2;
  33130. }
  33131. if (Howler2._scratchBuffer && node.bufferSource) {
  33132. node.bufferSource.onended = null;
  33133. node.bufferSource.disconnect(0);
  33134. if (isIOS) {
  33135. try {
  33136. node.bufferSource.buffer = Howler2._scratchBuffer;
  33137. } catch (e) {
  33138. }
  33139. }
  33140. }
  33141. node.bufferSource = null;
  33142. return self2;
  33143. },
  33144. /**
  33145. * Set the source to a 0-second silence to stop any downloading (except in IE).
  33146. * @param {Object} node Audio node to clear.
  33147. */
  33148. _clearSound: function(node) {
  33149. var checkIE = /MSIE |Trident\//.test(Howler2._navigator && Howler2._navigator.userAgent);
  33150. if (!checkIE) {
  33151. node.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA";
  33152. }
  33153. }
  33154. };
  33155. var Sound2 = function(howl) {
  33156. this._parent = howl;
  33157. this.init();
  33158. };
  33159. Sound2.prototype = {
  33160. /**
  33161. * Initialize a new Sound object.
  33162. * @return {Sound}
  33163. */
  33164. init: function() {
  33165. var self2 = this;
  33166. var parent = self2._parent;
  33167. self2._muted = parent._muted;
  33168. self2._loop = parent._loop;
  33169. self2._volume = parent._volume;
  33170. self2._rate = parent._rate;
  33171. self2._seek = 0;
  33172. self2._paused = true;
  33173. self2._ended = true;
  33174. self2._sprite = "__default";
  33175. self2._id = ++Howler2._counter;
  33176. parent._sounds.push(self2);
  33177. self2.create();
  33178. return self2;
  33179. },
  33180. /**
  33181. * Create and setup a new sound object, whether HTML5 Audio or Web Audio.
  33182. * @return {Sound}
  33183. */
  33184. create: function() {
  33185. var self2 = this;
  33186. var parent = self2._parent;
  33187. var volume = Howler2._muted || self2._muted || self2._parent._muted ? 0 : self2._volume;
  33188. if (parent._webAudio) {
  33189. self2._node = typeof Howler2.ctx.createGain === "undefined" ? Howler2.ctx.createGainNode() : Howler2.ctx.createGain();
  33190. self2._node.gain.setValueAtTime(volume, Howler2.ctx.currentTime);
  33191. self2._node.paused = true;
  33192. self2._node.connect(Howler2.masterGain);
  33193. } else if (!Howler2.noAudio) {
  33194. self2._node = Howler2._obtainHtml5Audio();
  33195. self2._errorFn = self2._errorListener.bind(self2);
  33196. self2._node.addEventListener("error", self2._errorFn, false);
  33197. self2._loadFn = self2._loadListener.bind(self2);
  33198. self2._node.addEventListener(Howler2._canPlayEvent, self2._loadFn, false);
  33199. self2._endFn = self2._endListener.bind(self2);
  33200. self2._node.addEventListener("ended", self2._endFn, false);
  33201. self2._node.src = parent._src;
  33202. self2._node.preload = parent._preload === true ? "auto" : parent._preload;
  33203. self2._node.volume = volume * Howler2.volume();
  33204. self2._node.load();
  33205. }
  33206. return self2;
  33207. },
  33208. /**
  33209. * Reset the parameters of this sound to the original state (for recycle).
  33210. * @return {Sound}
  33211. */
  33212. reset: function() {
  33213. var self2 = this;
  33214. var parent = self2._parent;
  33215. self2._muted = parent._muted;
  33216. self2._loop = parent._loop;
  33217. self2._volume = parent._volume;
  33218. self2._rate = parent._rate;
  33219. self2._seek = 0;
  33220. self2._rateSeek = 0;
  33221. self2._paused = true;
  33222. self2._ended = true;
  33223. self2._sprite = "__default";
  33224. self2._id = ++Howler2._counter;
  33225. return self2;
  33226. },
  33227. /**
  33228. * HTML5 Audio error listener callback.
  33229. */
  33230. _errorListener: function() {
  33231. var self2 = this;
  33232. self2._parent._emit("loaderror", self2._id, self2._node.error ? self2._node.error.code : 0);
  33233. self2._node.removeEventListener("error", self2._errorFn, false);
  33234. },
  33235. /**
  33236. * HTML5 Audio canplaythrough listener callback.
  33237. */
  33238. _loadListener: function() {
  33239. var self2 = this;
  33240. var parent = self2._parent;
  33241. parent._duration = Math.ceil(self2._node.duration * 10) / 10;
  33242. if (Object.keys(parent._sprite).length === 0) {
  33243. parent._sprite = { __default: [0, parent._duration * 1e3] };
  33244. }
  33245. if (parent._state !== "loaded") {
  33246. parent._state = "loaded";
  33247. parent._emit("load");
  33248. parent._loadQueue();
  33249. }
  33250. self2._node.removeEventListener(Howler2._canPlayEvent, self2._loadFn, false);
  33251. },
  33252. /**
  33253. * HTML5 Audio ended listener callback.
  33254. */
  33255. _endListener: function() {
  33256. var self2 = this;
  33257. var parent = self2._parent;
  33258. if (parent._duration === Infinity) {
  33259. parent._duration = Math.ceil(self2._node.duration * 10) / 10;
  33260. if (parent._sprite.__default[1] === Infinity) {
  33261. parent._sprite.__default[1] = parent._duration * 1e3;
  33262. }
  33263. parent._ended(self2);
  33264. }
  33265. self2._node.removeEventListener("ended", self2._endFn, false);
  33266. }
  33267. };
  33268. var cache = {};
  33269. var loadBuffer = function(self2) {
  33270. var url2 = self2._src;
  33271. if (cache[url2]) {
  33272. self2._duration = cache[url2].duration;
  33273. loadSound(self2);
  33274. return;
  33275. }
  33276. if (/^data:[^;]+;base64,/.test(url2)) {
  33277. var data = atob(url2.split(",")[1]);
  33278. var dataView = new Uint8Array(data.length);
  33279. for (var i = 0; i < data.length; ++i) {
  33280. dataView[i] = data.charCodeAt(i);
  33281. }
  33282. decodeAudioData(dataView.buffer, self2);
  33283. } else {
  33284. var xhr = new XMLHttpRequest();
  33285. xhr.open(self2._xhr.method, url2, true);
  33286. xhr.withCredentials = self2._xhr.withCredentials;
  33287. xhr.responseType = "arraybuffer";
  33288. if (self2._xhr.headers) {
  33289. Object.keys(self2._xhr.headers).forEach(function(key) {
  33290. xhr.setRequestHeader(key, self2._xhr.headers[key]);
  33291. });
  33292. }
  33293. xhr.onload = function() {
  33294. var code2 = (xhr.status + "")[0];
  33295. if (code2 !== "0" && code2 !== "2" && code2 !== "3") {
  33296. self2._emit("loaderror", null, "Failed loading audio file with status: " + xhr.status + ".");
  33297. return;
  33298. }
  33299. decodeAudioData(xhr.response, self2);
  33300. };
  33301. xhr.onerror = function() {
  33302. if (self2._webAudio) {
  33303. self2._html5 = true;
  33304. self2._webAudio = false;
  33305. self2._sounds = [];
  33306. delete cache[url2];
  33307. self2.load();
  33308. }
  33309. };
  33310. safeXhrSend(xhr);
  33311. }
  33312. };
  33313. var safeXhrSend = function(xhr) {
  33314. try {
  33315. xhr.send();
  33316. } catch (e) {
  33317. xhr.onerror();
  33318. }
  33319. };
  33320. var decodeAudioData = function(arraybuffer, self2) {
  33321. var error2 = function() {
  33322. self2._emit("loaderror", null, "Decoding audio data failed.");
  33323. };
  33324. var success = function(buffer) {
  33325. if (buffer && self2._sounds.length > 0) {
  33326. cache[self2._src] = buffer;
  33327. loadSound(self2, buffer);
  33328. } else {
  33329. error2();
  33330. }
  33331. };
  33332. if (typeof Promise !== "undefined" && Howler2.ctx.decodeAudioData.length === 1) {
  33333. Howler2.ctx.decodeAudioData(arraybuffer).then(success).catch(error2);
  33334. } else {
  33335. Howler2.ctx.decodeAudioData(arraybuffer, success, error2);
  33336. }
  33337. };
  33338. var loadSound = function(self2, buffer) {
  33339. if (buffer && !self2._duration) {
  33340. self2._duration = buffer.duration;
  33341. }
  33342. if (Object.keys(self2._sprite).length === 0) {
  33343. self2._sprite = { __default: [0, self2._duration * 1e3] };
  33344. }
  33345. if (self2._state !== "loaded") {
  33346. self2._state = "loaded";
  33347. self2._emit("load");
  33348. self2._loadQueue();
  33349. }
  33350. };
  33351. var setupAudioContext = function() {
  33352. if (!Howler2.usingWebAudio) {
  33353. return;
  33354. }
  33355. try {
  33356. if (typeof AudioContext !== "undefined") {
  33357. Howler2.ctx = new AudioContext();
  33358. } else if (typeof webkitAudioContext !== "undefined") {
  33359. Howler2.ctx = new webkitAudioContext();
  33360. } else {
  33361. Howler2.usingWebAudio = false;
  33362. }
  33363. } catch (e) {
  33364. Howler2.usingWebAudio = false;
  33365. }
  33366. if (!Howler2.ctx) {
  33367. Howler2.usingWebAudio = false;
  33368. }
  33369. var iOS = /iP(hone|od|ad)/.test(Howler2._navigator && Howler2._navigator.platform);
  33370. var appVersion = Howler2._navigator && Howler2._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
  33371. var version2 = appVersion ? parseInt(appVersion[1], 10) : null;
  33372. if (iOS && version2 && version2 < 9) {
  33373. var safari = /safari/.test(Howler2._navigator && Howler2._navigator.userAgent.toLowerCase());
  33374. if (Howler2._navigator && !safari) {
  33375. Howler2.usingWebAudio = false;
  33376. }
  33377. }
  33378. if (Howler2.usingWebAudio) {
  33379. Howler2.masterGain = typeof Howler2.ctx.createGain === "undefined" ? Howler2.ctx.createGainNode() : Howler2.ctx.createGain();
  33380. Howler2.masterGain.gain.setValueAtTime(Howler2._muted ? 0 : Howler2._volume, Howler2.ctx.currentTime);
  33381. Howler2.masterGain.connect(Howler2.ctx.destination);
  33382. }
  33383. Howler2._setup();
  33384. };
  33385. {
  33386. exports.Howler = Howler2;
  33387. exports.Howl = Howl2;
  33388. }
  33389. if (typeof commonjsGlobal !== "undefined") {
  33390. commonjsGlobal.HowlerGlobal = HowlerGlobal2;
  33391. commonjsGlobal.Howler = Howler2;
  33392. commonjsGlobal.Howl = Howl2;
  33393. commonjsGlobal.Sound = Sound2;
  33394. } else if (typeof window !== "undefined") {
  33395. window.HowlerGlobal = HowlerGlobal2;
  33396. window.Howler = Howler2;
  33397. window.Howl = Howl2;
  33398. window.Sound = Sound2;
  33399. }
  33400. })();
  33401. /*!
  33402. * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
  33403. *
  33404. * howler.js v2.2.4
  33405. * howlerjs.com
  33406. *
  33407. * (c) 2013-2020, James Simpson of GoldFire Studios
  33408. * goldfirestudios.com
  33409. *
  33410. * MIT License
  33411. */
  33412. (function() {
  33413. HowlerGlobal.prototype._pos = [0, 0, 0];
  33414. HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0];
  33415. HowlerGlobal.prototype.stereo = function(pan) {
  33416. var self2 = this;
  33417. if (!self2.ctx || !self2.ctx.listener) {
  33418. return self2;
  33419. }
  33420. for (var i = self2._howls.length - 1; i >= 0; i--) {
  33421. self2._howls[i].stereo(pan);
  33422. }
  33423. return self2;
  33424. };
  33425. HowlerGlobal.prototype.pos = function(x, y, z) {
  33426. var self2 = this;
  33427. if (!self2.ctx || !self2.ctx.listener) {
  33428. return self2;
  33429. }
  33430. y = typeof y !== "number" ? self2._pos[1] : y;
  33431. z = typeof z !== "number" ? self2._pos[2] : z;
  33432. if (typeof x === "number") {
  33433. self2._pos = [x, y, z];
  33434. if (typeof self2.ctx.listener.positionX !== "undefined") {
  33435. self2.ctx.listener.positionX.setTargetAtTime(self2._pos[0], Howler.ctx.currentTime, 0.1);
  33436. self2.ctx.listener.positionY.setTargetAtTime(self2._pos[1], Howler.ctx.currentTime, 0.1);
  33437. self2.ctx.listener.positionZ.setTargetAtTime(self2._pos[2], Howler.ctx.currentTime, 0.1);
  33438. } else {
  33439. self2.ctx.listener.setPosition(self2._pos[0], self2._pos[1], self2._pos[2]);
  33440. }
  33441. } else {
  33442. return self2._pos;
  33443. }
  33444. return self2;
  33445. };
  33446. HowlerGlobal.prototype.orientation = function(x, y, z, xUp, yUp, zUp) {
  33447. var self2 = this;
  33448. if (!self2.ctx || !self2.ctx.listener) {
  33449. return self2;
  33450. }
  33451. var or = self2._orientation;
  33452. y = typeof y !== "number" ? or[1] : y;
  33453. z = typeof z !== "number" ? or[2] : z;
  33454. xUp = typeof xUp !== "number" ? or[3] : xUp;
  33455. yUp = typeof yUp !== "number" ? or[4] : yUp;
  33456. zUp = typeof zUp !== "number" ? or[5] : zUp;
  33457. if (typeof x === "number") {
  33458. self2._orientation = [x, y, z, xUp, yUp, zUp];
  33459. if (typeof self2.ctx.listener.forwardX !== "undefined") {
  33460. self2.ctx.listener.forwardX.setTargetAtTime(x, Howler.ctx.currentTime, 0.1);
  33461. self2.ctx.listener.forwardY.setTargetAtTime(y, Howler.ctx.currentTime, 0.1);
  33462. self2.ctx.listener.forwardZ.setTargetAtTime(z, Howler.ctx.currentTime, 0.1);
  33463. self2.ctx.listener.upX.setTargetAtTime(xUp, Howler.ctx.currentTime, 0.1);
  33464. self2.ctx.listener.upY.setTargetAtTime(yUp, Howler.ctx.currentTime, 0.1);
  33465. self2.ctx.listener.upZ.setTargetAtTime(zUp, Howler.ctx.currentTime, 0.1);
  33466. } else {
  33467. self2.ctx.listener.setOrientation(x, y, z, xUp, yUp, zUp);
  33468. }
  33469. } else {
  33470. return or;
  33471. }
  33472. return self2;
  33473. };
  33474. Howl.prototype.init = /* @__PURE__ */ function(_super) {
  33475. return function(o) {
  33476. var self2 = this;
  33477. self2._orientation = o.orientation || [1, 0, 0];
  33478. self2._stereo = o.stereo || null;
  33479. self2._pos = o.pos || null;
  33480. self2._pannerAttr = {
  33481. coneInnerAngle: typeof o.coneInnerAngle !== "undefined" ? o.coneInnerAngle : 360,
  33482. coneOuterAngle: typeof o.coneOuterAngle !== "undefined" ? o.coneOuterAngle : 360,
  33483. coneOuterGain: typeof o.coneOuterGain !== "undefined" ? o.coneOuterGain : 0,
  33484. distanceModel: typeof o.distanceModel !== "undefined" ? o.distanceModel : "inverse",
  33485. maxDistance: typeof o.maxDistance !== "undefined" ? o.maxDistance : 1e4,
  33486. panningModel: typeof o.panningModel !== "undefined" ? o.panningModel : "HRTF",
  33487. refDistance: typeof o.refDistance !== "undefined" ? o.refDistance : 1,
  33488. rolloffFactor: typeof o.rolloffFactor !== "undefined" ? o.rolloffFactor : 1
  33489. };
  33490. self2._onstereo = o.onstereo ? [{ fn: o.onstereo }] : [];
  33491. self2._onpos = o.onpos ? [{ fn: o.onpos }] : [];
  33492. self2._onorientation = o.onorientation ? [{ fn: o.onorientation }] : [];
  33493. return _super.call(this, o);
  33494. };
  33495. }(Howl.prototype.init);
  33496. Howl.prototype.stereo = function(pan, id) {
  33497. var self2 = this;
  33498. if (!self2._webAudio) {
  33499. return self2;
  33500. }
  33501. if (self2._state !== "loaded") {
  33502. self2._queue.push({
  33503. event: "stereo",
  33504. action: function() {
  33505. self2.stereo(pan, id);
  33506. }
  33507. });
  33508. return self2;
  33509. }
  33510. var pannerType = typeof Howler.ctx.createStereoPanner === "undefined" ? "spatial" : "stereo";
  33511. if (typeof id === "undefined") {
  33512. if (typeof pan === "number") {
  33513. self2._stereo = pan;
  33514. self2._pos = [pan, 0, 0];
  33515. } else {
  33516. return self2._stereo;
  33517. }
  33518. }
  33519. var ids = self2._getSoundIds(id);
  33520. for (var i = 0; i < ids.length; i++) {
  33521. var sound = self2._soundById(ids[i]);
  33522. if (sound) {
  33523. if (typeof pan === "number") {
  33524. sound._stereo = pan;
  33525. sound._pos = [pan, 0, 0];
  33526. if (sound._node) {
  33527. sound._pannerAttr.panningModel = "equalpower";
  33528. if (!sound._panner || !sound._panner.pan) {
  33529. setupPanner(sound, pannerType);
  33530. }
  33531. if (pannerType === "spatial") {
  33532. if (typeof sound._panner.positionX !== "undefined") {
  33533. sound._panner.positionX.setValueAtTime(pan, Howler.ctx.currentTime);
  33534. sound._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime);
  33535. sound._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime);
  33536. } else {
  33537. sound._panner.setPosition(pan, 0, 0);
  33538. }
  33539. } else {
  33540. sound._panner.pan.setValueAtTime(pan, Howler.ctx.currentTime);
  33541. }
  33542. }
  33543. self2._emit("stereo", sound._id);
  33544. } else {
  33545. return sound._stereo;
  33546. }
  33547. }
  33548. }
  33549. return self2;
  33550. };
  33551. Howl.prototype.pos = function(x, y, z, id) {
  33552. var self2 = this;
  33553. if (!self2._webAudio) {
  33554. return self2;
  33555. }
  33556. if (self2._state !== "loaded") {
  33557. self2._queue.push({
  33558. event: "pos",
  33559. action: function() {
  33560. self2.pos(x, y, z, id);
  33561. }
  33562. });
  33563. return self2;
  33564. }
  33565. y = typeof y !== "number" ? 0 : y;
  33566. z = typeof z !== "number" ? -0.5 : z;
  33567. if (typeof id === "undefined") {
  33568. if (typeof x === "number") {
  33569. self2._pos = [x, y, z];
  33570. } else {
  33571. return self2._pos;
  33572. }
  33573. }
  33574. var ids = self2._getSoundIds(id);
  33575. for (var i = 0; i < ids.length; i++) {
  33576. var sound = self2._soundById(ids[i]);
  33577. if (sound) {
  33578. if (typeof x === "number") {
  33579. sound._pos = [x, y, z];
  33580. if (sound._node) {
  33581. if (!sound._panner || sound._panner.pan) {
  33582. setupPanner(sound, "spatial");
  33583. }
  33584. if (typeof sound._panner.positionX !== "undefined") {
  33585. sound._panner.positionX.setValueAtTime(x, Howler.ctx.currentTime);
  33586. sound._panner.positionY.setValueAtTime(y, Howler.ctx.currentTime);
  33587. sound._panner.positionZ.setValueAtTime(z, Howler.ctx.currentTime);
  33588. } else {
  33589. sound._panner.setPosition(x, y, z);
  33590. }
  33591. }
  33592. self2._emit("pos", sound._id);
  33593. } else {
  33594. return sound._pos;
  33595. }
  33596. }
  33597. }
  33598. return self2;
  33599. };
  33600. Howl.prototype.orientation = function(x, y, z, id) {
  33601. var self2 = this;
  33602. if (!self2._webAudio) {
  33603. return self2;
  33604. }
  33605. if (self2._state !== "loaded") {
  33606. self2._queue.push({
  33607. event: "orientation",
  33608. action: function() {
  33609. self2.orientation(x, y, z, id);
  33610. }
  33611. });
  33612. return self2;
  33613. }
  33614. y = typeof y !== "number" ? self2._orientation[1] : y;
  33615. z = typeof z !== "number" ? self2._orientation[2] : z;
  33616. if (typeof id === "undefined") {
  33617. if (typeof x === "number") {
  33618. self2._orientation = [x, y, z];
  33619. } else {
  33620. return self2._orientation;
  33621. }
  33622. }
  33623. var ids = self2._getSoundIds(id);
  33624. for (var i = 0; i < ids.length; i++) {
  33625. var sound = self2._soundById(ids[i]);
  33626. if (sound) {
  33627. if (typeof x === "number") {
  33628. sound._orientation = [x, y, z];
  33629. if (sound._node) {
  33630. if (!sound._panner) {
  33631. if (!sound._pos) {
  33632. sound._pos = self2._pos || [0, 0, -0.5];
  33633. }
  33634. setupPanner(sound, "spatial");
  33635. }
  33636. if (typeof sound._panner.orientationX !== "undefined") {
  33637. sound._panner.orientationX.setValueAtTime(x, Howler.ctx.currentTime);
  33638. sound._panner.orientationY.setValueAtTime(y, Howler.ctx.currentTime);
  33639. sound._panner.orientationZ.setValueAtTime(z, Howler.ctx.currentTime);
  33640. } else {
  33641. sound._panner.setOrientation(x, y, z);
  33642. }
  33643. }
  33644. self2._emit("orientation", sound._id);
  33645. } else {
  33646. return sound._orientation;
  33647. }
  33648. }
  33649. }
  33650. return self2;
  33651. };
  33652. Howl.prototype.pannerAttr = function() {
  33653. var self2 = this;
  33654. var args = arguments;
  33655. var o, id, sound;
  33656. if (!self2._webAudio) {
  33657. return self2;
  33658. }
  33659. if (args.length === 0) {
  33660. return self2._pannerAttr;
  33661. } else if (args.length === 1) {
  33662. if (typeof args[0] === "object") {
  33663. o = args[0];
  33664. if (typeof id === "undefined") {
  33665. if (!o.pannerAttr) {
  33666. o.pannerAttr = {
  33667. coneInnerAngle: o.coneInnerAngle,
  33668. coneOuterAngle: o.coneOuterAngle,
  33669. coneOuterGain: o.coneOuterGain,
  33670. distanceModel: o.distanceModel,
  33671. maxDistance: o.maxDistance,
  33672. refDistance: o.refDistance,
  33673. rolloffFactor: o.rolloffFactor,
  33674. panningModel: o.panningModel
  33675. };
  33676. }
  33677. self2._pannerAttr = {
  33678. coneInnerAngle: typeof o.pannerAttr.coneInnerAngle !== "undefined" ? o.pannerAttr.coneInnerAngle : self2._coneInnerAngle,
  33679. coneOuterAngle: typeof o.pannerAttr.coneOuterAngle !== "undefined" ? o.pannerAttr.coneOuterAngle : self2._coneOuterAngle,
  33680. coneOuterGain: typeof o.pannerAttr.coneOuterGain !== "undefined" ? o.pannerAttr.coneOuterGain : self2._coneOuterGain,
  33681. distanceModel: typeof o.pannerAttr.distanceModel !== "undefined" ? o.pannerAttr.distanceModel : self2._distanceModel,
  33682. maxDistance: typeof o.pannerAttr.maxDistance !== "undefined" ? o.pannerAttr.maxDistance : self2._maxDistance,
  33683. refDistance: typeof o.pannerAttr.refDistance !== "undefined" ? o.pannerAttr.refDistance : self2._refDistance,
  33684. rolloffFactor: typeof o.pannerAttr.rolloffFactor !== "undefined" ? o.pannerAttr.rolloffFactor : self2._rolloffFactor,
  33685. panningModel: typeof o.pannerAttr.panningModel !== "undefined" ? o.pannerAttr.panningModel : self2._panningModel
  33686. };
  33687. }
  33688. } else {
  33689. sound = self2._soundById(parseInt(args[0], 10));
  33690. return sound ? sound._pannerAttr : self2._pannerAttr;
  33691. }
  33692. } else if (args.length === 2) {
  33693. o = args[0];
  33694. id = parseInt(args[1], 10);
  33695. }
  33696. var ids = self2._getSoundIds(id);
  33697. for (var i = 0; i < ids.length; i++) {
  33698. sound = self2._soundById(ids[i]);
  33699. if (sound) {
  33700. var pa = sound._pannerAttr;
  33701. pa = {
  33702. coneInnerAngle: typeof o.coneInnerAngle !== "undefined" ? o.coneInnerAngle : pa.coneInnerAngle,
  33703. coneOuterAngle: typeof o.coneOuterAngle !== "undefined" ? o.coneOuterAngle : pa.coneOuterAngle,
  33704. coneOuterGain: typeof o.coneOuterGain !== "undefined" ? o.coneOuterGain : pa.coneOuterGain,
  33705. distanceModel: typeof o.distanceModel !== "undefined" ? o.distanceModel : pa.distanceModel,
  33706. maxDistance: typeof o.maxDistance !== "undefined" ? o.maxDistance : pa.maxDistance,
  33707. refDistance: typeof o.refDistance !== "undefined" ? o.refDistance : pa.refDistance,
  33708. rolloffFactor: typeof o.rolloffFactor !== "undefined" ? o.rolloffFactor : pa.rolloffFactor,
  33709. panningModel: typeof o.panningModel !== "undefined" ? o.panningModel : pa.panningModel
  33710. };
  33711. var panner = sound._panner;
  33712. if (!panner) {
  33713. if (!sound._pos) {
  33714. sound._pos = self2._pos || [0, 0, -0.5];
  33715. }
  33716. setupPanner(sound, "spatial");
  33717. panner = sound._panner;
  33718. }
  33719. panner.coneInnerAngle = pa.coneInnerAngle;
  33720. panner.coneOuterAngle = pa.coneOuterAngle;
  33721. panner.coneOuterGain = pa.coneOuterGain;
  33722. panner.distanceModel = pa.distanceModel;
  33723. panner.maxDistance = pa.maxDistance;
  33724. panner.refDistance = pa.refDistance;
  33725. panner.rolloffFactor = pa.rolloffFactor;
  33726. panner.panningModel = pa.panningModel;
  33727. }
  33728. }
  33729. return self2;
  33730. };
  33731. Sound.prototype.init = /* @__PURE__ */ function(_super) {
  33732. return function() {
  33733. var self2 = this;
  33734. var parent = self2._parent;
  33735. self2._orientation = parent._orientation;
  33736. self2._stereo = parent._stereo;
  33737. self2._pos = parent._pos;
  33738. self2._pannerAttr = parent._pannerAttr;
  33739. _super.call(this);
  33740. if (self2._stereo) {
  33741. parent.stereo(self2._stereo);
  33742. } else if (self2._pos) {
  33743. parent.pos(self2._pos[0], self2._pos[1], self2._pos[2], self2._id);
  33744. }
  33745. };
  33746. }(Sound.prototype.init);
  33747. Sound.prototype.reset = /* @__PURE__ */ function(_super) {
  33748. return function() {
  33749. var self2 = this;
  33750. var parent = self2._parent;
  33751. self2._orientation = parent._orientation;
  33752. self2._stereo = parent._stereo;
  33753. self2._pos = parent._pos;
  33754. self2._pannerAttr = parent._pannerAttr;
  33755. if (self2._stereo) {
  33756. parent.stereo(self2._stereo);
  33757. } else if (self2._pos) {
  33758. parent.pos(self2._pos[0], self2._pos[1], self2._pos[2], self2._id);
  33759. } else if (self2._panner) {
  33760. self2._panner.disconnect(0);
  33761. self2._panner = void 0;
  33762. parent._refreshBuffer(self2);
  33763. }
  33764. return _super.call(this);
  33765. };
  33766. }(Sound.prototype.reset);
  33767. var setupPanner = function(sound, type2) {
  33768. type2 = type2 || "spatial";
  33769. if (type2 === "spatial") {
  33770. sound._panner = Howler.ctx.createPanner();
  33771. sound._panner.coneInnerAngle = sound._pannerAttr.coneInnerAngle;
  33772. sound._panner.coneOuterAngle = sound._pannerAttr.coneOuterAngle;
  33773. sound._panner.coneOuterGain = sound._pannerAttr.coneOuterGain;
  33774. sound._panner.distanceModel = sound._pannerAttr.distanceModel;
  33775. sound._panner.maxDistance = sound._pannerAttr.maxDistance;
  33776. sound._panner.refDistance = sound._pannerAttr.refDistance;
  33777. sound._panner.rolloffFactor = sound._pannerAttr.rolloffFactor;
  33778. sound._panner.panningModel = sound._pannerAttr.panningModel;
  33779. if (typeof sound._panner.positionX !== "undefined") {
  33780. sound._panner.positionX.setValueAtTime(sound._pos[0], Howler.ctx.currentTime);
  33781. sound._panner.positionY.setValueAtTime(sound._pos[1], Howler.ctx.currentTime);
  33782. sound._panner.positionZ.setValueAtTime(sound._pos[2], Howler.ctx.currentTime);
  33783. } else {
  33784. sound._panner.setPosition(sound._pos[0], sound._pos[1], sound._pos[2]);
  33785. }
  33786. if (typeof sound._panner.orientationX !== "undefined") {
  33787. sound._panner.orientationX.setValueAtTime(sound._orientation[0], Howler.ctx.currentTime);
  33788. sound._panner.orientationY.setValueAtTime(sound._orientation[1], Howler.ctx.currentTime);
  33789. sound._panner.orientationZ.setValueAtTime(sound._orientation[2], Howler.ctx.currentTime);
  33790. } else {
  33791. sound._panner.setOrientation(sound._orientation[0], sound._orientation[1], sound._orientation[2]);
  33792. }
  33793. } else {
  33794. sound._panner = Howler.ctx.createStereoPanner();
  33795. sound._panner.pan.setValueAtTime(sound._stereo, Howler.ctx.currentTime);
  33796. }
  33797. sound._panner.connect(sound._node);
  33798. if (!sound._paused) {
  33799. sound._parent.pause(sound._id, true).play(sound._id, true);
  33800. }
  33801. };
  33802. })();
  33803. })(howler);
  33804. const clickSound = new howler.Howl({
  33805. src: ["./static/bap.mp3"],
  33806. // Use relative path
  33807. html5: true,
  33808. // Force HTML5 Audio to handle mobile playback better
  33809. preload: true,
  33810. // Preload the sound
  33811. volume: 1,
  33812. format: ["mp3"],
  33813. onplay: function() {
  33814. formatAppLog("log", "at config/audioUtil.js:11", "play");
  33815. }
  33816. });
  33817. function playClickSound() {
  33818. formatAppLog("log", "at config/audioUtil.js:16", "Attempting to play click sound");
  33819. if (clickSound.state() === "loaded") {
  33820. clickSound.play();
  33821. } else {
  33822. clickSound.once("load", function() {
  33823. clickSound.play();
  33824. });
  33825. }
  33826. }
  33827. const _sfc_main = {
  33828. __name: "App",
  33829. setup(__props, { expose: __expose }) {
  33830. __expose();
  33831. let touchHandler;
  33832. onLaunch(() => {
  33833. let token = uni.getStorageSync("token");
  33834. if (token) {
  33835. let userInfo = uni.getStorageSync("userInfo");
  33836. if (userInfo) {
  33837. if (userInfo.userId) {
  33838. store.setUserInfo(userInfo);
  33839. }
  33840. }
  33841. }
  33842. touchHandler = (e) => {
  33843. playClickSound();
  33844. };
  33845. var globalEvent = requireNativePlugin("globalEvent");
  33846. globalEvent.addEventListener("touchstart", touchHandler);
  33847. useInit();
  33848. });
  33849. onShow(() => {
  33850. });
  33851. onUnload(() => {
  33852. if (touchHandler) {
  33853. var globalEvent = requireNativePlugin("globalEvent");
  33854. globalEvent.removeEventListener("click", touchHandler);
  33855. touchHandler = null;
  33856. }
  33857. });
  33858. const __returned__ = { get touchHandler() {
  33859. return touchHandler;
  33860. }, set touchHandler(v) {
  33861. touchHandler = v;
  33862. }, get onLaunch() {
  33863. return onLaunch;
  33864. }, get onShow() {
  33865. return onShow;
  33866. }, get onHide() {
  33867. return onHide;
  33868. }, get onUnload() {
  33869. return onUnload;
  33870. }, get store() {
  33871. return store;
  33872. }, get useGlobalEventRemove() {
  33873. return useGlobalEventRemove;
  33874. }, get useInit() {
  33875. return useInit;
  33876. }, get updateActivePageOnShow() {
  33877. return updateActivePageOnShow;
  33878. }, get useRouteMonitor() {
  33879. return useRouteMonitor;
  33880. }, get playClickSound() {
  33881. return playClickSound;
  33882. } };
  33883. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  33884. return __returned__;
  33885. }
  33886. };
  33887. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/书嗨项目/shuhi-app-fornt/App.vue"]]);
  33888. const { toString } = Object.prototype;
  33889. function isArray(val) {
  33890. return toString.call(val) === "[object Array]";
  33891. }
  33892. function isObject(val) {
  33893. return val !== null && typeof val === "object";
  33894. }
  33895. function isDate(val) {
  33896. return toString.call(val) === "[object Date]";
  33897. }
  33898. function isURLSearchParams(val) {
  33899. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  33900. }
  33901. function forEach(obj, fn) {
  33902. if (obj === null || typeof obj === "undefined") {
  33903. return;
  33904. }
  33905. if (typeof obj !== "object") {
  33906. obj = [obj];
  33907. }
  33908. if (isArray(obj)) {
  33909. for (let i = 0, l = obj.length; i < l; i++) {
  33910. fn.call(null, obj[i], i, obj);
  33911. }
  33912. } else {
  33913. for (const key in obj) {
  33914. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  33915. fn.call(null, obj[key], key, obj);
  33916. }
  33917. }
  33918. }
  33919. }
  33920. function isPlainObject(obj) {
  33921. return Object.prototype.toString.call(obj) === "[object Object]";
  33922. }
  33923. function deepMerge$1() {
  33924. const result = {};
  33925. function assignValue(val, key) {
  33926. if (typeof result[key] === "object" && typeof val === "object") {
  33927. result[key] = deepMerge$1(result[key], val);
  33928. } else if (typeof val === "object") {
  33929. result[key] = deepMerge$1({}, val);
  33930. } else {
  33931. result[key] = val;
  33932. }
  33933. }
  33934. for (let i = 0, l = arguments.length; i < l; i++) {
  33935. forEach(arguments[i], assignValue);
  33936. }
  33937. return result;
  33938. }
  33939. function isUndefined(val) {
  33940. return typeof val === "undefined";
  33941. }
  33942. function encode(val) {
  33943. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  33944. }
  33945. function buildURL(url2, params) {
  33946. if (!params) {
  33947. return url2;
  33948. }
  33949. let serializedParams;
  33950. if (isURLSearchParams(params)) {
  33951. serializedParams = params.toString();
  33952. } else {
  33953. const parts = [];
  33954. forEach(params, (val, key) => {
  33955. if (val === null || typeof val === "undefined") {
  33956. return;
  33957. }
  33958. if (isArray(val)) {
  33959. key = `${key}[]`;
  33960. } else {
  33961. val = [val];
  33962. }
  33963. forEach(val, (v) => {
  33964. if (isDate(v)) {
  33965. v = v.toISOString();
  33966. } else if (isObject(v)) {
  33967. v = JSON.stringify(v);
  33968. }
  33969. parts.push(`${encode(key)}=${encode(v)}`);
  33970. });
  33971. });
  33972. serializedParams = parts.join("&");
  33973. }
  33974. if (serializedParams) {
  33975. const hashmarkIndex = url2.indexOf("#");
  33976. if (hashmarkIndex !== -1) {
  33977. url2 = url2.slice(0, hashmarkIndex);
  33978. }
  33979. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  33980. }
  33981. return url2;
  33982. }
  33983. function isAbsoluteURL(url2) {
  33984. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  33985. }
  33986. function combineURLs(baseURL, relativeURL) {
  33987. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  33988. }
  33989. function buildFullPath(baseURL, requestedURL) {
  33990. if (baseURL && !isAbsoluteURL(requestedURL)) {
  33991. return combineURLs(baseURL, requestedURL);
  33992. }
  33993. return requestedURL;
  33994. }
  33995. function settle(resolve, reject, response) {
  33996. const { validateStatus } = response.config;
  33997. const status = response.statusCode;
  33998. if (status && (!validateStatus || validateStatus(status))) {
  33999. resolve(response);
  34000. } else {
  34001. reject(response);
  34002. }
  34003. }
  34004. const mergeKeys$1 = (keys, config2) => {
  34005. const config3 = {};
  34006. keys.forEach((prop) => {
  34007. if (!isUndefined(config2[prop])) {
  34008. config3[prop] = config2[prop];
  34009. }
  34010. });
  34011. return config3;
  34012. };
  34013. const adapter = (config2) => new Promise((resolve, reject) => {
  34014. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  34015. const _config = {
  34016. url: fullPath,
  34017. header: config2.header,
  34018. complete: (response) => {
  34019. config2.fullPath = fullPath;
  34020. response.config = config2;
  34021. try {
  34022. if (typeof response.data === "string") {
  34023. response.data = JSON.parse(response.data);
  34024. }
  34025. } catch (e) {
  34026. }
  34027. settle(resolve, reject, response);
  34028. }
  34029. };
  34030. let requestTask;
  34031. if (config2.method === "UPLOAD") {
  34032. delete _config.header["content-type"];
  34033. delete _config.header["Content-Type"];
  34034. const otherConfig = {
  34035. filePath: config2.filePath,
  34036. name: config2.name
  34037. };
  34038. const optionalKeys = [
  34039. "files",
  34040. "timeout",
  34041. "formData"
  34042. ];
  34043. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  34044. } else if (config2.method === "DOWNLOAD") {
  34045. if (!isUndefined(config2.timeout)) {
  34046. _config.timeout = config2.timeout;
  34047. }
  34048. requestTask = uni.downloadFile(_config);
  34049. } else {
  34050. const optionalKeys = [
  34051. "data",
  34052. "method",
  34053. "timeout",
  34054. "dataType",
  34055. "responseType",
  34056. "sslVerify",
  34057. "firstIpv4"
  34058. ];
  34059. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  34060. }
  34061. if (config2.getTask) {
  34062. config2.getTask(requestTask, config2);
  34063. }
  34064. });
  34065. const dispatchRequest = (config2) => adapter(config2);
  34066. function InterceptorManager() {
  34067. this.handlers = [];
  34068. }
  34069. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  34070. this.handlers.push({
  34071. fulfilled,
  34072. rejected
  34073. });
  34074. return this.handlers.length - 1;
  34075. };
  34076. InterceptorManager.prototype.eject = function eject(id) {
  34077. if (this.handlers[id]) {
  34078. this.handlers[id] = null;
  34079. }
  34080. };
  34081. InterceptorManager.prototype.forEach = function forEach2(fn) {
  34082. this.handlers.forEach((h) => {
  34083. if (h !== null) {
  34084. fn(h);
  34085. }
  34086. });
  34087. };
  34088. const mergeKeys = (keys, globalsConfig, config2) => {
  34089. const config3 = {};
  34090. keys.forEach((prop) => {
  34091. if (!isUndefined(config2[prop])) {
  34092. config3[prop] = config2[prop];
  34093. } else if (!isUndefined(globalsConfig[prop])) {
  34094. config3[prop] = globalsConfig[prop];
  34095. }
  34096. });
  34097. return config3;
  34098. };
  34099. const mergeConfig = (globalsConfig, config2 = {}) => {
  34100. const method = config2.method || globalsConfig.method || "GET";
  34101. let config3 = {
  34102. baseURL: globalsConfig.baseURL || "",
  34103. method,
  34104. url: config2.url || "",
  34105. params: config2.params || {},
  34106. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  34107. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  34108. };
  34109. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  34110. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  34111. if (method === "DOWNLOAD") {
  34112. if (!isUndefined(config2.timeout)) {
  34113. config3.timeout = config2.timeout;
  34114. } else if (!isUndefined(globalsConfig.timeout)) {
  34115. config3.timeout = globalsConfig.timeout;
  34116. }
  34117. } else if (method === "UPLOAD") {
  34118. delete config3.header["content-type"];
  34119. delete config3.header["Content-Type"];
  34120. const uploadKeys = [
  34121. "files",
  34122. "filePath",
  34123. "name",
  34124. "timeout",
  34125. "formData"
  34126. ];
  34127. uploadKeys.forEach((prop) => {
  34128. if (!isUndefined(config2[prop])) {
  34129. config3[prop] = config2[prop];
  34130. }
  34131. });
  34132. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  34133. config3.timeout = globalsConfig.timeout;
  34134. }
  34135. } else {
  34136. const defaultsKeys = [
  34137. "data",
  34138. "timeout",
  34139. "dataType",
  34140. "responseType",
  34141. "sslVerify",
  34142. "firstIpv4"
  34143. ];
  34144. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  34145. }
  34146. return config3;
  34147. };
  34148. const defaults = {
  34149. baseURL: "",
  34150. header: {},
  34151. method: "GET",
  34152. dataType: "json",
  34153. responseType: "text",
  34154. custom: {},
  34155. timeout: 6e4,
  34156. sslVerify: true,
  34157. firstIpv4: false,
  34158. validateStatus: function validateStatus(status) {
  34159. return status >= 200 && status < 300;
  34160. }
  34161. };
  34162. var clone = function() {
  34163. function _instanceof(obj, type2) {
  34164. return type2 != null && obj instanceof type2;
  34165. }
  34166. var nativeMap;
  34167. try {
  34168. nativeMap = Map;
  34169. } catch (_) {
  34170. nativeMap = function() {
  34171. };
  34172. }
  34173. var nativeSet;
  34174. try {
  34175. nativeSet = Set;
  34176. } catch (_) {
  34177. nativeSet = function() {
  34178. };
  34179. }
  34180. var nativePromise;
  34181. try {
  34182. nativePromise = Promise;
  34183. } catch (_) {
  34184. nativePromise = function() {
  34185. };
  34186. }
  34187. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  34188. if (typeof circular === "object") {
  34189. depth = circular.depth;
  34190. prototype = circular.prototype;
  34191. includeNonEnumerable = circular.includeNonEnumerable;
  34192. circular = circular.circular;
  34193. }
  34194. var allParents = [];
  34195. var allChildren = [];
  34196. var useBuffer = typeof Buffer != "undefined";
  34197. if (typeof circular == "undefined")
  34198. circular = true;
  34199. if (typeof depth == "undefined")
  34200. depth = Infinity;
  34201. function _clone(parent2, depth2) {
  34202. if (parent2 === null)
  34203. return null;
  34204. if (depth2 === 0)
  34205. return parent2;
  34206. var child;
  34207. var proto;
  34208. if (typeof parent2 != "object") {
  34209. return parent2;
  34210. }
  34211. if (_instanceof(parent2, nativeMap)) {
  34212. child = new nativeMap();
  34213. } else if (_instanceof(parent2, nativeSet)) {
  34214. child = new nativeSet();
  34215. } else if (_instanceof(parent2, nativePromise)) {
  34216. child = new nativePromise(function(resolve, reject) {
  34217. parent2.then(function(value2) {
  34218. resolve(_clone(value2, depth2 - 1));
  34219. }, function(err) {
  34220. reject(_clone(err, depth2 - 1));
  34221. });
  34222. });
  34223. } else if (clone2.__isArray(parent2)) {
  34224. child = [];
  34225. } else if (clone2.__isRegExp(parent2)) {
  34226. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  34227. if (parent2.lastIndex)
  34228. child.lastIndex = parent2.lastIndex;
  34229. } else if (clone2.__isDate(parent2)) {
  34230. child = new Date(parent2.getTime());
  34231. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  34232. if (Buffer.from) {
  34233. child = Buffer.from(parent2);
  34234. } else {
  34235. child = new Buffer(parent2.length);
  34236. parent2.copy(child);
  34237. }
  34238. return child;
  34239. } else if (_instanceof(parent2, Error)) {
  34240. child = Object.create(parent2);
  34241. } else {
  34242. if (typeof prototype == "undefined") {
  34243. proto = Object.getPrototypeOf(parent2);
  34244. child = Object.create(proto);
  34245. } else {
  34246. child = Object.create(prototype);
  34247. proto = prototype;
  34248. }
  34249. }
  34250. if (circular) {
  34251. var index2 = allParents.indexOf(parent2);
  34252. if (index2 != -1) {
  34253. return allChildren[index2];
  34254. }
  34255. allParents.push(parent2);
  34256. allChildren.push(child);
  34257. }
  34258. if (_instanceof(parent2, nativeMap)) {
  34259. parent2.forEach(function(value2, key) {
  34260. var keyChild = _clone(key, depth2 - 1);
  34261. var valueChild = _clone(value2, depth2 - 1);
  34262. child.set(keyChild, valueChild);
  34263. });
  34264. }
  34265. if (_instanceof(parent2, nativeSet)) {
  34266. parent2.forEach(function(value2) {
  34267. var entryChild = _clone(value2, depth2 - 1);
  34268. child.add(entryChild);
  34269. });
  34270. }
  34271. for (var i in parent2) {
  34272. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  34273. if (attrs) {
  34274. child[i] = _clone(parent2[i], depth2 - 1);
  34275. }
  34276. try {
  34277. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  34278. if (objProperty.set === "undefined") {
  34279. continue;
  34280. }
  34281. child[i] = _clone(parent2[i], depth2 - 1);
  34282. } catch (e) {
  34283. if (e instanceof TypeError) {
  34284. continue;
  34285. } else if (e instanceof ReferenceError) {
  34286. continue;
  34287. }
  34288. }
  34289. }
  34290. if (Object.getOwnPropertySymbols) {
  34291. var symbols = Object.getOwnPropertySymbols(parent2);
  34292. for (var i = 0; i < symbols.length; i++) {
  34293. var symbol = symbols[i];
  34294. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  34295. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  34296. continue;
  34297. }
  34298. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  34299. Object.defineProperty(child, symbol, descriptor);
  34300. }
  34301. }
  34302. if (includeNonEnumerable) {
  34303. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  34304. for (var i = 0; i < allPropertyNames.length; i++) {
  34305. var propertyName = allPropertyNames[i];
  34306. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  34307. if (descriptor && descriptor.enumerable) {
  34308. continue;
  34309. }
  34310. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  34311. Object.defineProperty(child, propertyName, descriptor);
  34312. }
  34313. }
  34314. return child;
  34315. }
  34316. return _clone(parent, depth);
  34317. }
  34318. clone2.clonePrototype = function clonePrototype(parent) {
  34319. if (parent === null)
  34320. return null;
  34321. var c = function() {
  34322. };
  34323. c.prototype = parent;
  34324. return new c();
  34325. };
  34326. function __objToStr(o) {
  34327. return Object.prototype.toString.call(o);
  34328. }
  34329. clone2.__objToStr = __objToStr;
  34330. function __isDate(o) {
  34331. return typeof o === "object" && __objToStr(o) === "[object Date]";
  34332. }
  34333. clone2.__isDate = __isDate;
  34334. function __isArray(o) {
  34335. return typeof o === "object" && __objToStr(o) === "[object Array]";
  34336. }
  34337. clone2.__isArray = __isArray;
  34338. function __isRegExp(o) {
  34339. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  34340. }
  34341. clone2.__isRegExp = __isRegExp;
  34342. function __getRegExpFlags(re) {
  34343. var flags = "";
  34344. if (re.global)
  34345. flags += "g";
  34346. if (re.ignoreCase)
  34347. flags += "i";
  34348. if (re.multiline)
  34349. flags += "m";
  34350. return flags;
  34351. }
  34352. clone2.__getRegExpFlags = __getRegExpFlags;
  34353. return clone2;
  34354. }();
  34355. class Request {
  34356. /**
  34357. * @param {Object} arg - 全局配置
  34358. * @param {String} arg.baseURL - 全局根路径
  34359. * @param {Object} arg.header - 全局header
  34360. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  34361. * @param {String} arg.dataType = [json] - 全局默认的dataType
  34362. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  34363. * @param {Object} arg.custom - 全局默认的自定义参数
  34364. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  34365. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  34366. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  34367. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  34368. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  34369. */
  34370. constructor(arg = {}) {
  34371. if (!isPlainObject(arg)) {
  34372. arg = {};
  34373. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  34374. }
  34375. this.config = clone({ ...defaults, ...arg });
  34376. this.interceptors = {
  34377. request: new InterceptorManager(),
  34378. response: new InterceptorManager()
  34379. };
  34380. }
  34381. /**
  34382. * @Function
  34383. * @param {Request~setConfigCallback} f - 设置全局默认配置
  34384. */
  34385. setConfig(f) {
  34386. this.config = f(this.config);
  34387. }
  34388. middleware(config2) {
  34389. config2 = mergeConfig(this.config, config2);
  34390. const chain = [dispatchRequest, void 0];
  34391. let promise2 = Promise.resolve(config2);
  34392. this.interceptors.request.forEach((interceptor) => {
  34393. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  34394. });
  34395. this.interceptors.response.forEach((interceptor) => {
  34396. chain.push(interceptor.fulfilled, interceptor.rejected);
  34397. });
  34398. while (chain.length) {
  34399. promise2 = promise2.then(chain.shift(), chain.shift());
  34400. }
  34401. return promise2;
  34402. }
  34403. /**
  34404. * @Function
  34405. * @param {Object} config - 请求配置项
  34406. * @prop {String} options.url - 请求路径
  34407. * @prop {Object} options.data - 请求参数
  34408. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  34409. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  34410. * @prop {Object} [options.header = config.header] - 请求header
  34411. * @prop {Object} [options.method = config.method] - 请求方法
  34412. * @returns {Promise<unknown>}
  34413. */
  34414. request(config2 = {}) {
  34415. return this.middleware(config2);
  34416. }
  34417. get(url2, options = {}) {
  34418. return this.middleware({
  34419. url: url2,
  34420. method: "GET",
  34421. ...options
  34422. });
  34423. }
  34424. post(url2, data, options = {}) {
  34425. return this.middleware({
  34426. url: url2,
  34427. data,
  34428. method: "POST",
  34429. ...options
  34430. });
  34431. }
  34432. put(url2, data, options = {}) {
  34433. return this.middleware({
  34434. url: url2,
  34435. data,
  34436. method: "PUT",
  34437. ...options
  34438. });
  34439. }
  34440. delete(url2, data, options = {}) {
  34441. return this.middleware({
  34442. url: url2,
  34443. data,
  34444. method: "DELETE",
  34445. ...options
  34446. });
  34447. }
  34448. options(url2, data, options = {}) {
  34449. return this.middleware({
  34450. url: url2,
  34451. data,
  34452. method: "OPTIONS",
  34453. ...options
  34454. });
  34455. }
  34456. upload(url2, config2 = {}) {
  34457. config2.url = url2;
  34458. config2.method = "UPLOAD";
  34459. return this.middleware(config2);
  34460. }
  34461. download(url2, config2 = {}) {
  34462. config2.url = url2;
  34463. config2.method = "DOWNLOAD";
  34464. return this.middleware(config2);
  34465. }
  34466. }
  34467. class Router {
  34468. constructor() {
  34469. this.config = {
  34470. type: "navigateTo",
  34471. url: "",
  34472. delta: 1,
  34473. // navigateBack页面后退时,回退的层数
  34474. params: {},
  34475. // 传递的参数
  34476. animationType: "pop-in",
  34477. // 窗口动画,只在APP有效
  34478. animationDuration: 300,
  34479. // 窗口动画持续时间,单位毫秒,只在APP有效
  34480. intercept: false
  34481. // 是否需要拦截
  34482. };
  34483. this.route = this.route.bind(this);
  34484. }
  34485. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  34486. addRootPath(url2) {
  34487. return url2[0] === "/" ? url2 : `/${url2}`;
  34488. }
  34489. // 整合路由参数
  34490. mixinParam(url2, params) {
  34491. url2 = url2 && this.addRootPath(url2);
  34492. let query = "";
  34493. if (/.*\/.*\?.*=.*/.test(url2)) {
  34494. query = uni.$u.queryParams(params, false);
  34495. return url2 += `&${query}`;
  34496. }
  34497. query = uni.$u.queryParams(params);
  34498. return url2 += query;
  34499. }
  34500. // 对外的方法名称
  34501. async route(options = {}, params = {}) {
  34502. let mergeConfig2 = {};
  34503. if (typeof options === "string") {
  34504. mergeConfig2.url = this.mixinParam(options, params);
  34505. mergeConfig2.type = "navigateTo";
  34506. } else {
  34507. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  34508. mergeConfig2.url = this.mixinParam(options.url, options.params);
  34509. }
  34510. if (mergeConfig2.url === uni.$u.page())
  34511. return;
  34512. if (params.intercept) {
  34513. this.config.intercept = params.intercept;
  34514. }
  34515. mergeConfig2.params = params;
  34516. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  34517. if (typeof uni.$u.routeIntercept === "function") {
  34518. const isNext = await new Promise((resolve, reject) => {
  34519. uni.$u.routeIntercept(mergeConfig2, resolve);
  34520. });
  34521. isNext && this.openPage(mergeConfig2);
  34522. } else {
  34523. this.openPage(mergeConfig2);
  34524. }
  34525. }
  34526. // 执行路由跳转
  34527. openPage(config2) {
  34528. const {
  34529. url: url2,
  34530. type: type2,
  34531. delta,
  34532. animationType,
  34533. animationDuration
  34534. } = config2;
  34535. if (config2.type == "navigateTo" || config2.type == "to") {
  34536. uni.navigateTo({
  34537. url: url2,
  34538. animationType,
  34539. animationDuration
  34540. });
  34541. }
  34542. if (config2.type == "redirectTo" || config2.type == "redirect") {
  34543. uni.redirectTo({
  34544. url: url2
  34545. });
  34546. }
  34547. if (config2.type == "switchTab" || config2.type == "tab") {
  34548. uni.switchTab({
  34549. url: url2
  34550. });
  34551. }
  34552. if (config2.type == "reLaunch" || config2.type == "launch") {
  34553. uni.reLaunch({
  34554. url: url2
  34555. });
  34556. }
  34557. if (config2.type == "navigateBack" || config2.type == "back") {
  34558. uni.navigateBack({
  34559. delta
  34560. });
  34561. }
  34562. }
  34563. }
  34564. const route = new Router().route;
  34565. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  34566. const startRGB = hexToRgb(startColor, false);
  34567. const startR = startRGB[0];
  34568. const startG = startRGB[1];
  34569. const startB = startRGB[2];
  34570. const endRGB = hexToRgb(endColor, false);
  34571. const endR = endRGB[0];
  34572. const endG = endRGB[1];
  34573. const endB = endRGB[2];
  34574. const sR = (endR - startR) / step;
  34575. const sG = (endG - startG) / step;
  34576. const sB = (endB - startB) / step;
  34577. const colorArr = [];
  34578. for (let i = 0; i < step; i++) {
  34579. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  34580. if (i === 0)
  34581. hex = rgbToHex(startColor);
  34582. if (i === step - 1)
  34583. hex = rgbToHex(endColor);
  34584. colorArr.push(hex);
  34585. }
  34586. return colorArr;
  34587. }
  34588. function hexToRgb(sColor, str = true) {
  34589. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  34590. sColor = String(sColor).toLowerCase();
  34591. if (sColor && reg.test(sColor)) {
  34592. if (sColor.length === 4) {
  34593. let sColorNew = "#";
  34594. for (let i = 1; i < 4; i += 1) {
  34595. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  34596. }
  34597. sColor = sColorNew;
  34598. }
  34599. const sColorChange = [];
  34600. for (let i = 1; i < 7; i += 2) {
  34601. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  34602. }
  34603. if (!str) {
  34604. return sColorChange;
  34605. }
  34606. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  34607. }
  34608. if (/^(rgb|RGB)/.test(sColor)) {
  34609. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  34610. return arr.map((val) => Number(val));
  34611. }
  34612. return sColor;
  34613. }
  34614. function rgbToHex(rgb) {
  34615. const _this = rgb;
  34616. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  34617. if (/^(rgb|RGB)/.test(_this)) {
  34618. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  34619. let strHex = "#";
  34620. for (let i = 0; i < aColor.length; i++) {
  34621. let hex = Number(aColor[i]).toString(16);
  34622. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  34623. if (hex === "0") {
  34624. hex += hex;
  34625. }
  34626. strHex += hex;
  34627. }
  34628. if (strHex.length !== 7) {
  34629. strHex = _this;
  34630. }
  34631. return strHex;
  34632. }
  34633. if (reg.test(_this)) {
  34634. const aNum = _this.replace(/#/, "").split("");
  34635. if (aNum.length === 6) {
  34636. return _this;
  34637. }
  34638. if (aNum.length === 3) {
  34639. let numHex = "#";
  34640. for (let i = 0; i < aNum.length; i += 1) {
  34641. numHex += aNum[i] + aNum[i];
  34642. }
  34643. return numHex;
  34644. }
  34645. } else {
  34646. return _this;
  34647. }
  34648. }
  34649. function colorToRgba(color2, alpha) {
  34650. color2 = rgbToHex(color2);
  34651. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  34652. let sColor = String(color2).toLowerCase();
  34653. if (sColor && reg.test(sColor)) {
  34654. if (sColor.length === 4) {
  34655. let sColorNew = "#";
  34656. for (let i = 1; i < 4; i += 1) {
  34657. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  34658. }
  34659. sColor = sColorNew;
  34660. }
  34661. const sColorChange = [];
  34662. for (let i = 1; i < 7; i += 2) {
  34663. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  34664. }
  34665. return `rgba(${sColorChange.join(",")},${alpha})`;
  34666. }
  34667. return sColor;
  34668. }
  34669. const colorGradient$1 = {
  34670. colorGradient,
  34671. hexToRgb,
  34672. rgbToHex,
  34673. colorToRgba
  34674. };
  34675. function email(value2) {
  34676. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  34677. }
  34678. function mobile(value2) {
  34679. return /^1[23456789]\d{9}$/.test(value2);
  34680. }
  34681. function url(value2) {
  34682. 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);
  34683. }
  34684. function date(value2) {
  34685. if (!value2)
  34686. return false;
  34687. if (number(value2))
  34688. value2 = +value2;
  34689. return !/Invalid|NaN/.test(new Date(value2).toString());
  34690. }
  34691. function dateISO(value2) {
  34692. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  34693. }
  34694. function number(value2) {
  34695. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  34696. }
  34697. function string(value2) {
  34698. return typeof value2 === "string";
  34699. }
  34700. function digits(value2) {
  34701. return /^\d+$/.test(value2);
  34702. }
  34703. function idCard(value2) {
  34704. 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(
  34705. value2
  34706. );
  34707. }
  34708. function carNo(value2) {
  34709. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  34710. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  34711. if (value2.length === 7) {
  34712. return creg.test(value2);
  34713. }
  34714. if (value2.length === 8) {
  34715. return xreg.test(value2);
  34716. }
  34717. return false;
  34718. }
  34719. function amount(value2) {
  34720. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  34721. }
  34722. function chinese(value2) {
  34723. const reg = /^[\u4e00-\u9fa5]+$/gi;
  34724. return reg.test(value2);
  34725. }
  34726. function letter(value2) {
  34727. return /^[a-zA-Z]*$/.test(value2);
  34728. }
  34729. function enOrNum(value2) {
  34730. const reg = /^[0-9a-zA-Z]*$/g;
  34731. return reg.test(value2);
  34732. }
  34733. function contains(value2, param) {
  34734. return value2.indexOf(param) >= 0;
  34735. }
  34736. function range$1(value2, param) {
  34737. return value2 >= param[0] && value2 <= param[1];
  34738. }
  34739. function rangeLength(value2, param) {
  34740. return value2.length >= param[0] && value2.length <= param[1];
  34741. }
  34742. function landline(value2) {
  34743. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  34744. return reg.test(value2);
  34745. }
  34746. function empty(value2) {
  34747. switch (typeof value2) {
  34748. case "undefined":
  34749. return true;
  34750. case "string":
  34751. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  34752. return true;
  34753. break;
  34754. case "boolean":
  34755. if (!value2)
  34756. return true;
  34757. break;
  34758. case "number":
  34759. if (value2 === 0 || isNaN(value2))
  34760. return true;
  34761. break;
  34762. case "object":
  34763. if (value2 === null || value2.length === 0)
  34764. return true;
  34765. for (const i in value2) {
  34766. return false;
  34767. }
  34768. return true;
  34769. }
  34770. return false;
  34771. }
  34772. function jsonString(value2) {
  34773. if (typeof value2 === "string") {
  34774. try {
  34775. const obj = JSON.parse(value2);
  34776. if (typeof obj === "object" && obj) {
  34777. return true;
  34778. }
  34779. return false;
  34780. } catch (e) {
  34781. return false;
  34782. }
  34783. }
  34784. return false;
  34785. }
  34786. function array(value2) {
  34787. if (typeof Array.isArray === "function") {
  34788. return Array.isArray(value2);
  34789. }
  34790. return Object.prototype.toString.call(value2) === "[object Array]";
  34791. }
  34792. function object(value2) {
  34793. return Object.prototype.toString.call(value2) === "[object Object]";
  34794. }
  34795. function code$1(value2, len = 6) {
  34796. return new RegExp(`^\\d{${len}}$`).test(value2);
  34797. }
  34798. function func(value2) {
  34799. return typeof value2 === "function";
  34800. }
  34801. function promise(value2) {
  34802. return object(value2) && func(value2.then) && func(value2.catch);
  34803. }
  34804. function image(value2) {
  34805. const newValue = value2.split("?")[0];
  34806. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  34807. return IMAGE_REGEXP.test(newValue);
  34808. }
  34809. function video(value2) {
  34810. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  34811. return VIDEO_REGEXP.test(value2);
  34812. }
  34813. function regExp(o) {
  34814. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  34815. }
  34816. const test = {
  34817. email,
  34818. mobile,
  34819. url,
  34820. date,
  34821. dateISO,
  34822. number,
  34823. digits,
  34824. idCard,
  34825. carNo,
  34826. amount,
  34827. chinese,
  34828. letter,
  34829. enOrNum,
  34830. contains,
  34831. range: range$1,
  34832. rangeLength,
  34833. empty,
  34834. isEmpty: empty,
  34835. jsonString,
  34836. landline,
  34837. object,
  34838. array,
  34839. code: code$1,
  34840. func,
  34841. promise,
  34842. video,
  34843. image,
  34844. regExp,
  34845. string
  34846. };
  34847. let timeout = null;
  34848. function debounce(func2, wait = 500, immediate = false) {
  34849. if (timeout !== null)
  34850. clearTimeout(timeout);
  34851. if (immediate) {
  34852. const callNow = !timeout;
  34853. timeout = setTimeout(() => {
  34854. timeout = null;
  34855. }, wait);
  34856. if (callNow)
  34857. typeof func2 === "function" && func2();
  34858. } else {
  34859. timeout = setTimeout(() => {
  34860. typeof func2 === "function" && func2();
  34861. }, wait);
  34862. }
  34863. }
  34864. let flag;
  34865. function throttle(func2, wait = 500, immediate = true) {
  34866. if (immediate) {
  34867. if (!flag) {
  34868. flag = true;
  34869. typeof func2 === "function" && func2();
  34870. setTimeout(() => {
  34871. flag = false;
  34872. }, wait);
  34873. }
  34874. } else if (!flag) {
  34875. flag = true;
  34876. setTimeout(() => {
  34877. flag = false;
  34878. typeof func2 === "function" && func2();
  34879. }, wait);
  34880. }
  34881. }
  34882. function strip(num, precision = 15) {
  34883. return +parseFloat(Number(num).toPrecision(precision));
  34884. }
  34885. function digitLength(num) {
  34886. const eSplit = num.toString().split(/[eE]/);
  34887. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  34888. return len > 0 ? len : 0;
  34889. }
  34890. function float2Fixed(num) {
  34891. if (num.toString().indexOf("e") === -1) {
  34892. return Number(num.toString().replace(".", ""));
  34893. }
  34894. const dLen = digitLength(num);
  34895. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  34896. }
  34897. function checkBoundary(num) {
  34898. {
  34899. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  34900. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  34901. }
  34902. }
  34903. }
  34904. function iteratorOperation(arr, operation) {
  34905. const [num1, num2, ...others] = arr;
  34906. let res2 = operation(num1, num2);
  34907. others.forEach((num) => {
  34908. res2 = operation(res2, num);
  34909. });
  34910. return res2;
  34911. }
  34912. function times(...nums) {
  34913. if (nums.length > 2) {
  34914. return iteratorOperation(nums, times);
  34915. }
  34916. const [num1, num2] = nums;
  34917. const num1Changed = float2Fixed(num1);
  34918. const num2Changed = float2Fixed(num2);
  34919. const baseNum = digitLength(num1) + digitLength(num2);
  34920. const leftValue = num1Changed * num2Changed;
  34921. checkBoundary(leftValue);
  34922. return leftValue / Math.pow(10, baseNum);
  34923. }
  34924. function divide(...nums) {
  34925. if (nums.length > 2) {
  34926. return iteratorOperation(nums, divide);
  34927. }
  34928. const [num1, num2] = nums;
  34929. const num1Changed = float2Fixed(num1);
  34930. const num2Changed = float2Fixed(num2);
  34931. checkBoundary(num1Changed);
  34932. checkBoundary(num2Changed);
  34933. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  34934. }
  34935. function round(num, ratio) {
  34936. const base = Math.pow(10, ratio);
  34937. let result = divide(Math.round(Math.abs(times(num, base))), base);
  34938. if (num < 0 && result !== 0) {
  34939. result = times(result, -1);
  34940. }
  34941. return result;
  34942. }
  34943. function range(min = 0, max = 0, value2 = 0) {
  34944. return Math.max(min, Math.min(max, Number(value2)));
  34945. }
  34946. function getPx(value2, unit = false) {
  34947. if (test.number(value2)) {
  34948. return unit ? `${value2}px` : Number(value2);
  34949. }
  34950. if (/(rpx|upx)$/.test(value2)) {
  34951. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  34952. }
  34953. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  34954. }
  34955. function sleep(value2 = 30) {
  34956. return new Promise((resolve) => {
  34957. setTimeout(() => {
  34958. resolve();
  34959. }, value2);
  34960. });
  34961. }
  34962. function os() {
  34963. return uni.getSystemInfoSync().platform.toLowerCase();
  34964. }
  34965. function sys() {
  34966. return uni.getSystemInfoSync();
  34967. }
  34968. function random(min, max) {
  34969. if (min >= 0 && max > 0 && max >= min) {
  34970. const gab = max - min + 1;
  34971. return Math.floor(Math.random() * gab + min);
  34972. }
  34973. return 0;
  34974. }
  34975. function guid(len = 32, firstU = true, radix = null) {
  34976. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  34977. const uuid = [];
  34978. radix = radix || chars.length;
  34979. if (len) {
  34980. for (let i = 0; i < len; i++)
  34981. uuid[i] = chars[0 | Math.random() * radix];
  34982. } else {
  34983. let r;
  34984. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  34985. uuid[14] = "4";
  34986. for (let i = 0; i < 36; i++) {
  34987. if (!uuid[i]) {
  34988. r = 0 | Math.random() * 16;
  34989. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  34990. }
  34991. }
  34992. }
  34993. if (firstU) {
  34994. uuid.shift();
  34995. return `u${uuid.join("")}`;
  34996. }
  34997. return uuid.join("");
  34998. }
  34999. function $parent(name = void 0) {
  35000. let parent = this.$parent;
  35001. while (parent) {
  35002. if (parent.$options && parent.$options.name !== name) {
  35003. parent = parent.$parent;
  35004. } else {
  35005. return parent;
  35006. }
  35007. }
  35008. return false;
  35009. }
  35010. function addStyle(customStyle, target = "object") {
  35011. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  35012. return customStyle;
  35013. }
  35014. if (target === "object") {
  35015. customStyle = trim(customStyle);
  35016. const styleArray = customStyle.split(";");
  35017. const style = {};
  35018. for (let i = 0; i < styleArray.length; i++) {
  35019. if (styleArray[i]) {
  35020. const item = styleArray[i].split(":");
  35021. style[trim(item[0])] = trim(item[1]);
  35022. }
  35023. }
  35024. return style;
  35025. }
  35026. let string2 = "";
  35027. for (const i in customStyle) {
  35028. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  35029. string2 += `${key}:${customStyle[i]};`;
  35030. }
  35031. return trim(string2);
  35032. }
  35033. function addUnit(value2 = "auto", unit = "") {
  35034. if (!unit) {
  35035. unit = uni.$u.config.unit || "px";
  35036. }
  35037. value2 = String(value2);
  35038. return test.number(value2) ? `${value2}${unit}` : value2;
  35039. }
  35040. function deepClone(obj) {
  35041. if ([null, void 0, NaN, false].includes(obj))
  35042. return obj;
  35043. if (typeof obj !== "object" && typeof obj !== "function") {
  35044. return obj;
  35045. }
  35046. const o = test.array(obj) ? [] : {};
  35047. for (const i in obj) {
  35048. if (obj.hasOwnProperty(i)) {
  35049. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  35050. }
  35051. }
  35052. return o;
  35053. }
  35054. function deepMerge(target = {}, source = {}) {
  35055. target = deepClone(target);
  35056. if (typeof target !== "object" || typeof source !== "object")
  35057. return false;
  35058. for (const prop in source) {
  35059. if (!source.hasOwnProperty(prop))
  35060. continue;
  35061. if (prop in target) {
  35062. if (typeof target[prop] !== "object") {
  35063. target[prop] = source[prop];
  35064. } else if (typeof source[prop] !== "object") {
  35065. target[prop] = source[prop];
  35066. } else if (target[prop].concat && source[prop].concat) {
  35067. target[prop] = target[prop].concat(source[prop]);
  35068. } else {
  35069. target[prop] = deepMerge(target[prop], source[prop]);
  35070. }
  35071. } else {
  35072. target[prop] = source[prop];
  35073. }
  35074. }
  35075. return target;
  35076. }
  35077. function error(err) {
  35078. {
  35079. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  35080. }
  35081. }
  35082. function randomArray(array3 = []) {
  35083. return array3.sort(() => Math.random() - 0.5);
  35084. }
  35085. if (!String.prototype.padStart) {
  35086. String.prototype.padStart = function(maxLength, fillString = " ") {
  35087. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  35088. throw new TypeError(
  35089. "fillString must be String"
  35090. );
  35091. }
  35092. const str = this;
  35093. if (str.length >= maxLength)
  35094. return String(str);
  35095. const fillLength = maxLength - str.length;
  35096. let times2 = Math.ceil(fillLength / fillString.length);
  35097. while (times2 >>= 1) {
  35098. fillString += fillString;
  35099. if (times2 === 1) {
  35100. fillString += fillString;
  35101. }
  35102. }
  35103. return fillString.slice(0, fillLength) + str;
  35104. };
  35105. }
  35106. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  35107. let date3;
  35108. if (!dateTime) {
  35109. date3 = /* @__PURE__ */ new Date();
  35110. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  35111. date3 = new Date(dateTime * 1e3);
  35112. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  35113. date3 = new Date(Number(dateTime));
  35114. } else {
  35115. date3 = new Date(
  35116. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  35117. );
  35118. }
  35119. const timeSource = {
  35120. "y": date3.getFullYear().toString(),
  35121. // 年
  35122. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  35123. // 月
  35124. "d": date3.getDate().toString().padStart(2, "0"),
  35125. // 日
  35126. "h": date3.getHours().toString().padStart(2, "0"),
  35127. // 时
  35128. "M": date3.getMinutes().toString().padStart(2, "0"),
  35129. // 分
  35130. "s": date3.getSeconds().toString().padStart(2, "0")
  35131. // 秒
  35132. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  35133. };
  35134. for (const key in timeSource) {
  35135. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  35136. if (ret) {
  35137. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  35138. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  35139. }
  35140. }
  35141. return formatStr;
  35142. }
  35143. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  35144. if (timestamp == null)
  35145. timestamp = Number(/* @__PURE__ */ new Date());
  35146. timestamp = parseInt(timestamp);
  35147. if (timestamp.toString().length == 10)
  35148. timestamp *= 1e3;
  35149. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  35150. timer = parseInt(timer / 1e3);
  35151. let tips = "";
  35152. switch (true) {
  35153. case timer < 300:
  35154. tips = "刚刚";
  35155. break;
  35156. case (timer >= 300 && timer < 3600):
  35157. tips = `${parseInt(timer / 60)}分钟前`;
  35158. break;
  35159. case (timer >= 3600 && timer < 86400):
  35160. tips = `${parseInt(timer / 3600)}小时前`;
  35161. break;
  35162. case (timer >= 86400 && timer < 2592e3):
  35163. tips = `${parseInt(timer / 86400)}天前`;
  35164. break;
  35165. default:
  35166. if (format2 === false) {
  35167. if (timer >= 2592e3 && timer < 365 * 86400) {
  35168. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  35169. } else {
  35170. tips = `${parseInt(timer / (86400 * 365))}年前`;
  35171. }
  35172. } else {
  35173. tips = timeFormat(timestamp, format2);
  35174. }
  35175. }
  35176. return tips;
  35177. }
  35178. function trim(str, pos = "both") {
  35179. str = String(str);
  35180. if (pos == "both") {
  35181. return str.replace(/^\s+|\s+$/g, "");
  35182. }
  35183. if (pos == "left") {
  35184. return str.replace(/^\s*/, "");
  35185. }
  35186. if (pos == "right") {
  35187. return str.replace(/(\s*$)/g, "");
  35188. }
  35189. if (pos == "all") {
  35190. return str.replace(/\s+/g, "");
  35191. }
  35192. return str;
  35193. }
  35194. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  35195. const prefix = isPrefix ? "?" : "";
  35196. const _result = [];
  35197. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  35198. arrayFormat = "brackets";
  35199. for (const key in data) {
  35200. const value2 = data[key];
  35201. if (["", void 0, null].indexOf(value2) >= 0) {
  35202. continue;
  35203. }
  35204. if (value2.constructor === Array) {
  35205. switch (arrayFormat) {
  35206. case "indices":
  35207. for (let i = 0; i < value2.length; i++) {
  35208. _result.push(`${key}[${i}]=${value2[i]}`);
  35209. }
  35210. break;
  35211. case "brackets":
  35212. value2.forEach((_value) => {
  35213. _result.push(`${key}[]=${_value}`);
  35214. });
  35215. break;
  35216. case "repeat":
  35217. value2.forEach((_value) => {
  35218. _result.push(`${key}=${_value}`);
  35219. });
  35220. break;
  35221. case "comma":
  35222. let commaStr = "";
  35223. value2.forEach((_value) => {
  35224. commaStr += (commaStr ? "," : "") + _value;
  35225. });
  35226. _result.push(`${key}=${commaStr}`);
  35227. break;
  35228. default:
  35229. value2.forEach((_value) => {
  35230. _result.push(`${key}[]=${_value}`);
  35231. });
  35232. }
  35233. } else {
  35234. _result.push(`${key}=${value2}`);
  35235. }
  35236. }
  35237. return _result.length ? prefix + _result.join("&") : "";
  35238. }
  35239. function toast(title, duration = 2e3) {
  35240. uni.showToast({
  35241. title: String(title),
  35242. icon: "none",
  35243. duration
  35244. });
  35245. }
  35246. function type2icon(type2 = "success", fill = false) {
  35247. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  35248. type2 = "success";
  35249. let iconName = "";
  35250. switch (type2) {
  35251. case "primary":
  35252. iconName = "info-circle";
  35253. break;
  35254. case "info":
  35255. iconName = "info-circle";
  35256. break;
  35257. case "error":
  35258. iconName = "close-circle";
  35259. break;
  35260. case "warning":
  35261. iconName = "error-circle";
  35262. break;
  35263. case "success":
  35264. iconName = "checkmark-circle";
  35265. break;
  35266. default:
  35267. iconName = "checkmark-circle";
  35268. }
  35269. if (fill)
  35270. iconName += "-fill";
  35271. return iconName;
  35272. }
  35273. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  35274. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  35275. const n = !isFinite(+number3) ? 0 : +number3;
  35276. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  35277. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  35278. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  35279. let s = "";
  35280. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  35281. const re = /(-?\d+)(\d{3})/;
  35282. while (re.test(s[0])) {
  35283. s[0] = s[0].replace(re, `$1${sep}$2`);
  35284. }
  35285. if ((s[1] || "").length < prec) {
  35286. s[1] = s[1] || "";
  35287. s[1] += new Array(prec - s[1].length + 1).join("0");
  35288. }
  35289. return s.join(dec);
  35290. }
  35291. function getDuration(value2, unit = true) {
  35292. const valueNum = parseInt(value2);
  35293. if (unit) {
  35294. if (/s$/.test(value2))
  35295. return value2;
  35296. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  35297. }
  35298. if (/ms$/.test(value2))
  35299. return valueNum;
  35300. if (/s$/.test(value2))
  35301. return valueNum > 30 ? valueNum : valueNum * 1e3;
  35302. return valueNum;
  35303. }
  35304. function padZero(value2) {
  35305. return `00${value2}`.slice(-2);
  35306. }
  35307. function formValidate(instance, event) {
  35308. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  35309. const form = uni.$u.$parent.call(instance, "u-form");
  35310. if (formItem && form) {
  35311. form.validateField(formItem.prop, () => {
  35312. }, event);
  35313. }
  35314. }
  35315. function getProperty(obj, key) {
  35316. if (!obj) {
  35317. return;
  35318. }
  35319. if (typeof key !== "string" || key === "") {
  35320. return "";
  35321. }
  35322. if (key.indexOf(".") !== -1) {
  35323. const keys = key.split(".");
  35324. let firstObj = obj[keys[0]] || {};
  35325. for (let i = 1; i < keys.length; i++) {
  35326. if (firstObj) {
  35327. firstObj = firstObj[keys[i]];
  35328. }
  35329. }
  35330. return firstObj;
  35331. }
  35332. return obj[key];
  35333. }
  35334. function setProperty(obj, key, value2) {
  35335. if (!obj) {
  35336. return;
  35337. }
  35338. const inFn = function(_obj, keys, v) {
  35339. if (keys.length === 1) {
  35340. _obj[keys[0]] = v;
  35341. return;
  35342. }
  35343. while (keys.length > 1) {
  35344. const k = keys[0];
  35345. if (!_obj[k] || typeof _obj[k] !== "object") {
  35346. _obj[k] = {};
  35347. }
  35348. keys.shift();
  35349. inFn(_obj[k], keys, v);
  35350. }
  35351. };
  35352. if (typeof key !== "string" || key === "")
  35353. ;
  35354. else if (key.indexOf(".") !== -1) {
  35355. const keys = key.split(".");
  35356. inFn(obj, keys, value2);
  35357. } else {
  35358. obj[key] = value2;
  35359. }
  35360. }
  35361. function page() {
  35362. const pages2 = getCurrentPages();
  35363. return `/${pages2[pages2.length - 1].route || ""}`;
  35364. }
  35365. function pages() {
  35366. const pages2 = getCurrentPages();
  35367. return pages2;
  35368. }
  35369. function setConfig({
  35370. props: props2 = {},
  35371. config: config2 = {},
  35372. color: color2 = {},
  35373. zIndex: zIndex2 = {}
  35374. }) {
  35375. const {
  35376. deepMerge: deepMerge2
  35377. } = uni.$u;
  35378. uni.$u.config = deepMerge2(uni.$u.config, config2);
  35379. uni.$u.props = deepMerge2(uni.$u.props, props2);
  35380. uni.$u.color = deepMerge2(uni.$u.color, color2);
  35381. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  35382. }
  35383. const index = {
  35384. range,
  35385. getPx,
  35386. sleep,
  35387. os,
  35388. sys,
  35389. random,
  35390. guid,
  35391. $parent,
  35392. addStyle,
  35393. addUnit,
  35394. deepClone,
  35395. deepMerge,
  35396. error,
  35397. randomArray,
  35398. timeFormat,
  35399. timeFrom,
  35400. trim,
  35401. queryParams,
  35402. toast,
  35403. type2icon,
  35404. priceFormat,
  35405. getDuration,
  35406. padZero,
  35407. formValidate,
  35408. getProperty,
  35409. setProperty,
  35410. page,
  35411. pages,
  35412. setConfig
  35413. };
  35414. const zIndex = {
  35415. toast: 10090,
  35416. noNetwork: 10080,
  35417. // popup包含popup,actionsheet,keyboard,picker的值
  35418. popup: 10075,
  35419. mask: 10070,
  35420. navbar: 980,
  35421. topTips: 975,
  35422. sticky: 970,
  35423. indexListSticky: 965
  35424. };
  35425. let platform = "none";
  35426. platform = "vue3";
  35427. platform = "plus";
  35428. const platform$1 = platform;
  35429. const $u = {
  35430. route,
  35431. date: index.timeFormat,
  35432. // 另名date
  35433. colorGradient: colorGradient$1.colorGradient,
  35434. hexToRgb: colorGradient$1.hexToRgb,
  35435. rgbToHex: colorGradient$1.rgbToHex,
  35436. colorToRgba: colorGradient$1.colorToRgba,
  35437. test,
  35438. type: ["primary", "success", "error", "warning", "info"],
  35439. http: new Request(),
  35440. config,
  35441. // uView配置信息相关,比如版本号
  35442. zIndex,
  35443. debounce,
  35444. throttle,
  35445. mixin,
  35446. mpMixin,
  35447. props: props$E,
  35448. ...index,
  35449. color,
  35450. platform: platform$1
  35451. };
  35452. uni.$u = $u;
  35453. const install = (Vue2) => {
  35454. Vue2.config.globalProperties.$u = $u;
  35455. Vue2.config.globalProperties.$nextTick = (cb) => {
  35456. cb();
  35457. };
  35458. Vue2.mixin(mixin);
  35459. };
  35460. const uviewPlus = {
  35461. install
  35462. };
  35463. const share = {
  35464. data() {
  35465. return {
  35466. // 默认的全局分享内容
  35467. share: {
  35468. title: "标题",
  35469. path: "/pages/home/home",
  35470. // 这里是分享的页面
  35471. imageUrl: ""
  35472. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  35473. }
  35474. };
  35475. },
  35476. // 定义全局分享
  35477. // 1.发送给朋友
  35478. onShareAppMessage(res2) {
  35479. return {
  35480. title: this.share.title,
  35481. path: this.share.path,
  35482. imageUrl: this.share.imageUrl
  35483. };
  35484. },
  35485. //2.分享到朋友圈
  35486. onShareTimeline(res2) {
  35487. return {
  35488. title: this.share.title,
  35489. path: this.share.path,
  35490. imageUrl: this.share.imageUrl
  35491. };
  35492. }
  35493. };
  35494. const permission = {
  35495. // 在绑定元素的父组件挂载时调用
  35496. mounted(el, binding) {
  35497. const { value: value2 } = binding;
  35498. const buttonList = uni.getStorageSync("buttonList") || [];
  35499. const hasPermission = checkPermission(value2, buttonList);
  35500. if (!hasPermission) {
  35501. el.parentNode && el.parentNode.removeChild(el);
  35502. }
  35503. }
  35504. };
  35505. function checkPermission(permission2, buttonList) {
  35506. if (!permission2 || !buttonList || buttonList.length === 0) {
  35507. return false;
  35508. }
  35509. if (buttonList.includes("*:*:*")) {
  35510. return true;
  35511. }
  35512. return buttonList.includes(permission2);
  35513. }
  35514. const permissionDirective = {
  35515. install(app) {
  35516. app.directive("permission", permission);
  35517. }
  35518. };
  35519. let ttsModule = new VolumeTTS();
  35520. useInit();
  35521. uni.$u.ttsModule = ttsModule;
  35522. uni.$u.useGlobalEvent = useGlobalEvent;
  35523. uni.$u.updateActivePageOnShow = updateActivePageOnShow;
  35524. function createApp() {
  35525. const app = vue.createVueApp(App);
  35526. initRequest();
  35527. const pinia2 = createPinia();
  35528. app.use(pinia2).use(uviewPlus).use(permissionDirective);
  35529. app.mixin(share);
  35530. return {
  35531. app,
  35532. pinia: pinia2
  35533. };
  35534. }
  35535. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  35536. uni.Vuex = __Vuex__;
  35537. uni.Pinia = __Pinia__;
  35538. __app__.provide("__globalStyles", __uniConfig.styles);
  35539. __app__._component.mpType = "app";
  35540. __app__._component.render = () => {
  35541. };
  35542. __app__.mount("#app");
  35543. })(Vue);