app-service.js 621 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888
  1. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  2. Promise.prototype.finally = function(callback) {
  3. const promise = this.constructor;
  4. return this.then(
  5. (value) => promise.resolve(callback()).then(() => value),
  6. (reason) => promise.resolve(callback()).then(() => {
  7. throw reason;
  8. })
  9. );
  10. };
  11. }
  12. ;
  13. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  14. const global2 = uni.requireGlobal();
  15. ArrayBuffer = global2.ArrayBuffer;
  16. Int8Array = global2.Int8Array;
  17. Uint8Array = global2.Uint8Array;
  18. Uint8ClampedArray = global2.Uint8ClampedArray;
  19. Int16Array = global2.Int16Array;
  20. Uint16Array = global2.Uint16Array;
  21. Int32Array = global2.Int32Array;
  22. Uint32Array = global2.Uint32Array;
  23. Float32Array = global2.Float32Array;
  24. Float64Array = global2.Float64Array;
  25. BigInt64Array = global2.BigInt64Array;
  26. BigUint64Array = global2.BigUint64Array;
  27. }
  28. ;
  29. if (uni.restoreGlobal) {
  30. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  31. }
  32. (function(vue) {
  33. "use strict";
  34. const _export_sfc = (sfc, props2) => {
  35. const target = sfc.__vccOpts || sfc;
  36. for (const [key, val] of props2) {
  37. target[key] = val;
  38. }
  39. return target;
  40. };
  41. const _sfc_main$1q = {
  42. __name: "index",
  43. setup(__props, { expose: __expose }) {
  44. __expose();
  45. const expressOperations = vue.ref([
  46. {
  47. name: "中转签收",
  48. path: "/pages/index/express/transfer-sign",
  49. type: "primary"
  50. },
  51. {
  52. name: "到仓签收",
  53. path: "/pages/index/express/warehouse-sign",
  54. type: "warning"
  55. },
  56. {
  57. name: "重量修改",
  58. path: "/pages/index/express/weight-modify",
  59. type: "primary"
  60. },
  61. {
  62. name: "快速验收",
  63. path: "/pages/index/express/quick-check",
  64. type: "warning"
  65. },
  66. {
  67. name: "路由签收异常",
  68. path: "/pages/index/express/route-exception",
  69. type: "primary"
  70. },
  71. {
  72. name: "快速拆包",
  73. path: "/pages/index/express/quick-unpack",
  74. type: "warning"
  75. }
  76. ]);
  77. const auditOperations = vue.ref([
  78. {
  79. name: "确认收货",
  80. path: "/pages/index/audit/confirm-receipt",
  81. type: "primary"
  82. },
  83. {
  84. name: "扫书查单",
  85. path: "/pages/index/audit/scan-order",
  86. type: "warning"
  87. },
  88. {
  89. name: "根据快递单或订单",
  90. path: "/pages/index/audit/express-order",
  91. type: "warning"
  92. },
  93. {
  94. name: "根据发件人",
  95. path: "/pages/index/audit/sender",
  96. type: "primary"
  97. }
  98. ]);
  99. const wmsOperations = vue.ref([
  100. {
  101. name: "中等入库",
  102. path: "/pages/index/wms/medium-in",
  103. type: "primary"
  104. },
  105. {
  106. name: "良品入库",
  107. path: "/pages/index/wms/good-in",
  108. type: "warning"
  109. },
  110. {
  111. name: "次品入库",
  112. path: "/pages/index/wms/secondary-in",
  113. type: "primary"
  114. },
  115. {
  116. name: "不良入库",
  117. path: "/pages/index/wms/bad-in",
  118. type: "warning"
  119. },
  120. {
  121. name: "不良出库",
  122. path: "/pages/index/wms/bad-out",
  123. type: "primary"
  124. },
  125. {
  126. name: "不良下架",
  127. path: "/pages/index/wms/bad-off",
  128. type: "warning"
  129. },
  130. {
  131. name: "订单查询",
  132. path: "/pages/index/wms/order-query",
  133. type: "primary"
  134. },
  135. {
  136. name: "库位订单",
  137. path: "/pages/index/wms/location-order",
  138. type: "warning"
  139. },
  140. {
  141. name: "快速盘点",
  142. path: "/pages/index/wms/speedy-check",
  143. type: "primary",
  144. span: 24
  145. }
  146. ]);
  147. const statisticsOperations = vue.ref([
  148. {
  149. name: "审核统计",
  150. path: "/pages/index/statistics/audit",
  151. type: "warning",
  152. span: 24
  153. },
  154. {
  155. name: "售后统计",
  156. path: "/pages/index/statistics/after-sale",
  157. type: "primary"
  158. },
  159. {
  160. name: "打包统计",
  161. path: "/pages/index/statistics/package",
  162. type: "warning"
  163. }
  164. ]);
  165. const offlineOperations = vue.ref([
  166. {
  167. name: "线下核单",
  168. path: "/pages/index/offline/check-order",
  169. type: "primary"
  170. },
  171. {
  172. name: "核单记录",
  173. path: "/pages/index/offline/check-record",
  174. type: "warning"
  175. }
  176. ]);
  177. const entryOperations = vue.ref([
  178. {
  179. name: "扫码查书",
  180. path: "/pages/index/entry/scan-book",
  181. type: "primary"
  182. },
  183. {
  184. name: "录入书籍重量",
  185. path: "/pages/index/entry/book-weight",
  186. type: "warning"
  187. }
  188. ]);
  189. const handleNavigation = (path) => {
  190. uni.navigateTo({
  191. url: path,
  192. fail: () => {
  193. uni.showToast({
  194. title: "页面跳转失败",
  195. icon: "none"
  196. });
  197. }
  198. });
  199. };
  200. const __returned__ = { expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref };
  201. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  202. return __returned__;
  203. }
  204. };
  205. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  206. return vue.openBlock(), vue.createElementBlock("view", { class: "operation-container" }, [
  207. vue.createCommentVNode(" 快递操作区域 "),
  208. vue.createElementVNode("view", { class: "section" }, [
  209. vue.createElementVNode("view", { class: "section-title" }, "快递"),
  210. vue.createElementVNode("view", { class: "grid-container" }, [
  211. (vue.openBlock(true), vue.createElementBlock(
  212. vue.Fragment,
  213. null,
  214. vue.renderList($setup.expressOperations, (item, index2) => {
  215. return vue.openBlock(), vue.createElementBlock("view", {
  216. key: index2,
  217. class: vue.normalizeClass(["grid-item", item.type]),
  218. onClick: ($event) => $setup.handleNavigation(item.path)
  219. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  220. }),
  221. 128
  222. /* KEYED_FRAGMENT */
  223. ))
  224. ])
  225. ]),
  226. vue.createCommentVNode(" 审核操作区域 "),
  227. vue.createElementVNode("view", { class: "section" }, [
  228. vue.createElementVNode("view", { class: "section-title" }, "审核"),
  229. vue.createElementVNode("view", { class: "grid-container" }, [
  230. (vue.openBlock(true), vue.createElementBlock(
  231. vue.Fragment,
  232. null,
  233. vue.renderList($setup.auditOperations, (item, index2) => {
  234. return vue.openBlock(), vue.createElementBlock("view", {
  235. key: index2,
  236. class: vue.normalizeClass(["grid-item", item.type]),
  237. onClick: ($event) => $setup.handleNavigation(item.path)
  238. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  239. }),
  240. 128
  241. /* KEYED_FRAGMENT */
  242. ))
  243. ])
  244. ]),
  245. vue.createCommentVNode(" 统计操作区域 "),
  246. vue.createElementVNode("view", { class: "section" }, [
  247. vue.createElementVNode("view", { class: "section-title" }, "统计"),
  248. vue.createElementVNode("view", { class: "grid-container" }, [
  249. (vue.openBlock(true), vue.createElementBlock(
  250. vue.Fragment,
  251. null,
  252. vue.renderList($setup.statisticsOperations, (item, index2) => {
  253. return vue.openBlock(), vue.createElementBlock("view", {
  254. key: index2,
  255. class: vue.normalizeClass(["grid-item", item.type]),
  256. onClick: ($event) => $setup.handleNavigation(item.path)
  257. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  258. }),
  259. 128
  260. /* KEYED_FRAGMENT */
  261. ))
  262. ])
  263. ]),
  264. vue.createCommentVNode(" WMS操作区域 "),
  265. vue.createElementVNode("view", { class: "section" }, [
  266. vue.createElementVNode("view", { class: "section-title" }, "WMS操作"),
  267. vue.createElementVNode("view", { class: "grid-container" }, [
  268. (vue.openBlock(true), vue.createElementBlock(
  269. vue.Fragment,
  270. null,
  271. vue.renderList($setup.wmsOperations, (item, index2) => {
  272. return vue.openBlock(), vue.createElementBlock("view", {
  273. key: index2,
  274. class: vue.normalizeClass(["grid-item", item.type]),
  275. onClick: ($event) => $setup.handleNavigation(item.path)
  276. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  277. }),
  278. 128
  279. /* KEYED_FRAGMENT */
  280. ))
  281. ])
  282. ]),
  283. vue.createCommentVNode(" 线下核单 "),
  284. vue.createElementVNode("view", { class: "section" }, [
  285. vue.createElementVNode("view", { class: "section-title" }, "线下核单"),
  286. vue.createElementVNode("view", { class: "grid-container" }, [
  287. (vue.openBlock(true), vue.createElementBlock(
  288. vue.Fragment,
  289. null,
  290. vue.renderList($setup.offlineOperations, (item, index2) => {
  291. return vue.openBlock(), vue.createElementBlock("view", {
  292. key: index2,
  293. class: vue.normalizeClass(["grid-item", item.type]),
  294. onClick: ($event) => $setup.handleNavigation(item.path)
  295. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  296. }),
  297. 128
  298. /* KEYED_FRAGMENT */
  299. ))
  300. ])
  301. ]),
  302. vue.createCommentVNode(" 录入信息 "),
  303. vue.createElementVNode("view", { class: "section" }, [
  304. vue.createElementVNode("view", { class: "section-title" }, "录入信息"),
  305. vue.createElementVNode("view", { class: "grid-container" }, [
  306. (vue.openBlock(true), vue.createElementBlock(
  307. vue.Fragment,
  308. null,
  309. vue.renderList($setup.entryOperations, (item, index2) => {
  310. return vue.openBlock(), vue.createElementBlock("view", {
  311. key: index2,
  312. class: vue.normalizeClass(["grid-item", item.type]),
  313. onClick: ($event) => $setup.handleNavigation(item.path)
  314. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  315. }),
  316. 128
  317. /* KEYED_FRAGMENT */
  318. ))
  319. ])
  320. ])
  321. ]);
  322. }
  323. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/index.vue"]]);
  324. const icons = {
  325. "uicon-level": "",
  326. "uicon-column-line": "",
  327. "uicon-checkbox-mark": "",
  328. "uicon-folder": "",
  329. "uicon-movie": "",
  330. "uicon-star-fill": "",
  331. "uicon-star": "",
  332. "uicon-phone-fill": "",
  333. "uicon-phone": "",
  334. "uicon-apple-fill": "",
  335. "uicon-chrome-circle-fill": "",
  336. "uicon-backspace": "",
  337. "uicon-attach": "",
  338. "uicon-cut": "",
  339. "uicon-empty-car": "",
  340. "uicon-empty-coupon": "",
  341. "uicon-empty-address": "",
  342. "uicon-empty-favor": "",
  343. "uicon-empty-permission": "",
  344. "uicon-empty-news": "",
  345. "uicon-empty-search": "",
  346. "uicon-github-circle-fill": "",
  347. "uicon-rmb": "",
  348. "uicon-person-delete-fill": "",
  349. "uicon-reload": "",
  350. "uicon-order": "",
  351. "uicon-server-man": "",
  352. "uicon-search": "",
  353. "uicon-fingerprint": "",
  354. "uicon-more-dot-fill": "",
  355. "uicon-scan": "",
  356. "uicon-share-square": "",
  357. "uicon-map": "",
  358. "uicon-map-fill": "",
  359. "uicon-tags": "",
  360. "uicon-tags-fill": "",
  361. "uicon-bookmark-fill": "",
  362. "uicon-bookmark": "",
  363. "uicon-eye": "",
  364. "uicon-eye-fill": "",
  365. "uicon-mic": "",
  366. "uicon-mic-off": "",
  367. "uicon-calendar": "",
  368. "uicon-calendar-fill": "",
  369. "uicon-trash": "",
  370. "uicon-trash-fill": "",
  371. "uicon-play-left": "",
  372. "uicon-play-right": "",
  373. "uicon-minus": "",
  374. "uicon-plus": "",
  375. "uicon-info": "",
  376. "uicon-info-circle": "",
  377. "uicon-info-circle-fill": "",
  378. "uicon-question": "",
  379. "uicon-error": "",
  380. "uicon-close": "",
  381. "uicon-checkmark": "",
  382. "uicon-android-circle-fill": "",
  383. "uicon-android-fill": "",
  384. "uicon-ie": "",
  385. "uicon-IE-circle-fill": "",
  386. "uicon-google": "",
  387. "uicon-google-circle-fill": "",
  388. "uicon-setting-fill": "",
  389. "uicon-setting": "",
  390. "uicon-minus-square-fill": "",
  391. "uicon-plus-square-fill": "",
  392. "uicon-heart": "",
  393. "uicon-heart-fill": "",
  394. "uicon-camera": "",
  395. "uicon-camera-fill": "",
  396. "uicon-more-circle": "",
  397. "uicon-more-circle-fill": "",
  398. "uicon-chat": "",
  399. "uicon-chat-fill": "",
  400. "uicon-bag-fill": "",
  401. "uicon-bag": "",
  402. "uicon-error-circle-fill": "",
  403. "uicon-error-circle": "",
  404. "uicon-close-circle": "",
  405. "uicon-close-circle-fill": "",
  406. "uicon-checkmark-circle": "",
  407. "uicon-checkmark-circle-fill": "",
  408. "uicon-question-circle-fill": "",
  409. "uicon-question-circle": "",
  410. "uicon-share": "",
  411. "uicon-share-fill": "",
  412. "uicon-shopping-cart": "",
  413. "uicon-shopping-cart-fill": "",
  414. "uicon-bell": "",
  415. "uicon-bell-fill": "",
  416. "uicon-list": "",
  417. "uicon-list-dot": "",
  418. "uicon-zhihu": "",
  419. "uicon-zhihu-circle-fill": "",
  420. "uicon-zhifubao": "",
  421. "uicon-zhifubao-circle-fill": "",
  422. "uicon-weixin-circle-fill": "",
  423. "uicon-weixin-fill": "",
  424. "uicon-twitter-circle-fill": "",
  425. "uicon-twitter": "",
  426. "uicon-taobao-circle-fill": "",
  427. "uicon-taobao": "",
  428. "uicon-weibo-circle-fill": "",
  429. "uicon-weibo": "",
  430. "uicon-qq-fill": "",
  431. "uicon-qq-circle-fill": "",
  432. "uicon-moments-circel-fill": "",
  433. "uicon-moments": "",
  434. "uicon-qzone": "",
  435. "uicon-qzone-circle-fill": "",
  436. "uicon-baidu-circle-fill": "",
  437. "uicon-baidu": "",
  438. "uicon-facebook-circle-fill": "",
  439. "uicon-facebook": "",
  440. "uicon-car": "",
  441. "uicon-car-fill": "",
  442. "uicon-warning-fill": "",
  443. "uicon-warning": "",
  444. "uicon-clock-fill": "",
  445. "uicon-clock": "",
  446. "uicon-edit-pen": "",
  447. "uicon-edit-pen-fill": "",
  448. "uicon-email": "",
  449. "uicon-email-fill": "",
  450. "uicon-minus-circle": "",
  451. "uicon-minus-circle-fill": "",
  452. "uicon-plus-circle": "",
  453. "uicon-plus-circle-fill": "",
  454. "uicon-file-text": "",
  455. "uicon-file-text-fill": "",
  456. "uicon-pushpin": "",
  457. "uicon-pushpin-fill": "",
  458. "uicon-grid": "",
  459. "uicon-grid-fill": "",
  460. "uicon-play-circle": "",
  461. "uicon-play-circle-fill": "",
  462. "uicon-pause-circle-fill": "",
  463. "uicon-pause": "",
  464. "uicon-pause-circle": "",
  465. "uicon-eye-off": "",
  466. "uicon-eye-off-outline": "",
  467. "uicon-gift-fill": "",
  468. "uicon-gift": "",
  469. "uicon-rmb-circle-fill": "",
  470. "uicon-rmb-circle": "",
  471. "uicon-kefu-ermai": "",
  472. "uicon-server-fill": "",
  473. "uicon-coupon-fill": "",
  474. "uicon-coupon": "",
  475. "uicon-integral": "",
  476. "uicon-integral-fill": "",
  477. "uicon-home-fill": "",
  478. "uicon-home": "",
  479. "uicon-hourglass-half-fill": "",
  480. "uicon-hourglass": "",
  481. "uicon-account": "",
  482. "uicon-plus-people-fill": "",
  483. "uicon-minus-people-fill": "",
  484. "uicon-account-fill": "",
  485. "uicon-thumb-down-fill": "",
  486. "uicon-thumb-down": "",
  487. "uicon-thumb-up": "",
  488. "uicon-thumb-up-fill": "",
  489. "uicon-lock-fill": "",
  490. "uicon-lock-open": "",
  491. "uicon-lock-opened-fill": "",
  492. "uicon-lock": "",
  493. "uicon-red-packet-fill": "",
  494. "uicon-photo-fill": "",
  495. "uicon-photo": "",
  496. "uicon-volume-off-fill": "",
  497. "uicon-volume-off": "",
  498. "uicon-volume-fill": "",
  499. "uicon-volume": "",
  500. "uicon-red-packet": "",
  501. "uicon-download": "",
  502. "uicon-arrow-up-fill": "",
  503. "uicon-arrow-down-fill": "",
  504. "uicon-play-left-fill": "",
  505. "uicon-play-right-fill": "",
  506. "uicon-rewind-left-fill": "",
  507. "uicon-rewind-right-fill": "",
  508. "uicon-arrow-downward": "",
  509. "uicon-arrow-leftward": "",
  510. "uicon-arrow-rightward": "",
  511. "uicon-arrow-upward": "",
  512. "uicon-arrow-down": "",
  513. "uicon-arrow-right": "",
  514. "uicon-arrow-left": "",
  515. "uicon-arrow-up": "",
  516. "uicon-skip-back-left": "",
  517. "uicon-skip-forward-right": "",
  518. "uicon-rewind-right": "",
  519. "uicon-rewind-left": "",
  520. "uicon-arrow-right-double": "",
  521. "uicon-arrow-left-double": "",
  522. "uicon-wifi-off": "",
  523. "uicon-wifi": "",
  524. "uicon-empty-data": "",
  525. "uicon-empty-history": "",
  526. "uicon-empty-list": "",
  527. "uicon-empty-page": "",
  528. "uicon-empty-order": "",
  529. "uicon-man": "",
  530. "uicon-woman": "",
  531. "uicon-man-add": "",
  532. "uicon-man-add-fill": "",
  533. "uicon-man-delete": "",
  534. "uicon-man-delete-fill": "",
  535. "uicon-zh": "",
  536. "uicon-en": ""
  537. };
  538. const ON_SHOW = "onShow";
  539. const ON_HIDE = "onHide";
  540. const ON_LAUNCH = "onLaunch";
  541. function requireNativePlugin(name) {
  542. return weex.requireModule(name);
  543. }
  544. function formatAppLog(type2, filename, ...args) {
  545. if (uni.__log__) {
  546. uni.__log__(type2, filename, ...args);
  547. } else {
  548. console[type2].apply(console, [...args, filename]);
  549. }
  550. }
  551. function resolveEasycom(component, easycom) {
  552. return typeof component === "string" ? easycom : component;
  553. }
  554. const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
  555. !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
  556. };
  557. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  558. const onHide = /* @__PURE__ */ createHook(ON_HIDE);
  559. const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
  560. const version = "3";
  561. {
  562. formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", `
  563. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  564. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  565. }
  566. const config = {
  567. v: version,
  568. version,
  569. // 主题名称
  570. type: [
  571. "primary",
  572. "success",
  573. "info",
  574. "error",
  575. "warning"
  576. ],
  577. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  578. color: {
  579. "u-primary": "#2979ff",
  580. "u-warning": "#ff9900",
  581. "u-success": "#19be6b",
  582. "u-error": "#fa3534",
  583. "u-info": "#909399",
  584. "u-main-color": "#303133",
  585. "u-content-color": "#606266",
  586. "u-tips-color": "#909399",
  587. "u-light-color": "#c0c4cc"
  588. },
  589. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  590. unit: "px"
  591. };
  592. const ActionSheet = {
  593. // action-sheet组件
  594. actionSheet: {
  595. show: false,
  596. title: "",
  597. description: "",
  598. actions: () => [],
  599. index: "",
  600. cancelText: "",
  601. closeOnClickAction: true,
  602. safeAreaInsetBottom: true,
  603. openType: "",
  604. closeOnClickOverlay: true,
  605. round: 0
  606. }
  607. };
  608. const Album = {
  609. // album 组件
  610. album: {
  611. urls: () => [],
  612. keyName: "",
  613. singleSize: 180,
  614. multipleSize: 70,
  615. space: 6,
  616. singleMode: "scaleToFill",
  617. multipleMode: "aspectFill",
  618. maxCount: 9,
  619. previewFullImage: true,
  620. rowCount: 3,
  621. showMore: true
  622. }
  623. };
  624. const Alert = {
  625. // alert警告组件
  626. alert: {
  627. title: "",
  628. type: "warning",
  629. description: "",
  630. closable: false,
  631. showIcon: false,
  632. effect: "light",
  633. center: false,
  634. fontSize: 14
  635. }
  636. };
  637. const Avatar = {
  638. // avatar 组件
  639. avatar: {
  640. src: "",
  641. shape: "circle",
  642. size: 40,
  643. mode: "scaleToFill",
  644. text: "",
  645. bgColor: "#c0c4cc",
  646. color: "#ffffff",
  647. fontSize: 18,
  648. icon: "",
  649. mpAvatar: false,
  650. randomBgColor: false,
  651. defaultUrl: "",
  652. colorIndex: "",
  653. name: ""
  654. }
  655. };
  656. const AvatarGroup = {
  657. // avatarGroup 组件
  658. avatarGroup: {
  659. urls: () => [],
  660. maxCount: 5,
  661. shape: "circle",
  662. mode: "scaleToFill",
  663. showMore: true,
  664. size: 40,
  665. keyName: "",
  666. gap: 0.5,
  667. extraValue: 0
  668. }
  669. };
  670. const Backtop = {
  671. // backtop组件
  672. backtop: {
  673. mode: "circle",
  674. icon: "arrow-upward",
  675. text: "",
  676. duration: 100,
  677. scrollTop: 0,
  678. top: 400,
  679. bottom: 100,
  680. right: 20,
  681. zIndex: 9,
  682. iconStyle: () => ({
  683. color: "#909399",
  684. fontSize: "19px"
  685. })
  686. }
  687. };
  688. const Badge = {
  689. // 徽标数组件
  690. badge: {
  691. isDot: false,
  692. value: "",
  693. show: true,
  694. max: 999,
  695. type: "error",
  696. showZero: false,
  697. bgColor: null,
  698. color: null,
  699. shape: "circle",
  700. numberType: "overflow",
  701. offset: () => [],
  702. inverted: false,
  703. absolute: false
  704. }
  705. };
  706. const Button = {
  707. // button组件
  708. button: {
  709. hairline: false,
  710. type: "info",
  711. size: "normal",
  712. shape: "square",
  713. plain: false,
  714. disabled: false,
  715. loading: false,
  716. loadingText: "",
  717. loadingMode: "spinner",
  718. loadingSize: 15,
  719. openType: "",
  720. formType: "",
  721. appParameter: "",
  722. hoverStopPropagation: true,
  723. lang: "en",
  724. sessionFrom: "",
  725. sendMessageTitle: "",
  726. sendMessagePath: "",
  727. sendMessageImg: "",
  728. showMessageCard: false,
  729. dataName: "",
  730. throttleTime: 0,
  731. hoverStartTime: 0,
  732. hoverStayTime: 200,
  733. text: "",
  734. icon: "",
  735. iconColor: "",
  736. color: ""
  737. }
  738. };
  739. const Calendar = {
  740. // calendar 组件
  741. calendar: {
  742. title: "日期选择",
  743. showTitle: true,
  744. showSubtitle: true,
  745. mode: "single",
  746. startText: "开始",
  747. endText: "结束",
  748. customList: () => [],
  749. color: "#3c9cff",
  750. minDate: 0,
  751. maxDate: 0,
  752. defaultDate: null,
  753. maxCount: Number.MAX_SAFE_INTEGER,
  754. // Infinity
  755. rowHeight: 56,
  756. formatter: null,
  757. showLunar: false,
  758. showMark: true,
  759. confirmText: "确定",
  760. confirmDisabledText: "确定",
  761. show: false,
  762. closeOnClickOverlay: false,
  763. readonly: false,
  764. showConfirm: true,
  765. maxRange: Number.MAX_SAFE_INTEGER,
  766. // Infinity
  767. rangePrompt: "",
  768. showRangePrompt: true,
  769. allowSameDay: false,
  770. round: 0,
  771. monthNum: 3
  772. }
  773. };
  774. const CarKeyboard = {
  775. // 车牌号键盘
  776. carKeyboard: {
  777. random: false
  778. }
  779. };
  780. const Cell = {
  781. // cell组件的props
  782. cell: {
  783. customClass: "",
  784. title: "",
  785. label: "",
  786. value: "",
  787. icon: "",
  788. disabled: false,
  789. border: true,
  790. center: false,
  791. url: "",
  792. linkType: "navigateTo",
  793. clickable: false,
  794. isLink: false,
  795. required: false,
  796. arrowDirection: "",
  797. iconStyle: {},
  798. rightIconStyle: {},
  799. rightIcon: "arrow-right",
  800. titleStyle: {},
  801. size: "",
  802. stop: true,
  803. name: ""
  804. }
  805. };
  806. const CellGroup = {
  807. // cell-group组件的props
  808. cellGroup: {
  809. title: "",
  810. border: true,
  811. customStyle: {}
  812. }
  813. };
  814. const Checkbox = {
  815. // checkbox组件
  816. checkbox: {
  817. name: "",
  818. shape: "",
  819. size: "",
  820. checkbox: false,
  821. disabled: "",
  822. activeColor: "",
  823. inactiveColor: "",
  824. iconSize: "",
  825. iconColor: "",
  826. label: "",
  827. labelSize: "",
  828. labelColor: "",
  829. labelDisabled: ""
  830. }
  831. };
  832. const CheckboxGroup = {
  833. // checkbox-group组件
  834. checkboxGroup: {
  835. name: "",
  836. value: () => [],
  837. shape: "square",
  838. disabled: false,
  839. activeColor: "#2979ff",
  840. inactiveColor: "#c8c9cc",
  841. size: 18,
  842. placement: "row",
  843. labelSize: 14,
  844. labelColor: "#303133",
  845. labelDisabled: false,
  846. iconColor: "#ffffff",
  847. iconSize: 12,
  848. iconPlacement: "left",
  849. borderBottom: false
  850. }
  851. };
  852. const CircleProgress = {
  853. // circleProgress 组件
  854. circleProgress: {
  855. percentage: 30
  856. }
  857. };
  858. const Code = {
  859. // code 组件
  860. code: {
  861. seconds: 60,
  862. startText: "获取验证码",
  863. changeText: "X秒重新获取",
  864. endText: "重新获取",
  865. keepRunning: false,
  866. uniqueKey: ""
  867. }
  868. };
  869. const CodeInput = {
  870. // codeInput 组件
  871. codeInput: {
  872. adjustPosition: true,
  873. maxlength: 6,
  874. dot: false,
  875. mode: "box",
  876. hairline: false,
  877. space: 10,
  878. value: "",
  879. focus: false,
  880. bold: false,
  881. color: "#606266",
  882. fontSize: 18,
  883. size: 35,
  884. disabledKeyboard: false,
  885. borderColor: "#c9cacc",
  886. disabledDot: true
  887. }
  888. };
  889. const Col = {
  890. // col 组件
  891. col: {
  892. span: 12,
  893. offset: 0,
  894. justify: "start",
  895. align: "stretch",
  896. textAlign: "left"
  897. }
  898. };
  899. const Collapse = {
  900. // collapse 组件
  901. collapse: {
  902. value: null,
  903. accordion: false,
  904. border: true
  905. }
  906. };
  907. const CollapseItem = {
  908. // collapseItem 组件
  909. collapseItem: {
  910. title: "",
  911. value: "",
  912. label: "",
  913. disabled: false,
  914. isLink: true,
  915. clickable: true,
  916. border: true,
  917. align: "left",
  918. name: "",
  919. icon: "",
  920. duration: 300
  921. }
  922. };
  923. const ColumnNotice = {
  924. // columnNotice 组件
  925. columnNotice: {
  926. text: "",
  927. icon: "volume",
  928. mode: "",
  929. color: "#f9ae3d",
  930. bgColor: "#fdf6ec",
  931. fontSize: 14,
  932. speed: 80,
  933. step: false,
  934. duration: 1500,
  935. disableTouch: true
  936. }
  937. };
  938. const CountDown = {
  939. // u-count-down 计时器组件
  940. countDown: {
  941. time: 0,
  942. format: "HH:mm:ss",
  943. autoStart: true,
  944. millisecond: false
  945. }
  946. };
  947. const CountTo = {
  948. // countTo 组件
  949. countTo: {
  950. startVal: 0,
  951. endVal: 0,
  952. duration: 2e3,
  953. autoplay: true,
  954. decimals: 0,
  955. useEasing: true,
  956. decimal: ".",
  957. color: "#606266",
  958. fontSize: 22,
  959. bold: false,
  960. separator: ""
  961. }
  962. };
  963. const DatetimePicker = {
  964. // datetimePicker 组件
  965. datetimePicker: {
  966. show: false,
  967. showToolbar: true,
  968. value: "",
  969. title: "",
  970. mode: "datetime",
  971. maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
  972. minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
  973. minHour: 0,
  974. maxHour: 23,
  975. minMinute: 0,
  976. maxMinute: 59,
  977. filter: null,
  978. formatter: null,
  979. loading: false,
  980. itemHeight: 44,
  981. cancelText: "取消",
  982. confirmText: "确认",
  983. cancelColor: "#909193",
  984. confirmColor: "#3c9cff",
  985. visibleItemCount: 5,
  986. closeOnClickOverlay: false,
  987. defaultIndex: () => []
  988. }
  989. };
  990. const Divider = {
  991. // divider组件
  992. divider: {
  993. dashed: false,
  994. hairline: true,
  995. dot: false,
  996. textPosition: "center",
  997. text: "",
  998. textSize: 14,
  999. textColor: "#909399",
  1000. lineColor: "#dcdfe6"
  1001. }
  1002. };
  1003. const Empty = {
  1004. // empty组件
  1005. empty: {
  1006. icon: "",
  1007. text: "",
  1008. textColor: "#c0c4cc",
  1009. textSize: 14,
  1010. iconColor: "#c0c4cc",
  1011. iconSize: 90,
  1012. mode: "data",
  1013. width: 160,
  1014. height: 160,
  1015. show: true,
  1016. marginTop: 0
  1017. }
  1018. };
  1019. const Form = {
  1020. // form 组件
  1021. form: {
  1022. model: () => ({}),
  1023. rules: () => ({}),
  1024. errorType: "message",
  1025. borderBottom: true,
  1026. labelPosition: "left",
  1027. labelWidth: 45,
  1028. labelAlign: "left",
  1029. labelStyle: () => ({})
  1030. }
  1031. };
  1032. const GormItem = {
  1033. // formItem 组件
  1034. formItem: {
  1035. label: "",
  1036. prop: "",
  1037. borderBottom: "",
  1038. labelWidth: "",
  1039. rightIcon: "",
  1040. leftIcon: "",
  1041. required: false,
  1042. leftIconStyle: ""
  1043. }
  1044. };
  1045. const Gap = {
  1046. // gap组件
  1047. gap: {
  1048. bgColor: "transparent",
  1049. height: 20,
  1050. marginTop: 0,
  1051. marginBottom: 0,
  1052. customStyle: {}
  1053. }
  1054. };
  1055. const Grid = {
  1056. // grid组件
  1057. grid: {
  1058. col: 3,
  1059. border: false,
  1060. align: "left"
  1061. }
  1062. };
  1063. const GridItem = {
  1064. // grid-item组件
  1065. gridItem: {
  1066. name: null,
  1067. bgColor: "transparent"
  1068. }
  1069. };
  1070. const {
  1071. color: color$3
  1072. } = config;
  1073. const Icon = {
  1074. // icon组件
  1075. icon: {
  1076. name: "",
  1077. color: color$3["u-content-color"],
  1078. size: "16px",
  1079. bold: false,
  1080. index: "",
  1081. hoverClass: "",
  1082. customPrefix: "uicon",
  1083. label: "",
  1084. labelPos: "right",
  1085. labelSize: "15px",
  1086. labelColor: color$3["u-content-color"],
  1087. space: "3px",
  1088. imgMode: "",
  1089. width: "",
  1090. height: "",
  1091. top: 0,
  1092. stop: false
  1093. }
  1094. };
  1095. const Image = {
  1096. // image组件
  1097. image: {
  1098. src: "",
  1099. mode: "aspectFill",
  1100. width: "300",
  1101. height: "225",
  1102. shape: "square",
  1103. radius: 0,
  1104. lazyLoad: true,
  1105. showMenuByLongpress: true,
  1106. loadingIcon: "photo",
  1107. errorIcon: "error-circle",
  1108. showLoading: true,
  1109. showError: true,
  1110. fade: true,
  1111. webp: false,
  1112. duration: 500,
  1113. bgColor: "#f3f4f6"
  1114. }
  1115. };
  1116. const IndexAnchor = {
  1117. // indexAnchor 组件
  1118. indexAnchor: {
  1119. text: "",
  1120. color: "#606266",
  1121. size: 14,
  1122. bgColor: "#dedede",
  1123. height: 32
  1124. }
  1125. };
  1126. const IndexList = {
  1127. // indexList 组件
  1128. indexList: {
  1129. inactiveColor: "#606266",
  1130. activeColor: "#5677fc",
  1131. indexList: () => [],
  1132. sticky: true,
  1133. customNavHeight: 0
  1134. }
  1135. };
  1136. const Input = {
  1137. // index 组件
  1138. input: {
  1139. value: "",
  1140. type: "text",
  1141. fixed: false,
  1142. disabled: false,
  1143. disabledColor: "#f5f7fa",
  1144. clearable: false,
  1145. password: false,
  1146. maxlength: -1,
  1147. placeholder: null,
  1148. placeholderClass: "input-placeholder",
  1149. placeholderStyle: "color: #c0c4cc",
  1150. showWordLimit: false,
  1151. confirmType: "done",
  1152. confirmHold: false,
  1153. holdKeyboard: false,
  1154. focus: false,
  1155. autoBlur: false,
  1156. disableDefaultPadding: false,
  1157. cursor: -1,
  1158. cursorSpacing: 30,
  1159. selectionStart: -1,
  1160. selectionEnd: -1,
  1161. adjustPosition: true,
  1162. inputAlign: "left",
  1163. fontSize: "15px",
  1164. color: "#303133",
  1165. prefixIcon: "",
  1166. prefixIconStyle: "",
  1167. suffixIcon: "",
  1168. suffixIconStyle: "",
  1169. border: "surround",
  1170. readonly: false,
  1171. shape: "square",
  1172. formatter: null
  1173. }
  1174. };
  1175. const Keyboard = {
  1176. // 键盘组件
  1177. keyboard: {
  1178. mode: "number",
  1179. dotDisabled: false,
  1180. tooltip: true,
  1181. showTips: true,
  1182. tips: "",
  1183. showCancel: true,
  1184. showConfirm: true,
  1185. random: false,
  1186. safeAreaInsetBottom: true,
  1187. closeOnClickOverlay: true,
  1188. show: false,
  1189. overlay: true,
  1190. zIndex: 10075,
  1191. cancelText: "取消",
  1192. confirmText: "确定",
  1193. autoChange: false
  1194. }
  1195. };
  1196. const Line = {
  1197. // line组件
  1198. line: {
  1199. color: "#d6d7d9",
  1200. length: "100%",
  1201. direction: "row",
  1202. hairline: true,
  1203. margin: 0,
  1204. dashed: false
  1205. }
  1206. };
  1207. const LineProgress = {
  1208. // lineProgress 组件
  1209. lineProgress: {
  1210. activeColor: "#19be6b",
  1211. inactiveColor: "#ececec",
  1212. percentage: 0,
  1213. showText: true,
  1214. height: 12
  1215. }
  1216. };
  1217. const {
  1218. color: color$2
  1219. } = config;
  1220. const Link = {
  1221. // link超链接组件props参数
  1222. link: {
  1223. color: color$2["u-primary"],
  1224. fontSize: 15,
  1225. underLine: false,
  1226. href: "",
  1227. mpTips: "链接已复制,请在浏览器打开",
  1228. lineColor: "",
  1229. text: ""
  1230. }
  1231. };
  1232. const List = {
  1233. // list 组件
  1234. list: {
  1235. showScrollbar: false,
  1236. lowerThreshold: 50,
  1237. upperThreshold: 0,
  1238. scrollTop: 0,
  1239. offsetAccuracy: 10,
  1240. enableFlex: false,
  1241. pagingEnabled: false,
  1242. scrollable: true,
  1243. scrollIntoView: "",
  1244. scrollWithAnimation: false,
  1245. enableBackToTop: false,
  1246. height: 0,
  1247. width: 0,
  1248. preLoadScreen: 1
  1249. }
  1250. };
  1251. const ListItem = {
  1252. // listItem 组件
  1253. listItem: {
  1254. anchor: ""
  1255. }
  1256. };
  1257. const {
  1258. color: color$1
  1259. } = config;
  1260. const LoadingIcon = {
  1261. // loading-icon加载中图标组件
  1262. loadingIcon: {
  1263. show: true,
  1264. color: color$1["u-tips-color"],
  1265. textColor: color$1["u-tips-color"],
  1266. vertical: false,
  1267. mode: "spinner",
  1268. size: 24,
  1269. textSize: 15,
  1270. text: "",
  1271. timingFunction: "ease-in-out",
  1272. duration: 1200,
  1273. inactiveColor: ""
  1274. }
  1275. };
  1276. const LoadingPage = {
  1277. // loading-page组件
  1278. loadingPage: {
  1279. loadingText: "正在加载",
  1280. image: "",
  1281. loadingMode: "circle",
  1282. loading: false,
  1283. bgColor: "#ffffff",
  1284. color: "#C8C8C8",
  1285. fontSize: 19,
  1286. iconSize: 28,
  1287. loadingColor: "#C8C8C8"
  1288. }
  1289. };
  1290. const Loadmore = {
  1291. // loadmore 组件
  1292. loadmore: {
  1293. status: "loadmore",
  1294. bgColor: "transparent",
  1295. icon: true,
  1296. fontSize: 14,
  1297. iconSize: 17,
  1298. color: "#606266",
  1299. loadingIcon: "spinner",
  1300. loadmoreText: "加载更多",
  1301. loadingText: "正在加载...",
  1302. nomoreText: "没有更多了",
  1303. isDot: false,
  1304. iconColor: "#b7b7b7",
  1305. marginTop: 10,
  1306. marginBottom: 10,
  1307. height: "auto",
  1308. line: false,
  1309. lineColor: "#E6E8EB",
  1310. dashed: false
  1311. }
  1312. };
  1313. const Modal = {
  1314. // modal 组件
  1315. modal: {
  1316. show: false,
  1317. title: "",
  1318. content: "",
  1319. confirmText: "确认",
  1320. cancelText: "取消",
  1321. showConfirmButton: true,
  1322. showCancelButton: false,
  1323. confirmColor: "#2979ff",
  1324. cancelColor: "#606266",
  1325. buttonReverse: false,
  1326. zoom: true,
  1327. asyncClose: false,
  1328. closeOnClickOverlay: false,
  1329. negativeTop: 0,
  1330. width: "650rpx",
  1331. confirmButtonShape: ""
  1332. }
  1333. };
  1334. const color = {
  1335. primary: "#3c9cff",
  1336. info: "#909399",
  1337. default: "#909399",
  1338. warning: "#f9ae3d",
  1339. error: "#f56c6c",
  1340. success: "#5ac725",
  1341. mainColor: "#303133",
  1342. contentColor: "#606266",
  1343. tipsColor: "#909399",
  1344. lightColor: "#c0c4cc",
  1345. borderColor: "#e4e7ed"
  1346. };
  1347. const Navbar = {
  1348. // navbar 组件
  1349. navbar: {
  1350. safeAreaInsetTop: true,
  1351. placeholder: false,
  1352. fixed: true,
  1353. border: false,
  1354. leftIcon: "arrow-left",
  1355. leftText: "",
  1356. rightText: "",
  1357. rightIcon: "",
  1358. title: "",
  1359. bgColor: "#ffffff",
  1360. titleWidth: "400rpx",
  1361. height: "44px",
  1362. leftIconSize: 20,
  1363. leftIconColor: color.mainColor,
  1364. autoBack: false,
  1365. titleStyle: ""
  1366. }
  1367. };
  1368. const NoNetwork = {
  1369. // noNetwork
  1370. noNetwork: {
  1371. tips: "哎呀,网络信号丢失",
  1372. zIndex: "",
  1373. 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"
  1374. }
  1375. };
  1376. const NoticeBar = {
  1377. // noticeBar
  1378. noticeBar: {
  1379. text: () => [],
  1380. direction: "row",
  1381. step: false,
  1382. icon: "volume",
  1383. mode: "",
  1384. color: "#f9ae3d",
  1385. bgColor: "#fdf6ec",
  1386. speed: 80,
  1387. fontSize: 14,
  1388. duration: 2e3,
  1389. disableTouch: true,
  1390. url: "",
  1391. linkType: "navigateTo"
  1392. }
  1393. };
  1394. const Notify = {
  1395. // notify组件
  1396. notify: {
  1397. top: 0,
  1398. type: "primary",
  1399. color: "#ffffff",
  1400. bgColor: "",
  1401. message: "",
  1402. duration: 3e3,
  1403. fontSize: 15,
  1404. safeAreaInsetTop: false
  1405. }
  1406. };
  1407. const NumberBox = {
  1408. // 步进器组件
  1409. numberBox: {
  1410. name: "",
  1411. value: 0,
  1412. min: 1,
  1413. max: Number.MAX_SAFE_INTEGER,
  1414. step: 1,
  1415. integer: false,
  1416. disabled: false,
  1417. disabledInput: false,
  1418. asyncChange: false,
  1419. inputWidth: 35,
  1420. showMinus: true,
  1421. showPlus: true,
  1422. decimalLength: null,
  1423. longPress: true,
  1424. color: "#323233",
  1425. buttonSize: 30,
  1426. bgColor: "#EBECEE",
  1427. cursorSpacing: 100,
  1428. disableMinus: false,
  1429. disablePlus: false,
  1430. iconStyle: ""
  1431. }
  1432. };
  1433. const NumberKeyboard = {
  1434. // 数字键盘
  1435. numberKeyboard: {
  1436. mode: "number",
  1437. dotDisabled: false,
  1438. random: false
  1439. }
  1440. };
  1441. const Overlay = {
  1442. // overlay组件
  1443. overlay: {
  1444. show: false,
  1445. zIndex: 10070,
  1446. duration: 300,
  1447. opacity: 0.5
  1448. }
  1449. };
  1450. const Parse = {
  1451. // parse
  1452. parse: {
  1453. copyLink: true,
  1454. errorImg: "",
  1455. lazyLoad: false,
  1456. loadingImg: "",
  1457. pauseVideo: true,
  1458. previewImg: true,
  1459. setTitle: true,
  1460. showImgMenu: true
  1461. }
  1462. };
  1463. const Picker = {
  1464. // picker
  1465. picker: {
  1466. show: false,
  1467. showToolbar: true,
  1468. title: "",
  1469. columns: () => [],
  1470. loading: false,
  1471. itemHeight: 44,
  1472. cancelText: "取消",
  1473. confirmText: "确定",
  1474. cancelColor: "#909193",
  1475. confirmColor: "#3c9cff",
  1476. visibleItemCount: 5,
  1477. keyName: "text",
  1478. closeOnClickOverlay: false,
  1479. defaultIndex: () => [],
  1480. immediateChange: false
  1481. }
  1482. };
  1483. const Popup = {
  1484. // popup组件
  1485. popup: {
  1486. show: false,
  1487. overlay: true,
  1488. mode: "bottom",
  1489. duration: 300,
  1490. closeable: false,
  1491. overlayStyle: () => {
  1492. },
  1493. closeOnClickOverlay: true,
  1494. zIndex: 10075,
  1495. safeAreaInsetBottom: true,
  1496. safeAreaInsetTop: false,
  1497. closeIconPos: "top-right",
  1498. round: 0,
  1499. zoom: true,
  1500. bgColor: "",
  1501. overlayOpacity: 0.5
  1502. }
  1503. };
  1504. const Radio = {
  1505. // radio组件
  1506. radio: {
  1507. name: "",
  1508. shape: "",
  1509. disabled: "",
  1510. labelDisabled: "",
  1511. activeColor: "",
  1512. inactiveColor: "",
  1513. iconSize: "",
  1514. labelSize: "",
  1515. label: "",
  1516. labelColor: "",
  1517. size: "",
  1518. iconColor: "",
  1519. placement: ""
  1520. }
  1521. };
  1522. const RadioGroup = {
  1523. // radio-group组件
  1524. radioGroup: {
  1525. value: "",
  1526. disabled: false,
  1527. shape: "circle",
  1528. activeColor: "#2979ff",
  1529. inactiveColor: "#c8c9cc",
  1530. name: "",
  1531. size: 18,
  1532. placement: "row",
  1533. label: "",
  1534. labelColor: "#303133",
  1535. labelSize: 14,
  1536. labelDisabled: false,
  1537. iconColor: "#ffffff",
  1538. iconSize: 12,
  1539. borderBottom: false,
  1540. iconPlacement: "left"
  1541. }
  1542. };
  1543. const Rate = {
  1544. // rate组件
  1545. rate: {
  1546. value: 1,
  1547. count: 5,
  1548. disabled: false,
  1549. size: 18,
  1550. inactiveColor: "#b2b2b2",
  1551. activeColor: "#FA3534",
  1552. gutter: 4,
  1553. minCount: 1,
  1554. allowHalf: false,
  1555. activeIcon: "star-fill",
  1556. inactiveIcon: "star",
  1557. touchable: true
  1558. }
  1559. };
  1560. const ReadMore = {
  1561. // readMore
  1562. readMore: {
  1563. showHeight: 400,
  1564. toggle: false,
  1565. closeText: "展开阅读全文",
  1566. openText: "收起",
  1567. color: "#2979ff",
  1568. fontSize: 14,
  1569. textIndent: "2em",
  1570. name: ""
  1571. }
  1572. };
  1573. const Row = {
  1574. // row
  1575. row: {
  1576. gutter: 0,
  1577. justify: "start",
  1578. align: "center"
  1579. }
  1580. };
  1581. const RowNotice = {
  1582. // rowNotice
  1583. rowNotice: {
  1584. text: "",
  1585. icon: "volume",
  1586. mode: "",
  1587. color: "#f9ae3d",
  1588. bgColor: "#fdf6ec",
  1589. fontSize: 14,
  1590. speed: 80
  1591. }
  1592. };
  1593. const ScrollList = {
  1594. // scrollList
  1595. scrollList: {
  1596. indicatorWidth: 50,
  1597. indicatorBarWidth: 20,
  1598. indicator: true,
  1599. indicatorColor: "#f2f2f2",
  1600. indicatorActiveColor: "#3c9cff",
  1601. indicatorStyle: ""
  1602. }
  1603. };
  1604. const Search = {
  1605. // search
  1606. search: {
  1607. shape: "round",
  1608. bgColor: "#f2f2f2",
  1609. placeholder: "请输入关键字",
  1610. clearabled: true,
  1611. focus: false,
  1612. showAction: true,
  1613. actionStyle: () => ({}),
  1614. actionText: "搜索",
  1615. inputAlign: "left",
  1616. inputStyle: () => ({}),
  1617. disabled: false,
  1618. borderColor: "transparent",
  1619. searchIconColor: "#909399",
  1620. searchIconSize: 22,
  1621. color: "#606266",
  1622. placeholderColor: "#909399",
  1623. searchIcon: "search",
  1624. margin: "0",
  1625. animation: false,
  1626. value: "",
  1627. maxlength: "-1",
  1628. height: 32,
  1629. label: null
  1630. }
  1631. };
  1632. const Section = {
  1633. // u-section组件
  1634. section: {
  1635. title: "",
  1636. subTitle: "更多",
  1637. right: true,
  1638. fontSize: 15,
  1639. bold: true,
  1640. color: "#303133",
  1641. subColor: "#909399",
  1642. showLine: true,
  1643. lineColor: "",
  1644. arrow: true
  1645. }
  1646. };
  1647. const Skeleton = {
  1648. // skeleton
  1649. skeleton: {
  1650. loading: true,
  1651. animate: true,
  1652. rows: 0,
  1653. rowsWidth: "100%",
  1654. rowsHeight: 18,
  1655. title: true,
  1656. titleWidth: "50%",
  1657. titleHeight: 18,
  1658. avatar: false,
  1659. avatarSize: 32,
  1660. avatarShape: "circle"
  1661. }
  1662. };
  1663. const Slider = {
  1664. // slider组件
  1665. slider: {
  1666. value: 0,
  1667. blockSize: 18,
  1668. min: 0,
  1669. max: 100,
  1670. step: 1,
  1671. activeColor: "#2979ff",
  1672. inactiveColor: "#c0c4cc",
  1673. blockColor: "#ffffff",
  1674. showValue: false,
  1675. disabled: false,
  1676. blockStyle: () => {
  1677. }
  1678. }
  1679. };
  1680. const StatusBar = {
  1681. // statusBar
  1682. statusBar: {
  1683. bgColor: "transparent"
  1684. }
  1685. };
  1686. const Steps = {
  1687. // steps组件
  1688. steps: {
  1689. direction: "row",
  1690. current: 0,
  1691. activeColor: "#3c9cff",
  1692. inactiveColor: "#969799",
  1693. activeIcon: "",
  1694. inactiveIcon: "",
  1695. dot: false
  1696. }
  1697. };
  1698. const StepsItem = {
  1699. // steps-item组件
  1700. stepsItem: {
  1701. title: "",
  1702. desc: "",
  1703. iconSize: 17,
  1704. error: false
  1705. }
  1706. };
  1707. const Sticky = {
  1708. // sticky组件
  1709. sticky: {
  1710. offsetTop: 0,
  1711. customNavHeight: 0,
  1712. disabled: false,
  1713. bgColor: "transparent",
  1714. zIndex: "",
  1715. index: ""
  1716. }
  1717. };
  1718. const Subsection = {
  1719. // subsection组件
  1720. subsection: {
  1721. list: [],
  1722. current: 0,
  1723. activeColor: "#3c9cff",
  1724. inactiveColor: "#303133",
  1725. mode: "button",
  1726. fontSize: 12,
  1727. bold: true,
  1728. bgColor: "#eeeeef",
  1729. keyName: "name"
  1730. }
  1731. };
  1732. const SwipeAction = {
  1733. // swipe-action组件
  1734. swipeAction: {
  1735. autoClose: true
  1736. }
  1737. };
  1738. const SwipeActionItem = {
  1739. // swipeActionItem 组件
  1740. swipeActionItem: {
  1741. show: false,
  1742. name: "",
  1743. disabled: false,
  1744. threshold: 20,
  1745. autoClose: true,
  1746. options: [],
  1747. duration: 300
  1748. }
  1749. };
  1750. const Swiper = {
  1751. // swiper 组件
  1752. swiper: {
  1753. list: () => [],
  1754. indicator: false,
  1755. indicatorActiveColor: "#FFFFFF",
  1756. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  1757. indicatorStyle: "",
  1758. indicatorMode: "line",
  1759. autoplay: true,
  1760. current: 0,
  1761. currentItemId: "",
  1762. interval: 3e3,
  1763. duration: 300,
  1764. circular: false,
  1765. previousMargin: 0,
  1766. nextMargin: 0,
  1767. acceleration: false,
  1768. displayMultipleItems: 1,
  1769. easingFunction: "default",
  1770. keyName: "url",
  1771. imgMode: "aspectFill",
  1772. height: 130,
  1773. bgColor: "#f3f4f6",
  1774. radius: 4,
  1775. loading: false,
  1776. showTitle: false
  1777. }
  1778. };
  1779. const SwipterIndicator = {
  1780. // swiperIndicator 组件
  1781. swiperIndicator: {
  1782. length: 0,
  1783. current: 0,
  1784. indicatorActiveColor: "",
  1785. indicatorInactiveColor: "",
  1786. indicatorMode: "line"
  1787. }
  1788. };
  1789. const Switch = {
  1790. // switch
  1791. switch: {
  1792. loading: false,
  1793. disabled: false,
  1794. size: 25,
  1795. activeColor: "#2979ff",
  1796. inactiveColor: "#ffffff",
  1797. value: false,
  1798. activeValue: true,
  1799. inactiveValue: false,
  1800. asyncChange: false,
  1801. space: 0
  1802. }
  1803. };
  1804. const Tabbar = {
  1805. // tabbar
  1806. tabbar: {
  1807. value: null,
  1808. safeAreaInsetBottom: true,
  1809. border: true,
  1810. zIndex: 1,
  1811. activeColor: "#1989fa",
  1812. inactiveColor: "#7d7e80",
  1813. fixed: true,
  1814. placeholder: true
  1815. }
  1816. };
  1817. const TabbarItem = {
  1818. //
  1819. tabbarItem: {
  1820. name: null,
  1821. icon: "",
  1822. badge: null,
  1823. dot: false,
  1824. text: "",
  1825. badgeStyle: "top: 6px;right:2px;"
  1826. }
  1827. };
  1828. const Tabs = {
  1829. //
  1830. tabs: {
  1831. duration: 300,
  1832. list: () => [],
  1833. lineColor: "#3c9cff",
  1834. activeStyle: () => ({
  1835. color: "#303133"
  1836. }),
  1837. inactiveStyle: () => ({
  1838. color: "#606266"
  1839. }),
  1840. lineWidth: 20,
  1841. lineHeight: 3,
  1842. lineBgSize: "cover",
  1843. itemStyle: () => ({
  1844. height: "44px"
  1845. }),
  1846. scrollable: true,
  1847. current: 0,
  1848. keyName: "name"
  1849. }
  1850. };
  1851. const Tag = {
  1852. // tag 组件
  1853. tag: {
  1854. type: "primary",
  1855. disabled: false,
  1856. size: "medium",
  1857. shape: "square",
  1858. text: "",
  1859. bgColor: "",
  1860. color: "",
  1861. borderColor: "",
  1862. closeColor: "#C6C7CB",
  1863. name: "",
  1864. plainFill: false,
  1865. plain: false,
  1866. closable: false,
  1867. show: true,
  1868. icon: ""
  1869. }
  1870. };
  1871. const Text = {
  1872. // text 组件
  1873. text: {
  1874. type: "",
  1875. show: true,
  1876. text: "",
  1877. prefixIcon: "",
  1878. suffixIcon: "",
  1879. mode: "",
  1880. href: "",
  1881. format: "",
  1882. call: false,
  1883. openType: "",
  1884. bold: false,
  1885. block: false,
  1886. lines: "",
  1887. color: "#303133",
  1888. size: 15,
  1889. iconStyle: () => ({
  1890. fontSize: "15px"
  1891. }),
  1892. decoration: "none",
  1893. margin: 0,
  1894. lineHeight: "",
  1895. align: "left",
  1896. wordWrap: "normal"
  1897. }
  1898. };
  1899. const Textarea = {
  1900. // textarea 组件
  1901. textarea: {
  1902. value: "",
  1903. placeholder: "",
  1904. placeholderClass: "textarea-placeholder",
  1905. placeholderStyle: "color: #c0c4cc",
  1906. height: 70,
  1907. confirmType: "done",
  1908. disabled: false,
  1909. count: false,
  1910. focus: false,
  1911. autoHeight: false,
  1912. fixed: false,
  1913. cursorSpacing: 0,
  1914. cursor: "",
  1915. showConfirmBar: true,
  1916. selectionStart: -1,
  1917. selectionEnd: -1,
  1918. adjustPosition: true,
  1919. disableDefaultPadding: false,
  1920. holdKeyboard: false,
  1921. maxlength: 140,
  1922. border: "surround",
  1923. formatter: null
  1924. }
  1925. };
  1926. const Toast = {
  1927. // toast组件
  1928. toast: {
  1929. zIndex: 10090,
  1930. loading: false,
  1931. text: "",
  1932. icon: "",
  1933. type: "",
  1934. loadingMode: "",
  1935. show: "",
  1936. overlay: false,
  1937. position: "center",
  1938. params: () => {
  1939. },
  1940. duration: 2e3,
  1941. isTab: false,
  1942. url: "",
  1943. callback: null,
  1944. back: false
  1945. }
  1946. };
  1947. const Toolbar = {
  1948. // toolbar 组件
  1949. toolbar: {
  1950. show: true,
  1951. cancelText: "取消",
  1952. confirmText: "确认",
  1953. cancelColor: "#909193",
  1954. confirmColor: "#3c9cff",
  1955. title: ""
  1956. }
  1957. };
  1958. const Tooltip = {
  1959. // tooltip 组件
  1960. tooltip: {
  1961. text: "",
  1962. copyText: "",
  1963. size: 14,
  1964. color: "#606266",
  1965. bgColor: "transparent",
  1966. direction: "top",
  1967. zIndex: 10071,
  1968. showCopy: true,
  1969. buttons: () => [],
  1970. overlay: true,
  1971. showToast: true
  1972. }
  1973. };
  1974. const Transition = {
  1975. // transition动画组件的props
  1976. transition: {
  1977. show: false,
  1978. mode: "fade",
  1979. duration: "300",
  1980. timingFunction: "ease-out"
  1981. }
  1982. };
  1983. const Upload = {
  1984. // upload组件
  1985. upload: {
  1986. accept: "image",
  1987. capture: () => ["album", "camera"],
  1988. compressed: true,
  1989. camera: "back",
  1990. maxDuration: 60,
  1991. uploadIcon: "camera-fill",
  1992. uploadIconColor: "#D3D4D6",
  1993. useBeforeRead: false,
  1994. previewFullImage: true,
  1995. maxCount: 52,
  1996. disabled: false,
  1997. imageMode: "aspectFill",
  1998. name: "",
  1999. sizeType: () => ["original", "compressed"],
  2000. multiple: false,
  2001. deletable: true,
  2002. maxSize: Number.MAX_VALUE,
  2003. fileList: () => [],
  2004. uploadText: "",
  2005. width: 80,
  2006. height: 80,
  2007. previewImage: true
  2008. }
  2009. };
  2010. const drawer = {
  2011. // 抽屉组件
  2012. drawer: {
  2013. // 是否显示
  2014. show: false,
  2015. // 点击遮罩是否关闭
  2016. mask: true,
  2017. // // 是否显示关闭按钮
  2018. // closeBtn:true,
  2019. // 抽屉宽度
  2020. width: "40%",
  2021. // 抽屉位置
  2022. placement: "left",
  2023. // 权重
  2024. zIndex: 100
  2025. }
  2026. };
  2027. const props$x = {
  2028. ...ActionSheet,
  2029. ...Album,
  2030. ...Alert,
  2031. ...Avatar,
  2032. ...AvatarGroup,
  2033. ...Backtop,
  2034. ...Badge,
  2035. ...Button,
  2036. ...Calendar,
  2037. ...CarKeyboard,
  2038. ...Cell,
  2039. ...CellGroup,
  2040. ...Checkbox,
  2041. ...CheckboxGroup,
  2042. ...CircleProgress,
  2043. ...Code,
  2044. ...CodeInput,
  2045. ...Col,
  2046. ...Collapse,
  2047. ...CollapseItem,
  2048. ...ColumnNotice,
  2049. ...CountDown,
  2050. ...CountTo,
  2051. ...DatetimePicker,
  2052. ...Divider,
  2053. ...Empty,
  2054. ...Form,
  2055. ...GormItem,
  2056. ...Gap,
  2057. ...Grid,
  2058. ...GridItem,
  2059. ...Icon,
  2060. ...Image,
  2061. ...IndexAnchor,
  2062. ...IndexList,
  2063. ...Input,
  2064. ...Keyboard,
  2065. ...Line,
  2066. ...LineProgress,
  2067. ...Link,
  2068. ...List,
  2069. ...ListItem,
  2070. ...LoadingIcon,
  2071. ...LoadingPage,
  2072. ...Loadmore,
  2073. ...Modal,
  2074. ...Navbar,
  2075. ...NoNetwork,
  2076. ...NoticeBar,
  2077. ...Notify,
  2078. ...NumberBox,
  2079. ...NumberKeyboard,
  2080. ...Overlay,
  2081. ...Parse,
  2082. ...Picker,
  2083. ...Popup,
  2084. ...Radio,
  2085. ...RadioGroup,
  2086. ...Rate,
  2087. ...ReadMore,
  2088. ...Row,
  2089. ...RowNotice,
  2090. ...ScrollList,
  2091. ...Search,
  2092. ...Section,
  2093. ...Skeleton,
  2094. ...Slider,
  2095. ...StatusBar,
  2096. ...Steps,
  2097. ...StepsItem,
  2098. ...Sticky,
  2099. ...Subsection,
  2100. ...SwipeAction,
  2101. ...SwipeActionItem,
  2102. ...Swiper,
  2103. ...SwipterIndicator,
  2104. ...Switch,
  2105. ...Tabbar,
  2106. ...TabbarItem,
  2107. ...Tabs,
  2108. ...Tag,
  2109. ...Text,
  2110. ...Textarea,
  2111. ...Toast,
  2112. ...Toolbar,
  2113. ...Tooltip,
  2114. ...Transition,
  2115. ...Upload,
  2116. ...drawer
  2117. };
  2118. const props$w = {
  2119. props: {
  2120. // 图标类名
  2121. name: {
  2122. type: String,
  2123. default: props$x.icon.name
  2124. },
  2125. // 图标颜色,可接受主题色
  2126. color: {
  2127. type: String,
  2128. default: props$x.icon.color
  2129. },
  2130. // 字体大小,单位px
  2131. size: {
  2132. type: [String, Number],
  2133. default: props$x.icon.size
  2134. },
  2135. // 是否显示粗体
  2136. bold: {
  2137. type: Boolean,
  2138. default: props$x.icon.bold
  2139. },
  2140. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  2141. index: {
  2142. type: [String, Number],
  2143. default: props$x.icon.index
  2144. },
  2145. // 触摸图标时的类名
  2146. hoverClass: {
  2147. type: String,
  2148. default: props$x.icon.hoverClass
  2149. },
  2150. // 自定义扩展前缀,方便用户扩展自己的图标库
  2151. customPrefix: {
  2152. type: String,
  2153. default: props$x.icon.customPrefix
  2154. },
  2155. // 图标右边或者下面的文字
  2156. label: {
  2157. type: [String, Number],
  2158. default: props$x.icon.label
  2159. },
  2160. // label的位置,只能右边或者下边
  2161. labelPos: {
  2162. type: String,
  2163. default: props$x.icon.labelPos
  2164. },
  2165. // label的大小
  2166. labelSize: {
  2167. type: [String, Number],
  2168. default: props$x.icon.labelSize
  2169. },
  2170. // label的颜色
  2171. labelColor: {
  2172. type: String,
  2173. default: props$x.icon.labelColor
  2174. },
  2175. // label与图标的距离
  2176. space: {
  2177. type: [String, Number],
  2178. default: props$x.icon.space
  2179. },
  2180. // 图片的mode
  2181. imgMode: {
  2182. type: String,
  2183. default: props$x.icon.imgMode
  2184. },
  2185. // 用于显示图片小图标时,图片的宽度
  2186. width: {
  2187. type: [String, Number],
  2188. default: props$x.icon.width
  2189. },
  2190. // 用于显示图片小图标时,图片的高度
  2191. height: {
  2192. type: [String, Number],
  2193. default: props$x.icon.height
  2194. },
  2195. // 用于解决某些情况下,让图标垂直居中的用途
  2196. top: {
  2197. type: [String, Number],
  2198. default: props$x.icon.top
  2199. },
  2200. // 是否阻止事件传播
  2201. stop: {
  2202. type: Boolean,
  2203. default: props$x.icon.stop
  2204. }
  2205. }
  2206. };
  2207. const mpMixin = {};
  2208. const mixin = {
  2209. // 定义每个组件都可能需要用到的外部样式以及类名
  2210. props: {
  2211. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  2212. customStyle: {
  2213. type: [Object, String],
  2214. default: () => ({})
  2215. },
  2216. customClass: {
  2217. type: String,
  2218. default: ""
  2219. },
  2220. // 跳转的页面路径
  2221. url: {
  2222. type: String,
  2223. default: ""
  2224. },
  2225. // 页面跳转的类型
  2226. linkType: {
  2227. type: String,
  2228. default: "navigateTo"
  2229. }
  2230. },
  2231. data() {
  2232. return {};
  2233. },
  2234. onLoad() {
  2235. this.$u.getRect = this.$uGetRect;
  2236. },
  2237. created() {
  2238. this.$u.getRect = this.$uGetRect;
  2239. },
  2240. computed: {
  2241. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  2242. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  2243. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  2244. $u() {
  2245. return uni.$u.deepMerge(uni.$u, {
  2246. props: void 0,
  2247. http: void 0,
  2248. mixin: void 0
  2249. });
  2250. },
  2251. /**
  2252. * 生成bem规则类名
  2253. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  2254. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  2255. * @param {String} name 组件名称
  2256. * @param {Array} fixed 一直会存在的类名
  2257. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  2258. * @returns {Array|string}
  2259. */
  2260. bem() {
  2261. return function(name, fixed, change) {
  2262. const prefix = `u-${name}--`;
  2263. const classes = {};
  2264. if (fixed) {
  2265. fixed.map((item) => {
  2266. classes[prefix + this[item]] = true;
  2267. });
  2268. }
  2269. if (change) {
  2270. change.map((item) => {
  2271. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  2272. });
  2273. }
  2274. return Object.keys(classes);
  2275. };
  2276. }
  2277. },
  2278. methods: {
  2279. // 跳转某一个页面
  2280. openPage(urlKey = "url") {
  2281. const url2 = this[urlKey];
  2282. if (url2) {
  2283. this.$u.route({ type: this.linkType, url: url2 });
  2284. }
  2285. },
  2286. // 查询节点信息
  2287. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  2288. // 解决办法为在组件根部再套一个没有任何作用的view元素
  2289. $uGetRect(selector, all) {
  2290. return new Promise((resolve) => {
  2291. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  2292. if (all && Array.isArray(rect) && rect.length) {
  2293. resolve(rect);
  2294. }
  2295. if (!all && rect) {
  2296. resolve(rect);
  2297. }
  2298. }).exec();
  2299. });
  2300. },
  2301. getParentData(parentName = "") {
  2302. if (!this.parent)
  2303. this.parent = {};
  2304. this.parent = uni.$u.$parent.call(this, parentName);
  2305. if (this.parent.children) {
  2306. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  2307. }
  2308. if (this.parent && this.parentData) {
  2309. Object.keys(this.parentData).map((key) => {
  2310. this.parentData[key] = this.parent[key];
  2311. });
  2312. }
  2313. },
  2314. // 阻止事件冒泡
  2315. preventEvent(e) {
  2316. e && typeof e.stopPropagation === "function" && e.stopPropagation();
  2317. },
  2318. // 空操作
  2319. noop(e) {
  2320. this.preventEvent(e);
  2321. }
  2322. },
  2323. onReachBottom() {
  2324. uni.$emit("uOnReachBottom");
  2325. },
  2326. beforeDestroy() {
  2327. if (this.parent && uni.$u.test.array(this.parent.children)) {
  2328. const childrenList = this.parent.children;
  2329. childrenList.map((child, index2) => {
  2330. if (child === this) {
  2331. childrenList.splice(index2, 1);
  2332. }
  2333. });
  2334. }
  2335. }
  2336. };
  2337. const _sfc_main$1p = {
  2338. name: "u-icon",
  2339. data() {
  2340. return {};
  2341. },
  2342. emits: ["click"],
  2343. mixins: [mpMixin, mixin, props$w],
  2344. computed: {
  2345. uClasses() {
  2346. let classes = [];
  2347. classes.push(this.customPrefix + "-" + this.name);
  2348. if (this.color && uni.$u.config.type.includes(this.color))
  2349. classes.push("u-icon__icon--" + this.color);
  2350. return classes;
  2351. },
  2352. iconStyle() {
  2353. let style = {};
  2354. style = {
  2355. fontSize: uni.$u.addUnit(this.size),
  2356. lineHeight: uni.$u.addUnit(this.size),
  2357. fontWeight: this.bold ? "bold" : "normal",
  2358. // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
  2359. top: uni.$u.addUnit(this.top)
  2360. };
  2361. if (this.color && !uni.$u.config.type.includes(this.color))
  2362. style.color = this.color;
  2363. return style;
  2364. },
  2365. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  2366. isImg() {
  2367. return this.name.indexOf("/") !== -1;
  2368. },
  2369. imgStyle() {
  2370. let style = {};
  2371. style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size);
  2372. style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size);
  2373. return style;
  2374. },
  2375. // 通过图标名,查找对应的图标
  2376. icon() {
  2377. return icons["uicon-" + this.name] || this.name;
  2378. }
  2379. },
  2380. methods: {
  2381. clickHandler(e) {
  2382. this.$emit("click", this.index);
  2383. this.stop && this.preventEvent(e);
  2384. }
  2385. }
  2386. };
  2387. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  2388. return vue.openBlock(), vue.createElementBlock(
  2389. "view",
  2390. {
  2391. class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]),
  2392. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  2393. },
  2394. [
  2395. $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
  2396. key: 0,
  2397. class: "u-icon__img",
  2398. src: _ctx.name,
  2399. mode: _ctx.imgMode,
  2400. style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  2401. }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
  2402. key: 1,
  2403. class: vue.normalizeClass(["u-icon__icon", $options.uClasses]),
  2404. style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  2405. "hover-class": _ctx.hoverClass
  2406. }, vue.toDisplayString($options.icon), 15, ["hover-class"])),
  2407. vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
  2408. _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
  2409. "text",
  2410. {
  2411. key: 2,
  2412. class: "u-icon__label",
  2413. style: vue.normalizeStyle({
  2414. color: _ctx.labelColor,
  2415. fontSize: _ctx.$u.addUnit(_ctx.labelSize),
  2416. marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2417. marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2418. marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2419. marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0
  2420. })
  2421. },
  2422. vue.toDisplayString(_ctx.label),
  2423. 5
  2424. /* TEXT, STYLE */
  2425. )) : vue.createCommentVNode("v-if", true)
  2426. ],
  2427. 2
  2428. /* CLASS */
  2429. );
  2430. }
  2431. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-ac70166d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
  2432. const props$v = {
  2433. props: {
  2434. // 文字颜色
  2435. color: {
  2436. type: String,
  2437. default: props$x.link.color
  2438. },
  2439. // 字体大小,单位px
  2440. fontSize: {
  2441. type: [String, Number],
  2442. default: props$x.link.fontSize
  2443. },
  2444. // 是否显示下划线
  2445. underLine: {
  2446. type: Boolean,
  2447. default: props$x.link.underLine
  2448. },
  2449. // 要跳转的链接
  2450. href: {
  2451. type: String,
  2452. default: props$x.link.href
  2453. },
  2454. // 小程序中复制到粘贴板的提示语
  2455. mpTips: {
  2456. type: String,
  2457. default: props$x.link.mpTips
  2458. },
  2459. // 下划线颜色
  2460. lineColor: {
  2461. type: String,
  2462. default: props$x.link.lineColor
  2463. },
  2464. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  2465. text: {
  2466. type: String,
  2467. default: props$x.link.text
  2468. }
  2469. }
  2470. };
  2471. const _sfc_main$1o = {
  2472. name: "u-link",
  2473. mixins: [mpMixin, mixin, props$v],
  2474. computed: {
  2475. linkStyle() {
  2476. const style = {
  2477. color: this.color,
  2478. fontSize: uni.$u.addUnit(this.fontSize),
  2479. // line-height设置为比字体大小多2px
  2480. lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
  2481. textDecoration: this.underLine ? "underline" : "none"
  2482. };
  2483. return style;
  2484. }
  2485. },
  2486. methods: {
  2487. openLink() {
  2488. plus.runtime.openURL(this.href);
  2489. this.$emit("click");
  2490. }
  2491. }
  2492. };
  2493. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  2494. return vue.openBlock(), vue.createElementBlock(
  2495. "text",
  2496. {
  2497. class: "u-link",
  2498. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
  2499. style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  2500. },
  2501. vue.toDisplayString(_ctx.text),
  2502. 5
  2503. /* TEXT, STYLE */
  2504. );
  2505. }
  2506. const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-12f6646d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
  2507. const value = {
  2508. computed: {
  2509. // 经处理后需要显示的值
  2510. value() {
  2511. const {
  2512. text,
  2513. mode,
  2514. format: format2,
  2515. href
  2516. } = this;
  2517. if (mode === "price") {
  2518. if (!/^\d+(\.\d+)?$/.test(text)) {
  2519. uni.$u.error("金额模式下,text参数需要为金额格式");
  2520. }
  2521. if (uni.$u.test.func(format2)) {
  2522. return format2(text);
  2523. }
  2524. return uni.$u.priceFormat(text, 2);
  2525. }
  2526. if (mode === "date") {
  2527. !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
  2528. if (uni.$u.test.func(format2)) {
  2529. return format2(text);
  2530. }
  2531. if (format2) {
  2532. return uni.$u.timeFormat(text, format2);
  2533. }
  2534. return uni.$u.timeFormat(text, "yyyy-mm-dd");
  2535. }
  2536. if (mode === "phone") {
  2537. if (uni.$u.test.func(format2)) {
  2538. return format2(text);
  2539. }
  2540. if (format2 === "encrypt") {
  2541. return `${text.substr(0, 3)}****${text.substr(7)}`;
  2542. }
  2543. return text;
  2544. }
  2545. if (mode === "name") {
  2546. !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
  2547. if (uni.$u.test.func(format2)) {
  2548. return format2(text);
  2549. }
  2550. if (format2 === "encrypt") {
  2551. return this.formatName(text);
  2552. }
  2553. return text;
  2554. }
  2555. if (mode === "link") {
  2556. !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
  2557. return text;
  2558. }
  2559. return text;
  2560. }
  2561. },
  2562. methods: {
  2563. // 默认的姓名脱敏规则
  2564. formatName(name) {
  2565. let value2 = "";
  2566. if (name.length === 2) {
  2567. value2 = name.substr(0, 1) + "*";
  2568. } else if (name.length > 2) {
  2569. let char = "";
  2570. for (let i = 0, len = name.length - 2; i < len; i++) {
  2571. char += "*";
  2572. }
  2573. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  2574. } else {
  2575. value2 = name;
  2576. }
  2577. return value2;
  2578. }
  2579. }
  2580. };
  2581. const props$u = {
  2582. props: {
  2583. // 主题颜色
  2584. type: {
  2585. type: String,
  2586. default: props$x.text.type
  2587. },
  2588. // 是否显示
  2589. show: {
  2590. type: Boolean,
  2591. default: props$x.text.show
  2592. },
  2593. // 显示的值
  2594. text: {
  2595. type: [String, Number],
  2596. default: props$x.text.text
  2597. },
  2598. // 前置图标
  2599. prefixIcon: {
  2600. type: String,
  2601. default: props$x.text.prefixIcon
  2602. },
  2603. // 后置图标
  2604. suffixIcon: {
  2605. type: String,
  2606. default: props$x.text.suffixIcon
  2607. },
  2608. // 文本处理的匹配模式
  2609. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  2610. mode: {
  2611. type: String,
  2612. default: props$x.text.mode
  2613. },
  2614. // mode=link下,配置的链接
  2615. href: {
  2616. type: String,
  2617. default: props$x.text.href
  2618. },
  2619. // 格式化规则
  2620. format: {
  2621. type: [String, Function],
  2622. default: props$x.text.format
  2623. },
  2624. // mode=phone时,点击文本是否拨打电话
  2625. call: {
  2626. type: Boolean,
  2627. default: props$x.text.call
  2628. },
  2629. // 小程序的打开方式
  2630. openType: {
  2631. type: String,
  2632. default: props$x.text.openType
  2633. },
  2634. // 是否粗体,默认normal
  2635. bold: {
  2636. type: Boolean,
  2637. default: props$x.text.bold
  2638. },
  2639. // 是否块状
  2640. block: {
  2641. type: Boolean,
  2642. default: props$x.text.block
  2643. },
  2644. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  2645. lines: {
  2646. type: [String, Number],
  2647. default: props$x.text.lines
  2648. },
  2649. // 文本颜色
  2650. color: {
  2651. type: String,
  2652. default: props$x.text.color
  2653. },
  2654. // 字体大小
  2655. size: {
  2656. type: [String, Number],
  2657. default: props$x.text.size
  2658. },
  2659. // 图标的样式
  2660. iconStyle: {
  2661. type: [Object, String],
  2662. default: props$x.text.iconStyle
  2663. },
  2664. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  2665. decoration: {
  2666. tepe: String,
  2667. default: props$x.text.decoration
  2668. },
  2669. // 外边距,对象、字符串,数值形式均可
  2670. margin: {
  2671. type: [Object, String, Number],
  2672. default: props$x.text.margin
  2673. },
  2674. // 文本行高
  2675. lineHeight: {
  2676. type: [String, Number],
  2677. default: props$x.text.lineHeight
  2678. },
  2679. // 文本对齐方式,可选值left|center|right
  2680. align: {
  2681. type: String,
  2682. default: props$x.text.align
  2683. },
  2684. // 文字换行,可选值break-word|normal|anywhere
  2685. wordWrap: {
  2686. type: String,
  2687. default: props$x.text.wordWrap
  2688. }
  2689. }
  2690. };
  2691. const _sfc_main$1n = {
  2692. name: "u--text",
  2693. mixins: [mpMixin, mixin, value, props$u],
  2694. emits: ["click"],
  2695. computed: {
  2696. valueStyle() {
  2697. const style = {
  2698. textDecoration: this.decoration,
  2699. fontWeight: this.bold ? "bold" : "normal",
  2700. wordWrap: this.wordWrap,
  2701. fontSize: uni.$u.addUnit(this.size)
  2702. };
  2703. !this.type && (style.color = this.color);
  2704. this.isNvue && this.lines && (style.lines = this.lines);
  2705. this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
  2706. !this.isNvue && this.block && (style.display = "block");
  2707. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  2708. },
  2709. isNvue() {
  2710. let nvue = false;
  2711. return nvue;
  2712. },
  2713. isMp() {
  2714. let mp = false;
  2715. return mp;
  2716. }
  2717. },
  2718. data() {
  2719. return {};
  2720. },
  2721. methods: {
  2722. clickHandler() {
  2723. if (this.call && this.mode === "phone") {
  2724. uni.makePhoneCall({
  2725. phoneNumber: this.text
  2726. });
  2727. }
  2728. this.$emit("click");
  2729. }
  2730. }
  2731. };
  2732. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  2733. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  2734. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$9);
  2735. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  2736. "view",
  2737. {
  2738. key: 0,
  2739. class: vue.normalizeClass(["u-text", []]),
  2740. style: vue.normalizeStyle({
  2741. margin: _ctx.margin,
  2742. justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
  2743. }),
  2744. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  2745. },
  2746. [
  2747. _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
  2748. "text",
  2749. {
  2750. key: 0,
  2751. class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
  2752. style: vue.normalizeStyle([$options.valueStyle])
  2753. },
  2754. "¥",
  2755. 6
  2756. /* CLASS, STYLE */
  2757. )) : vue.createCommentVNode("v-if", true),
  2758. _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  2759. key: 1,
  2760. class: "u-text__prefix-icon"
  2761. }, [
  2762. vue.createVNode(_component_u_icon, {
  2763. name: _ctx.prefixIcon,
  2764. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  2765. }, null, 8, ["name", "customStyle"])
  2766. ])) : vue.createCommentVNode("v-if", true),
  2767. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
  2768. key: 2,
  2769. text: _ctx.value,
  2770. href: _ctx.href,
  2771. underLine: ""
  2772. }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
  2773. key: 3,
  2774. class: "u-reset-button u-text__value",
  2775. style: vue.normalizeStyle([$options.valueStyle]),
  2776. "data-index": _ctx.index,
  2777. openType: _ctx.openType,
  2778. onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
  2779. onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
  2780. onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
  2781. onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
  2782. onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
  2783. onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
  2784. lang: _ctx.lang,
  2785. "session-from": _ctx.sessionFrom,
  2786. "send-message-title": _ctx.sendMessageTitle,
  2787. "send-message-path": _ctx.sendMessagePath,
  2788. "send-message-img": _ctx.sendMessageImg,
  2789. "show-message-card": _ctx.showMessageCard,
  2790. "app-parameter": _ctx.appParameter
  2791. }, 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(
  2792. "text",
  2793. {
  2794. key: 4,
  2795. class: vue.normalizeClass(["u-text__value", [
  2796. _ctx.type && `u-text__value--${_ctx.type}`,
  2797. _ctx.lines && `u-line-${_ctx.lines}`
  2798. ]]),
  2799. style: vue.normalizeStyle([$options.valueStyle])
  2800. },
  2801. vue.toDisplayString(_ctx.value),
  2802. 7
  2803. /* TEXT, CLASS, STYLE */
  2804. )),
  2805. _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  2806. key: 5,
  2807. class: "u-text__suffix-icon"
  2808. }, [
  2809. vue.createVNode(_component_u_icon, {
  2810. name: _ctx.suffixIcon,
  2811. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  2812. }, null, 8, ["name", "customStyle"])
  2813. ])) : vue.createCommentVNode("v-if", true)
  2814. ],
  2815. 4
  2816. /* STYLE */
  2817. )) : vue.createCommentVNode("v-if", true);
  2818. }
  2819. const uvText = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-0a574502"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  2820. const _sfc_main$1m = {
  2821. name: "u--text",
  2822. mixins: [mpMixin, mixin, props$u],
  2823. components: {
  2824. uvText
  2825. }
  2826. };
  2827. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  2828. const _component_uvText = vue.resolveComponent("uvText");
  2829. return vue.openBlock(), vue.createBlock(_component_uvText, {
  2830. type: _ctx.type,
  2831. show: _ctx.show,
  2832. text: _ctx.text,
  2833. prefixIcon: _ctx.prefixIcon,
  2834. suffixIcon: _ctx.suffixIcon,
  2835. mode: _ctx.mode,
  2836. href: _ctx.href,
  2837. format: _ctx.format,
  2838. call: _ctx.call,
  2839. openType: _ctx.openType,
  2840. bold: _ctx.bold,
  2841. block: _ctx.block,
  2842. lines: _ctx.lines,
  2843. color: _ctx.color,
  2844. decoration: _ctx.decoration,
  2845. size: _ctx.size,
  2846. iconStyle: _ctx.iconStyle,
  2847. margin: _ctx.margin,
  2848. lineHeight: _ctx.lineHeight,
  2849. align: _ctx.align,
  2850. wordWrap: _ctx.wordWrap,
  2851. customStyle: _ctx.customStyle
  2852. }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
  2853. }
  2854. const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
  2855. const props$t = {
  2856. props: {
  2857. // 头像图片路径(不能为相对路径)
  2858. src: {
  2859. type: String,
  2860. default: props$x.avatar.src
  2861. },
  2862. // 头像形状,circle-圆形,square-方形
  2863. shape: {
  2864. type: String,
  2865. default: props$x.avatar.shape
  2866. },
  2867. // 头像尺寸
  2868. size: {
  2869. type: [String, Number],
  2870. default: props$x.avatar.size
  2871. },
  2872. // 裁剪模式
  2873. mode: {
  2874. type: String,
  2875. default: props$x.avatar.mode
  2876. },
  2877. // 显示的文字
  2878. text: {
  2879. type: String,
  2880. default: props$x.avatar.text
  2881. },
  2882. // 背景色
  2883. bgColor: {
  2884. type: String,
  2885. default: props$x.avatar.bgColor
  2886. },
  2887. // 文字颜色
  2888. color: {
  2889. type: String,
  2890. default: props$x.avatar.color
  2891. },
  2892. // 文字大小
  2893. fontSize: {
  2894. type: [String, Number],
  2895. default: props$x.avatar.fontSize
  2896. },
  2897. // 显示的图标
  2898. icon: {
  2899. type: String,
  2900. default: props$x.avatar.icon
  2901. },
  2902. // 显示小程序头像,只对百度,微信,QQ小程序有效
  2903. mpAvatar: {
  2904. type: Boolean,
  2905. default: props$x.avatar.mpAvatar
  2906. },
  2907. // 是否使用随机背景色
  2908. randomBgColor: {
  2909. type: Boolean,
  2910. default: props$x.avatar.randomBgColor
  2911. },
  2912. // 加载失败的默认头像(组件有内置默认图片)
  2913. defaultUrl: {
  2914. type: String,
  2915. default: props$x.avatar.defaultUrl
  2916. },
  2917. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  2918. colorIndex: {
  2919. type: [String, Number],
  2920. // 校验参数规则,索引在0-19之间
  2921. validator(n) {
  2922. return uni.$u.test.range(n, [0, 19]) || n === "";
  2923. },
  2924. default: props$x.avatar.colorIndex
  2925. },
  2926. // 组件标识符
  2927. name: {
  2928. type: String,
  2929. default: props$x.avatar.name
  2930. }
  2931. }
  2932. };
  2933. const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYG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";
  2934. const _sfc_main$1l = {
  2935. name: "u-avatar",
  2936. mixins: [mpMixin, mixin, props$t],
  2937. data() {
  2938. return {
  2939. // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
  2940. colors: [
  2941. "#ffb34b",
  2942. "#f2bba9",
  2943. "#f7a196",
  2944. "#f18080",
  2945. "#88a867",
  2946. "#bfbf39",
  2947. "#89c152",
  2948. "#94d554",
  2949. "#f19ec2",
  2950. "#afaae4",
  2951. "#e1b0df",
  2952. "#c38cc1",
  2953. "#72dcdc",
  2954. "#9acdcb",
  2955. "#77b1cc",
  2956. "#448aca",
  2957. "#86cefa",
  2958. "#98d1ee",
  2959. "#73d1f1",
  2960. "#80a7dc"
  2961. ],
  2962. avatarUrl: this.src,
  2963. allowMp: false
  2964. };
  2965. },
  2966. watch: {
  2967. // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
  2968. // 而组件内部不能直接修改props的值,所以需要一个中间变量
  2969. src: {
  2970. immediate: true,
  2971. handler(newVal) {
  2972. this.avatarUrl = newVal;
  2973. if (!newVal) {
  2974. this.errorHandler();
  2975. }
  2976. }
  2977. }
  2978. },
  2979. computed: {
  2980. imageStyle() {
  2981. const style = {};
  2982. return style;
  2983. }
  2984. },
  2985. created() {
  2986. this.init();
  2987. },
  2988. methods: {
  2989. init() {
  2990. },
  2991. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  2992. isImg() {
  2993. return this.src.indexOf("/") !== -1;
  2994. },
  2995. // 图片加载时失败时触发
  2996. errorHandler() {
  2997. this.avatarUrl = this.defaultUrl || base64Avatar;
  2998. },
  2999. clickHandler() {
  3000. this.$emit("click", this.name);
  3001. }
  3002. }
  3003. };
  3004. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  3005. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  3006. const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_1$8);
  3007. return vue.openBlock(), vue.createElementBlock(
  3008. "view",
  3009. {
  3010. class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]),
  3011. style: vue.normalizeStyle([{
  3012. backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : _ctx.$u.random(0, 19)] : _ctx.bgColor : "transparent",
  3013. width: _ctx.$u.addUnit(_ctx.size),
  3014. height: _ctx.$u.addUnit(_ctx.size)
  3015. }, _ctx.$u.addStyle(_ctx.customStyle)]),
  3016. onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  3017. },
  3018. [
  3019. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  3020. _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock(
  3021. vue.Fragment,
  3022. { key: 0 },
  3023. [],
  3024. 64
  3025. /* STABLE_FRAGMENT */
  3026. )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  3027. key: 1,
  3028. name: _ctx.icon,
  3029. size: _ctx.fontSize,
  3030. color: _ctx.color
  3031. }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_u__text, {
  3032. key: 2,
  3033. text: _ctx.text,
  3034. size: _ctx.fontSize,
  3035. color: _ctx.color,
  3036. align: "center",
  3037. customStyle: "justify-content: center"
  3038. }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  3039. key: 3,
  3040. class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]),
  3041. src: $data.avatarUrl || _ctx.defaultUrl,
  3042. mode: _ctx.mode,
  3043. onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)),
  3044. style: vue.normalizeStyle([{
  3045. width: _ctx.$u.addUnit(_ctx.size),
  3046. height: _ctx.$u.addUnit(_ctx.size)
  3047. }])
  3048. }, null, 46, ["src", "mode"]))
  3049. ], true)
  3050. ],
  3051. 6
  3052. /* CLASS, STYLE */
  3053. );
  3054. }
  3055. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-34d954f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
  3056. const props$s = {
  3057. props: {
  3058. color: {
  3059. type: String,
  3060. default: props$x.line.color
  3061. },
  3062. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  3063. length: {
  3064. type: [String, Number],
  3065. default: props$x.line.length
  3066. },
  3067. // 线条方向,col-竖向,row-横向
  3068. direction: {
  3069. type: String,
  3070. default: props$x.line.direction
  3071. },
  3072. // 是否显示细边框
  3073. hairline: {
  3074. type: Boolean,
  3075. default: props$x.line.hairline
  3076. },
  3077. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  3078. margin: {
  3079. type: [String, Number],
  3080. default: props$x.line.margin
  3081. },
  3082. // 是否虚线,true-虚线,false-实线
  3083. dashed: {
  3084. type: Boolean,
  3085. default: props$x.line.dashed
  3086. }
  3087. }
  3088. };
  3089. const _sfc_main$1k = {
  3090. name: "u-line",
  3091. mixins: [mpMixin, mixin, props$s],
  3092. computed: {
  3093. lineStyle() {
  3094. const style = {};
  3095. style.margin = this.margin;
  3096. if (this.direction === "row") {
  3097. style.borderBottomWidth = "1px";
  3098. style.borderBottomStyle = this.dashed ? "dashed" : "solid";
  3099. style.width = uni.$u.addUnit(this.length);
  3100. if (this.hairline)
  3101. style.transform = "scaleY(0.5)";
  3102. } else {
  3103. style.borderLeftWidth = "1px";
  3104. style.borderLeftStyle = this.dashed ? "dashed" : "solid";
  3105. style.height = uni.$u.addUnit(this.length);
  3106. if (this.hairline)
  3107. style.transform = "scaleX(0.5)";
  3108. }
  3109. style.borderColor = this.color;
  3110. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  3111. }
  3112. }
  3113. };
  3114. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  3115. return vue.openBlock(), vue.createElementBlock(
  3116. "view",
  3117. {
  3118. class: "u-line",
  3119. style: vue.normalizeStyle([$options.lineStyle])
  3120. },
  3121. null,
  3122. 4
  3123. /* STYLE */
  3124. );
  3125. }
  3126. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-72791e59"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
  3127. const props$r = {
  3128. props: {
  3129. // 标题
  3130. title: {
  3131. type: [String, Number],
  3132. default: props$x.cell.title
  3133. },
  3134. // 标题下方的描述信息
  3135. label: {
  3136. type: [String, Number],
  3137. default: props$x.cell.label
  3138. },
  3139. // 右侧的内容
  3140. value: {
  3141. type: [String, Number],
  3142. default: props$x.cell.value
  3143. },
  3144. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  3145. icon: {
  3146. type: String,
  3147. default: props$x.cell.icon
  3148. },
  3149. // 是否禁用cell
  3150. disabled: {
  3151. type: Boolean,
  3152. default: props$x.cell.disabled
  3153. },
  3154. // 是否显示下边框
  3155. border: {
  3156. type: Boolean,
  3157. default: props$x.cell.border
  3158. },
  3159. // 内容是否垂直居中(主要是针对右侧的value部分)
  3160. center: {
  3161. type: Boolean,
  3162. default: props$x.cell.center
  3163. },
  3164. // 点击后跳转的URL地址
  3165. url: {
  3166. type: String,
  3167. default: props$x.cell.url
  3168. },
  3169. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  3170. linkType: {
  3171. type: String,
  3172. default: props$x.cell.linkType
  3173. },
  3174. // 是否开启点击反馈(表现为点击时加上灰色背景)
  3175. clickable: {
  3176. type: Boolean,
  3177. default: props$x.cell.clickable
  3178. },
  3179. // 是否展示右侧箭头并开启点击反馈
  3180. isLink: {
  3181. type: Boolean,
  3182. default: props$x.cell.isLink
  3183. },
  3184. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  3185. required: {
  3186. type: Boolean,
  3187. default: props$x.cell.required
  3188. },
  3189. // 右侧的图标箭头
  3190. rightIcon: {
  3191. type: String,
  3192. default: props$x.cell.rightIcon
  3193. },
  3194. // 右侧箭头的方向,可选值为:left,up,down
  3195. arrowDirection: {
  3196. type: String,
  3197. default: props$x.cell.arrowDirection
  3198. },
  3199. // 左侧图标样式
  3200. iconStyle: {
  3201. type: [Object, String],
  3202. default: () => {
  3203. return uni.$u.props.cell.iconStyle;
  3204. }
  3205. },
  3206. // 右侧箭头图标的样式
  3207. rightIconStyle: {
  3208. type: [Object, String],
  3209. default: () => {
  3210. return uni.$u.props.cell.rightIconStyle;
  3211. }
  3212. },
  3213. // 标题的样式
  3214. titleStyle: {
  3215. type: [Object, String],
  3216. default: () => {
  3217. return uni.$u.props.cell.titleStyle;
  3218. }
  3219. },
  3220. // 单位元的大小,可选值为large
  3221. size: {
  3222. type: String,
  3223. default: props$x.cell.size
  3224. },
  3225. // 点击cell是否阻止事件传播
  3226. stop: {
  3227. type: Boolean,
  3228. default: props$x.cell.stop
  3229. },
  3230. // 标识符,cell被点击时返回
  3231. name: {
  3232. type: [Number, String],
  3233. default: props$x.cell.name
  3234. }
  3235. }
  3236. };
  3237. const _sfc_main$1j = {
  3238. name: "u-cell",
  3239. data() {
  3240. return {};
  3241. },
  3242. mixins: [mpMixin, mixin, props$r],
  3243. computed: {
  3244. titleTextStyle() {
  3245. return uni.$u.addStyle(this.titleStyle);
  3246. }
  3247. },
  3248. emits: ["click"],
  3249. methods: {
  3250. // 点击cell
  3251. clickHandler(e) {
  3252. if (this.disabled)
  3253. return;
  3254. this.$emit("click", {
  3255. name: this.name
  3256. });
  3257. this.openPage();
  3258. this.stop && this.preventEvent(e);
  3259. }
  3260. }
  3261. };
  3262. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  3263. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  3264. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
  3265. return vue.openBlock(), vue.createElementBlock("view", {
  3266. class: vue.normalizeClass(["u-cell", [_ctx.customClass]]),
  3267. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  3268. "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
  3269. "hover-stay-time": 250,
  3270. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  3271. }, [
  3272. vue.createElementVNode(
  3273. "view",
  3274. {
  3275. class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]])
  3276. },
  3277. [
  3278. vue.createElementVNode("view", { class: "u-cell__body__content" }, [
  3279. vue.createElementVNode("view", { class: "u-cell__left-icon-wrap" }, [
  3280. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  3281. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  3282. key: 0,
  3283. name: _ctx.icon,
  3284. "custom-style": _ctx.iconStyle,
  3285. size: _ctx.size === "large" ? 22 : 18
  3286. }, null, 8, ["name", "custom-style", "size"])) : vue.createCommentVNode("v-if", true)
  3287. ], true)
  3288. ]),
  3289. vue.createElementVNode("view", { class: "u-cell__title" }, [
  3290. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  3291. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  3292. "text",
  3293. {
  3294. key: 0,
  3295. class: vue.normalizeClass(["u-cell__title-text", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]),
  3296. style: vue.normalizeStyle([$options.titleTextStyle])
  3297. },
  3298. vue.toDisplayString(_ctx.title),
  3299. 7
  3300. /* TEXT, CLASS, STYLE */
  3301. )) : vue.createCommentVNode("v-if", true)
  3302. ], true),
  3303. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  3304. _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  3305. "text",
  3306. {
  3307. key: 0,
  3308. class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]])
  3309. },
  3310. vue.toDisplayString(_ctx.label),
  3311. 3
  3312. /* TEXT, CLASS */
  3313. )) : vue.createCommentVNode("v-if", true)
  3314. ], true)
  3315. ])
  3316. ]),
  3317. vue.renderSlot(_ctx.$slots, "value", {}, () => [
  3318. !_ctx.$u.test.empty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock(
  3319. "text",
  3320. {
  3321. key: 0,
  3322. class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]])
  3323. },
  3324. vue.toDisplayString(_ctx.value),
  3325. 3
  3326. /* TEXT, CLASS */
  3327. )) : vue.createCommentVNode("v-if", true)
  3328. ], true),
  3329. vue.createElementVNode(
  3330. "view",
  3331. {
  3332. class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
  3333. },
  3334. [
  3335. vue.renderSlot(_ctx.$slots, "right-icon", {}, () => [
  3336. _ctx.isLink ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  3337. key: 0,
  3338. name: _ctx.rightIcon,
  3339. "custom-style": _ctx.rightIconStyle,
  3340. color: _ctx.disabled ? "#c8c9cc" : "info",
  3341. size: _ctx.size === "large" ? 18 : 16
  3342. }, null, 8, ["name", "custom-style", "color", "size"])) : vue.createCommentVNode("v-if", true)
  3343. ], true)
  3344. ],
  3345. 2
  3346. /* CLASS */
  3347. )
  3348. ],
  3349. 2
  3350. /* CLASS */
  3351. ),
  3352. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  3353. ], 14, ["hover-class"]);
  3354. }
  3355. const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-3fd6feca"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
  3356. const props$q = {
  3357. props: {
  3358. // 分组标题
  3359. title: {
  3360. type: String,
  3361. default: props$x.cellGroup.title
  3362. },
  3363. // 是否显示外边框
  3364. border: {
  3365. type: Boolean,
  3366. default: props$x.cellGroup.border
  3367. }
  3368. }
  3369. };
  3370. const _sfc_main$1i = {
  3371. name: "u-cell-group",
  3372. mixins: [mpMixin, mixin, props$q]
  3373. };
  3374. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  3375. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
  3376. return vue.openBlock(), vue.createElementBlock(
  3377. "view",
  3378. {
  3379. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  3380. class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"])
  3381. },
  3382. [
  3383. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  3384. key: 0,
  3385. class: "u-cell-group__title"
  3386. }, [
  3387. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  3388. vue.createElementVNode(
  3389. "text",
  3390. { class: "u-cell-group__title__text" },
  3391. vue.toDisplayString(_ctx.title),
  3392. 1
  3393. /* TEXT */
  3394. )
  3395. ], true)
  3396. ])) : vue.createCommentVNode("v-if", true),
  3397. vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [
  3398. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  3399. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  3400. ])
  3401. ],
  3402. 6
  3403. /* CLASS, STYLE */
  3404. );
  3405. }
  3406. const __easycom_2$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-014d39dc"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
  3407. const _sfc_main$1h = {
  3408. __name: "my",
  3409. setup(__props, { expose: __expose }) {
  3410. __expose();
  3411. const settingsList = vue.ref([
  3412. {
  3413. title: "用户信息",
  3414. path: "/pages/my/page/user-info",
  3415. icon: "account"
  3416. },
  3417. {
  3418. title: "默认仓库",
  3419. path: "/pages/my/page/warehouse",
  3420. icon: "home"
  3421. },
  3422. {
  3423. title: "学校设置",
  3424. path: "/pages/my/page/school"
  3425. },
  3426. {
  3427. title: "审核未完成",
  3428. path: "/pages/my/page/audit-unfinished",
  3429. icon: "order"
  3430. },
  3431. {
  3432. title: "版本设置",
  3433. path: "/pages/my/page/version",
  3434. icon: "tags"
  3435. },
  3436. {
  3437. title: "音频设置",
  3438. path: "/pages/my/page/volume",
  3439. icon: "volume"
  3440. },
  3441. {
  3442. title: "图书显示设置",
  3443. path: "/pages/my/page/book-display",
  3444. icon: "bookmark"
  3445. },
  3446. {
  3447. title: "修改密码",
  3448. icon: "lock",
  3449. path: "/pages/my/page/password"
  3450. },
  3451. {
  3452. title: "退出账号",
  3453. path: "/pages/my/page/logout",
  3454. type: "logout"
  3455. }
  3456. ]);
  3457. const handleClick = (item) => {
  3458. if (item.type === "logout") {
  3459. uni.showModal({
  3460. title: "提示",
  3461. content: "确定要退出登录吗?",
  3462. success: (res) => {
  3463. if (res.confirm) {
  3464. uni.clearStorageSync();
  3465. uni.reLaunch({
  3466. url: "/pages/login/index"
  3467. });
  3468. }
  3469. }
  3470. });
  3471. return;
  3472. }
  3473. uni.navigateTo({
  3474. url: item.path
  3475. });
  3476. };
  3477. const __returned__ = { settingsList, handleClick, ref: vue.ref };
  3478. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  3479. return __returned__;
  3480. }
  3481. };
  3482. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  3483. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$9);
  3484. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  3485. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  3486. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
  3487. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-page" }, [
  3488. vue.createCommentVNode(" 顶部用户信息 "),
  3489. vue.createElementVNode("view", { class: "user-header" }, [
  3490. vue.createElementVNode("view", { class: "user-info" }, [
  3491. vue.createVNode(_component_u_avatar, {
  3492. size: 50,
  3493. src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
  3494. }),
  3495. vue.createElementVNode("view", { class: "greeting" }, [
  3496. vue.createElementVNode("text", { class: "time" }, "下午好!"),
  3497. vue.createElementVNode("text", { class: "name" }, "涨涨涨")
  3498. ])
  3499. ])
  3500. ]),
  3501. vue.createCommentVNode(" 设置列表 "),
  3502. vue.createElementVNode("view", { class: "settings-list" }, [
  3503. vue.createVNode(_component_u_cell_group, { border: false }, {
  3504. default: vue.withCtx(() => [
  3505. (vue.openBlock(true), vue.createElementBlock(
  3506. vue.Fragment,
  3507. null,
  3508. vue.renderList($setup.settingsList, (item, index2) => {
  3509. return vue.openBlock(), vue.createBlock(_component_u_cell, {
  3510. key: index2,
  3511. title: item.title,
  3512. isLink: true,
  3513. onClick: ($event) => $setup.handleClick(item),
  3514. border: index2 == $setup.settingsList.length - 1 ? false : true
  3515. }, {
  3516. icon: vue.withCtx(() => [
  3517. vue.createElementVNode("view", { class: "cell-icon" }, [
  3518. vue.createVNode(_component_u_icon, {
  3519. name: item.icon || "setting",
  3520. size: "32rpx",
  3521. color: "#333"
  3522. }, null, 8, ["name"])
  3523. ])
  3524. ]),
  3525. _: 2
  3526. /* DYNAMIC */
  3527. }, 1032, ["title", "onClick", "border"]);
  3528. }),
  3529. 128
  3530. /* KEYED_FRAGMENT */
  3531. ))
  3532. ]),
  3533. _: 1
  3534. /* STABLE */
  3535. })
  3536. ])
  3537. ]);
  3538. }
  3539. const PagesMyMy = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-2f1ef635"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/my.vue"]]);
  3540. const GlobalOption = {
  3541. down: {
  3542. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  3543. offset: 80,
  3544. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  3545. native: false
  3546. // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  3547. },
  3548. up: {
  3549. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  3550. offset: 150,
  3551. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  3552. toTop: {
  3553. // 回到顶部按钮,需配置src才显示
  3554. src: "https://www.mescroll.com/img/mescroll-totop.png",
  3555. // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  3556. offset: 1e3,
  3557. // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  3558. right: 20,
  3559. // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  3560. bottom: 120,
  3561. // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  3562. width: 72
  3563. // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  3564. },
  3565. empty: {
  3566. use: true,
  3567. // 是否显示空布局
  3568. icon: "https://www.mescroll.com/img/mescroll-empty.png"
  3569. // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  3570. }
  3571. },
  3572. // 国际化配置
  3573. i18n: {
  3574. // 中文
  3575. zh: {
  3576. down: {
  3577. textInOffset: "下拉刷新",
  3578. // 下拉的距离在offset范围内的提示文本
  3579. textOutOffset: "释放更新",
  3580. // 下拉的距离大于offset范围的提示文本
  3581. textLoading: "加载中 ...",
  3582. // 加载中的提示文本
  3583. textSuccess: "加载成功",
  3584. // 加载成功的文本
  3585. textErr: "加载失败"
  3586. // 加载失败的文本
  3587. },
  3588. up: {
  3589. textLoading: "加载中 ...",
  3590. // 加载中的提示文本
  3591. textNoMore: "-- END --",
  3592. // 没有更多数据的提示文本
  3593. empty: {
  3594. tip: "暂无数据"
  3595. // 空提示
  3596. }
  3597. }
  3598. },
  3599. // 英文
  3600. en: {
  3601. down: {
  3602. textInOffset: "drop down refresh",
  3603. textOutOffset: "release updates",
  3604. textLoading: "loading ...",
  3605. textSuccess: "loaded successfully",
  3606. textErr: "loading failed"
  3607. },
  3608. up: {
  3609. textLoading: "loading ...",
  3610. textNoMore: "-- END --",
  3611. empty: {
  3612. tip: "~ absolutely empty ~"
  3613. }
  3614. }
  3615. }
  3616. }
  3617. };
  3618. const mescrollI18n = {
  3619. // 默认语言
  3620. def: "zh",
  3621. // 获取当前语言类型
  3622. getType() {
  3623. return uni.getStorageSync("mescroll-i18n") || this.def;
  3624. },
  3625. // 设置当前语言类型
  3626. setType(type2) {
  3627. uni.setStorageSync("mescroll-i18n", type2);
  3628. }
  3629. };
  3630. const _imports_0 = "/assets/no-result.6af066e5.png";
  3631. const _sfc_main$1g = {
  3632. props: {
  3633. // empty的配置项: 默认为GlobalOption.up.empty
  3634. option: {
  3635. type: Object,
  3636. default() {
  3637. return {};
  3638. }
  3639. }
  3640. },
  3641. // 使用computed获取配置,用于支持option的动态配置
  3642. computed: {
  3643. // 图标
  3644. icon() {
  3645. if (this.option.icon != null) {
  3646. return this.option.icon;
  3647. } else {
  3648. let i18nType = mescrollI18n.getType();
  3649. if (this.option.i18n) {
  3650. return this.option.i18n[i18nType].icon;
  3651. } else {
  3652. return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
  3653. }
  3654. }
  3655. },
  3656. // 文本提示
  3657. tip() {
  3658. if (this.option.tip != null) {
  3659. return this.option.tip;
  3660. } else {
  3661. let i18nType = mescrollI18n.getType();
  3662. if (this.option.i18n) {
  3663. return this.option.i18n[i18nType].tip;
  3664. } else {
  3665. return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
  3666. }
  3667. }
  3668. },
  3669. // 按钮文本
  3670. btnText() {
  3671. if (this.option.i18n) {
  3672. let i18nType = mescrollI18n.getType();
  3673. return this.option.i18n[i18nType].btnText;
  3674. } else {
  3675. return this.option.btnText;
  3676. }
  3677. }
  3678. },
  3679. methods: {
  3680. // 点击按钮
  3681. emptyClick() {
  3682. this.$emit("emptyclick");
  3683. }
  3684. }
  3685. };
  3686. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  3687. return vue.openBlock(), vue.createElementBlock(
  3688. "view",
  3689. {
  3690. class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
  3691. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
  3692. },
  3693. [
  3694. vue.createCommentVNode(' <view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view> '),
  3695. vue.createElementVNode("view", null, [
  3696. $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  3697. key: 0,
  3698. class: "empty-icon",
  3699. src: _imports_0,
  3700. mode: "widthFix"
  3701. })) : vue.createCommentVNode("v-if", true)
  3702. ]),
  3703. $options.tip ? (vue.openBlock(), vue.createElementBlock(
  3704. "view",
  3705. {
  3706. key: 0,
  3707. class: "empty-tip"
  3708. },
  3709. vue.toDisplayString($options.tip),
  3710. 1
  3711. /* TEXT */
  3712. )) : vue.createCommentVNode("v-if", true),
  3713. $options.btnText ? (vue.openBlock(), vue.createElementBlock(
  3714. "view",
  3715. {
  3716. key: 1,
  3717. class: "empty-btn",
  3718. onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
  3719. },
  3720. vue.toDisplayString($options.btnText),
  3721. 1
  3722. /* TEXT */
  3723. )) : vue.createCommentVNode("v-if", true)
  3724. ],
  3725. 6
  3726. /* CLASS, STYLE */
  3727. );
  3728. }
  3729. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-7cefd855"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]);
  3730. function MeScroll(options, isScrollBody) {
  3731. let me = this;
  3732. me.version = "1.3.7";
  3733. me.options = options || {};
  3734. me.isScrollBody = isScrollBody || false;
  3735. me.isDownScrolling = false;
  3736. me.isUpScrolling = false;
  3737. let hasDownCallback = me.options.down && me.options.down.callback;
  3738. me.initDownScroll();
  3739. me.initUpScroll();
  3740. setTimeout(function() {
  3741. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  3742. if (me.optDown.autoShowLoading) {
  3743. me.triggerDownScroll();
  3744. } else {
  3745. me.optDown.callback && me.optDown.callback(me);
  3746. }
  3747. }
  3748. if (!me.isUpAutoLoad) {
  3749. setTimeout(function() {
  3750. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  3751. }, 100);
  3752. }
  3753. }, 30);
  3754. }
  3755. MeScroll.prototype.extendDownScroll = function(optDown) {
  3756. MeScroll.extend(optDown, {
  3757. use: true,
  3758. // 是否启用下拉刷新; 默认true
  3759. auto: true,
  3760. // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  3761. native: false,
  3762. // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  3763. autoShowLoading: false,
  3764. // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  3765. isLock: false,
  3766. // 是否锁定下拉刷新,默认false;
  3767. offset: 80,
  3768. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  3769. startTop: 100,
  3770. // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  3771. inOffsetRate: 1,
  3772. // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  3773. outOffsetRate: 0.2,
  3774. // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  3775. bottomOffset: 20,
  3776. // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  3777. minAngle: 45,
  3778. // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  3779. textInOffset: "下拉刷新",
  3780. // 下拉的距离在offset范围内的提示文本
  3781. textOutOffset: "释放更新",
  3782. // 下拉的距离大于offset范围的提示文本
  3783. textLoading: "加载中 ...",
  3784. // 加载中的提示文本
  3785. textSuccess: "加载成功",
  3786. // 加载成功的文本
  3787. textErr: "加载失败",
  3788. // 加载失败的文本
  3789. beforeEndDelay: 0,
  3790. // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
  3791. bgColor: "transparent",
  3792. // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  3793. textColor: "gray",
  3794. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  3795. inited: null,
  3796. // 下拉刷新初始化完毕的回调
  3797. inOffset: null,
  3798. // 下拉的距离进入offset范围内那一刻的回调
  3799. outOffset: null,
  3800. // 下拉的距离大于offset那一刻的回调
  3801. onMoving: null,
  3802. // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  3803. beforeLoading: null,
  3804. // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  3805. showLoading: null,
  3806. // 显示下拉刷新进度的回调
  3807. afterLoading: null,
  3808. // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  3809. beforeEndDownScroll: null,
  3810. // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  3811. endDownScroll: null,
  3812. // 结束下拉刷新的回调
  3813. afterEndDownScroll: null,
  3814. // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  3815. callback: function(mescroll) {
  3816. mescroll.resetUpScroll();
  3817. }
  3818. });
  3819. };
  3820. MeScroll.prototype.extendUpScroll = function(optUp) {
  3821. MeScroll.extend(optUp, {
  3822. use: true,
  3823. // 是否启用上拉加载; 默认true
  3824. auto: true,
  3825. // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  3826. isLock: false,
  3827. // 是否锁定上拉加载,默认false;
  3828. isBoth: true,
  3829. // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  3830. callback: null,
  3831. // 上拉加载的回调;function(page,mescroll){ }
  3832. page: {
  3833. num: 0,
  3834. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  3835. size: 10,
  3836. // 每页数据的数量
  3837. time: null
  3838. // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  3839. },
  3840. noMoreSize: 5,
  3841. // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  3842. offset: 150,
  3843. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  3844. textLoading: "加载中 ...",
  3845. // 加载中的提示文本
  3846. textNoMore: "-- END --",
  3847. // 没有更多数据的提示文本
  3848. bgColor: "transparent",
  3849. // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  3850. textColor: "gray",
  3851. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  3852. inited: null,
  3853. // 初始化完毕的回调
  3854. showLoading: null,
  3855. // 显示加载中的回调
  3856. showNoMore: null,
  3857. // 显示无更多数据的回调
  3858. hideUpScroll: null,
  3859. // 隐藏上拉加载的回调
  3860. errDistance: 60,
  3861. // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  3862. toTop: {
  3863. // 回到顶部按钮,需配置src才显示
  3864. src: null,
  3865. // 图片路径,默认null (绝对路径或网络图)
  3866. offset: 1e3,
  3867. // 列表滚动多少距离才显示回到顶部按钮,默认1000
  3868. duration: 300,
  3869. // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  3870. btnClick: null,
  3871. // 点击按钮的回调
  3872. onShow: null,
  3873. // 是否显示的回调
  3874. zIndex: 9990,
  3875. // fixed定位z-index值
  3876. left: null,
  3877. // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3878. right: 20,
  3879. // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3880. bottom: 120,
  3881. // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3882. safearea: false,
  3883. // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  3884. width: 72,
  3885. // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3886. radius: "50%"
  3887. // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3888. },
  3889. empty: {
  3890. use: true,
  3891. // 是否显示空布局
  3892. icon: null,
  3893. // 图标路径
  3894. tip: "~ 暂无相关数据 ~",
  3895. // 提示
  3896. btnText: "",
  3897. // 按钮
  3898. btnClick: null,
  3899. // 点击按钮的回调
  3900. onShow: null,
  3901. // 是否显示的回调
  3902. fixed: false,
  3903. // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  3904. top: "100rpx",
  3905. // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  3906. zIndex: 99
  3907. // fixed定位z-index值
  3908. },
  3909. onScroll: false
  3910. // 是否监听滚动事件
  3911. });
  3912. };
  3913. MeScroll.extend = function(userOption, defaultOption) {
  3914. if (!userOption)
  3915. return defaultOption;
  3916. for (let key in defaultOption) {
  3917. if (userOption[key] == null) {
  3918. let def = defaultOption[key];
  3919. if (def != null && typeof def === "object") {
  3920. userOption[key] = MeScroll.extend({}, def);
  3921. } else {
  3922. userOption[key] = def;
  3923. }
  3924. } else if (typeof userOption[key] === "object") {
  3925. MeScroll.extend(userOption[key], defaultOption[key]);
  3926. }
  3927. }
  3928. return userOption;
  3929. };
  3930. MeScroll.prototype.hasColor = function(color2) {
  3931. if (!color2)
  3932. return false;
  3933. let c = color2.toLowerCase();
  3934. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  3935. };
  3936. MeScroll.prototype.initDownScroll = function() {
  3937. let me = this;
  3938. me.optDown = me.options.down || {};
  3939. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
  3940. me.optDown.textColor = "#fff";
  3941. me.extendDownScroll(me.optDown);
  3942. if (me.isScrollBody && me.optDown.native) {
  3943. me.optDown.use = false;
  3944. } else {
  3945. me.optDown.native = false;
  3946. }
  3947. me.downHight = 0;
  3948. if (me.optDown.use && me.optDown.inited) {
  3949. setTimeout(function() {
  3950. me.optDown.inited(me);
  3951. }, 0);
  3952. }
  3953. };
  3954. MeScroll.prototype.touchstartEvent = function(e) {
  3955. if (!this.optDown.use)
  3956. return;
  3957. this.startPoint = this.getPoint(e);
  3958. this.startTop = this.getScrollTop();
  3959. this.startAngle = 0;
  3960. this.lastPoint = this.startPoint;
  3961. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
  3962. this.inTouchend = false;
  3963. };
  3964. MeScroll.prototype.touchmoveEvent = function(e) {
  3965. if (!this.optDown.use)
  3966. return;
  3967. let me = this;
  3968. let scrollTop = me.getScrollTop();
  3969. let curPoint = me.getPoint(e);
  3970. let moveY = curPoint.y - me.startPoint.y;
  3971. if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
  3972. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
  3973. if (!me.startAngle)
  3974. me.startAngle = me.getAngle(me.lastPoint, curPoint);
  3975. if (me.startAngle < me.optDown.minAngle)
  3976. return;
  3977. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  3978. me.inTouchend = true;
  3979. me.touchendEvent();
  3980. return;
  3981. }
  3982. me.preventDefault(e);
  3983. let diff = curPoint.y - me.lastPoint.y;
  3984. if (me.downHight < me.optDown.offset) {
  3985. if (me.movetype !== 1) {
  3986. me.movetype = 1;
  3987. me.isDownEndSuccess = null;
  3988. me.optDown.inOffset && me.optDown.inOffset(me);
  3989. me.isMoveDown = true;
  3990. }
  3991. me.downHight += diff * me.optDown.inOffsetRate;
  3992. } else {
  3993. if (me.movetype !== 2) {
  3994. me.movetype = 2;
  3995. me.optDown.outOffset && me.optDown.outOffset(me);
  3996. me.isMoveDown = true;
  3997. }
  3998. if (diff > 0) {
  3999. me.downHight += diff * me.optDown.outOffsetRate;
  4000. } else {
  4001. me.downHight += diff;
  4002. }
  4003. }
  4004. me.downHight = Math.round(me.downHight);
  4005. let rate = me.downHight / me.optDown.offset;
  4006. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
  4007. }
  4008. }
  4009. me.lastPoint = curPoint;
  4010. };
  4011. MeScroll.prototype.touchendEvent = function(e) {
  4012. if (!this.optDown.use)
  4013. return;
  4014. if (this.isMoveDown) {
  4015. if (this.downHight >= this.optDown.offset) {
  4016. this.triggerDownScroll();
  4017. } else {
  4018. this.downHight = 0;
  4019. this.endDownScrollCall(this);
  4020. }
  4021. this.movetype = 0;
  4022. this.isMoveDown = false;
  4023. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
  4024. let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
  4025. if (isScrollUp) {
  4026. let angle = this.getAngle(this.getPoint(e), this.startPoint);
  4027. if (angle > 80) {
  4028. this.triggerUpScroll(true);
  4029. }
  4030. }
  4031. }
  4032. };
  4033. MeScroll.prototype.getPoint = function(e) {
  4034. if (!e) {
  4035. return {
  4036. x: 0,
  4037. y: 0
  4038. };
  4039. }
  4040. if (e.touches && e.touches[0]) {
  4041. return {
  4042. x: e.touches[0].pageX,
  4043. y: e.touches[0].pageY
  4044. };
  4045. } else if (e.changedTouches && e.changedTouches[0]) {
  4046. return {
  4047. x: e.changedTouches[0].pageX,
  4048. y: e.changedTouches[0].pageY
  4049. };
  4050. } else {
  4051. return {
  4052. x: e.clientX,
  4053. y: e.clientY
  4054. };
  4055. }
  4056. };
  4057. MeScroll.prototype.getAngle = function(p1, p2) {
  4058. let x = Math.abs(p1.x - p2.x);
  4059. let y = Math.abs(p1.y - p2.y);
  4060. let z = Math.sqrt(x * x + y * y);
  4061. let angle = 0;
  4062. if (z !== 0) {
  4063. angle = Math.asin(y / z) / Math.PI * 180;
  4064. }
  4065. return angle;
  4066. };
  4067. MeScroll.prototype.triggerDownScroll = function() {
  4068. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
  4069. ;
  4070. else {
  4071. this.showDownScroll();
  4072. !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
  4073. }
  4074. };
  4075. MeScroll.prototype.showDownScroll = function() {
  4076. this.isDownScrolling = true;
  4077. if (this.optDown.native) {
  4078. uni.startPullDownRefresh();
  4079. this.showDownLoadingCall(0);
  4080. } else {
  4081. this.downHight = this.optDown.offset;
  4082. this.showDownLoadingCall(this.downHight);
  4083. }
  4084. };
  4085. MeScroll.prototype.showDownLoadingCall = function(downHight) {
  4086. this.optDown.showLoading && this.optDown.showLoading(this, downHight);
  4087. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
  4088. };
  4089. MeScroll.prototype.onPullDownRefresh = function() {
  4090. this.isDownScrolling = true;
  4091. this.showDownLoadingCall(0);
  4092. this.optDown.callback && this.optDown.callback(this);
  4093. };
  4094. MeScroll.prototype.endDownScroll = function() {
  4095. if (this.optDown.native) {
  4096. this.isDownScrolling = false;
  4097. this.endDownScrollCall(this);
  4098. uni.stopPullDownRefresh();
  4099. return;
  4100. }
  4101. let me = this;
  4102. let endScroll = function() {
  4103. me.downHight = 0;
  4104. me.isDownScrolling = false;
  4105. me.endDownScrollCall(me);
  4106. if (!me.isScrollBody) {
  4107. me.setScrollHeight(0);
  4108. me.scrollTo(0, 0);
  4109. }
  4110. };
  4111. let delay = 0;
  4112. if (me.optDown.beforeEndDownScroll) {
  4113. delay = me.optDown.beforeEndDownScroll(me);
  4114. if (me.isDownEndSuccess == null)
  4115. delay = 0;
  4116. }
  4117. if (typeof delay === "number" && delay > 0) {
  4118. setTimeout(endScroll, delay);
  4119. } else {
  4120. endScroll();
  4121. }
  4122. };
  4123. MeScroll.prototype.endDownScrollCall = function() {
  4124. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  4125. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  4126. };
  4127. MeScroll.prototype.lockDownScroll = function(isLock) {
  4128. if (isLock == null)
  4129. isLock = true;
  4130. this.optDown.isLock = isLock;
  4131. };
  4132. MeScroll.prototype.lockUpScroll = function(isLock) {
  4133. if (isLock == null)
  4134. isLock = true;
  4135. this.optUp.isLock = isLock;
  4136. };
  4137. MeScroll.prototype.initUpScroll = function() {
  4138. let me = this;
  4139. me.optUp = me.options.up || { use: false };
  4140. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
  4141. me.optUp.textColor = "#fff";
  4142. me.extendUpScroll(me.optUp);
  4143. if (me.optUp.use === false)
  4144. return;
  4145. me.optUp.hasNext = true;
  4146. me.startNum = me.optUp.page.num + 1;
  4147. if (me.optUp.inited) {
  4148. setTimeout(function() {
  4149. me.optUp.inited(me);
  4150. }, 0);
  4151. }
  4152. };
  4153. MeScroll.prototype.onReachBottom = function() {
  4154. if (this.isScrollBody && !this.isUpScrolling) {
  4155. if (!this.optUp.isLock && this.optUp.hasNext) {
  4156. this.triggerUpScroll();
  4157. }
  4158. }
  4159. };
  4160. MeScroll.prototype.onPageScroll = function(e) {
  4161. if (!this.isScrollBody)
  4162. return;
  4163. this.setScrollTop(e.scrollTop);
  4164. if (e.scrollTop >= this.optUp.toTop.offset) {
  4165. this.showTopBtn();
  4166. } else {
  4167. this.hideTopBtn();
  4168. }
  4169. };
  4170. MeScroll.prototype.scroll = function(e, onScroll) {
  4171. this.setScrollTop(e.scrollTop);
  4172. this.setScrollHeight(e.scrollHeight);
  4173. if (this.preScrollY == null)
  4174. this.preScrollY = 0;
  4175. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  4176. this.preScrollY = e.scrollTop;
  4177. this.isScrollUp && this.triggerUpScroll(true);
  4178. if (e.scrollTop >= this.optUp.toTop.offset) {
  4179. this.showTopBtn();
  4180. } else {
  4181. this.hideTopBtn();
  4182. }
  4183. this.optUp.onScroll && onScroll && onScroll();
  4184. };
  4185. MeScroll.prototype.triggerUpScroll = function(isCheck) {
  4186. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  4187. if (isCheck === true) {
  4188. let canUp = false;
  4189. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  4190. if (this.getScrollBottom() <= this.optUp.offset) {
  4191. canUp = true;
  4192. }
  4193. }
  4194. if (canUp === false)
  4195. return;
  4196. }
  4197. this.showUpScroll();
  4198. this.optUp.page.num++;
  4199. this.isUpAutoLoad = true;
  4200. this.num = this.optUp.page.num;
  4201. this.size = this.optUp.page.size;
  4202. this.time = this.optUp.page.time;
  4203. this.optUp.callback(this);
  4204. }
  4205. };
  4206. MeScroll.prototype.showUpScroll = function() {
  4207. this.isUpScrolling = true;
  4208. this.optUp.showLoading && this.optUp.showLoading(this);
  4209. };
  4210. MeScroll.prototype.showNoMore = function() {
  4211. this.optUp.hasNext = false;
  4212. this.optUp.showNoMore && this.optUp.showNoMore(this);
  4213. };
  4214. MeScroll.prototype.hideUpScroll = function() {
  4215. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
  4216. };
  4217. MeScroll.prototype.endUpScroll = function(isShowNoMore) {
  4218. if (isShowNoMore != null) {
  4219. if (isShowNoMore) {
  4220. this.showNoMore();
  4221. } else {
  4222. this.hideUpScroll();
  4223. }
  4224. }
  4225. this.isUpScrolling = false;
  4226. };
  4227. MeScroll.prototype.resetUpScroll = function(isShowLoading) {
  4228. if (this.optUp && this.optUp.use) {
  4229. let page2 = this.optUp.page;
  4230. this.prePageNum = page2.num;
  4231. this.prePageTime = page2.time;
  4232. page2.num = this.startNum;
  4233. page2.time = null;
  4234. if (!this.isDownScrolling && isShowLoading !== false) {
  4235. if (isShowLoading == null) {
  4236. this.removeEmpty();
  4237. this.showUpScroll();
  4238. } else {
  4239. this.showDownScroll();
  4240. }
  4241. }
  4242. this.isUpAutoLoad = true;
  4243. this.num = page2.num;
  4244. this.size = page2.size;
  4245. this.time = page2.time;
  4246. this.optUp.callback && this.optUp.callback(this);
  4247. }
  4248. };
  4249. MeScroll.prototype.setPageNum = function(num) {
  4250. this.optUp.page.num = num - 1;
  4251. };
  4252. MeScroll.prototype.setPageSize = function(size) {
  4253. this.optUp.page.size = size;
  4254. };
  4255. MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
  4256. let hasNext;
  4257. if (this.optUp.use && totalPage != null)
  4258. hasNext = this.optUp.page.num < totalPage;
  4259. this.endSuccess(dataSize, hasNext, systime);
  4260. };
  4261. MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
  4262. let hasNext;
  4263. if (this.optUp.use && totalSize != null) {
  4264. let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
  4265. hasNext = loadSize < totalSize;
  4266. }
  4267. this.endSuccess(dataSize, hasNext, systime);
  4268. };
  4269. MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
  4270. let me = this;
  4271. if (me.isDownScrolling) {
  4272. me.isDownEndSuccess = true;
  4273. me.endDownScroll();
  4274. }
  4275. if (me.optUp.use) {
  4276. let isShowNoMore;
  4277. if (dataSize != null) {
  4278. let pageNum = me.optUp.page.num;
  4279. let pageSize = me.optUp.page.size;
  4280. if (pageNum === 1) {
  4281. if (systime)
  4282. me.optUp.page.time = systime;
  4283. }
  4284. if (dataSize < pageSize || hasNext === false) {
  4285. me.optUp.hasNext = false;
  4286. if (dataSize === 0 && pageNum === 1) {
  4287. isShowNoMore = false;
  4288. me.showEmpty();
  4289. } else {
  4290. let allDataSize = (pageNum - 1) * pageSize + dataSize;
  4291. if (allDataSize < me.optUp.noMoreSize) {
  4292. isShowNoMore = false;
  4293. } else {
  4294. isShowNoMore = true;
  4295. }
  4296. me.removeEmpty();
  4297. }
  4298. } else {
  4299. isShowNoMore = false;
  4300. me.optUp.hasNext = true;
  4301. me.removeEmpty();
  4302. }
  4303. }
  4304. me.endUpScroll(isShowNoMore);
  4305. }
  4306. };
  4307. MeScroll.prototype.endErr = function(errDistance) {
  4308. if (this.isDownScrolling) {
  4309. this.isDownEndSuccess = false;
  4310. let page2 = this.optUp.page;
  4311. if (page2 && this.prePageNum) {
  4312. page2.num = this.prePageNum;
  4313. page2.time = this.prePageTime;
  4314. }
  4315. this.endDownScroll();
  4316. }
  4317. if (this.isUpScrolling) {
  4318. this.optUp.page.num--;
  4319. this.endUpScroll(false);
  4320. if (this.isScrollBody && errDistance !== 0) {
  4321. if (!errDistance)
  4322. errDistance = this.optUp.errDistance;
  4323. this.scrollTo(this.getScrollTop() - errDistance, 0);
  4324. }
  4325. }
  4326. };
  4327. MeScroll.prototype.showEmpty = function() {
  4328. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  4329. };
  4330. MeScroll.prototype.removeEmpty = function() {
  4331. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  4332. };
  4333. MeScroll.prototype.showTopBtn = function() {
  4334. if (!this.topBtnShow) {
  4335. this.topBtnShow = true;
  4336. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  4337. }
  4338. };
  4339. MeScroll.prototype.hideTopBtn = function() {
  4340. if (this.topBtnShow) {
  4341. this.topBtnShow = false;
  4342. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  4343. }
  4344. };
  4345. MeScroll.prototype.getScrollTop = function() {
  4346. return this.scrollTop || 0;
  4347. };
  4348. MeScroll.prototype.setScrollTop = function(y) {
  4349. this.scrollTop = y;
  4350. };
  4351. MeScroll.prototype.scrollTo = function(y, t) {
  4352. this.myScrollTo && this.myScrollTo(y, t);
  4353. };
  4354. MeScroll.prototype.resetScrollTo = function(myScrollTo) {
  4355. this.myScrollTo = myScrollTo;
  4356. };
  4357. MeScroll.prototype.getScrollBottom = function() {
  4358. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  4359. };
  4360. MeScroll.prototype.getStep = function(star, end, callback, t, rate) {
  4361. let diff = end - star;
  4362. if (t === 0 || diff === 0) {
  4363. callback && callback(end);
  4364. return;
  4365. }
  4366. t = t || 300;
  4367. rate = rate || 30;
  4368. let count = t / rate;
  4369. let step = diff / count;
  4370. let i = 0;
  4371. let timer = setInterval(function() {
  4372. if (i < count - 1) {
  4373. star += step;
  4374. callback && callback(star, timer);
  4375. i++;
  4376. } else {
  4377. callback && callback(end, timer);
  4378. clearInterval(timer);
  4379. }
  4380. }, rate);
  4381. };
  4382. MeScroll.prototype.getClientHeight = function(isReal) {
  4383. let h = this.clientHeight || 0;
  4384. if (h === 0 && isReal !== true) {
  4385. h = this.getBodyHeight();
  4386. }
  4387. return h;
  4388. };
  4389. MeScroll.prototype.setClientHeight = function(h) {
  4390. this.clientHeight = h;
  4391. };
  4392. MeScroll.prototype.getScrollHeight = function() {
  4393. return this.scrollHeight || 0;
  4394. };
  4395. MeScroll.prototype.setScrollHeight = function(h) {
  4396. this.scrollHeight = h;
  4397. };
  4398. MeScroll.prototype.getBodyHeight = function() {
  4399. return this.bodyHeight || 0;
  4400. };
  4401. MeScroll.prototype.setBodyHeight = function(h) {
  4402. this.bodyHeight = h;
  4403. };
  4404. MeScroll.prototype.preventDefault = function(e) {
  4405. if (e && e.cancelable && !e.defaultPrevented)
  4406. e.preventDefault();
  4407. };
  4408. const _sfc_main$1f = {
  4409. props: {
  4410. // up.toTop的配置项
  4411. option: {
  4412. type: Object,
  4413. default() {
  4414. return {};
  4415. }
  4416. },
  4417. // 是否显示
  4418. value: false,
  4419. // vue2
  4420. modelValue: false
  4421. // vue3
  4422. },
  4423. computed: {
  4424. // 优先显示左边
  4425. left() {
  4426. return this.option.left ? this.addUnit(this.option.left) : "auto";
  4427. },
  4428. // 右边距离 (优先显示左边)
  4429. right() {
  4430. return this.option.left ? "auto" : this.addUnit(this.option.right);
  4431. },
  4432. // 是否显示
  4433. isShow() {
  4434. return this.modelValue;
  4435. }
  4436. },
  4437. methods: {
  4438. addUnit(num) {
  4439. if (!num)
  4440. return 0;
  4441. if (typeof num === "number")
  4442. return num + "rpx";
  4443. return num;
  4444. },
  4445. toTopClick() {
  4446. this.$emit("update:modelValue", false);
  4447. this.$emit("click");
  4448. }
  4449. }
  4450. };
  4451. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  4452. return $props.option.src ? (vue.openBlock(), vue.createElementBlock("image", {
  4453. key: 0,
  4454. class: vue.normalizeClass(["mescroll-totop", [$options.isShow ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $props.option.safearea }]]),
  4455. 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) }),
  4456. src: $props.option.src,
  4457. mode: "widthFix",
  4458. onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
  4459. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
  4460. }
  4461. const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-49fff3a8"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]);
  4462. const WxsMixin = {
  4463. data() {
  4464. return {
  4465. // 传入wxs视图层的数据 (响应式)
  4466. wxsProp: {
  4467. optDown: {},
  4468. // 下拉刷新的配置
  4469. scrollTop: 0,
  4470. // 滚动条的距离
  4471. bodyHeight: 0,
  4472. // body的高度
  4473. isDownScrolling: false,
  4474. // 是否正在下拉刷新中
  4475. isUpScrolling: false,
  4476. // 是否正在上拉加载中
  4477. isScrollBody: true,
  4478. // 是否为mescroll-body滚动
  4479. isUpBoth: true,
  4480. // 上拉加载时,是否同时可以下拉刷新
  4481. t: 0
  4482. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  4483. },
  4484. // 标记调用wxs视图层的方法
  4485. callProp: {
  4486. callType: "",
  4487. // 方法名
  4488. t: 0
  4489. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  4490. }
  4491. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  4492. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  4493. };
  4494. },
  4495. methods: {
  4496. // wxs视图层调用逻辑层的回调
  4497. wxsCall(msg) {
  4498. if (msg.type === "setWxsProp") {
  4499. this.wxsProp = {
  4500. optDown: this.mescroll.optDown,
  4501. scrollTop: this.mescroll.getScrollTop(),
  4502. bodyHeight: this.mescroll.getBodyHeight(),
  4503. isDownScrolling: this.mescroll.isDownScrolling,
  4504. isUpScrolling: this.mescroll.isUpScrolling,
  4505. isUpBoth: this.mescroll.optUp.isBoth,
  4506. isScrollBody: this.mescroll.isScrollBody,
  4507. t: Date.now()
  4508. };
  4509. } else if (msg.type === "setLoadType") {
  4510. this.downLoadType = msg.downLoadType;
  4511. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  4512. this.$set(this.mescroll, "isDownEndSuccess", null);
  4513. } else if (msg.type === "triggerDownScroll") {
  4514. this.mescroll.triggerDownScroll();
  4515. } else if (msg.type === "endDownScroll") {
  4516. this.mescroll.endDownScroll();
  4517. } else if (msg.type === "triggerUpScroll") {
  4518. this.mescroll.triggerUpScroll(true);
  4519. }
  4520. }
  4521. },
  4522. mounted() {
  4523. this.mescroll.optDown.afterLoading = () => {
  4524. this.callProp = { callType: "showLoading", t: Date.now() };
  4525. };
  4526. this.mescroll.optDown.afterEndDownScroll = () => {
  4527. this.callProp = { callType: "endDownScroll", t: Date.now() };
  4528. let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
  4529. setTimeout(() => {
  4530. if (this.downLoadType === 4 || this.downLoadType === 0) {
  4531. this.callProp = { callType: "clearTransform", t: Date.now() };
  4532. }
  4533. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  4534. }, delay);
  4535. };
  4536. this.wxsCall({ type: "setWxsProp" });
  4537. }
  4538. };
  4539. const block0 = (Comp) => {
  4540. (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
  4541. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
  4542. };
  4543. const block1 = (Comp) => {
  4544. (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
  4545. (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "5a9dc23f";
  4546. };
  4547. const _sfc_main$1e = {
  4548. name: "mescroll-uni",
  4549. mixins: [WxsMixin],
  4550. components: {
  4551. MescrollTop
  4552. },
  4553. props: {
  4554. down: Object,
  4555. up: Object,
  4556. i18n: Object,
  4557. top: [String, Number],
  4558. topbar: [Boolean, String],
  4559. bottom: [String, Number],
  4560. safearea: Boolean,
  4561. fixed: {
  4562. type: Boolean,
  4563. default: true
  4564. },
  4565. height: [String, Number],
  4566. bottombar: {
  4567. type: Boolean,
  4568. default: true
  4569. },
  4570. disableScroll: Boolean
  4571. },
  4572. data() {
  4573. return {
  4574. mescroll: { optDown: {}, optUp: {} },
  4575. // mescroll实例
  4576. viewId: "id_" + Math.random().toString(36).substr(2, 16),
  4577. // 随机生成mescroll的id(不能数字开头,否则找不到元素)
  4578. downHight: 0,
  4579. //下拉刷新: 容器高度
  4580. downRate: 0,
  4581. // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
  4582. downLoadType: 0,
  4583. // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
  4584. upLoadType: 0,
  4585. // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)
  4586. isShowEmpty: false,
  4587. // 是否显示空布局
  4588. isShowToTop: false,
  4589. // 是否显示回到顶部按钮
  4590. scrollTop: 0,
  4591. // 滚动条的位置
  4592. scrollAnim: false,
  4593. // 是否开启滚动动画
  4594. windowTop: 0,
  4595. // 可使用窗口的顶部位置
  4596. windowBottom: 0,
  4597. // 可使用窗口的底部位置
  4598. windowHeight: 0,
  4599. // 可使用窗口的高度
  4600. statusBarHeight: 0
  4601. // 状态栏高度
  4602. };
  4603. },
  4604. watch: {
  4605. height() {
  4606. this.setClientHeight();
  4607. }
  4608. },
  4609. computed: {
  4610. // 是否使用fixed定位 (当height有值,则不使用)
  4611. isFixed() {
  4612. return !this.height && this.fixed;
  4613. },
  4614. // mescroll的高度
  4615. scrollHeight() {
  4616. if (this.isFixed) {
  4617. return "auto";
  4618. } else if (this.height) {
  4619. return this.toPx(this.height) + "px";
  4620. } else {
  4621. return "100%";
  4622. }
  4623. },
  4624. // 下拉布局往下偏移的距离 (px)
  4625. numTop() {
  4626. return this.toPx(this.top);
  4627. },
  4628. fixedTop() {
  4629. return this.isFixed ? this.numTop + this.windowTop + "px" : 0;
  4630. },
  4631. padTop() {
  4632. return !this.isFixed ? this.numTop + "px" : 0;
  4633. },
  4634. // 上拉布局往上偏移 (px)
  4635. numBottom() {
  4636. return this.toPx(this.bottom);
  4637. },
  4638. fixedBottom() {
  4639. return this.isFixed ? this.numBottom + this.windowBottom + "px" : 0;
  4640. },
  4641. padBottom() {
  4642. return !this.isFixed ? this.numBottom + "px" : 0;
  4643. },
  4644. // 是否为重置下拉的状态
  4645. isDownReset() {
  4646. return this.downLoadType === 3 || this.downLoadType === 4;
  4647. },
  4648. // 过渡
  4649. transition() {
  4650. return this.isDownReset ? "transform 300ms" : "";
  4651. },
  4652. translateY() {
  4653. return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
  4654. },
  4655. // 列表是否可滑动
  4656. scrollable() {
  4657. if (this.disableScroll)
  4658. return false;
  4659. return this.downLoadType === 0 || this.isDownReset;
  4660. },
  4661. // 是否在加载中
  4662. isDownLoading() {
  4663. return this.downLoadType === 3;
  4664. },
  4665. // 旋转的角度
  4666. downRotate() {
  4667. return "rotate(" + 360 * this.downRate + "deg)";
  4668. },
  4669. // 文本提示
  4670. downText() {
  4671. if (!this.mescroll)
  4672. return "";
  4673. switch (this.downLoadType) {
  4674. case 1:
  4675. return this.mescroll.optDown.textInOffset;
  4676. case 2:
  4677. return this.mescroll.optDown.textOutOffset;
  4678. case 3:
  4679. return this.mescroll.optDown.textLoading;
  4680. case 4:
  4681. return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
  4682. default:
  4683. return this.mescroll.optDown.textInOffset;
  4684. }
  4685. }
  4686. },
  4687. methods: {
  4688. //number,rpx,upx,px,% --> px的数值
  4689. toPx(num) {
  4690. if (typeof num === "string") {
  4691. if (num.indexOf("px") !== -1) {
  4692. if (num.indexOf("rpx") !== -1) {
  4693. num = num.replace("rpx", "");
  4694. } else if (num.indexOf("upx") !== -1) {
  4695. num = num.replace("upx", "");
  4696. } else {
  4697. return Number(num.replace("px", ""));
  4698. }
  4699. } else if (num.indexOf("%") !== -1) {
  4700. let rate = Number(num.replace("%", "")) / 100;
  4701. return this.windowHeight * rate;
  4702. }
  4703. }
  4704. return num ? uni.upx2px(Number(num)) : 0;
  4705. },
  4706. //注册列表滚动事件,用于下拉刷新和上拉加载
  4707. scroll(e) {
  4708. this.mescroll.scroll(e.detail, () => {
  4709. this.$emit("scroll", this.mescroll);
  4710. });
  4711. },
  4712. // 点击空布局的按钮回调
  4713. emptyClick() {
  4714. this.$emit("emptyclick", this.mescroll);
  4715. },
  4716. // 点击回到顶部的按钮回调
  4717. toTopClick() {
  4718. this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
  4719. this.$emit("topclick", this.mescroll);
  4720. },
  4721. // 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)
  4722. setClientHeight() {
  4723. if (!this.isExec) {
  4724. this.isExec = true;
  4725. this.$nextTick(() => {
  4726. this.getClientInfo((data) => {
  4727. this.isExec = false;
  4728. if (data) {
  4729. this.mescroll.setClientHeight(data.height);
  4730. } else if (this.clientNum != 3) {
  4731. this.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;
  4732. setTimeout(() => {
  4733. this.setClientHeight();
  4734. }, this.clientNum * 100);
  4735. }
  4736. });
  4737. });
  4738. }
  4739. },
  4740. // 获取滚动区域的信息
  4741. getClientInfo(success) {
  4742. let query = uni.createSelectorQuery().in(this);
  4743. let view = query.select("#" + this.viewId);
  4744. view.boundingClientRect((data) => {
  4745. success(data);
  4746. }).exec();
  4747. }
  4748. },
  4749. // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
  4750. created() {
  4751. let vm = this;
  4752. let diyOption = {
  4753. // 下拉刷新的配置
  4754. down: {
  4755. inOffset() {
  4756. vm.downLoadType = 1;
  4757. },
  4758. outOffset() {
  4759. vm.downLoadType = 2;
  4760. },
  4761. onMoving(mescroll, rate, downHight) {
  4762. vm.downHight = downHight;
  4763. vm.downRate = rate;
  4764. },
  4765. showLoading(mescroll, downHight) {
  4766. vm.downLoadType = 3;
  4767. vm.downHight = downHight;
  4768. },
  4769. beforeEndDownScroll(mescroll) {
  4770. vm.downLoadType = 4;
  4771. return mescroll.optDown.beforeEndDelay;
  4772. },
  4773. endDownScroll() {
  4774. vm.downLoadType = 4;
  4775. vm.downHight = 0;
  4776. vm.downResetTimer && clearTimeout(vm.downResetTimer);
  4777. vm.downResetTimer = setTimeout(() => {
  4778. if (vm.downLoadType === 4)
  4779. vm.downLoadType = 0;
  4780. }, 300);
  4781. },
  4782. // 派发下拉刷新的回调
  4783. callback: function(mescroll) {
  4784. vm.$emit("down", mescroll);
  4785. }
  4786. },
  4787. // 上拉加载的配置
  4788. up: {
  4789. // 显示加载中的回调
  4790. showLoading() {
  4791. vm.upLoadType = 1;
  4792. },
  4793. // 显示无更多数据的回调
  4794. showNoMore() {
  4795. vm.upLoadType = 2;
  4796. },
  4797. // 隐藏上拉加载的回调
  4798. hideUpScroll(mescroll) {
  4799. vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
  4800. },
  4801. // 空布局
  4802. empty: {
  4803. onShow(isShow) {
  4804. vm.isShowEmpty = isShow;
  4805. }
  4806. },
  4807. // 回到顶部
  4808. toTop: {
  4809. onShow(isShow) {
  4810. vm.isShowToTop = isShow;
  4811. }
  4812. },
  4813. // 派发上拉加载的回调
  4814. callback: function(mescroll) {
  4815. vm.$emit("up", mescroll);
  4816. vm.setClientHeight();
  4817. }
  4818. }
  4819. };
  4820. let i18nType = mescrollI18n.getType();
  4821. let i18nOption = { type: i18nType };
  4822. MeScroll.extend(i18nOption, vm.i18n);
  4823. MeScroll.extend(i18nOption, GlobalOption.i18n);
  4824. MeScroll.extend(diyOption, i18nOption[i18nType]);
  4825. MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
  4826. let myOption = JSON.parse(JSON.stringify({ "down": vm.down, "up": vm.up }));
  4827. MeScroll.extend(myOption, diyOption);
  4828. vm.mescroll = new MeScroll(myOption);
  4829. vm.mescroll.viewId = vm.viewId;
  4830. vm.mescroll.i18n = i18nOption;
  4831. vm.$emit("init", vm.mescroll);
  4832. const sys2 = uni.getSystemInfoSync();
  4833. if (sys2.windowTop)
  4834. vm.windowTop = sys2.windowTop;
  4835. if (sys2.windowBottom)
  4836. vm.windowBottom = sys2.windowBottom;
  4837. if (sys2.windowHeight)
  4838. vm.windowHeight = sys2.windowHeight;
  4839. if (sys2.statusBarHeight)
  4840. vm.statusBarHeight = sys2.statusBarHeight;
  4841. vm.mescroll.setBodyHeight(sys2.windowHeight);
  4842. vm.mescroll.resetScrollTo((y, t) => {
  4843. vm.scrollAnim = t !== 0;
  4844. if (typeof y === "string") {
  4845. vm.getClientInfo(function(rect) {
  4846. let mescrollTop = rect.top;
  4847. let selector;
  4848. if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
  4849. selector = "#" + y;
  4850. } else {
  4851. selector = y;
  4852. if (y.indexOf(">>>") != -1) {
  4853. selector = y.split(">>>")[1].trim();
  4854. }
  4855. }
  4856. uni.createSelectorQuery().select(selector).boundingClientRect(function(rect2) {
  4857. if (rect2) {
  4858. let curY2 = vm.mescroll.getScrollTop();
  4859. let top = rect2.top - mescrollTop;
  4860. top += curY2;
  4861. if (!vm.isFixed)
  4862. top -= vm.numTop;
  4863. vm.scrollTop = curY2;
  4864. vm.$nextTick(function() {
  4865. vm.scrollTop = top;
  4866. });
  4867. } else {
  4868. formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue:422", selector + " does not exist");
  4869. }
  4870. }).exec();
  4871. });
  4872. return;
  4873. }
  4874. let curY = vm.mescroll.getScrollTop();
  4875. if (t === 0 || t === 300) {
  4876. vm.scrollTop = curY;
  4877. vm.$nextTick(function() {
  4878. vm.scrollTop = y;
  4879. });
  4880. } else {
  4881. vm.mescroll.getStep(curY, y, (step) => {
  4882. vm.scrollTop = step;
  4883. }, t);
  4884. }
  4885. });
  4886. if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
  4887. ;
  4888. else {
  4889. vm.mescroll.optUp.toTop.safearea = vm.safearea;
  4890. }
  4891. uni.$on("setMescrollGlobalOption", (options) => {
  4892. if (!options)
  4893. return;
  4894. let i18nType2 = options.i18n ? options.i18n.type : null;
  4895. if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
  4896. vm.mescroll.i18n.type = i18nType2;
  4897. mescrollI18n.setType(i18nType2);
  4898. MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
  4899. }
  4900. if (options.down) {
  4901. let down = MeScroll.extend({}, options.down);
  4902. vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
  4903. }
  4904. if (options.up) {
  4905. let up = MeScroll.extend({}, options.up);
  4906. vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
  4907. }
  4908. });
  4909. },
  4910. mounted() {
  4911. this.setClientHeight();
  4912. },
  4913. destroyed() {
  4914. uni.$off("setMescrollGlobalOption");
  4915. }
  4916. };
  4917. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  4918. const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$7);
  4919. const _component_mescroll_top = vue.resolveComponent("mescroll-top");
  4920. return vue.openBlock(), vue.createElementBlock("view", { class: "mescroll-uni-warp" }, [
  4921. vue.createElementVNode("scroll-view", {
  4922. id: $data.viewId,
  4923. class: vue.normalizeClass(["mescroll-uni", { "mescroll-uni-fixed": $options.isFixed }]),
  4924. style: vue.normalizeStyle({ "height": $options.scrollHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom, "top": $options.fixedTop, "bottom": $options.fixedBottom }),
  4925. "scroll-top": $data.scrollTop,
  4926. "scroll-with-animation": $data.scrollAnim,
  4927. onScroll: _cache[4] || (_cache[4] = (...args) => $options.scroll && $options.scroll(...args)),
  4928. "scroll-y": $options.scrollable,
  4929. "enable-back-to-top": true,
  4930. throttle: false
  4931. }, [
  4932. vue.createElementVNode("view", {
  4933. class: "mescroll-uni-content mescroll-render-touch",
  4934. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
  4935. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
  4936. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  4937. onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  4938. "change:prop": _ctx.wxsBiz.propObserver,
  4939. prop: vue.wp(_ctx.wxsProp)
  4940. }, [
  4941. vue.createCommentVNode(" 状态栏 "),
  4942. $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
  4943. "view",
  4944. {
  4945. key: 0,
  4946. class: "mescroll-topbar",
  4947. style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
  4948. },
  4949. null,
  4950. 4
  4951. /* STYLE */
  4952. )) : vue.createCommentVNode("v-if", true),
  4953. vue.createElementVNode("view", {
  4954. class: "mescroll-wxs-content",
  4955. style: vue.normalizeStyle({ "transform": $options.translateY, "transition": $options.transition }),
  4956. "change:prop": _ctx.wxsBiz.callObserver,
  4957. prop: vue.wp(_ctx.callProp)
  4958. }, [
  4959. vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
  4960. vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
  4961. $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
  4962. "view",
  4963. {
  4964. key: 0,
  4965. class: "mescroll-downwarp",
  4966. style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
  4967. },
  4968. [
  4969. vue.createElementVNode("view", { class: "downwarp-content" }, [
  4970. vue.createElementVNode(
  4971. "view",
  4972. {
  4973. class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
  4974. style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
  4975. },
  4976. null,
  4977. 6
  4978. /* CLASS, STYLE */
  4979. ),
  4980. vue.createElementVNode(
  4981. "view",
  4982. { class: "downwarp-tip" },
  4983. vue.toDisplayString($options.downText),
  4984. 1
  4985. /* TEXT */
  4986. )
  4987. ])
  4988. ],
  4989. 4
  4990. /* STYLE */
  4991. )) : vue.createCommentVNode("v-if", true),
  4992. vue.createCommentVNode(" 列表内容 "),
  4993. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  4994. vue.createCommentVNode(" 空布局 "),
  4995. $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
  4996. key: 1,
  4997. option: $data.mescroll.optUp.empty,
  4998. onEmptyclick: $options.emptyClick
  4999. }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
  5000. vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
  5001. vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
  5002. $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
  5003. "view",
  5004. {
  5005. key: 2,
  5006. class: "mescroll-upwarp",
  5007. style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
  5008. },
  5009. [
  5010. vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
  5011. vue.withDirectives(vue.createElementVNode(
  5012. "view",
  5013. null,
  5014. [
  5015. vue.createElementVNode(
  5016. "view",
  5017. {
  5018. class: "upwarp-progress mescroll-rotate",
  5019. style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
  5020. },
  5021. null,
  5022. 4
  5023. /* STYLE */
  5024. ),
  5025. vue.createElementVNode(
  5026. "view",
  5027. { class: "upwarp-tip" },
  5028. vue.toDisplayString($data.mescroll.optUp.textLoading),
  5029. 1
  5030. /* TEXT */
  5031. )
  5032. ],
  5033. 512
  5034. /* NEED_PATCH */
  5035. ), [
  5036. [vue.vShow, $data.upLoadType === 1]
  5037. ]),
  5038. vue.createCommentVNode(" 无数据 "),
  5039. $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
  5040. "view",
  5041. {
  5042. key: 0,
  5043. class: "upwarp-nodata"
  5044. },
  5045. vue.toDisplayString($data.mescroll.optUp.textNoMore),
  5046. 1
  5047. /* TEXT */
  5048. )) : vue.createCommentVNode("v-if", true)
  5049. ],
  5050. 4
  5051. /* STYLE */
  5052. )) : vue.createCommentVNode("v-if", true)
  5053. ], 12, ["change:prop", "prop"]),
  5054. vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
  5055. vue.createCommentVNode(" 适配iPhoneX "),
  5056. $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
  5057. key: 1,
  5058. class: "mescroll-safearea"
  5059. })) : vue.createCommentVNode("v-if", true)
  5060. ], 40, ["change:prop", "prop"])
  5061. ], 46, ["id", "scroll-top", "scroll-with-animation", "scroll-y"]),
  5062. vue.createCommentVNode(" 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)"),
  5063. vue.createVNode(_component_mescroll_top, {
  5064. modelValue: $data.isShowToTop,
  5065. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.isShowToTop = $event),
  5066. option: $data.mescroll.optUp.toTop,
  5067. onClick: $options.toTopClick
  5068. }, null, 8, ["modelValue", "option", "onClick"]),
  5069. vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
  5070. vue.createElementVNode("view", {
  5071. "change:prop": _ctx.renderBiz.propObserver,
  5072. prop: vue.wp(_ctx.wxsProp)
  5073. }, null, 8, ["change:prop", "prop"])
  5074. ]);
  5075. }
  5076. if (typeof block0 === "function")
  5077. block0(_sfc_main$1e);
  5078. if (typeof block1 === "function")
  5079. block1(_sfc_main$1e);
  5080. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-97b1664c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue"]]);
  5081. function useMescroll(onPageScroll, onReachBottom, onPullDownRefresh) {
  5082. let mescroll = null;
  5083. const mescrollInit = (e) => {
  5084. mescroll = e;
  5085. };
  5086. const getMescroll = () => {
  5087. return mescroll;
  5088. };
  5089. const downCallback = () => {
  5090. if (mescroll.optUp.use) {
  5091. mescroll.resetUpScroll();
  5092. } else {
  5093. setTimeout(() => {
  5094. mescroll.endSuccess();
  5095. }, 500);
  5096. }
  5097. };
  5098. const upCallback = () => {
  5099. setTimeout(() => {
  5100. mescroll.endErr();
  5101. }, 500);
  5102. };
  5103. onPullDownRefresh && onPullDownRefresh(() => {
  5104. mescroll && mescroll.onPullDownRefresh();
  5105. });
  5106. onPageScroll && onPageScroll((e) => {
  5107. mescroll && mescroll.onPageScroll(e);
  5108. });
  5109. onReachBottom && onReachBottom(() => {
  5110. mescroll && mescroll.onReachBottom();
  5111. });
  5112. return {
  5113. getMescroll,
  5114. mescrollInit,
  5115. downCallback,
  5116. upCallback
  5117. };
  5118. }
  5119. var isVue2 = false;
  5120. function set(target, key, val) {
  5121. if (Array.isArray(target)) {
  5122. target.length = Math.max(target.length, key);
  5123. target.splice(key, 1, val);
  5124. return val;
  5125. }
  5126. target[key] = val;
  5127. return val;
  5128. }
  5129. function del(target, key) {
  5130. if (Array.isArray(target)) {
  5131. target.splice(key, 1);
  5132. return;
  5133. }
  5134. delete target[key];
  5135. }
  5136. function getDevtoolsGlobalHook() {
  5137. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5138. }
  5139. function getTarget() {
  5140. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  5141. }
  5142. const isProxyAvailable = typeof Proxy === "function";
  5143. const HOOK_SETUP = "devtools-plugin:setup";
  5144. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  5145. let supported;
  5146. let perf;
  5147. function isPerformanceSupported() {
  5148. var _a;
  5149. if (supported !== void 0) {
  5150. return supported;
  5151. }
  5152. if (typeof window !== "undefined" && window.performance) {
  5153. supported = true;
  5154. perf = window.performance;
  5155. } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
  5156. supported = true;
  5157. perf = global.perf_hooks.performance;
  5158. } else {
  5159. supported = false;
  5160. }
  5161. return supported;
  5162. }
  5163. function now() {
  5164. return isPerformanceSupported() ? perf.now() : Date.now();
  5165. }
  5166. class ApiProxy {
  5167. constructor(plugin, hook) {
  5168. this.target = null;
  5169. this.targetQueue = [];
  5170. this.onQueue = [];
  5171. this.plugin = plugin;
  5172. this.hook = hook;
  5173. const defaultSettings = {};
  5174. if (plugin.settings) {
  5175. for (const id in plugin.settings) {
  5176. const item = plugin.settings[id];
  5177. defaultSettings[id] = item.defaultValue;
  5178. }
  5179. }
  5180. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  5181. let currentSettings = Object.assign({}, defaultSettings);
  5182. try {
  5183. const raw = localStorage.getItem(localSettingsSaveId);
  5184. const data = JSON.parse(raw);
  5185. Object.assign(currentSettings, data);
  5186. } catch (e) {
  5187. }
  5188. this.fallbacks = {
  5189. getSettings() {
  5190. return currentSettings;
  5191. },
  5192. setSettings(value2) {
  5193. try {
  5194. localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
  5195. } catch (e) {
  5196. }
  5197. currentSettings = value2;
  5198. },
  5199. now() {
  5200. return now();
  5201. }
  5202. };
  5203. if (hook) {
  5204. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
  5205. if (pluginId === this.plugin.id) {
  5206. this.fallbacks.setSettings(value2);
  5207. }
  5208. });
  5209. }
  5210. this.proxiedOn = new Proxy({}, {
  5211. get: (_target, prop) => {
  5212. if (this.target) {
  5213. return this.target.on[prop];
  5214. } else {
  5215. return (...args) => {
  5216. this.onQueue.push({
  5217. method: prop,
  5218. args
  5219. });
  5220. };
  5221. }
  5222. }
  5223. });
  5224. this.proxiedTarget = new Proxy({}, {
  5225. get: (_target, prop) => {
  5226. if (this.target) {
  5227. return this.target[prop];
  5228. } else if (prop === "on") {
  5229. return this.proxiedOn;
  5230. } else if (Object.keys(this.fallbacks).includes(prop)) {
  5231. return (...args) => {
  5232. this.targetQueue.push({
  5233. method: prop,
  5234. args,
  5235. resolve: () => {
  5236. }
  5237. });
  5238. return this.fallbacks[prop](...args);
  5239. };
  5240. } else {
  5241. return (...args) => {
  5242. return new Promise((resolve) => {
  5243. this.targetQueue.push({
  5244. method: prop,
  5245. args,
  5246. resolve
  5247. });
  5248. });
  5249. };
  5250. }
  5251. }
  5252. });
  5253. }
  5254. async setRealTarget(target) {
  5255. this.target = target;
  5256. for (const item of this.onQueue) {
  5257. this.target.on[item.method](...item.args);
  5258. }
  5259. for (const item of this.targetQueue) {
  5260. item.resolve(await this.target[item.method](...item.args));
  5261. }
  5262. }
  5263. }
  5264. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  5265. const descriptor = pluginDescriptor;
  5266. const target = getTarget();
  5267. const hook = getDevtoolsGlobalHook();
  5268. const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;
  5269. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  5270. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  5271. } else {
  5272. const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;
  5273. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  5274. list.push({
  5275. pluginDescriptor: descriptor,
  5276. setupFn,
  5277. proxy
  5278. });
  5279. if (proxy)
  5280. setupFn(proxy.proxiedTarget);
  5281. }
  5282. }
  5283. /*!
  5284. * pinia v2.1.7
  5285. * (c) 2023 Eduardo San Martin Morote
  5286. * @license MIT
  5287. */
  5288. let activePinia;
  5289. const setActivePinia = (pinia2) => activePinia = pinia2;
  5290. const piniaSymbol = Symbol("pinia");
  5291. function isPlainObject$1(o) {
  5292. return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
  5293. }
  5294. var MutationType;
  5295. (function(MutationType2) {
  5296. MutationType2["direct"] = "direct";
  5297. MutationType2["patchObject"] = "patch object";
  5298. MutationType2["patchFunction"] = "patch function";
  5299. })(MutationType || (MutationType = {}));
  5300. const IS_CLIENT = typeof window !== "undefined";
  5301. const USE_DEVTOOLS = IS_CLIENT;
  5302. 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 })();
  5303. function bom(blob, { autoBom = false } = {}) {
  5304. if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
  5305. return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
  5306. }
  5307. return blob;
  5308. }
  5309. function download(url2, name, opts) {
  5310. const xhr = new XMLHttpRequest();
  5311. xhr.open("GET", url2);
  5312. xhr.responseType = "blob";
  5313. xhr.onload = function() {
  5314. saveAs(xhr.response, name, opts);
  5315. };
  5316. xhr.onerror = function() {
  5317. console.error("could not download file");
  5318. };
  5319. xhr.send();
  5320. }
  5321. function corsEnabled(url2) {
  5322. const xhr = new XMLHttpRequest();
  5323. xhr.open("HEAD", url2, false);
  5324. try {
  5325. xhr.send();
  5326. } catch (e) {
  5327. }
  5328. return xhr.status >= 200 && xhr.status <= 299;
  5329. }
  5330. function click(node) {
  5331. try {
  5332. node.dispatchEvent(new MouseEvent("click"));
  5333. } catch (e) {
  5334. const evt = document.createEvent("MouseEvents");
  5335. evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
  5336. node.dispatchEvent(evt);
  5337. }
  5338. }
  5339. const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
  5340. const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
  5341. const saveAs = !IS_CLIENT ? () => {
  5342. } : (
  5343. // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  5344. typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
  5345. // Use msSaveOrOpenBlob as a second approach
  5346. "msSaveOrOpenBlob" in _navigator ? msSaveAs : (
  5347. // Fallback to using FileReader and a popup
  5348. fileSaverSaveAs
  5349. )
  5350. )
  5351. );
  5352. function downloadSaveAs(blob, name = "download", opts) {
  5353. const a = document.createElement("a");
  5354. a.download = name;
  5355. a.rel = "noopener";
  5356. if (typeof blob === "string") {
  5357. a.href = blob;
  5358. if (a.origin !== location.origin) {
  5359. if (corsEnabled(a.href)) {
  5360. download(blob, name, opts);
  5361. } else {
  5362. a.target = "_blank";
  5363. click(a);
  5364. }
  5365. } else {
  5366. click(a);
  5367. }
  5368. } else {
  5369. a.href = URL.createObjectURL(blob);
  5370. setTimeout(function() {
  5371. URL.revokeObjectURL(a.href);
  5372. }, 4e4);
  5373. setTimeout(function() {
  5374. click(a);
  5375. }, 0);
  5376. }
  5377. }
  5378. function msSaveAs(blob, name = "download", opts) {
  5379. if (typeof blob === "string") {
  5380. if (corsEnabled(blob)) {
  5381. download(blob, name, opts);
  5382. } else {
  5383. const a = document.createElement("a");
  5384. a.href = blob;
  5385. a.target = "_blank";
  5386. setTimeout(function() {
  5387. click(a);
  5388. });
  5389. }
  5390. } else {
  5391. navigator.msSaveOrOpenBlob(bom(blob, opts), name);
  5392. }
  5393. }
  5394. function fileSaverSaveAs(blob, name, opts, popup) {
  5395. popup = popup || open("", "_blank");
  5396. if (popup) {
  5397. popup.document.title = popup.document.body.innerText = "downloading...";
  5398. }
  5399. if (typeof blob === "string")
  5400. return download(blob, name, opts);
  5401. const force = blob.type === "application/octet-stream";
  5402. const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
  5403. const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
  5404. if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
  5405. const reader = new FileReader();
  5406. reader.onloadend = function() {
  5407. let url2 = reader.result;
  5408. if (typeof url2 !== "string") {
  5409. popup = null;
  5410. throw new Error("Wrong reader.result type");
  5411. }
  5412. url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;");
  5413. if (popup) {
  5414. popup.location.href = url2;
  5415. } else {
  5416. location.assign(url2);
  5417. }
  5418. popup = null;
  5419. };
  5420. reader.readAsDataURL(blob);
  5421. } else {
  5422. const url2 = URL.createObjectURL(blob);
  5423. if (popup)
  5424. popup.location.assign(url2);
  5425. else
  5426. location.href = url2;
  5427. popup = null;
  5428. setTimeout(function() {
  5429. URL.revokeObjectURL(url2);
  5430. }, 4e4);
  5431. }
  5432. }
  5433. function toastMessage(message, type2) {
  5434. const piniaMessage = "🍍 " + message;
  5435. if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
  5436. __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);
  5437. } else if (type2 === "error") {
  5438. console.error(piniaMessage);
  5439. } else if (type2 === "warn") {
  5440. console.warn(piniaMessage);
  5441. } else {
  5442. console.log(piniaMessage);
  5443. }
  5444. }
  5445. function isPinia(o) {
  5446. return "_a" in o && "install" in o;
  5447. }
  5448. function checkClipboardAccess() {
  5449. if (!("clipboard" in navigator)) {
  5450. toastMessage(`Your browser doesn't support the Clipboard API`, "error");
  5451. return true;
  5452. }
  5453. }
  5454. function checkNotFocusedError(error2) {
  5455. if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) {
  5456. toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
  5457. return true;
  5458. }
  5459. return false;
  5460. }
  5461. async function actionGlobalCopyState(pinia2) {
  5462. if (checkClipboardAccess())
  5463. return;
  5464. try {
  5465. await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));
  5466. toastMessage("Global state copied to clipboard.");
  5467. } catch (error2) {
  5468. if (checkNotFocusedError(error2))
  5469. return;
  5470. toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
  5471. console.error(error2);
  5472. }
  5473. }
  5474. async function actionGlobalPasteState(pinia2) {
  5475. if (checkClipboardAccess())
  5476. return;
  5477. try {
  5478. loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));
  5479. toastMessage("Global state pasted from clipboard.");
  5480. } catch (error2) {
  5481. if (checkNotFocusedError(error2))
  5482. return;
  5483. toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
  5484. console.error(error2);
  5485. }
  5486. }
  5487. async function actionGlobalSaveState(pinia2) {
  5488. try {
  5489. saveAs(new Blob([JSON.stringify(pinia2.state.value)], {
  5490. type: "text/plain;charset=utf-8"
  5491. }), "pinia-state.json");
  5492. } catch (error2) {
  5493. toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
  5494. console.error(error2);
  5495. }
  5496. }
  5497. let fileInput;
  5498. function getFileOpener() {
  5499. if (!fileInput) {
  5500. fileInput = document.createElement("input");
  5501. fileInput.type = "file";
  5502. fileInput.accept = ".json";
  5503. }
  5504. function openFile() {
  5505. return new Promise((resolve, reject) => {
  5506. fileInput.onchange = async () => {
  5507. const files = fileInput.files;
  5508. if (!files)
  5509. return resolve(null);
  5510. const file = files.item(0);
  5511. if (!file)
  5512. return resolve(null);
  5513. return resolve({ text: await file.text(), file });
  5514. };
  5515. fileInput.oncancel = () => resolve(null);
  5516. fileInput.onerror = reject;
  5517. fileInput.click();
  5518. });
  5519. }
  5520. return openFile;
  5521. }
  5522. async function actionGlobalOpenStateFile(pinia2) {
  5523. try {
  5524. const open2 = getFileOpener();
  5525. const result = await open2();
  5526. if (!result)
  5527. return;
  5528. const { text, file } = result;
  5529. loadStoresState(pinia2, JSON.parse(text));
  5530. toastMessage(`Global state imported from "${file.name}".`);
  5531. } catch (error2) {
  5532. toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
  5533. console.error(error2);
  5534. }
  5535. }
  5536. function loadStoresState(pinia2, state) {
  5537. for (const key in state) {
  5538. const storeState = pinia2.state.value[key];
  5539. if (storeState) {
  5540. Object.assign(storeState, state[key]);
  5541. } else {
  5542. pinia2.state.value[key] = state[key];
  5543. }
  5544. }
  5545. }
  5546. function formatDisplay(display) {
  5547. return {
  5548. _custom: {
  5549. display
  5550. }
  5551. };
  5552. }
  5553. const PINIA_ROOT_LABEL = "🍍 Pinia (root)";
  5554. const PINIA_ROOT_ID = "_root";
  5555. function formatStoreForInspectorTree(store2) {
  5556. return isPinia(store2) ? {
  5557. id: PINIA_ROOT_ID,
  5558. label: PINIA_ROOT_LABEL
  5559. } : {
  5560. id: store2.$id,
  5561. label: store2.$id
  5562. };
  5563. }
  5564. function formatStoreForInspectorState(store2) {
  5565. if (isPinia(store2)) {
  5566. const storeNames = Array.from(store2._s.keys());
  5567. const storeMap = store2._s;
  5568. const state2 = {
  5569. state: storeNames.map((storeId) => ({
  5570. editable: true,
  5571. key: storeId,
  5572. value: store2.state.value[storeId]
  5573. })),
  5574. getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
  5575. const store22 = storeMap.get(id);
  5576. return {
  5577. editable: false,
  5578. key: id,
  5579. value: store22._getters.reduce((getters, key) => {
  5580. getters[key] = store22[key];
  5581. return getters;
  5582. }, {})
  5583. };
  5584. })
  5585. };
  5586. return state2;
  5587. }
  5588. const state = {
  5589. state: Object.keys(store2.$state).map((key) => ({
  5590. editable: true,
  5591. key,
  5592. value: store2.$state[key]
  5593. }))
  5594. };
  5595. if (store2._getters && store2._getters.length) {
  5596. state.getters = store2._getters.map((getterName) => ({
  5597. editable: false,
  5598. key: getterName,
  5599. value: store2[getterName]
  5600. }));
  5601. }
  5602. if (store2._customProperties.size) {
  5603. state.customProperties = Array.from(store2._customProperties).map((key) => ({
  5604. editable: true,
  5605. key,
  5606. value: store2[key]
  5607. }));
  5608. }
  5609. return state;
  5610. }
  5611. function formatEventData(events) {
  5612. if (!events)
  5613. return {};
  5614. if (Array.isArray(events)) {
  5615. return events.reduce((data, event) => {
  5616. data.keys.push(event.key);
  5617. data.operations.push(event.type);
  5618. data.oldValue[event.key] = event.oldValue;
  5619. data.newValue[event.key] = event.newValue;
  5620. return data;
  5621. }, {
  5622. oldValue: {},
  5623. keys: [],
  5624. operations: [],
  5625. newValue: {}
  5626. });
  5627. } else {
  5628. return {
  5629. operation: formatDisplay(events.type),
  5630. key: formatDisplay(events.key),
  5631. oldValue: events.oldValue,
  5632. newValue: events.newValue
  5633. };
  5634. }
  5635. }
  5636. function formatMutationType(type2) {
  5637. switch (type2) {
  5638. case MutationType.direct:
  5639. return "mutation";
  5640. case MutationType.patchFunction:
  5641. return "$patch";
  5642. case MutationType.patchObject:
  5643. return "$patch";
  5644. default:
  5645. return "unknown";
  5646. }
  5647. }
  5648. let isTimelineActive = true;
  5649. const componentStateTypes = [];
  5650. const MUTATIONS_LAYER_ID = "pinia:mutations";
  5651. const INSPECTOR_ID = "pinia";
  5652. const { assign: assign$1 } = Object;
  5653. const getStoreType = (id) => "🍍 " + id;
  5654. function registerPiniaDevtools(app, pinia2) {
  5655. setupDevtoolsPlugin({
  5656. id: "dev.esm.pinia",
  5657. label: "Pinia 🍍",
  5658. logo: "https://pinia.vuejs.org/logo.svg",
  5659. packageName: "pinia",
  5660. homepage: "https://pinia.vuejs.org",
  5661. componentStateTypes,
  5662. app
  5663. }, (api) => {
  5664. if (typeof api.now !== "function") {
  5665. 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.");
  5666. }
  5667. api.addTimelineLayer({
  5668. id: MUTATIONS_LAYER_ID,
  5669. label: `Pinia 🍍`,
  5670. color: 15064968
  5671. });
  5672. api.addInspector({
  5673. id: INSPECTOR_ID,
  5674. label: "Pinia 🍍",
  5675. icon: "storage",
  5676. treeFilterPlaceholder: "Search stores",
  5677. actions: [
  5678. {
  5679. icon: "content_copy",
  5680. action: () => {
  5681. actionGlobalCopyState(pinia2);
  5682. },
  5683. tooltip: "Serialize and copy the state"
  5684. },
  5685. {
  5686. icon: "content_paste",
  5687. action: async () => {
  5688. await actionGlobalPasteState(pinia2);
  5689. api.sendInspectorTree(INSPECTOR_ID);
  5690. api.sendInspectorState(INSPECTOR_ID);
  5691. },
  5692. tooltip: "Replace the state with the content of your clipboard"
  5693. },
  5694. {
  5695. icon: "save",
  5696. action: () => {
  5697. actionGlobalSaveState(pinia2);
  5698. },
  5699. tooltip: "Save the state as a JSON file"
  5700. },
  5701. {
  5702. icon: "folder_open",
  5703. action: async () => {
  5704. await actionGlobalOpenStateFile(pinia2);
  5705. api.sendInspectorTree(INSPECTOR_ID);
  5706. api.sendInspectorState(INSPECTOR_ID);
  5707. },
  5708. tooltip: "Import the state from a JSON file"
  5709. }
  5710. ],
  5711. nodeActions: [
  5712. {
  5713. icon: "restore",
  5714. tooltip: 'Reset the state (with "$reset")',
  5715. action: (nodeId) => {
  5716. const store2 = pinia2._s.get(nodeId);
  5717. if (!store2) {
  5718. toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
  5719. } else if (typeof store2.$reset !== "function") {
  5720. toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
  5721. } else {
  5722. store2.$reset();
  5723. toastMessage(`Store "${nodeId}" reset.`);
  5724. }
  5725. }
  5726. }
  5727. ]
  5728. });
  5729. api.on.inspectComponent((payload, ctx) => {
  5730. const proxy = payload.componentInstance && payload.componentInstance.proxy;
  5731. if (proxy && proxy._pStores) {
  5732. const piniaStores = payload.componentInstance.proxy._pStores;
  5733. Object.values(piniaStores).forEach((store2) => {
  5734. payload.instanceData.state.push({
  5735. type: getStoreType(store2.$id),
  5736. key: "state",
  5737. editable: true,
  5738. value: store2._isOptionsAPI ? {
  5739. _custom: {
  5740. value: vue.toRaw(store2.$state),
  5741. actions: [
  5742. {
  5743. icon: "restore",
  5744. tooltip: "Reset the state of this store",
  5745. action: () => store2.$reset()
  5746. }
  5747. ]
  5748. }
  5749. } : (
  5750. // NOTE: workaround to unwrap transferred refs
  5751. Object.keys(store2.$state).reduce((state, key) => {
  5752. state[key] = store2.$state[key];
  5753. return state;
  5754. }, {})
  5755. )
  5756. });
  5757. if (store2._getters && store2._getters.length) {
  5758. payload.instanceData.state.push({
  5759. type: getStoreType(store2.$id),
  5760. key: "getters",
  5761. editable: false,
  5762. value: store2._getters.reduce((getters, key) => {
  5763. try {
  5764. getters[key] = store2[key];
  5765. } catch (error2) {
  5766. getters[key] = error2;
  5767. }
  5768. return getters;
  5769. }, {})
  5770. });
  5771. }
  5772. });
  5773. }
  5774. });
  5775. api.on.getInspectorTree((payload) => {
  5776. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5777. let stores = [pinia2];
  5778. stores = stores.concat(Array.from(pinia2._s.values()));
  5779. 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);
  5780. }
  5781. });
  5782. api.on.getInspectorState((payload) => {
  5783. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5784. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  5785. if (!inspectedStore) {
  5786. return;
  5787. }
  5788. if (inspectedStore) {
  5789. payload.state = formatStoreForInspectorState(inspectedStore);
  5790. }
  5791. }
  5792. });
  5793. api.on.editInspectorState((payload, ctx) => {
  5794. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5795. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  5796. if (!inspectedStore) {
  5797. return toastMessage(`store "${payload.nodeId}" not found`, "error");
  5798. }
  5799. const { path } = payload;
  5800. if (!isPinia(inspectedStore)) {
  5801. if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
  5802. path.unshift("$state");
  5803. }
  5804. } else {
  5805. path.unshift("state");
  5806. }
  5807. isTimelineActive = false;
  5808. payload.set(inspectedStore, path, payload.state.value);
  5809. isTimelineActive = true;
  5810. }
  5811. });
  5812. api.on.editComponentState((payload) => {
  5813. if (payload.type.startsWith("🍍")) {
  5814. const storeId = payload.type.replace(/^🍍\s*/, "");
  5815. const store2 = pinia2._s.get(storeId);
  5816. if (!store2) {
  5817. return toastMessage(`store "${storeId}" not found`, "error");
  5818. }
  5819. const { path } = payload;
  5820. if (path[0] !== "state") {
  5821. return toastMessage(`Invalid path for store "${storeId}":
  5822. ${path}
  5823. Only state can be modified.`);
  5824. }
  5825. path[0] = "$state";
  5826. isTimelineActive = false;
  5827. payload.set(store2, path, payload.state.value);
  5828. isTimelineActive = true;
  5829. }
  5830. });
  5831. });
  5832. }
  5833. function addStoreToDevtools(app, store2) {
  5834. if (!componentStateTypes.includes(getStoreType(store2.$id))) {
  5835. componentStateTypes.push(getStoreType(store2.$id));
  5836. }
  5837. setupDevtoolsPlugin({
  5838. id: "dev.esm.pinia",
  5839. label: "Pinia 🍍",
  5840. logo: "https://pinia.vuejs.org/logo.svg",
  5841. packageName: "pinia",
  5842. homepage: "https://pinia.vuejs.org",
  5843. componentStateTypes,
  5844. app,
  5845. settings: {
  5846. logStoreChanges: {
  5847. label: "Notify about new/deleted stores",
  5848. type: "boolean",
  5849. defaultValue: true
  5850. }
  5851. // useEmojis: {
  5852. // label: 'Use emojis in messages ⚡️',
  5853. // type: 'boolean',
  5854. // defaultValue: true,
  5855. // },
  5856. }
  5857. }, (api) => {
  5858. const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
  5859. store2.$onAction(({ after, onError, name, args }) => {
  5860. const groupId = runningActionId++;
  5861. api.addTimelineEvent({
  5862. layerId: MUTATIONS_LAYER_ID,
  5863. event: {
  5864. time: now2(),
  5865. title: "🛫 " + name,
  5866. subtitle: "start",
  5867. data: {
  5868. store: formatDisplay(store2.$id),
  5869. action: formatDisplay(name),
  5870. args
  5871. },
  5872. groupId
  5873. }
  5874. });
  5875. after((result) => {
  5876. activeAction = void 0;
  5877. api.addTimelineEvent({
  5878. layerId: MUTATIONS_LAYER_ID,
  5879. event: {
  5880. time: now2(),
  5881. title: "🛬 " + name,
  5882. subtitle: "end",
  5883. data: {
  5884. store: formatDisplay(store2.$id),
  5885. action: formatDisplay(name),
  5886. args,
  5887. result
  5888. },
  5889. groupId
  5890. }
  5891. });
  5892. });
  5893. onError((error2) => {
  5894. activeAction = void 0;
  5895. api.addTimelineEvent({
  5896. layerId: MUTATIONS_LAYER_ID,
  5897. event: {
  5898. time: now2(),
  5899. logType: "error",
  5900. title: "💥 " + name,
  5901. subtitle: "end",
  5902. data: {
  5903. store: formatDisplay(store2.$id),
  5904. action: formatDisplay(name),
  5905. args,
  5906. error: error2
  5907. },
  5908. groupId
  5909. }
  5910. });
  5911. });
  5912. }, true);
  5913. store2._customProperties.forEach((name) => {
  5914. vue.watch(() => vue.unref(store2[name]), (newValue, oldValue) => {
  5915. api.notifyComponentUpdate();
  5916. api.sendInspectorState(INSPECTOR_ID);
  5917. if (isTimelineActive) {
  5918. api.addTimelineEvent({
  5919. layerId: MUTATIONS_LAYER_ID,
  5920. event: {
  5921. time: now2(),
  5922. title: "Change",
  5923. subtitle: name,
  5924. data: {
  5925. newValue,
  5926. oldValue
  5927. },
  5928. groupId: activeAction
  5929. }
  5930. });
  5931. }
  5932. }, { deep: true });
  5933. });
  5934. store2.$subscribe(({ events, type: type2 }, state) => {
  5935. api.notifyComponentUpdate();
  5936. api.sendInspectorState(INSPECTOR_ID);
  5937. if (!isTimelineActive)
  5938. return;
  5939. const eventData = {
  5940. time: now2(),
  5941. title: formatMutationType(type2),
  5942. data: assign$1({ store: formatDisplay(store2.$id) }, formatEventData(events)),
  5943. groupId: activeAction
  5944. };
  5945. if (type2 === MutationType.patchFunction) {
  5946. eventData.subtitle = "⤵️";
  5947. } else if (type2 === MutationType.patchObject) {
  5948. eventData.subtitle = "🧩";
  5949. } else if (events && !Array.isArray(events)) {
  5950. eventData.subtitle = events.type;
  5951. }
  5952. if (events) {
  5953. eventData.data["rawEvent(s)"] = {
  5954. _custom: {
  5955. display: "DebuggerEvent",
  5956. type: "object",
  5957. tooltip: "raw DebuggerEvent[]",
  5958. value: events
  5959. }
  5960. };
  5961. }
  5962. api.addTimelineEvent({
  5963. layerId: MUTATIONS_LAYER_ID,
  5964. event: eventData
  5965. });
  5966. }, { detached: true, flush: "sync" });
  5967. const hotUpdate = store2._hotUpdate;
  5968. store2._hotUpdate = vue.markRaw((newStore) => {
  5969. hotUpdate(newStore);
  5970. api.addTimelineEvent({
  5971. layerId: MUTATIONS_LAYER_ID,
  5972. event: {
  5973. time: now2(),
  5974. title: "🔥 " + store2.$id,
  5975. subtitle: "HMR update",
  5976. data: {
  5977. store: formatDisplay(store2.$id),
  5978. info: formatDisplay(`HMR update`)
  5979. }
  5980. }
  5981. });
  5982. api.notifyComponentUpdate();
  5983. api.sendInspectorTree(INSPECTOR_ID);
  5984. api.sendInspectorState(INSPECTOR_ID);
  5985. });
  5986. const { $dispose } = store2;
  5987. store2.$dispose = () => {
  5988. $dispose();
  5989. api.notifyComponentUpdate();
  5990. api.sendInspectorTree(INSPECTOR_ID);
  5991. api.sendInspectorState(INSPECTOR_ID);
  5992. api.getSettings().logStoreChanges && toastMessage(`Disposed "${store2.$id}" store 🗑`);
  5993. };
  5994. api.notifyComponentUpdate();
  5995. api.sendInspectorTree(INSPECTOR_ID);
  5996. api.sendInspectorState(INSPECTOR_ID);
  5997. api.getSettings().logStoreChanges && toastMessage(`"${store2.$id}" store installed 🆕`);
  5998. });
  5999. }
  6000. let runningActionId = 0;
  6001. let activeAction;
  6002. function patchActionForGrouping(store2, actionNames, wrapWithProxy) {
  6003. const actions = actionNames.reduce((storeActions, actionName) => {
  6004. storeActions[actionName] = vue.toRaw(store2)[actionName];
  6005. return storeActions;
  6006. }, {});
  6007. for (const actionName in actions) {
  6008. store2[actionName] = function() {
  6009. const _actionId = runningActionId;
  6010. const trackedStore = wrapWithProxy ? new Proxy(store2, {
  6011. get(...args) {
  6012. activeAction = _actionId;
  6013. return Reflect.get(...args);
  6014. },
  6015. set(...args) {
  6016. activeAction = _actionId;
  6017. return Reflect.set(...args);
  6018. }
  6019. }) : store2;
  6020. activeAction = _actionId;
  6021. const retValue = actions[actionName].apply(trackedStore, arguments);
  6022. activeAction = void 0;
  6023. return retValue;
  6024. };
  6025. }
  6026. }
  6027. function devtoolsPlugin({ app, store: store2, options }) {
  6028. if (store2.$id.startsWith("__hot:")) {
  6029. return;
  6030. }
  6031. store2._isOptionsAPI = !!options.state;
  6032. patchActionForGrouping(store2, Object.keys(options.actions), store2._isOptionsAPI);
  6033. const originalHotUpdate = store2._hotUpdate;
  6034. vue.toRaw(store2)._hotUpdate = function(newStore) {
  6035. originalHotUpdate.apply(this, arguments);
  6036. patchActionForGrouping(store2, Object.keys(newStore._hmrPayload.actions), !!store2._isOptionsAPI);
  6037. };
  6038. addStoreToDevtools(
  6039. app,
  6040. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  6041. store2
  6042. );
  6043. }
  6044. function createPinia() {
  6045. const scope = vue.effectScope(true);
  6046. const state = scope.run(() => vue.ref({}));
  6047. let _p = [];
  6048. let toBeInstalled = [];
  6049. const pinia2 = vue.markRaw({
  6050. install(app) {
  6051. setActivePinia(pinia2);
  6052. {
  6053. pinia2._a = app;
  6054. app.provide(piniaSymbol, pinia2);
  6055. app.config.globalProperties.$pinia = pinia2;
  6056. if (USE_DEVTOOLS) {
  6057. registerPiniaDevtools(app, pinia2);
  6058. }
  6059. toBeInstalled.forEach((plugin) => _p.push(plugin));
  6060. toBeInstalled = [];
  6061. }
  6062. },
  6063. use(plugin) {
  6064. if (!this._a && !isVue2) {
  6065. toBeInstalled.push(plugin);
  6066. } else {
  6067. _p.push(plugin);
  6068. }
  6069. return this;
  6070. },
  6071. _p,
  6072. // it's actually undefined here
  6073. // @ts-expect-error
  6074. _a: null,
  6075. _e: scope,
  6076. _s: /* @__PURE__ */ new Map(),
  6077. state
  6078. });
  6079. if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
  6080. pinia2.use(devtoolsPlugin);
  6081. }
  6082. return pinia2;
  6083. }
  6084. function patchObject(newState, oldState) {
  6085. for (const key in oldState) {
  6086. const subPatch = oldState[key];
  6087. if (!(key in newState)) {
  6088. continue;
  6089. }
  6090. const targetValue = newState[key];
  6091. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  6092. newState[key] = patchObject(targetValue, subPatch);
  6093. } else {
  6094. {
  6095. newState[key] = subPatch;
  6096. }
  6097. }
  6098. }
  6099. return newState;
  6100. }
  6101. const noop = () => {
  6102. };
  6103. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  6104. subscriptions.push(callback);
  6105. const removeSubscription = () => {
  6106. const idx = subscriptions.indexOf(callback);
  6107. if (idx > -1) {
  6108. subscriptions.splice(idx, 1);
  6109. onCleanup();
  6110. }
  6111. };
  6112. if (!detached && vue.getCurrentScope()) {
  6113. vue.onScopeDispose(removeSubscription);
  6114. }
  6115. return removeSubscription;
  6116. }
  6117. function triggerSubscriptions(subscriptions, ...args) {
  6118. subscriptions.slice().forEach((callback) => {
  6119. callback(...args);
  6120. });
  6121. }
  6122. const fallbackRunWithContext = (fn) => fn();
  6123. function mergeReactiveObjects(target, patchToApply) {
  6124. if (target instanceof Map && patchToApply instanceof Map) {
  6125. patchToApply.forEach((value2, key) => target.set(key, value2));
  6126. }
  6127. if (target instanceof Set && patchToApply instanceof Set) {
  6128. patchToApply.forEach(target.add, target);
  6129. }
  6130. for (const key in patchToApply) {
  6131. if (!patchToApply.hasOwnProperty(key))
  6132. continue;
  6133. const subPatch = patchToApply[key];
  6134. const targetValue = target[key];
  6135. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  6136. target[key] = mergeReactiveObjects(targetValue, subPatch);
  6137. } else {
  6138. target[key] = subPatch;
  6139. }
  6140. }
  6141. return target;
  6142. }
  6143. const skipHydrateSymbol = Symbol("pinia:skipHydration");
  6144. function shouldHydrate(obj) {
  6145. return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  6146. }
  6147. const { assign } = Object;
  6148. function isComputed(o) {
  6149. return !!(vue.isRef(o) && o.effect);
  6150. }
  6151. function createOptionsStore(id, options, pinia2, hot) {
  6152. const { state, actions, getters } = options;
  6153. const initialState = pinia2.state.value[id];
  6154. let store2;
  6155. function setup() {
  6156. if (!initialState && !hot) {
  6157. {
  6158. pinia2.state.value[id] = state ? state() : {};
  6159. }
  6160. }
  6161. const localState = hot ? (
  6162. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  6163. vue.toRefs(vue.ref(state ? state() : {}).value)
  6164. ) : vue.toRefs(pinia2.state.value[id]);
  6165. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  6166. if (name in localState) {
  6167. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
  6168. }
  6169. computedGetters[name] = vue.markRaw(vue.computed(() => {
  6170. setActivePinia(pinia2);
  6171. const store22 = pinia2._s.get(id);
  6172. return getters[name].call(store22, store22);
  6173. }));
  6174. return computedGetters;
  6175. }, {}));
  6176. }
  6177. store2 = createSetupStore(id, setup, options, pinia2, hot, true);
  6178. return store2;
  6179. }
  6180. function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {
  6181. let scope;
  6182. const optionsForPlugin = assign({ actions: {} }, options);
  6183. if (!pinia2._e.active) {
  6184. throw new Error("Pinia destroyed");
  6185. }
  6186. const $subscribeOptions = {
  6187. deep: true
  6188. // flush: 'post',
  6189. };
  6190. {
  6191. $subscribeOptions.onTrigger = (event) => {
  6192. if (isListening) {
  6193. debuggerEvents = event;
  6194. } else if (isListening == false && !store2._hotUpdating) {
  6195. if (Array.isArray(debuggerEvents)) {
  6196. debuggerEvents.push(event);
  6197. } else {
  6198. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  6199. }
  6200. }
  6201. };
  6202. }
  6203. let isListening;
  6204. let isSyncListening;
  6205. let subscriptions = [];
  6206. let actionSubscriptions = [];
  6207. let debuggerEvents;
  6208. const initialState = pinia2.state.value[$id];
  6209. if (!isOptionsStore && !initialState && !hot) {
  6210. {
  6211. pinia2.state.value[$id] = {};
  6212. }
  6213. }
  6214. const hotState = vue.ref({});
  6215. let activeListener;
  6216. function $patch(partialStateOrMutator) {
  6217. let subscriptionMutation;
  6218. isListening = isSyncListening = false;
  6219. {
  6220. debuggerEvents = [];
  6221. }
  6222. if (typeof partialStateOrMutator === "function") {
  6223. partialStateOrMutator(pinia2.state.value[$id]);
  6224. subscriptionMutation = {
  6225. type: MutationType.patchFunction,
  6226. storeId: $id,
  6227. events: debuggerEvents
  6228. };
  6229. } else {
  6230. mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);
  6231. subscriptionMutation = {
  6232. type: MutationType.patchObject,
  6233. payload: partialStateOrMutator,
  6234. storeId: $id,
  6235. events: debuggerEvents
  6236. };
  6237. }
  6238. const myListenerId = activeListener = Symbol();
  6239. vue.nextTick().then(() => {
  6240. if (activeListener === myListenerId) {
  6241. isListening = true;
  6242. }
  6243. });
  6244. isSyncListening = true;
  6245. triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);
  6246. }
  6247. const $reset = isOptionsStore ? function $reset2() {
  6248. const { state } = options;
  6249. const newState = state ? state() : {};
  6250. this.$patch(($state) => {
  6251. assign($state, newState);
  6252. });
  6253. } : (
  6254. /* istanbul ignore next */
  6255. () => {
  6256. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  6257. }
  6258. );
  6259. function $dispose() {
  6260. scope.stop();
  6261. subscriptions = [];
  6262. actionSubscriptions = [];
  6263. pinia2._s.delete($id);
  6264. }
  6265. function wrapAction(name, action) {
  6266. return function() {
  6267. setActivePinia(pinia2);
  6268. const args = Array.from(arguments);
  6269. const afterCallbackList = [];
  6270. const onErrorCallbackList = [];
  6271. function after(callback) {
  6272. afterCallbackList.push(callback);
  6273. }
  6274. function onError(callback) {
  6275. onErrorCallbackList.push(callback);
  6276. }
  6277. triggerSubscriptions(actionSubscriptions, {
  6278. args,
  6279. name,
  6280. store: store2,
  6281. after,
  6282. onError
  6283. });
  6284. let ret;
  6285. try {
  6286. ret = action.apply(this && this.$id === $id ? this : store2, args);
  6287. } catch (error2) {
  6288. triggerSubscriptions(onErrorCallbackList, error2);
  6289. throw error2;
  6290. }
  6291. if (ret instanceof Promise) {
  6292. return ret.then((value2) => {
  6293. triggerSubscriptions(afterCallbackList, value2);
  6294. return value2;
  6295. }).catch((error2) => {
  6296. triggerSubscriptions(onErrorCallbackList, error2);
  6297. return Promise.reject(error2);
  6298. });
  6299. }
  6300. triggerSubscriptions(afterCallbackList, ret);
  6301. return ret;
  6302. };
  6303. }
  6304. const _hmrPayload = /* @__PURE__ */ vue.markRaw({
  6305. actions: {},
  6306. getters: {},
  6307. state: [],
  6308. hotState
  6309. });
  6310. const partialStore = {
  6311. _p: pinia2,
  6312. // _s: scope,
  6313. $id,
  6314. $onAction: addSubscription.bind(null, actionSubscriptions),
  6315. $patch,
  6316. $reset,
  6317. $subscribe(callback, options2 = {}) {
  6318. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  6319. const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => {
  6320. if (options2.flush === "sync" ? isSyncListening : isListening) {
  6321. callback({
  6322. storeId: $id,
  6323. type: MutationType.direct,
  6324. events: debuggerEvents
  6325. }, state);
  6326. }
  6327. }, assign({}, $subscribeOptions, options2)));
  6328. return removeSubscription;
  6329. },
  6330. $dispose
  6331. };
  6332. const store2 = vue.reactive(assign(
  6333. {
  6334. _hmrPayload,
  6335. _customProperties: vue.markRaw(/* @__PURE__ */ new Set())
  6336. // devtools custom properties
  6337. },
  6338. partialStore
  6339. // must be added later
  6340. // setupStore
  6341. ));
  6342. pinia2._s.set($id, store2);
  6343. const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;
  6344. const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup)));
  6345. for (const key in setupStore) {
  6346. const prop = setupStore[key];
  6347. if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) {
  6348. if (hot) {
  6349. set(hotState.value, key, vue.toRef(setupStore, key));
  6350. } else if (!isOptionsStore) {
  6351. if (initialState && shouldHydrate(prop)) {
  6352. if (vue.isRef(prop)) {
  6353. prop.value = initialState[key];
  6354. } else {
  6355. mergeReactiveObjects(prop, initialState[key]);
  6356. }
  6357. }
  6358. {
  6359. pinia2.state.value[$id][key] = prop;
  6360. }
  6361. }
  6362. {
  6363. _hmrPayload.state.push(key);
  6364. }
  6365. } else if (typeof prop === "function") {
  6366. const actionValue = hot ? prop : wrapAction(key, prop);
  6367. {
  6368. setupStore[key] = actionValue;
  6369. }
  6370. {
  6371. _hmrPayload.actions[key] = prop;
  6372. }
  6373. optionsForPlugin.actions[key] = prop;
  6374. } else {
  6375. if (isComputed(prop)) {
  6376. _hmrPayload.getters[key] = isOptionsStore ? (
  6377. // @ts-expect-error
  6378. options.getters[key]
  6379. ) : prop;
  6380. if (IS_CLIENT) {
  6381. const getters = setupStore._getters || // @ts-expect-error: same
  6382. (setupStore._getters = vue.markRaw([]));
  6383. getters.push(key);
  6384. }
  6385. }
  6386. }
  6387. }
  6388. {
  6389. assign(store2, setupStore);
  6390. assign(vue.toRaw(store2), setupStore);
  6391. }
  6392. Object.defineProperty(store2, "$state", {
  6393. get: () => hot ? hotState.value : pinia2.state.value[$id],
  6394. set: (state) => {
  6395. if (hot) {
  6396. throw new Error("cannot set hotState");
  6397. }
  6398. $patch(($state) => {
  6399. assign($state, state);
  6400. });
  6401. }
  6402. });
  6403. {
  6404. store2._hotUpdate = vue.markRaw((newStore) => {
  6405. store2._hotUpdating = true;
  6406. newStore._hmrPayload.state.forEach((stateKey) => {
  6407. if (stateKey in store2.$state) {
  6408. const newStateTarget = newStore.$state[stateKey];
  6409. const oldStateSource = store2.$state[stateKey];
  6410. if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) {
  6411. patchObject(newStateTarget, oldStateSource);
  6412. } else {
  6413. newStore.$state[stateKey] = oldStateSource;
  6414. }
  6415. }
  6416. set(store2, stateKey, vue.toRef(newStore.$state, stateKey));
  6417. });
  6418. Object.keys(store2.$state).forEach((stateKey) => {
  6419. if (!(stateKey in newStore.$state)) {
  6420. del(store2, stateKey);
  6421. }
  6422. });
  6423. isListening = false;
  6424. isSyncListening = false;
  6425. pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState");
  6426. isSyncListening = true;
  6427. vue.nextTick().then(() => {
  6428. isListening = true;
  6429. });
  6430. for (const actionName in newStore._hmrPayload.actions) {
  6431. const action = newStore[actionName];
  6432. set(store2, actionName, wrapAction(actionName, action));
  6433. }
  6434. for (const getterName in newStore._hmrPayload.getters) {
  6435. const getter = newStore._hmrPayload.getters[getterName];
  6436. const getterValue = isOptionsStore ? (
  6437. // special handling of options api
  6438. vue.computed(() => {
  6439. setActivePinia(pinia2);
  6440. return getter.call(store2, store2);
  6441. })
  6442. ) : getter;
  6443. set(store2, getterName, getterValue);
  6444. }
  6445. Object.keys(store2._hmrPayload.getters).forEach((key) => {
  6446. if (!(key in newStore._hmrPayload.getters)) {
  6447. del(store2, key);
  6448. }
  6449. });
  6450. Object.keys(store2._hmrPayload.actions).forEach((key) => {
  6451. if (!(key in newStore._hmrPayload.actions)) {
  6452. del(store2, key);
  6453. }
  6454. });
  6455. store2._hmrPayload = newStore._hmrPayload;
  6456. store2._getters = newStore._getters;
  6457. store2._hotUpdating = false;
  6458. });
  6459. }
  6460. if (USE_DEVTOOLS) {
  6461. const nonEnumerable = {
  6462. writable: true,
  6463. configurable: true,
  6464. // avoid warning on devtools trying to display this property
  6465. enumerable: false
  6466. };
  6467. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
  6468. Object.defineProperty(store2, p, assign({ value: store2[p] }, nonEnumerable));
  6469. });
  6470. }
  6471. pinia2._p.forEach((extender) => {
  6472. if (USE_DEVTOOLS) {
  6473. const extensions = scope.run(() => extender({
  6474. store: store2,
  6475. app: pinia2._a,
  6476. pinia: pinia2,
  6477. options: optionsForPlugin
  6478. }));
  6479. Object.keys(extensions || {}).forEach((key) => store2._customProperties.add(key));
  6480. assign(store2, extensions);
  6481. } else {
  6482. assign(store2, scope.run(() => extender({
  6483. store: store2,
  6484. app: pinia2._a,
  6485. pinia: pinia2,
  6486. options: optionsForPlugin
  6487. })));
  6488. }
  6489. });
  6490. if (store2.$state && typeof store2.$state === "object" && typeof store2.$state.constructor === "function" && !store2.$state.constructor.toString().includes("[native code]")) {
  6491. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  6492. state: () => new MyClass()
  6493. Found in store "${store2.$id}".`);
  6494. }
  6495. if (initialState && isOptionsStore && options.hydrate) {
  6496. options.hydrate(store2.$state, initialState);
  6497. }
  6498. isListening = true;
  6499. isSyncListening = true;
  6500. return store2;
  6501. }
  6502. function defineStore(idOrOptions, setup, setupOptions) {
  6503. let id;
  6504. let options;
  6505. const isSetupStore = typeof setup === "function";
  6506. if (typeof idOrOptions === "string") {
  6507. id = idOrOptions;
  6508. options = isSetupStore ? setupOptions : setup;
  6509. } else {
  6510. options = idOrOptions;
  6511. id = idOrOptions.id;
  6512. if (typeof id !== "string") {
  6513. throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
  6514. }
  6515. }
  6516. function useStore2(pinia2, hot) {
  6517. const hasContext = vue.hasInjectionContext();
  6518. pinia2 = // in test mode, ignore the argument provided as we can always retrieve a
  6519. // pinia instance with getActivePinia()
  6520. pinia2 || (hasContext ? vue.inject(piniaSymbol, null) : null);
  6521. if (pinia2)
  6522. setActivePinia(pinia2);
  6523. if (!activePinia) {
  6524. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
  6525. See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
  6526. This will fail in production.`);
  6527. }
  6528. pinia2 = activePinia;
  6529. if (!pinia2._s.has(id)) {
  6530. if (isSetupStore) {
  6531. createSetupStore(id, setup, options, pinia2);
  6532. } else {
  6533. createOptionsStore(id, options, pinia2);
  6534. }
  6535. {
  6536. useStore2._pinia = pinia2;
  6537. }
  6538. }
  6539. const store2 = pinia2._s.get(id);
  6540. if (hot) {
  6541. const hotId = "__hot:" + id;
  6542. const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign({}, options), pinia2, true);
  6543. hot._hotUpdate(newStore);
  6544. delete pinia2.state.value[hotId];
  6545. pinia2._s.delete(hotId);
  6546. }
  6547. if (IS_CLIENT) {
  6548. const currentInstance = vue.getCurrentInstance();
  6549. if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
  6550. !hot) {
  6551. const vm = currentInstance.proxy;
  6552. const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  6553. cache[id] = store2;
  6554. }
  6555. }
  6556. return store2;
  6557. }
  6558. useStore2.$id = id;
  6559. return useStore2;
  6560. }
  6561. const useStore = defineStore("user", {
  6562. state: () => ({
  6563. userInfo: {},
  6564. // 用户信息
  6565. token: "",
  6566. // uploadUrl: 'http://192.168.1.3:8080/ai-file/upload/oss', // 上传资源的服务器网址
  6567. uploadUrl: "https://gc.sdzcq.com/prod-api/ai-file/upload/oss"
  6568. // 上传资源的服务器网址
  6569. }),
  6570. getters: {},
  6571. actions: {
  6572. setUserInfo(data) {
  6573. if (data.userId) {
  6574. formatAppLog("log", "at store/uses.js:16", "更新全局的用户信息-也更新本地存储", data);
  6575. this.userInfo = data;
  6576. uni.setStorageSync("userInfo", JSON.stringify(data));
  6577. } else {
  6578. uni.removeStorageSync("userInfo");
  6579. }
  6580. },
  6581. setToken(token) {
  6582. if (token) {
  6583. formatAppLog("log", "at store/uses.js:25", "更新全局的 token -也更新本地存储", token);
  6584. this.token = token;
  6585. uni.setStorageSync("token", token);
  6586. } else {
  6587. uni.removeStorageSync("token");
  6588. }
  6589. }
  6590. }
  6591. });
  6592. const pinia = createPinia();
  6593. const store = useStore(pinia);
  6594. const _sfc_main$1d = {
  6595. __name: "index",
  6596. props: {
  6597. request: {
  6598. type: Function
  6599. },
  6600. requestStr: {
  6601. type: String
  6602. },
  6603. isRefresh: {
  6604. type: [Number, Boolean],
  6605. default: 0
  6606. },
  6607. height: {
  6608. type: [String, Number]
  6609. },
  6610. total: {
  6611. type: [Number],
  6612. default: 0
  6613. },
  6614. otherParams: {
  6615. type: Object,
  6616. default: () => ({})
  6617. },
  6618. diffHeight: {
  6619. type: Number,
  6620. default: 0
  6621. },
  6622. immediate: {
  6623. type: Boolean,
  6624. default: false
  6625. }
  6626. },
  6627. emits: ["updateList", "update:total"],
  6628. setup(__props, { expose: __expose, emit: __emit }) {
  6629. const {
  6630. mescrollInit,
  6631. downCallback,
  6632. getMescroll
  6633. } = useMescroll();
  6634. const windowHeight = vue.computed(() => {
  6635. return store.clientHeight - props2.diffHeight;
  6636. });
  6637. const emit = __emit;
  6638. const props2 = __props;
  6639. const list = vue.ref([]);
  6640. const getList = (mescroll) => {
  6641. return new Promise((resolve, reject) => {
  6642. let params = {
  6643. pageNum: mescroll.num,
  6644. pageSize: mescroll.size,
  6645. ...props2.otherParams
  6646. };
  6647. uni.$u.http.get(props2.requestStr, {
  6648. params
  6649. }).then((res) => {
  6650. emit("update:total", res.total);
  6651. resolve(res);
  6652. });
  6653. });
  6654. };
  6655. const upCallback = (mescroll) => {
  6656. if (!props2.requestStr)
  6657. return;
  6658. getList(mescroll).then((res) => {
  6659. const curPageData = res.rows || res.data || [];
  6660. if (mescroll.num == 1)
  6661. list.value = [];
  6662. list.value = list.value.concat(curPageData);
  6663. emit("updateList", list.value);
  6664. mescroll.endBySize(curPageData.length, res.total);
  6665. }).catch(() => {
  6666. mescroll.endErr();
  6667. });
  6668. };
  6669. const resetUpScroll = () => {
  6670. emit("updateList", []);
  6671. setTimeout(() => {
  6672. getMescroll().resetUpScroll();
  6673. }, 100);
  6674. };
  6675. const scroll = (e) => {
  6676. emit("scroll", e);
  6677. };
  6678. __expose({
  6679. resetUpScroll
  6680. });
  6681. const __returned__ = { mescrollInit, downCallback, getMescroll, windowHeight, emit, props: props2, list, getList, upCallback, resetUpScroll, scroll, computed: vue.computed, onMounted: vue.onMounted, ref: vue.ref, watch: vue.watch, get onShow() {
  6682. return onShow;
  6683. }, get useMescroll() {
  6684. return useMescroll;
  6685. }, get store() {
  6686. return store;
  6687. } };
  6688. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  6689. return __returned__;
  6690. }
  6691. };
  6692. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  6693. const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$6);
  6694. return vue.openBlock(), vue.createBlock(_component_mescroll_uni, {
  6695. onInit: $setup.mescrollInit,
  6696. onDown: $setup.downCallback,
  6697. onUp: $setup.upCallback,
  6698. height: $props.height || $setup.windowHeight + "px",
  6699. up: { textNoMore: "-- 没有更多了 --" }
  6700. }, {
  6701. default: vue.withCtx(() => [
  6702. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6703. ]),
  6704. _: 3
  6705. /* FORWARDED */
  6706. }, 8, ["onInit", "onDown", "height"]);
  6707. }
  6708. const PageScroll = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-30bc23e1"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/pageScroll/index.vue"]]);
  6709. const _sfc_main$1c = {
  6710. __name: "index",
  6711. setup(__props, { expose: __expose }) {
  6712. __expose();
  6713. const statusList = vue.ref([
  6714. {
  6715. label: "待初审",
  6716. value: "1361",
  6717. path: "/pages/order/stat/pending-review"
  6718. },
  6719. {
  6720. label: "待拣件",
  6721. value: "1361",
  6722. path: "/pages/order/stat/pending-pick"
  6723. },
  6724. {
  6725. label: "已拣件待签收",
  6726. value: "1361",
  6727. path: "/pages/order/stat/pending-sign"
  6728. },
  6729. {
  6730. label: "待确认收货",
  6731. value: "1361",
  6732. path: "/pages/order/stat/pending-confirm"
  6733. },
  6734. {
  6735. label: "已到货待审核",
  6736. value: "1361",
  6737. path: "/pages/order/stat/pending-audit"
  6738. },
  6739. {
  6740. label: "待付款",
  6741. value: "1361",
  6742. path: "/pages/order/stat/pending-payment"
  6743. }
  6744. ]);
  6745. const navigateToDetail = (path) => {
  6746. uni.navigateTo({
  6747. url: path
  6748. });
  6749. };
  6750. const __returned__ = { statusList, navigateToDetail, PageScroll, ref: vue.ref };
  6751. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  6752. return __returned__;
  6753. }
  6754. };
  6755. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  6756. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  6757. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  6758. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
  6759. return vue.openBlock(), vue.createElementBlock("view", { class: "order-statistics" }, [
  6760. vue.createCommentVNode(" 顶部统计卡片 "),
  6761. vue.createElementVNode("view", { class: "overview-card" }, [
  6762. vue.createElementVNode("view", { class: "overview-grid" }, [
  6763. vue.createElementVNode("view", { class: "grid-item" }, [
  6764. vue.createElementVNode("text", { class: "item-label" }, "今日订单"),
  6765. vue.createElementVNode("text", { class: "item-value" }, "1361")
  6766. ]),
  6767. vue.createElementVNode("view", { class: "grid-item" }, [
  6768. vue.createElementVNode("text", { class: "item-label" }, "昨日订单"),
  6769. vue.createElementVNode("text", { class: "item-value" }, "1361")
  6770. ]),
  6771. vue.createElementVNode("view", { class: "grid-item" }, [
  6772. vue.createElementVNode("text", { class: "item-label" }, "本月订单"),
  6773. vue.createElementVNode("text", { class: "item-value" }, [
  6774. vue.createTextVNode("2.77"),
  6775. vue.createElementVNode("text", { class: "unit" }, "万")
  6776. ])
  6777. ])
  6778. ])
  6779. ]),
  6780. vue.createCommentVNode(" 订单状态网格 "),
  6781. vue.createElementVNode("view", { class: "status-grid" }, [
  6782. (vue.openBlock(true), vue.createElementBlock(
  6783. vue.Fragment,
  6784. null,
  6785. vue.renderList($setup.statusList, (item, index2) => {
  6786. return vue.openBlock(), vue.createElementBlock("view", {
  6787. key: index2,
  6788. class: "status-item",
  6789. onClick: ($event) => $setup.navigateToDetail(item.path)
  6790. }, [
  6791. vue.createElementVNode("view", { class: "status-content" }, [
  6792. vue.createElementVNode(
  6793. "text",
  6794. { class: "status-label" },
  6795. vue.toDisplayString(item.label),
  6796. 1
  6797. /* TEXT */
  6798. ),
  6799. vue.createElementVNode("view", { class: "status-value-wrap" }, [
  6800. vue.createElementVNode(
  6801. "text",
  6802. { class: "status-value" },
  6803. vue.toDisplayString(item.value),
  6804. 1
  6805. /* TEXT */
  6806. ),
  6807. vue.createVNode(_component_u_icon, {
  6808. name: "arrow-right",
  6809. color: "#999",
  6810. size: "14"
  6811. })
  6812. ])
  6813. ])
  6814. ], 8, ["onClick"]);
  6815. }),
  6816. 128
  6817. /* KEYED_FRAGMENT */
  6818. ))
  6819. ]),
  6820. vue.createCommentVNode(" 底部操作项 "),
  6821. vue.createElementVNode("view", { class: "bottom-actions" }, [
  6822. vue.createVNode(_component_u_cell_group, { border: false }, {
  6823. default: vue.withCtx(() => [
  6824. vue.createVNode(_component_u_cell, {
  6825. title: "收货统计",
  6826. isLink: "",
  6827. onClick: _cache[0] || (_cache[0] = ($event) => $setup.navigateToDetail("/pages/statistics/receive"))
  6828. }),
  6829. vue.createVNode(_component_u_cell, {
  6830. title: "全部订单",
  6831. isLink: "",
  6832. onClick: _cache[1] || (_cache[1] = ($event) => $setup.navigateToDetail("/pages/order/stat/all")),
  6833. border: false
  6834. })
  6835. ]),
  6836. _: 1
  6837. /* STABLE */
  6838. })
  6839. ])
  6840. ]);
  6841. }
  6842. const PagesOrderIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-17a44f9d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/index.vue"]]);
  6843. const props$p = {
  6844. props: {
  6845. // 搜索框形状,round-圆形,square-方形
  6846. shape: {
  6847. type: String,
  6848. default: props$x.search.shape
  6849. },
  6850. // 搜索框背景色,默认值#f2f2f2
  6851. bgColor: {
  6852. type: String,
  6853. default: props$x.search.bgColor
  6854. },
  6855. // 占位提示文字
  6856. placeholder: {
  6857. type: String,
  6858. default: props$x.search.placeholder
  6859. },
  6860. // 是否启用清除控件
  6861. clearabled: {
  6862. type: Boolean,
  6863. default: props$x.search.clearabled
  6864. },
  6865. // 是否自动聚焦
  6866. focus: {
  6867. type: Boolean,
  6868. default: props$x.search.focus
  6869. },
  6870. // 是否在搜索框右侧显示取消按钮
  6871. showAction: {
  6872. type: Boolean,
  6873. default: props$x.search.showAction
  6874. },
  6875. // 右边控件的样式
  6876. actionStyle: {
  6877. type: Object,
  6878. default: props$x.search.actionStyle
  6879. },
  6880. // 取消按钮文字
  6881. actionText: {
  6882. type: String,
  6883. default: props$x.search.actionText
  6884. },
  6885. // 输入框内容对齐方式,可选值为 left|center|right
  6886. inputAlign: {
  6887. type: String,
  6888. default: props$x.search.inputAlign
  6889. },
  6890. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  6891. inputStyle: {
  6892. type: Object,
  6893. default: props$x.search.inputStyle
  6894. },
  6895. // 是否启用输入框
  6896. disabled: {
  6897. type: Boolean,
  6898. default: props$x.search.disabled
  6899. },
  6900. // 边框颜色
  6901. borderColor: {
  6902. type: String,
  6903. default: props$x.search.borderColor
  6904. },
  6905. // 搜索图标的颜色,默认同输入框字体颜色
  6906. searchIconColor: {
  6907. type: String,
  6908. default: props$x.search.searchIconColor
  6909. },
  6910. // 输入框字体颜色
  6911. color: {
  6912. type: String,
  6913. default: props$x.search.color
  6914. },
  6915. // placeholder的颜色
  6916. placeholderColor: {
  6917. type: String,
  6918. default: props$x.search.placeholderColor
  6919. },
  6920. // 左边输入框的图标,可以为uView图标名称或图片路径
  6921. searchIcon: {
  6922. type: String,
  6923. default: props$x.search.searchIcon
  6924. },
  6925. searchIconSize: {
  6926. type: [Number, String],
  6927. default: props$x.search.searchIconSize
  6928. },
  6929. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  6930. margin: {
  6931. type: String,
  6932. default: props$x.search.margin
  6933. },
  6934. // 开启showAction时,是否在input获取焦点时才显示
  6935. animation: {
  6936. type: Boolean,
  6937. default: props$x.search.animation
  6938. },
  6939. // 输入框的初始化内容
  6940. modelValue: {
  6941. type: String,
  6942. default: props$x.search.value
  6943. },
  6944. value: {
  6945. type: String,
  6946. default: props$x.search.value
  6947. },
  6948. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  6949. maxlength: {
  6950. type: [String, Number],
  6951. default: props$x.search.maxlength
  6952. },
  6953. // 搜索框高度,单位px
  6954. height: {
  6955. type: [String, Number],
  6956. default: props$x.search.height
  6957. },
  6958. // 搜索框左侧文本
  6959. label: {
  6960. type: [String, Number, null],
  6961. default: props$x.search.label
  6962. }
  6963. }
  6964. };
  6965. const _sfc_main$1b = {
  6966. name: "u-search",
  6967. mixins: [mpMixin, mixin, props$p],
  6968. data() {
  6969. return {
  6970. keyword: "",
  6971. showClear: false,
  6972. // 是否显示右边的清除图标
  6973. show: false,
  6974. // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件
  6975. focused: this.focus
  6976. // 绑定输入框的值
  6977. // inputValue: this.value
  6978. };
  6979. },
  6980. watch: {
  6981. keyword(nVal) {
  6982. this.$emit("update:modelValue", nVal);
  6983. this.$emit("change", nVal);
  6984. },
  6985. modelValue: {
  6986. immediate: true,
  6987. handler(nVal) {
  6988. this.keyword = nVal;
  6989. }
  6990. }
  6991. },
  6992. computed: {
  6993. showActionBtn() {
  6994. return !this.animation && this.showAction;
  6995. }
  6996. },
  6997. emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"],
  6998. methods: {
  6999. // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化
  7000. inputChange(e) {
  7001. this.keyword = e.detail.value;
  7002. },
  7003. // 清空输入
  7004. // 也可以作为用户通过this.$refs形式调用清空输入框内容
  7005. clear() {
  7006. this.keyword = "";
  7007. this.$nextTick(() => {
  7008. this.$emit("clear");
  7009. });
  7010. },
  7011. // 确定搜索
  7012. search(e) {
  7013. this.$emit("search", e.detail.value);
  7014. try {
  7015. uni.hideKeyboard();
  7016. } catch (e2) {
  7017. }
  7018. },
  7019. // 点击右边自定义按钮的事件
  7020. custom() {
  7021. this.$emit("custom", this.keyword);
  7022. try {
  7023. uni.hideKeyboard();
  7024. } catch (e) {
  7025. }
  7026. },
  7027. // 获取焦点
  7028. getFocus() {
  7029. this.focused = true;
  7030. if (this.animation && this.showAction)
  7031. this.show = true;
  7032. this.$emit("focus", this.keyword);
  7033. },
  7034. // 失去焦点
  7035. blur() {
  7036. setTimeout(() => {
  7037. this.focused = false;
  7038. }, 100);
  7039. this.show = false;
  7040. this.$emit("blur", this.keyword);
  7041. },
  7042. // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
  7043. clickHandler() {
  7044. if (this.disabled)
  7045. this.$emit("click");
  7046. },
  7047. // 点击左边图标
  7048. clickIcon() {
  7049. this.$emit("clickIcon");
  7050. }
  7051. }
  7052. };
  7053. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  7054. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  7055. return vue.openBlock(), vue.createElementBlock(
  7056. "view",
  7057. {
  7058. class: "u-search",
  7059. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  7060. style: vue.normalizeStyle([{
  7061. margin: _ctx.margin
  7062. }, _ctx.$u.addStyle(_ctx.customStyle)])
  7063. },
  7064. [
  7065. vue.createElementVNode(
  7066. "view",
  7067. {
  7068. class: "u-search__content",
  7069. style: vue.normalizeStyle({
  7070. backgroundColor: _ctx.bgColor,
  7071. borderRadius: _ctx.shape == "round" ? "100px" : "4px",
  7072. borderColor: _ctx.borderColor
  7073. })
  7074. },
  7075. [
  7076. _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [
  7077. vue.createElementVNode(
  7078. "text",
  7079. { class: "u-search__content__label" },
  7080. vue.toDisplayString(_ctx.label),
  7081. 1
  7082. /* TEXT */
  7083. )
  7084. ], true) : vue.createCommentVNode("v-if", true),
  7085. vue.createElementVNode("view", { class: "u-search__content__icon" }, [
  7086. vue.createVNode(_component_u_icon, {
  7087. onClick: $options.clickIcon,
  7088. size: _ctx.searchIconSize,
  7089. name: _ctx.searchIcon,
  7090. color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
  7091. }, null, 8, ["onClick", "size", "name", "color"])
  7092. ]),
  7093. vue.createElementVNode("input", {
  7094. "confirm-type": "search",
  7095. onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)),
  7096. value: $data.keyword,
  7097. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)),
  7098. onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)),
  7099. disabled: _ctx.disabled,
  7100. onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)),
  7101. focus: _ctx.focus,
  7102. maxlength: _ctx.maxlength,
  7103. "placeholder-class": "u-search__content__input--placeholder",
  7104. placeholder: _ctx.placeholder,
  7105. "placeholder-style": `color: ${_ctx.placeholderColor}`,
  7106. class: "u-search__content__input",
  7107. type: "text",
  7108. style: vue.normalizeStyle([{
  7109. textAlign: _ctx.inputAlign,
  7110. color: _ctx.color,
  7111. backgroundColor: _ctx.bgColor,
  7112. height: _ctx.$u.addUnit(_ctx.height)
  7113. }, _ctx.inputStyle])
  7114. }, null, 44, ["value", "disabled", "focus", "maxlength", "placeholder", "placeholder-style"]),
  7115. $data.keyword && _ctx.clearabled && $data.focused ? (vue.openBlock(), vue.createElementBlock("view", {
  7116. key: 1,
  7117. class: "u-search__content__icon u-search__content__close",
  7118. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  7119. }, [
  7120. vue.createVNode(_component_u_icon, {
  7121. name: "close",
  7122. size: "11",
  7123. color: "#ffffff",
  7124. customStyle: "line-height: 12px"
  7125. })
  7126. ])) : vue.createCommentVNode("v-if", true)
  7127. ],
  7128. 4
  7129. /* STYLE */
  7130. ),
  7131. vue.createElementVNode(
  7132. "text",
  7133. {
  7134. style: vue.normalizeStyle([_ctx.actionStyle]),
  7135. class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]),
  7136. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"]))
  7137. },
  7138. vue.toDisplayString(_ctx.actionText),
  7139. 7
  7140. /* TEXT, CLASS, STYLE */
  7141. )
  7142. ],
  7143. 4
  7144. /* STYLE */
  7145. );
  7146. }
  7147. const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-e082a34a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
  7148. const props$o = {
  7149. props: {
  7150. // 绑定的值
  7151. modelValue: {
  7152. type: [String, Number],
  7153. default: props$x.input.value
  7154. },
  7155. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  7156. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  7157. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  7158. // text-文本输入键盘
  7159. type: {
  7160. type: String,
  7161. default: props$x.input.type
  7162. },
  7163. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  7164. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  7165. fixed: {
  7166. type: Boolean,
  7167. default: props$x.input.fixed
  7168. },
  7169. // 是否禁用输入框
  7170. disabled: {
  7171. type: Boolean,
  7172. default: props$x.input.disabled
  7173. },
  7174. // 禁用状态时的背景色
  7175. disabledColor: {
  7176. type: String,
  7177. default: props$x.input.disabledColor
  7178. },
  7179. // 是否显示清除控件
  7180. clearable: {
  7181. type: Boolean,
  7182. default: props$x.input.clearable
  7183. },
  7184. // 是否密码类型
  7185. password: {
  7186. type: Boolean,
  7187. default: props$x.input.password
  7188. },
  7189. // 最大输入长度,设置为 -1 的时候不限制最大长度
  7190. maxlength: {
  7191. type: [String, Number],
  7192. default: props$x.input.maxlength
  7193. },
  7194. // 输入框为空时的占位符
  7195. placeholder: {
  7196. type: String,
  7197. default: props$x.input.placeholder
  7198. },
  7199. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  7200. placeholderClass: {
  7201. type: String,
  7202. default: props$x.input.placeholderClass
  7203. },
  7204. // 指定placeholder的样式
  7205. placeholderStyle: {
  7206. type: [String, Object],
  7207. default: props$x.input.placeholderStyle
  7208. },
  7209. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  7210. showWordLimit: {
  7211. type: Boolean,
  7212. default: props$x.input.showWordLimit
  7213. },
  7214. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  7215. // https://uniapp.dcloud.io/component/input
  7216. // https://uniapp.dcloud.io/component/textarea
  7217. confirmType: {
  7218. type: String,
  7219. default: props$x.input.confirmType
  7220. },
  7221. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  7222. confirmHold: {
  7223. type: Boolean,
  7224. default: props$x.input.confirmHold
  7225. },
  7226. // focus时,点击页面的时候不收起键盘,微信小程序有效
  7227. holdKeyboard: {
  7228. type: Boolean,
  7229. default: props$x.input.holdKeyboard
  7230. },
  7231. // 自动获取焦点
  7232. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  7233. focus: {
  7234. type: Boolean,
  7235. default: props$x.input.focus
  7236. },
  7237. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  7238. autoBlur: {
  7239. type: Boolean,
  7240. default: props$x.input.autoBlur
  7241. },
  7242. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  7243. disableDefaultPadding: {
  7244. type: Boolean,
  7245. default: props$x.input.disableDefaultPadding
  7246. },
  7247. // 指定focus时光标的位置
  7248. cursor: {
  7249. type: [String, Number],
  7250. default: props$x.input.cursor
  7251. },
  7252. // 输入框聚焦时底部与键盘的距离
  7253. cursorSpacing: {
  7254. type: [String, Number],
  7255. default: props$x.input.cursorSpacing
  7256. },
  7257. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  7258. selectionStart: {
  7259. type: [String, Number],
  7260. default: props$x.input.selectionStart
  7261. },
  7262. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  7263. selectionEnd: {
  7264. type: [String, Number],
  7265. default: props$x.input.selectionEnd
  7266. },
  7267. // 键盘弹起时,是否自动上推页面
  7268. adjustPosition: {
  7269. type: Boolean,
  7270. default: props$x.input.adjustPosition
  7271. },
  7272. // 输入框内容对齐方式,可选值为:left|center|right
  7273. inputAlign: {
  7274. type: String,
  7275. default: props$x.input.inputAlign
  7276. },
  7277. // 输入框字体的大小
  7278. fontSize: {
  7279. type: [String, Number],
  7280. default: props$x.input.fontSize
  7281. },
  7282. // 输入框字体颜色
  7283. color: {
  7284. type: String,
  7285. default: props$x.input.color
  7286. },
  7287. // 输入框前置图标
  7288. prefixIcon: {
  7289. type: String,
  7290. default: props$x.input.prefixIcon
  7291. },
  7292. // 前置图标样式,对象或字符串
  7293. prefixIconStyle: {
  7294. type: [String, Object],
  7295. default: props$x.input.prefixIconStyle
  7296. },
  7297. // 输入框后置图标
  7298. suffixIcon: {
  7299. type: String,
  7300. default: props$x.input.suffixIcon
  7301. },
  7302. // 后置图标样式,对象或字符串
  7303. suffixIconStyle: {
  7304. type: [String, Object],
  7305. default: props$x.input.suffixIconStyle
  7306. },
  7307. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  7308. border: {
  7309. type: String,
  7310. default: props$x.input.border
  7311. },
  7312. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  7313. readonly: {
  7314. type: Boolean,
  7315. default: props$x.input.readonly
  7316. },
  7317. // 输入框形状,circle-圆形,square-方形
  7318. shape: {
  7319. type: String,
  7320. default: props$x.input.shape
  7321. },
  7322. // 用于处理或者过滤输入框内容的方法
  7323. formatter: {
  7324. type: [Function, null],
  7325. default: props$x.input.formatter
  7326. },
  7327. // 是否忽略组件内对文本合成系统事件的处理
  7328. ignoreCompositionEvent: {
  7329. type: Boolean,
  7330. default: true
  7331. }
  7332. }
  7333. };
  7334. const _sfc_main$1a = {
  7335. name: "u-input",
  7336. mixins: [mpMixin, mixin, props$o],
  7337. data() {
  7338. return {
  7339. // 输入框的值
  7340. innerValue: "",
  7341. // 是否处于获得焦点状态
  7342. focused: false,
  7343. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  7344. firstChange: true,
  7345. // value绑定值的变化是由内部还是外部引起的
  7346. changeFromInner: false,
  7347. // 过滤处理方法
  7348. innerFormatter: (value2) => value2
  7349. };
  7350. },
  7351. watch: {
  7352. modelValue: {
  7353. immediate: true,
  7354. handler(newVal, oldVal) {
  7355. this.innerValue = newVal;
  7356. this.firstChange = false;
  7357. this.changeFromInner = false;
  7358. }
  7359. }
  7360. },
  7361. computed: {
  7362. // 是否显示清除控件
  7363. isShowClear() {
  7364. const { clearable, readonly, focused, innerValue } = this;
  7365. return !!clearable && !readonly && !!focused && innerValue !== "";
  7366. },
  7367. // 组件的类名
  7368. inputClass() {
  7369. let classes = [], { border, disabled, shape } = this;
  7370. border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
  7371. classes.push(`u-input--${shape}`);
  7372. border === "bottom" && (classes = classes.concat([
  7373. "u-border-bottom",
  7374. "u-input--no-radius"
  7375. ]));
  7376. return classes.join(" ");
  7377. },
  7378. // 组件的样式
  7379. wrapperStyle() {
  7380. const style = {};
  7381. if (this.disabled) {
  7382. style.backgroundColor = this.disabledColor;
  7383. }
  7384. if (this.border === "none") {
  7385. style.padding = "0";
  7386. } else {
  7387. style.paddingTop = "6px";
  7388. style.paddingBottom = "6px";
  7389. style.paddingLeft = "9px";
  7390. style.paddingRight = "9px";
  7391. }
  7392. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  7393. },
  7394. // 输入框的样式
  7395. inputStyle() {
  7396. const style = {
  7397. color: this.color,
  7398. fontSize: uni.$u.addUnit(this.fontSize),
  7399. textAlign: this.inputAlign
  7400. };
  7401. return style;
  7402. }
  7403. },
  7404. emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
  7405. methods: {
  7406. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  7407. setFormatter(e) {
  7408. this.innerFormatter = e;
  7409. },
  7410. // 当键盘输入时,触发input事件
  7411. onInput(e) {
  7412. let { value: value2 = "" } = e.detail || {};
  7413. const formatter = this.formatter || this.innerFormatter;
  7414. const formatValue = formatter(value2);
  7415. this.innerValue = value2;
  7416. this.$nextTick(() => {
  7417. this.innerValue = formatValue;
  7418. this.valueChange();
  7419. });
  7420. },
  7421. // 输入框失去焦点时触发
  7422. onBlur(event) {
  7423. this.$emit("blur", event.detail.value);
  7424. uni.$u.sleep(50).then(() => {
  7425. this.focused = false;
  7426. });
  7427. uni.$u.formValidate(this, "blur");
  7428. },
  7429. // 输入框聚焦时触发
  7430. onFocus(event) {
  7431. this.focused = true;
  7432. this.$emit("focus");
  7433. },
  7434. // 点击完成按钮时触发
  7435. onConfirm(event) {
  7436. this.$emit("confirm", this.innerValue);
  7437. },
  7438. // 键盘高度发生变化的时候触发此事件
  7439. // 兼容性:微信小程序2.7.0+、App 3.1.0+
  7440. onkeyboardheightchange() {
  7441. this.$emit("keyboardheightchange");
  7442. },
  7443. // 内容发生变化,进行处理
  7444. valueChange() {
  7445. const value2 = this.innerValue;
  7446. this.$nextTick(() => {
  7447. this.$emit("update:modelValue", value2);
  7448. this.changeFromInner = true;
  7449. this.$emit("change", value2);
  7450. uni.$u.formValidate(this, "change");
  7451. });
  7452. },
  7453. // 点击清除控件
  7454. onClear() {
  7455. this.innerValue = "";
  7456. this.$nextTick(() => {
  7457. this.valueChange();
  7458. this.$emit("clear");
  7459. });
  7460. },
  7461. /**
  7462. * 在安卓nvue上,事件无法冒泡
  7463. * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
  7464. * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
  7465. */
  7466. clickHandler() {
  7467. }
  7468. }
  7469. };
  7470. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  7471. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  7472. return vue.openBlock(), vue.createElementBlock(
  7473. "view",
  7474. {
  7475. class: vue.normalizeClass(["u-input", $options.inputClass]),
  7476. style: vue.normalizeStyle([$options.wrapperStyle])
  7477. },
  7478. [
  7479. vue.createElementVNode("view", { class: "u-input__content" }, [
  7480. _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", {
  7481. key: 0,
  7482. class: "u-input__content__prefix-icon"
  7483. }, [
  7484. vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
  7485. vue.createVNode(_component_u_icon, {
  7486. name: _ctx.prefixIcon,
  7487. size: "18",
  7488. customStyle: _ctx.prefixIconStyle
  7489. }, null, 8, ["name", "customStyle"])
  7490. ], true)
  7491. ])) : vue.createCommentVNode("v-if", true),
  7492. vue.createElementVNode("view", {
  7493. class: "u-input__content__field-wrapper",
  7494. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  7495. }, [
  7496. vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\r\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\r\n "),
  7497. vue.createElementVNode("input", {
  7498. class: "u-input__content__field-wrapper__field",
  7499. style: vue.normalizeStyle([$options.inputStyle]),
  7500. type: _ctx.type,
  7501. focus: _ctx.focus,
  7502. cursor: _ctx.cursor,
  7503. value: $data.innerValue,
  7504. "auto-blur": _ctx.autoBlur,
  7505. disabled: _ctx.disabled || _ctx.readonly,
  7506. maxlength: _ctx.maxlength,
  7507. placeholder: _ctx.placeholder,
  7508. "placeholder-style": _ctx.placeholderStyle,
  7509. "placeholder-class": _ctx.placeholderClass,
  7510. "confirm-type": _ctx.confirmType,
  7511. "confirm-hold": _ctx.confirmHold,
  7512. "hold-keyboard": _ctx.holdKeyboard,
  7513. "cursor-spacing": _ctx.cursorSpacing,
  7514. "adjust-position": _ctx.adjustPosition,
  7515. "selection-end": _ctx.selectionEnd,
  7516. "selection-start": _ctx.selectionStart,
  7517. password: _ctx.password || _ctx.type === "password" || void 0,
  7518. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  7519. onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
  7520. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  7521. onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
  7522. onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  7523. onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
  7524. }, 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"])
  7525. ]),
  7526. $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
  7527. key: 1,
  7528. class: "u-input__content__clear",
  7529. onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args))
  7530. }, [
  7531. vue.createVNode(_component_u_icon, {
  7532. name: "close",
  7533. size: "11",
  7534. color: "#ffffff",
  7535. customStyle: "line-height: 12px"
  7536. })
  7537. ])) : vue.createCommentVNode("v-if", true),
  7538. _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", {
  7539. key: 2,
  7540. class: "u-input__content__subfix-icon"
  7541. }, [
  7542. vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
  7543. vue.createVNode(_component_u_icon, {
  7544. name: _ctx.suffixIcon,
  7545. size: "18",
  7546. customStyle: _ctx.suffixIconStyle
  7547. }, null, 8, ["name", "customStyle"])
  7548. ], true)
  7549. ])) : vue.createCommentVNode("v-if", true)
  7550. ])
  7551. ],
  7552. 6
  7553. /* CLASS, STYLE */
  7554. );
  7555. }
  7556. const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-df79975b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
  7557. const props$n = {
  7558. props: {
  7559. // input的label提示语
  7560. label: {
  7561. type: String,
  7562. default: props$x.formItem.label
  7563. },
  7564. // 绑定的值
  7565. prop: {
  7566. type: String,
  7567. default: props$x.formItem.prop
  7568. },
  7569. // 是否显示表单域的下划线边框
  7570. borderBottom: {
  7571. type: [String, Boolean],
  7572. default: props$x.formItem.borderBottom
  7573. },
  7574. // label的宽度,单位px
  7575. labelWidth: {
  7576. type: [String, Number],
  7577. default: props$x.formItem.labelWidth
  7578. },
  7579. // 右侧图标
  7580. rightIcon: {
  7581. type: String,
  7582. default: props$x.formItem.rightIcon
  7583. },
  7584. // 左侧图标
  7585. leftIcon: {
  7586. type: String,
  7587. default: props$x.formItem.leftIcon
  7588. },
  7589. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  7590. required: {
  7591. type: Boolean,
  7592. default: props$x.formItem.required
  7593. },
  7594. leftIconStyle: {
  7595. type: [String, Object],
  7596. default: props$x.formItem.leftIconStyle
  7597. }
  7598. }
  7599. };
  7600. const _sfc_main$19 = {
  7601. name: "u-form-item",
  7602. mixins: [mpMixin, mixin, props$n],
  7603. data() {
  7604. return {
  7605. // 错误提示语
  7606. message: "",
  7607. parentData: {
  7608. // 提示文本的位置
  7609. labelPosition: "left",
  7610. // 提示文本对齐方式
  7611. labelAlign: "left",
  7612. // 提示文本的样式
  7613. labelStyle: {},
  7614. // 提示文本的宽度
  7615. labelWidth: 45,
  7616. // 错误提示方式
  7617. errorType: "message"
  7618. }
  7619. };
  7620. },
  7621. // 组件创建完成时,将当前实例保存到u-form中
  7622. computed: {
  7623. propsLine() {
  7624. return uni.$u.props.line;
  7625. }
  7626. },
  7627. mounted() {
  7628. this.init();
  7629. },
  7630. methods: {
  7631. init() {
  7632. this.updateParentData();
  7633. if (!this.parent) {
  7634. uni.$u.error("u-form-item需要结合u-form组件使用");
  7635. }
  7636. },
  7637. // 获取父组件的参数
  7638. updateParentData() {
  7639. this.getParentData("u-form");
  7640. },
  7641. // 移除u-form-item的校验结果
  7642. clearValidate() {
  7643. this.message = null;
  7644. },
  7645. // 清空当前的组件的校验结果,并重置为初始值
  7646. resetField() {
  7647. const value2 = uni.$u.getProperty(this.parent.originalModel, this.prop);
  7648. uni.$u.setProperty(this.parent.model, this.prop, value2);
  7649. this.message = null;
  7650. },
  7651. // 点击组件
  7652. clickHandler() {
  7653. this.$emit("click");
  7654. }
  7655. }
  7656. };
  7657. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  7658. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  7659. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
  7660. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form-item" }, [
  7661. vue.createElementVNode(
  7662. "view",
  7663. {
  7664. class: "u-form-item__body",
  7665. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  7666. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), {
  7667. flexDirection: $data.parentData.labelPosition === "left" ? "row" : "column"
  7668. }])
  7669. },
  7670. [
  7671. vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '),
  7672. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  7673. vue.createCommentVNode(" {{required}} "),
  7674. _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  7675. "view",
  7676. {
  7677. key: 0,
  7678. class: "u-form-item__body__left",
  7679. style: vue.normalizeStyle({
  7680. width: _ctx.$u.addUnit(_ctx.labelWidth || $data.parentData.labelWidth),
  7681. marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px"
  7682. })
  7683. },
  7684. [
  7685. vue.createCommentVNode(" 为了块对齐 "),
  7686. vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [
  7687. vue.createCommentVNode(" nvue不支持伪元素before "),
  7688. _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", {
  7689. key: 0,
  7690. class: "u-form-item__body__left__content__required"
  7691. }, "*")) : vue.createCommentVNode("v-if", true),
  7692. _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  7693. key: 1,
  7694. class: "u-form-item__body__left__content__icon"
  7695. }, [
  7696. vue.createVNode(_component_u_icon, {
  7697. name: _ctx.leftIcon,
  7698. "custom-style": _ctx.leftIconStyle
  7699. }, null, 8, ["name", "custom-style"])
  7700. ])) : vue.createCommentVNode("v-if", true),
  7701. vue.createElementVNode(
  7702. "text",
  7703. {
  7704. class: "u-form-item__body__left__content__label",
  7705. style: vue.normalizeStyle([$data.parentData.labelStyle, {
  7706. justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end"
  7707. }])
  7708. },
  7709. vue.toDisplayString(_ctx.label),
  7710. 5
  7711. /* TEXT, STYLE */
  7712. )
  7713. ])
  7714. ],
  7715. 4
  7716. /* STYLE */
  7717. )) : vue.createCommentVNode("v-if", true)
  7718. ], true),
  7719. vue.createElementVNode("view", { class: "u-form-item__body__right" }, [
  7720. vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [
  7721. vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [
  7722. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  7723. ]),
  7724. _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", {
  7725. key: 0,
  7726. class: "item__body__right__content__icon"
  7727. }, [
  7728. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  7729. ])) : vue.createCommentVNode("v-if", true)
  7730. ])
  7731. ])
  7732. ],
  7733. 4
  7734. /* STYLE */
  7735. ),
  7736. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  7737. !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock(
  7738. "text",
  7739. {
  7740. key: 0,
  7741. class: "u-form-item__body__right__message",
  7742. style: vue.normalizeStyle({
  7743. marginLeft: _ctx.$u.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth)
  7744. })
  7745. },
  7746. vue.toDisplayString($data.message),
  7747. 5
  7748. /* TEXT, STYLE */
  7749. )) : vue.createCommentVNode("v-if", true)
  7750. ], true),
  7751. _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  7752. key: 0,
  7753. color: $data.message && $data.parentData.errorType === "border-bottom" ? _ctx.$u.color.error : $options.propsLine.color,
  7754. customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}`
  7755. }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true)
  7756. ]);
  7757. }
  7758. const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-42bac3de"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
  7759. const props$m = {
  7760. props: {
  7761. // 是否显示组件
  7762. show: {
  7763. type: Boolean,
  7764. default: props$x.loadingIcon.show
  7765. },
  7766. // 颜色
  7767. color: {
  7768. type: String,
  7769. default: props$x.loadingIcon.color
  7770. },
  7771. // 提示文字颜色
  7772. textColor: {
  7773. type: String,
  7774. default: props$x.loadingIcon.textColor
  7775. },
  7776. // 文字和图标是否垂直排列
  7777. vertical: {
  7778. type: Boolean,
  7779. default: props$x.loadingIcon.vertical
  7780. },
  7781. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  7782. mode: {
  7783. type: String,
  7784. default: props$x.loadingIcon.mode
  7785. },
  7786. // 图标大小,单位默认px
  7787. size: {
  7788. type: [String, Number],
  7789. default: props$x.loadingIcon.size
  7790. },
  7791. // 文字大小
  7792. textSize: {
  7793. type: [String, Number],
  7794. default: props$x.loadingIcon.textSize
  7795. },
  7796. // 文字内容
  7797. text: {
  7798. type: [String, Number],
  7799. default: props$x.loadingIcon.text
  7800. },
  7801. // 动画模式
  7802. timingFunction: {
  7803. type: String,
  7804. default: props$x.loadingIcon.timingFunction
  7805. },
  7806. // 动画执行周期时间
  7807. duration: {
  7808. type: [String, Number],
  7809. default: props$x.loadingIcon.duration
  7810. },
  7811. // mode=circle时的暗边颜色
  7812. inactiveColor: {
  7813. type: String,
  7814. default: props$x.loadingIcon.inactiveColor
  7815. }
  7816. }
  7817. };
  7818. const _sfc_main$18 = {
  7819. name: "u-loading-icon",
  7820. mixins: [mpMixin, mixin, props$m],
  7821. data() {
  7822. return {
  7823. // Array.form可以通过一个伪数组对象创建指定长度的数组
  7824. // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
  7825. array12: Array.from({
  7826. length: 12
  7827. }),
  7828. // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
  7829. // 在iOS nvue上,则会一开始默认执行两个周期的动画
  7830. aniAngel: 360,
  7831. // 动画旋转角度
  7832. webviewHide: false,
  7833. // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
  7834. loading: false
  7835. // 是否运行中,针对nvue使用
  7836. };
  7837. },
  7838. computed: {
  7839. // 当为circle类型时,给其另外三边设置一个更轻一些的颜色
  7840. // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
  7841. // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
  7842. otherBorderColor() {
  7843. const lightColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[80];
  7844. if (this.mode === "circle") {
  7845. return this.inactiveColor ? this.inactiveColor : lightColor;
  7846. } else {
  7847. return "transparent";
  7848. }
  7849. }
  7850. },
  7851. watch: {
  7852. show(n) {
  7853. }
  7854. },
  7855. mounted() {
  7856. this.init();
  7857. },
  7858. methods: {
  7859. init() {
  7860. setTimeout(() => {
  7861. this.show && this.addEventListenerToWebview();
  7862. }, 20);
  7863. },
  7864. // 监听webview的显示与隐藏
  7865. addEventListenerToWebview() {
  7866. const pages2 = getCurrentPages();
  7867. const page2 = pages2[pages2.length - 1];
  7868. const currentWebview = page2.$getAppWebview();
  7869. currentWebview.addEventListener("hide", () => {
  7870. this.webviewHide = true;
  7871. });
  7872. currentWebview.addEventListener("show", () => {
  7873. this.webviewHide = false;
  7874. });
  7875. }
  7876. }
  7877. };
  7878. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  7879. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  7880. "view",
  7881. {
  7882. key: 0,
  7883. class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]),
  7884. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  7885. },
  7886. [
  7887. !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
  7888. "view",
  7889. {
  7890. key: 0,
  7891. class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]),
  7892. ref: "ani",
  7893. style: vue.normalizeStyle({
  7894. color: _ctx.color,
  7895. width: _ctx.$u.addUnit(_ctx.size),
  7896. height: _ctx.$u.addUnit(_ctx.size),
  7897. borderTopColor: _ctx.color,
  7898. borderBottomColor: $options.otherBorderColor,
  7899. borderLeftColor: $options.otherBorderColor,
  7900. borderRightColor: $options.otherBorderColor,
  7901. "animation-duration": `${_ctx.duration}ms`,
  7902. "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
  7903. })
  7904. },
  7905. [
  7906. _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
  7907. vue.Fragment,
  7908. { key: 0 },
  7909. vue.renderList($data.array12, (item, index2) => {
  7910. return vue.openBlock(), vue.createElementBlock("view", {
  7911. key: index2,
  7912. class: "u-loading-icon__dot"
  7913. });
  7914. }),
  7915. 128
  7916. /* KEYED_FRAGMENT */
  7917. )) : vue.createCommentVNode("v-if", true)
  7918. ],
  7919. 6
  7920. /* CLASS, STYLE */
  7921. )) : vue.createCommentVNode("v-if", true),
  7922. _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  7923. "text",
  7924. {
  7925. key: 1,
  7926. class: "u-loading-icon__text",
  7927. style: vue.normalizeStyle({
  7928. fontSize: _ctx.$u.addUnit(_ctx.textSize),
  7929. color: _ctx.textColor
  7930. })
  7931. },
  7932. vue.toDisplayString(_ctx.text),
  7933. 5
  7934. /* TEXT, STYLE */
  7935. )) : vue.createCommentVNode("v-if", true)
  7936. ],
  7937. 6
  7938. /* CLASS, STYLE */
  7939. )) : vue.createCommentVNode("v-if", true);
  7940. }
  7941. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-2af81691"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
  7942. function pickExclude(obj, keys) {
  7943. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  7944. return {};
  7945. }
  7946. return Object.keys(obj).reduce((prev, key) => {
  7947. if (!keys.includes(key)) {
  7948. prev[key] = obj[key];
  7949. }
  7950. return prev;
  7951. }, {});
  7952. }
  7953. function formatImage(res) {
  7954. return res.tempFiles.map((item) => ({
  7955. ...pickExclude(item, ["path"]),
  7956. type: "image",
  7957. url: item.path,
  7958. thumb: item.path,
  7959. size: item.size
  7960. }));
  7961. }
  7962. function formatVideo(res) {
  7963. return [
  7964. {
  7965. ...pickExclude(res, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  7966. type: "video",
  7967. url: res.tempFilePath,
  7968. thumb: res.thumbTempFilePath,
  7969. size: res.size
  7970. }
  7971. ];
  7972. }
  7973. function chooseFile({
  7974. accept,
  7975. multiple,
  7976. capture,
  7977. compressed,
  7978. maxDuration,
  7979. sizeType,
  7980. camera,
  7981. maxCount
  7982. }) {
  7983. return new Promise((resolve, reject) => {
  7984. switch (accept) {
  7985. case "image":
  7986. uni.chooseImage({
  7987. count: multiple ? Math.min(maxCount, 9) : 1,
  7988. sourceType: capture,
  7989. sizeType,
  7990. success: (res) => resolve(formatImage(res)),
  7991. fail: reject
  7992. });
  7993. break;
  7994. case "video":
  7995. uni.chooseVideo({
  7996. sourceType: capture,
  7997. compressed,
  7998. maxDuration,
  7999. camera,
  8000. success: (res) => resolve(formatVideo(res)),
  8001. fail: reject
  8002. });
  8003. break;
  8004. }
  8005. });
  8006. }
  8007. const mixinUp = {
  8008. watch: {
  8009. // 监听accept的变化,判断是否符合个平台要求
  8010. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  8011. accept: {
  8012. immediate: true,
  8013. handler(val) {
  8014. if (val === "all" || val === "media") {
  8015. uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
  8016. }
  8017. if (val === "file") {
  8018. uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  8019. }
  8020. }
  8021. }
  8022. }
  8023. };
  8024. const props$l = {
  8025. props: {
  8026. // 接受的文件类型, 可选值为all media image file video
  8027. accept: {
  8028. type: String,
  8029. default: props$x.upload.accept
  8030. },
  8031. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  8032. capture: {
  8033. type: [String, Array],
  8034. default: props$x.upload.capture
  8035. },
  8036. // 当accept为video时生效,是否压缩视频,默认为true
  8037. compressed: {
  8038. type: Boolean,
  8039. default: props$x.upload.compressed
  8040. },
  8041. // 当accept为video时生效,可选值为back或front
  8042. camera: {
  8043. type: String,
  8044. default: props$x.upload.camera
  8045. },
  8046. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  8047. maxDuration: {
  8048. type: Number,
  8049. default: props$x.upload.maxDuration
  8050. },
  8051. // 上传区域的图标,只能内置图标
  8052. uploadIcon: {
  8053. type: String,
  8054. default: props$x.upload.uploadIcon
  8055. },
  8056. // 上传区域的图标的颜色,默认
  8057. uploadIconColor: {
  8058. type: String,
  8059. default: props$x.upload.uploadIconColor
  8060. },
  8061. // 是否开启文件读取前事件
  8062. useBeforeRead: {
  8063. type: Boolean,
  8064. default: props$x.upload.useBeforeRead
  8065. },
  8066. // 读取后的处理函数
  8067. afterRead: {
  8068. type: Function,
  8069. default: null
  8070. },
  8071. // 读取前的处理函数
  8072. beforeRead: {
  8073. type: Function,
  8074. default: null
  8075. },
  8076. // 是否显示组件自带的图片预览功能
  8077. previewFullImage: {
  8078. type: Boolean,
  8079. default: props$x.upload.previewFullImage
  8080. },
  8081. // 最大上传数量
  8082. maxCount: {
  8083. type: [String, Number],
  8084. default: props$x.upload.maxCount
  8085. },
  8086. // 是否启用
  8087. disabled: {
  8088. type: Boolean,
  8089. default: props$x.upload.disabled
  8090. },
  8091. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  8092. imageMode: {
  8093. type: String,
  8094. default: props$x.upload.imageMode
  8095. },
  8096. // 标识符,可以在回调函数的第二项参数中获取
  8097. name: {
  8098. type: String,
  8099. default: props$x.upload.name
  8100. },
  8101. // 所选的图片的尺寸, 可选值为original compressed
  8102. sizeType: {
  8103. type: Array,
  8104. default: props$x.upload.sizeType
  8105. },
  8106. // 是否开启图片多选,部分安卓机型不支持
  8107. multiple: {
  8108. type: Boolean,
  8109. default: props$x.upload.multiple
  8110. },
  8111. // 是否展示删除按钮
  8112. deletable: {
  8113. type: Boolean,
  8114. default: props$x.upload.deletable
  8115. },
  8116. // 文件大小限制,单位为byte
  8117. maxSize: {
  8118. type: [String, Number],
  8119. default: props$x.upload.maxSize
  8120. },
  8121. // 显示已上传的文件列表
  8122. fileList: {
  8123. type: Array,
  8124. default: props$x.upload.fileList
  8125. },
  8126. // 上传区域的提示文字
  8127. uploadText: {
  8128. type: String,
  8129. default: props$x.upload.uploadText
  8130. },
  8131. // 内部预览图片区域和选择图片按钮的区域宽度
  8132. width: {
  8133. type: [String, Number],
  8134. default: props$x.upload.width
  8135. },
  8136. // 内部预览图片区域和选择图片按钮的区域高度
  8137. height: {
  8138. type: [String, Number],
  8139. default: props$x.upload.height
  8140. },
  8141. // 是否在上传完成后展示预览图
  8142. previewImage: {
  8143. type: Boolean,
  8144. default: props$x.upload.previewImage
  8145. }
  8146. }
  8147. };
  8148. const _sfc_main$17 = {
  8149. name: "u-upload",
  8150. mixins: [mpMixin, mixin, mixinUp, props$l],
  8151. data() {
  8152. return {
  8153. lists: [],
  8154. isInCount: true
  8155. };
  8156. },
  8157. watch: {
  8158. // 监听文件列表的变化,重新整理内部数据
  8159. fileList: {
  8160. immediate: true,
  8161. handler() {
  8162. this.formatFileList();
  8163. },
  8164. immediate: true,
  8165. deep: true
  8166. }
  8167. },
  8168. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
  8169. methods: {
  8170. formatFileList() {
  8171. const {
  8172. fileList = [],
  8173. maxCount
  8174. } = this;
  8175. const lists = fileList.map(
  8176. (item) => Object.assign(Object.assign({}, item), {
  8177. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  8178. isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
  8179. isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
  8180. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  8181. })
  8182. );
  8183. this.lists = lists;
  8184. this.isInCount = lists.length < maxCount;
  8185. },
  8186. chooseFile() {
  8187. const {
  8188. maxCount,
  8189. multiple,
  8190. lists,
  8191. disabled
  8192. } = this;
  8193. if (disabled)
  8194. return;
  8195. let capture;
  8196. try {
  8197. capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
  8198. } catch (e) {
  8199. capture = [];
  8200. }
  8201. chooseFile(
  8202. Object.assign({
  8203. accept: this.accept,
  8204. multiple: this.multiple,
  8205. capture,
  8206. compressed: this.compressed,
  8207. maxDuration: this.maxDuration,
  8208. sizeType: this.sizeType,
  8209. camera: this.camera
  8210. }, {
  8211. maxCount: maxCount - lists.length
  8212. })
  8213. ).then((res) => {
  8214. this.onBeforeRead(multiple ? res : res[0]);
  8215. }).catch((error2) => {
  8216. this.$emit("error", error2);
  8217. });
  8218. },
  8219. // 文件读取之前
  8220. onBeforeRead(file) {
  8221. const {
  8222. beforeRead,
  8223. useBeforeRead
  8224. } = this;
  8225. let res = true;
  8226. if (uni.$u.test.func(beforeRead)) {
  8227. res = beforeRead(file, this.getDetail());
  8228. }
  8229. if (useBeforeRead) {
  8230. res = new Promise((resolve, reject) => {
  8231. this.$emit(
  8232. "beforeRead",
  8233. Object.assign(Object.assign({
  8234. file
  8235. }, this.getDetail()), {
  8236. callback: (ok) => {
  8237. ok ? resolve() : reject();
  8238. }
  8239. })
  8240. );
  8241. });
  8242. }
  8243. if (!res) {
  8244. return;
  8245. }
  8246. if (uni.$u.test.promise(res)) {
  8247. res.then((data) => this.onAfterRead(data || file));
  8248. } else {
  8249. this.onAfterRead(file);
  8250. }
  8251. },
  8252. getDetail(index2) {
  8253. return {
  8254. name: this.name,
  8255. index: index2 == null ? this.fileList.length : index2
  8256. };
  8257. },
  8258. onAfterRead(file) {
  8259. const {
  8260. maxSize,
  8261. afterRead
  8262. } = this;
  8263. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  8264. if (oversize) {
  8265. this.$emit("oversize", Object.assign({
  8266. file
  8267. }, this.getDetail()));
  8268. return;
  8269. }
  8270. if (typeof afterRead === "function") {
  8271. afterRead(file, this.getDetail());
  8272. }
  8273. this.$emit("afterRead", Object.assign({
  8274. file
  8275. }, this.getDetail()));
  8276. },
  8277. deleteItem(index2) {
  8278. this.$emit(
  8279. "delete",
  8280. Object.assign(Object.assign({}, this.getDetail(index2)), {
  8281. file: this.fileList[index2]
  8282. })
  8283. );
  8284. },
  8285. // 预览图片
  8286. onPreviewImage(item) {
  8287. if (!item.isImage || !this.previewFullImage)
  8288. return;
  8289. uni.previewImage({
  8290. // 先filter找出为图片的item,再返回filter结果中的图片url
  8291. urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
  8292. current: item.url || item.thumb,
  8293. fail() {
  8294. uni.$u.toast("预览图片失败");
  8295. }
  8296. });
  8297. },
  8298. onPreviewVideo(event) {
  8299. if (!this.data.previewFullImage)
  8300. return;
  8301. const {
  8302. index: index2
  8303. } = event.currentTarget.dataset;
  8304. const {
  8305. lists
  8306. } = this.data;
  8307. wx.previewMedia({
  8308. sources: lists.filter((item) => isVideoFile(item)).map(
  8309. (item) => Object.assign(Object.assign({}, item), {
  8310. type: "video"
  8311. })
  8312. ),
  8313. current: index2,
  8314. fail() {
  8315. uni.$u.toast("预览视频失败");
  8316. }
  8317. });
  8318. },
  8319. onClickPreview(event) {
  8320. const {
  8321. index: index2
  8322. } = event.currentTarget.dataset;
  8323. const item = this.data.lists[index2];
  8324. this.$emit(
  8325. "clickPreview",
  8326. Object.assign(Object.assign({}, item), this.getDetail(index2))
  8327. );
  8328. }
  8329. }
  8330. };
  8331. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  8332. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  8333. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
  8334. return vue.openBlock(), vue.createElementBlock(
  8335. "view",
  8336. {
  8337. class: "u-upload",
  8338. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  8339. },
  8340. [
  8341. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  8342. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  8343. vue.Fragment,
  8344. { key: 0 },
  8345. vue.renderList($data.lists, (item, index2) => {
  8346. return vue.openBlock(), vue.createElementBlock("view", {
  8347. class: "u-upload__wrap__preview",
  8348. key: index2
  8349. }, [
  8350. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  8351. key: 0,
  8352. src: item.thumb || item.url,
  8353. mode: _ctx.imageMode,
  8354. class: "u-upload__wrap__preview__image",
  8355. onClick: ($event) => $options.onPreviewImage(item),
  8356. style: vue.normalizeStyle([{
  8357. width: _ctx.$u.addUnit(_ctx.width),
  8358. height: _ctx.$u.addUnit(_ctx.height)
  8359. }])
  8360. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
  8361. key: 1,
  8362. class: "u-upload__wrap__preview__other"
  8363. }, [
  8364. vue.createVNode(_component_u_icon, {
  8365. color: "#80CBF9",
  8366. size: "26",
  8367. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  8368. }, null, 8, ["name"]),
  8369. vue.createElementVNode(
  8370. "text",
  8371. { class: "u-upload__wrap__preview__other__text" },
  8372. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
  8373. 1
  8374. /* TEXT */
  8375. )
  8376. ])),
  8377. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  8378. key: 2,
  8379. class: "u-upload__status"
  8380. }, [
  8381. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  8382. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  8383. key: 0,
  8384. name: "close-circle",
  8385. color: "#ffffff",
  8386. size: "25"
  8387. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  8388. key: 1,
  8389. size: "22",
  8390. mode: "circle",
  8391. color: "#ffffff"
  8392. }))
  8393. ]),
  8394. item.message ? (vue.openBlock(), vue.createElementBlock(
  8395. "text",
  8396. {
  8397. key: 0,
  8398. class: "u-upload__status__message"
  8399. },
  8400. vue.toDisplayString(item.message),
  8401. 1
  8402. /* TEXT */
  8403. )) : vue.createCommentVNode("v-if", true)
  8404. ])) : vue.createCommentVNode("v-if", true),
  8405. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  8406. key: 3,
  8407. class: "u-upload__deletable",
  8408. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  8409. }, [
  8410. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  8411. vue.createVNode(_component_u_icon, {
  8412. name: "close",
  8413. color: "#ffffff",
  8414. size: "10"
  8415. })
  8416. ])
  8417. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  8418. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  8419. key: 4,
  8420. class: "u-upload__success"
  8421. }, [
  8422. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  8423. vue.createVNode(_component_u_icon, {
  8424. name: "checkmark",
  8425. color: "#ffffff",
  8426. size: "12"
  8427. })
  8428. ])
  8429. ])) : vue.createCommentVNode("v-if", true)
  8430. ]);
  8431. }),
  8432. 128
  8433. /* KEYED_FRAGMENT */
  8434. )) : vue.createCommentVNode("v-if", true),
  8435. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  8436. vue.Fragment,
  8437. { key: 1 },
  8438. [
  8439. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  8440. key: 0,
  8441. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  8442. }, [
  8443. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  8444. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8445. key: 1,
  8446. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  8447. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  8448. "hover-stay-time": "150",
  8449. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  8450. style: vue.normalizeStyle([{
  8451. width: _ctx.$u.addUnit(_ctx.width),
  8452. height: _ctx.$u.addUnit(_ctx.height)
  8453. }])
  8454. }, [
  8455. vue.createVNode(_component_u_icon, {
  8456. name: _ctx.uploadIcon,
  8457. size: "26",
  8458. color: _ctx.uploadIconColor
  8459. }, null, 8, ["name", "color"]),
  8460. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  8461. "text",
  8462. {
  8463. key: 0,
  8464. class: "u-upload__button__text"
  8465. },
  8466. vue.toDisplayString(_ctx.uploadText),
  8467. 1
  8468. /* TEXT */
  8469. )) : vue.createCommentVNode("v-if", true)
  8470. ], 14, ["hover-class"]))
  8471. ],
  8472. 64
  8473. /* STABLE_FRAGMENT */
  8474. )) : vue.createCommentVNode("v-if", true)
  8475. ])
  8476. ],
  8477. 4
  8478. /* STYLE */
  8479. );
  8480. }
  8481. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  8482. const props$k = {
  8483. props: {
  8484. // 当前form的需要验证字段的集合
  8485. model: {
  8486. type: Object,
  8487. default: props$x.form.model
  8488. },
  8489. // 验证规则
  8490. rules: {
  8491. type: [Object, Function, Array],
  8492. default: props$x.form.rules
  8493. },
  8494. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  8495. // border-bottom-下边框呈现红色,none-无提示
  8496. errorType: {
  8497. type: String,
  8498. default: props$x.form.errorType
  8499. },
  8500. // 是否显示表单域的下划线边框
  8501. borderBottom: {
  8502. type: Boolean,
  8503. default: props$x.form.borderBottom
  8504. },
  8505. // label的位置,left-左边,top-上边
  8506. labelPosition: {
  8507. type: String,
  8508. default: props$x.form.labelPosition
  8509. },
  8510. // label的宽度,单位px
  8511. labelWidth: {
  8512. type: [String, Number],
  8513. default: props$x.form.labelWidth
  8514. },
  8515. // lable字体的对齐方式
  8516. labelAlign: {
  8517. type: String,
  8518. default: props$x.form.labelAlign
  8519. },
  8520. // lable的样式,对象形式
  8521. labelStyle: {
  8522. type: Object,
  8523. default: props$x.form.labelStyle
  8524. }
  8525. }
  8526. };
  8527. var define_process_env_default = {};
  8528. const formatRegExp = /%[sdj%]/g;
  8529. let warning = function warning2() {
  8530. };
  8531. if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
  8532. warning = function warning3(type2, errors) {
  8533. if (typeof console !== "undefined" && console.warn) {
  8534. if (errors.every((e) => typeof e === "string")) {
  8535. formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
  8536. }
  8537. }
  8538. };
  8539. }
  8540. function convertFieldsError(errors) {
  8541. if (!errors || !errors.length)
  8542. return null;
  8543. const fields = {};
  8544. errors.forEach((error2) => {
  8545. const { field } = error2;
  8546. fields[field] = fields[field] || [];
  8547. fields[field].push(error2);
  8548. });
  8549. return fields;
  8550. }
  8551. function format() {
  8552. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  8553. args[_key] = arguments[_key];
  8554. }
  8555. let i = 1;
  8556. const f = args[0];
  8557. const len = args.length;
  8558. if (typeof f === "function") {
  8559. return f.apply(null, args.slice(1));
  8560. }
  8561. if (typeof f === "string") {
  8562. let str = String(f).replace(formatRegExp, (x) => {
  8563. if (x === "%%") {
  8564. return "%";
  8565. }
  8566. if (i >= len) {
  8567. return x;
  8568. }
  8569. switch (x) {
  8570. case "%s":
  8571. return String(args[i++]);
  8572. case "%d":
  8573. return Number(args[i++]);
  8574. case "%j":
  8575. try {
  8576. return JSON.stringify(args[i++]);
  8577. } catch (_) {
  8578. return "[Circular]";
  8579. }
  8580. break;
  8581. default:
  8582. return x;
  8583. }
  8584. });
  8585. for (let arg = args[i]; i < len; arg = args[++i]) {
  8586. str += ` ${arg}`;
  8587. }
  8588. return str;
  8589. }
  8590. return f;
  8591. }
  8592. function isNativeStringType(type2) {
  8593. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  8594. }
  8595. function isEmptyValue(value2, type2) {
  8596. if (value2 === void 0 || value2 === null) {
  8597. return true;
  8598. }
  8599. if (type2 === "array" && Array.isArray(value2) && !value2.length) {
  8600. return true;
  8601. }
  8602. if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
  8603. return true;
  8604. }
  8605. return false;
  8606. }
  8607. function asyncParallelArray(arr, func2, callback) {
  8608. const results = [];
  8609. let total = 0;
  8610. const arrLength = arr.length;
  8611. function count(errors) {
  8612. results.push.apply(results, errors);
  8613. total++;
  8614. if (total === arrLength) {
  8615. callback(results);
  8616. }
  8617. }
  8618. arr.forEach((a) => {
  8619. func2(a, count);
  8620. });
  8621. }
  8622. function asyncSerialArray(arr, func2, callback) {
  8623. let index2 = 0;
  8624. const arrLength = arr.length;
  8625. function next(errors) {
  8626. if (errors && errors.length) {
  8627. callback(errors);
  8628. return;
  8629. }
  8630. const original = index2;
  8631. index2 += 1;
  8632. if (original < arrLength) {
  8633. func2(arr[original], next);
  8634. } else {
  8635. callback([]);
  8636. }
  8637. }
  8638. next([]);
  8639. }
  8640. function flattenObjArr(objArr) {
  8641. const ret = [];
  8642. Object.keys(objArr).forEach((k) => {
  8643. ret.push.apply(ret, objArr[k]);
  8644. });
  8645. return ret;
  8646. }
  8647. function asyncMap(objArr, option, func2, callback) {
  8648. if (option.first) {
  8649. const _pending = new Promise((resolve, reject) => {
  8650. const next = function next2(errors) {
  8651. callback(errors);
  8652. return errors.length ? reject({
  8653. errors,
  8654. fields: convertFieldsError(errors)
  8655. }) : resolve();
  8656. };
  8657. const flattenArr = flattenObjArr(objArr);
  8658. asyncSerialArray(flattenArr, func2, next);
  8659. });
  8660. _pending.catch((e) => e);
  8661. return _pending;
  8662. }
  8663. let firstFields = option.firstFields || [];
  8664. if (firstFields === true) {
  8665. firstFields = Object.keys(objArr);
  8666. }
  8667. const objArrKeys = Object.keys(objArr);
  8668. const objArrLength = objArrKeys.length;
  8669. let total = 0;
  8670. const results = [];
  8671. const pending = new Promise((resolve, reject) => {
  8672. const next = function next2(errors) {
  8673. results.push.apply(results, errors);
  8674. total++;
  8675. if (total === objArrLength) {
  8676. callback(results);
  8677. return results.length ? reject({
  8678. errors: results,
  8679. fields: convertFieldsError(results)
  8680. }) : resolve();
  8681. }
  8682. };
  8683. if (!objArrKeys.length) {
  8684. callback(results);
  8685. resolve();
  8686. }
  8687. objArrKeys.forEach((key) => {
  8688. const arr = objArr[key];
  8689. if (firstFields.indexOf(key) !== -1) {
  8690. asyncSerialArray(arr, func2, next);
  8691. } else {
  8692. asyncParallelArray(arr, func2, next);
  8693. }
  8694. });
  8695. });
  8696. pending.catch((e) => e);
  8697. return pending;
  8698. }
  8699. function complementError(rule) {
  8700. return function(oe) {
  8701. if (oe && oe.message) {
  8702. oe.field = oe.field || rule.fullField;
  8703. return oe;
  8704. }
  8705. return {
  8706. message: typeof oe === "function" ? oe() : oe,
  8707. field: oe.field || rule.fullField
  8708. };
  8709. };
  8710. }
  8711. function deepMerge$2(target, source) {
  8712. if (source) {
  8713. for (const s in source) {
  8714. if (source.hasOwnProperty(s)) {
  8715. const value2 = source[s];
  8716. if (typeof value2 === "object" && typeof target[s] === "object") {
  8717. target[s] = { ...target[s], ...value2 };
  8718. } else {
  8719. target[s] = value2;
  8720. }
  8721. }
  8722. }
  8723. }
  8724. return target;
  8725. }
  8726. function required(rule, value2, source, errors, options, type2) {
  8727. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
  8728. errors.push(format(options.messages.required, rule.fullField));
  8729. }
  8730. }
  8731. function whitespace(rule, value2, source, errors, options) {
  8732. if (/^\s+$/.test(value2) || value2 === "") {
  8733. errors.push(format(options.messages.whitespace, rule.fullField));
  8734. }
  8735. }
  8736. const pattern = {
  8737. // http://emailregex.com/
  8738. 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,}))$/,
  8739. url: new RegExp(
  8740. "^(?!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]*)?$",
  8741. "i"
  8742. ),
  8743. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  8744. };
  8745. var types = {
  8746. integer: function integer(value2) {
  8747. return /^(-)?\d+$/.test(value2);
  8748. },
  8749. float: function float(value2) {
  8750. return /^(-)?\d+(\.\d+)?$/.test(value2);
  8751. },
  8752. array: function array3(value2) {
  8753. return Array.isArray(value2);
  8754. },
  8755. regexp: function regexp(value2) {
  8756. if (value2 instanceof RegExp) {
  8757. return true;
  8758. }
  8759. try {
  8760. return !!new RegExp(value2);
  8761. } catch (e) {
  8762. return false;
  8763. }
  8764. },
  8765. date: function date3(value2) {
  8766. return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
  8767. },
  8768. number: function number3(value2) {
  8769. if (isNaN(value2)) {
  8770. return false;
  8771. }
  8772. return typeof +value2 === "number";
  8773. },
  8774. object: function object3(value2) {
  8775. return typeof value2 === "object" && !types.array(value2);
  8776. },
  8777. method: function method(value2) {
  8778. return typeof value2 === "function";
  8779. },
  8780. email: function email2(value2) {
  8781. return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
  8782. },
  8783. url: function url2(value2) {
  8784. return typeof value2 === "string" && !!value2.match(pattern.url);
  8785. },
  8786. hex: function hex(value2) {
  8787. return typeof value2 === "string" && !!value2.match(pattern.hex);
  8788. }
  8789. };
  8790. function type(rule, value2, source, errors, options) {
  8791. if (rule.required && value2 === void 0) {
  8792. required(rule, value2, source, errors, options);
  8793. return;
  8794. }
  8795. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  8796. const ruleType = rule.type;
  8797. if (custom.indexOf(ruleType) > -1) {
  8798. if (!types[ruleType](value2)) {
  8799. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  8800. }
  8801. } else if (ruleType && typeof value2 !== rule.type) {
  8802. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  8803. }
  8804. }
  8805. function range$2(rule, value2, source, errors, options) {
  8806. const len = typeof rule.len === "number";
  8807. const min = typeof rule.min === "number";
  8808. const max = typeof rule.max === "number";
  8809. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  8810. let val = value2;
  8811. let key = null;
  8812. const num = typeof value2 === "number";
  8813. const str = typeof value2 === "string";
  8814. const arr = Array.isArray(value2);
  8815. if (num) {
  8816. key = "number";
  8817. } else if (str) {
  8818. key = "string";
  8819. } else if (arr) {
  8820. key = "array";
  8821. }
  8822. if (!key) {
  8823. return false;
  8824. }
  8825. if (arr) {
  8826. val = value2.length;
  8827. }
  8828. if (str) {
  8829. val = value2.replace(spRegexp, "_").length;
  8830. }
  8831. if (len) {
  8832. if (val !== rule.len) {
  8833. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  8834. }
  8835. } else if (min && !max && val < rule.min) {
  8836. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  8837. } else if (max && !min && val > rule.max) {
  8838. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  8839. } else if (min && max && (val < rule.min || val > rule.max)) {
  8840. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  8841. }
  8842. }
  8843. const ENUM = "enum";
  8844. function enumerable(rule, value2, source, errors, options) {
  8845. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  8846. if (rule[ENUM].indexOf(value2) === -1) {
  8847. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  8848. }
  8849. }
  8850. function pattern$1(rule, value2, source, errors, options) {
  8851. if (rule.pattern) {
  8852. if (rule.pattern instanceof RegExp) {
  8853. rule.pattern.lastIndex = 0;
  8854. if (!rule.pattern.test(value2)) {
  8855. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  8856. }
  8857. } else if (typeof rule.pattern === "string") {
  8858. const _pattern = new RegExp(rule.pattern);
  8859. if (!_pattern.test(value2)) {
  8860. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  8861. }
  8862. }
  8863. }
  8864. }
  8865. const rules = {
  8866. required,
  8867. whitespace,
  8868. type,
  8869. range: range$2,
  8870. enum: enumerable,
  8871. pattern: pattern$1
  8872. };
  8873. function string$1(rule, value2, callback, source, options) {
  8874. const errors = [];
  8875. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  8876. if (validate2) {
  8877. if (isEmptyValue(value2, "string") && !rule.required) {
  8878. return callback();
  8879. }
  8880. rules.required(rule, value2, source, errors, options, "string");
  8881. if (!isEmptyValue(value2, "string")) {
  8882. rules.type(rule, value2, source, errors, options);
  8883. rules.range(rule, value2, source, errors, options);
  8884. rules.pattern(rule, value2, source, errors, options);
  8885. if (rule.whitespace === true) {
  8886. rules.whitespace(rule, value2, source, errors, options);
  8887. }
  8888. }
  8889. }
  8890. callback(errors);
  8891. }
  8892. function method2(rule, value2, callback, source, options) {
  8893. const errors = [];
  8894. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  8895. if (validate2) {
  8896. if (isEmptyValue(value2) && !rule.required) {
  8897. return callback();
  8898. }
  8899. rules.required(rule, value2, source, errors, options);
  8900. if (value2 !== void 0) {
  8901. rules.type(rule, value2, source, errors, options);
  8902. }
  8903. }
  8904. callback(errors);
  8905. }
  8906. function number2(rule, value2, callback, source, options) {
  8907. const errors = [];
  8908. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  8909. if (validate2) {
  8910. if (value2 === "") {
  8911. value2 = void 0;
  8912. }
  8913. if (isEmptyValue(value2) && !rule.required) {
  8914. return callback();
  8915. }
  8916. rules.required(rule, value2, source, errors, options);
  8917. if (value2 !== void 0) {
  8918. rules.type(rule, value2, source, errors, options);
  8919. rules.range(rule, value2, source, errors, options);
  8920. }
  8921. }
  8922. callback(errors);
  8923. }
  8924. function _boolean(rule, value2, callback, source, options) {
  8925. const errors = [];
  8926. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  8927. if (validate2) {
  8928. if (isEmptyValue(value2) && !rule.required) {
  8929. return callback();
  8930. }
  8931. rules.required(rule, value2, source, errors, options);
  8932. if (value2 !== void 0) {
  8933. rules.type(rule, value2, source, errors, options);
  8934. }
  8935. }
  8936. callback(errors);
  8937. }
  8938. function regexp2(rule, value2, callback, source, options) {
  8939. const errors = [];
  8940. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  8941. if (validate2) {
  8942. if (isEmptyValue(value2) && !rule.required) {
  8943. return callback();
  8944. }
  8945. rules.required(rule, value2, source, errors, options);
  8946. if (!isEmptyValue(value2)) {
  8947. rules.type(rule, value2, source, errors, options);
  8948. }
  8949. }
  8950. callback(errors);
  8951. }
  8952. function integer2(rule, value2, callback, source, options) {
  8953. const errors = [];
  8954. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  8955. if (validate2) {
  8956. if (isEmptyValue(value2) && !rule.required) {
  8957. return callback();
  8958. }
  8959. rules.required(rule, value2, source, errors, options);
  8960. if (value2 !== void 0) {
  8961. rules.type(rule, value2, source, errors, options);
  8962. rules.range(rule, value2, source, errors, options);
  8963. }
  8964. }
  8965. callback(errors);
  8966. }
  8967. function floatFn(rule, value2, callback, source, options) {
  8968. const errors = [];
  8969. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  8970. if (validate2) {
  8971. if (isEmptyValue(value2) && !rule.required) {
  8972. return callback();
  8973. }
  8974. rules.required(rule, value2, source, errors, options);
  8975. if (value2 !== void 0) {
  8976. rules.type(rule, value2, source, errors, options);
  8977. rules.range(rule, value2, source, errors, options);
  8978. }
  8979. }
  8980. callback(errors);
  8981. }
  8982. function array2(rule, value2, callback, source, options) {
  8983. const errors = [];
  8984. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  8985. if (validate2) {
  8986. if (isEmptyValue(value2, "array") && !rule.required) {
  8987. return callback();
  8988. }
  8989. rules.required(rule, value2, source, errors, options, "array");
  8990. if (!isEmptyValue(value2, "array")) {
  8991. rules.type(rule, value2, source, errors, options);
  8992. rules.range(rule, value2, source, errors, options);
  8993. }
  8994. }
  8995. callback(errors);
  8996. }
  8997. function object2(rule, value2, callback, source, options) {
  8998. const errors = [];
  8999. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  9000. if (validate2) {
  9001. if (isEmptyValue(value2) && !rule.required) {
  9002. return callback();
  9003. }
  9004. rules.required(rule, value2, source, errors, options);
  9005. if (value2 !== void 0) {
  9006. rules.type(rule, value2, source, errors, options);
  9007. }
  9008. }
  9009. callback(errors);
  9010. }
  9011. const ENUM$1 = "enum";
  9012. function enumerable$1(rule, value2, callback, source, options) {
  9013. const errors = [];
  9014. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  9015. if (validate2) {
  9016. if (isEmptyValue(value2) && !rule.required) {
  9017. return callback();
  9018. }
  9019. rules.required(rule, value2, source, errors, options);
  9020. if (value2 !== void 0) {
  9021. rules[ENUM$1](rule, value2, source, errors, options);
  9022. }
  9023. }
  9024. callback(errors);
  9025. }
  9026. function pattern$2(rule, value2, callback, source, options) {
  9027. const errors = [];
  9028. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  9029. if (validate2) {
  9030. if (isEmptyValue(value2, "string") && !rule.required) {
  9031. return callback();
  9032. }
  9033. rules.required(rule, value2, source, errors, options);
  9034. if (!isEmptyValue(value2, "string")) {
  9035. rules.pattern(rule, value2, source, errors, options);
  9036. }
  9037. }
  9038. callback(errors);
  9039. }
  9040. function date2(rule, value2, callback, source, options) {
  9041. const errors = [];
  9042. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  9043. if (validate2) {
  9044. if (isEmptyValue(value2) && !rule.required) {
  9045. return callback();
  9046. }
  9047. rules.required(rule, value2, source, errors, options);
  9048. if (!isEmptyValue(value2)) {
  9049. let dateObject;
  9050. if (typeof value2 === "number") {
  9051. dateObject = new Date(value2);
  9052. } else {
  9053. dateObject = value2;
  9054. }
  9055. rules.type(rule, dateObject, source, errors, options);
  9056. if (dateObject) {
  9057. rules.range(rule, dateObject.getTime(), source, errors, options);
  9058. }
  9059. }
  9060. }
  9061. callback(errors);
  9062. }
  9063. function required$1(rule, value2, callback, source, options) {
  9064. const errors = [];
  9065. const type2 = Array.isArray(value2) ? "array" : typeof value2;
  9066. rules.required(rule, value2, source, errors, options, type2);
  9067. callback(errors);
  9068. }
  9069. function type$1(rule, value2, callback, source, options) {
  9070. const ruleType = rule.type;
  9071. const errors = [];
  9072. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  9073. if (validate2) {
  9074. if (isEmptyValue(value2, ruleType) && !rule.required) {
  9075. return callback();
  9076. }
  9077. rules.required(rule, value2, source, errors, options, ruleType);
  9078. if (!isEmptyValue(value2, ruleType)) {
  9079. rules.type(rule, value2, source, errors, options);
  9080. }
  9081. }
  9082. callback(errors);
  9083. }
  9084. function any(rule, value2, callback, source, options) {
  9085. const errors = [];
  9086. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  9087. if (validate2) {
  9088. if (isEmptyValue(value2) && !rule.required) {
  9089. return callback();
  9090. }
  9091. rules.required(rule, value2, source, errors, options);
  9092. }
  9093. callback(errors);
  9094. }
  9095. const validators = {
  9096. string: string$1,
  9097. method: method2,
  9098. number: number2,
  9099. boolean: _boolean,
  9100. regexp: regexp2,
  9101. integer: integer2,
  9102. float: floatFn,
  9103. array: array2,
  9104. object: object2,
  9105. enum: enumerable$1,
  9106. pattern: pattern$2,
  9107. date: date2,
  9108. url: type$1,
  9109. hex: type$1,
  9110. email: type$1,
  9111. required: required$1,
  9112. any
  9113. };
  9114. function newMessages() {
  9115. return {
  9116. default: "Validation error on field %s",
  9117. required: "%s is required",
  9118. enum: "%s must be one of %s",
  9119. whitespace: "%s cannot be empty",
  9120. date: {
  9121. format: "%s date %s is invalid for format %s",
  9122. parse: "%s date could not be parsed, %s is invalid ",
  9123. invalid: "%s date %s is invalid"
  9124. },
  9125. types: {
  9126. string: "%s is not a %s",
  9127. method: "%s is not a %s (function)",
  9128. array: "%s is not an %s",
  9129. object: "%s is not an %s",
  9130. number: "%s is not a %s",
  9131. date: "%s is not a %s",
  9132. boolean: "%s is not a %s",
  9133. integer: "%s is not an %s",
  9134. float: "%s is not a %s",
  9135. regexp: "%s is not a valid %s",
  9136. email: "%s is not a valid %s",
  9137. url: "%s is not a valid %s",
  9138. hex: "%s is not a valid %s"
  9139. },
  9140. string: {
  9141. len: "%s must be exactly %s characters",
  9142. min: "%s must be at least %s characters",
  9143. max: "%s cannot be longer than %s characters",
  9144. range: "%s must be between %s and %s characters"
  9145. },
  9146. number: {
  9147. len: "%s must equal %s",
  9148. min: "%s cannot be less than %s",
  9149. max: "%s cannot be greater than %s",
  9150. range: "%s must be between %s and %s"
  9151. },
  9152. array: {
  9153. len: "%s must be exactly %s in length",
  9154. min: "%s cannot be less than %s in length",
  9155. max: "%s cannot be greater than %s in length",
  9156. range: "%s must be between %s and %s in length"
  9157. },
  9158. pattern: {
  9159. mismatch: "%s value %s does not match pattern %s"
  9160. },
  9161. clone: function clone2() {
  9162. const cloned = JSON.parse(JSON.stringify(this));
  9163. cloned.clone = this.clone;
  9164. return cloned;
  9165. }
  9166. };
  9167. }
  9168. const messages = newMessages();
  9169. function Schema(descriptor) {
  9170. this.rules = null;
  9171. this._messages = messages;
  9172. this.define(descriptor);
  9173. }
  9174. Schema.prototype = {
  9175. messages: function messages2(_messages) {
  9176. if (_messages) {
  9177. this._messages = deepMerge$2(newMessages(), _messages);
  9178. }
  9179. return this._messages;
  9180. },
  9181. define: function define(rules2) {
  9182. if (!rules2) {
  9183. throw new Error("Cannot configure a schema with no rules");
  9184. }
  9185. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  9186. throw new Error("Rules must be an object");
  9187. }
  9188. this.rules = {};
  9189. let z;
  9190. let item;
  9191. for (z in rules2) {
  9192. if (rules2.hasOwnProperty(z)) {
  9193. item = rules2[z];
  9194. this.rules[z] = Array.isArray(item) ? item : [item];
  9195. }
  9196. }
  9197. },
  9198. validate: function validate(source_, o, oc) {
  9199. const _this = this;
  9200. if (o === void 0) {
  9201. o = {};
  9202. }
  9203. if (oc === void 0) {
  9204. oc = function oc2() {
  9205. };
  9206. }
  9207. let source = source_;
  9208. let options = o;
  9209. let callback = oc;
  9210. if (typeof options === "function") {
  9211. callback = options;
  9212. options = {};
  9213. }
  9214. if (!this.rules || Object.keys(this.rules).length === 0) {
  9215. if (callback) {
  9216. callback();
  9217. }
  9218. return Promise.resolve();
  9219. }
  9220. function complete(results) {
  9221. let i;
  9222. let errors = [];
  9223. let fields = {};
  9224. function add(e) {
  9225. if (Array.isArray(e)) {
  9226. let _errors;
  9227. errors = (_errors = errors).concat.apply(_errors, e);
  9228. } else {
  9229. errors.push(e);
  9230. }
  9231. }
  9232. for (i = 0; i < results.length; i++) {
  9233. add(results[i]);
  9234. }
  9235. if (!errors.length) {
  9236. errors = null;
  9237. fields = null;
  9238. } else {
  9239. fields = convertFieldsError(errors);
  9240. }
  9241. callback(errors, fields);
  9242. }
  9243. if (options.messages) {
  9244. let messages$1 = this.messages();
  9245. if (messages$1 === messages) {
  9246. messages$1 = newMessages();
  9247. }
  9248. deepMerge$2(messages$1, options.messages);
  9249. options.messages = messages$1;
  9250. } else {
  9251. options.messages = this.messages();
  9252. }
  9253. let arr;
  9254. let value2;
  9255. const series = {};
  9256. const keys = options.keys || Object.keys(this.rules);
  9257. keys.forEach((z) => {
  9258. arr = _this.rules[z];
  9259. value2 = source[z];
  9260. arr.forEach((r) => {
  9261. let rule = r;
  9262. if (typeof rule.transform === "function") {
  9263. if (source === source_) {
  9264. source = { ...source };
  9265. }
  9266. value2 = source[z] = rule.transform(value2);
  9267. }
  9268. if (typeof rule === "function") {
  9269. rule = {
  9270. validator: rule
  9271. };
  9272. } else {
  9273. rule = { ...rule };
  9274. }
  9275. rule.validator = _this.getValidationMethod(rule);
  9276. rule.field = z;
  9277. rule.fullField = rule.fullField || z;
  9278. rule.type = _this.getType(rule);
  9279. if (!rule.validator) {
  9280. return;
  9281. }
  9282. series[z] = series[z] || [];
  9283. series[z].push({
  9284. rule,
  9285. value: value2,
  9286. source,
  9287. field: z
  9288. });
  9289. });
  9290. });
  9291. const errorFields = {};
  9292. return asyncMap(series, options, (data, doIt) => {
  9293. const { rule } = data;
  9294. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  9295. deep = deep && (rule.required || !rule.required && data.value);
  9296. rule.field = data.field;
  9297. function addFullfield(key, schema) {
  9298. return { ...schema, fullField: `${rule.fullField}.${key}` };
  9299. }
  9300. function cb(e) {
  9301. if (e === void 0) {
  9302. e = [];
  9303. }
  9304. let errors = e;
  9305. if (!Array.isArray(errors)) {
  9306. errors = [errors];
  9307. }
  9308. if (!options.suppressWarning && errors.length) {
  9309. Schema.warning("async-validator:", errors);
  9310. }
  9311. if (errors.length && rule.message) {
  9312. errors = [].concat(rule.message);
  9313. }
  9314. errors = errors.map(complementError(rule));
  9315. if (options.first && errors.length) {
  9316. errorFields[rule.field] = 1;
  9317. return doIt(errors);
  9318. }
  9319. if (!deep) {
  9320. doIt(errors);
  9321. } else {
  9322. if (rule.required && !data.value) {
  9323. if (rule.message) {
  9324. errors = [].concat(rule.message).map(complementError(rule));
  9325. } else if (options.error) {
  9326. errors = [options.error(rule, format(options.messages.required, rule.field))];
  9327. } else {
  9328. errors = [];
  9329. }
  9330. return doIt(errors);
  9331. }
  9332. let fieldsSchema = {};
  9333. if (rule.defaultField) {
  9334. for (const k in data.value) {
  9335. if (data.value.hasOwnProperty(k)) {
  9336. fieldsSchema[k] = rule.defaultField;
  9337. }
  9338. }
  9339. }
  9340. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  9341. for (const f in fieldsSchema) {
  9342. if (fieldsSchema.hasOwnProperty(f)) {
  9343. const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  9344. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  9345. }
  9346. }
  9347. const schema = new Schema(fieldsSchema);
  9348. schema.messages(options.messages);
  9349. if (data.rule.options) {
  9350. data.rule.options.messages = options.messages;
  9351. data.rule.options.error = options.error;
  9352. }
  9353. schema.validate(data.value, data.rule.options || options, (errs) => {
  9354. const finalErrors = [];
  9355. if (errors && errors.length) {
  9356. finalErrors.push.apply(finalErrors, errors);
  9357. }
  9358. if (errs && errs.length) {
  9359. finalErrors.push.apply(finalErrors, errs);
  9360. }
  9361. doIt(finalErrors.length ? finalErrors : null);
  9362. });
  9363. }
  9364. }
  9365. let res;
  9366. if (rule.asyncValidator) {
  9367. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  9368. } else if (rule.validator) {
  9369. res = rule.validator(rule, data.value, cb, data.source, options);
  9370. if (res === true) {
  9371. cb();
  9372. } else if (res === false) {
  9373. cb(rule.message || `${rule.field} fails`);
  9374. } else if (res instanceof Array) {
  9375. cb(res);
  9376. } else if (res instanceof Error) {
  9377. cb(res.message);
  9378. }
  9379. }
  9380. if (res && res.then) {
  9381. res.then(() => cb(), (e) => cb(e));
  9382. }
  9383. }, (results) => {
  9384. complete(results);
  9385. });
  9386. },
  9387. getType: function getType(rule) {
  9388. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  9389. rule.type = "pattern";
  9390. }
  9391. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  9392. throw new Error(format("Unknown rule type %s", rule.type));
  9393. }
  9394. return rule.type || "string";
  9395. },
  9396. getValidationMethod: function getValidationMethod(rule) {
  9397. if (typeof rule.validator === "function") {
  9398. return rule.validator;
  9399. }
  9400. const keys = Object.keys(rule);
  9401. const messageIndex = keys.indexOf("message");
  9402. if (messageIndex !== -1) {
  9403. keys.splice(messageIndex, 1);
  9404. }
  9405. if (keys.length === 1 && keys[0] === "required") {
  9406. return validators.required;
  9407. }
  9408. return validators[this.getType(rule)] || false;
  9409. }
  9410. };
  9411. Schema.register = function register(type2, validator) {
  9412. if (typeof validator !== "function") {
  9413. throw new Error("Cannot register a validator by type, validator is not a function");
  9414. }
  9415. validators[type2] = validator;
  9416. };
  9417. Schema.warning = warning;
  9418. Schema.messages = messages;
  9419. Schema.warning = function() {
  9420. };
  9421. const _sfc_main$16 = {
  9422. name: "u-form",
  9423. mixins: [mpMixin, mixin, props$k],
  9424. provide() {
  9425. return {
  9426. uForm: this
  9427. };
  9428. },
  9429. data() {
  9430. return {
  9431. formRules: {},
  9432. // 规则校验器
  9433. validator: {},
  9434. // 原始的model快照,用于resetFields方法重置表单时使用
  9435. originalModel: null
  9436. };
  9437. },
  9438. watch: {
  9439. // 监听规则的变化
  9440. rules: {
  9441. immediate: true,
  9442. handler(n) {
  9443. this.setRules(n);
  9444. }
  9445. },
  9446. // 监听属性的变化,通知子组件u-form-item重新获取信息
  9447. propsChange(n) {
  9448. var _a;
  9449. if ((_a = this.children) == null ? void 0 : _a.length) {
  9450. this.children.map((child) => {
  9451. typeof child.updateParentData == "function" && child.updateParentData();
  9452. });
  9453. }
  9454. },
  9455. // 监听model的初始值作为重置表单的快照
  9456. model: {
  9457. immediate: true,
  9458. handler(n) {
  9459. if (!this.originalModel) {
  9460. this.originalModel = uni.$u.deepClone(n);
  9461. }
  9462. }
  9463. }
  9464. },
  9465. computed: {
  9466. propsChange() {
  9467. return [
  9468. this.errorType,
  9469. this.borderBottom,
  9470. this.labelPosition,
  9471. this.labelWidth,
  9472. this.labelAlign,
  9473. this.labelStyle
  9474. ];
  9475. }
  9476. },
  9477. created() {
  9478. this.children = [];
  9479. },
  9480. methods: {
  9481. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  9482. setRules(rules2) {
  9483. if (Object.keys(rules2).length === 0)
  9484. return;
  9485. if (Object.keys(this.model).length === 0) {
  9486. uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。");
  9487. return;
  9488. }
  9489. this.formRules = rules2;
  9490. this.validator = new Schema(rules2);
  9491. },
  9492. // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
  9493. resetFields() {
  9494. this.resetModel();
  9495. },
  9496. // 重置model为初始值的快照
  9497. resetModel(obj) {
  9498. this.children.map((child) => {
  9499. const prop = child == null ? void 0 : child.prop;
  9500. const value2 = uni.$u.getProperty(this.originalModel, prop);
  9501. uni.$u.setProperty(this.model, prop, value2);
  9502. });
  9503. },
  9504. // 清空校验结果
  9505. clearValidate(props2) {
  9506. props2 = [].concat(props2);
  9507. this.children.map((child) => {
  9508. if (props2[0] === void 0 || props2.includes(child.prop)) {
  9509. child.message = null;
  9510. }
  9511. });
  9512. },
  9513. // 对部分表单字段进行校验
  9514. async validateField(value2, callback, event = null) {
  9515. this.$nextTick(() => {
  9516. const errorsRes = [];
  9517. value2 = [].concat(value2);
  9518. this.children.map((child) => {
  9519. const childErrors = [];
  9520. if (value2.includes(child.prop)) {
  9521. const propertyVal = uni.$u.getProperty(
  9522. this.model,
  9523. child.prop
  9524. );
  9525. const propertyChain = child.prop.split(".");
  9526. const propertyName = propertyChain[propertyChain.length - 1];
  9527. const rule = this.formRules[child.prop];
  9528. if (!rule)
  9529. return;
  9530. const rules2 = [].concat(rule);
  9531. for (let i = 0; i < rules2.length; i++) {
  9532. const ruleItem = rules2[i];
  9533. const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
  9534. if (event && !trigger.includes(event))
  9535. continue;
  9536. const validator = new Schema({
  9537. [propertyName]: ruleItem
  9538. });
  9539. validator.validate(
  9540. {
  9541. [propertyName]: propertyVal
  9542. },
  9543. (errors, fields) => {
  9544. var _a;
  9545. if (uni.$u.test.array(errors)) {
  9546. errorsRes.push(...errors);
  9547. childErrors.push(...errors);
  9548. }
  9549. child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null;
  9550. }
  9551. );
  9552. }
  9553. }
  9554. });
  9555. typeof callback === "function" && callback(errorsRes);
  9556. });
  9557. },
  9558. // 校验全部数据
  9559. validate(callback) {
  9560. if (Object.keys(this.formRules).length === 0) {
  9561. uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
  9562. return;
  9563. }
  9564. return new Promise((resolve, reject) => {
  9565. this.$nextTick(() => {
  9566. const formItemProps = this.children.map(
  9567. (item) => item.prop
  9568. );
  9569. this.validateField(formItemProps, (errors) => {
  9570. if (errors.length) {
  9571. this.errorType === "toast" && uni.$u.toast(errors[0].message);
  9572. reject(errors);
  9573. } else {
  9574. resolve(true);
  9575. }
  9576. });
  9577. });
  9578. });
  9579. }
  9580. }
  9581. };
  9582. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  9583. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
  9584. vue.renderSlot(_ctx.$slots, "default")
  9585. ]);
  9586. }
  9587. const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  9588. const props$j = {
  9589. props: {
  9590. // 是否细边框
  9591. hairline: {
  9592. type: Boolean,
  9593. default: props$x.button.hairline
  9594. },
  9595. // 按钮的预置样式,info,primary,error,warning,success
  9596. type: {
  9597. type: String,
  9598. default: props$x.button.type
  9599. },
  9600. // 按钮尺寸,large,normal,small,mini
  9601. size: {
  9602. type: String,
  9603. default: props$x.button.size
  9604. },
  9605. // 按钮形状,circle(两边为半圆),square(带圆角)
  9606. shape: {
  9607. type: String,
  9608. default: props$x.button.shape
  9609. },
  9610. // 按钮是否镂空
  9611. plain: {
  9612. type: Boolean,
  9613. default: props$x.button.plain
  9614. },
  9615. // 是否禁止状态
  9616. disabled: {
  9617. type: Boolean,
  9618. default: props$x.button.disabled
  9619. },
  9620. // 是否加载中
  9621. loading: {
  9622. type: Boolean,
  9623. default: props$x.button.loading
  9624. },
  9625. // 加载中提示文字
  9626. loadingText: {
  9627. type: [String, Number],
  9628. default: props$x.button.loadingText
  9629. },
  9630. // 加载状态图标类型
  9631. loadingMode: {
  9632. type: String,
  9633. default: props$x.button.loadingMode
  9634. },
  9635. // 加载图标大小
  9636. loadingSize: {
  9637. type: [String, Number],
  9638. default: props$x.button.loadingSize
  9639. },
  9640. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  9641. // https://uniapp.dcloud.io/component/button
  9642. openType: {
  9643. type: String,
  9644. default: props$x.button.openType
  9645. },
  9646. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  9647. // 取值为submit(提交表单),reset(重置表单)
  9648. formType: {
  9649. type: String,
  9650. default: props$x.button.formType
  9651. },
  9652. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  9653. // 只微信小程序、QQ小程序有效
  9654. appParameter: {
  9655. type: String,
  9656. default: props$x.button.appParameter
  9657. },
  9658. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  9659. hoverStopPropagation: {
  9660. type: Boolean,
  9661. default: props$x.button.hoverStopPropagation
  9662. },
  9663. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  9664. lang: {
  9665. type: String,
  9666. default: props$x.button.lang
  9667. },
  9668. // 会话来源,open-type="contact"时有效。只微信小程序有效
  9669. sessionFrom: {
  9670. type: String,
  9671. default: props$x.button.sessionFrom
  9672. },
  9673. // 会话内消息卡片标题,open-type="contact"时有效
  9674. // 默认当前标题,只微信小程序有效
  9675. sendMessageTitle: {
  9676. type: String,
  9677. default: props$x.button.sendMessageTitle
  9678. },
  9679. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  9680. // 默认当前分享路径,只微信小程序有效
  9681. sendMessagePath: {
  9682. type: String,
  9683. default: props$x.button.sendMessagePath
  9684. },
  9685. // 会话内消息卡片图片,open-type="contact"时有效
  9686. // 默认当前页面截图,只微信小程序有效
  9687. sendMessageImg: {
  9688. type: String,
  9689. default: props$x.button.sendMessageImg
  9690. },
  9691. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  9692. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  9693. showMessageCard: {
  9694. type: Boolean,
  9695. default: props$x.button.showMessageCard
  9696. },
  9697. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  9698. dataName: {
  9699. type: String,
  9700. default: props$x.button.dataName
  9701. },
  9702. // 节流,一定时间内只能触发一次
  9703. throttleTime: {
  9704. type: [String, Number],
  9705. default: props$x.button.throttleTime
  9706. },
  9707. // 按住后多久出现点击态,单位毫秒
  9708. hoverStartTime: {
  9709. type: [String, Number],
  9710. default: props$x.button.hoverStartTime
  9711. },
  9712. // 手指松开后点击态保留时间,单位毫秒
  9713. hoverStayTime: {
  9714. type: [String, Number],
  9715. default: props$x.button.hoverStayTime
  9716. },
  9717. // 按钮文字,之所以通过props传入,是因为slot传入的话
  9718. // nvue中无法控制文字的样式
  9719. text: {
  9720. type: [String, Number],
  9721. default: props$x.button.text
  9722. },
  9723. // 按钮图标
  9724. icon: {
  9725. type: String,
  9726. default: props$x.button.icon
  9727. },
  9728. // 按钮图标
  9729. iconColor: {
  9730. type: String,
  9731. default: props$x.button.icon
  9732. },
  9733. // 按钮颜色,支持传入linear-gradient渐变色
  9734. color: {
  9735. type: String,
  9736. default: props$x.button.color
  9737. }
  9738. }
  9739. };
  9740. const _sfc_main$15 = {
  9741. name: "u-button",
  9742. mixins: [mpMixin, mixin, props$j],
  9743. data() {
  9744. return {};
  9745. },
  9746. computed: {
  9747. // 生成bem风格的类名
  9748. bemClass() {
  9749. if (!this.color) {
  9750. return this.bem(
  9751. "button",
  9752. ["type", "shape", "size"],
  9753. ["disabled", "plain", "hairline"]
  9754. );
  9755. } else {
  9756. return this.bem(
  9757. "button",
  9758. ["shape", "size"],
  9759. ["disabled", "plain", "hairline"]
  9760. );
  9761. }
  9762. },
  9763. loadingColor() {
  9764. if (this.plain) {
  9765. return this.color ? this.color : uni.$u.config.color[`u-${this.type}`];
  9766. }
  9767. if (this.type === "info") {
  9768. return "#c9c9c9";
  9769. }
  9770. return "rgb(200, 200, 200)";
  9771. },
  9772. iconColorCom() {
  9773. if (this.iconColor)
  9774. return this.iconColor;
  9775. if (this.plain) {
  9776. return this.color ? this.color : this.type;
  9777. } else {
  9778. return this.type === "info" ? "#000000" : "#ffffff";
  9779. }
  9780. },
  9781. baseColor() {
  9782. let style = {};
  9783. if (this.color) {
  9784. style.color = this.plain ? this.color : "white";
  9785. if (!this.plain) {
  9786. style["background-color"] = this.color;
  9787. }
  9788. if (this.color.indexOf("gradient") !== -1) {
  9789. style.borderTopWidth = 0;
  9790. style.borderRightWidth = 0;
  9791. style.borderBottomWidth = 0;
  9792. style.borderLeftWidth = 0;
  9793. if (!this.plain) {
  9794. style.backgroundImage = this.color;
  9795. }
  9796. } else {
  9797. style.borderColor = this.color;
  9798. style.borderWidth = "1px";
  9799. style.borderStyle = "solid";
  9800. }
  9801. }
  9802. return style;
  9803. },
  9804. // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
  9805. nvueTextStyle() {
  9806. let style = {};
  9807. if (this.type === "info") {
  9808. style.color = "#323233";
  9809. }
  9810. if (this.color) {
  9811. style.color = this.plain ? this.color : "white";
  9812. }
  9813. style.fontSize = this.textSize + "px";
  9814. return style;
  9815. },
  9816. // 字体大小
  9817. textSize() {
  9818. let fontSize = 14, { size } = this;
  9819. if (size === "large")
  9820. fontSize = 16;
  9821. if (size === "normal")
  9822. fontSize = 14;
  9823. if (size === "small")
  9824. fontSize = 12;
  9825. if (size === "mini")
  9826. fontSize = 10;
  9827. return fontSize;
  9828. }
  9829. },
  9830. emits: [
  9831. "click",
  9832. "getphonenumber",
  9833. "getuserinfo",
  9834. "error",
  9835. "opensetting",
  9836. "launchapp"
  9837. ],
  9838. methods: {
  9839. clickHandler() {
  9840. if (!this.disabled && !this.loading) {
  9841. uni.$u.throttle(() => {
  9842. this.$emit("click");
  9843. }, this.throttleTime);
  9844. }
  9845. },
  9846. // 下面为对接uniapp官方按钮开放能力事件回调的对接
  9847. getphonenumber(res) {
  9848. this.$emit("getphonenumber", res);
  9849. },
  9850. getuserinfo(res) {
  9851. this.$emit("getuserinfo", res);
  9852. },
  9853. error(res) {
  9854. this.$emit("error", res);
  9855. },
  9856. opensetting(res) {
  9857. this.$emit("opensetting", res);
  9858. },
  9859. launchapp(res) {
  9860. this.$emit("launchapp", res);
  9861. }
  9862. }
  9863. };
  9864. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  9865. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
  9866. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  9867. return vue.openBlock(), vue.createElementBlock("button", {
  9868. "hover-start-time": Number(_ctx.hoverStartTime),
  9869. "hover-stay-time": Number(_ctx.hoverStayTime),
  9870. "form-type": _ctx.formType,
  9871. "open-type": _ctx.openType,
  9872. "app-parameter": _ctx.appParameter,
  9873. "hover-stop-propagation": _ctx.hoverStopPropagation,
  9874. "send-message-title": _ctx.sendMessageTitle,
  9875. "send-message-path": _ctx.sendMessagePath,
  9876. lang: _ctx.lang,
  9877. "data-name": _ctx.dataName,
  9878. "session-from": _ctx.sessionFrom,
  9879. "send-message-img": _ctx.sendMessageImg,
  9880. "show-message-card": _ctx.showMessageCard,
  9881. onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)),
  9882. onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)),
  9883. onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)),
  9884. onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)),
  9885. onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)),
  9886. "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "",
  9887. class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]),
  9888. style: vue.normalizeStyle([$options.baseColor, _ctx.$u.addStyle(_ctx.customStyle)]),
  9889. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  9890. }, [
  9891. _ctx.loading ? (vue.openBlock(), vue.createElementBlock(
  9892. vue.Fragment,
  9893. { key: 0 },
  9894. [
  9895. vue.createVNode(_component_u_loading_icon, {
  9896. mode: _ctx.loadingMode,
  9897. size: _ctx.loadingSize * 1.15,
  9898. color: $options.loadingColor
  9899. }, null, 8, ["mode", "size", "color"]),
  9900. vue.createElementVNode(
  9901. "text",
  9902. {
  9903. class: "u-button__loading-text",
  9904. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  9905. },
  9906. vue.toDisplayString(_ctx.loadingText || _ctx.text),
  9907. 5
  9908. /* TEXT, STYLE */
  9909. )
  9910. ],
  9911. 64
  9912. /* STABLE_FRAGMENT */
  9913. )) : (vue.openBlock(), vue.createElementBlock(
  9914. vue.Fragment,
  9915. { key: 1 },
  9916. [
  9917. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  9918. key: 0,
  9919. name: _ctx.icon,
  9920. color: $options.iconColorCom,
  9921. size: $options.textSize * 1.35,
  9922. customStyle: { marginRight: "2px" }
  9923. }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true),
  9924. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  9925. vue.createElementVNode(
  9926. "text",
  9927. {
  9928. class: "u-button__text",
  9929. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  9930. },
  9931. vue.toDisplayString(_ctx.text),
  9932. 5
  9933. /* TEXT, STYLE */
  9934. )
  9935. ], true)
  9936. ],
  9937. 64
  9938. /* STABLE_FRAGMENT */
  9939. ))
  9940. ], 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"]);
  9941. }
  9942. const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-5ce41ee6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
  9943. const props$i = {
  9944. props: {
  9945. // 是否展示组件
  9946. show: {
  9947. type: Boolean,
  9948. default: props$x.transition.show
  9949. },
  9950. // 使用的动画模式
  9951. mode: {
  9952. type: String,
  9953. default: props$x.transition.mode
  9954. },
  9955. // 动画的执行时间,单位ms
  9956. duration: {
  9957. type: [String, Number],
  9958. default: props$x.transition.duration
  9959. },
  9960. // 使用的动画过渡函数
  9961. timingFunction: {
  9962. type: String,
  9963. default: props$x.transition.timingFunction
  9964. }
  9965. }
  9966. };
  9967. const getClassNames = (name) => ({
  9968. enter: `u-${name}-enter u-${name}-enter-active`,
  9969. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  9970. leave: `u-${name}-leave u-${name}-leave-active`,
  9971. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  9972. });
  9973. const transition = {
  9974. methods: {
  9975. // 组件被点击发出事件
  9976. clickHandler() {
  9977. this.$emit("click");
  9978. },
  9979. // vue版本的组件进场处理
  9980. vueEnter() {
  9981. const classNames = getClassNames(this.mode);
  9982. this.status = "enter";
  9983. this.$emit("beforeEnter");
  9984. this.inited = true;
  9985. this.display = true;
  9986. this.classes = classNames.enter;
  9987. this.$nextTick(async () => {
  9988. this.$emit("enter");
  9989. this.transitionEnded = false;
  9990. this.$emit("afterEnter");
  9991. this.classes = classNames["enter-to"];
  9992. });
  9993. },
  9994. // 动画离场处理
  9995. vueLeave() {
  9996. if (!this.display)
  9997. return;
  9998. const classNames = getClassNames(this.mode);
  9999. this.status = "leave";
  10000. this.$emit("beforeLeave");
  10001. this.classes = classNames.leave;
  10002. this.$nextTick(() => {
  10003. this.transitionEnded = false;
  10004. this.$emit("leave");
  10005. setTimeout(this.onTransitionEnd, this.duration);
  10006. this.classes = classNames["leave-to"];
  10007. });
  10008. },
  10009. // 完成过渡后触发
  10010. onTransitionEnd() {
  10011. if (this.transitionEnded)
  10012. return;
  10013. this.transitionEnded = true;
  10014. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  10015. if (!this.show && this.display) {
  10016. this.display = false;
  10017. this.inited = false;
  10018. }
  10019. }
  10020. }
  10021. };
  10022. const _sfc_main$14 = {
  10023. name: "u-transition",
  10024. data() {
  10025. return {
  10026. inited: false,
  10027. // 是否显示/隐藏组件
  10028. viewStyle: {},
  10029. // 组件内部的样式
  10030. status: "",
  10031. // 记录组件动画的状态
  10032. transitionEnded: false,
  10033. // 组件是否结束的标记
  10034. display: false,
  10035. // 组件是否展示
  10036. classes: ""
  10037. // 应用的类名
  10038. };
  10039. },
  10040. computed: {
  10041. mergeStyle() {
  10042. const { viewStyle, customStyle } = this;
  10043. return {
  10044. transitionDuration: `${this.duration}ms`,
  10045. // display: `${this.display ? '' : 'none'}`,
  10046. transitionTimingFunction: this.timingFunction,
  10047. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  10048. ...uni.$u.addStyle(customStyle),
  10049. ...viewStyle
  10050. };
  10051. }
  10052. },
  10053. // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
  10054. mixins: [mpMixin, mixin, transition, props$i],
  10055. watch: {
  10056. show: {
  10057. handler(newVal) {
  10058. newVal ? this.vueEnter() : this.vueLeave();
  10059. },
  10060. // 表示同时监听初始化时的props的show的意思
  10061. immediate: true
  10062. }
  10063. }
  10064. };
  10065. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  10066. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  10067. "view",
  10068. {
  10069. key: 0,
  10070. class: vue.normalizeClass(["u-transition", $data.classes]),
  10071. ref: "u-transition",
  10072. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  10073. style: vue.normalizeStyle([$options.mergeStyle]),
  10074. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  10075. },
  10076. [
  10077. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10078. ],
  10079. 38
  10080. /* CLASS, STYLE, NEED_HYDRATION */
  10081. )) : vue.createCommentVNode("v-if", true);
  10082. }
  10083. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  10084. const props$h = {
  10085. props: {
  10086. // 是否显示遮罩
  10087. show: {
  10088. type: Boolean,
  10089. default: props$x.overlay.show
  10090. },
  10091. // 层级z-index
  10092. zIndex: {
  10093. type: [String, Number],
  10094. default: props$x.overlay.zIndex
  10095. },
  10096. // 遮罩的过渡时间,单位为ms
  10097. duration: {
  10098. type: [String, Number],
  10099. default: props$x.overlay.duration
  10100. },
  10101. // 不透明度值,当做rgba的第四个参数
  10102. opacity: {
  10103. type: [String, Number],
  10104. default: props$x.overlay.opacity
  10105. }
  10106. }
  10107. };
  10108. const _sfc_main$13 = {
  10109. name: "u-overlay",
  10110. mixins: [mpMixin, mixin, props$h],
  10111. computed: {
  10112. overlayStyle() {
  10113. const style = {
  10114. position: "fixed",
  10115. top: 0,
  10116. left: 0,
  10117. right: 0,
  10118. zIndex: this.zIndex,
  10119. bottom: 0,
  10120. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  10121. };
  10122. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10123. }
  10124. },
  10125. methods: {
  10126. clickHandler() {
  10127. this.$emit("click");
  10128. }
  10129. }
  10130. };
  10131. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  10132. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  10133. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  10134. show: _ctx.show,
  10135. "custom-class": "u-overlay",
  10136. duration: _ctx.duration,
  10137. "custom-style": $options.overlayStyle,
  10138. onClick: $options.clickHandler
  10139. }, {
  10140. default: vue.withCtx(() => [
  10141. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10142. ]),
  10143. _: 3
  10144. /* FORWARDED */
  10145. }, 8, ["show", "duration", "custom-style", "onClick"]);
  10146. }
  10147. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  10148. const props$g = {
  10149. props: {
  10150. bgColor: {
  10151. type: String,
  10152. default: props$x.statusBar.bgColor
  10153. }
  10154. }
  10155. };
  10156. const _sfc_main$12 = {
  10157. name: "u-status-bar",
  10158. mixins: [mpMixin, mixin, props$g],
  10159. data() {
  10160. return {};
  10161. },
  10162. computed: {
  10163. style() {
  10164. const style = {};
  10165. style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
  10166. style.backgroundColor = this.bgColor;
  10167. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10168. }
  10169. }
  10170. };
  10171. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  10172. return vue.openBlock(), vue.createElementBlock(
  10173. "view",
  10174. {
  10175. style: vue.normalizeStyle([$options.style]),
  10176. class: "u-status-bar"
  10177. },
  10178. [
  10179. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10180. ],
  10181. 4
  10182. /* STYLE */
  10183. );
  10184. }
  10185. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  10186. const props$f = {
  10187. props: {}
  10188. };
  10189. const _sfc_main$11 = {
  10190. name: "u-safe-bottom",
  10191. mixins: [mpMixin, mixin, props$f],
  10192. data() {
  10193. return {
  10194. safeAreaBottomHeight: 0,
  10195. isNvue: false
  10196. };
  10197. },
  10198. computed: {
  10199. style() {
  10200. const style = {};
  10201. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10202. }
  10203. },
  10204. mounted() {
  10205. }
  10206. };
  10207. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  10208. return vue.openBlock(), vue.createElementBlock(
  10209. "view",
  10210. {
  10211. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  10212. style: vue.normalizeStyle([$options.style])
  10213. },
  10214. null,
  10215. 6
  10216. /* CLASS, STYLE */
  10217. );
  10218. }
  10219. const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  10220. const props$e = {
  10221. props: {
  10222. // 是否展示弹窗
  10223. show: {
  10224. type: Boolean,
  10225. default: props$x.popup.show
  10226. },
  10227. // 是否显示遮罩
  10228. overlay: {
  10229. type: Boolean,
  10230. default: props$x.popup.overlay
  10231. },
  10232. // 弹出的方向,可选值为 top bottom right left center
  10233. mode: {
  10234. type: String,
  10235. default: props$x.popup.mode
  10236. },
  10237. // 动画时长,单位ms
  10238. duration: {
  10239. type: [String, Number],
  10240. default: props$x.popup.duration
  10241. },
  10242. // 是否显示关闭图标
  10243. closeable: {
  10244. type: Boolean,
  10245. default: props$x.popup.closeable
  10246. },
  10247. // 自定义遮罩的样式
  10248. overlayStyle: {
  10249. type: [Object, String],
  10250. default: props$x.popup.overlayStyle
  10251. },
  10252. // 点击遮罩是否关闭弹窗
  10253. closeOnClickOverlay: {
  10254. type: Boolean,
  10255. default: props$x.popup.closeOnClickOverlay
  10256. },
  10257. // 层级
  10258. zIndex: {
  10259. type: [String, Number],
  10260. default: props$x.popup.zIndex
  10261. },
  10262. // 是否为iPhoneX留出底部安全距离
  10263. safeAreaInsetBottom: {
  10264. type: Boolean,
  10265. default: props$x.popup.safeAreaInsetBottom
  10266. },
  10267. // 是否留出顶部安全距离(状态栏高度)
  10268. safeAreaInsetTop: {
  10269. type: Boolean,
  10270. default: props$x.popup.safeAreaInsetTop
  10271. },
  10272. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  10273. closeIconPos: {
  10274. type: String,
  10275. default: props$x.popup.closeIconPos
  10276. },
  10277. // 是否显示圆角
  10278. round: {
  10279. type: [Boolean, String, Number],
  10280. default: props$x.popup.round
  10281. },
  10282. // mode=center,也即中部弹出时,是否使用缩放模式
  10283. zoom: {
  10284. type: Boolean,
  10285. default: props$x.popup.zoom
  10286. },
  10287. // 弹窗背景色,设置为transparent可去除白色背景
  10288. bgColor: {
  10289. type: String,
  10290. default: props$x.popup.bgColor
  10291. },
  10292. // 遮罩的透明度,0-1之间
  10293. overlayOpacity: {
  10294. type: [Number, String],
  10295. default: props$x.popup.overlayOpacity
  10296. }
  10297. }
  10298. };
  10299. const _sfc_main$10 = {
  10300. name: "u-popup",
  10301. mixins: [mpMixin, mixin, props$e],
  10302. data() {
  10303. return {
  10304. overlayDuration: this.duration + 50
  10305. };
  10306. },
  10307. watch: {
  10308. show(newValue, oldValue) {
  10309. }
  10310. },
  10311. computed: {
  10312. transitionStyle() {
  10313. const style = {
  10314. zIndex: this.zIndex,
  10315. position: "fixed",
  10316. display: "flex"
  10317. };
  10318. style[this.mode] = 0;
  10319. if (this.mode === "left") {
  10320. return uni.$u.deepMerge(style, {
  10321. bottom: 0,
  10322. top: 0
  10323. });
  10324. } else if (this.mode === "right") {
  10325. return uni.$u.deepMerge(style, {
  10326. bottom: 0,
  10327. top: 0
  10328. });
  10329. } else if (this.mode === "top") {
  10330. return uni.$u.deepMerge(style, {
  10331. left: 0,
  10332. right: 0
  10333. });
  10334. } else if (this.mode === "bottom") {
  10335. return uni.$u.deepMerge(style, {
  10336. left: 0,
  10337. right: 0
  10338. });
  10339. } else if (this.mode === "center") {
  10340. return uni.$u.deepMerge(style, {
  10341. alignItems: "center",
  10342. "justify-content": "center",
  10343. top: 0,
  10344. left: 0,
  10345. right: 0,
  10346. bottom: 0
  10347. });
  10348. }
  10349. },
  10350. contentStyle() {
  10351. const style = {};
  10352. uni.$u.sys();
  10353. if (this.mode !== "center") {
  10354. style.flex = 1;
  10355. }
  10356. if (this.bgColor) {
  10357. style.backgroundColor = this.bgColor;
  10358. }
  10359. if (this.round) {
  10360. const value2 = uni.$u.addUnit(this.round);
  10361. if (this.mode === "top") {
  10362. style.borderBottomLeftRadius = value2;
  10363. style.borderBottomRightRadius = value2;
  10364. } else if (this.mode === "bottom") {
  10365. style.borderTopLeftRadius = value2;
  10366. style.borderTopRightRadius = value2;
  10367. } else if (this.mode === "center") {
  10368. style.borderRadius = value2;
  10369. }
  10370. }
  10371. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10372. },
  10373. position() {
  10374. if (this.mode === "center") {
  10375. return this.zoom ? "fade-zoom" : "fade";
  10376. }
  10377. if (this.mode === "left") {
  10378. return "slide-left";
  10379. }
  10380. if (this.mode === "right") {
  10381. return "slide-right";
  10382. }
  10383. if (this.mode === "bottom") {
  10384. return "slide-up";
  10385. }
  10386. if (this.mode === "top") {
  10387. return "slide-down";
  10388. }
  10389. }
  10390. },
  10391. methods: {
  10392. // 点击遮罩
  10393. overlayClick() {
  10394. if (this.closeOnClickOverlay) {
  10395. this.$emit("close");
  10396. }
  10397. },
  10398. close(e) {
  10399. this.$emit("close");
  10400. },
  10401. afterEnter() {
  10402. this.$emit("open");
  10403. },
  10404. clickHandler() {
  10405. if (this.mode === "center") {
  10406. this.overlayClick();
  10407. }
  10408. this.$emit("click");
  10409. }
  10410. }
  10411. };
  10412. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  10413. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$4);
  10414. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_1$4);
  10415. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  10416. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$2);
  10417. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  10418. return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
  10419. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  10420. key: 0,
  10421. show: _ctx.show,
  10422. onClick: $options.overlayClick,
  10423. duration: $data.overlayDuration,
  10424. customStyle: _ctx.overlayStyle,
  10425. opacity: _ctx.overlayOpacity
  10426. }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  10427. vue.createVNode(_component_u_transition, {
  10428. show: _ctx.show,
  10429. customStyle: $options.transitionStyle,
  10430. mode: $options.position,
  10431. duration: _ctx.duration,
  10432. onAfterEnter: $options.afterEnter,
  10433. onClick: $options.clickHandler
  10434. }, {
  10435. default: vue.withCtx(() => [
  10436. vue.createElementVNode(
  10437. "view",
  10438. {
  10439. class: "u-popup__content",
  10440. style: vue.normalizeStyle([$options.contentStyle]),
  10441. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
  10442. },
  10443. [
  10444. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  10445. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  10446. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  10447. "view",
  10448. {
  10449. key: 1,
  10450. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  10451. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  10452. "hover-class": "u-popup__content__close--hover",
  10453. "hover-stay-time": "150"
  10454. },
  10455. [
  10456. vue.createVNode(_component_u_icon, {
  10457. name: "close",
  10458. color: "#909399",
  10459. size: "18",
  10460. bold: ""
  10461. })
  10462. ],
  10463. 2
  10464. /* CLASS */
  10465. )) : vue.createCommentVNode("v-if", true),
  10466. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  10467. ],
  10468. 4
  10469. /* STYLE */
  10470. )
  10471. ]),
  10472. _: 3
  10473. /* FORWARDED */
  10474. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  10475. ]);
  10476. }
  10477. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  10478. const _sfc_main$$ = {
  10479. __name: "feedbackPopup",
  10480. props: {
  10481. show: {
  10482. type: Boolean,
  10483. default: false
  10484. }
  10485. },
  10486. emits: ["update:show", "submit"],
  10487. setup(__props, { expose: __expose, emit: __emit }) {
  10488. __expose();
  10489. const props2 = __props;
  10490. const emit = __emit;
  10491. const formRef = vue.ref(null);
  10492. const submitting = vue.ref(false);
  10493. const formData = vue.reactive({
  10494. feedbackText: "",
  10495. images: []
  10496. });
  10497. const rules2 = {
  10498. feedbackText: [{
  10499. required: true,
  10500. message: "请输入反馈信息",
  10501. trigger: ["blur", "change"]
  10502. }, {
  10503. min: 5,
  10504. message: "反馈信息不能少于5个字",
  10505. trigger: ["blur", "change"]
  10506. }],
  10507. images: [{
  10508. required: true,
  10509. message: "请上传照片",
  10510. trigger: ["change"]
  10511. }]
  10512. };
  10513. function afterRead(event) {
  10514. const {
  10515. file
  10516. } = event;
  10517. formData.images.push({
  10518. url: file.url,
  10519. status: "success",
  10520. message: "上传成功"
  10521. });
  10522. }
  10523. function deletePic(event) {
  10524. const index2 = event.index;
  10525. formData.images.splice(index2, 1);
  10526. }
  10527. function handleCancel() {
  10528. resetForm();
  10529. emit("update:show", false);
  10530. }
  10531. async function handleConfirm() {
  10532. var _a;
  10533. try {
  10534. await ((_a = formRef.value) == null ? void 0 : _a.validate());
  10535. submitting.value = true;
  10536. await new Promise((resolve) => setTimeout(resolve, 1e3));
  10537. uni.showToast({
  10538. title: "反馈已提交",
  10539. icon: "success"
  10540. });
  10541. emit("submit", {
  10542. feedbackText: formData.feedbackText,
  10543. images: formData.images
  10544. });
  10545. resetForm();
  10546. emit("update:show", false);
  10547. } catch (error2) {
  10548. formatAppLog("error", "at pages/book/components/feedbackPopup.vue:130", "表单验证失败:", error2);
  10549. } finally {
  10550. submitting.value = false;
  10551. }
  10552. }
  10553. function resetForm() {
  10554. var _a;
  10555. formData.feedbackText = "";
  10556. formData.images = [];
  10557. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  10558. }
  10559. const __returned__ = { props: props2, emit, formRef, submitting, formData, rules: rules2, afterRead, deletePic, handleCancel, handleConfirm, resetForm, ref: vue.ref, reactive: vue.reactive };
  10560. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  10561. return __returned__;
  10562. }
  10563. };
  10564. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  10565. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
  10566. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_2$4);
  10567. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  10568. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_2$3);
  10569. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_3$3);
  10570. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  10571. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
  10572. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  10573. mode: "center",
  10574. show: $props.show,
  10575. onClose: _ctx.handleClose,
  10576. closeOnClickOverlay: false
  10577. }, {
  10578. default: vue.withCtx(() => [
  10579. vue.createElementVNode("view", { class: "popup-container" }, [
  10580. vue.createVNode(_component_u_form, {
  10581. ref: "formRef",
  10582. model: $setup.formData,
  10583. rules: $setup.rules,
  10584. labelPosition: "top",
  10585. labelWidth: "100%"
  10586. }, {
  10587. default: vue.withCtx(() => [
  10588. vue.createCommentVNode(" 反馈信息 "),
  10589. vue.createVNode(_component_u_form_item, {
  10590. label: "反馈图书信息",
  10591. prop: "feedbackText",
  10592. borderBottom: true
  10593. }, {
  10594. default: vue.withCtx(() => [
  10595. vue.createVNode(_component_u_input, {
  10596. modelValue: $setup.formData.feedbackText,
  10597. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackText = $event),
  10598. type: "textarea",
  10599. placeholder: "请输入反馈信息",
  10600. border: true,
  10601. height: "100"
  10602. }, null, 8, ["modelValue"])
  10603. ]),
  10604. _: 1
  10605. /* STABLE */
  10606. }),
  10607. vue.createCommentVNode(" 图片上传 "),
  10608. vue.createVNode(_component_u_form_item, {
  10609. label: "上传照片",
  10610. prop: "images",
  10611. borderBottom: false
  10612. }, {
  10613. default: vue.withCtx(() => [
  10614. vue.createVNode(_component_u_upload, {
  10615. fileList: $setup.formData.images,
  10616. onAfterRead: $setup.afterRead,
  10617. onDelete: $setup.deletePic,
  10618. name: "1",
  10619. multiple: "",
  10620. maxCount: 1,
  10621. imageMode: true
  10622. }, {
  10623. default: vue.withCtx(() => [
  10624. vue.createElementVNode("view", { class: "upload-slot" }, [
  10625. vue.createVNode(_component_u_icon, {
  10626. name: "plus",
  10627. size: "30"
  10628. }),
  10629. vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
  10630. ])
  10631. ]),
  10632. _: 1
  10633. /* STABLE */
  10634. }, 8, ["fileList"])
  10635. ]),
  10636. _: 1
  10637. /* STABLE */
  10638. })
  10639. ]),
  10640. _: 1
  10641. /* STABLE */
  10642. }, 8, ["model"]),
  10643. vue.createCommentVNode(" 按钮组 "),
  10644. vue.createElementVNode("view", { class: "button-group" }, [
  10645. vue.createVNode(_component_u_button, {
  10646. type: "info",
  10647. text: "取消",
  10648. plain: true,
  10649. onClick: $setup.handleCancel,
  10650. disabled: $setup.submitting
  10651. }, null, 8, ["disabled"]),
  10652. vue.createVNode(_component_u_button, {
  10653. type: "primary",
  10654. text: "确认",
  10655. onClick: $setup.handleConfirm,
  10656. loading: $setup.submitting
  10657. }, null, 8, ["loading"])
  10658. ])
  10659. ])
  10660. ]),
  10661. _: 1
  10662. /* STABLE */
  10663. }, 8, ["show", "onClose"]);
  10664. }
  10665. const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-0265fb8a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/components/feedbackPopup.vue"]]);
  10666. const _sfc_main$_ = {
  10667. __name: "index",
  10668. setup(__props, { expose: __expose }) {
  10669. __expose();
  10670. const showFeedback = vue.ref(false);
  10671. function handleFeedbackSubmit(data) {
  10672. formatAppLog("log", "at pages/book/index.vue:45", "反馈数据:", data);
  10673. }
  10674. const pageScrollRef = vue.ref(null);
  10675. const searchText = vue.ref("");
  10676. const loading = vue.ref(false);
  10677. const bookList = vue.ref([{
  10678. id: 1,
  10679. title: "公文写作教程",
  10680. isbn: "9787040515555",
  10681. price: "49.5",
  10682. isSet: false,
  10683. coverUrl: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
  10684. }]);
  10685. const isEmpty = vue.computed(() => {
  10686. return !loading.value && bookList.value.length === 0;
  10687. });
  10688. async function handleSearch() {
  10689. if (!searchText.value) {
  10690. uni.showToast({
  10691. title: "请输入ISBN",
  10692. icon: "none"
  10693. });
  10694. return;
  10695. }
  10696. await loadData();
  10697. }
  10698. function handleClear() {
  10699. bookList.value = [];
  10700. }
  10701. async function loadData() {
  10702. loading.value = true;
  10703. try {
  10704. const res = await mockSearchBooks(searchText.value);
  10705. bookList.value = res;
  10706. } catch (error2) {
  10707. uni.showToast({
  10708. title: "加载失败",
  10709. icon: "none"
  10710. });
  10711. } finally {
  10712. loading.value = false;
  10713. }
  10714. }
  10715. async function loadMore() {
  10716. if (loading.value)
  10717. return;
  10718. page.value++;
  10719. await loadData();
  10720. }
  10721. function scanCode() {
  10722. uni.scanCode({
  10723. scanType: ["barCode"],
  10724. success: (res) => {
  10725. searchText.value = res.result;
  10726. handleSearch();
  10727. },
  10728. fail: () => {
  10729. uni.showToast({
  10730. title: "扫码失败",
  10731. icon: "none"
  10732. });
  10733. }
  10734. });
  10735. }
  10736. function editBook(book) {
  10737. showFeedback.value = true;
  10738. }
  10739. function mockSearchBooks(isbn) {
  10740. return new Promise((resolve) => {
  10741. setTimeout(() => {
  10742. resolve([{
  10743. id: 1,
  10744. title: "公文写作教程",
  10745. isbn: "9787040515555",
  10746. price: "49.5",
  10747. isSet: false,
  10748. coverUrl: "/static/book-cover.jpg"
  10749. }]);
  10750. }, 1e3);
  10751. });
  10752. }
  10753. const __returned__ = { showFeedback, handleFeedbackSubmit, pageScrollRef, searchText, loading, bookList, isEmpty, handleSearch, handleClear, loadData, loadMore, scanCode, editBook, mockSearchBooks, ref: vue.ref, computed: vue.computed, PageScroll, FeedbackPopup };
  10754. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  10755. return __returned__;
  10756. }
  10757. };
  10758. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  10759. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  10760. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_2$5);
  10761. return vue.openBlock(), vue.createBlock($setup["PageScroll"], {
  10762. ref: "pageScrollRef",
  10763. loadmore: $setup.loadMore,
  10764. loading: $setup.loading,
  10765. empty: $setup.isEmpty,
  10766. emptyText: "暂无搜索结果"
  10767. }, {
  10768. default: vue.withCtx(() => [
  10769. vue.createCommentVNode(" 搜索框 "),
  10770. vue.createElementVNode("view", { class: "search-header" }, [
  10771. vue.createElementVNode("view", { class: "search-box" }, [
  10772. vue.createVNode(_component_u_icon, {
  10773. name: "scan",
  10774. size: "24",
  10775. color: "#ffffff",
  10776. onClick: $setup.scanCode
  10777. }),
  10778. vue.createVNode(_component_u_search, {
  10779. modelValue: $setup.searchText,
  10780. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  10781. placeholder: "请输入ISBN",
  10782. showAction: false,
  10783. clearabled: true,
  10784. onSearch: $setup.handleSearch,
  10785. onClear: $setup.handleClear,
  10786. bgColor: "#ffffff"
  10787. }, null, 8, ["modelValue"])
  10788. ])
  10789. ]),
  10790. vue.createCommentVNode(" 搜索结果列表 "),
  10791. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10792. key: 0,
  10793. class: "book-list"
  10794. }, [
  10795. (vue.openBlock(true), vue.createElementBlock(
  10796. vue.Fragment,
  10797. null,
  10798. vue.renderList($setup.bookList, (book, index2) => {
  10799. return vue.openBlock(), vue.createElementBlock("view", {
  10800. class: "book-item",
  10801. key: index2
  10802. }, [
  10803. vue.createElementVNode("view", { class: "book-info" }, [
  10804. vue.createElementVNode("image", {
  10805. class: "book-image",
  10806. src: book.coverUrl,
  10807. mode: "aspectFill"
  10808. }, null, 8, ["src"]),
  10809. vue.createElementVNode("view", { class: "book-details" }, [
  10810. vue.createElementVNode(
  10811. "text",
  10812. { class: "book-title" },
  10813. vue.toDisplayString(book.title),
  10814. 1
  10815. /* TEXT */
  10816. ),
  10817. vue.createElementVNode(
  10818. "text",
  10819. { class: "book-isbn" },
  10820. "ISBN: " + vue.toDisplayString(book.isbn),
  10821. 1
  10822. /* TEXT */
  10823. ),
  10824. vue.createElementVNode(
  10825. "text",
  10826. { class: "book-price" },
  10827. "定价: " + vue.toDisplayString(book.price),
  10828. 1
  10829. /* TEXT */
  10830. ),
  10831. vue.createElementVNode(
  10832. "text",
  10833. { class: "book-set" },
  10834. "套装: " + vue.toDisplayString(book.isSet ? "是" : "否"),
  10835. 1
  10836. /* TEXT */
  10837. )
  10838. ])
  10839. ]),
  10840. vue.createElementVNode("view", { class: "book-action" }, [
  10841. vue.createVNode(_component_u_icon, {
  10842. name: "edit-pen",
  10843. size: "20",
  10844. color: "#4cd964",
  10845. onClick: ($event) => $setup.editBook(book)
  10846. }, null, 8, ["onClick"])
  10847. ])
  10848. ]);
  10849. }),
  10850. 128
  10851. /* KEYED_FRAGMENT */
  10852. ))
  10853. ])) : vue.createCommentVNode("v-if", true),
  10854. vue.createVNode($setup["FeedbackPopup"], {
  10855. show: $setup.showFeedback,
  10856. "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showFeedback = $event),
  10857. onSubmit: $setup.handleFeedbackSubmit
  10858. }, null, 8, ["show"])
  10859. ]),
  10860. _: 1
  10861. /* STABLE */
  10862. }, 8, ["loading", "empty"]);
  10863. }
  10864. const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-0452ab4c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/index.vue"]]);
  10865. const props$d = {
  10866. props: {
  10867. // 标签类型info、primary、success、warning、error
  10868. type: {
  10869. type: String,
  10870. default: props$x.tag.type
  10871. },
  10872. // 不可用
  10873. disabled: {
  10874. type: [Boolean, String],
  10875. default: props$x.tag.disabled
  10876. },
  10877. // 标签的大小,large,medium,mini
  10878. size: {
  10879. type: String,
  10880. default: props$x.tag.size
  10881. },
  10882. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  10883. shape: {
  10884. type: String,
  10885. default: props$x.tag.shape
  10886. },
  10887. // 标签文字
  10888. text: {
  10889. type: [String, Number],
  10890. default: props$x.tag.text
  10891. },
  10892. // 背景颜色,默认为空字符串,即不处理
  10893. bgColor: {
  10894. type: String,
  10895. default: props$x.tag.bgColor
  10896. },
  10897. // 标签字体颜色,默认为空字符串,即不处理
  10898. color: {
  10899. type: String,
  10900. default: props$x.tag.color
  10901. },
  10902. // 标签的边框颜色
  10903. borderColor: {
  10904. type: String,
  10905. default: props$x.tag.borderColor
  10906. },
  10907. // 关闭按钮图标的颜色
  10908. closeColor: {
  10909. type: String,
  10910. default: props$x.tag.closeColor
  10911. },
  10912. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  10913. name: {
  10914. type: [String, Number],
  10915. default: props$x.tag.name
  10916. },
  10917. // // 模式选择,dark|light|plain
  10918. // mode: {
  10919. // type: String,
  10920. // default: 'light'
  10921. // },
  10922. // 镂空时是否填充背景色
  10923. plainFill: {
  10924. type: Boolean,
  10925. default: props$x.tag.plainFill
  10926. },
  10927. // 是否镂空
  10928. plain: {
  10929. type: Boolean,
  10930. default: props$x.tag.plain
  10931. },
  10932. // 是否可关闭
  10933. closable: {
  10934. type: Boolean,
  10935. default: props$x.tag.closable
  10936. },
  10937. // 是否显示
  10938. show: {
  10939. type: Boolean,
  10940. default: props$x.tag.show
  10941. },
  10942. // 内置图标,或绝对路径的图片
  10943. icon: {
  10944. type: String,
  10945. default: props$x.tag.icon
  10946. }
  10947. }
  10948. };
  10949. const _sfc_main$Z = {
  10950. name: "u-tag",
  10951. mixins: [mpMixin, mixin, props$d],
  10952. data() {
  10953. return {};
  10954. },
  10955. computed: {
  10956. style() {
  10957. const style = {};
  10958. if (this.bgColor) {
  10959. style.backgroundColor = this.bgColor;
  10960. }
  10961. if (this.color) {
  10962. style.color = this.color;
  10963. }
  10964. if (this.borderColor) {
  10965. style.borderColor = this.borderColor;
  10966. }
  10967. return style;
  10968. },
  10969. // nvue下,文本颜色无法继承父元素
  10970. textColor() {
  10971. const style = {};
  10972. if (this.color) {
  10973. style.color = this.color;
  10974. }
  10975. return style;
  10976. },
  10977. imgStyle() {
  10978. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  10979. return {
  10980. width,
  10981. height: width
  10982. };
  10983. },
  10984. // 文本的样式
  10985. closeSize() {
  10986. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  10987. return size;
  10988. },
  10989. // 图标大小
  10990. iconSize() {
  10991. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  10992. return size;
  10993. },
  10994. // 图标颜色
  10995. elIconColor() {
  10996. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  10997. }
  10998. },
  10999. methods: {
  11000. // 点击关闭按钮
  11001. closeHandler() {
  11002. this.$emit("close", this.name);
  11003. },
  11004. // 点击标签
  11005. clickHandler() {
  11006. this.$emit("click", this.name);
  11007. }
  11008. }
  11009. };
  11010. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  11011. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  11012. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  11013. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  11014. mode: "fade",
  11015. show: _ctx.show,
  11016. style: { "display": "inline-flex" }
  11017. }, {
  11018. default: vue.withCtx(() => [
  11019. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  11020. vue.createElementVNode(
  11021. "view",
  11022. {
  11023. 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`]]),
  11024. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  11025. style: vue.normalizeStyle([{
  11026. marginRight: _ctx.closable ? "10px" : 0,
  11027. marginTop: _ctx.closable ? "10px" : 0
  11028. }, $options.style])
  11029. },
  11030. [
  11031. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  11032. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  11033. key: 0,
  11034. class: "u-tag__icon"
  11035. }, [
  11036. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  11037. key: 0,
  11038. src: _ctx.icon,
  11039. style: vue.normalizeStyle([$options.imgStyle])
  11040. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  11041. key: 1,
  11042. color: $options.elIconColor,
  11043. name: _ctx.icon,
  11044. size: $options.iconSize
  11045. }, null, 8, ["color", "name", "size"]))
  11046. ])) : vue.createCommentVNode("v-if", true)
  11047. ], true),
  11048. vue.createElementVNode(
  11049. "text",
  11050. {
  11051. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  11052. style: vue.normalizeStyle([$options.textColor])
  11053. },
  11054. vue.toDisplayString(_ctx.text),
  11055. 7
  11056. /* TEXT, CLASS, STYLE */
  11057. )
  11058. ],
  11059. 6
  11060. /* CLASS, STYLE */
  11061. ),
  11062. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  11063. "view",
  11064. {
  11065. key: 0,
  11066. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  11067. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  11068. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  11069. },
  11070. [
  11071. vue.createVNode(_component_u_icon, {
  11072. name: "close",
  11073. size: $options.closeSize,
  11074. color: "#ffffff"
  11075. }, null, 8, ["size"])
  11076. ],
  11077. 6
  11078. /* CLASS, STYLE */
  11079. )) : vue.createCommentVNode("v-if", true)
  11080. ])
  11081. ]),
  11082. _: 3
  11083. /* FORWARDED */
  11084. }, 8, ["show"]);
  11085. }
  11086. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  11087. const _sfc_main$Y = {
  11088. __name: "WarehouseSelector",
  11089. props: {
  11090. show: {
  11091. type: Boolean,
  11092. default: false
  11093. }
  11094. },
  11095. emits: ["update:show", "warehouse-selected"],
  11096. setup(__props, { expose: __expose, emit: __emit }) {
  11097. __expose();
  11098. const props2 = __props;
  11099. const emit = __emit;
  11100. const searchKeyword = vue.ref("");
  11101. const searchResults = vue.ref(["河南仓", "湖北仓", "河北仓", "涨涨涨", "涨涨", "河北仓", "涨涨涨"]);
  11102. const historyWarehouses = vue.ref(["河南仓"]);
  11103. const selectedWarehouse = vue.ref("");
  11104. const handleSearch = () => {
  11105. };
  11106. const selectWarehouse = (warehouse) => {
  11107. selectedWarehouse.value = warehouse;
  11108. };
  11109. const handleClose = () => {
  11110. emit("update:show", false);
  11111. searchKeyword.value = "";
  11112. };
  11113. const handleConfirm = () => {
  11114. if (selectedWarehouse.value) {
  11115. emit("warehouse-selected", selectedWarehouse.value);
  11116. handleClose();
  11117. }
  11118. };
  11119. const __returned__ = { props: props2, emit, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, handleSearch, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
  11120. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11121. return __returned__;
  11122. }
  11123. };
  11124. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  11125. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_2$5);
  11126. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$1);
  11127. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  11128. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
  11129. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11130. show: $props.show,
  11131. onClose: $setup.handleClose,
  11132. mode: "bottom",
  11133. round: "10"
  11134. }, {
  11135. default: vue.withCtx(() => [
  11136. vue.createElementVNode("view", { class: "warehouse-selector" }, [
  11137. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  11138. vue.createCommentVNode(" 标题 "),
  11139. vue.createElementVNode("view", { class: "header" }, [
  11140. vue.createElementVNode("text", { class: "title" }, "绑定仓库")
  11141. ]),
  11142. vue.createCommentVNode(" 搜索框 "),
  11143. vue.createElementVNode("view", { class: "search-box" }, [
  11144. vue.createVNode(_component_u_search, {
  11145. modelValue: $setup.searchKeyword,
  11146. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  11147. placeholder: "搜索仓库",
  11148. "show-action": true,
  11149. "action-text": "搜索",
  11150. "action-style": "color: #4CAF50",
  11151. onSearch: $setup.handleSearch,
  11152. onCustom: $setup.handleSearch
  11153. }, null, 8, ["modelValue"])
  11154. ]),
  11155. vue.createCommentVNode(" 搜索结果 "),
  11156. $setup.searchKeyword ? (vue.openBlock(), vue.createElementBlock("view", {
  11157. key: 0,
  11158. class: "search-result"
  11159. }, [
  11160. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  11161. vue.createElementVNode("view", { class: "tag-group" }, [
  11162. (vue.openBlock(true), vue.createElementBlock(
  11163. vue.Fragment,
  11164. null,
  11165. vue.renderList($setup.searchResults, (item) => {
  11166. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11167. key: item,
  11168. text: item,
  11169. plain: "",
  11170. shape: "circle",
  11171. onClick: ($event) => $setup.selectWarehouse(item)
  11172. }, null, 8, ["text", "onClick"]);
  11173. }),
  11174. 128
  11175. /* KEYED_FRAGMENT */
  11176. ))
  11177. ])
  11178. ])) : vue.createCommentVNode("v-if", true),
  11179. vue.createCommentVNode(" 历史绑定 "),
  11180. vue.createElementVNode("view", { class: "history-section" }, [
  11181. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  11182. vue.createElementVNode("view", { class: "tag-group" }, [
  11183. (vue.openBlock(true), vue.createElementBlock(
  11184. vue.Fragment,
  11185. null,
  11186. vue.renderList($setup.historyWarehouses, (item) => {
  11187. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11188. key: item,
  11189. text: item,
  11190. plain: "",
  11191. shape: "circle",
  11192. onClick: ($event) => $setup.selectWarehouse(item)
  11193. }, null, 8, ["text", "onClick"]);
  11194. }),
  11195. 128
  11196. /* KEYED_FRAGMENT */
  11197. ))
  11198. ])
  11199. ])
  11200. ]),
  11201. vue.createCommentVNode(" 底部按钮 "),
  11202. vue.createElementVNode("view", { class: "footer" }, [
  11203. vue.createVNode(_component_u_button, {
  11204. onClick: $setup.handleClose,
  11205. text: "取消",
  11206. plain: "",
  11207. shape: "circle"
  11208. }),
  11209. vue.createVNode(_component_u_button, {
  11210. type: "primary",
  11211. onClick: $setup.handleConfirm,
  11212. text: "确定",
  11213. shape: "circle"
  11214. })
  11215. ])
  11216. ])
  11217. ]),
  11218. _: 1
  11219. /* STABLE */
  11220. }, 8, ["show"]);
  11221. }
  11222. const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-b9bd3f04"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/WarehouseSelector.vue"]]);
  11223. const _sfc_main$X = {
  11224. __name: "transfer-sign",
  11225. setup(__props, { expose: __expose }) {
  11226. __expose();
  11227. const showSelector = vue.ref(false);
  11228. const selectedWarehouse = vue.ref("");
  11229. const trackingNumber = vue.ref("");
  11230. function openWarehouseSelector() {
  11231. showSelector.value = true;
  11232. }
  11233. function handleWarehouseSelected(warehouse) {
  11234. selectedWarehouse.value = warehouse;
  11235. }
  11236. function confirmTrackingNumber() {
  11237. }
  11238. function scanCode() {
  11239. uni.scanCode({
  11240. success: (res) => {
  11241. trackingNumber.value = res.result;
  11242. formatAppLog("log", "at pages/index/express/transfer-sign.vue:50", "扫码结果:", res.result);
  11243. },
  11244. fail: (err) => {
  11245. formatAppLog("error", "at pages/index/express/transfer-sign.vue:53", "扫码失败:", err);
  11246. }
  11247. });
  11248. }
  11249. const __returned__ = { showSelector, selectedWarehouse, trackingNumber, openWarehouseSelector, handleWarehouseSelected, confirmTrackingNumber, scanCode, ref: vue.ref, WarehouseSelector };
  11250. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11251. return __returned__;
  11252. }
  11253. };
  11254. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  11255. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
  11256. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  11257. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11258. vue.createElementVNode("view", { class: "main-content" }, [
  11259. vue.createElementVNode("view", { class: "input-group" }, [
  11260. vue.createVNode(_component_u_input, {
  11261. modelValue: $setup.selectedWarehouse,
  11262. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  11263. placeholder: "请选择仓库",
  11264. readonly: "",
  11265. border: "surround"
  11266. }, null, 8, ["modelValue"]),
  11267. vue.createVNode(_component_u_button, {
  11268. type: "primary",
  11269. onClick: $setup.openWarehouseSelector,
  11270. text: "选择"
  11271. })
  11272. ]),
  11273. vue.createElementVNode("view", { class: "input-group" }, [
  11274. vue.createVNode(_component_u_input, {
  11275. modelValue: $setup.trackingNumber,
  11276. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.trackingNumber = $event),
  11277. placeholder: "扫描/输入物流单号",
  11278. border: "surround"
  11279. }, null, 8, ["modelValue"]),
  11280. vue.createVNode(_component_u_button, {
  11281. type: "primary",
  11282. onClick: $setup.confirmTrackingNumber,
  11283. text: "确定"
  11284. })
  11285. ])
  11286. ]),
  11287. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  11288. vue.createVNode(_component_u_button, {
  11289. size: "large",
  11290. type: "success",
  11291. onClick: $setup.scanCode,
  11292. text: "扫码",
  11293. class: "scan-button"
  11294. })
  11295. ]),
  11296. vue.createVNode($setup["WarehouseSelector"], {
  11297. show: $setup.showSelector,
  11298. "onUpdate:show": _cache[2] || (_cache[2] = ($event) => $setup.showSelector = $event),
  11299. onWarehouseSelected: $setup.handleWarehouseSelected
  11300. }, null, 8, ["show"])
  11301. ]);
  11302. }
  11303. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-333d344a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/transfer-sign.vue"]]);
  11304. const props$c = {
  11305. props: {
  11306. // radio的名称
  11307. name: {
  11308. type: [String, Number, Boolean],
  11309. default: props$x.radio.name
  11310. },
  11311. // 形状,square为方形,circle为圆型
  11312. shape: {
  11313. type: String,
  11314. default: props$x.radio.shape
  11315. },
  11316. // 是否禁用
  11317. disabled: {
  11318. type: [String, Boolean],
  11319. default: props$x.radio.disabled
  11320. },
  11321. // 是否禁止点击提示语选中单选框
  11322. labelDisabled: {
  11323. type: [String, Boolean],
  11324. default: props$x.radio.labelDisabled
  11325. },
  11326. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  11327. activeColor: {
  11328. type: String,
  11329. default: props$x.radio.activeColor
  11330. },
  11331. // 未选中的颜色
  11332. inactiveColor: {
  11333. type: String,
  11334. default: props$x.radio.inactiveColor
  11335. },
  11336. // 图标的大小,单位px
  11337. iconSize: {
  11338. type: [String, Number],
  11339. default: props$x.radio.iconSize
  11340. },
  11341. // label的字体大小,px单位
  11342. labelSize: {
  11343. type: [String, Number],
  11344. default: props$x.radio.labelSize
  11345. },
  11346. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  11347. label: {
  11348. type: [String, Number],
  11349. default: props$x.radio.label
  11350. },
  11351. // 整体的大小
  11352. size: {
  11353. type: [String, Number],
  11354. default: props$x.radio.size
  11355. },
  11356. // 图标颜色
  11357. color: {
  11358. type: String,
  11359. default: props$x.radio.color
  11360. },
  11361. // label的颜色
  11362. labelColor: {
  11363. type: String,
  11364. default: props$x.radio.labelColor
  11365. },
  11366. // 图标颜色
  11367. iconColor: {
  11368. type: String,
  11369. default: props$x.radio.iconColor
  11370. }
  11371. }
  11372. };
  11373. const _sfc_main$W = {
  11374. name: "u-radio",
  11375. mixins: [mpMixin, mixin, props$c],
  11376. data() {
  11377. return {
  11378. checked: false,
  11379. // 当你看到这段代码的时候,
  11380. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  11381. // 故只能使用如此方法
  11382. parentData: {
  11383. iconSize: 12,
  11384. labelDisabled: null,
  11385. disabled: null,
  11386. shape: null,
  11387. activeColor: null,
  11388. inactiveColor: null,
  11389. size: 18,
  11390. value: null,
  11391. modelValue: null,
  11392. iconColor: null,
  11393. placement: "row",
  11394. borderBottom: false,
  11395. iconPlacement: "left"
  11396. }
  11397. };
  11398. },
  11399. computed: {
  11400. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  11401. elDisabled() {
  11402. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  11403. },
  11404. // 是否禁用label点击
  11405. elLabelDisabled() {
  11406. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  11407. },
  11408. // 组件尺寸,对应size的值,默认值为21px
  11409. elSize() {
  11410. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  11411. },
  11412. // 组件的勾选图标的尺寸,默认12px
  11413. elIconSize() {
  11414. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  11415. },
  11416. // 组件选中激活时的颜色
  11417. elActiveColor() {
  11418. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  11419. },
  11420. // 组件选未中激活时的颜色
  11421. elInactiveColor() {
  11422. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  11423. },
  11424. // label的颜色
  11425. elLabelColor() {
  11426. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  11427. },
  11428. // 组件的形状
  11429. elShape() {
  11430. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  11431. },
  11432. // label大小
  11433. elLabelSize() {
  11434. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  11435. },
  11436. elIconColor() {
  11437. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  11438. if (this.elDisabled) {
  11439. return this.checked ? this.elInactiveColor : "transparent";
  11440. } else {
  11441. return this.checked ? iconColor : "transparent";
  11442. }
  11443. },
  11444. iconClasses() {
  11445. let classes = [];
  11446. classes.push("u-radio__icon-wrap--" + this.elShape);
  11447. if (this.elDisabled) {
  11448. classes.push("u-radio__icon-wrap--disabled");
  11449. }
  11450. if (this.checked && this.elDisabled) {
  11451. classes.push("u-radio__icon-wrap--disabled--checked");
  11452. }
  11453. return classes;
  11454. },
  11455. iconWrapStyle() {
  11456. const style = {};
  11457. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  11458. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  11459. style.width = uni.$u.addUnit(this.elSize);
  11460. style.height = uni.$u.addUnit(this.elSize);
  11461. if (this.parentData.iconPlacement === "right") {
  11462. style.marginRight = 0;
  11463. }
  11464. return style;
  11465. },
  11466. radioStyle() {
  11467. const style = {};
  11468. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  11469. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  11470. }
  11471. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  11472. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  11473. }
  11474. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  11475. }
  11476. },
  11477. mounted() {
  11478. this.init();
  11479. },
  11480. methods: {
  11481. init() {
  11482. this.updateParentData();
  11483. if (!this.parent) {
  11484. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  11485. }
  11486. this.checked = this.name === this.parentData.modelValue;
  11487. },
  11488. updateParentData() {
  11489. this.getParentData("u-radio-group");
  11490. },
  11491. // 点击图标
  11492. iconClickHandler(e) {
  11493. this.preventEvent(e);
  11494. if (!this.elDisabled) {
  11495. this.setRadioCheckedStatus();
  11496. }
  11497. },
  11498. // 横向两端排列时,点击组件即可触发选中事件
  11499. wrapperClickHandler(e) {
  11500. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  11501. },
  11502. // 点击label
  11503. labelClickHandler(e) {
  11504. this.preventEvent(e);
  11505. if (!this.elLabelDisabled && !this.elDisabled) {
  11506. this.setRadioCheckedStatus();
  11507. }
  11508. },
  11509. emitEvent() {
  11510. if (!this.checked) {
  11511. this.$emit("change", this.name);
  11512. this.$nextTick(() => {
  11513. uni.$u.formValidate(this, "change");
  11514. });
  11515. }
  11516. },
  11517. // 改变组件选中状态
  11518. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  11519. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  11520. setRadioCheckedStatus() {
  11521. this.emitEvent();
  11522. this.checked = true;
  11523. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  11524. }
  11525. }
  11526. };
  11527. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  11528. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  11529. return vue.openBlock(), vue.createElementBlock(
  11530. "view",
  11531. {
  11532. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  11533. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  11534. style: vue.normalizeStyle([$options.radioStyle])
  11535. },
  11536. [
  11537. vue.createElementVNode(
  11538. "view",
  11539. {
  11540. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  11541. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  11542. style: vue.normalizeStyle([$options.iconWrapStyle])
  11543. },
  11544. [
  11545. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  11546. vue.createVNode(_component_u_icon, {
  11547. class: "u-radio__icon-wrap__icon",
  11548. name: "checkbox-mark",
  11549. size: $options.elIconSize,
  11550. color: $options.elIconColor
  11551. }, null, 8, ["size", "color"])
  11552. ], true)
  11553. ],
  11554. 6
  11555. /* CLASS, STYLE */
  11556. ),
  11557. vue.createElementVNode(
  11558. "text",
  11559. {
  11560. class: "u-radio__text",
  11561. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  11562. style: vue.normalizeStyle({
  11563. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  11564. fontSize: $options.elLabelSize,
  11565. lineHeight: $options.elLabelSize
  11566. })
  11567. },
  11568. vue.toDisplayString(_ctx.label),
  11569. 5
  11570. /* TEXT, STYLE */
  11571. )
  11572. ],
  11573. 6
  11574. /* CLASS, STYLE */
  11575. );
  11576. }
  11577. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__scopeId", "data-v-83036558"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  11578. const props$b = {
  11579. props: {
  11580. // 绑定的值
  11581. modelValue: {
  11582. type: [String, Number, Boolean],
  11583. default: props$x.radioGroup.value
  11584. },
  11585. // 是否禁用全部radio
  11586. disabled: {
  11587. type: Boolean,
  11588. default: props$x.radioGroup.disabled
  11589. },
  11590. // 形状,circle-圆形,square-方形
  11591. shape: {
  11592. type: String,
  11593. default: props$x.radioGroup.shape
  11594. },
  11595. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  11596. activeColor: {
  11597. type: String,
  11598. default: props$x.radioGroup.activeColor
  11599. },
  11600. // 未选中的颜色
  11601. inactiveColor: {
  11602. type: String,
  11603. default: props$x.radioGroup.inactiveColor
  11604. },
  11605. // 标识符
  11606. name: {
  11607. type: String,
  11608. default: props$x.radioGroup.name
  11609. },
  11610. // 整个组件的尺寸,默认px
  11611. size: {
  11612. type: [String, Number],
  11613. default: props$x.radioGroup.size
  11614. },
  11615. // 布局方式,row-横向,column-纵向
  11616. placement: {
  11617. type: String,
  11618. default: props$x.radioGroup.placement
  11619. },
  11620. // label的文本
  11621. label: {
  11622. type: [String],
  11623. default: props$x.radioGroup.label
  11624. },
  11625. // label的颜色 (默认 '#303133' )
  11626. labelColor: {
  11627. type: [String],
  11628. default: props$x.radioGroup.labelColor
  11629. },
  11630. // label的字体大小,px单位
  11631. labelSize: {
  11632. type: [String, Number],
  11633. default: props$x.radioGroup.labelSize
  11634. },
  11635. // 是否禁止点击文本操作checkbox(默认 false )
  11636. labelDisabled: {
  11637. type: Boolean,
  11638. default: props$x.radioGroup.labelDisabled
  11639. },
  11640. // 图标颜色
  11641. iconColor: {
  11642. type: String,
  11643. default: props$x.radioGroup.iconColor
  11644. },
  11645. // 图标的大小,单位px
  11646. iconSize: {
  11647. type: [String, Number],
  11648. default: props$x.radioGroup.iconSize
  11649. },
  11650. // 竖向配列时,是否显示下划线
  11651. borderBottom: {
  11652. type: Boolean,
  11653. default: props$x.radioGroup.borderBottom
  11654. },
  11655. // 图标与文字的对齐方式
  11656. iconPlacement: {
  11657. type: String,
  11658. default: props$x.radio.iconPlacement
  11659. }
  11660. }
  11661. };
  11662. const _sfc_main$V = {
  11663. name: "u-radio-group",
  11664. mixins: [mpMixin, mixin, props$b],
  11665. computed: {
  11666. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  11667. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  11668. // 拉取父组件新的变化后的参数
  11669. parentData() {
  11670. return [
  11671. this.modelValue,
  11672. this.disabled,
  11673. this.inactiveColor,
  11674. this.activeColor,
  11675. this.size,
  11676. this.labelDisabled,
  11677. this.shape,
  11678. this.iconSize,
  11679. this.borderBottom,
  11680. this.placement
  11681. ];
  11682. },
  11683. bemClass() {
  11684. return this.bem("radio-group", ["placement"]);
  11685. }
  11686. },
  11687. watch: {
  11688. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  11689. parentData() {
  11690. if (this.children.length) {
  11691. this.children.map((child) => {
  11692. typeof child.init === "function" && child.init();
  11693. });
  11694. }
  11695. }
  11696. },
  11697. data() {
  11698. return {};
  11699. },
  11700. created() {
  11701. this.children = [];
  11702. },
  11703. emits: ["update:modelValue", "change"],
  11704. methods: {
  11705. // 将其他的radio设置为未选中的状态
  11706. unCheckedOther(childInstance) {
  11707. this.children.map((child) => {
  11708. if (childInstance !== child) {
  11709. child.checked = false;
  11710. }
  11711. });
  11712. const {
  11713. name
  11714. } = childInstance;
  11715. this.$emit("update:modelValue", name);
  11716. this.$emit("change", name);
  11717. }
  11718. }
  11719. };
  11720. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  11721. return vue.openBlock(), vue.createElementBlock(
  11722. "view",
  11723. {
  11724. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  11725. },
  11726. [
  11727. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  11728. ],
  11729. 2
  11730. /* CLASS */
  11731. );
  11732. }
  11733. const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  11734. const props$a = {
  11735. props: {
  11736. // 是否虚线
  11737. dashed: {
  11738. type: Boolean,
  11739. default: props$x.divider.dashed
  11740. },
  11741. // 是否细线
  11742. hairline: {
  11743. type: Boolean,
  11744. default: props$x.divider.hairline
  11745. },
  11746. // 是否以点替代文字,优先于text字段起作用
  11747. dot: {
  11748. type: Boolean,
  11749. default: props$x.divider.dot
  11750. },
  11751. // 内容文本的位置,left-左边,center-中间,right-右边
  11752. textPosition: {
  11753. type: String,
  11754. default: props$x.divider.textPosition
  11755. },
  11756. // 文本内容
  11757. text: {
  11758. type: [String, Number],
  11759. default: props$x.divider.text
  11760. },
  11761. // 文本大小
  11762. textSize: {
  11763. type: [String, Number],
  11764. default: props$x.divider.textSize
  11765. },
  11766. // 文本颜色
  11767. textColor: {
  11768. type: String,
  11769. default: props$x.divider.textColor
  11770. },
  11771. // 线条颜色
  11772. lineColor: {
  11773. type: String,
  11774. default: props$x.divider.lineColor
  11775. }
  11776. }
  11777. };
  11778. const _sfc_main$U = {
  11779. name: "u-divider",
  11780. mixins: [mpMixin, mixin, props$a],
  11781. computed: {
  11782. textStyle() {
  11783. const style = {};
  11784. style.fontSize = uni.$u.addUnit(this.textSize);
  11785. style.color = this.textColor;
  11786. return style;
  11787. },
  11788. // 左边线条的的样式
  11789. leftLineStyle() {
  11790. const style = {};
  11791. if (this.textPosition === "left") {
  11792. style.width = "80rpx";
  11793. } else {
  11794. style.flex = 1;
  11795. }
  11796. return style;
  11797. },
  11798. // 右边线条的的样式
  11799. rightLineStyle() {
  11800. const style = {};
  11801. if (this.textPosition === "right") {
  11802. style.width = "80rpx";
  11803. } else {
  11804. style.flex = 1;
  11805. }
  11806. return style;
  11807. }
  11808. },
  11809. methods: {
  11810. // divider组件被点击时触发
  11811. click() {
  11812. this.$emit("click");
  11813. }
  11814. }
  11815. };
  11816. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  11817. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
  11818. return vue.openBlock(), vue.createElementBlock(
  11819. "view",
  11820. {
  11821. class: "u-divider",
  11822. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  11823. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  11824. },
  11825. [
  11826. vue.createVNode(_component_u_line, {
  11827. color: _ctx.lineColor,
  11828. customStyle: $options.leftLineStyle,
  11829. hairline: _ctx.hairline,
  11830. dashed: _ctx.dashed
  11831. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  11832. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  11833. key: 0,
  11834. class: "u-divider__dot"
  11835. }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  11836. "text",
  11837. {
  11838. key: 1,
  11839. class: "u-divider__text",
  11840. style: vue.normalizeStyle([$options.textStyle])
  11841. },
  11842. vue.toDisplayString(_ctx.text),
  11843. 5
  11844. /* TEXT, STYLE */
  11845. )) : vue.createCommentVNode("v-if", true),
  11846. vue.createVNode(_component_u_line, {
  11847. color: _ctx.lineColor,
  11848. customStyle: $options.rightLineStyle,
  11849. hairline: _ctx.hairline,
  11850. dashed: _ctx.dashed
  11851. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  11852. ],
  11853. 4
  11854. /* STYLE */
  11855. );
  11856. }
  11857. const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-ea022cee"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  11858. const _sfc_main$T = {
  11859. __name: "quick-check",
  11860. setup(__props, { expose: __expose }) {
  11861. __expose();
  11862. const queryType = vue.ref("order");
  11863. const searchKeyword = vue.ref("");
  11864. const selectedBatch = vue.ref("");
  11865. const selectedBatchId = vue.ref("");
  11866. const showBatchSelector = vue.ref(false);
  11867. const count = vue.ref(0);
  11868. const batchList = vue.ref([
  11869. {
  11870. id: "1",
  11871. date: "202401601",
  11872. count: "0"
  11873. },
  11874. {
  11875. id: "2",
  11876. date: "202401605",
  11877. count: "265"
  11878. },
  11879. {
  11880. id: "3",
  11881. date: "202405601",
  11882. count: "111"
  11883. },
  11884. {
  11885. id: "4",
  11886. date: "202405601",
  11887. count: "111"
  11888. }
  11889. ]);
  11890. const openBatchSelector = () => {
  11891. showBatchSelector.value = true;
  11892. };
  11893. const selectBatch = (batch) => {
  11894. selectedBatchId.value = batch.id;
  11895. selectedBatch.value = `${batch.date} ${batch.count}`;
  11896. count.value = Number(batch.count);
  11897. };
  11898. const confirmBatch = () => {
  11899. showBatchSelector.value = false;
  11900. };
  11901. const handleSearch = () => {
  11902. formatAppLog("log", "at pages/index/express/quick-check.vue:125", "查询:", searchKeyword.value);
  11903. };
  11904. const handleScan = () => {
  11905. uni.scanCode({
  11906. success: (res) => {
  11907. searchKeyword.value = res.result;
  11908. handleSearch();
  11909. }
  11910. });
  11911. };
  11912. const handleSubmitBatch = () => {
  11913. formatAppLog("log", "at pages/index/express/quick-check.vue:140", "提交批次");
  11914. };
  11915. const __returned__ = { queryType, searchKeyword, selectedBatch, selectedBatchId, showBatchSelector, count, batchList, openBatchSelector, selectBatch, confirmBatch, handleSearch, handleScan, handleSubmitBatch, ref: vue.ref };
  11916. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11917. return __returned__;
  11918. }
  11919. };
  11920. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  11921. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  11922. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
  11923. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_2);
  11924. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_3$1);
  11925. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  11926. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_5);
  11927. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
  11928. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11929. vue.createCommentVNode(" 批次选择区域 "),
  11930. vue.createElementVNode("view", { class: "select-section" }, [
  11931. vue.createElementVNode("view", { class: "batch-select" }, [
  11932. vue.createElementVNode("text", { class: "required" }, "*"),
  11933. vue.createElementVNode("text", null, "批次:"),
  11934. vue.createVNode(_component_u_input, {
  11935. modelValue: $setup.selectedBatch,
  11936. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedBatch = $event),
  11937. placeholder: "请选择/新建批次",
  11938. readonly: "",
  11939. border: "surround",
  11940. onClick: $setup.openBatchSelector
  11941. }, {
  11942. suffix: vue.withCtx(() => [
  11943. vue.createVNode(_component_u_icon, {
  11944. name: "arrow-down",
  11945. size: "14"
  11946. })
  11947. ]),
  11948. _: 1
  11949. /* STABLE */
  11950. }, 8, ["modelValue"])
  11951. ])
  11952. ]),
  11953. vue.createCommentVNode(" 数量显示 "),
  11954. vue.createElementVNode(
  11955. "view",
  11956. { class: "count-badge" },
  11957. " 数量" + vue.toDisplayString($setup.count),
  11958. 1
  11959. /* TEXT */
  11960. ),
  11961. vue.createCommentVNode(" 底部按钮 "),
  11962. vue.createElementVNode("view", { class: "footer" }, [
  11963. vue.createCommentVNode(" 查询区域 "),
  11964. vue.createElementVNode("view", { class: "query-section" }, [
  11965. vue.createVNode(_component_u_radio_group, {
  11966. modelValue: $setup.queryType,
  11967. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.queryType = $event)
  11968. }, {
  11969. default: vue.withCtx(() => [
  11970. vue.createVNode(_component_u_radio, {
  11971. label: "查订单",
  11972. name: "order"
  11973. }),
  11974. vue.createVNode(_component_u_radio, {
  11975. label: "查物流",
  11976. "custom-style": "margin-left:20px",
  11977. name: "logistics"
  11978. })
  11979. ]),
  11980. _: 1
  11981. /* STABLE */
  11982. }, 8, ["modelValue"]),
  11983. vue.createElementVNode("view", { class: "search-box" }, [
  11984. vue.createVNode(_component_u_input, {
  11985. "custom-style": "width:100rpx",
  11986. modelValue: $setup.searchKeyword,
  11987. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.searchKeyword = $event),
  11988. placeholder: "扫描/输入物流单号",
  11989. border: "surround",
  11990. clearable: ""
  11991. }, null, 8, ["modelValue"]),
  11992. vue.createVNode(_component_u_button, {
  11993. color: "#c8c8c8",
  11994. text: "查询",
  11995. onClick: $setup.handleSearch
  11996. })
  11997. ])
  11998. ]),
  11999. vue.createVNode(_component_u_divider),
  12000. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  12001. vue.createVNode(_component_u_button, {
  12002. size: "large",
  12003. type: "warning",
  12004. text: "验收扫码",
  12005. onClick: $setup.handleScan
  12006. }),
  12007. vue.createVNode(_component_u_button, {
  12008. size: "large",
  12009. type: "primary",
  12010. text: "提交批次",
  12011. onClick: $setup.handleSubmitBatch
  12012. })
  12013. ])
  12014. ]),
  12015. vue.createCommentVNode(" 批次选择弹窗 "),
  12016. vue.createVNode(_component_u_popup, {
  12017. show: $setup.showBatchSelector,
  12018. mode: "bottom",
  12019. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
  12020. }, {
  12021. default: vue.withCtx(() => [
  12022. vue.createElementVNode("view", { class: "batch-popup" }, [
  12023. vue.createElementVNode("view", { class: "popup-header" }, [
  12024. vue.createElementVNode("text", null, "批次"),
  12025. vue.createElementVNode("view", { class: "header-right" }, [
  12026. vue.createElementVNode("text", { class: "new-batch" }, "新建批次"),
  12027. vue.createVNode(_component_u_button, {
  12028. type: "primary",
  12029. text: "确定",
  12030. onClick: $setup.confirmBatch
  12031. })
  12032. ])
  12033. ]),
  12034. vue.createElementVNode("scroll-view", {
  12035. "scroll-y": "",
  12036. class: "batch-list"
  12037. }, [
  12038. (vue.openBlock(true), vue.createElementBlock(
  12039. vue.Fragment,
  12040. null,
  12041. vue.renderList($setup.batchList, (batch) => {
  12042. return vue.openBlock(), vue.createElementBlock("view", {
  12043. key: batch.id,
  12044. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
  12045. onClick: ($event) => $setup.selectBatch(batch)
  12046. }, [
  12047. vue.createElementVNode(
  12048. "text",
  12049. null,
  12050. vue.toDisplayString(batch.date),
  12051. 1
  12052. /* TEXT */
  12053. ),
  12054. vue.createElementVNode(
  12055. "text",
  12056. null,
  12057. vue.toDisplayString(batch.count),
  12058. 1
  12059. /* TEXT */
  12060. )
  12061. ], 10, ["onClick"]);
  12062. }),
  12063. 128
  12064. /* KEYED_FRAGMENT */
  12065. ))
  12066. ])
  12067. ])
  12068. ]),
  12069. _: 1
  12070. /* STABLE */
  12071. }, 8, ["show"])
  12072. ]);
  12073. }
  12074. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-61cc11f4"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-check.vue"]]);
  12075. const _sfc_main$S = {
  12076. __name: "quick-unpack",
  12077. setup(__props, { expose: __expose }) {
  12078. __expose();
  12079. const trackingNumber = vue.ref("");
  12080. function confirmTrackingNumber() {
  12081. }
  12082. function scanCode() {
  12083. uni.scanCode({
  12084. success: (res) => {
  12085. trackingNumber.value = res.result;
  12086. formatAppLog("log", "at pages/index/express/quick-unpack.vue:32", "扫码结果:", res.result);
  12087. },
  12088. fail: (err) => {
  12089. formatAppLog("error", "at pages/index/express/quick-unpack.vue:35", "扫码失败:", err);
  12090. }
  12091. });
  12092. }
  12093. const __returned__ = { trackingNumber, confirmTrackingNumber, scanCode, ref: vue.ref };
  12094. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12095. return __returned__;
  12096. }
  12097. };
  12098. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  12099. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
  12100. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  12101. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12102. vue.createElementVNode("view", { class: "main-content" }, [
  12103. vue.createElementVNode("view", { class: "input-group" }, [
  12104. vue.createVNode(_component_u_input, {
  12105. modelValue: $setup.trackingNumber,
  12106. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.trackingNumber = $event),
  12107. placeholder: "扫描/输入物流单号",
  12108. border: "surround"
  12109. }, null, 8, ["modelValue"]),
  12110. vue.createVNode(_component_u_button, {
  12111. type: "primary",
  12112. onClick: $setup.confirmTrackingNumber,
  12113. text: "确定"
  12114. })
  12115. ])
  12116. ]),
  12117. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  12118. vue.createVNode(_component_u_button, {
  12119. size: "large",
  12120. type: "success",
  12121. onClick: $setup.scanCode,
  12122. text: "扫码",
  12123. class: "scan-button"
  12124. })
  12125. ])
  12126. ]);
  12127. }
  12128. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-unpack.vue"]]);
  12129. const props$9 = {
  12130. props: {
  12131. // tab的数据
  12132. list: {
  12133. type: Array,
  12134. default: props$x.subsection.list
  12135. },
  12136. // 当前活动的tab的index
  12137. current: {
  12138. type: [String, Number],
  12139. default: props$x.subsection.current
  12140. },
  12141. // 激活的颜色
  12142. activeColor: {
  12143. type: String,
  12144. default: props$x.subsection.activeColor
  12145. },
  12146. // 未激活的颜色
  12147. inactiveColor: {
  12148. type: String,
  12149. default: props$x.subsection.inactiveColor
  12150. },
  12151. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  12152. mode: {
  12153. type: String,
  12154. default: props$x.subsection.mode
  12155. },
  12156. // 字体大小
  12157. fontSize: {
  12158. type: [String, Number],
  12159. default: props$x.subsection.fontSize
  12160. },
  12161. // 激活tab的字体是否加粗
  12162. bold: {
  12163. type: Boolean,
  12164. default: props$x.subsection.bold
  12165. },
  12166. // mode = button时,组件背景颜色
  12167. bgColor: {
  12168. type: String,
  12169. default: props$x.subsection.bgColor
  12170. },
  12171. // 从list元素对象中读取的键名
  12172. keyName: {
  12173. type: String,
  12174. default: props$x.subsection.keyName
  12175. }
  12176. }
  12177. };
  12178. const _sfc_main$R = {
  12179. name: "u-subsection",
  12180. mixins: [mpMixin, mixin, props$9],
  12181. data() {
  12182. return {
  12183. // 组件尺寸
  12184. itemRect: {
  12185. width: 0,
  12186. height: 0
  12187. }
  12188. };
  12189. },
  12190. watch: {
  12191. list(newValue, oldValue) {
  12192. this.init();
  12193. },
  12194. current: {
  12195. immediate: true,
  12196. handler(n) {
  12197. }
  12198. }
  12199. },
  12200. computed: {
  12201. wrapperStyle() {
  12202. const style = {};
  12203. if (this.mode === "button") {
  12204. style.backgroundColor = this.bgColor;
  12205. }
  12206. return style;
  12207. },
  12208. // 滑块的样式
  12209. barStyle() {
  12210. const style = {};
  12211. style.width = `${this.itemRect.width}px`;
  12212. style.height = `${this.itemRect.height}px`;
  12213. style.transform = `translateX(${this.current * this.itemRect.width}px)`;
  12214. if (this.mode === "subsection") {
  12215. style.backgroundColor = this.activeColor;
  12216. }
  12217. return style;
  12218. },
  12219. // 分段器item的样式
  12220. itemStyle(index2) {
  12221. return (index3) => {
  12222. const style = {};
  12223. if (this.mode === "subsection") {
  12224. style.borderColor = this.activeColor;
  12225. style.borderWidth = "1px";
  12226. style.borderStyle = "solid";
  12227. }
  12228. return style;
  12229. };
  12230. },
  12231. // 分段器文字颜色
  12232. textStyle(index2) {
  12233. return (index3) => {
  12234. const style = {};
  12235. style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
  12236. style.fontSize = uni.$u.addUnit(this.fontSize);
  12237. if (this.mode === "subsection") {
  12238. style.color = this.current === index3 ? "#fff" : this.inactiveColor;
  12239. } else {
  12240. style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
  12241. }
  12242. return style;
  12243. };
  12244. }
  12245. },
  12246. mounted() {
  12247. this.init();
  12248. },
  12249. methods: {
  12250. init() {
  12251. uni.$u.sleep().then(() => this.getRect());
  12252. },
  12253. // 判断展示文本
  12254. getText(item) {
  12255. return typeof item === "object" ? item[this.keyName] : item;
  12256. },
  12257. // 获取组件的尺寸
  12258. getRect() {
  12259. this.$uGetRect(".u-subsection__item--0").then((size) => {
  12260. this.itemRect = size;
  12261. });
  12262. },
  12263. clickHandler(index2) {
  12264. this.$emit("change", index2);
  12265. }
  12266. }
  12267. };
  12268. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  12269. return vue.openBlock(), vue.createElementBlock(
  12270. "view",
  12271. {
  12272. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  12273. ref: "u-subsection",
  12274. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
  12275. },
  12276. [
  12277. vue.createElementVNode(
  12278. "view",
  12279. {
  12280. class: vue.normalizeClass(["u-subsection__bar", [
  12281. _ctx.mode === "button" && "u-subsection--button__bar",
  12282. _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  12283. _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  12284. _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  12285. ]]),
  12286. ref: "u-subsection__bar",
  12287. style: vue.normalizeStyle([$options.barStyle])
  12288. },
  12289. null,
  12290. 6
  12291. /* CLASS, STYLE */
  12292. ),
  12293. (vue.openBlock(true), vue.createElementBlock(
  12294. vue.Fragment,
  12295. null,
  12296. vue.renderList(_ctx.list, (item, index2) => {
  12297. return vue.openBlock(), vue.createElementBlock("view", {
  12298. class: vue.normalizeClass(["u-subsection__item", [
  12299. `u-subsection__item--${index2}`,
  12300. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  12301. index2 === 0 && "u-subsection__item--first",
  12302. index2 === _ctx.list.length - 1 && "u-subsection__item--last"
  12303. ]]),
  12304. ref_for: true,
  12305. ref: `u-subsection__item--${index2}`,
  12306. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  12307. onClick: ($event) => $options.clickHandler(index2),
  12308. key: index2
  12309. }, [
  12310. vue.createElementVNode(
  12311. "text",
  12312. {
  12313. class: "u-subsection__item__text",
  12314. style: vue.normalizeStyle([$options.textStyle(index2)])
  12315. },
  12316. vue.toDisplayString($options.getText(item)),
  12317. 5
  12318. /* TEXT, STYLE */
  12319. )
  12320. ], 14, ["onClick"]);
  12321. }),
  12322. 128
  12323. /* KEYED_FRAGMENT */
  12324. ))
  12325. ],
  12326. 6
  12327. /* CLASS, STYLE */
  12328. );
  12329. }
  12330. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-b5ccb67e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  12331. const props$8 = {
  12332. props: {
  12333. // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  12334. status: {
  12335. type: String,
  12336. default: props$x.loadmore.status
  12337. },
  12338. // 组件背景色
  12339. bgColor: {
  12340. type: String,
  12341. default: props$x.loadmore.bgColor
  12342. },
  12343. // 是否显示加载中的图标
  12344. icon: {
  12345. type: Boolean,
  12346. default: props$x.loadmore.icon
  12347. },
  12348. // 字体大小
  12349. fontSize: {
  12350. type: [String, Number],
  12351. default: props$x.loadmore.fontSize
  12352. },
  12353. // 图标大小
  12354. iconSize: {
  12355. type: [String, Number],
  12356. default: props$x.loadmore.iconSize
  12357. },
  12358. // 字体颜色
  12359. color: {
  12360. type: String,
  12361. default: props$x.loadmore.color
  12362. },
  12363. // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
  12364. loadingIcon: {
  12365. type: String,
  12366. default: props$x.loadmore.loadingIcon
  12367. },
  12368. // 加载前的提示语
  12369. loadmoreText: {
  12370. type: String,
  12371. default: props$x.loadmore.loadmoreText
  12372. },
  12373. // 加载中提示语
  12374. loadingText: {
  12375. type: String,
  12376. default: props$x.loadmore.loadingText
  12377. },
  12378. // 没有更多的提示语
  12379. nomoreText: {
  12380. type: String,
  12381. default: props$x.loadmore.nomoreText
  12382. },
  12383. // 在“没有更多”状态下,是否显示粗点
  12384. isDot: {
  12385. type: Boolean,
  12386. default: props$x.loadmore.isDot
  12387. },
  12388. // 加载中图标的颜色
  12389. iconColor: {
  12390. type: String,
  12391. default: props$x.loadmore.iconColor
  12392. },
  12393. // 上边距
  12394. marginTop: {
  12395. type: [String, Number],
  12396. default: props$x.loadmore.marginTop
  12397. },
  12398. // 下边距
  12399. marginBottom: {
  12400. type: [String, Number],
  12401. default: props$x.loadmore.marginBottom
  12402. },
  12403. // 高度,单位px
  12404. height: {
  12405. type: [String, Number],
  12406. default: props$x.loadmore.height
  12407. },
  12408. // 是否显示左边分割线
  12409. line: {
  12410. type: Boolean,
  12411. default: props$x.loadmore.line
  12412. },
  12413. // 线条颜色
  12414. lineColor: {
  12415. type: String,
  12416. default: props$x.loadmore.lineColor
  12417. },
  12418. // 是否虚线,true-虚线,false-实线
  12419. dashed: {
  12420. type: Boolean,
  12421. default: props$x.loadmore.dashed
  12422. }
  12423. }
  12424. };
  12425. const _sfc_main$Q = {
  12426. name: "u-loadmore",
  12427. mixins: [mpMixin, mixin, props$8],
  12428. data() {
  12429. return {
  12430. // 粗点
  12431. dotText: "●"
  12432. };
  12433. },
  12434. computed: {
  12435. // 加载的文字显示的样式
  12436. loadTextStyle() {
  12437. return {
  12438. color: this.color,
  12439. fontSize: uni.$u.addUnit(this.fontSize),
  12440. lineHeight: uni.$u.addUnit(this.fontSize),
  12441. backgroundColor: this.bgColor
  12442. };
  12443. },
  12444. // 显示的提示文字
  12445. showText() {
  12446. let text = "";
  12447. if (this.status == "loadmore")
  12448. text = this.loadmoreText;
  12449. else if (this.status == "loading")
  12450. text = this.loadingText;
  12451. else if (this.status == "nomore" && this.isDot)
  12452. text = this.dotText;
  12453. else
  12454. text = this.nomoreText;
  12455. return text;
  12456. }
  12457. },
  12458. methods: {
  12459. loadMore() {
  12460. if (this.status == "loadmore")
  12461. this.$emit("loadmore");
  12462. }
  12463. }
  12464. };
  12465. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  12466. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
  12467. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
  12468. return vue.openBlock(), vue.createElementBlock(
  12469. "view",
  12470. {
  12471. class: "u-loadmore",
  12472. style: vue.normalizeStyle([
  12473. _ctx.$u.addStyle(_ctx.customStyle),
  12474. {
  12475. backgroundColor: _ctx.bgColor,
  12476. marginBottom: _ctx.$u.addUnit(_ctx.marginBottom),
  12477. marginTop: _ctx.$u.addUnit(_ctx.marginTop),
  12478. height: _ctx.$u.addUnit(_ctx.height)
  12479. }
  12480. ])
  12481. },
  12482. [
  12483. _ctx.line ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  12484. key: 0,
  12485. length: "140rpx",
  12486. color: _ctx.lineColor,
  12487. hairline: false,
  12488. dashed: _ctx.dashed
  12489. }, null, 8, ["color", "dashed"])) : vue.createCommentVNode("v-if", true),
  12490. vue.createCommentVNode(" 加载中和没有更多的状态才显示两边的横线 "),
  12491. vue.createElementVNode(
  12492. "view",
  12493. {
  12494. class: vue.normalizeClass([_ctx.status == "loadmore" || _ctx.status == "nomore" ? "u-more" : "", "u-loadmore__content"])
  12495. },
  12496. [
  12497. _ctx.status === "loading" && _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  12498. key: 0,
  12499. class: "u-loadmore__content__icon-wrap"
  12500. }, [
  12501. vue.createVNode(_component_u_loading_icon, {
  12502. color: _ctx.iconColor,
  12503. size: _ctx.iconSize,
  12504. mode: _ctx.loadingIcon
  12505. }, null, 8, ["color", "size", "mode"])
  12506. ])) : vue.createCommentVNode("v-if", true),
  12507. vue.createCommentVNode(" 如果没有更多的状态下,显示内容为dot(粗点),加载特定样式 "),
  12508. vue.createElementVNode(
  12509. "text",
  12510. {
  12511. class: vue.normalizeClass(["u-line-1", [_ctx.status == "nomore" && _ctx.isDot == true ? "u-loadmore__content__dot-text" : "u-loadmore__content__text"]]),
  12512. style: vue.normalizeStyle([$options.loadTextStyle]),
  12513. onClick: _cache[0] || (_cache[0] = (...args) => $options.loadMore && $options.loadMore(...args))
  12514. },
  12515. vue.toDisplayString($options.showText),
  12516. 7
  12517. /* TEXT, CLASS, STYLE */
  12518. )
  12519. ],
  12520. 2
  12521. /* CLASS */
  12522. ),
  12523. _ctx.line ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  12524. key: 1,
  12525. length: "140rpx",
  12526. color: _ctx.lineColor,
  12527. hairline: false,
  12528. dashed: _ctx.dashed
  12529. }, null, 8, ["color", "dashed"])) : vue.createCommentVNode("v-if", true)
  12530. ],
  12531. 4
  12532. /* STYLE */
  12533. );
  12534. }
  12535. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-4ccc1478"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-loadmore/u-loadmore.vue"]]);
  12536. const props$7 = {
  12537. props: {
  12538. // 是否展示modal
  12539. show: {
  12540. type: Boolean,
  12541. default: props$x.modal.show
  12542. },
  12543. // 标题
  12544. title: {
  12545. type: [String],
  12546. default: props$x.modal.title
  12547. },
  12548. // 弹窗内容
  12549. content: {
  12550. type: String,
  12551. default: props$x.modal.content
  12552. },
  12553. // 确认文案
  12554. confirmText: {
  12555. type: String,
  12556. default: props$x.modal.confirmText
  12557. },
  12558. // 取消文案
  12559. cancelText: {
  12560. type: String,
  12561. default: props$x.modal.cancelText
  12562. },
  12563. // 是否显示确认按钮
  12564. showConfirmButton: {
  12565. type: Boolean,
  12566. default: props$x.modal.showConfirmButton
  12567. },
  12568. // 是否显示取消按钮
  12569. showCancelButton: {
  12570. type: Boolean,
  12571. default: props$x.modal.showCancelButton
  12572. },
  12573. // 确认按钮颜色
  12574. confirmColor: {
  12575. type: String,
  12576. default: props$x.modal.confirmColor
  12577. },
  12578. // 取消文字颜色
  12579. cancelColor: {
  12580. type: String,
  12581. default: props$x.modal.cancelColor
  12582. },
  12583. // 对调确认和取消的位置
  12584. buttonReverse: {
  12585. type: Boolean,
  12586. default: props$x.modal.buttonReverse
  12587. },
  12588. // 是否开启缩放效果
  12589. zoom: {
  12590. type: Boolean,
  12591. default: props$x.modal.zoom
  12592. },
  12593. // 是否异步关闭,只对确定按钮有效
  12594. asyncClose: {
  12595. type: Boolean,
  12596. default: props$x.modal.asyncClose
  12597. },
  12598. // 是否允许点击遮罩关闭modal
  12599. closeOnClickOverlay: {
  12600. type: Boolean,
  12601. default: props$x.modal.closeOnClickOverlay
  12602. },
  12603. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  12604. negativeTop: {
  12605. type: [String, Number],
  12606. default: props$x.modal.negativeTop
  12607. },
  12608. // modal宽度,不支持百分比,可以数值,px,rpx单位
  12609. width: {
  12610. type: [String, Number],
  12611. default: props$x.modal.width
  12612. },
  12613. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  12614. confirmButtonShape: {
  12615. type: String,
  12616. default: props$x.modal.confirmButtonShape
  12617. }
  12618. }
  12619. };
  12620. const _sfc_main$P = {
  12621. name: "u-modal",
  12622. mixins: [mpMixin, mixin, props$7],
  12623. data() {
  12624. return {
  12625. loading: false
  12626. };
  12627. },
  12628. watch: {
  12629. show(n) {
  12630. if (n && this.loading)
  12631. this.loading = false;
  12632. }
  12633. },
  12634. methods: {
  12635. // 点击确定按钮
  12636. confirmHandler() {
  12637. if (this.asyncClose) {
  12638. this.loading = true;
  12639. }
  12640. this.$emit("confirm");
  12641. },
  12642. // 点击取消按钮
  12643. cancelHandler() {
  12644. this.$emit("cancel");
  12645. },
  12646. // 点击遮罩
  12647. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  12648. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  12649. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  12650. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  12651. clickHandler() {
  12652. if (this.closeOnClickOverlay) {
  12653. this.$emit("close");
  12654. }
  12655. }
  12656. }
  12657. };
  12658. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  12659. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
  12660. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
  12661. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
  12662. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  12663. mode: "center",
  12664. zoom: _ctx.zoom,
  12665. show: _ctx.show,
  12666. customStyle: {
  12667. borderRadius: "6px",
  12668. overflow: "hidden",
  12669. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  12670. },
  12671. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  12672. safeAreaInsetBottom: false,
  12673. duration: 400,
  12674. onClick: $options.clickHandler
  12675. }, {
  12676. default: vue.withCtx(() => [
  12677. vue.createElementVNode(
  12678. "view",
  12679. {
  12680. class: "u-modal",
  12681. style: vue.normalizeStyle({
  12682. width: _ctx.$u.addUnit(_ctx.width)
  12683. })
  12684. },
  12685. [
  12686. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  12687. "text",
  12688. {
  12689. key: 0,
  12690. class: "u-modal__title"
  12691. },
  12692. vue.toDisplayString(_ctx.title),
  12693. 1
  12694. /* TEXT */
  12695. )) : vue.createCommentVNode("v-if", true),
  12696. vue.createElementVNode(
  12697. "view",
  12698. {
  12699. class: "u-modal__content",
  12700. style: vue.normalizeStyle({
  12701. paddingTop: `${_ctx.title ? 12 : 25}px`
  12702. })
  12703. },
  12704. [
  12705. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  12706. vue.createElementVNode(
  12707. "text",
  12708. { class: "u-modal__content__text" },
  12709. vue.toDisplayString(_ctx.content),
  12710. 1
  12711. /* TEXT */
  12712. )
  12713. ], true)
  12714. ],
  12715. 4
  12716. /* STYLE */
  12717. ),
  12718. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  12719. key: 1,
  12720. class: "u-modal__button-group--confirm-button"
  12721. }, [
  12722. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  12723. ])) : (vue.openBlock(), vue.createElementBlock(
  12724. vue.Fragment,
  12725. { key: 2 },
  12726. [
  12727. vue.createVNode(_component_u_line),
  12728. vue.createElementVNode(
  12729. "view",
  12730. {
  12731. class: "u-modal__button-group",
  12732. style: vue.normalizeStyle({
  12733. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  12734. })
  12735. },
  12736. [
  12737. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  12738. "view",
  12739. {
  12740. key: 0,
  12741. 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"]]),
  12742. "hover-stay-time": 150,
  12743. "hover-class": "u-modal__button-group__wrapper--hover",
  12744. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  12745. },
  12746. [
  12747. vue.createElementVNode(
  12748. "text",
  12749. {
  12750. class: "u-modal__button-group__wrapper__text",
  12751. style: vue.normalizeStyle({
  12752. color: _ctx.cancelColor
  12753. })
  12754. },
  12755. vue.toDisplayString(_ctx.cancelText),
  12756. 5
  12757. /* TEXT, STYLE */
  12758. )
  12759. ],
  12760. 2
  12761. /* CLASS */
  12762. )) : vue.createCommentVNode("v-if", true),
  12763. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  12764. key: 1,
  12765. direction: "column"
  12766. })) : vue.createCommentVNode("v-if", true),
  12767. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  12768. "view",
  12769. {
  12770. key: 2,
  12771. 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"]]),
  12772. "hover-stay-time": 150,
  12773. "hover-class": "u-modal__button-group__wrapper--hover",
  12774. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  12775. },
  12776. [
  12777. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  12778. "text",
  12779. {
  12780. key: 1,
  12781. class: "u-modal__button-group__wrapper__text",
  12782. style: vue.normalizeStyle({
  12783. color: _ctx.confirmColor
  12784. })
  12785. },
  12786. vue.toDisplayString(_ctx.confirmText),
  12787. 5
  12788. /* TEXT, STYLE */
  12789. ))
  12790. ],
  12791. 2
  12792. /* CLASS */
  12793. )) : vue.createCommentVNode("v-if", true)
  12794. ],
  12795. 4
  12796. /* STYLE */
  12797. )
  12798. ],
  12799. 64
  12800. /* STABLE_FRAGMENT */
  12801. ))
  12802. ],
  12803. 4
  12804. /* STYLE */
  12805. )
  12806. ]),
  12807. _: 3
  12808. /* FORWARDED */
  12809. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  12810. }
  12811. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__scopeId", "data-v-f667648f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  12812. const _sfc_main$O = {
  12813. __name: "ApproveButton",
  12814. emits: ["approve"],
  12815. setup(__props, { expose: __expose, emit: __emit }) {
  12816. __expose();
  12817. const emit = __emit;
  12818. const showConfirmModal = vue.ref(false);
  12819. const handleApprove = () => {
  12820. showConfirmModal.value = true;
  12821. };
  12822. const confirmApprove = () => {
  12823. emit("approve");
  12824. showConfirmModal.value = false;
  12825. };
  12826. const __returned__ = { emit, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
  12827. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12828. return __returned__;
  12829. }
  12830. };
  12831. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  12832. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  12833. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  12834. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  12835. vue.createVNode(
  12836. _component_u_button,
  12837. vue.mergeProps({
  12838. type: "success",
  12839. text: "同意",
  12840. size: "small",
  12841. onClick: $setup.handleApprove
  12842. }, _ctx.$attrs),
  12843. null,
  12844. 16
  12845. /* FULL_PROPS */
  12846. ),
  12847. vue.createCommentVNode(" 确认弹窗 "),
  12848. vue.createVNode(_component_u_modal, {
  12849. show: $setup.showConfirmModal,
  12850. title: "确认",
  12851. content: "确认收到货了吗?",
  12852. onConfirm: $setup.confirmApprove,
  12853. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
  12854. }, null, 8, ["show"])
  12855. ]);
  12856. }
  12857. const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ApproveButton.vue"]]);
  12858. const props$6 = {
  12859. props: {
  12860. // 是否展示工具条
  12861. show: {
  12862. type: Boolean,
  12863. default: props$x.toolbar.show
  12864. },
  12865. // 取消按钮的文字
  12866. cancelText: {
  12867. type: String,
  12868. default: props$x.toolbar.cancelText
  12869. },
  12870. // 确认按钮的文字
  12871. confirmText: {
  12872. type: String,
  12873. default: props$x.toolbar.confirmText
  12874. },
  12875. // 取消按钮的颜色
  12876. cancelColor: {
  12877. type: String,
  12878. default: props$x.toolbar.cancelColor
  12879. },
  12880. // 确认按钮的颜色
  12881. confirmColor: {
  12882. type: String,
  12883. default: props$x.toolbar.confirmColor
  12884. },
  12885. // 标题文字
  12886. title: {
  12887. type: String,
  12888. default: props$x.toolbar.title
  12889. }
  12890. }
  12891. };
  12892. const _sfc_main$N = {
  12893. name: "u-toolbar",
  12894. mixins: [mpMixin, mixin, props$6],
  12895. methods: {
  12896. // 点击取消按钮
  12897. cancel() {
  12898. this.$emit("cancel");
  12899. },
  12900. // 点击确定按钮
  12901. confirm() {
  12902. this.$emit("confirm");
  12903. }
  12904. }
  12905. };
  12906. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  12907. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  12908. "view",
  12909. {
  12910. key: 0,
  12911. class: "u-toolbar",
  12912. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  12913. },
  12914. [
  12915. vue.createElementVNode("view", {
  12916. class: "u-toolbar__cancel__wrapper",
  12917. "hover-class": "u-hover-class"
  12918. }, [
  12919. vue.createElementVNode(
  12920. "text",
  12921. {
  12922. class: "u-toolbar__wrapper__cancel",
  12923. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  12924. style: vue.normalizeStyle({
  12925. color: _ctx.cancelColor
  12926. })
  12927. },
  12928. vue.toDisplayString(_ctx.cancelText),
  12929. 5
  12930. /* TEXT, STYLE */
  12931. )
  12932. ]),
  12933. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  12934. "text",
  12935. {
  12936. key: 0,
  12937. class: "u-toolbar__title u-line-1"
  12938. },
  12939. vue.toDisplayString(_ctx.title),
  12940. 1
  12941. /* TEXT */
  12942. )) : vue.createCommentVNode("v-if", true),
  12943. vue.createElementVNode("view", {
  12944. class: "u-toolbar__confirm__wrapper",
  12945. "hover-class": "u-hover-class"
  12946. }, [
  12947. vue.createElementVNode(
  12948. "text",
  12949. {
  12950. class: "u-toolbar__wrapper__confirm",
  12951. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  12952. style: vue.normalizeStyle({
  12953. color: _ctx.confirmColor
  12954. })
  12955. },
  12956. vue.toDisplayString(_ctx.confirmText),
  12957. 5
  12958. /* TEXT, STYLE */
  12959. )
  12960. ])
  12961. ],
  12962. 32
  12963. /* NEED_HYDRATION */
  12964. )) : vue.createCommentVNode("v-if", true);
  12965. }
  12966. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  12967. const props$5 = {
  12968. props: {
  12969. // 是否展示picker弹窗
  12970. show: {
  12971. type: Boolean,
  12972. default: props$x.picker.show
  12973. },
  12974. // 是否展示顶部的操作栏
  12975. showToolbar: {
  12976. type: Boolean,
  12977. default: props$x.picker.showToolbar
  12978. },
  12979. // 顶部标题
  12980. title: {
  12981. type: String,
  12982. default: props$x.picker.title
  12983. },
  12984. // 对象数组,设置每一列的数据
  12985. columns: {
  12986. type: Array,
  12987. default: props$x.picker.columns
  12988. },
  12989. // 是否显示加载中状态
  12990. loading: {
  12991. type: Boolean,
  12992. default: props$x.picker.loading
  12993. },
  12994. // 各列中,单个选项的高度
  12995. itemHeight: {
  12996. type: [String, Number],
  12997. default: props$x.picker.itemHeight
  12998. },
  12999. // 取消按钮的文字
  13000. cancelText: {
  13001. type: String,
  13002. default: props$x.picker.cancelText
  13003. },
  13004. // 确认按钮的文字
  13005. confirmText: {
  13006. type: String,
  13007. default: props$x.picker.confirmText
  13008. },
  13009. // 取消按钮的颜色
  13010. cancelColor: {
  13011. type: String,
  13012. default: props$x.picker.cancelColor
  13013. },
  13014. // 确认按钮的颜色
  13015. confirmColor: {
  13016. type: String,
  13017. default: props$x.picker.confirmColor
  13018. },
  13019. // 每列中可见选项的数量
  13020. visibleItemCount: {
  13021. type: [String, Number],
  13022. default: props$x.picker.visibleItemCount
  13023. },
  13024. // 选项对象中,需要展示的属性键名
  13025. keyName: {
  13026. type: String,
  13027. default: props$x.picker.keyName
  13028. },
  13029. // 是否允许点击遮罩关闭选择器
  13030. closeOnClickOverlay: {
  13031. type: Boolean,
  13032. default: props$x.picker.closeOnClickOverlay
  13033. },
  13034. // 各列的默认索引
  13035. defaultIndex: {
  13036. type: Array,
  13037. default: props$x.picker.defaultIndex
  13038. },
  13039. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  13040. immediateChange: {
  13041. type: Boolean,
  13042. default: props$x.picker.immediateChange
  13043. }
  13044. }
  13045. };
  13046. const _sfc_main$M = {
  13047. name: "u-picker",
  13048. mixins: [mpMixin, mixin, props$5],
  13049. data() {
  13050. return {
  13051. // 上一次选择的列索引
  13052. lastIndex: [],
  13053. // 索引值 ,对应picker-view的value
  13054. innerIndex: [],
  13055. // 各列的值
  13056. innerColumns: [],
  13057. // 上一次的变化列索引
  13058. columnIndex: 0
  13059. };
  13060. },
  13061. watch: {
  13062. // 监听默认索引的变化,重新设置对应的值
  13063. defaultIndex: {
  13064. immediate: true,
  13065. handler(n) {
  13066. this.setIndexs(n, true);
  13067. }
  13068. },
  13069. // 监听columns参数的变化
  13070. columns: {
  13071. immediate: true,
  13072. deep: true,
  13073. handler(n) {
  13074. this.setColumns(n);
  13075. }
  13076. }
  13077. },
  13078. emits: ["close", "cancel", "confirm", "change"],
  13079. methods: {
  13080. // 获取item需要显示的文字,判别为对象还是文本
  13081. getItemText(item) {
  13082. if (uni.$u.test.object(item)) {
  13083. return item[this.keyName];
  13084. } else {
  13085. return item;
  13086. }
  13087. },
  13088. // 关闭选择器
  13089. closeHandler() {
  13090. if (this.closeOnClickOverlay) {
  13091. this.$emit("close");
  13092. }
  13093. },
  13094. // 点击工具栏的取消按钮
  13095. cancel() {
  13096. this.$emit("cancel");
  13097. },
  13098. // 点击工具栏的确定按钮
  13099. confirm() {
  13100. this.$emit("confirm", {
  13101. indexs: this.innerIndex,
  13102. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  13103. values: this.innerColumns
  13104. });
  13105. },
  13106. // 选择器某一列的数据发生变化时触发
  13107. changeHandler(e) {
  13108. const {
  13109. value: value2
  13110. } = e.detail;
  13111. let index2 = 0, columnIndex = 0;
  13112. for (let i = 0; i < value2.length; i++) {
  13113. let item = value2[i];
  13114. if (item !== (this.lastIndex[i] || 0)) {
  13115. columnIndex = i;
  13116. index2 = item;
  13117. break;
  13118. }
  13119. }
  13120. this.columnIndex = columnIndex;
  13121. const values = this.innerColumns;
  13122. this.setLastIndex(value2);
  13123. this.setIndexs(value2);
  13124. this.$emit("change", {
  13125. // 微信小程序不能传递this,会因为循环引用而报错
  13126. picker: this,
  13127. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  13128. index: index2,
  13129. indexs: value2,
  13130. // values为当前变化列的数组内容
  13131. values,
  13132. columnIndex
  13133. });
  13134. },
  13135. // 设置index索引,此方法可被外部调用设置
  13136. setIndexs(index2, setLastIndex) {
  13137. this.innerIndex = uni.$u.deepClone(index2);
  13138. if (setLastIndex) {
  13139. this.setLastIndex(index2);
  13140. }
  13141. },
  13142. // 记录上一次的各列索引位置
  13143. setLastIndex(index2) {
  13144. this.lastIndex = uni.$u.deepClone(index2);
  13145. },
  13146. // 设置对应列选项的所有值
  13147. setColumnValues(columnIndex, values) {
  13148. this.innerColumns.splice(columnIndex, 1, values);
  13149. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  13150. for (let i = 0; i < this.innerColumns.length; i++) {
  13151. if (i > this.columnIndex) {
  13152. tmpIndex[i] = 0;
  13153. }
  13154. }
  13155. this.setIndexs(tmpIndex);
  13156. },
  13157. // 获取对应列的所有选项
  13158. getColumnValues(columnIndex) {
  13159. (async () => {
  13160. await uni.$u.sleep();
  13161. })();
  13162. return this.innerColumns[columnIndex];
  13163. },
  13164. // 设置整体各列的columns的值
  13165. setColumns(columns) {
  13166. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  13167. this.innerColumns = uni.$u.deepClone(columns);
  13168. if (this.innerIndex.length === 0) {
  13169. this.innerIndex = new Array(columns.length).fill(0);
  13170. }
  13171. },
  13172. // 获取各列选中值对应的索引
  13173. getIndexs() {
  13174. return this.innerIndex;
  13175. },
  13176. // 获取各列选中的值
  13177. getValues() {
  13178. (async () => {
  13179. await uni.$u.sleep();
  13180. })();
  13181. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  13182. }
  13183. }
  13184. };
  13185. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  13186. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$2);
  13187. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
  13188. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
  13189. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13190. show: _ctx.show,
  13191. onClose: $options.closeHandler
  13192. }, {
  13193. default: vue.withCtx(() => [
  13194. vue.createElementVNode("view", { class: "u-picker" }, [
  13195. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  13196. key: 0,
  13197. cancelColor: _ctx.cancelColor,
  13198. confirmColor: _ctx.confirmColor,
  13199. cancelText: _ctx.cancelText,
  13200. confirmText: _ctx.confirmText,
  13201. title: _ctx.title,
  13202. onCancel: $options.cancel,
  13203. onConfirm: $options.confirm
  13204. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  13205. vue.createElementVNode("picker-view", {
  13206. class: "u-picker__view",
  13207. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  13208. value: $data.innerIndex,
  13209. immediateChange: _ctx.immediateChange,
  13210. style: vue.normalizeStyle({
  13211. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  13212. }),
  13213. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  13214. }, [
  13215. (vue.openBlock(true), vue.createElementBlock(
  13216. vue.Fragment,
  13217. null,
  13218. vue.renderList($data.innerColumns, (item, index2) => {
  13219. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  13220. key: index2,
  13221. class: "u-picker__view__column"
  13222. }, [
  13223. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  13224. vue.Fragment,
  13225. { key: 0 },
  13226. vue.renderList(item, (item1, index1) => {
  13227. return vue.openBlock(), vue.createElementBlock(
  13228. "text",
  13229. {
  13230. class: "u-picker__view__column__item u-line-1",
  13231. key: index1,
  13232. style: vue.normalizeStyle({
  13233. height: _ctx.$u.addUnit(_ctx.itemHeight),
  13234. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  13235. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  13236. })
  13237. },
  13238. vue.toDisplayString($options.getItemText(item1)),
  13239. 5
  13240. /* TEXT, STYLE */
  13241. );
  13242. }),
  13243. 128
  13244. /* KEYED_FRAGMENT */
  13245. )) : vue.createCommentVNode("v-if", true)
  13246. ]);
  13247. }),
  13248. 128
  13249. /* KEYED_FRAGMENT */
  13250. ))
  13251. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  13252. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  13253. key: 1,
  13254. class: "u-picker--loading"
  13255. }, [
  13256. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  13257. ])) : vue.createCommentVNode("v-if", true)
  13258. ])
  13259. ]),
  13260. _: 1
  13261. /* STABLE */
  13262. }, 8, ["show", "onClose"]);
  13263. }
  13264. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-91b05052"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  13265. const _sfc_main$L = {
  13266. __name: "RejectButton",
  13267. emits: ["reject"],
  13268. setup(__props, { expose: __expose, emit: __emit }) {
  13269. __expose();
  13270. const emit = __emit;
  13271. const showRejectPicker = vue.ref(false);
  13272. const rejectReasons = [
  13273. "重量不符",
  13274. "包装破损",
  13275. "货物缺失",
  13276. "其他原因"
  13277. ];
  13278. const handleReject = () => {
  13279. showRejectPicker.value = true;
  13280. };
  13281. const confirmReject = (e) => {
  13282. const reason = e.value[0];
  13283. emit("reject", reason);
  13284. showRejectPicker.value = false;
  13285. };
  13286. const __returned__ = { emit, showRejectPicker, rejectReasons, handleReject, confirmReject, ref: vue.ref };
  13287. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13288. return __returned__;
  13289. }
  13290. };
  13291. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  13292. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  13293. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
  13294. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  13295. vue.createVNode(
  13296. _component_u_button,
  13297. vue.mergeProps({
  13298. type: "warning",
  13299. text: "驳回",
  13300. size: "small",
  13301. onClick: $setup.handleReject
  13302. }, _ctx.$attrs),
  13303. null,
  13304. 16
  13305. /* FULL_PROPS */
  13306. ),
  13307. vue.createCommentVNode(" 驳回原因选择器 "),
  13308. vue.createVNode(_component_u_picker, {
  13309. show: $setup.showRejectPicker,
  13310. columns: [$setup.rejectReasons],
  13311. onConfirm: $setup.confirmReject,
  13312. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
  13313. }, null, 8, ["show", "columns"])
  13314. ]);
  13315. }
  13316. const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/RejectButton.vue"]]);
  13317. const _sfc_main$K = {
  13318. __name: "ExceptionItem",
  13319. props: {
  13320. order: {
  13321. type: Object,
  13322. default: () => ({
  13323. orderNo: "",
  13324. expressNo: "",
  13325. estimatedPrice: "",
  13326. pusher: "",
  13327. pushTime: ""
  13328. })
  13329. }
  13330. },
  13331. emits: ["approve", "reject"],
  13332. setup(__props, { expose: __expose, emit: __emit }) {
  13333. __expose();
  13334. const props2 = __props;
  13335. const emit = __emit;
  13336. const handleCheckLogistics = () => {
  13337. uni.navigateTo({
  13338. url: `/pages/index/express/logistics-detail?expressNo=${props2.order.expressNo}`
  13339. });
  13340. };
  13341. const __returned__ = { props: props2, emit, handleCheckLogistics, ref: vue.ref, ApproveButton, RejectButton };
  13342. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13343. return __returned__;
  13344. }
  13345. };
  13346. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  13347. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  13348. return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
  13349. vue.createCommentVNode(" 订单信息 "),
  13350. vue.createElementVNode("view", { class: "info-section" }, [
  13351. vue.createElementVNode("view", { class: "info-row" }, [
  13352. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  13353. vue.createElementVNode(
  13354. "text",
  13355. { class: "value" },
  13356. vue.toDisplayString($props.order.orderNo),
  13357. 1
  13358. /* TEXT */
  13359. )
  13360. ]),
  13361. vue.createElementVNode("view", { class: "info-row" }, [
  13362. vue.createElementVNode("text", { class: "label" }, "快递单号:"),
  13363. vue.createElementVNode(
  13364. "text",
  13365. { class: "value" },
  13366. vue.toDisplayString($props.order.expressNo),
  13367. 1
  13368. /* TEXT */
  13369. )
  13370. ]),
  13371. vue.createElementVNode("view", { class: "info-row" }, [
  13372. vue.createElementVNode("text", { class: "label" }, "预估单价:"),
  13373. vue.createElementVNode(
  13374. "text",
  13375. { class: "value" },
  13376. vue.toDisplayString($props.order.estimatedPrice),
  13377. 1
  13378. /* TEXT */
  13379. )
  13380. ]),
  13381. vue.createElementVNode("view", { class: "info-row" }, [
  13382. vue.createElementVNode("text", { class: "label" }, "推送人:"),
  13383. vue.createElementVNode(
  13384. "text",
  13385. { class: "value" },
  13386. vue.toDisplayString($props.order.pusher),
  13387. 1
  13388. /* TEXT */
  13389. )
  13390. ]),
  13391. vue.createElementVNode("view", { class: "info-row" }, [
  13392. vue.createElementVNode("text", { class: "label" }, "推送时间:"),
  13393. vue.createElementVNode(
  13394. "text",
  13395. { class: "value" },
  13396. vue.toDisplayString($props.order.pushTime),
  13397. 1
  13398. /* TEXT */
  13399. )
  13400. ])
  13401. ]),
  13402. vue.createCommentVNode(" 操作按钮 "),
  13403. vue.createElementVNode("view", { class: "action-section" }, [
  13404. vue.createVNode(_component_u_button, {
  13405. type: "primary",
  13406. text: "查看物流",
  13407. size: "small",
  13408. onClick: $setup.handleCheckLogistics
  13409. }),
  13410. vue.createVNode($setup["ApproveButton"], {
  13411. onApprove: _cache[0] || (_cache[0] = () => $setup.emit("approve", $props.order))
  13412. }),
  13413. vue.createVNode($setup["RejectButton"], {
  13414. onReject: _cache[1] || (_cache[1] = (reason) => $setup.emit("reject", { order: $props.order, reason }))
  13415. })
  13416. ])
  13417. ]);
  13418. }
  13419. const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__scopeId", "data-v-e0527396"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ExceptionItem.vue"]]);
  13420. const _sfc_main$J = {
  13421. __name: "route-exception",
  13422. setup(__props, { expose: __expose }) {
  13423. __expose();
  13424. const tabList = ["待处理订单", "历史异常签收"];
  13425. const curNow = vue.ref(0);
  13426. function sectionChange(index2) {
  13427. curNow.value = index2;
  13428. }
  13429. const exceptionList = vue.ref([]);
  13430. const page2 = vue.ref(1);
  13431. const loadMoreStatus = vue.ref("loadmore");
  13432. const isRefreshing = vue.ref(false);
  13433. const searchKeyword = vue.ref("");
  13434. vue.onMounted(() => {
  13435. loadData();
  13436. });
  13437. const loadData = async (reset = false) => {
  13438. if (reset) {
  13439. page2.value = 1;
  13440. exceptionList.value = [];
  13441. }
  13442. const mockData = [{
  13443. orderNo: "5698542",
  13444. expressNo: "JDX0010258745151",
  13445. estimatedPrice: "16.8",
  13446. pusher: "涨涨涨",
  13447. pushTime: "2024-06-15 15:00:00"
  13448. }];
  13449. setTimeout(() => {
  13450. exceptionList.value = [...exceptionList.value, ...mockData];
  13451. loadMoreStatus.value = "nomore";
  13452. }, 1e3);
  13453. };
  13454. const onRefresh = async () => {
  13455. isRefreshing.value = true;
  13456. await loadData(true);
  13457. isRefreshing.value = false;
  13458. };
  13459. const loadMore = () => {
  13460. if (loadMoreStatus.value === "nomore")
  13461. return;
  13462. loadMoreStatus.value = "loading";
  13463. page2.value++;
  13464. loadData();
  13465. };
  13466. const handleSearch = () => {
  13467. loadData(true);
  13468. };
  13469. const handleScan = () => {
  13470. uni.scanCode({
  13471. success: (res) => {
  13472. searchKeyword.value = res.result;
  13473. handleSearch();
  13474. }
  13475. });
  13476. };
  13477. const __returned__ = { tabList, curNow, sectionChange, exceptionList, page: page2, loadMoreStatus, isRefreshing, searchKeyword, loadData, onRefresh, loadMore, handleSearch, handleScan, ref: vue.ref, onMounted: vue.onMounted, ExceptionItem };
  13478. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13479. return __returned__;
  13480. }
  13481. };
  13482. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  13483. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$3);
  13484. const _component_u_loadmore = resolveEasycom(vue.resolveDynamicComponent("u-loadmore"), __easycom_1$3);
  13485. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_2$5);
  13486. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  13487. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  13488. vue.createCommentVNode(" 顶部标签页 "),
  13489. vue.createVNode(_component_u_subsection, {
  13490. list: $setup.tabList,
  13491. current: $setup.curNow,
  13492. onChange: $setup.sectionChange,
  13493. mode: "subsection"
  13494. }, null, 8, ["current"]),
  13495. vue.createCommentVNode(" 列表区域 "),
  13496. vue.createElementVNode("scroll-view", {
  13497. "scroll-y": "",
  13498. class: "list-container",
  13499. onScrolltolower: $setup.loadMore,
  13500. "refresher-enabled": "",
  13501. onRefresherrefresh: $setup.onRefresh,
  13502. "refresher-triggered": $setup.isRefreshing
  13503. }, [
  13504. (vue.openBlock(true), vue.createElementBlock(
  13505. vue.Fragment,
  13506. null,
  13507. vue.renderList($setup.exceptionList, (item) => {
  13508. return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
  13509. key: item.orderNo,
  13510. order: item
  13511. }, null, 8, ["order"]);
  13512. }),
  13513. 128
  13514. /* KEYED_FRAGMENT */
  13515. )),
  13516. vue.createCommentVNode(" 加载更多 "),
  13517. vue.createVNode(_component_u_loadmore, {
  13518. status: $setup.loadMoreStatus,
  13519. onLoadmore: $setup.loadMore
  13520. }, null, 8, ["status"])
  13521. ], 40, ["refresher-triggered"]),
  13522. vue.createCommentVNode(" 底部搜索框 "),
  13523. vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
  13524. vue.createVNode(_component_u_search, {
  13525. modelValue: $setup.searchKeyword,
  13526. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  13527. placeholder: "请输入物流单号/订单编号",
  13528. "show-action": false,
  13529. onSearch: $setup.handleSearch,
  13530. height: "80rpx",
  13531. shape: "round"
  13532. }, null, 8, ["modelValue"]),
  13533. vue.createVNode(_component_u_icon, {
  13534. name: "scan",
  13535. size: "28",
  13536. color: "#19be6b",
  13537. onClick: $setup.handleScan
  13538. })
  13539. ])
  13540. ]);
  13541. }
  13542. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-388e5b84"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/route-exception.vue"]]);
  13543. const _sfc_main$I = {
  13544. __name: "warehouse-sign",
  13545. setup(__props, { expose: __expose }) {
  13546. __expose();
  13547. const showSelector = vue.ref(false);
  13548. const selectedWarehouse = vue.ref("");
  13549. const trackingNumber = vue.ref("");
  13550. function openWarehouseSelector() {
  13551. showSelector.value = true;
  13552. }
  13553. function handleWarehouseSelected(warehouse) {
  13554. selectedWarehouse.value = warehouse;
  13555. }
  13556. function confirmTrackingNumber() {
  13557. playSuccessVoice("物流单号DPK202306014525已到仓签收成功");
  13558. }
  13559. function playSuccessVoice(text) {
  13560. const ttsParams = {
  13561. speed: 0.8,
  13562. // 将 0-10 转换为 0-1
  13563. pitch: 1,
  13564. // 将 0-10 转换为 0-1
  13565. volume: 1
  13566. };
  13567. const TTSModule = requireNativePlugin("nrb-tts-plugin");
  13568. TTSModule && TTSModule.init({
  13569. "lang": "ZH",
  13570. "country": "CN"
  13571. }, (res) => {
  13572. if (res.success == 0) {
  13573. TTSModule.speak(text, ttsParams, (e) => {
  13574. formatAppLog("log", "at pages/index/express/warehouse-sign.vue:64", e, "播放语音成功");
  13575. });
  13576. }
  13577. });
  13578. }
  13579. function scanCode() {
  13580. uni.scanCode({
  13581. success: (res) => {
  13582. trackingNumber.value = res.result;
  13583. formatAppLog("log", "at pages/index/express/warehouse-sign.vue:76", "扫码结果:", res.result);
  13584. },
  13585. fail: (err) => {
  13586. formatAppLog("error", "at pages/index/express/warehouse-sign.vue:79", "扫码失败:", err);
  13587. }
  13588. });
  13589. }
  13590. const __returned__ = { showSelector, selectedWarehouse, trackingNumber, openWarehouseSelector, handleWarehouseSelected, confirmTrackingNumber, playSuccessVoice, scanCode, ref: vue.ref, WarehouseSelector };
  13591. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13592. return __returned__;
  13593. }
  13594. };
  13595. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  13596. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
  13597. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  13598. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  13599. vue.createElementVNode("view", { class: "main-content" }, [
  13600. vue.createElementVNode("view", { class: "input-group" }, [
  13601. vue.createVNode(_component_u_input, {
  13602. modelValue: $setup.selectedWarehouse,
  13603. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  13604. placeholder: "请选择仓库",
  13605. readonly: "",
  13606. border: "surround"
  13607. }, null, 8, ["modelValue"]),
  13608. vue.createVNode(_component_u_button, {
  13609. type: "primary",
  13610. onClick: $setup.openWarehouseSelector,
  13611. text: "选择"
  13612. })
  13613. ]),
  13614. vue.createElementVNode("view", { class: "input-group" }, [
  13615. vue.createVNode(_component_u_input, {
  13616. modelValue: $setup.trackingNumber,
  13617. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.trackingNumber = $event),
  13618. placeholder: "扫描/输入物流单号",
  13619. border: "surround"
  13620. }, null, 8, ["modelValue"]),
  13621. vue.createVNode(_component_u_button, {
  13622. type: "primary",
  13623. onClick: $setup.confirmTrackingNumber,
  13624. text: "确定"
  13625. })
  13626. ])
  13627. ]),
  13628. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  13629. vue.createVNode(_component_u_button, {
  13630. size: "large",
  13631. type: "success",
  13632. onClick: $setup.scanCode,
  13633. text: "扫码",
  13634. class: "scan-button"
  13635. })
  13636. ]),
  13637. vue.createVNode($setup["WarehouseSelector"], {
  13638. show: $setup.showSelector,
  13639. "onUpdate:show": _cache[2] || (_cache[2] = ($event) => $setup.showSelector = $event),
  13640. onWarehouseSelected: $setup.handleWarehouseSelected
  13641. }, null, 8, ["show"])
  13642. ]);
  13643. }
  13644. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-7473f06e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/warehouse-sign.vue"]]);
  13645. const _sfc_main$H = {
  13646. __name: "weight-modify",
  13647. setup(__props, { expose: __expose }) {
  13648. __expose();
  13649. const formRef = vue.ref(null);
  13650. const form = vue.ref({
  13651. trackingNumber: "",
  13652. weight: "",
  13653. images: []
  13654. });
  13655. const rules2 = {
  13656. trackingNumber: [{
  13657. required: true,
  13658. message: "请输入物流单号",
  13659. trigger: "blur"
  13660. }],
  13661. weight: [{
  13662. required: true,
  13663. message: "请输入重量",
  13664. trigger: "blur"
  13665. }]
  13666. };
  13667. function scanCode() {
  13668. uni.scanCode({
  13669. success: (res) => {
  13670. form.value.trackingNumber = res.result;
  13671. },
  13672. fail: (err) => {
  13673. formatAppLog("error", "at pages/index/express/weight-modify.vue:62", "扫码失败:", err);
  13674. }
  13675. });
  13676. }
  13677. function submitForm() {
  13678. formRef.value.validate((valid) => {
  13679. if (valid) {
  13680. formatAppLog("log", "at pages/index/express/weight-modify.vue:71", "表单提交:", form.value);
  13681. } else {
  13682. formatAppLog("error", "at pages/index/express/weight-modify.vue:73", "表单验证失败");
  13683. }
  13684. });
  13685. }
  13686. const __returned__ = { formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref };
  13687. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13688. return __returned__;
  13689. }
  13690. };
  13691. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  13692. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
  13693. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_2$4);
  13694. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_2$3);
  13695. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_3$3);
  13696. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  13697. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  13698. vue.createVNode(_component_u_form, {
  13699. ref: "formRef",
  13700. model: $setup.form,
  13701. rules: $setup.rules,
  13702. "label-width": "85px",
  13703. "label-position": "top"
  13704. }, {
  13705. default: vue.withCtx(() => [
  13706. vue.createCommentVNode(" 物流单号输入 "),
  13707. vue.createVNode(_component_u_form_item, { label: "" }, {
  13708. default: vue.withCtx(() => [
  13709. vue.createVNode(_component_u_input, {
  13710. modelValue: $setup.form.trackingNumber,
  13711. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.trackingNumber = $event),
  13712. placeholder: "扫描/输入物流单号",
  13713. border: "surround",
  13714. name: "trackingNumber"
  13715. }, null, 8, ["modelValue"])
  13716. ]),
  13717. _: 1
  13718. /* STABLE */
  13719. }),
  13720. vue.createCommentVNode(" 重量输入 "),
  13721. vue.createVNode(_component_u_form_item, { label: "重量(kg)" }, {
  13722. default: vue.withCtx(() => [
  13723. vue.createVNode(_component_u_input, {
  13724. modelValue: $setup.form.weight,
  13725. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.weight = $event),
  13726. placeholder: "请输入重量",
  13727. border: "surround",
  13728. name: "weight",
  13729. type: "number"
  13730. }, null, 8, ["modelValue"])
  13731. ]),
  13732. _: 1
  13733. /* STABLE */
  13734. }),
  13735. vue.createCommentVNode(" 图片上传 "),
  13736. vue.createVNode(_component_u_form_item, { label: "上传图片" }, {
  13737. default: vue.withCtx(() => [
  13738. vue.createVNode(_component_u_upload, {
  13739. modelValue: $setup.form.images,
  13740. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.form.images = $event),
  13741. action: "your-upload-url",
  13742. name: "images",
  13743. limit: 1,
  13744. "max-size": 1024 * 1024
  13745. }, null, 8, ["modelValue"])
  13746. ]),
  13747. _: 1
  13748. /* STABLE */
  13749. })
  13750. ]),
  13751. _: 1
  13752. /* STABLE */
  13753. }, 8, ["model"]),
  13754. vue.createCommentVNode(" 底部按钮 "),
  13755. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  13756. vue.createVNode(_component_u_button, {
  13757. size: "large",
  13758. type: "warning",
  13759. onClick: $setup.scanCode,
  13760. text: "扫码",
  13761. class: "scan-button"
  13762. }),
  13763. vue.createVNode(_component_u_button, {
  13764. size: "large",
  13765. type: "success",
  13766. onClick: $setup.submitForm,
  13767. text: "提交",
  13768. class: "submit-button"
  13769. })
  13770. ])
  13771. ]);
  13772. }
  13773. const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-e6126507"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/weight-modify.vue"]]);
  13774. const _sfc_main$G = {};
  13775. function _sfc_render$F(_ctx, _cache) {
  13776. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13777. }
  13778. const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/confirm-receipt.vue"]]);
  13779. const _sfc_main$F = {};
  13780. function _sfc_render$E(_ctx, _cache) {
  13781. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13782. }
  13783. const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/scan-order.vue"]]);
  13784. const _sfc_main$E = {};
  13785. function _sfc_render$D(_ctx, _cache) {
  13786. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13787. }
  13788. const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/express-order.vue"]]);
  13789. const _sfc_main$D = {};
  13790. function _sfc_render$C(_ctx, _cache) {
  13791. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13792. }
  13793. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/sender.vue"]]);
  13794. const _sfc_main$C = {};
  13795. function _sfc_render$B(_ctx, _cache) {
  13796. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13797. }
  13798. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/audit.vue"]]);
  13799. const _sfc_main$B = {};
  13800. function _sfc_render$A(_ctx, _cache) {
  13801. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13802. }
  13803. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/after-sale.vue"]]);
  13804. const _sfc_main$A = {};
  13805. function _sfc_render$z(_ctx, _cache) {
  13806. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13807. }
  13808. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/package.vue"]]);
  13809. const _sfc_main$z = {};
  13810. function _sfc_render$y(_ctx, _cache) {
  13811. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13812. }
  13813. const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/medium-in.vue"]]);
  13814. const _sfc_main$y = {};
  13815. function _sfc_render$x(_ctx, _cache) {
  13816. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13817. }
  13818. const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/good-in.vue"]]);
  13819. const _sfc_main$x = {};
  13820. function _sfc_render$w(_ctx, _cache) {
  13821. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13822. }
  13823. const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/secondary-in.vue"]]);
  13824. const _sfc_main$w = {};
  13825. function _sfc_render$v(_ctx, _cache) {
  13826. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13827. }
  13828. const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-in.vue"]]);
  13829. const _sfc_main$v = {};
  13830. function _sfc_render$u(_ctx, _cache) {
  13831. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13832. }
  13833. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out.vue"]]);
  13834. const _sfc_main$u = {};
  13835. function _sfc_render$t(_ctx, _cache) {
  13836. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13837. }
  13838. const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-off.vue"]]);
  13839. const _sfc_main$t = {};
  13840. function _sfc_render$s(_ctx, _cache) {
  13841. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13842. }
  13843. const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query.vue"]]);
  13844. const _sfc_main$s = {};
  13845. function _sfc_render$r(_ctx, _cache) {
  13846. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13847. }
  13848. const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order.vue"]]);
  13849. const _sfc_main$r = {};
  13850. function _sfc_render$q(_ctx, _cache) {
  13851. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13852. }
  13853. const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/speedy-check.vue"]]);
  13854. const _sfc_main$q = {};
  13855. function _sfc_render$p(_ctx, _cache) {
  13856. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13857. }
  13858. const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-order.vue"]]);
  13859. const _sfc_main$p = {};
  13860. function _sfc_render$o(_ctx, _cache) {
  13861. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13862. }
  13863. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-record.vue"]]);
  13864. const _sfc_main$o = {};
  13865. function _sfc_render$n(_ctx, _cache) {
  13866. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13867. }
  13868. const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/scan-book.vue"]]);
  13869. const _sfc_main$n = {};
  13870. function _sfc_render$m(_ctx, _cache) {
  13871. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  13872. }
  13873. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/book-weight.vue"]]);
  13874. const props$4 = {
  13875. props: {
  13876. // 显示文字
  13877. title: {
  13878. type: String,
  13879. default: props$x.alert.title
  13880. },
  13881. // 主题,success/warning/info/error
  13882. type: {
  13883. type: String,
  13884. default: props$x.alert.type
  13885. },
  13886. // 辅助性文字
  13887. description: {
  13888. type: String,
  13889. default: props$x.alert.description
  13890. },
  13891. // 是否可关闭
  13892. closable: {
  13893. type: Boolean,
  13894. default: props$x.alert.closable
  13895. },
  13896. // 是否显示图标
  13897. showIcon: {
  13898. type: Boolean,
  13899. default: props$x.alert.showIcon
  13900. },
  13901. // 浅或深色调,light-浅色,dark-深色
  13902. effect: {
  13903. type: String,
  13904. default: props$x.alert.effect
  13905. },
  13906. // 文字是否居中
  13907. center: {
  13908. type: Boolean,
  13909. default: props$x.alert.center
  13910. },
  13911. // 字体大小
  13912. fontSize: {
  13913. type: [String, Number],
  13914. default: props$x.alert.fontSize
  13915. }
  13916. }
  13917. };
  13918. const _sfc_main$m = {
  13919. name: "u-alert",
  13920. mixins: [mpMixin, mixin, props$4],
  13921. data() {
  13922. return {
  13923. show: true
  13924. };
  13925. },
  13926. computed: {
  13927. iconColor() {
  13928. return this.effect === "light" ? this.type : "#fff";
  13929. },
  13930. // 不同主题对应不同的图标
  13931. iconName() {
  13932. switch (this.type) {
  13933. case "success":
  13934. return "checkmark-circle-fill";
  13935. case "error":
  13936. return "close-circle-fill";
  13937. case "warning":
  13938. return "error-circle-fill";
  13939. case "info":
  13940. return "info-circle-fill";
  13941. case "primary":
  13942. return "more-circle-fill";
  13943. default:
  13944. return "error-circle-fill";
  13945. }
  13946. }
  13947. },
  13948. methods: {
  13949. // 点击内容
  13950. clickHandler() {
  13951. this.$emit("click");
  13952. },
  13953. // 点击关闭按钮
  13954. closeHandler() {
  13955. this.show = false;
  13956. }
  13957. }
  13958. };
  13959. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  13960. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  13961. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  13962. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  13963. mode: "fade",
  13964. show: $data.show
  13965. }, {
  13966. default: vue.withCtx(() => [
  13967. vue.createElementVNode(
  13968. "view",
  13969. {
  13970. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  13971. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  13972. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  13973. },
  13974. [
  13975. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  13976. key: 0,
  13977. class: "u-alert__icon"
  13978. }, [
  13979. vue.createVNode(_component_u_icon, {
  13980. name: $options.iconName,
  13981. size: "18",
  13982. color: $options.iconColor
  13983. }, null, 8, ["name", "color"])
  13984. ])) : vue.createCommentVNode("v-if", true),
  13985. vue.createElementVNode(
  13986. "view",
  13987. {
  13988. class: "u-alert__content",
  13989. style: vue.normalizeStyle([{
  13990. paddingRight: _ctx.closable ? "20px" : 0
  13991. }])
  13992. },
  13993. [
  13994. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13995. "text",
  13996. {
  13997. key: 0,
  13998. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  13999. style: vue.normalizeStyle([{
  14000. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  14001. textAlign: _ctx.center ? "center" : "left"
  14002. }])
  14003. },
  14004. vue.toDisplayString(_ctx.title),
  14005. 7
  14006. /* TEXT, CLASS, STYLE */
  14007. )) : vue.createCommentVNode("v-if", true),
  14008. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  14009. "text",
  14010. {
  14011. key: 1,
  14012. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  14013. style: vue.normalizeStyle([{
  14014. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  14015. textAlign: _ctx.center ? "center" : "left"
  14016. }])
  14017. },
  14018. vue.toDisplayString(_ctx.description),
  14019. 7
  14020. /* TEXT, CLASS, STYLE */
  14021. )) : vue.createCommentVNode("v-if", true)
  14022. ],
  14023. 4
  14024. /* STYLE */
  14025. ),
  14026. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  14027. key: 1,
  14028. class: "u-alert__close",
  14029. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  14030. }, [
  14031. vue.createVNode(_component_u_icon, {
  14032. name: "close",
  14033. color: $options.iconColor,
  14034. size: "15"
  14035. }, null, 8, ["color"])
  14036. ])) : vue.createCommentVNode("v-if", true)
  14037. ],
  14038. 6
  14039. /* CLASS, STYLE */
  14040. )
  14041. ]),
  14042. _: 1
  14043. /* STABLE */
  14044. }, 8, ["show"]);
  14045. }
  14046. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-158e540a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
  14047. const props$3 = {
  14048. props: {
  14049. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  14050. offsetTop: {
  14051. type: [String, Number],
  14052. default: props$x.sticky.offsetTop
  14053. },
  14054. // 自定义导航栏的高度
  14055. customNavHeight: {
  14056. type: [String, Number],
  14057. default: props$x.sticky.customNavHeight
  14058. },
  14059. // 是否开启吸顶功能
  14060. disabled: {
  14061. type: Boolean,
  14062. default: props$x.sticky.disabled
  14063. },
  14064. // 吸顶区域的背景颜色
  14065. bgColor: {
  14066. type: String,
  14067. default: props$x.sticky.bgColor
  14068. },
  14069. // z-index值
  14070. zIndex: {
  14071. type: [String, Number],
  14072. default: props$x.sticky.zIndex
  14073. },
  14074. // 列表中的索引值
  14075. index: {
  14076. type: [String, Number],
  14077. default: props$x.sticky.index
  14078. }
  14079. }
  14080. };
  14081. const _sfc_main$l = {
  14082. name: "u-sticky",
  14083. mixins: [mpMixin, mixin, props$3],
  14084. data() {
  14085. return {
  14086. cssSticky: false,
  14087. // 是否使用css的sticky实现
  14088. stickyTop: 0,
  14089. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  14090. elId: uni.$u.guid(),
  14091. left: 0,
  14092. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  14093. width: "auto",
  14094. height: "auto",
  14095. fixed: false
  14096. // js模式时,是否处于吸顶模式
  14097. };
  14098. },
  14099. computed: {
  14100. style() {
  14101. const style = {};
  14102. if (!this.disabled) {
  14103. if (this.cssSticky) {
  14104. style.position = "sticky";
  14105. style.zIndex = this.uZindex;
  14106. style.top = uni.$u.addUnit(this.stickyTop);
  14107. } else {
  14108. style.height = this.fixed ? this.height + "px" : "auto";
  14109. }
  14110. } else {
  14111. style.position = "static";
  14112. }
  14113. style.backgroundColor = this.bgColor;
  14114. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  14115. },
  14116. // 吸顶内容的样式
  14117. stickyContent() {
  14118. const style = {};
  14119. if (!this.cssSticky) {
  14120. style.position = this.fixed ? "fixed" : "static";
  14121. style.top = this.stickyTop + "px";
  14122. style.left = this.left + "px";
  14123. style.width = this.width == "auto" ? "auto" : this.width + "px";
  14124. style.zIndex = this.uZindex;
  14125. }
  14126. return style;
  14127. },
  14128. uZindex() {
  14129. return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
  14130. }
  14131. },
  14132. mounted() {
  14133. this.init();
  14134. },
  14135. methods: {
  14136. init() {
  14137. this.getStickyTop();
  14138. this.checkSupportCssSticky();
  14139. if (!this.cssSticky) {
  14140. !this.disabled && this.initObserveContent();
  14141. }
  14142. },
  14143. initObserveContent() {
  14144. this.$uGetRect("#" + this.elId).then((res) => {
  14145. this.height = res.height;
  14146. this.left = res.left;
  14147. this.width = res.width;
  14148. this.$nextTick(() => {
  14149. this.observeContent();
  14150. });
  14151. });
  14152. },
  14153. observeContent() {
  14154. this.disconnectObserver("contentObserver");
  14155. const contentObserver = uni.createIntersectionObserver({
  14156. // 检测的区间范围
  14157. thresholds: [0.95, 0.98, 1]
  14158. });
  14159. contentObserver.relativeToViewport({
  14160. top: -this.stickyTop
  14161. });
  14162. contentObserver.observe(`#${this.elId}`, (res) => {
  14163. this.setFixed(res.boundingClientRect.top);
  14164. });
  14165. this.contentObserver = contentObserver;
  14166. },
  14167. setFixed(top) {
  14168. const fixed = top <= this.stickyTop;
  14169. this.fixed = fixed;
  14170. },
  14171. disconnectObserver(observerName) {
  14172. const observer = this[observerName];
  14173. observer && observer.disconnect();
  14174. },
  14175. getStickyTop() {
  14176. this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
  14177. },
  14178. async checkSupportCssSticky() {
  14179. if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
  14180. this.cssSticky = true;
  14181. }
  14182. this.cssSticky = await this.checkComputedStyle();
  14183. if (uni.$u.os() === "ios") {
  14184. this.cssSticky = true;
  14185. }
  14186. },
  14187. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  14188. checkComputedStyle() {
  14189. return new Promise((resolve) => {
  14190. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  14191. computedStyle: ["position"]
  14192. }).exec((e) => {
  14193. resolve("sticky" === e[0].position);
  14194. });
  14195. });
  14196. },
  14197. // H5通过创建元素的形式嗅探是否支持css sticky
  14198. // 判断浏览器是否支持sticky属性
  14199. checkCssStickyForH5() {
  14200. }
  14201. },
  14202. beforeDestroy() {
  14203. this.disconnectObserver("contentObserver");
  14204. }
  14205. };
  14206. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  14207. return vue.openBlock(), vue.createElementBlock("view", {
  14208. class: "u-sticky",
  14209. id: $data.elId,
  14210. style: vue.normalizeStyle([$options.style])
  14211. }, [
  14212. vue.createElementVNode(
  14213. "view",
  14214. {
  14215. style: vue.normalizeStyle([$options.stickyContent]),
  14216. class: "u-sticky__content"
  14217. },
  14218. [
  14219. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  14220. ],
  14221. 4
  14222. /* STYLE */
  14223. )
  14224. ], 12, ["id"]);
  14225. }
  14226. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-8b303089"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  14227. const _sfc_main$k = {
  14228. __name: "logistics-detail",
  14229. setup(__props, { expose: __expose }) {
  14230. __expose();
  14231. const logisticsInfo = vue.ref({
  14232. company: "京东快递",
  14233. traces: [
  14234. {
  14235. desc: "货物已交付京东快递",
  14236. time: "2024/10/16 16:00:00"
  14237. },
  14238. {
  14239. desc: "接收物任务分配给快递员王艳玲,联系电话 15123695401",
  14240. time: "2024/10/16 16:00:00"
  14241. },
  14242. {
  14243. desc: "快递员发起联系客户,呼叫方式:拨打电话。",
  14244. time: "2024/10/16 16:00:00"
  14245. },
  14246. {
  14247. desc: "京东快递已收取收件",
  14248. time: "2024/10/16 16:00:00"
  14249. },
  14250. {
  14251. desc: "您的快件已由【信阳师范小蜜蜂】揽收完成",
  14252. time: "2024/10/16 16:00:00"
  14253. }
  14254. // ... 更多轨迹信息
  14255. ]
  14256. });
  14257. const handleReject = (reason) => {
  14258. formatAppLog("log", "at pages/index/express/logistics-detail.vue:65", "驳回原因:", reason);
  14259. };
  14260. const handleApprove = () => {
  14261. formatAppLog("log", "at pages/index/express/logistics-detail.vue:71", "同意操作");
  14262. };
  14263. const __returned__ = { logisticsInfo, handleReject, handleApprove, ref: vue.ref, ApproveButton, RejectButton };
  14264. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14265. return __returned__;
  14266. }
  14267. };
  14268. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  14269. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$1);
  14270. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1);
  14271. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  14272. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14273. vue.createCommentVNode(" 物流公司信息 "),
  14274. vue.createVNode(_component_u_sticky, null, {
  14275. default: vue.withCtx(() => [
  14276. vue.createVNode(_component_u_alert, {
  14277. title: `物流公司:${$setup.logisticsInfo.company}`,
  14278. type: "warning"
  14279. }, null, 8, ["title"])
  14280. ]),
  14281. _: 1
  14282. /* STABLE */
  14283. }),
  14284. vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
  14285. vue.createElementVNode("scroll-view", {
  14286. "scroll-y": "",
  14287. class: "timeline-container"
  14288. }, [
  14289. (vue.openBlock(true), vue.createElementBlock(
  14290. vue.Fragment,
  14291. null,
  14292. vue.renderList($setup.logisticsInfo.traces, (item, index2) => {
  14293. return vue.openBlock(), vue.createElementBlock("view", {
  14294. key: index2,
  14295. class: "timeline-item"
  14296. }, [
  14297. vue.createElementVNode("view", { class: "timeline-icon" }, [
  14298. vue.createVNode(_component_u_icon, {
  14299. name: "map-fill",
  14300. color: "#19be6b",
  14301. size: "16"
  14302. })
  14303. ]),
  14304. vue.createElementVNode("view", { class: "timeline-content" }, [
  14305. vue.createElementVNode(
  14306. "text",
  14307. { class: "desc" },
  14308. vue.toDisplayString(item.desc),
  14309. 1
  14310. /* TEXT */
  14311. ),
  14312. vue.createElementVNode(
  14313. "text",
  14314. { class: "time" },
  14315. vue.toDisplayString(item.time),
  14316. 1
  14317. /* TEXT */
  14318. )
  14319. ]),
  14320. index2 < $setup.logisticsInfo.traces.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  14321. key: 0,
  14322. class: "timeline-line"
  14323. })) : vue.createCommentVNode("v-if", true)
  14324. ]);
  14325. }),
  14326. 128
  14327. /* KEYED_FRAGMENT */
  14328. ))
  14329. ]),
  14330. vue.createCommentVNode(" 底部操作按钮 "),
  14331. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14332. vue.createVNode($setup["RejectButton"], {
  14333. size: "large",
  14334. onReject: $setup.handleReject
  14335. }),
  14336. vue.createVNode($setup["ApproveButton"], {
  14337. size: "large",
  14338. onApprove: $setup.handleApprove
  14339. })
  14340. ])
  14341. ]);
  14342. }
  14343. 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"]]);
  14344. const _sfc_main$j = {
  14345. __name: "user-info",
  14346. setup(__props, { expose: __expose }) {
  14347. __expose();
  14348. const userInfo = vue.ref({
  14349. avatar: "/static/images/avatar.jpg",
  14350. name: "无",
  14351. gender: "无",
  14352. birthday: "无",
  14353. education: "无",
  14354. school: "无",
  14355. username: "用户账号",
  14356. account: "fxt",
  14357. createTime: "2024-06-12 12:00:00",
  14358. lastLogin: "",
  14359. company: "无",
  14360. employeeId: "无",
  14361. position: "无",
  14362. phone: "18888888888",
  14363. email: "无",
  14364. address: "无"
  14365. });
  14366. const handleEditAvatar = () => {
  14367. uni.chooseImage({
  14368. count: 1,
  14369. success: (res) => {
  14370. formatAppLog("log", "at pages/my/page/user-info.vue:94", "选择的图片:", res.tempFilePaths[0]);
  14371. }
  14372. });
  14373. };
  14374. const __returned__ = { userInfo, handleEditAvatar, ref: vue.ref };
  14375. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14376. return __returned__;
  14377. }
  14378. };
  14379. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  14380. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$9);
  14381. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  14382. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  14383. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
  14384. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  14385. vue.createCommentVNode(" 头像区域 "),
  14386. vue.createElementVNode("view", { class: "avatar-section" }, [
  14387. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  14388. vue.createElementVNode("text", null, "头像:"),
  14389. vue.createVNode(_component_u_avatar, {
  14390. size: 50,
  14391. src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
  14392. }),
  14393. vue.createVNode(_component_u_button, {
  14394. type: "success",
  14395. style: { "width": "200rpx" },
  14396. size: "small",
  14397. onClick: $setup.handleEditAvatar
  14398. }, {
  14399. default: vue.withCtx(() => [
  14400. vue.createTextVNode("去修改")
  14401. ]),
  14402. _: 1
  14403. /* STABLE */
  14404. })
  14405. ])
  14406. ]),
  14407. vue.createCommentVNode(" 基本信息区域 "),
  14408. vue.createElementVNode("view", { class: "info-section" }, [
  14409. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  14410. vue.createElementVNode("view", { class: "info-card" }, [
  14411. vue.createVNode(_component_u_cell_group, { border: false }, {
  14412. default: vue.withCtx(() => [
  14413. vue.createVNode(_component_u_cell, {
  14414. title: "姓名",
  14415. value: $setup.userInfo.name || "无"
  14416. }, null, 8, ["value"]),
  14417. vue.createVNode(_component_u_cell, {
  14418. title: "性别",
  14419. value: $setup.userInfo.gender || "无"
  14420. }, null, 8, ["value"]),
  14421. vue.createVNode(_component_u_cell, {
  14422. title: "生日",
  14423. value: $setup.userInfo.birthday || "无"
  14424. }, null, 8, ["value"]),
  14425. vue.createVNode(_component_u_cell, {
  14426. title: "学历",
  14427. value: $setup.userInfo.education || "无"
  14428. }, null, 8, ["value"]),
  14429. vue.createVNode(_component_u_cell, {
  14430. title: "毕业学校",
  14431. value: $setup.userInfo.school || "无",
  14432. border: false
  14433. }, null, 8, ["value"])
  14434. ]),
  14435. _: 1
  14436. /* STABLE */
  14437. })
  14438. ])
  14439. ]),
  14440. vue.createCommentVNode(" 账号信息区域 "),
  14441. vue.createElementVNode("view", { class: "info-section" }, [
  14442. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  14443. vue.createElementVNode("view", { class: "info-card" }, [
  14444. vue.createVNode(_component_u_cell_group, { border: false }, {
  14445. default: vue.withCtx(() => [
  14446. vue.createVNode(_component_u_cell, {
  14447. title: "账号",
  14448. value: $setup.userInfo.account
  14449. }, null, 8, ["value"]),
  14450. vue.createVNode(_component_u_cell, {
  14451. title: "创建日期",
  14452. value: $setup.userInfo.createTime
  14453. }, null, 8, ["value"]),
  14454. vue.createVNode(_component_u_cell, {
  14455. title: "最近登录",
  14456. value: $setup.userInfo.lastLogin || "--",
  14457. border: false
  14458. }, null, 8, ["value"])
  14459. ]),
  14460. _: 1
  14461. /* STABLE */
  14462. })
  14463. ])
  14464. ]),
  14465. vue.createCommentVNode(" 员工资料区域 "),
  14466. vue.createElementVNode("view", { class: "info-section" }, [
  14467. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  14468. vue.createElementVNode("view", { class: "info-card" }, [
  14469. vue.createVNode(_component_u_cell_group, { border: false }, {
  14470. default: vue.withCtx(() => [
  14471. vue.createVNode(_component_u_cell, {
  14472. title: "公司",
  14473. value: $setup.userInfo.company || "无"
  14474. }, null, 8, ["value"]),
  14475. vue.createVNode(_component_u_cell, {
  14476. title: "员工编号",
  14477. value: $setup.userInfo.employeeId || "无"
  14478. }, null, 8, ["value"]),
  14479. vue.createVNode(_component_u_cell, {
  14480. title: "职位",
  14481. value: $setup.userInfo.position || "无",
  14482. border: false
  14483. }, null, 8, ["value"])
  14484. ]),
  14485. _: 1
  14486. /* STABLE */
  14487. })
  14488. ])
  14489. ]),
  14490. vue.createCommentVNode(" 联系方式区域 "),
  14491. vue.createElementVNode("view", { class: "info-section" }, [
  14492. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  14493. vue.createElementVNode("view", { class: "info-card" }, [
  14494. vue.createVNode(_component_u_cell_group, { border: false }, {
  14495. default: vue.withCtx(() => [
  14496. vue.createVNode(_component_u_cell, {
  14497. title: "电话",
  14498. value: $setup.userInfo.phone
  14499. }, null, 8, ["value"]),
  14500. vue.createVNode(_component_u_cell, {
  14501. title: "邮箱",
  14502. value: $setup.userInfo.email || "无"
  14503. }, null, 8, ["value"]),
  14504. vue.createVNode(_component_u_cell, {
  14505. title: "住址",
  14506. value: $setup.userInfo.address || "无",
  14507. border: false
  14508. }, null, 8, ["value"])
  14509. ]),
  14510. _: 1
  14511. /* STABLE */
  14512. })
  14513. ])
  14514. ])
  14515. ]);
  14516. }
  14517. const PagesMyPageUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-804eca28"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/user-info.vue"]]);
  14518. const _sfc_main$i = {
  14519. __name: "warehouse",
  14520. emits: ["change"],
  14521. setup(__props, { expose: __expose, emit: __emit }) {
  14522. __expose();
  14523. const showPicker = vue.ref(false);
  14524. const selectedWarehouse = vue.ref("");
  14525. const warehouseList = vue.ref([
  14526. {
  14527. text: "北京仓库",
  14528. value: "1"
  14529. },
  14530. {
  14531. text: "上海仓库",
  14532. value: "2"
  14533. },
  14534. {
  14535. text: "广州仓库",
  14536. value: "3"
  14537. },
  14538. {
  14539. text: "深圳仓库",
  14540. value: "4"
  14541. }
  14542. ]);
  14543. const onConfirm = (e) => {
  14544. const [{
  14545. value: value2,
  14546. text
  14547. }] = e.value;
  14548. selectedWarehouse.value = text;
  14549. showPicker.value = false;
  14550. emit("change", value2);
  14551. };
  14552. const emit = __emit;
  14553. const __returned__ = { showPicker, selectedWarehouse, warehouseList, onConfirm, emit, ref: vue.ref };
  14554. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14555. return __returned__;
  14556. }
  14557. };
  14558. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  14559. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  14560. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
  14561. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  14562. vue.createElementVNode("view", {
  14563. class: "select-wrap",
  14564. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  14565. }, [
  14566. vue.createElementVNode("text", { class: "required-label" }, "*"),
  14567. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  14568. vue.createElementVNode("view", { class: "picker-value" }, [
  14569. vue.createElementVNode(
  14570. "text",
  14571. {
  14572. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  14573. },
  14574. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  14575. 3
  14576. /* TEXT, CLASS */
  14577. ),
  14578. vue.createVNode(_component_u_icon, {
  14579. name: "arrow-right",
  14580. color: "#999",
  14581. size: "16"
  14582. })
  14583. ])
  14584. ]),
  14585. vue.createCommentVNode(" 仓库选择器 "),
  14586. vue.createVNode(_component_u_picker, {
  14587. show: $setup.showPicker,
  14588. columns: [$setup.warehouseList],
  14589. onConfirm: $setup.onConfirm,
  14590. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  14591. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  14592. title: "选择仓库",
  14593. confirmText: "确定",
  14594. cancelText: "取消"
  14595. }, null, 8, ["show", "columns"])
  14596. ]);
  14597. }
  14598. const PagesMyPageWarehouse = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-972eecda"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/warehouse.vue"]]);
  14599. const _sfc_main$h = {
  14600. __name: "school",
  14601. setup(__props, { expose: __expose }) {
  14602. __expose();
  14603. const schoolName = vue.ref("");
  14604. const schoolList = vue.ref([{
  14605. name: "河南大学"
  14606. }, {
  14607. name: "清华大学"
  14608. }, {
  14609. name: "北京大学"
  14610. }]);
  14611. const handleAddSchool = () => {
  14612. if (!schoolName.value.trim()) {
  14613. uni.$u.toast("请输入学校名称");
  14614. return;
  14615. }
  14616. schoolList.value.push({
  14617. name: schoolName.value
  14618. });
  14619. schoolName.value = "";
  14620. };
  14621. const handleRemoveSchool = (index2) => {
  14622. schoolList.value.splice(index2, 1);
  14623. };
  14624. const handleSubmit = () => {
  14625. if (schoolList.value.length === 0) {
  14626. uni.$u.toast("请至少添加一所学校");
  14627. return;
  14628. }
  14629. formatAppLog("log", "at pages/my/page/school.vue:73", "提交的学校列表:", schoolList.value);
  14630. };
  14631. const __returned__ = { schoolName, schoolList, handleAddSchool, handleRemoveSchool, handleSubmit, ref: vue.ref };
  14632. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14633. return __returned__;
  14634. }
  14635. };
  14636. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  14637. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  14638. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
  14639. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$1);
  14640. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  14641. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  14642. vue.createCommentVNode(" 输入区域 "),
  14643. vue.createElementVNode("view", { class: "input-section" }, [
  14644. vue.createElementVNode("view", { class: "input-header" }, [
  14645. vue.createElementVNode("text", { class: "required" }, "*"),
  14646. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  14647. vue.createVNode(_component_u_input, {
  14648. modelValue: $setup.schoolName,
  14649. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  14650. placeholder: "请输入一个学校名称",
  14651. border: "false",
  14652. class: "input"
  14653. }, {
  14654. suffix: vue.withCtx(() => [
  14655. vue.createVNode(_component_u_icon, {
  14656. name: "plus",
  14657. size: "24",
  14658. color: "#666",
  14659. onClick: $setup.handleAddSchool
  14660. })
  14661. ]),
  14662. _: 1
  14663. /* STABLE */
  14664. }, 8, ["modelValue"])
  14665. ])
  14666. ]),
  14667. vue.createCommentVNode(" 学校列表 "),
  14668. vue.createElementVNode("view", { class: "school-list" }, [
  14669. (vue.openBlock(true), vue.createElementBlock(
  14670. vue.Fragment,
  14671. null,
  14672. vue.renderList($setup.schoolList, (item, index2) => {
  14673. return vue.openBlock(), vue.createElementBlock("view", {
  14674. class: "school-item",
  14675. key: index2
  14676. }, [
  14677. vue.createVNode(_component_u_tag, {
  14678. text: item.name,
  14679. closable: ""
  14680. }, null, 8, ["text"])
  14681. ]);
  14682. }),
  14683. 128
  14684. /* KEYED_FRAGMENT */
  14685. ))
  14686. ]),
  14687. vue.createCommentVNode(" 底部提交按钮 "),
  14688. vue.createElementVNode("view", { class: "submit-btn" }, [
  14689. vue.createVNode(_component_u_button, {
  14690. type: "success",
  14691. block: "",
  14692. onClick: $setup.handleSubmit
  14693. }, {
  14694. default: vue.withCtx(() => [
  14695. vue.createTextVNode("提交")
  14696. ]),
  14697. _: 1
  14698. /* STABLE */
  14699. })
  14700. ])
  14701. ]);
  14702. }
  14703. const PagesMyPageSchool = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-6d6c87ab"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/school.vue"]]);
  14704. const _sfc_main$g = {
  14705. __name: "orderItem",
  14706. setup(__props, { expose: __expose }) {
  14707. __expose();
  14708. const orderId = vue.ref("66478425");
  14709. const trackingId = vue.ref("DPK202356410215");
  14710. const estimatedAmount = vue.ref("66.6");
  14711. const auditAmount = vue.ref("待核");
  14712. const internalNote = vue.ref("已反馈");
  14713. const statusColor = vue.ref("#FF4D4F");
  14714. const copyToClipboard = (text) => {
  14715. uni.setClipboardData({
  14716. data: text,
  14717. success: () => {
  14718. uni.showToast({
  14719. title: "复制成功",
  14720. icon: "success"
  14721. });
  14722. }
  14723. });
  14724. };
  14725. const handleAudit = () => {
  14726. formatAppLog("log", "at pages/my/components/orderItem.vue:76", "到货审核");
  14727. };
  14728. const handleView = () => {
  14729. formatAppLog("log", "at pages/my/components/orderItem.vue:82", "查看");
  14730. };
  14731. const __returned__ = { orderId, trackingId, estimatedAmount, auditAmount, internalNote, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref };
  14732. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14733. return __returned__;
  14734. }
  14735. };
  14736. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  14737. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  14738. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  14739. vue.createCommentVNode(" 用户信息 "),
  14740. vue.createElementVNode("view", { class: "user-info" }, [
  14741. vue.createElementVNode("image", {
  14742. class: "avatar",
  14743. src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png",
  14744. mode: "aspectFill"
  14745. }),
  14746. vue.createElementVNode("view", { class: "user-details" }, [
  14747. vue.createElementVNode("text", { class: "username" }, "微信用户(南**)"),
  14748. vue.createElementVNode("text", { class: "date" }, "共卖出7本书"),
  14749. vue.createElementVNode("text", { class: "date" }, "来自河南省郑州市中牟县")
  14750. ]),
  14751. vue.createElementVNode("view", { class: "user-details right-items" }, [
  14752. vue.createElementVNode("text", { class: "date" }, "2024-06-01 17:00:00"),
  14753. vue.createElementVNode(
  14754. "text",
  14755. {
  14756. class: "status",
  14757. style: vue.normalizeStyle({ color: $setup.statusColor })
  14758. },
  14759. "[待收货审核]",
  14760. 4
  14761. /* STYLE */
  14762. )
  14763. ])
  14764. ]),
  14765. vue.createCommentVNode(" 订单信息 "),
  14766. vue.createElementVNode("view", { class: "order-info" }),
  14767. vue.createCommentVNode(" 订单详情 "),
  14768. vue.createElementVNode("view", { class: "order-details" }, [
  14769. vue.createElementVNode("view", { class: "detail-row" }, [
  14770. vue.createElementVNode("text", null, "订单ID:"),
  14771. vue.createElementVNode(
  14772. "text",
  14773. {
  14774. class: "link",
  14775. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($setup.orderId))
  14776. },
  14777. vue.toDisplayString($setup.orderId),
  14778. 1
  14779. /* TEXT */
  14780. ),
  14781. vue.createElementVNode("text", null, "运单号:"),
  14782. vue.createElementVNode(
  14783. "text",
  14784. {
  14785. class: "link",
  14786. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($setup.trackingId))
  14787. },
  14788. vue.toDisplayString($setup.trackingId),
  14789. 1
  14790. /* TEXT */
  14791. )
  14792. ]),
  14793. vue.createElementVNode("view", { class: "detail-row" }, [
  14794. vue.createElementVNode(
  14795. "text",
  14796. null,
  14797. "预估金额:" + vue.toDisplayString($setup.estimatedAmount),
  14798. 1
  14799. /* TEXT */
  14800. ),
  14801. vue.createElementVNode(
  14802. "text",
  14803. null,
  14804. "审核金额:" + vue.toDisplayString($setup.auditAmount),
  14805. 1
  14806. /* TEXT */
  14807. )
  14808. ]),
  14809. vue.createElementVNode("view", { class: "detail-row" }, [
  14810. vue.createElementVNode(
  14811. "text",
  14812. null,
  14813. "内部备注:" + vue.toDisplayString($setup.internalNote),
  14814. 1
  14815. /* TEXT */
  14816. )
  14817. ])
  14818. ]),
  14819. vue.createCommentVNode(" 操作按钮 "),
  14820. vue.createElementVNode("view", { class: "action-buttons" }, [
  14821. vue.createVNode(_component_u_button, {
  14822. size: "small",
  14823. onClick: $setup.handleAudit
  14824. }, {
  14825. default: vue.withCtx(() => [
  14826. vue.createTextVNode("到货审核")
  14827. ]),
  14828. _: 1
  14829. /* STABLE */
  14830. }),
  14831. vue.createVNode(_component_u_button, {
  14832. size: "small",
  14833. onClick: $setup.handleView
  14834. }, {
  14835. default: vue.withCtx(() => [
  14836. vue.createTextVNode("查看")
  14837. ]),
  14838. _: 1
  14839. /* STABLE */
  14840. })
  14841. ])
  14842. ]);
  14843. }
  14844. const orderItem = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-12bc2a79"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/components/orderItem.vue"]]);
  14845. const _sfc_main$f = {
  14846. __name: "audit-unfinished",
  14847. setup(__props, { expose: __expose }) {
  14848. __expose();
  14849. const __returned__ = { orderItem };
  14850. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14851. return __returned__;
  14852. }
  14853. };
  14854. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  14855. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  14856. vue.createVNode($setup["orderItem"]),
  14857. vue.createVNode($setup["orderItem"]),
  14858. vue.createVNode($setup["orderItem"])
  14859. ]);
  14860. }
  14861. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/audit-unfinished.vue"]]);
  14862. const _sfc_main$e = {
  14863. __name: "version",
  14864. setup(__props, { expose: __expose }) {
  14865. __expose();
  14866. const userInfo = vue.reactive({
  14867. version: "v_2024050400_1",
  14868. // Example version number
  14869. updateStatus: "已经是新版本"
  14870. // Example update status
  14871. });
  14872. function checkForUpdates() {
  14873. setTimeout(() => {
  14874. {
  14875. userInfo.updateStatus = "发现新版本,正在下载...";
  14876. downloadNewVersion();
  14877. }
  14878. }, 1e3);
  14879. }
  14880. function downloadNewVersion() {
  14881. setTimeout(() => {
  14882. userInfo.updateStatus = "下载完成,准备安装";
  14883. }, 2e3);
  14884. }
  14885. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  14886. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14887. return __returned__;
  14888. }
  14889. };
  14890. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  14891. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  14892. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
  14893. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  14894. vue.createVNode(_component_u_cell_group, {
  14895. border: false,
  14896. customStyle: "background:#ffffff"
  14897. }, {
  14898. default: vue.withCtx(() => [
  14899. vue.createVNode(_component_u_cell, {
  14900. title: "当前版本号(正式版)",
  14901. value: $setup.userInfo.version || "无"
  14902. }, null, 8, ["value"]),
  14903. vue.createVNode(_component_u_cell, {
  14904. title: "检测更新",
  14905. value: $setup.userInfo.updateStatus || "无",
  14906. border: false,
  14907. onClick: $setup.checkForUpdates
  14908. }, null, 8, ["value"])
  14909. ]),
  14910. _: 1
  14911. /* STABLE */
  14912. })
  14913. ]);
  14914. }
  14915. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/version.vue"]]);
  14916. const props$2 = {
  14917. props: {
  14918. // 是否为加载中状态
  14919. loading: {
  14920. type: Boolean,
  14921. default: props$x.switch.loading
  14922. },
  14923. // 是否为禁用装填
  14924. disabled: {
  14925. type: Boolean,
  14926. default: props$x.switch.disabled
  14927. },
  14928. // 开关尺寸,单位px
  14929. size: {
  14930. type: [String, Number],
  14931. default: props$x.switch.size
  14932. },
  14933. // 打开时的背景颜色
  14934. activeColor: {
  14935. type: String,
  14936. default: props$x.switch.activeColor
  14937. },
  14938. // 关闭时的背景颜色
  14939. inactiveColor: {
  14940. type: String,
  14941. default: props$x.switch.inactiveColor
  14942. },
  14943. // 通过v-model双向绑定的值
  14944. modelValue: {
  14945. type: [Boolean, String, Number],
  14946. default: props$x.switch.value
  14947. },
  14948. // switch打开时的值
  14949. activeValue: {
  14950. type: [String, Number, Boolean],
  14951. default: props$x.switch.activeValue
  14952. },
  14953. // switch关闭时的值
  14954. inactiveValue: {
  14955. type: [String, Number, Boolean],
  14956. default: props$x.switch.inactiveValue
  14957. },
  14958. // 是否开启异步变更,开启后需要手动控制输入值
  14959. asyncChange: {
  14960. type: Boolean,
  14961. default: props$x.switch.asyncChange
  14962. },
  14963. // 圆点与外边框的距离
  14964. space: {
  14965. type: [String, Number],
  14966. default: props$x.switch.space
  14967. }
  14968. }
  14969. };
  14970. const _sfc_main$d = {
  14971. name: "u-switch",
  14972. mixins: [mpMixin, mixin, props$2],
  14973. watch: {
  14974. modelValue: {
  14975. immediate: true,
  14976. handler(n) {
  14977. if (n !== this.inactiveValue && n !== this.activeValue) {
  14978. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  14979. }
  14980. }
  14981. }
  14982. },
  14983. data() {
  14984. return {
  14985. bgColor: "#ffffff"
  14986. };
  14987. },
  14988. computed: {
  14989. isActive() {
  14990. return this.modelValue === this.activeValue;
  14991. },
  14992. switchStyle() {
  14993. let style = {};
  14994. style.width = uni.$u.addUnit(this.size * 2 + 2);
  14995. style.height = uni.$u.addUnit(Number(this.size) + 2);
  14996. if (this.customInactiveColor) {
  14997. style.borderColor = "rgba(0, 0, 0, 0)";
  14998. }
  14999. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  15000. return style;
  15001. },
  15002. nodeStyle() {
  15003. let style = {};
  15004. style.width = uni.$u.addUnit(this.size - this.space);
  15005. style.height = uni.$u.addUnit(this.size - this.space);
  15006. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  15007. style.transform = `translateX(-${translateX})`;
  15008. return style;
  15009. },
  15010. bgStyle() {
  15011. let style = {};
  15012. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  15013. style.height = uni.$u.addUnit(this.size);
  15014. style.backgroundColor = this.inactiveColor;
  15015. style.transform = `scale(${this.isActive ? 0 : 1})`;
  15016. return style;
  15017. },
  15018. customInactiveColor() {
  15019. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  15020. }
  15021. },
  15022. emits: ["update:modelValue", "change"],
  15023. methods: {
  15024. clickHandler() {
  15025. if (!this.disabled && !this.loading) {
  15026. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  15027. if (!this.asyncChange) {
  15028. this.$emit("update:modelValue", oldValue);
  15029. }
  15030. this.$nextTick(() => {
  15031. this.$emit("change", oldValue);
  15032. });
  15033. }
  15034. }
  15035. }
  15036. };
  15037. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  15038. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
  15039. return vue.openBlock(), vue.createElementBlock(
  15040. "view",
  15041. {
  15042. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  15043. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  15044. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  15045. },
  15046. [
  15047. vue.createElementVNode(
  15048. "view",
  15049. {
  15050. class: "u-switch__bg",
  15051. style: vue.normalizeStyle([$options.bgStyle])
  15052. },
  15053. null,
  15054. 4
  15055. /* STYLE */
  15056. ),
  15057. vue.createElementVNode(
  15058. "view",
  15059. {
  15060. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  15061. style: vue.normalizeStyle([$options.nodeStyle]),
  15062. ref: "u-switch__node"
  15063. },
  15064. [
  15065. vue.createVNode(_component_u_loading_icon, {
  15066. show: _ctx.loading,
  15067. mode: "circle",
  15068. timingFunction: "linear",
  15069. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  15070. size: _ctx.size * 0.6
  15071. }, null, 8, ["show", "color", "size"])
  15072. ],
  15073. 6
  15074. /* CLASS, STYLE */
  15075. )
  15076. ],
  15077. 6
  15078. /* CLASS, STYLE */
  15079. );
  15080. }
  15081. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-6ab257b3"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]);
  15082. const props$1 = {
  15083. props: {
  15084. // 输入框的内容
  15085. value: {
  15086. type: [String, Number],
  15087. default: props$x.textarea.value
  15088. },
  15089. // 输入框的内容
  15090. modelValue: {
  15091. type: [String, Number],
  15092. default: props$x.textarea.value
  15093. },
  15094. // 输入框为空时占位符
  15095. placeholder: {
  15096. type: [String, Number],
  15097. default: props$x.textarea.placeholder
  15098. },
  15099. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  15100. placeholderClass: {
  15101. type: String,
  15102. default: props$x.input.placeholderClass
  15103. },
  15104. // 指定placeholder的样式
  15105. placeholderStyle: {
  15106. type: [String, Object],
  15107. default: props$x.input.placeholderStyle
  15108. },
  15109. // 输入框高度
  15110. height: {
  15111. type: [String, Number],
  15112. default: props$x.textarea.height
  15113. },
  15114. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  15115. confirmType: {
  15116. type: String,
  15117. default: props$x.textarea.confirmType
  15118. },
  15119. // 是否禁用
  15120. disabled: {
  15121. type: Boolean,
  15122. default: props$x.textarea.disabled
  15123. },
  15124. // 是否显示统计字数
  15125. count: {
  15126. type: Boolean,
  15127. default: props$x.textarea.count
  15128. },
  15129. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  15130. focus: {
  15131. type: Boolean,
  15132. default: props$x.textarea.focus
  15133. },
  15134. // 是否自动增加高度
  15135. autoHeight: {
  15136. type: Boolean,
  15137. default: props$x.textarea.autoHeight
  15138. },
  15139. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  15140. fixed: {
  15141. type: Boolean,
  15142. default: props$x.textarea.fixed
  15143. },
  15144. // 指定光标与键盘的距离
  15145. cursorSpacing: {
  15146. type: Number,
  15147. default: props$x.textarea.cursorSpacing
  15148. },
  15149. // 指定focus时的光标位置
  15150. cursor: {
  15151. type: [String, Number],
  15152. default: props$x.textarea.cursor
  15153. },
  15154. // 是否显示键盘上方带有”完成“按钮那一栏,
  15155. showConfirmBar: {
  15156. type: Boolean,
  15157. default: props$x.textarea.showConfirmBar
  15158. },
  15159. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  15160. selectionStart: {
  15161. type: Number,
  15162. default: props$x.textarea.selectionStart
  15163. },
  15164. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  15165. selectionEnd: {
  15166. type: Number,
  15167. default: props$x.textarea.selectionEnd
  15168. },
  15169. // 键盘弹起时,是否自动上推页面
  15170. adjustPosition: {
  15171. type: Boolean,
  15172. default: props$x.textarea.adjustPosition
  15173. },
  15174. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  15175. disableDefaultPadding: {
  15176. type: Boolean,
  15177. default: props$x.textarea.disableDefaultPadding
  15178. },
  15179. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  15180. holdKeyboard: {
  15181. type: Boolean,
  15182. default: props$x.textarea.holdKeyboard
  15183. },
  15184. // 最大输入长度,设置为 -1 的时候不限制最大长度
  15185. maxlength: {
  15186. type: [String, Number],
  15187. default: props$x.textarea.maxlength
  15188. },
  15189. // 边框类型,surround-四周边框,bottom-底部边框
  15190. border: {
  15191. type: String,
  15192. default: props$x.textarea.border
  15193. },
  15194. // 用于处理或者过滤输入框内容的方法
  15195. formatter: {
  15196. type: [Function, null],
  15197. default: props$x.textarea.formatter
  15198. },
  15199. // 是否忽略组件内对文本合成系统事件的处理
  15200. ignoreCompositionEvent: {
  15201. type: Boolean,
  15202. default: true
  15203. }
  15204. }
  15205. };
  15206. const _sfc_main$c = {
  15207. name: "u-textarea",
  15208. mixins: [mpMixin, mixin, props$1],
  15209. data() {
  15210. return {
  15211. // 输入框的值
  15212. innerValue: "",
  15213. // 是否处于获得焦点状态
  15214. focused: false,
  15215. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  15216. firstChange: true,
  15217. // value绑定值的变化是由内部还是外部引起的
  15218. changeFromInner: false,
  15219. // 过滤处理方法
  15220. innerFormatter: (value2) => value2
  15221. };
  15222. },
  15223. created() {
  15224. },
  15225. watch: {
  15226. modelValue: {
  15227. immediate: true,
  15228. handler(newVal, oldVal) {
  15229. this.innerValue = newVal;
  15230. this.firstChange = false;
  15231. this.changeFromInner = false;
  15232. }
  15233. }
  15234. },
  15235. computed: {
  15236. // 组件的类名
  15237. textareaClass() {
  15238. let classes = [], { border, disabled } = this;
  15239. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  15240. border === "bottom" && (classes = classes.concat([
  15241. "u-border-bottom",
  15242. "u-textarea--no-radius"
  15243. ]));
  15244. disabled && classes.push("u-textarea--disabled");
  15245. return classes.join(" ");
  15246. },
  15247. // 组件的样式
  15248. textareaStyle() {
  15249. const style = {};
  15250. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  15251. }
  15252. },
  15253. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  15254. methods: {
  15255. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  15256. setFormatter(e) {
  15257. this.innerFormatter = e;
  15258. },
  15259. onFocus(e) {
  15260. this.$emit("focus", e);
  15261. },
  15262. onBlur(e) {
  15263. this.$emit("blur", e);
  15264. uni.$u.formValidate(this, "blur");
  15265. },
  15266. onLinechange(e) {
  15267. this.$emit("linechange", e);
  15268. },
  15269. onInput(e) {
  15270. let { value: value2 = "" } = e.detail || {};
  15271. const formatter = this.formatter || this.innerFormatter;
  15272. const formatValue = formatter(value2);
  15273. this.innerValue = value2;
  15274. this.$nextTick(() => {
  15275. this.innerValue = formatValue;
  15276. this.valueChange();
  15277. });
  15278. },
  15279. // 内容发生变化,进行处理
  15280. valueChange() {
  15281. const value2 = this.innerValue;
  15282. this.$nextTick(() => {
  15283. this.$emit("update:modelValue", value2);
  15284. this.changeFromInner = true;
  15285. this.$emit("change", value2);
  15286. uni.$u.formValidate(this, "change");
  15287. });
  15288. },
  15289. onConfirm(e) {
  15290. this.$emit("confirm", e);
  15291. },
  15292. onKeyboardheightchange(e) {
  15293. this.$emit("keyboardheightchange", e);
  15294. }
  15295. }
  15296. };
  15297. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  15298. return vue.openBlock(), vue.createElementBlock(
  15299. "view",
  15300. {
  15301. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  15302. style: vue.normalizeStyle([$options.textareaStyle])
  15303. },
  15304. [
  15305. vue.createElementVNode("textarea", {
  15306. class: "u-textarea__field",
  15307. value: $data.innerValue,
  15308. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  15309. placeholder: _ctx.placeholder,
  15310. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  15311. "placeholder-class": _ctx.placeholderClass,
  15312. disabled: _ctx.disabled,
  15313. focus: _ctx.focus,
  15314. autoHeight: _ctx.autoHeight,
  15315. fixed: _ctx.fixed,
  15316. cursorSpacing: _ctx.cursorSpacing,
  15317. cursor: _ctx.cursor,
  15318. showConfirmBar: _ctx.showConfirmBar,
  15319. selectionStart: _ctx.selectionStart,
  15320. selectionEnd: _ctx.selectionEnd,
  15321. adjustPosition: _ctx.adjustPosition,
  15322. disableDefaultPadding: _ctx.disableDefaultPadding,
  15323. holdKeyboard: _ctx.holdKeyboard,
  15324. maxlength: _ctx.maxlength,
  15325. "confirm-type": _ctx.confirmType,
  15326. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  15327. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  15328. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  15329. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  15330. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  15331. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  15332. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  15333. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  15334. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  15335. "text",
  15336. {
  15337. key: 0,
  15338. class: "u-textarea__count",
  15339. style: vue.normalizeStyle({
  15340. "background-color": _ctx.disabled ? "transparent" : "#fff"
  15341. })
  15342. },
  15343. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  15344. 5
  15345. /* TEXT, STYLE */
  15346. )) : vue.createCommentVNode("v-if", true)
  15347. ],
  15348. 6
  15349. /* CLASS, STYLE */
  15350. );
  15351. }
  15352. const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-b6c174a6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
  15353. const props = {
  15354. props: {
  15355. // 最小可选值
  15356. min: {
  15357. type: [Number, String],
  15358. default: props$x.slider.min
  15359. },
  15360. // 最大可选值
  15361. max: {
  15362. type: [Number, String],
  15363. default: props$x.slider.max
  15364. },
  15365. // 步长,取值必须大于 0,并且可被(max - min)整除
  15366. step: {
  15367. type: [Number, String],
  15368. default: props$x.slider.step
  15369. },
  15370. // 当前取值
  15371. value: {
  15372. type: [Number, String],
  15373. default: props$x.slider.value
  15374. },
  15375. // 滑块右侧已选择部分的背景色
  15376. activeColor: {
  15377. type: String,
  15378. default: props$x.slider.activeColor
  15379. },
  15380. // 滑块左侧未选择部分的背景色
  15381. inactiveColor: {
  15382. type: String,
  15383. default: props$x.slider.inactiveColor
  15384. },
  15385. // 滑块的大小,取值范围为 12 - 28
  15386. blockSize: {
  15387. type: [Number, String],
  15388. default: props$x.slider.blockSize
  15389. },
  15390. // 滑块的颜色
  15391. blockColor: {
  15392. type: String,
  15393. default: props$x.slider.blockColor
  15394. },
  15395. // 禁用状态
  15396. disabled: {
  15397. type: Boolean,
  15398. default: props$x.slider.disabled
  15399. },
  15400. // 是否显示当前的选择值
  15401. showValue: {
  15402. type: Boolean,
  15403. default: props$x.slider.showValue
  15404. }
  15405. }
  15406. };
  15407. const _sfc_main$b = {
  15408. name: "u--slider",
  15409. mixins: [mpMixin, mixin, props],
  15410. methods: {
  15411. // 拖动过程中触发
  15412. changingHandler(e) {
  15413. const {
  15414. value: value2
  15415. } = e.detail;
  15416. this.$emit("input", value2);
  15417. this.$emit("changing", value2);
  15418. },
  15419. // 滑动结束时触发
  15420. changeHandler(e) {
  15421. const {
  15422. value: value2
  15423. } = e.detail;
  15424. this.$emit("input", value2);
  15425. this.$emit("change", value2);
  15426. }
  15427. }
  15428. };
  15429. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  15430. return vue.openBlock(), vue.createElementBlock(
  15431. "view",
  15432. {
  15433. class: "u-slider",
  15434. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  15435. },
  15436. [
  15437. vue.createElementVNode("slider", {
  15438. min: _ctx.min,
  15439. max: _ctx.max,
  15440. step: _ctx.step,
  15441. value: _ctx.value,
  15442. activeColor: _ctx.activeColor,
  15443. inactiveColor: _ctx.inactiveColor,
  15444. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  15445. blockColor: _ctx.blockColor,
  15446. showValue: _ctx.showValue,
  15447. disabled: _ctx.disabled,
  15448. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  15449. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  15450. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  15451. ],
  15452. 4
  15453. /* STYLE */
  15454. );
  15455. }
  15456. 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"]]);
  15457. const _sfc_main$a = {
  15458. __name: "volume",
  15459. setup(__props, { expose: __expose }) {
  15460. __expose();
  15461. let innerAudioContext = null;
  15462. const settings = vue.reactive({
  15463. voiceBroadcast: true,
  15464. clickSound: true,
  15465. startupPrompt: true,
  15466. startupText: "书嗨,不辜负每一个爱书的人",
  15467. speechRate: 10,
  15468. pitch: 10
  15469. });
  15470. async function checkAndRequestPermissions() {
  15471. try {
  15472. const status = await requestPermissions();
  15473. if (!status) {
  15474. uni.showModal({
  15475. title: "提示",
  15476. content: "请在系统设置中允许应用访问麦克风等权限,以便使用语音功能",
  15477. confirmText: "去设置",
  15478. success: (res) => {
  15479. if (res.confirm) {
  15480. if (uni.getSystemInfoSync().platform === "android") {
  15481. const main = plus.android.runtimeMainActivity();
  15482. const Intent = plus.android.importClass("android.content.Intent");
  15483. const Settings = plus.android.importClass("android.provider.Settings");
  15484. const Uri = plus.android.importClass("android.net.Uri");
  15485. const intent = new Intent();
  15486. intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
  15487. intent.setData(Uri.fromParts("package", main.getPackageName(), null));
  15488. main.startActivity(intent);
  15489. } else {
  15490. const UIApplication = plus.ios.import("UIApplication");
  15491. const NSURL = plus.ios.import("NSURL");
  15492. const setting = NSURL.URLWithString("app-settings:");
  15493. const application = UIApplication.sharedApplication();
  15494. application.openURL(setting);
  15495. }
  15496. }
  15497. }
  15498. });
  15499. return false;
  15500. }
  15501. return true;
  15502. } catch (error2) {
  15503. formatAppLog("error", "at pages/my/page/volume.vue:118", "权限请求失败:", error2);
  15504. return false;
  15505. }
  15506. }
  15507. function requestPermissions() {
  15508. return new Promise((resolve, reject) => {
  15509. plus.android.requestPermissions(
  15510. [
  15511. "android.permission.RECORD_AUDIO",
  15512. "android.permission.MODIFY_AUDIO_SETTINGS",
  15513. "android.permission.WRITE_EXTERNAL_STORAGE",
  15514. "android.permission.READ_EXTERNAL_STORAGE"
  15515. ],
  15516. function(resultObj) {
  15517. if (resultObj.granted.length === 4) {
  15518. resolve(true);
  15519. } else {
  15520. resolve(false);
  15521. }
  15522. },
  15523. function(error2) {
  15524. reject(error2);
  15525. }
  15526. );
  15527. resolve(true);
  15528. });
  15529. }
  15530. async function initTTS() {
  15531. const hasPermission = await checkAndRequestPermissions();
  15532. if (!hasPermission) {
  15533. return;
  15534. }
  15535. if (!uni.createInnerAudioContext) {
  15536. uni.showToast({
  15537. title: "当前设备不支持语音功能",
  15538. icon: "none"
  15539. });
  15540. return;
  15541. }
  15542. try {
  15543. innerAudioContext = uni.createInnerAudioContext();
  15544. innerAudioContext.onError((res) => {
  15545. formatAppLog("error", "at pages/my/page/volume.vue:192", "音频播放错误:", res.errMsg);
  15546. uni.showToast({
  15547. title: "语音播放失败",
  15548. icon: "none"
  15549. });
  15550. });
  15551. } catch (error2) {
  15552. formatAppLog("error", "at pages/my/page/volume.vue:199", "TTS初始化失败:", error2);
  15553. }
  15554. }
  15555. async function textToSpeech(text) {
  15556. const hasPermission = await checkAndRequestPermissions();
  15557. if (!hasPermission) {
  15558. return;
  15559. }
  15560. if (!settings.voiceBroadcast)
  15561. return;
  15562. try {
  15563. const ttsParams = {
  15564. lang: "zh-CN",
  15565. speed: settings.speechRate / 10,
  15566. // 将 0-10 转换为 0-1
  15567. pitch: settings.pitch / 10,
  15568. // 将 0-10 转换为 0-1
  15569. volume: 1,
  15570. text
  15571. };
  15572. const TTSModule = requireNativePlugin("nrb-tts-plugin");
  15573. TTSModule && TTSModule.init({
  15574. "lang": "ZH",
  15575. "country": "CN"
  15576. }, (res) => {
  15577. if (res.success == 0) {
  15578. TTSModule.speak(text, ttsParams, (e) => {
  15579. formatAppLog("log", "at pages/my/page/volume.vue:231", e, "dsadsads");
  15580. });
  15581. }
  15582. });
  15583. } catch (error2) {
  15584. formatAppLog("error", "at pages/my/page/volume.vue:265", "TTS播放错误:", error2);
  15585. uni.showToast({
  15586. title: "语音播放失败",
  15587. icon: "none"
  15588. });
  15589. }
  15590. }
  15591. function saveAndTest() {
  15592. uni.setStorageSync("tts_settings", settings);
  15593. textToSpeech(settings.startupText);
  15594. uni.showToast({
  15595. title: "设置已保存",
  15596. icon: "success"
  15597. });
  15598. }
  15599. function stopPlayback() {
  15600. const TTSModule = requireNativePlugin("nrb-tts-plugin");
  15601. if (TTSModule && TTSModule.stop) {
  15602. TTSModule.stop();
  15603. }
  15604. uni.showToast({
  15605. title: "已停止播放",
  15606. icon: "none"
  15607. });
  15608. }
  15609. function restartApp() {
  15610. uni.showModal({
  15611. title: "提示",
  15612. content: "确定要重启应用吗?",
  15613. success: function(res) {
  15614. if (res.confirm) {
  15615. plus.runtime.restart();
  15616. }
  15617. }
  15618. });
  15619. }
  15620. function loadSettings() {
  15621. try {
  15622. const savedSettings = uni.getStorageSync("tts_settings");
  15623. if (savedSettings) {
  15624. Object.assign(settings, savedSettings);
  15625. }
  15626. } catch (error2) {
  15627. formatAppLog("error", "at pages/my/page/volume.vue:343", "加载设置失败:", error2);
  15628. }
  15629. }
  15630. function playClickSound() {
  15631. if (!settings.clickSound)
  15632. return;
  15633. const audio = uni.createInnerAudioContext();
  15634. audio.src = "/static/audio/click.mp3";
  15635. audio.play();
  15636. }
  15637. vue.onMounted(async () => {
  15638. await initTTS();
  15639. loadSettings();
  15640. });
  15641. const __returned__ = { get innerAudioContext() {
  15642. return innerAudioContext;
  15643. }, set innerAudioContext(v) {
  15644. innerAudioContext = v;
  15645. }, settings, checkAndRequestPermissions, requestPermissions, initTTS, textToSpeech, saveAndTest, stopPlayback, restartApp, loadSettings, playClickSound, reactive: vue.reactive, onMounted: vue.onMounted };
  15646. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15647. return __returned__;
  15648. }
  15649. };
  15650. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  15651. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  15652. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  15653. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
  15654. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3);
  15655. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  15656. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  15657. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  15658. vue.createCommentVNode(" 设置选项组 "),
  15659. vue.createElementVNode("view", { class: "settings-section" }, [
  15660. vue.createVNode(_component_u_cell_group, { border: false }, {
  15661. default: vue.withCtx(() => [
  15662. vue.createCommentVNode(" 语音播报设置 "),
  15663. vue.createVNode(_component_u_cell, {
  15664. title: "语音播报",
  15665. label: "控制除app启动提示外所有语音播报的开关",
  15666. "border-bottom": true
  15667. }, {
  15668. "right-icon": vue.withCtx(() => [
  15669. vue.createVNode(_component_u_switch, {
  15670. modelValue: $setup.settings.voiceBroadcast,
  15671. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.voiceBroadcast = $event),
  15672. activeColor: "#4cd964"
  15673. }, null, 8, ["modelValue"])
  15674. ]),
  15675. _: 1
  15676. /* STABLE */
  15677. }),
  15678. vue.createCommentVNode(" 点击音效设置 "),
  15679. vue.createVNode(_component_u_cell, {
  15680. title: "点击音效",
  15681. "border-bottom": true
  15682. }, {
  15683. "right-icon": vue.withCtx(() => [
  15684. vue.createVNode(_component_u_switch, {
  15685. modelValue: $setup.settings.clickSound,
  15686. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.clickSound = $event),
  15687. activeColor: "#4cd964"
  15688. }, null, 8, ["modelValue"])
  15689. ]),
  15690. _: 1
  15691. /* STABLE */
  15692. }),
  15693. vue.createCommentVNode(" 启动提示语设置 "),
  15694. vue.createVNode(_component_u_cell, {
  15695. title: "启动提示语",
  15696. "border-bottom": true
  15697. }, {
  15698. "right-icon": vue.withCtx(() => [
  15699. vue.createVNode(_component_u_switch, {
  15700. modelValue: $setup.settings.startupPrompt,
  15701. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.startupPrompt = $event),
  15702. activeColor: "#4cd964"
  15703. }, null, 8, ["modelValue"])
  15704. ]),
  15705. _: 1
  15706. /* STABLE */
  15707. })
  15708. ]),
  15709. _: 1
  15710. /* STABLE */
  15711. }),
  15712. vue.createCommentVNode(" 启动提示语输入框 "),
  15713. vue.createElementVNode("view", { class: "input-section" }, [
  15714. vue.createVNode(_component_u_textarea, {
  15715. modelValue: $setup.settings.startupText,
  15716. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.startupText = $event),
  15717. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  15718. height: "100"
  15719. }, null, 8, ["modelValue"])
  15720. ]),
  15721. vue.createCommentVNode(" 语速设置 "),
  15722. vue.createElementVNode("view", { class: "slider-section" }, [
  15723. vue.createElementVNode("view", { class: "slider-title" }, [
  15724. vue.createElementVNode("text", null, "设置语速"),
  15725. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  15726. ]),
  15727. vue.createVNode(_component_u_slider, {
  15728. modelValue: $setup.settings.speechRate,
  15729. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.settings.speechRate = $event),
  15730. min: 0,
  15731. max: 10,
  15732. step: 1,
  15733. showValue: ""
  15734. }, null, 8, ["modelValue"])
  15735. ]),
  15736. vue.createCommentVNode(" 音调设置 "),
  15737. vue.createElementVNode("view", { class: "slider-section" }, [
  15738. vue.createElementVNode("view", { class: "slider-title" }, [
  15739. vue.createElementVNode("text", null, "设置音调"),
  15740. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  15741. ]),
  15742. vue.createVNode(_component_u_slider, {
  15743. modelValue: $setup.settings.pitch,
  15744. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.settings.pitch = $event),
  15745. min: 0,
  15746. max: 10,
  15747. step: 1,
  15748. showValue: ""
  15749. }, null, 8, ["modelValue"])
  15750. ]),
  15751. vue.createCommentVNode(" 操作按钮 "),
  15752. vue.createElementVNode("view", { class: "button-group" }, [
  15753. vue.createVNode(_component_u_button, {
  15754. type: "primary",
  15755. text: "保存设置并试听",
  15756. onClick: $setup.saveAndTest
  15757. }),
  15758. vue.createVNode(_component_u_button, {
  15759. type: "warning",
  15760. text: "停止播放",
  15761. onClick: $setup.stopPlayback,
  15762. plain: true
  15763. }),
  15764. vue.createVNode(_component_u_button, {
  15765. type: "error",
  15766. text: "重启app",
  15767. onClick: $setup.restartApp,
  15768. plain: true
  15769. })
  15770. ])
  15771. ])
  15772. ]);
  15773. }
  15774. 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"]]);
  15775. const _sfc_main$9 = {
  15776. __name: "book-display",
  15777. setup(__props, { expose: __expose }) {
  15778. __expose();
  15779. const settings = vue.reactive({
  15780. showRecyclePrice: false,
  15781. showRecycleStatus: false,
  15782. showInventoryInfo: false,
  15783. expandProductDetails: false
  15784. });
  15785. function loadSettings() {
  15786. try {
  15787. const savedSettings = uni.getStorageSync("display_settings");
  15788. if (savedSettings) {
  15789. Object.assign(settings, JSON.parse(savedSettings));
  15790. }
  15791. } catch (error2) {
  15792. formatAppLog("error", "at pages/my/page/book-display.vue:51", "加载设置失败:", error2);
  15793. }
  15794. }
  15795. function saveSettings() {
  15796. try {
  15797. uni.setStorageSync("display_settings", JSON.stringify(settings));
  15798. uni.showToast({
  15799. title: "设置已保存",
  15800. icon: "success"
  15801. });
  15802. } catch (error2) {
  15803. formatAppLog("error", "at pages/my/page/book-display.vue:64", "保存设置失败:", error2);
  15804. uni.showToast({
  15805. title: "保存设置失败",
  15806. icon: "error"
  15807. });
  15808. }
  15809. }
  15810. vue.onMounted(() => {
  15811. loadSettings();
  15812. });
  15813. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  15814. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15815. return __returned__;
  15816. }
  15817. };
  15818. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  15819. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  15820. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  15821. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
  15822. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  15823. vue.createCommentVNode(" 设置列表 "),
  15824. vue.createVNode(_component_u_cell_group, {
  15825. border: false,
  15826. class: "settings-group"
  15827. }, {
  15828. default: vue.withCtx(() => [
  15829. vue.createVNode(_component_u_cell, {
  15830. title: "是否展示回收价",
  15831. "border-bottom": true
  15832. }, {
  15833. "right-icon": vue.withCtx(() => [
  15834. vue.createVNode(_component_u_switch, {
  15835. modelValue: $setup.settings.showRecyclePrice,
  15836. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  15837. activeColor: "#4cd964"
  15838. }, null, 8, ["modelValue"])
  15839. ]),
  15840. _: 1
  15841. /* STABLE */
  15842. }),
  15843. vue.createVNode(_component_u_cell, {
  15844. title: "是否展示回收状态",
  15845. "border-bottom": true
  15846. }, {
  15847. "right-icon": vue.withCtx(() => [
  15848. vue.createVNode(_component_u_switch, {
  15849. modelValue: $setup.settings.showRecycleStatus,
  15850. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  15851. activeColor: "#4cd964"
  15852. }, null, 8, ["modelValue"])
  15853. ]),
  15854. _: 1
  15855. /* STABLE */
  15856. }),
  15857. vue.createVNode(_component_u_cell, {
  15858. title: "是否展示库存信息",
  15859. "border-bottom": true
  15860. }, {
  15861. "right-icon": vue.withCtx(() => [
  15862. vue.createVNode(_component_u_switch, {
  15863. modelValue: $setup.settings.showInventoryInfo,
  15864. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showInventoryInfo = $event),
  15865. activeColor: "#4cd964"
  15866. }, null, 8, ["modelValue"])
  15867. ]),
  15868. _: 1
  15869. /* STABLE */
  15870. }),
  15871. vue.createVNode(_component_u_cell, {
  15872. title: "是否默认展开商品详情",
  15873. "border-bottom": false
  15874. }, {
  15875. "right-icon": vue.withCtx(() => [
  15876. vue.createVNode(_component_u_switch, {
  15877. modelValue: $setup.settings.expandProductDetails,
  15878. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.expandProductDetails = $event),
  15879. activeColor: "#4cd964"
  15880. }, null, 8, ["modelValue"])
  15881. ]),
  15882. _: 1
  15883. /* STABLE */
  15884. })
  15885. ]),
  15886. _: 1
  15887. /* STABLE */
  15888. })
  15889. ]);
  15890. }
  15891. 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"]]);
  15892. const _sfc_main$8 = {
  15893. __name: "password",
  15894. setup(__props, { expose: __expose }) {
  15895. __expose();
  15896. const formRef = vue.ref(null);
  15897. const loading = vue.ref(false);
  15898. const showPassword = vue.reactive({
  15899. old: false,
  15900. new: false,
  15901. confirm: false
  15902. });
  15903. const formData = vue.reactive({
  15904. oldPassword: "",
  15905. newPassword: "",
  15906. confirmPassword: ""
  15907. });
  15908. const rules2 = {
  15909. oldPassword: [{
  15910. required: true,
  15911. message: "请输入原密码",
  15912. trigger: ["blur", "change"]
  15913. }, {
  15914. min: 6,
  15915. message: "密码长度不能小于6位",
  15916. trigger: ["blur", "change"]
  15917. }],
  15918. newPassword: [{
  15919. required: true,
  15920. message: "请输入新密码",
  15921. trigger: ["blur", "change"]
  15922. }, {
  15923. min: 6,
  15924. message: "密码长度不能小于6位",
  15925. trigger: ["blur", "change"]
  15926. }, {
  15927. validator: (rule, value2, callback) => {
  15928. if (value2 === formData.oldPassword) {
  15929. callback(new Error("新密码不能与原密码相同"));
  15930. } else {
  15931. callback();
  15932. }
  15933. },
  15934. trigger: ["blur", "change"]
  15935. }],
  15936. confirmPassword: [{
  15937. required: true,
  15938. message: "请再次输入新密码",
  15939. trigger: ["blur", "change"]
  15940. }, {
  15941. validator: (rule, value2, callback) => {
  15942. if (value2 !== formData.newPassword) {
  15943. callback(new Error("两次输入的密码不一致"));
  15944. } else {
  15945. callback();
  15946. }
  15947. },
  15948. trigger: ["blur", "change"]
  15949. }]
  15950. };
  15951. function togglePasswordVisible(field) {
  15952. showPassword[field] = !showPassword[field];
  15953. }
  15954. function submitForm() {
  15955. if (!formRef.value)
  15956. return;
  15957. formRef.value.validate((valid) => {
  15958. if (valid) {
  15959. loading.value = true;
  15960. setTimeout(() => {
  15961. uni.showToast({
  15962. title: "密码修改成功",
  15963. icon: "success"
  15964. });
  15965. loading.value = false;
  15966. resetForm();
  15967. }, 1500);
  15968. }
  15969. });
  15970. }
  15971. function resetForm() {
  15972. if (!formRef.value)
  15973. return;
  15974. formRef.value.resetFields();
  15975. }
  15976. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, togglePasswordVisible, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  15977. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15978. return __returned__;
  15979. }
  15980. };
  15981. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  15982. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  15983. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
  15984. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_2$4);
  15985. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_3$3);
  15986. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  15987. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  15988. vue.createVNode(_component_u_form, {
  15989. model: $setup.formData,
  15990. rules: $setup.rules,
  15991. ref: "formRef",
  15992. labelPosition: "top",
  15993. borderBottom: true,
  15994. labelWidth: "300px"
  15995. }, {
  15996. default: vue.withCtx(() => [
  15997. vue.createVNode(_component_u_form_item, {
  15998. label: "原密码",
  15999. prop: "oldPassword",
  16000. borderBottom: ""
  16001. }, {
  16002. default: vue.withCtx(() => [
  16003. vue.createVNode(_component_u_input, {
  16004. modelValue: $setup.formData.oldPassword,
  16005. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.oldPassword = $event),
  16006. type: "password",
  16007. placeholder: "请输入原密码",
  16008. password: !$setup.showPassword.old,
  16009. border: false
  16010. }, {
  16011. suffix: vue.withCtx(() => [
  16012. vue.createVNode(_component_u_icon, {
  16013. name: $setup.showPassword.old ? "eye-fill" : "eye-off",
  16014. size: "20",
  16015. color: "#909399",
  16016. onClick: _cache[0] || (_cache[0] = ($event) => $setup.togglePasswordVisible("old"))
  16017. }, null, 8, ["name"])
  16018. ]),
  16019. _: 1
  16020. /* STABLE */
  16021. }, 8, ["modelValue", "password"])
  16022. ]),
  16023. _: 1
  16024. /* STABLE */
  16025. }),
  16026. vue.createVNode(_component_u_form_item, {
  16027. label: "新密码",
  16028. prop: "newPassword",
  16029. borderBottom: ""
  16030. }, {
  16031. default: vue.withCtx(() => [
  16032. vue.createVNode(_component_u_input, {
  16033. modelValue: $setup.formData.newPassword,
  16034. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.formData.newPassword = $event),
  16035. type: "password",
  16036. placeholder: "请输入新密码",
  16037. password: !$setup.showPassword.new,
  16038. border: false
  16039. }, {
  16040. suffix: vue.withCtx(() => [
  16041. vue.createVNode(_component_u_icon, {
  16042. name: $setup.showPassword.new ? "eye-fill" : "eye-off",
  16043. size: "20",
  16044. color: "#909399",
  16045. onClick: _cache[2] || (_cache[2] = ($event) => $setup.togglePasswordVisible("new"))
  16046. }, null, 8, ["name"])
  16047. ]),
  16048. _: 1
  16049. /* STABLE */
  16050. }, 8, ["modelValue", "password"])
  16051. ]),
  16052. _: 1
  16053. /* STABLE */
  16054. }),
  16055. vue.createVNode(_component_u_form_item, {
  16056. label: "确认新密码",
  16057. prop: "confirmPassword",
  16058. borderBottom: ""
  16059. }, {
  16060. default: vue.withCtx(() => [
  16061. vue.createVNode(_component_u_input, {
  16062. modelValue: $setup.formData.confirmPassword,
  16063. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.formData.confirmPassword = $event),
  16064. type: "password",
  16065. placeholder: "请再次输入新密码",
  16066. password: !$setup.showPassword.confirm,
  16067. border: false
  16068. }, {
  16069. suffix: vue.withCtx(() => [
  16070. vue.createVNode(_component_u_icon, {
  16071. name: $setup.showPassword.confirm ? "eye-fill" : "eye-off",
  16072. size: "20",
  16073. color: "#909399",
  16074. onClick: _cache[4] || (_cache[4] = ($event) => $setup.togglePasswordVisible("confirm"))
  16075. }, null, 8, ["name"])
  16076. ]),
  16077. _: 1
  16078. /* STABLE */
  16079. }, 8, ["modelValue", "password"])
  16080. ]),
  16081. _: 1
  16082. /* STABLE */
  16083. })
  16084. ]),
  16085. _: 1
  16086. /* STABLE */
  16087. }, 8, ["model"]),
  16088. vue.createElementVNode("view", { class: "submit-btn" }, [
  16089. vue.createVNode(_component_u_button, {
  16090. type: "primary",
  16091. text: "修改密码",
  16092. onClick: $setup.submitForm,
  16093. loading: $setup.loading
  16094. }, null, 8, ["loading"])
  16095. ])
  16096. ]);
  16097. }
  16098. 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"]]);
  16099. const _sfc_main$7 = {};
  16100. function _sfc_render$6(_ctx, _cache) {
  16101. return vue.openBlock(), vue.createElementBlock("view");
  16102. }
  16103. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-review.vue"]]);
  16104. const _sfc_main$6 = {};
  16105. function _sfc_render$5(_ctx, _cache) {
  16106. return vue.openBlock(), vue.createElementBlock("view");
  16107. }
  16108. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-pick.vue"]]);
  16109. const _sfc_main$5 = {};
  16110. function _sfc_render$4(_ctx, _cache) {
  16111. return vue.openBlock(), vue.createElementBlock("view");
  16112. }
  16113. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-sign.vue"]]);
  16114. const _sfc_main$4 = {};
  16115. function _sfc_render$3(_ctx, _cache) {
  16116. return vue.openBlock(), vue.createElementBlock("view");
  16117. }
  16118. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-confirm.vue"]]);
  16119. const _sfc_main$3 = {};
  16120. function _sfc_render$2(_ctx, _cache) {
  16121. return vue.openBlock(), vue.createElementBlock("view");
  16122. }
  16123. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-audit.vue"]]);
  16124. const _sfc_main$2 = {};
  16125. function _sfc_render$1(_ctx, _cache) {
  16126. return vue.openBlock(), vue.createElementBlock("view");
  16127. }
  16128. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-payment.vue"]]);
  16129. const _sfc_main$1 = {};
  16130. function _sfc_render(_ctx, _cache) {
  16131. return vue.openBlock(), vue.createElementBlock("view");
  16132. }
  16133. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/receive-stat.vue"]]);
  16134. __definePage("pages/index/index", PagesIndexIndex);
  16135. __definePage("pages/my/my", PagesMyMy);
  16136. __definePage("pages/order/index", PagesOrderIndex);
  16137. __definePage("pages/book/index", PagesBookIndex);
  16138. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  16139. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  16140. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  16141. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  16142. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  16143. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  16144. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  16145. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  16146. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  16147. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  16148. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  16149. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  16150. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  16151. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  16152. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  16153. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  16154. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  16155. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  16156. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  16157. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  16158. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  16159. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  16160. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  16161. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  16162. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  16163. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  16164. __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
  16165. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  16166. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  16167. __definePage("pages/my/page/school", PagesMyPageSchool);
  16168. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  16169. __definePage("pages/my/page/version", PagesMyPageVersion);
  16170. __definePage("pages/my/page/volume", PagesMyPageVolume);
  16171. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  16172. __definePage("pages/my/page/password", PagesMyPagePassword);
  16173. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  16174. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  16175. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  16176. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  16177. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  16178. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  16179. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  16180. const _sfc_main = {
  16181. __name: "App",
  16182. setup(__props, { expose: __expose }) {
  16183. __expose();
  16184. onLaunch(() => {
  16185. formatAppLog("log", "at App.vue:7", "App Launch");
  16186. if (!store.token) {
  16187. let token = uni.getStorageSync("token");
  16188. if (token) {
  16189. store.setToken(token);
  16190. let userStr = uni.getStorageSync("userInfo");
  16191. if (userStr) {
  16192. let userInfo = JSON.parse(userStr);
  16193. if (userInfo.userId) {
  16194. store.setUserInfo(userInfo);
  16195. }
  16196. }
  16197. }
  16198. }
  16199. });
  16200. onShow(() => {
  16201. formatAppLog("log", "at App.vue:24", "App Show");
  16202. });
  16203. onHide(() => {
  16204. formatAppLog("log", "at App.vue:27", "App Hide");
  16205. });
  16206. const __returned__ = { get onLaunch() {
  16207. return onLaunch;
  16208. }, get onShow() {
  16209. return onShow;
  16210. }, get onHide() {
  16211. return onHide;
  16212. }, get store() {
  16213. return store;
  16214. } };
  16215. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16216. return __returned__;
  16217. }
  16218. };
  16219. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/书嗨项目/shuhi-app-fornt/App.vue"]]);
  16220. const { toString } = Object.prototype;
  16221. function isArray(val) {
  16222. return toString.call(val) === "[object Array]";
  16223. }
  16224. function isObject(val) {
  16225. return val !== null && typeof val === "object";
  16226. }
  16227. function isDate(val) {
  16228. return toString.call(val) === "[object Date]";
  16229. }
  16230. function isURLSearchParams(val) {
  16231. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  16232. }
  16233. function forEach(obj, fn) {
  16234. if (obj === null || typeof obj === "undefined") {
  16235. return;
  16236. }
  16237. if (typeof obj !== "object") {
  16238. obj = [obj];
  16239. }
  16240. if (isArray(obj)) {
  16241. for (let i = 0, l = obj.length; i < l; i++) {
  16242. fn.call(null, obj[i], i, obj);
  16243. }
  16244. } else {
  16245. for (const key in obj) {
  16246. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  16247. fn.call(null, obj[key], key, obj);
  16248. }
  16249. }
  16250. }
  16251. }
  16252. function isPlainObject(obj) {
  16253. return Object.prototype.toString.call(obj) === "[object Object]";
  16254. }
  16255. function deepMerge$1() {
  16256. const result = {};
  16257. function assignValue(val, key) {
  16258. if (typeof result[key] === "object" && typeof val === "object") {
  16259. result[key] = deepMerge$1(result[key], val);
  16260. } else if (typeof val === "object") {
  16261. result[key] = deepMerge$1({}, val);
  16262. } else {
  16263. result[key] = val;
  16264. }
  16265. }
  16266. for (let i = 0, l = arguments.length; i < l; i++) {
  16267. forEach(arguments[i], assignValue);
  16268. }
  16269. return result;
  16270. }
  16271. function isUndefined(val) {
  16272. return typeof val === "undefined";
  16273. }
  16274. function encode(val) {
  16275. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  16276. }
  16277. function buildURL(url2, params) {
  16278. if (!params) {
  16279. return url2;
  16280. }
  16281. let serializedParams;
  16282. if (isURLSearchParams(params)) {
  16283. serializedParams = params.toString();
  16284. } else {
  16285. const parts = [];
  16286. forEach(params, (val, key) => {
  16287. if (val === null || typeof val === "undefined") {
  16288. return;
  16289. }
  16290. if (isArray(val)) {
  16291. key = `${key}[]`;
  16292. } else {
  16293. val = [val];
  16294. }
  16295. forEach(val, (v) => {
  16296. if (isDate(v)) {
  16297. v = v.toISOString();
  16298. } else if (isObject(v)) {
  16299. v = JSON.stringify(v);
  16300. }
  16301. parts.push(`${encode(key)}=${encode(v)}`);
  16302. });
  16303. });
  16304. serializedParams = parts.join("&");
  16305. }
  16306. if (serializedParams) {
  16307. const hashmarkIndex = url2.indexOf("#");
  16308. if (hashmarkIndex !== -1) {
  16309. url2 = url2.slice(0, hashmarkIndex);
  16310. }
  16311. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  16312. }
  16313. return url2;
  16314. }
  16315. function isAbsoluteURL(url2) {
  16316. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  16317. }
  16318. function combineURLs(baseURL, relativeURL) {
  16319. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  16320. }
  16321. function buildFullPath(baseURL, requestedURL) {
  16322. if (baseURL && !isAbsoluteURL(requestedURL)) {
  16323. return combineURLs(baseURL, requestedURL);
  16324. }
  16325. return requestedURL;
  16326. }
  16327. function settle(resolve, reject, response) {
  16328. const { validateStatus } = response.config;
  16329. const status = response.statusCode;
  16330. if (status && (!validateStatus || validateStatus(status))) {
  16331. resolve(response);
  16332. } else {
  16333. reject(response);
  16334. }
  16335. }
  16336. const mergeKeys$1 = (keys, config2) => {
  16337. const config3 = {};
  16338. keys.forEach((prop) => {
  16339. if (!isUndefined(config2[prop])) {
  16340. config3[prop] = config2[prop];
  16341. }
  16342. });
  16343. return config3;
  16344. };
  16345. const adapter = (config2) => new Promise((resolve, reject) => {
  16346. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  16347. const _config = {
  16348. url: fullPath,
  16349. header: config2.header,
  16350. complete: (response) => {
  16351. config2.fullPath = fullPath;
  16352. response.config = config2;
  16353. try {
  16354. if (typeof response.data === "string") {
  16355. response.data = JSON.parse(response.data);
  16356. }
  16357. } catch (e) {
  16358. }
  16359. settle(resolve, reject, response);
  16360. }
  16361. };
  16362. let requestTask;
  16363. if (config2.method === "UPLOAD") {
  16364. delete _config.header["content-type"];
  16365. delete _config.header["Content-Type"];
  16366. const otherConfig = {
  16367. filePath: config2.filePath,
  16368. name: config2.name
  16369. };
  16370. const optionalKeys = [
  16371. "files",
  16372. "timeout",
  16373. "formData"
  16374. ];
  16375. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  16376. } else if (config2.method === "DOWNLOAD") {
  16377. if (!isUndefined(config2.timeout)) {
  16378. _config.timeout = config2.timeout;
  16379. }
  16380. requestTask = uni.downloadFile(_config);
  16381. } else {
  16382. const optionalKeys = [
  16383. "data",
  16384. "method",
  16385. "timeout",
  16386. "dataType",
  16387. "responseType",
  16388. "sslVerify",
  16389. "firstIpv4"
  16390. ];
  16391. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  16392. }
  16393. if (config2.getTask) {
  16394. config2.getTask(requestTask, config2);
  16395. }
  16396. });
  16397. const dispatchRequest = (config2) => adapter(config2);
  16398. function InterceptorManager() {
  16399. this.handlers = [];
  16400. }
  16401. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  16402. this.handlers.push({
  16403. fulfilled,
  16404. rejected
  16405. });
  16406. return this.handlers.length - 1;
  16407. };
  16408. InterceptorManager.prototype.eject = function eject(id) {
  16409. if (this.handlers[id]) {
  16410. this.handlers[id] = null;
  16411. }
  16412. };
  16413. InterceptorManager.prototype.forEach = function forEach2(fn) {
  16414. this.handlers.forEach((h) => {
  16415. if (h !== null) {
  16416. fn(h);
  16417. }
  16418. });
  16419. };
  16420. const mergeKeys = (keys, globalsConfig, config2) => {
  16421. const config3 = {};
  16422. keys.forEach((prop) => {
  16423. if (!isUndefined(config2[prop])) {
  16424. config3[prop] = config2[prop];
  16425. } else if (!isUndefined(globalsConfig[prop])) {
  16426. config3[prop] = globalsConfig[prop];
  16427. }
  16428. });
  16429. return config3;
  16430. };
  16431. const mergeConfig = (globalsConfig, config2 = {}) => {
  16432. const method = config2.method || globalsConfig.method || "GET";
  16433. let config3 = {
  16434. baseURL: globalsConfig.baseURL || "",
  16435. method,
  16436. url: config2.url || "",
  16437. params: config2.params || {},
  16438. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  16439. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  16440. };
  16441. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  16442. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  16443. if (method === "DOWNLOAD") {
  16444. if (!isUndefined(config2.timeout)) {
  16445. config3.timeout = config2.timeout;
  16446. } else if (!isUndefined(globalsConfig.timeout)) {
  16447. config3.timeout = globalsConfig.timeout;
  16448. }
  16449. } else if (method === "UPLOAD") {
  16450. delete config3.header["content-type"];
  16451. delete config3.header["Content-Type"];
  16452. const uploadKeys = [
  16453. "files",
  16454. "filePath",
  16455. "name",
  16456. "timeout",
  16457. "formData"
  16458. ];
  16459. uploadKeys.forEach((prop) => {
  16460. if (!isUndefined(config2[prop])) {
  16461. config3[prop] = config2[prop];
  16462. }
  16463. });
  16464. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  16465. config3.timeout = globalsConfig.timeout;
  16466. }
  16467. } else {
  16468. const defaultsKeys = [
  16469. "data",
  16470. "timeout",
  16471. "dataType",
  16472. "responseType",
  16473. "sslVerify",
  16474. "firstIpv4"
  16475. ];
  16476. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  16477. }
  16478. return config3;
  16479. };
  16480. const defaults = {
  16481. baseURL: "",
  16482. header: {},
  16483. method: "GET",
  16484. dataType: "json",
  16485. responseType: "text",
  16486. custom: {},
  16487. timeout: 6e4,
  16488. sslVerify: true,
  16489. firstIpv4: false,
  16490. validateStatus: function validateStatus(status) {
  16491. return status >= 200 && status < 300;
  16492. }
  16493. };
  16494. var clone = function() {
  16495. function _instanceof(obj, type2) {
  16496. return type2 != null && obj instanceof type2;
  16497. }
  16498. var nativeMap;
  16499. try {
  16500. nativeMap = Map;
  16501. } catch (_) {
  16502. nativeMap = function() {
  16503. };
  16504. }
  16505. var nativeSet;
  16506. try {
  16507. nativeSet = Set;
  16508. } catch (_) {
  16509. nativeSet = function() {
  16510. };
  16511. }
  16512. var nativePromise;
  16513. try {
  16514. nativePromise = Promise;
  16515. } catch (_) {
  16516. nativePromise = function() {
  16517. };
  16518. }
  16519. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  16520. if (typeof circular === "object") {
  16521. depth = circular.depth;
  16522. prototype = circular.prototype;
  16523. includeNonEnumerable = circular.includeNonEnumerable;
  16524. circular = circular.circular;
  16525. }
  16526. var allParents = [];
  16527. var allChildren = [];
  16528. var useBuffer = typeof Buffer != "undefined";
  16529. if (typeof circular == "undefined")
  16530. circular = true;
  16531. if (typeof depth == "undefined")
  16532. depth = Infinity;
  16533. function _clone(parent2, depth2) {
  16534. if (parent2 === null)
  16535. return null;
  16536. if (depth2 === 0)
  16537. return parent2;
  16538. var child;
  16539. var proto;
  16540. if (typeof parent2 != "object") {
  16541. return parent2;
  16542. }
  16543. if (_instanceof(parent2, nativeMap)) {
  16544. child = new nativeMap();
  16545. } else if (_instanceof(parent2, nativeSet)) {
  16546. child = new nativeSet();
  16547. } else if (_instanceof(parent2, nativePromise)) {
  16548. child = new nativePromise(function(resolve, reject) {
  16549. parent2.then(function(value2) {
  16550. resolve(_clone(value2, depth2 - 1));
  16551. }, function(err) {
  16552. reject(_clone(err, depth2 - 1));
  16553. });
  16554. });
  16555. } else if (clone2.__isArray(parent2)) {
  16556. child = [];
  16557. } else if (clone2.__isRegExp(parent2)) {
  16558. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  16559. if (parent2.lastIndex)
  16560. child.lastIndex = parent2.lastIndex;
  16561. } else if (clone2.__isDate(parent2)) {
  16562. child = new Date(parent2.getTime());
  16563. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  16564. if (Buffer.from) {
  16565. child = Buffer.from(parent2);
  16566. } else {
  16567. child = new Buffer(parent2.length);
  16568. parent2.copy(child);
  16569. }
  16570. return child;
  16571. } else if (_instanceof(parent2, Error)) {
  16572. child = Object.create(parent2);
  16573. } else {
  16574. if (typeof prototype == "undefined") {
  16575. proto = Object.getPrototypeOf(parent2);
  16576. child = Object.create(proto);
  16577. } else {
  16578. child = Object.create(prototype);
  16579. proto = prototype;
  16580. }
  16581. }
  16582. if (circular) {
  16583. var index2 = allParents.indexOf(parent2);
  16584. if (index2 != -1) {
  16585. return allChildren[index2];
  16586. }
  16587. allParents.push(parent2);
  16588. allChildren.push(child);
  16589. }
  16590. if (_instanceof(parent2, nativeMap)) {
  16591. parent2.forEach(function(value2, key) {
  16592. var keyChild = _clone(key, depth2 - 1);
  16593. var valueChild = _clone(value2, depth2 - 1);
  16594. child.set(keyChild, valueChild);
  16595. });
  16596. }
  16597. if (_instanceof(parent2, nativeSet)) {
  16598. parent2.forEach(function(value2) {
  16599. var entryChild = _clone(value2, depth2 - 1);
  16600. child.add(entryChild);
  16601. });
  16602. }
  16603. for (var i in parent2) {
  16604. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  16605. if (attrs) {
  16606. child[i] = _clone(parent2[i], depth2 - 1);
  16607. }
  16608. try {
  16609. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  16610. if (objProperty.set === "undefined") {
  16611. continue;
  16612. }
  16613. child[i] = _clone(parent2[i], depth2 - 1);
  16614. } catch (e) {
  16615. if (e instanceof TypeError) {
  16616. continue;
  16617. } else if (e instanceof ReferenceError) {
  16618. continue;
  16619. }
  16620. }
  16621. }
  16622. if (Object.getOwnPropertySymbols) {
  16623. var symbols = Object.getOwnPropertySymbols(parent2);
  16624. for (var i = 0; i < symbols.length; i++) {
  16625. var symbol = symbols[i];
  16626. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  16627. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  16628. continue;
  16629. }
  16630. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  16631. Object.defineProperty(child, symbol, descriptor);
  16632. }
  16633. }
  16634. if (includeNonEnumerable) {
  16635. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  16636. for (var i = 0; i < allPropertyNames.length; i++) {
  16637. var propertyName = allPropertyNames[i];
  16638. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  16639. if (descriptor && descriptor.enumerable) {
  16640. continue;
  16641. }
  16642. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  16643. Object.defineProperty(child, propertyName, descriptor);
  16644. }
  16645. }
  16646. return child;
  16647. }
  16648. return _clone(parent, depth);
  16649. }
  16650. clone2.clonePrototype = function clonePrototype(parent) {
  16651. if (parent === null)
  16652. return null;
  16653. var c = function() {
  16654. };
  16655. c.prototype = parent;
  16656. return new c();
  16657. };
  16658. function __objToStr(o) {
  16659. return Object.prototype.toString.call(o);
  16660. }
  16661. clone2.__objToStr = __objToStr;
  16662. function __isDate(o) {
  16663. return typeof o === "object" && __objToStr(o) === "[object Date]";
  16664. }
  16665. clone2.__isDate = __isDate;
  16666. function __isArray(o) {
  16667. return typeof o === "object" && __objToStr(o) === "[object Array]";
  16668. }
  16669. clone2.__isArray = __isArray;
  16670. function __isRegExp(o) {
  16671. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  16672. }
  16673. clone2.__isRegExp = __isRegExp;
  16674. function __getRegExpFlags(re) {
  16675. var flags = "";
  16676. if (re.global)
  16677. flags += "g";
  16678. if (re.ignoreCase)
  16679. flags += "i";
  16680. if (re.multiline)
  16681. flags += "m";
  16682. return flags;
  16683. }
  16684. clone2.__getRegExpFlags = __getRegExpFlags;
  16685. return clone2;
  16686. }();
  16687. class Request {
  16688. /**
  16689. * @param {Object} arg - 全局配置
  16690. * @param {String} arg.baseURL - 全局根路径
  16691. * @param {Object} arg.header - 全局header
  16692. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  16693. * @param {String} arg.dataType = [json] - 全局默认的dataType
  16694. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  16695. * @param {Object} arg.custom - 全局默认的自定义参数
  16696. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  16697. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  16698. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  16699. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  16700. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  16701. */
  16702. constructor(arg = {}) {
  16703. if (!isPlainObject(arg)) {
  16704. arg = {};
  16705. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  16706. }
  16707. this.config = clone({ ...defaults, ...arg });
  16708. this.interceptors = {
  16709. request: new InterceptorManager(),
  16710. response: new InterceptorManager()
  16711. };
  16712. }
  16713. /**
  16714. * @Function
  16715. * @param {Request~setConfigCallback} f - 设置全局默认配置
  16716. */
  16717. setConfig(f) {
  16718. this.config = f(this.config);
  16719. }
  16720. middleware(config2) {
  16721. config2 = mergeConfig(this.config, config2);
  16722. const chain = [dispatchRequest, void 0];
  16723. let promise2 = Promise.resolve(config2);
  16724. this.interceptors.request.forEach((interceptor) => {
  16725. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  16726. });
  16727. this.interceptors.response.forEach((interceptor) => {
  16728. chain.push(interceptor.fulfilled, interceptor.rejected);
  16729. });
  16730. while (chain.length) {
  16731. promise2 = promise2.then(chain.shift(), chain.shift());
  16732. }
  16733. return promise2;
  16734. }
  16735. /**
  16736. * @Function
  16737. * @param {Object} config - 请求配置项
  16738. * @prop {String} options.url - 请求路径
  16739. * @prop {Object} options.data - 请求参数
  16740. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  16741. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  16742. * @prop {Object} [options.header = config.header] - 请求header
  16743. * @prop {Object} [options.method = config.method] - 请求方法
  16744. * @returns {Promise<unknown>}
  16745. */
  16746. request(config2 = {}) {
  16747. return this.middleware(config2);
  16748. }
  16749. get(url2, options = {}) {
  16750. return this.middleware({
  16751. url: url2,
  16752. method: "GET",
  16753. ...options
  16754. });
  16755. }
  16756. post(url2, data, options = {}) {
  16757. return this.middleware({
  16758. url: url2,
  16759. data,
  16760. method: "POST",
  16761. ...options
  16762. });
  16763. }
  16764. put(url2, data, options = {}) {
  16765. return this.middleware({
  16766. url: url2,
  16767. data,
  16768. method: "PUT",
  16769. ...options
  16770. });
  16771. }
  16772. delete(url2, data, options = {}) {
  16773. return this.middleware({
  16774. url: url2,
  16775. data,
  16776. method: "DELETE",
  16777. ...options
  16778. });
  16779. }
  16780. options(url2, data, options = {}) {
  16781. return this.middleware({
  16782. url: url2,
  16783. data,
  16784. method: "OPTIONS",
  16785. ...options
  16786. });
  16787. }
  16788. upload(url2, config2 = {}) {
  16789. config2.url = url2;
  16790. config2.method = "UPLOAD";
  16791. return this.middleware(config2);
  16792. }
  16793. download(url2, config2 = {}) {
  16794. config2.url = url2;
  16795. config2.method = "DOWNLOAD";
  16796. return this.middleware(config2);
  16797. }
  16798. }
  16799. class Router {
  16800. constructor() {
  16801. this.config = {
  16802. type: "navigateTo",
  16803. url: "",
  16804. delta: 1,
  16805. // navigateBack页面后退时,回退的层数
  16806. params: {},
  16807. // 传递的参数
  16808. animationType: "pop-in",
  16809. // 窗口动画,只在APP有效
  16810. animationDuration: 300,
  16811. // 窗口动画持续时间,单位毫秒,只在APP有效
  16812. intercept: false
  16813. // 是否需要拦截
  16814. };
  16815. this.route = this.route.bind(this);
  16816. }
  16817. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  16818. addRootPath(url2) {
  16819. return url2[0] === "/" ? url2 : `/${url2}`;
  16820. }
  16821. // 整合路由参数
  16822. mixinParam(url2, params) {
  16823. url2 = url2 && this.addRootPath(url2);
  16824. let query = "";
  16825. if (/.*\/.*\?.*=.*/.test(url2)) {
  16826. query = uni.$u.queryParams(params, false);
  16827. return url2 += `&${query}`;
  16828. }
  16829. query = uni.$u.queryParams(params);
  16830. return url2 += query;
  16831. }
  16832. // 对外的方法名称
  16833. async route(options = {}, params = {}) {
  16834. let mergeConfig2 = {};
  16835. if (typeof options === "string") {
  16836. mergeConfig2.url = this.mixinParam(options, params);
  16837. mergeConfig2.type = "navigateTo";
  16838. } else {
  16839. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  16840. mergeConfig2.url = this.mixinParam(options.url, options.params);
  16841. }
  16842. if (mergeConfig2.url === uni.$u.page())
  16843. return;
  16844. if (params.intercept) {
  16845. this.config.intercept = params.intercept;
  16846. }
  16847. mergeConfig2.params = params;
  16848. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  16849. if (typeof uni.$u.routeIntercept === "function") {
  16850. const isNext = await new Promise((resolve, reject) => {
  16851. uni.$u.routeIntercept(mergeConfig2, resolve);
  16852. });
  16853. isNext && this.openPage(mergeConfig2);
  16854. } else {
  16855. this.openPage(mergeConfig2);
  16856. }
  16857. }
  16858. // 执行路由跳转
  16859. openPage(config2) {
  16860. const {
  16861. url: url2,
  16862. type: type2,
  16863. delta,
  16864. animationType,
  16865. animationDuration
  16866. } = config2;
  16867. if (config2.type == "navigateTo" || config2.type == "to") {
  16868. uni.navigateTo({
  16869. url: url2,
  16870. animationType,
  16871. animationDuration
  16872. });
  16873. }
  16874. if (config2.type == "redirectTo" || config2.type == "redirect") {
  16875. uni.redirectTo({
  16876. url: url2
  16877. });
  16878. }
  16879. if (config2.type == "switchTab" || config2.type == "tab") {
  16880. uni.switchTab({
  16881. url: url2
  16882. });
  16883. }
  16884. if (config2.type == "reLaunch" || config2.type == "launch") {
  16885. uni.reLaunch({
  16886. url: url2
  16887. });
  16888. }
  16889. if (config2.type == "navigateBack" || config2.type == "back") {
  16890. uni.navigateBack({
  16891. delta
  16892. });
  16893. }
  16894. }
  16895. }
  16896. const route = new Router().route;
  16897. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  16898. const startRGB = hexToRgb(startColor, false);
  16899. const startR = startRGB[0];
  16900. const startG = startRGB[1];
  16901. const startB = startRGB[2];
  16902. const endRGB = hexToRgb(endColor, false);
  16903. const endR = endRGB[0];
  16904. const endG = endRGB[1];
  16905. const endB = endRGB[2];
  16906. const sR = (endR - startR) / step;
  16907. const sG = (endG - startG) / step;
  16908. const sB = (endB - startB) / step;
  16909. const colorArr = [];
  16910. for (let i = 0; i < step; i++) {
  16911. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  16912. if (i === 0)
  16913. hex = rgbToHex(startColor);
  16914. if (i === step - 1)
  16915. hex = rgbToHex(endColor);
  16916. colorArr.push(hex);
  16917. }
  16918. return colorArr;
  16919. }
  16920. function hexToRgb(sColor, str = true) {
  16921. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  16922. sColor = String(sColor).toLowerCase();
  16923. if (sColor && reg.test(sColor)) {
  16924. if (sColor.length === 4) {
  16925. let sColorNew = "#";
  16926. for (let i = 1; i < 4; i += 1) {
  16927. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  16928. }
  16929. sColor = sColorNew;
  16930. }
  16931. const sColorChange = [];
  16932. for (let i = 1; i < 7; i += 2) {
  16933. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  16934. }
  16935. if (!str) {
  16936. return sColorChange;
  16937. }
  16938. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  16939. }
  16940. if (/^(rgb|RGB)/.test(sColor)) {
  16941. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  16942. return arr.map((val) => Number(val));
  16943. }
  16944. return sColor;
  16945. }
  16946. function rgbToHex(rgb) {
  16947. const _this = rgb;
  16948. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  16949. if (/^(rgb|RGB)/.test(_this)) {
  16950. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  16951. let strHex = "#";
  16952. for (let i = 0; i < aColor.length; i++) {
  16953. let hex = Number(aColor[i]).toString(16);
  16954. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  16955. if (hex === "0") {
  16956. hex += hex;
  16957. }
  16958. strHex += hex;
  16959. }
  16960. if (strHex.length !== 7) {
  16961. strHex = _this;
  16962. }
  16963. return strHex;
  16964. }
  16965. if (reg.test(_this)) {
  16966. const aNum = _this.replace(/#/, "").split("");
  16967. if (aNum.length === 6) {
  16968. return _this;
  16969. }
  16970. if (aNum.length === 3) {
  16971. let numHex = "#";
  16972. for (let i = 0; i < aNum.length; i += 1) {
  16973. numHex += aNum[i] + aNum[i];
  16974. }
  16975. return numHex;
  16976. }
  16977. } else {
  16978. return _this;
  16979. }
  16980. }
  16981. function colorToRgba(color2, alpha) {
  16982. color2 = rgbToHex(color2);
  16983. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  16984. let sColor = String(color2).toLowerCase();
  16985. if (sColor && reg.test(sColor)) {
  16986. if (sColor.length === 4) {
  16987. let sColorNew = "#";
  16988. for (let i = 1; i < 4; i += 1) {
  16989. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  16990. }
  16991. sColor = sColorNew;
  16992. }
  16993. const sColorChange = [];
  16994. for (let i = 1; i < 7; i += 2) {
  16995. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  16996. }
  16997. return `rgba(${sColorChange.join(",")},${alpha})`;
  16998. }
  16999. return sColor;
  17000. }
  17001. const colorGradient$1 = {
  17002. colorGradient,
  17003. hexToRgb,
  17004. rgbToHex,
  17005. colorToRgba
  17006. };
  17007. function email(value2) {
  17008. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  17009. }
  17010. function mobile(value2) {
  17011. return /^1[23456789]\d{9}$/.test(value2);
  17012. }
  17013. function url(value2) {
  17014. 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);
  17015. }
  17016. function date(value2) {
  17017. if (!value2)
  17018. return false;
  17019. if (number(value2))
  17020. value2 = +value2;
  17021. return !/Invalid|NaN/.test(new Date(value2).toString());
  17022. }
  17023. function dateISO(value2) {
  17024. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  17025. }
  17026. function number(value2) {
  17027. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  17028. }
  17029. function string(value2) {
  17030. return typeof value2 === "string";
  17031. }
  17032. function digits(value2) {
  17033. return /^\d+$/.test(value2);
  17034. }
  17035. function idCard(value2) {
  17036. 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(
  17037. value2
  17038. );
  17039. }
  17040. function carNo(value2) {
  17041. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  17042. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  17043. if (value2.length === 7) {
  17044. return creg.test(value2);
  17045. }
  17046. if (value2.length === 8) {
  17047. return xreg.test(value2);
  17048. }
  17049. return false;
  17050. }
  17051. function amount(value2) {
  17052. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  17053. }
  17054. function chinese(value2) {
  17055. const reg = /^[\u4e00-\u9fa5]+$/gi;
  17056. return reg.test(value2);
  17057. }
  17058. function letter(value2) {
  17059. return /^[a-zA-Z]*$/.test(value2);
  17060. }
  17061. function enOrNum(value2) {
  17062. const reg = /^[0-9a-zA-Z]*$/g;
  17063. return reg.test(value2);
  17064. }
  17065. function contains(value2, param) {
  17066. return value2.indexOf(param) >= 0;
  17067. }
  17068. function range$1(value2, param) {
  17069. return value2 >= param[0] && value2 <= param[1];
  17070. }
  17071. function rangeLength(value2, param) {
  17072. return value2.length >= param[0] && value2.length <= param[1];
  17073. }
  17074. function landline(value2) {
  17075. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  17076. return reg.test(value2);
  17077. }
  17078. function empty(value2) {
  17079. switch (typeof value2) {
  17080. case "undefined":
  17081. return true;
  17082. case "string":
  17083. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  17084. return true;
  17085. break;
  17086. case "boolean":
  17087. if (!value2)
  17088. return true;
  17089. break;
  17090. case "number":
  17091. if (value2 === 0 || isNaN(value2))
  17092. return true;
  17093. break;
  17094. case "object":
  17095. if (value2 === null || value2.length === 0)
  17096. return true;
  17097. for (const i in value2) {
  17098. return false;
  17099. }
  17100. return true;
  17101. }
  17102. return false;
  17103. }
  17104. function jsonString(value2) {
  17105. if (typeof value2 === "string") {
  17106. try {
  17107. const obj = JSON.parse(value2);
  17108. if (typeof obj === "object" && obj) {
  17109. return true;
  17110. }
  17111. return false;
  17112. } catch (e) {
  17113. return false;
  17114. }
  17115. }
  17116. return false;
  17117. }
  17118. function array(value2) {
  17119. if (typeof Array.isArray === "function") {
  17120. return Array.isArray(value2);
  17121. }
  17122. return Object.prototype.toString.call(value2) === "[object Array]";
  17123. }
  17124. function object(value2) {
  17125. return Object.prototype.toString.call(value2) === "[object Object]";
  17126. }
  17127. function code(value2, len = 6) {
  17128. return new RegExp(`^\\d{${len}}$`).test(value2);
  17129. }
  17130. function func(value2) {
  17131. return typeof value2 === "function";
  17132. }
  17133. function promise(value2) {
  17134. return object(value2) && func(value2.then) && func(value2.catch);
  17135. }
  17136. function image(value2) {
  17137. const newValue = value2.split("?")[0];
  17138. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  17139. return IMAGE_REGEXP.test(newValue);
  17140. }
  17141. function video(value2) {
  17142. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  17143. return VIDEO_REGEXP.test(value2);
  17144. }
  17145. function regExp(o) {
  17146. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  17147. }
  17148. const test = {
  17149. email,
  17150. mobile,
  17151. url,
  17152. date,
  17153. dateISO,
  17154. number,
  17155. digits,
  17156. idCard,
  17157. carNo,
  17158. amount,
  17159. chinese,
  17160. letter,
  17161. enOrNum,
  17162. contains,
  17163. range: range$1,
  17164. rangeLength,
  17165. empty,
  17166. isEmpty: empty,
  17167. jsonString,
  17168. landline,
  17169. object,
  17170. array,
  17171. code,
  17172. func,
  17173. promise,
  17174. video,
  17175. image,
  17176. regExp,
  17177. string
  17178. };
  17179. let timeout = null;
  17180. function debounce(func2, wait = 500, immediate = false) {
  17181. if (timeout !== null)
  17182. clearTimeout(timeout);
  17183. if (immediate) {
  17184. const callNow = !timeout;
  17185. timeout = setTimeout(() => {
  17186. timeout = null;
  17187. }, wait);
  17188. if (callNow)
  17189. typeof func2 === "function" && func2();
  17190. } else {
  17191. timeout = setTimeout(() => {
  17192. typeof func2 === "function" && func2();
  17193. }, wait);
  17194. }
  17195. }
  17196. let flag;
  17197. function throttle(func2, wait = 500, immediate = true) {
  17198. if (immediate) {
  17199. if (!flag) {
  17200. flag = true;
  17201. typeof func2 === "function" && func2();
  17202. setTimeout(() => {
  17203. flag = false;
  17204. }, wait);
  17205. }
  17206. } else if (!flag) {
  17207. flag = true;
  17208. setTimeout(() => {
  17209. flag = false;
  17210. typeof func2 === "function" && func2();
  17211. }, wait);
  17212. }
  17213. }
  17214. function strip(num, precision = 15) {
  17215. return +parseFloat(Number(num).toPrecision(precision));
  17216. }
  17217. function digitLength(num) {
  17218. const eSplit = num.toString().split(/[eE]/);
  17219. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  17220. return len > 0 ? len : 0;
  17221. }
  17222. function float2Fixed(num) {
  17223. if (num.toString().indexOf("e") === -1) {
  17224. return Number(num.toString().replace(".", ""));
  17225. }
  17226. const dLen = digitLength(num);
  17227. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  17228. }
  17229. function checkBoundary(num) {
  17230. {
  17231. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  17232. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  17233. }
  17234. }
  17235. }
  17236. function iteratorOperation(arr, operation) {
  17237. const [num1, num2, ...others] = arr;
  17238. let res = operation(num1, num2);
  17239. others.forEach((num) => {
  17240. res = operation(res, num);
  17241. });
  17242. return res;
  17243. }
  17244. function times(...nums) {
  17245. if (nums.length > 2) {
  17246. return iteratorOperation(nums, times);
  17247. }
  17248. const [num1, num2] = nums;
  17249. const num1Changed = float2Fixed(num1);
  17250. const num2Changed = float2Fixed(num2);
  17251. const baseNum = digitLength(num1) + digitLength(num2);
  17252. const leftValue = num1Changed * num2Changed;
  17253. checkBoundary(leftValue);
  17254. return leftValue / Math.pow(10, baseNum);
  17255. }
  17256. function divide(...nums) {
  17257. if (nums.length > 2) {
  17258. return iteratorOperation(nums, divide);
  17259. }
  17260. const [num1, num2] = nums;
  17261. const num1Changed = float2Fixed(num1);
  17262. const num2Changed = float2Fixed(num2);
  17263. checkBoundary(num1Changed);
  17264. checkBoundary(num2Changed);
  17265. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  17266. }
  17267. function round(num, ratio) {
  17268. const base = Math.pow(10, ratio);
  17269. let result = divide(Math.round(Math.abs(times(num, base))), base);
  17270. if (num < 0 && result !== 0) {
  17271. result = times(result, -1);
  17272. }
  17273. return result;
  17274. }
  17275. function range(min = 0, max = 0, value2 = 0) {
  17276. return Math.max(min, Math.min(max, Number(value2)));
  17277. }
  17278. function getPx(value2, unit = false) {
  17279. if (test.number(value2)) {
  17280. return unit ? `${value2}px` : Number(value2);
  17281. }
  17282. if (/(rpx|upx)$/.test(value2)) {
  17283. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  17284. }
  17285. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  17286. }
  17287. function sleep(value2 = 30) {
  17288. return new Promise((resolve) => {
  17289. setTimeout(() => {
  17290. resolve();
  17291. }, value2);
  17292. });
  17293. }
  17294. function os() {
  17295. return uni.getSystemInfoSync().platform.toLowerCase();
  17296. }
  17297. function sys() {
  17298. return uni.getSystemInfoSync();
  17299. }
  17300. function random(min, max) {
  17301. if (min >= 0 && max > 0 && max >= min) {
  17302. const gab = max - min + 1;
  17303. return Math.floor(Math.random() * gab + min);
  17304. }
  17305. return 0;
  17306. }
  17307. function guid(len = 32, firstU = true, radix = null) {
  17308. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  17309. const uuid = [];
  17310. radix = radix || chars.length;
  17311. if (len) {
  17312. for (let i = 0; i < len; i++)
  17313. uuid[i] = chars[0 | Math.random() * radix];
  17314. } else {
  17315. let r;
  17316. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  17317. uuid[14] = "4";
  17318. for (let i = 0; i < 36; i++) {
  17319. if (!uuid[i]) {
  17320. r = 0 | Math.random() * 16;
  17321. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  17322. }
  17323. }
  17324. }
  17325. if (firstU) {
  17326. uuid.shift();
  17327. return `u${uuid.join("")}`;
  17328. }
  17329. return uuid.join("");
  17330. }
  17331. function $parent(name = void 0) {
  17332. let parent = this.$parent;
  17333. while (parent) {
  17334. if (parent.$options && parent.$options.name !== name) {
  17335. parent = parent.$parent;
  17336. } else {
  17337. return parent;
  17338. }
  17339. }
  17340. return false;
  17341. }
  17342. function addStyle(customStyle, target = "object") {
  17343. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  17344. return customStyle;
  17345. }
  17346. if (target === "object") {
  17347. customStyle = trim(customStyle);
  17348. const styleArray = customStyle.split(";");
  17349. const style = {};
  17350. for (let i = 0; i < styleArray.length; i++) {
  17351. if (styleArray[i]) {
  17352. const item = styleArray[i].split(":");
  17353. style[trim(item[0])] = trim(item[1]);
  17354. }
  17355. }
  17356. return style;
  17357. }
  17358. let string2 = "";
  17359. for (const i in customStyle) {
  17360. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  17361. string2 += `${key}:${customStyle[i]};`;
  17362. }
  17363. return trim(string2);
  17364. }
  17365. function addUnit(value2 = "auto", unit = "") {
  17366. if (!unit) {
  17367. unit = uni.$u.config.unit || "px";
  17368. }
  17369. value2 = String(value2);
  17370. return test.number(value2) ? `${value2}${unit}` : value2;
  17371. }
  17372. function deepClone(obj) {
  17373. if ([null, void 0, NaN, false].includes(obj))
  17374. return obj;
  17375. if (typeof obj !== "object" && typeof obj !== "function") {
  17376. return obj;
  17377. }
  17378. const o = test.array(obj) ? [] : {};
  17379. for (const i in obj) {
  17380. if (obj.hasOwnProperty(i)) {
  17381. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  17382. }
  17383. }
  17384. return o;
  17385. }
  17386. function deepMerge(target = {}, source = {}) {
  17387. target = deepClone(target);
  17388. if (typeof target !== "object" || typeof source !== "object")
  17389. return false;
  17390. for (const prop in source) {
  17391. if (!source.hasOwnProperty(prop))
  17392. continue;
  17393. if (prop in target) {
  17394. if (typeof target[prop] !== "object") {
  17395. target[prop] = source[prop];
  17396. } else if (typeof source[prop] !== "object") {
  17397. target[prop] = source[prop];
  17398. } else if (target[prop].concat && source[prop].concat) {
  17399. target[prop] = target[prop].concat(source[prop]);
  17400. } else {
  17401. target[prop] = deepMerge(target[prop], source[prop]);
  17402. }
  17403. } else {
  17404. target[prop] = source[prop];
  17405. }
  17406. }
  17407. return target;
  17408. }
  17409. function error(err) {
  17410. {
  17411. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  17412. }
  17413. }
  17414. function randomArray(array3 = []) {
  17415. return array3.sort(() => Math.random() - 0.5);
  17416. }
  17417. if (!String.prototype.padStart) {
  17418. String.prototype.padStart = function(maxLength, fillString = " ") {
  17419. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  17420. throw new TypeError(
  17421. "fillString must be String"
  17422. );
  17423. }
  17424. const str = this;
  17425. if (str.length >= maxLength)
  17426. return String(str);
  17427. const fillLength = maxLength - str.length;
  17428. let times2 = Math.ceil(fillLength / fillString.length);
  17429. while (times2 >>= 1) {
  17430. fillString += fillString;
  17431. if (times2 === 1) {
  17432. fillString += fillString;
  17433. }
  17434. }
  17435. return fillString.slice(0, fillLength) + str;
  17436. };
  17437. }
  17438. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  17439. let date3;
  17440. if (!dateTime) {
  17441. date3 = /* @__PURE__ */ new Date();
  17442. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  17443. date3 = new Date(dateTime * 1e3);
  17444. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  17445. date3 = new Date(Number(dateTime));
  17446. } else {
  17447. date3 = new Date(
  17448. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  17449. );
  17450. }
  17451. const timeSource = {
  17452. "y": date3.getFullYear().toString(),
  17453. // 年
  17454. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  17455. // 月
  17456. "d": date3.getDate().toString().padStart(2, "0"),
  17457. // 日
  17458. "h": date3.getHours().toString().padStart(2, "0"),
  17459. // 时
  17460. "M": date3.getMinutes().toString().padStart(2, "0"),
  17461. // 分
  17462. "s": date3.getSeconds().toString().padStart(2, "0")
  17463. // 秒
  17464. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  17465. };
  17466. for (const key in timeSource) {
  17467. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  17468. if (ret) {
  17469. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  17470. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  17471. }
  17472. }
  17473. return formatStr;
  17474. }
  17475. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  17476. if (timestamp == null)
  17477. timestamp = Number(/* @__PURE__ */ new Date());
  17478. timestamp = parseInt(timestamp);
  17479. if (timestamp.toString().length == 10)
  17480. timestamp *= 1e3;
  17481. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  17482. timer = parseInt(timer / 1e3);
  17483. let tips = "";
  17484. switch (true) {
  17485. case timer < 300:
  17486. tips = "刚刚";
  17487. break;
  17488. case (timer >= 300 && timer < 3600):
  17489. tips = `${parseInt(timer / 60)}分钟前`;
  17490. break;
  17491. case (timer >= 3600 && timer < 86400):
  17492. tips = `${parseInt(timer / 3600)}小时前`;
  17493. break;
  17494. case (timer >= 86400 && timer < 2592e3):
  17495. tips = `${parseInt(timer / 86400)}天前`;
  17496. break;
  17497. default:
  17498. if (format2 === false) {
  17499. if (timer >= 2592e3 && timer < 365 * 86400) {
  17500. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  17501. } else {
  17502. tips = `${parseInt(timer / (86400 * 365))}年前`;
  17503. }
  17504. } else {
  17505. tips = timeFormat(timestamp, format2);
  17506. }
  17507. }
  17508. return tips;
  17509. }
  17510. function trim(str, pos = "both") {
  17511. str = String(str);
  17512. if (pos == "both") {
  17513. return str.replace(/^\s+|\s+$/g, "");
  17514. }
  17515. if (pos == "left") {
  17516. return str.replace(/^\s*/, "");
  17517. }
  17518. if (pos == "right") {
  17519. return str.replace(/(\s*$)/g, "");
  17520. }
  17521. if (pos == "all") {
  17522. return str.replace(/\s+/g, "");
  17523. }
  17524. return str;
  17525. }
  17526. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  17527. const prefix = isPrefix ? "?" : "";
  17528. const _result = [];
  17529. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  17530. arrayFormat = "brackets";
  17531. for (const key in data) {
  17532. const value2 = data[key];
  17533. if (["", void 0, null].indexOf(value2) >= 0) {
  17534. continue;
  17535. }
  17536. if (value2.constructor === Array) {
  17537. switch (arrayFormat) {
  17538. case "indices":
  17539. for (let i = 0; i < value2.length; i++) {
  17540. _result.push(`${key}[${i}]=${value2[i]}`);
  17541. }
  17542. break;
  17543. case "brackets":
  17544. value2.forEach((_value) => {
  17545. _result.push(`${key}[]=${_value}`);
  17546. });
  17547. break;
  17548. case "repeat":
  17549. value2.forEach((_value) => {
  17550. _result.push(`${key}=${_value}`);
  17551. });
  17552. break;
  17553. case "comma":
  17554. let commaStr = "";
  17555. value2.forEach((_value) => {
  17556. commaStr += (commaStr ? "," : "") + _value;
  17557. });
  17558. _result.push(`${key}=${commaStr}`);
  17559. break;
  17560. default:
  17561. value2.forEach((_value) => {
  17562. _result.push(`${key}[]=${_value}`);
  17563. });
  17564. }
  17565. } else {
  17566. _result.push(`${key}=${value2}`);
  17567. }
  17568. }
  17569. return _result.length ? prefix + _result.join("&") : "";
  17570. }
  17571. function toast(title, duration = 2e3) {
  17572. uni.showToast({
  17573. title: String(title),
  17574. icon: "none",
  17575. duration
  17576. });
  17577. }
  17578. function type2icon(type2 = "success", fill = false) {
  17579. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  17580. type2 = "success";
  17581. let iconName = "";
  17582. switch (type2) {
  17583. case "primary":
  17584. iconName = "info-circle";
  17585. break;
  17586. case "info":
  17587. iconName = "info-circle";
  17588. break;
  17589. case "error":
  17590. iconName = "close-circle";
  17591. break;
  17592. case "warning":
  17593. iconName = "error-circle";
  17594. break;
  17595. case "success":
  17596. iconName = "checkmark-circle";
  17597. break;
  17598. default:
  17599. iconName = "checkmark-circle";
  17600. }
  17601. if (fill)
  17602. iconName += "-fill";
  17603. return iconName;
  17604. }
  17605. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  17606. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  17607. const n = !isFinite(+number3) ? 0 : +number3;
  17608. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  17609. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  17610. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  17611. let s = "";
  17612. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  17613. const re = /(-?\d+)(\d{3})/;
  17614. while (re.test(s[0])) {
  17615. s[0] = s[0].replace(re, `$1${sep}$2`);
  17616. }
  17617. if ((s[1] || "").length < prec) {
  17618. s[1] = s[1] || "";
  17619. s[1] += new Array(prec - s[1].length + 1).join("0");
  17620. }
  17621. return s.join(dec);
  17622. }
  17623. function getDuration(value2, unit = true) {
  17624. const valueNum = parseInt(value2);
  17625. if (unit) {
  17626. if (/s$/.test(value2))
  17627. return value2;
  17628. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  17629. }
  17630. if (/ms$/.test(value2))
  17631. return valueNum;
  17632. if (/s$/.test(value2))
  17633. return valueNum > 30 ? valueNum : valueNum * 1e3;
  17634. return valueNum;
  17635. }
  17636. function padZero(value2) {
  17637. return `00${value2}`.slice(-2);
  17638. }
  17639. function formValidate(instance, event) {
  17640. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  17641. const form = uni.$u.$parent.call(instance, "u-form");
  17642. if (formItem && form) {
  17643. form.validateField(formItem.prop, () => {
  17644. }, event);
  17645. }
  17646. }
  17647. function getProperty(obj, key) {
  17648. if (!obj) {
  17649. return;
  17650. }
  17651. if (typeof key !== "string" || key === "") {
  17652. return "";
  17653. }
  17654. if (key.indexOf(".") !== -1) {
  17655. const keys = key.split(".");
  17656. let firstObj = obj[keys[0]] || {};
  17657. for (let i = 1; i < keys.length; i++) {
  17658. if (firstObj) {
  17659. firstObj = firstObj[keys[i]];
  17660. }
  17661. }
  17662. return firstObj;
  17663. }
  17664. return obj[key];
  17665. }
  17666. function setProperty(obj, key, value2) {
  17667. if (!obj) {
  17668. return;
  17669. }
  17670. const inFn = function(_obj, keys, v) {
  17671. if (keys.length === 1) {
  17672. _obj[keys[0]] = v;
  17673. return;
  17674. }
  17675. while (keys.length > 1) {
  17676. const k = keys[0];
  17677. if (!_obj[k] || typeof _obj[k] !== "object") {
  17678. _obj[k] = {};
  17679. }
  17680. keys.shift();
  17681. inFn(_obj[k], keys, v);
  17682. }
  17683. };
  17684. if (typeof key !== "string" || key === "")
  17685. ;
  17686. else if (key.indexOf(".") !== -1) {
  17687. const keys = key.split(".");
  17688. inFn(obj, keys, value2);
  17689. } else {
  17690. obj[key] = value2;
  17691. }
  17692. }
  17693. function page$1() {
  17694. const pages2 = getCurrentPages();
  17695. return `/${pages2[pages2.length - 1].route || ""}`;
  17696. }
  17697. function pages() {
  17698. const pages2 = getCurrentPages();
  17699. return pages2;
  17700. }
  17701. function setConfig({
  17702. props: props2 = {},
  17703. config: config2 = {},
  17704. color: color2 = {},
  17705. zIndex: zIndex2 = {}
  17706. }) {
  17707. const {
  17708. deepMerge: deepMerge2
  17709. } = uni.$u;
  17710. uni.$u.config = deepMerge2(uni.$u.config, config2);
  17711. uni.$u.props = deepMerge2(uni.$u.props, props2);
  17712. uni.$u.color = deepMerge2(uni.$u.color, color2);
  17713. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  17714. }
  17715. const index = {
  17716. range,
  17717. getPx,
  17718. sleep,
  17719. os,
  17720. sys,
  17721. random,
  17722. guid,
  17723. $parent,
  17724. addStyle,
  17725. addUnit,
  17726. deepClone,
  17727. deepMerge,
  17728. error,
  17729. randomArray,
  17730. timeFormat,
  17731. timeFrom,
  17732. trim,
  17733. queryParams,
  17734. toast,
  17735. type2icon,
  17736. priceFormat,
  17737. getDuration,
  17738. padZero,
  17739. formValidate,
  17740. getProperty,
  17741. setProperty,
  17742. page: page$1,
  17743. pages,
  17744. setConfig
  17745. };
  17746. const zIndex = {
  17747. toast: 10090,
  17748. noNetwork: 10080,
  17749. // popup包含popup,actionsheet,keyboard,picker的值
  17750. popup: 10075,
  17751. mask: 10070,
  17752. navbar: 980,
  17753. topTips: 975,
  17754. sticky: 970,
  17755. indexListSticky: 965
  17756. };
  17757. let platform = "none";
  17758. platform = "vue3";
  17759. platform = "plus";
  17760. const platform$1 = platform;
  17761. const $u = {
  17762. route,
  17763. date: index.timeFormat,
  17764. // 另名date
  17765. colorGradient: colorGradient$1.colorGradient,
  17766. hexToRgb: colorGradient$1.hexToRgb,
  17767. rgbToHex: colorGradient$1.rgbToHex,
  17768. colorToRgba: colorGradient$1.colorToRgba,
  17769. test,
  17770. type: ["primary", "success", "error", "warning", "info"],
  17771. http: new Request(),
  17772. config,
  17773. // uView配置信息相关,比如版本号
  17774. zIndex,
  17775. debounce,
  17776. throttle,
  17777. mixin,
  17778. mpMixin,
  17779. props: props$x,
  17780. ...index,
  17781. color,
  17782. platform: platform$1
  17783. };
  17784. uni.$u = $u;
  17785. const install = (Vue2) => {
  17786. Vue2.config.globalProperties.$u = $u;
  17787. Vue2.config.globalProperties.$nextTick = (cb) => {
  17788. cb();
  17789. };
  17790. Vue2.mixin(mixin);
  17791. };
  17792. const uviewPlus = {
  17793. install
  17794. };
  17795. const share = {
  17796. data() {
  17797. return {
  17798. // 默认的全局分享内容
  17799. share: {
  17800. title: "标题",
  17801. path: "/pages/home/home",
  17802. // 这里是分享的页面
  17803. imageUrl: ""
  17804. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  17805. }
  17806. };
  17807. },
  17808. // 定义全局分享
  17809. // 1.发送给朋友
  17810. onShareAppMessage(res) {
  17811. return {
  17812. title: this.share.title,
  17813. path: this.share.path,
  17814. imageUrl: this.share.imageUrl
  17815. };
  17816. },
  17817. //2.分享到朋友圈
  17818. onShareTimeline(res) {
  17819. return {
  17820. title: this.share.title,
  17821. path: this.share.path,
  17822. imageUrl: this.share.imageUrl
  17823. };
  17824. }
  17825. };
  17826. function initRequest() {
  17827. formatAppLog("log", "at config/request.js:8", "初始化了 http 请求代码");
  17828. uni.$u.http.setConfig((config2) => {
  17829. config2.baseURL = `http://tf.hqzf100.com/dev-api/`;
  17830. config2.custom.toast = true;
  17831. return config2;
  17832. });
  17833. uni.$u.http.interceptors.request.use((config2) => {
  17834. config2.data = config2.data || {};
  17835. let token = store.token;
  17836. config2.header.Authorization = token ? `Bearer ${token}` : "";
  17837. return config2;
  17838. }, (config2) => {
  17839. return Promise.reject(config2);
  17840. });
  17841. uni.$u.http.interceptors.response.use((response) => {
  17842. var _a;
  17843. const data = response.data;
  17844. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  17845. if (data.code !== 200) {
  17846. if (data.code === 401) {
  17847. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  17848. store.setToken("");
  17849. setTimeout(() => {
  17850. uni.$u.route({
  17851. type: "reLaunch",
  17852. url: "/pages/login/login"
  17853. // 跳转到登录页
  17854. });
  17855. }, 1e3);
  17856. } else {
  17857. if (custom.toast !== false) {
  17858. uni.$u.toast(data.msg);
  17859. }
  17860. return data;
  17861. }
  17862. }
  17863. return data;
  17864. }, (response) => {
  17865. return Promise.reject(response);
  17866. });
  17867. }
  17868. function createApp() {
  17869. const app = vue.createVueApp(App);
  17870. initRequest();
  17871. const pinia2 = createPinia();
  17872. app.use(pinia2).use(uviewPlus);
  17873. app.mixin(share);
  17874. return {
  17875. app,
  17876. pinia: pinia2
  17877. };
  17878. }
  17879. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  17880. uni.Vuex = __Vuex__;
  17881. uni.Pinia = __Pinia__;
  17882. __app__.provide("__globalStyles", __uniConfig.styles);
  17883. __app__._component.mpType = "app";
  17884. __app__._component.render = () => {
  17885. };
  17886. __app__.mount("#app");
  17887. })(Vue);