app-service.js 537 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511
  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$1e = {
  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$1d(_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$1e, [["render", _sfc_render$1d], ["__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,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"
  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$p = {
  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$o = {
  2119. props: {
  2120. // 图标类名
  2121. name: {
  2122. type: String,
  2123. default: props$p.icon.name
  2124. },
  2125. // 图标颜色,可接受主题色
  2126. color: {
  2127. type: String,
  2128. default: props$p.icon.color
  2129. },
  2130. // 字体大小,单位px
  2131. size: {
  2132. type: [String, Number],
  2133. default: props$p.icon.size
  2134. },
  2135. // 是否显示粗体
  2136. bold: {
  2137. type: Boolean,
  2138. default: props$p.icon.bold
  2139. },
  2140. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  2141. index: {
  2142. type: [String, Number],
  2143. default: props$p.icon.index
  2144. },
  2145. // 触摸图标时的类名
  2146. hoverClass: {
  2147. type: String,
  2148. default: props$p.icon.hoverClass
  2149. },
  2150. // 自定义扩展前缀,方便用户扩展自己的图标库
  2151. customPrefix: {
  2152. type: String,
  2153. default: props$p.icon.customPrefix
  2154. },
  2155. // 图标右边或者下面的文字
  2156. label: {
  2157. type: [String, Number],
  2158. default: props$p.icon.label
  2159. },
  2160. // label的位置,只能右边或者下边
  2161. labelPos: {
  2162. type: String,
  2163. default: props$p.icon.labelPos
  2164. },
  2165. // label的大小
  2166. labelSize: {
  2167. type: [String, Number],
  2168. default: props$p.icon.labelSize
  2169. },
  2170. // label的颜色
  2171. labelColor: {
  2172. type: String,
  2173. default: props$p.icon.labelColor
  2174. },
  2175. // label与图标的距离
  2176. space: {
  2177. type: [String, Number],
  2178. default: props$p.icon.space
  2179. },
  2180. // 图片的mode
  2181. imgMode: {
  2182. type: String,
  2183. default: props$p.icon.imgMode
  2184. },
  2185. // 用于显示图片小图标时,图片的宽度
  2186. width: {
  2187. type: [String, Number],
  2188. default: props$p.icon.width
  2189. },
  2190. // 用于显示图片小图标时,图片的高度
  2191. height: {
  2192. type: [String, Number],
  2193. default: props$p.icon.height
  2194. },
  2195. // 用于解决某些情况下,让图标垂直居中的用途
  2196. top: {
  2197. type: [String, Number],
  2198. default: props$p.icon.top
  2199. },
  2200. // 是否阻止事件传播
  2201. stop: {
  2202. type: Boolean,
  2203. default: props$p.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$1d = {
  2338. name: "u-icon",
  2339. data() {
  2340. return {};
  2341. },
  2342. emits: ["click"],
  2343. mixins: [mpMixin, mixin, props$o],
  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$1c(_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$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-ac70166d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
  2432. const props$n = {
  2433. props: {
  2434. // 文字颜色
  2435. color: {
  2436. type: String,
  2437. default: props$p.link.color
  2438. },
  2439. // 字体大小,单位px
  2440. fontSize: {
  2441. type: [String, Number],
  2442. default: props$p.link.fontSize
  2443. },
  2444. // 是否显示下划线
  2445. underLine: {
  2446. type: Boolean,
  2447. default: props$p.link.underLine
  2448. },
  2449. // 要跳转的链接
  2450. href: {
  2451. type: String,
  2452. default: props$p.link.href
  2453. },
  2454. // 小程序中复制到粘贴板的提示语
  2455. mpTips: {
  2456. type: String,
  2457. default: props$p.link.mpTips
  2458. },
  2459. // 下划线颜色
  2460. lineColor: {
  2461. type: String,
  2462. default: props$p.link.lineColor
  2463. },
  2464. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  2465. text: {
  2466. type: String,
  2467. default: props$p.link.text
  2468. }
  2469. }
  2470. };
  2471. const _sfc_main$1c = {
  2472. name: "u-link",
  2473. mixins: [mpMixin, mixin, props$n],
  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$1b(_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$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__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$m = {
  2582. props: {
  2583. // 主题颜色
  2584. type: {
  2585. type: String,
  2586. default: props$p.text.type
  2587. },
  2588. // 是否显示
  2589. show: {
  2590. type: Boolean,
  2591. default: props$p.text.show
  2592. },
  2593. // 显示的值
  2594. text: {
  2595. type: [String, Number],
  2596. default: props$p.text.text
  2597. },
  2598. // 前置图标
  2599. prefixIcon: {
  2600. type: String,
  2601. default: props$p.text.prefixIcon
  2602. },
  2603. // 后置图标
  2604. suffixIcon: {
  2605. type: String,
  2606. default: props$p.text.suffixIcon
  2607. },
  2608. // 文本处理的匹配模式
  2609. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  2610. mode: {
  2611. type: String,
  2612. default: props$p.text.mode
  2613. },
  2614. // mode=link下,配置的链接
  2615. href: {
  2616. type: String,
  2617. default: props$p.text.href
  2618. },
  2619. // 格式化规则
  2620. format: {
  2621. type: [String, Function],
  2622. default: props$p.text.format
  2623. },
  2624. // mode=phone时,点击文本是否拨打电话
  2625. call: {
  2626. type: Boolean,
  2627. default: props$p.text.call
  2628. },
  2629. // 小程序的打开方式
  2630. openType: {
  2631. type: String,
  2632. default: props$p.text.openType
  2633. },
  2634. // 是否粗体,默认normal
  2635. bold: {
  2636. type: Boolean,
  2637. default: props$p.text.bold
  2638. },
  2639. // 是否块状
  2640. block: {
  2641. type: Boolean,
  2642. default: props$p.text.block
  2643. },
  2644. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  2645. lines: {
  2646. type: [String, Number],
  2647. default: props$p.text.lines
  2648. },
  2649. // 文本颜色
  2650. color: {
  2651. type: String,
  2652. default: props$p.text.color
  2653. },
  2654. // 字体大小
  2655. size: {
  2656. type: [String, Number],
  2657. default: props$p.text.size
  2658. },
  2659. // 图标的样式
  2660. iconStyle: {
  2661. type: [Object, String],
  2662. default: props$p.text.iconStyle
  2663. },
  2664. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  2665. decoration: {
  2666. tepe: String,
  2667. default: props$p.text.decoration
  2668. },
  2669. // 外边距,对象、字符串,数值形式均可
  2670. margin: {
  2671. type: [Object, String, Number],
  2672. default: props$p.text.margin
  2673. },
  2674. // 文本行高
  2675. lineHeight: {
  2676. type: [String, Number],
  2677. default: props$p.text.lineHeight
  2678. },
  2679. // 文本对齐方式,可选值left|center|right
  2680. align: {
  2681. type: String,
  2682. default: props$p.text.align
  2683. },
  2684. // 文字换行,可选值break-word|normal|anywhere
  2685. wordWrap: {
  2686. type: String,
  2687. default: props$p.text.wordWrap
  2688. }
  2689. }
  2690. };
  2691. const _sfc_main$1b = {
  2692. name: "u--text",
  2693. mixins: [mpMixin, mixin, value, props$m],
  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$1a(_ctx, _cache, $props, $setup, $data, $options) {
  2733. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  2734. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$8);
  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$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-0a574502"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  2820. const _sfc_main$1a = {
  2821. name: "u--text",
  2822. mixins: [mpMixin, mixin, props$m],
  2823. components: {
  2824. uvText
  2825. }
  2826. };
  2827. function _sfc_render$19(_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$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
  2855. const props$l = {
  2856. props: {
  2857. // 头像图片路径(不能为相对路径)
  2858. src: {
  2859. type: String,
  2860. default: props$p.avatar.src
  2861. },
  2862. // 头像形状,circle-圆形,square-方形
  2863. shape: {
  2864. type: String,
  2865. default: props$p.avatar.shape
  2866. },
  2867. // 头像尺寸
  2868. size: {
  2869. type: [String, Number],
  2870. default: props$p.avatar.size
  2871. },
  2872. // 裁剪模式
  2873. mode: {
  2874. type: String,
  2875. default: props$p.avatar.mode
  2876. },
  2877. // 显示的文字
  2878. text: {
  2879. type: String,
  2880. default: props$p.avatar.text
  2881. },
  2882. // 背景色
  2883. bgColor: {
  2884. type: String,
  2885. default: props$p.avatar.bgColor
  2886. },
  2887. // 文字颜色
  2888. color: {
  2889. type: String,
  2890. default: props$p.avatar.color
  2891. },
  2892. // 文字大小
  2893. fontSize: {
  2894. type: [String, Number],
  2895. default: props$p.avatar.fontSize
  2896. },
  2897. // 显示的图标
  2898. icon: {
  2899. type: String,
  2900. default: props$p.avatar.icon
  2901. },
  2902. // 显示小程序头像,只对百度,微信,QQ小程序有效
  2903. mpAvatar: {
  2904. type: Boolean,
  2905. default: props$p.avatar.mpAvatar
  2906. },
  2907. // 是否使用随机背景色
  2908. randomBgColor: {
  2909. type: Boolean,
  2910. default: props$p.avatar.randomBgColor
  2911. },
  2912. // 加载失败的默认头像(组件有内置默认图片)
  2913. defaultUrl: {
  2914. type: String,
  2915. default: props$p.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$p.avatar.colorIndex
  2925. },
  2926. // 组件标识符
  2927. name: {
  2928. type: String,
  2929. default: props$p.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$19 = {
  2935. name: "u-avatar",
  2936. mixins: [mpMixin, mixin, props$l],
  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$18(_ctx, _cache, $props, $setup, $data, $options) {
  3005. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  3006. const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_1$7);
  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$6 = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-34d954f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
  3056. const props$k = {
  3057. props: {
  3058. color: {
  3059. type: String,
  3060. default: props$p.line.color
  3061. },
  3062. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  3063. length: {
  3064. type: [String, Number],
  3065. default: props$p.line.length
  3066. },
  3067. // 线条方向,col-竖向,row-横向
  3068. direction: {
  3069. type: String,
  3070. default: props$p.line.direction
  3071. },
  3072. // 是否显示细边框
  3073. hairline: {
  3074. type: Boolean,
  3075. default: props$p.line.hairline
  3076. },
  3077. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  3078. margin: {
  3079. type: [String, Number],
  3080. default: props$p.line.margin
  3081. },
  3082. // 是否虚线,true-虚线,false-实线
  3083. dashed: {
  3084. type: Boolean,
  3085. default: props$p.line.dashed
  3086. }
  3087. }
  3088. };
  3089. const _sfc_main$18 = {
  3090. name: "u-line",
  3091. mixins: [mpMixin, mixin, props$k],
  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$17(_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_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-72791e59"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
  3127. const props$j = {
  3128. props: {
  3129. // 标题
  3130. title: {
  3131. type: [String, Number],
  3132. default: props$p.cell.title
  3133. },
  3134. // 标题下方的描述信息
  3135. label: {
  3136. type: [String, Number],
  3137. default: props$p.cell.label
  3138. },
  3139. // 右侧的内容
  3140. value: {
  3141. type: [String, Number],
  3142. default: props$p.cell.value
  3143. },
  3144. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  3145. icon: {
  3146. type: String,
  3147. default: props$p.cell.icon
  3148. },
  3149. // 是否禁用cell
  3150. disabled: {
  3151. type: Boolean,
  3152. default: props$p.cell.disabled
  3153. },
  3154. // 是否显示下边框
  3155. border: {
  3156. type: Boolean,
  3157. default: props$p.cell.border
  3158. },
  3159. // 内容是否垂直居中(主要是针对右侧的value部分)
  3160. center: {
  3161. type: Boolean,
  3162. default: props$p.cell.center
  3163. },
  3164. // 点击后跳转的URL地址
  3165. url: {
  3166. type: String,
  3167. default: props$p.cell.url
  3168. },
  3169. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  3170. linkType: {
  3171. type: String,
  3172. default: props$p.cell.linkType
  3173. },
  3174. // 是否开启点击反馈(表现为点击时加上灰色背景)
  3175. clickable: {
  3176. type: Boolean,
  3177. default: props$p.cell.clickable
  3178. },
  3179. // 是否展示右侧箭头并开启点击反馈
  3180. isLink: {
  3181. type: Boolean,
  3182. default: props$p.cell.isLink
  3183. },
  3184. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  3185. required: {
  3186. type: Boolean,
  3187. default: props$p.cell.required
  3188. },
  3189. // 右侧的图标箭头
  3190. rightIcon: {
  3191. type: String,
  3192. default: props$p.cell.rightIcon
  3193. },
  3194. // 右侧箭头的方向,可选值为:left,up,down
  3195. arrowDirection: {
  3196. type: String,
  3197. default: props$p.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$p.cell.size
  3224. },
  3225. // 点击cell是否阻止事件传播
  3226. stop: {
  3227. type: Boolean,
  3228. default: props$p.cell.stop
  3229. },
  3230. // 标识符,cell被点击时返回
  3231. name: {
  3232. type: [Number, String],
  3233. default: props$p.cell.name
  3234. }
  3235. }
  3236. };
  3237. const _sfc_main$17 = {
  3238. name: "u-cell",
  3239. data() {
  3240. return {};
  3241. },
  3242. mixins: [mpMixin, mixin, props$j],
  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$16(_ctx, _cache, $props, $setup, $data, $options) {
  3263. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  3264. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$6);
  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$5 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-3fd6feca"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
  3356. const props$i = {
  3357. props: {
  3358. // 分组标题
  3359. title: {
  3360. type: String,
  3361. default: props$p.cellGroup.title
  3362. },
  3363. // 是否显示外边框
  3364. border: {
  3365. type: Boolean,
  3366. default: props$p.cellGroup.border
  3367. }
  3368. }
  3369. };
  3370. const _sfc_main$16 = {
  3371. name: "u-cell-group",
  3372. mixins: [mpMixin, mixin, props$i]
  3373. };
  3374. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  3375. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$6);
  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$3 = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__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$15 = {
  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$14(_ctx, _cache, $props, $setup, $data, $options) {
  3483. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$6);
  3484. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  3485. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$5);
  3486. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  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$15, [["render", _sfc_render$14], ["__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$14 = {
  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$13(_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$5 = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__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$13 = {
  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$12(_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$13, [["render", _sfc_render$12], ["__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$12 = {
  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$11(_ctx, _cache, $props, $setup, $data, $options) {
  4918. const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$5);
  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$12);
  5078. if (typeof block1 === "function")
  5079. block1(_sfc_main$12);
  5080. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__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$11 = {
  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$10(_ctx, _cache, $props, $setup, $data, $options) {
  6693. const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$4);
  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$11, [["render", _sfc_render$10], ["__scopeId", "data-v-30bc23e1"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/pageScroll/index.vue"]]);
  6709. const _sfc_main$10 = {
  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$$(_ctx, _cache, $props, $setup, $data, $options) {
  6756. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  6757. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$5);
  6758. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  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$10, [["render", _sfc_render$$], ["__scopeId", "data-v-17a44f9d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/index.vue"]]);
  6843. const props$h = {
  6844. props: {
  6845. // 搜索框形状,round-圆形,square-方形
  6846. shape: {
  6847. type: String,
  6848. default: props$p.search.shape
  6849. },
  6850. // 搜索框背景色,默认值#f2f2f2
  6851. bgColor: {
  6852. type: String,
  6853. default: props$p.search.bgColor
  6854. },
  6855. // 占位提示文字
  6856. placeholder: {
  6857. type: String,
  6858. default: props$p.search.placeholder
  6859. },
  6860. // 是否启用清除控件
  6861. clearabled: {
  6862. type: Boolean,
  6863. default: props$p.search.clearabled
  6864. },
  6865. // 是否自动聚焦
  6866. focus: {
  6867. type: Boolean,
  6868. default: props$p.search.focus
  6869. },
  6870. // 是否在搜索框右侧显示取消按钮
  6871. showAction: {
  6872. type: Boolean,
  6873. default: props$p.search.showAction
  6874. },
  6875. // 右边控件的样式
  6876. actionStyle: {
  6877. type: Object,
  6878. default: props$p.search.actionStyle
  6879. },
  6880. // 取消按钮文字
  6881. actionText: {
  6882. type: String,
  6883. default: props$p.search.actionText
  6884. },
  6885. // 输入框内容对齐方式,可选值为 left|center|right
  6886. inputAlign: {
  6887. type: String,
  6888. default: props$p.search.inputAlign
  6889. },
  6890. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  6891. inputStyle: {
  6892. type: Object,
  6893. default: props$p.search.inputStyle
  6894. },
  6895. // 是否启用输入框
  6896. disabled: {
  6897. type: Boolean,
  6898. default: props$p.search.disabled
  6899. },
  6900. // 边框颜色
  6901. borderColor: {
  6902. type: String,
  6903. default: props$p.search.borderColor
  6904. },
  6905. // 搜索图标的颜色,默认同输入框字体颜色
  6906. searchIconColor: {
  6907. type: String,
  6908. default: props$p.search.searchIconColor
  6909. },
  6910. // 输入框字体颜色
  6911. color: {
  6912. type: String,
  6913. default: props$p.search.color
  6914. },
  6915. // placeholder的颜色
  6916. placeholderColor: {
  6917. type: String,
  6918. default: props$p.search.placeholderColor
  6919. },
  6920. // 左边输入框的图标,可以为uView图标名称或图片路径
  6921. searchIcon: {
  6922. type: String,
  6923. default: props$p.search.searchIcon
  6924. },
  6925. searchIconSize: {
  6926. type: [Number, String],
  6927. default: props$p.search.searchIconSize
  6928. },
  6929. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  6930. margin: {
  6931. type: String,
  6932. default: props$p.search.margin
  6933. },
  6934. // 开启showAction时,是否在input获取焦点时才显示
  6935. animation: {
  6936. type: Boolean,
  6937. default: props$p.search.animation
  6938. },
  6939. // 输入框的初始化内容
  6940. modelValue: {
  6941. type: String,
  6942. default: props$p.search.value
  6943. },
  6944. value: {
  6945. type: String,
  6946. default: props$p.search.value
  6947. },
  6948. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  6949. maxlength: {
  6950. type: [String, Number],
  6951. default: props$p.search.maxlength
  6952. },
  6953. // 搜索框高度,单位px
  6954. height: {
  6955. type: [String, Number],
  6956. default: props$p.search.height
  6957. },
  6958. // 搜索框左侧文本
  6959. label: {
  6960. type: [String, Number, null],
  6961. default: props$p.search.label
  6962. }
  6963. }
  6964. };
  6965. const _sfc_main$$ = {
  6966. name: "u-search",
  6967. mixins: [mpMixin, mixin, props$h],
  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$_(_ctx, _cache, $props, $setup, $data, $options) {
  7054. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  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_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-e082a34a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
  7148. const props$g = {
  7149. props: {
  7150. // 绑定的值
  7151. modelValue: {
  7152. type: [String, Number],
  7153. default: props$p.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$p.input.type
  7162. },
  7163. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  7164. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  7165. fixed: {
  7166. type: Boolean,
  7167. default: props$p.input.fixed
  7168. },
  7169. // 是否禁用输入框
  7170. disabled: {
  7171. type: Boolean,
  7172. default: props$p.input.disabled
  7173. },
  7174. // 禁用状态时的背景色
  7175. disabledColor: {
  7176. type: String,
  7177. default: props$p.input.disabledColor
  7178. },
  7179. // 是否显示清除控件
  7180. clearable: {
  7181. type: Boolean,
  7182. default: props$p.input.clearable
  7183. },
  7184. // 是否密码类型
  7185. password: {
  7186. type: Boolean,
  7187. default: props$p.input.password
  7188. },
  7189. // 最大输入长度,设置为 -1 的时候不限制最大长度
  7190. maxlength: {
  7191. type: [String, Number],
  7192. default: props$p.input.maxlength
  7193. },
  7194. // 输入框为空时的占位符
  7195. placeholder: {
  7196. type: String,
  7197. default: props$p.input.placeholder
  7198. },
  7199. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  7200. placeholderClass: {
  7201. type: String,
  7202. default: props$p.input.placeholderClass
  7203. },
  7204. // 指定placeholder的样式
  7205. placeholderStyle: {
  7206. type: [String, Object],
  7207. default: props$p.input.placeholderStyle
  7208. },
  7209. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  7210. showWordLimit: {
  7211. type: Boolean,
  7212. default: props$p.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$p.input.confirmType
  7220. },
  7221. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  7222. confirmHold: {
  7223. type: Boolean,
  7224. default: props$p.input.confirmHold
  7225. },
  7226. // focus时,点击页面的时候不收起键盘,微信小程序有效
  7227. holdKeyboard: {
  7228. type: Boolean,
  7229. default: props$p.input.holdKeyboard
  7230. },
  7231. // 自动获取焦点
  7232. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  7233. focus: {
  7234. type: Boolean,
  7235. default: props$p.input.focus
  7236. },
  7237. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  7238. autoBlur: {
  7239. type: Boolean,
  7240. default: props$p.input.autoBlur
  7241. },
  7242. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  7243. disableDefaultPadding: {
  7244. type: Boolean,
  7245. default: props$p.input.disableDefaultPadding
  7246. },
  7247. // 指定focus时光标的位置
  7248. cursor: {
  7249. type: [String, Number],
  7250. default: props$p.input.cursor
  7251. },
  7252. // 输入框聚焦时底部与键盘的距离
  7253. cursorSpacing: {
  7254. type: [String, Number],
  7255. default: props$p.input.cursorSpacing
  7256. },
  7257. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  7258. selectionStart: {
  7259. type: [String, Number],
  7260. default: props$p.input.selectionStart
  7261. },
  7262. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  7263. selectionEnd: {
  7264. type: [String, Number],
  7265. default: props$p.input.selectionEnd
  7266. },
  7267. // 键盘弹起时,是否自动上推页面
  7268. adjustPosition: {
  7269. type: Boolean,
  7270. default: props$p.input.adjustPosition
  7271. },
  7272. // 输入框内容对齐方式,可选值为:left|center|right
  7273. inputAlign: {
  7274. type: String,
  7275. default: props$p.input.inputAlign
  7276. },
  7277. // 输入框字体的大小
  7278. fontSize: {
  7279. type: [String, Number],
  7280. default: props$p.input.fontSize
  7281. },
  7282. // 输入框字体颜色
  7283. color: {
  7284. type: String,
  7285. default: props$p.input.color
  7286. },
  7287. // 输入框前置图标
  7288. prefixIcon: {
  7289. type: String,
  7290. default: props$p.input.prefixIcon
  7291. },
  7292. // 前置图标样式,对象或字符串
  7293. prefixIconStyle: {
  7294. type: [String, Object],
  7295. default: props$p.input.prefixIconStyle
  7296. },
  7297. // 输入框后置图标
  7298. suffixIcon: {
  7299. type: String,
  7300. default: props$p.input.suffixIcon
  7301. },
  7302. // 后置图标样式,对象或字符串
  7303. suffixIconStyle: {
  7304. type: [String, Object],
  7305. default: props$p.input.suffixIconStyle
  7306. },
  7307. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  7308. border: {
  7309. type: String,
  7310. default: props$p.input.border
  7311. },
  7312. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  7313. readonly: {
  7314. type: Boolean,
  7315. default: props$p.input.readonly
  7316. },
  7317. // 输入框形状,circle-圆形,square-方形
  7318. shape: {
  7319. type: String,
  7320. default: props$p.input.shape
  7321. },
  7322. // 用于处理或者过滤输入框内容的方法
  7323. formatter: {
  7324. type: [Function, null],
  7325. default: props$p.input.formatter
  7326. },
  7327. // 是否忽略组件内对文本合成系统事件的处理
  7328. ignoreCompositionEvent: {
  7329. type: Boolean,
  7330. default: true
  7331. }
  7332. }
  7333. };
  7334. const _sfc_main$_ = {
  7335. name: "u-input",
  7336. mixins: [mpMixin, mixin, props$g],
  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$Z(_ctx, _cache, $props, $setup, $data, $options) {
  7471. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  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$3 = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-df79975b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
  7557. const props$f = {
  7558. props: {
  7559. // input的label提示语
  7560. label: {
  7561. type: String,
  7562. default: props$p.formItem.label
  7563. },
  7564. // 绑定的值
  7565. prop: {
  7566. type: String,
  7567. default: props$p.formItem.prop
  7568. },
  7569. // 是否显示表单域的下划线边框
  7570. borderBottom: {
  7571. type: [String, Boolean],
  7572. default: props$p.formItem.borderBottom
  7573. },
  7574. // label的宽度,单位px
  7575. labelWidth: {
  7576. type: [String, Number],
  7577. default: props$p.formItem.labelWidth
  7578. },
  7579. // 右侧图标
  7580. rightIcon: {
  7581. type: String,
  7582. default: props$p.formItem.rightIcon
  7583. },
  7584. // 左侧图标
  7585. leftIcon: {
  7586. type: String,
  7587. default: props$p.formItem.leftIcon
  7588. },
  7589. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  7590. required: {
  7591. type: Boolean,
  7592. default: props$p.formItem.required
  7593. },
  7594. leftIconStyle: {
  7595. type: [String, Object],
  7596. default: props$p.formItem.leftIconStyle
  7597. }
  7598. }
  7599. };
  7600. const _sfc_main$Z = {
  7601. name: "u-form-item",
  7602. mixins: [mpMixin, mixin, props$f],
  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$Y(_ctx, _cache, $props, $setup, $data, $options) {
  7658. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  7659. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$6);
  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$2 = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-42bac3de"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
  7759. const props$e = {
  7760. props: {
  7761. // 是否显示组件
  7762. show: {
  7763. type: Boolean,
  7764. default: props$p.loadingIcon.show
  7765. },
  7766. // 颜色
  7767. color: {
  7768. type: String,
  7769. default: props$p.loadingIcon.color
  7770. },
  7771. // 提示文字颜色
  7772. textColor: {
  7773. type: String,
  7774. default: props$p.loadingIcon.textColor
  7775. },
  7776. // 文字和图标是否垂直排列
  7777. vertical: {
  7778. type: Boolean,
  7779. default: props$p.loadingIcon.vertical
  7780. },
  7781. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  7782. mode: {
  7783. type: String,
  7784. default: props$p.loadingIcon.mode
  7785. },
  7786. // 图标大小,单位默认px
  7787. size: {
  7788. type: [String, Number],
  7789. default: props$p.loadingIcon.size
  7790. },
  7791. // 文字大小
  7792. textSize: {
  7793. type: [String, Number],
  7794. default: props$p.loadingIcon.textSize
  7795. },
  7796. // 文字内容
  7797. text: {
  7798. type: [String, Number],
  7799. default: props$p.loadingIcon.text
  7800. },
  7801. // 动画模式
  7802. timingFunction: {
  7803. type: String,
  7804. default: props$p.loadingIcon.timingFunction
  7805. },
  7806. // 动画执行周期时间
  7807. duration: {
  7808. type: [String, Number],
  7809. default: props$p.loadingIcon.duration
  7810. },
  7811. // mode=circle时的暗边颜色
  7812. inactiveColor: {
  7813. type: String,
  7814. default: props$p.loadingIcon.inactiveColor
  7815. }
  7816. }
  7817. };
  7818. const _sfc_main$Y = {
  7819. name: "u-loading-icon",
  7820. mixins: [mpMixin, mixin, props$e],
  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$X(_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$3 = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__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$d = {
  8025. props: {
  8026. // 接受的文件类型, 可选值为all media image file video
  8027. accept: {
  8028. type: String,
  8029. default: props$p.upload.accept
  8030. },
  8031. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  8032. capture: {
  8033. type: [String, Array],
  8034. default: props$p.upload.capture
  8035. },
  8036. // 当accept为video时生效,是否压缩视频,默认为true
  8037. compressed: {
  8038. type: Boolean,
  8039. default: props$p.upload.compressed
  8040. },
  8041. // 当accept为video时生效,可选值为back或front
  8042. camera: {
  8043. type: String,
  8044. default: props$p.upload.camera
  8045. },
  8046. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  8047. maxDuration: {
  8048. type: Number,
  8049. default: props$p.upload.maxDuration
  8050. },
  8051. // 上传区域的图标,只能内置图标
  8052. uploadIcon: {
  8053. type: String,
  8054. default: props$p.upload.uploadIcon
  8055. },
  8056. // 上传区域的图标的颜色,默认
  8057. uploadIconColor: {
  8058. type: String,
  8059. default: props$p.upload.uploadIconColor
  8060. },
  8061. // 是否开启文件读取前事件
  8062. useBeforeRead: {
  8063. type: Boolean,
  8064. default: props$p.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$p.upload.previewFullImage
  8080. },
  8081. // 最大上传数量
  8082. maxCount: {
  8083. type: [String, Number],
  8084. default: props$p.upload.maxCount
  8085. },
  8086. // 是否启用
  8087. disabled: {
  8088. type: Boolean,
  8089. default: props$p.upload.disabled
  8090. },
  8091. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  8092. imageMode: {
  8093. type: String,
  8094. default: props$p.upload.imageMode
  8095. },
  8096. // 标识符,可以在回调函数的第二项参数中获取
  8097. name: {
  8098. type: String,
  8099. default: props$p.upload.name
  8100. },
  8101. // 所选的图片的尺寸, 可选值为original compressed
  8102. sizeType: {
  8103. type: Array,
  8104. default: props$p.upload.sizeType
  8105. },
  8106. // 是否开启图片多选,部分安卓机型不支持
  8107. multiple: {
  8108. type: Boolean,
  8109. default: props$p.upload.multiple
  8110. },
  8111. // 是否展示删除按钮
  8112. deletable: {
  8113. type: Boolean,
  8114. default: props$p.upload.deletable
  8115. },
  8116. // 文件大小限制,单位为byte
  8117. maxSize: {
  8118. type: [String, Number],
  8119. default: props$p.upload.maxSize
  8120. },
  8121. // 显示已上传的文件列表
  8122. fileList: {
  8123. type: Array,
  8124. default: props$p.upload.fileList
  8125. },
  8126. // 上传区域的提示文字
  8127. uploadText: {
  8128. type: String,
  8129. default: props$p.upload.uploadText
  8130. },
  8131. // 内部预览图片区域和选择图片按钮的区域宽度
  8132. width: {
  8133. type: [String, Number],
  8134. default: props$p.upload.width
  8135. },
  8136. // 内部预览图片区域和选择图片按钮的区域高度
  8137. height: {
  8138. type: [String, Number],
  8139. default: props$p.upload.height
  8140. },
  8141. // 是否在上传完成后展示预览图
  8142. previewImage: {
  8143. type: Boolean,
  8144. default: props$p.upload.previewImage
  8145. }
  8146. }
  8147. };
  8148. const _sfc_main$X = {
  8149. name: "u-upload",
  8150. mixins: [mpMixin, mixin, mixinUp, props$d],
  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$W(_ctx, _cache, $props, $setup, $data, $options) {
  8332. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  8333. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$3);
  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_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  8482. const props$c = {
  8483. props: {
  8484. // 当前form的需要验证字段的集合
  8485. model: {
  8486. type: Object,
  8487. default: props$p.form.model
  8488. },
  8489. // 验证规则
  8490. rules: {
  8491. type: [Object, Function, Array],
  8492. default: props$p.form.rules
  8493. },
  8494. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  8495. // border-bottom-下边框呈现红色,none-无提示
  8496. errorType: {
  8497. type: String,
  8498. default: props$p.form.errorType
  8499. },
  8500. // 是否显示表单域的下划线边框
  8501. borderBottom: {
  8502. type: Boolean,
  8503. default: props$p.form.borderBottom
  8504. },
  8505. // label的位置,left-左边,top-上边
  8506. labelPosition: {
  8507. type: String,
  8508. default: props$p.form.labelPosition
  8509. },
  8510. // label的宽度,单位px
  8511. labelWidth: {
  8512. type: [String, Number],
  8513. default: props$p.form.labelWidth
  8514. },
  8515. // lable字体的对齐方式
  8516. labelAlign: {
  8517. type: String,
  8518. default: props$p.form.labelAlign
  8519. },
  8520. // lable的样式,对象形式
  8521. labelStyle: {
  8522. type: Object,
  8523. default: props$p.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$W = {
  9422. name: "u-form",
  9423. mixins: [mpMixin, mixin, props$c],
  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$V(_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$2 = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  9588. const props$b = {
  9589. props: {
  9590. // 是否细边框
  9591. hairline: {
  9592. type: Boolean,
  9593. default: props$p.button.hairline
  9594. },
  9595. // 按钮的预置样式,info,primary,error,warning,success
  9596. type: {
  9597. type: String,
  9598. default: props$p.button.type
  9599. },
  9600. // 按钮尺寸,large,normal,small,mini
  9601. size: {
  9602. type: String,
  9603. default: props$p.button.size
  9604. },
  9605. // 按钮形状,circle(两边为半圆),square(带圆角)
  9606. shape: {
  9607. type: String,
  9608. default: props$p.button.shape
  9609. },
  9610. // 按钮是否镂空
  9611. plain: {
  9612. type: Boolean,
  9613. default: props$p.button.plain
  9614. },
  9615. // 是否禁止状态
  9616. disabled: {
  9617. type: Boolean,
  9618. default: props$p.button.disabled
  9619. },
  9620. // 是否加载中
  9621. loading: {
  9622. type: Boolean,
  9623. default: props$p.button.loading
  9624. },
  9625. // 加载中提示文字
  9626. loadingText: {
  9627. type: [String, Number],
  9628. default: props$p.button.loadingText
  9629. },
  9630. // 加载状态图标类型
  9631. loadingMode: {
  9632. type: String,
  9633. default: props$p.button.loadingMode
  9634. },
  9635. // 加载图标大小
  9636. loadingSize: {
  9637. type: [String, Number],
  9638. default: props$p.button.loadingSize
  9639. },
  9640. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  9641. // https://uniapp.dcloud.io/component/button
  9642. openType: {
  9643. type: String,
  9644. default: props$p.button.openType
  9645. },
  9646. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  9647. // 取值为submit(提交表单),reset(重置表单)
  9648. formType: {
  9649. type: String,
  9650. default: props$p.button.formType
  9651. },
  9652. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  9653. // 只微信小程序、QQ小程序有效
  9654. appParameter: {
  9655. type: String,
  9656. default: props$p.button.appParameter
  9657. },
  9658. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  9659. hoverStopPropagation: {
  9660. type: Boolean,
  9661. default: props$p.button.hoverStopPropagation
  9662. },
  9663. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  9664. lang: {
  9665. type: String,
  9666. default: props$p.button.lang
  9667. },
  9668. // 会话来源,open-type="contact"时有效。只微信小程序有效
  9669. sessionFrom: {
  9670. type: String,
  9671. default: props$p.button.sessionFrom
  9672. },
  9673. // 会话内消息卡片标题,open-type="contact"时有效
  9674. // 默认当前标题,只微信小程序有效
  9675. sendMessageTitle: {
  9676. type: String,
  9677. default: props$p.button.sendMessageTitle
  9678. },
  9679. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  9680. // 默认当前分享路径,只微信小程序有效
  9681. sendMessagePath: {
  9682. type: String,
  9683. default: props$p.button.sendMessagePath
  9684. },
  9685. // 会话内消息卡片图片,open-type="contact"时有效
  9686. // 默认当前页面截图,只微信小程序有效
  9687. sendMessageImg: {
  9688. type: String,
  9689. default: props$p.button.sendMessageImg
  9690. },
  9691. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  9692. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  9693. showMessageCard: {
  9694. type: Boolean,
  9695. default: props$p.button.showMessageCard
  9696. },
  9697. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  9698. dataName: {
  9699. type: String,
  9700. default: props$p.button.dataName
  9701. },
  9702. // 节流,一定时间内只能触发一次
  9703. throttleTime: {
  9704. type: [String, Number],
  9705. default: props$p.button.throttleTime
  9706. },
  9707. // 按住后多久出现点击态,单位毫秒
  9708. hoverStartTime: {
  9709. type: [String, Number],
  9710. default: props$p.button.hoverStartTime
  9711. },
  9712. // 手指松开后点击态保留时间,单位毫秒
  9713. hoverStayTime: {
  9714. type: [String, Number],
  9715. default: props$p.button.hoverStayTime
  9716. },
  9717. // 按钮文字,之所以通过props传入,是因为slot传入的话
  9718. // nvue中无法控制文字的样式
  9719. text: {
  9720. type: [String, Number],
  9721. default: props$p.button.text
  9722. },
  9723. // 按钮图标
  9724. icon: {
  9725. type: String,
  9726. default: props$p.button.icon
  9727. },
  9728. // 按钮图标
  9729. iconColor: {
  9730. type: String,
  9731. default: props$p.button.icon
  9732. },
  9733. // 按钮颜色,支持传入linear-gradient渐变色
  9734. color: {
  9735. type: String,
  9736. default: props$p.button.color
  9737. }
  9738. }
  9739. };
  9740. const _sfc_main$V = {
  9741. name: "u-button",
  9742. mixins: [mpMixin, mixin, props$b],
  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$U(_ctx, _cache, $props, $setup, $data, $options) {
  9865. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$3);
  9866. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  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$V, [["render", _sfc_render$U], ["__scopeId", "data-v-5ce41ee6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
  9943. const props$a = {
  9944. props: {
  9945. // 是否展示组件
  9946. show: {
  9947. type: Boolean,
  9948. default: props$p.transition.show
  9949. },
  9950. // 使用的动画模式
  9951. mode: {
  9952. type: String,
  9953. default: props$p.transition.mode
  9954. },
  9955. // 动画的执行时间,单位ms
  9956. duration: {
  9957. type: [String, Number],
  9958. default: props$p.transition.duration
  9959. },
  9960. // 使用的动画过渡函数
  9961. timingFunction: {
  9962. type: String,
  9963. default: props$p.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$U = {
  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$a],
  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$T(_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$2 = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  10084. const props$9 = {
  10085. props: {
  10086. // 是否显示遮罩
  10087. show: {
  10088. type: Boolean,
  10089. default: props$p.overlay.show
  10090. },
  10091. // 层级z-index
  10092. zIndex: {
  10093. type: [String, Number],
  10094. default: props$p.overlay.zIndex
  10095. },
  10096. // 遮罩的过渡时间,单位为ms
  10097. duration: {
  10098. type: [String, Number],
  10099. default: props$p.overlay.duration
  10100. },
  10101. // 不透明度值,当做rgba的第四个参数
  10102. opacity: {
  10103. type: [String, Number],
  10104. default: props$p.overlay.opacity
  10105. }
  10106. }
  10107. };
  10108. const _sfc_main$T = {
  10109. name: "u-overlay",
  10110. mixins: [mpMixin, mixin, props$9],
  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$S(_ctx, _cache, $props, $setup, $data, $options) {
  10132. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$2);
  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$2 = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  10148. const props$8 = {
  10149. props: {
  10150. bgColor: {
  10151. type: String,
  10152. default: props$p.statusBar.bgColor
  10153. }
  10154. }
  10155. };
  10156. const _sfc_main$S = {
  10157. name: "u-status-bar",
  10158. mixins: [mpMixin, mixin, props$8],
  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$R(_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$1 = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  10186. const props$7 = {
  10187. props: {}
  10188. };
  10189. const _sfc_main$R = {
  10190. name: "u-safe-bottom",
  10191. mixins: [mpMixin, mixin, props$7],
  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$Q(_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$1 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  10220. const props$6 = {
  10221. props: {
  10222. // 是否展示弹窗
  10223. show: {
  10224. type: Boolean,
  10225. default: props$p.popup.show
  10226. },
  10227. // 是否显示遮罩
  10228. overlay: {
  10229. type: Boolean,
  10230. default: props$p.popup.overlay
  10231. },
  10232. // 弹出的方向,可选值为 top bottom right left center
  10233. mode: {
  10234. type: String,
  10235. default: props$p.popup.mode
  10236. },
  10237. // 动画时长,单位ms
  10238. duration: {
  10239. type: [String, Number],
  10240. default: props$p.popup.duration
  10241. },
  10242. // 是否显示关闭图标
  10243. closeable: {
  10244. type: Boolean,
  10245. default: props$p.popup.closeable
  10246. },
  10247. // 自定义遮罩的样式
  10248. overlayStyle: {
  10249. type: [Object, String],
  10250. default: props$p.popup.overlayStyle
  10251. },
  10252. // 点击遮罩是否关闭弹窗
  10253. closeOnClickOverlay: {
  10254. type: Boolean,
  10255. default: props$p.popup.closeOnClickOverlay
  10256. },
  10257. // 层级
  10258. zIndex: {
  10259. type: [String, Number],
  10260. default: props$p.popup.zIndex
  10261. },
  10262. // 是否为iPhoneX留出底部安全距离
  10263. safeAreaInsetBottom: {
  10264. type: Boolean,
  10265. default: props$p.popup.safeAreaInsetBottom
  10266. },
  10267. // 是否留出顶部安全距离(状态栏高度)
  10268. safeAreaInsetTop: {
  10269. type: Boolean,
  10270. default: props$p.popup.safeAreaInsetTop
  10271. },
  10272. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  10273. closeIconPos: {
  10274. type: String,
  10275. default: props$p.popup.closeIconPos
  10276. },
  10277. // 是否显示圆角
  10278. round: {
  10279. type: [Boolean, String, Number],
  10280. default: props$p.popup.round
  10281. },
  10282. // mode=center,也即中部弹出时,是否使用缩放模式
  10283. zoom: {
  10284. type: Boolean,
  10285. default: props$p.popup.zoom
  10286. },
  10287. // 弹窗背景色,设置为transparent可去除白色背景
  10288. bgColor: {
  10289. type: String,
  10290. default: props$p.popup.bgColor
  10291. },
  10292. // 遮罩的透明度,0-1之间
  10293. overlayOpacity: {
  10294. type: [Number, String],
  10295. default: props$p.popup.overlayOpacity
  10296. }
  10297. }
  10298. };
  10299. const _sfc_main$Q = {
  10300. name: "u-popup",
  10301. mixins: [mpMixin, mixin, props$6],
  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$P(_ctx, _cache, $props, $setup, $data, $options) {
  10413. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$2);
  10414. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_1$1);
  10415. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  10416. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$1);
  10417. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$2);
  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$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  10478. const _sfc_main$P = {
  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$O(_ctx, _cache, $props, $setup, $data, $options) {
  10565. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$3);
  10566. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_2$2);
  10567. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  10568. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_3$3);
  10569. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_3$2);
  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$1);
  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$P, [["render", _sfc_render$O], ["__scopeId", "data-v-0265fb8a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/components/feedbackPopup.vue"]]);
  10666. const _sfc_main$O = {
  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$N(_ctx, _cache, $props, $setup, $data, $options) {
  10759. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  10760. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_1$4);
  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$O, [["render", _sfc_render$N], ["__scopeId", "data-v-0452ab4c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/index.vue"]]);
  10865. const _sfc_main$N = {
  10866. __name: "SelectWarehouse",
  10867. emits: ["confirm"],
  10868. setup(__props, { expose: __expose, emit: __emit }) {
  10869. const visible = vue.ref(false);
  10870. const emit = __emit;
  10871. const searchKey = vue.ref("");
  10872. const searchResults = vue.ref([
  10873. { id: 1, name: "河南仓" },
  10874. { id: 2, name: "湖北仓" },
  10875. { id: 3, name: "河北仓" },
  10876. { id: 4, name: "涨涨涨" },
  10877. { id: 5, name: "涨涨" }
  10878. ]);
  10879. const historyWarehouses = vue.ref([{ id: 1, name: "河南仓" }]);
  10880. const selectedWarehouse = vue.ref("");
  10881. const handleSearch = () => {
  10882. formatAppLog("log", "at pages/index/express/components/SelectWarehouse.vue:103", "搜索关键词:", searchKey.value);
  10883. };
  10884. const selectWarehouse = (name) => {
  10885. selectedWarehouse.value = name;
  10886. };
  10887. const handleCancel = () => {
  10888. visible.value = false;
  10889. selectedWarehouse.value = "";
  10890. searchKey.value = "";
  10891. };
  10892. const handleConfirm = () => {
  10893. if (!selectedWarehouse.value) {
  10894. uni.showToast({
  10895. title: "请选择仓库",
  10896. icon: "none"
  10897. });
  10898. return;
  10899. }
  10900. emit("confirm", selectedWarehouse.value);
  10901. handleCancel();
  10902. };
  10903. const open2 = () => {
  10904. visible.value = true;
  10905. };
  10906. __expose({ open: open2 });
  10907. const __returned__ = { visible, emit, searchKey, searchResults, historyWarehouses, selectedWarehouse, handleSearch, selectWarehouse, handleCancel, handleConfirm, open: open2, ref: vue.ref };
  10908. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  10909. return __returned__;
  10910. }
  10911. };
  10912. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  10913. const _component_wd_icon = vue.resolveComponent("wd-icon");
  10914. const _component_wd_button = vue.resolveComponent("wd-button");
  10915. const _component_wd_input = vue.resolveComponent("wd-input");
  10916. const _component_wd_tag = vue.resolveComponent("wd-tag");
  10917. const _component_wd_popup = vue.resolveComponent("wd-popup");
  10918. return vue.openBlock(), vue.createBlock(_component_wd_popup, {
  10919. modelValue: $setup.visible,
  10920. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.visible = $event),
  10921. position: "bottom",
  10922. class: "warehouse-popup",
  10923. "close-on-click-modal": false,
  10924. "safe-area-inset-bottom": true,
  10925. closable: true
  10926. }, {
  10927. default: vue.withCtx(() => [
  10928. vue.createElementVNode("view", { class: "popup-content" }, [
  10929. vue.createCommentVNode(" 标题 "),
  10930. vue.createElementVNode("view", { class: "popup-header" }, [
  10931. vue.createElementVNode("view", { class: "header-left" }, [
  10932. vue.createVNode(_component_wd_icon, {
  10933. name: "warehouse",
  10934. size: "32rpx",
  10935. color: "#333"
  10936. }),
  10937. vue.createElementVNode("text", null, "绑定仓库")
  10938. ])
  10939. ]),
  10940. vue.createCommentVNode(" 搜索框 "),
  10941. vue.createElementVNode("view", { class: "search-box" }, [
  10942. vue.createVNode(_component_wd_input, {
  10943. modelValue: $setup.searchKey,
  10944. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKey = $event),
  10945. placeholder: "搜索仓库",
  10946. clearable: "",
  10947. class: "search-input",
  10948. "no-border": ""
  10949. }, {
  10950. suffix: vue.withCtx(() => [
  10951. vue.createVNode(_component_wd_button, {
  10952. type: "success",
  10953. class: "search-btn",
  10954. onClick: $setup.handleSearch
  10955. }, {
  10956. default: vue.withCtx(() => [
  10957. vue.createTextVNode("搜索")
  10958. ]),
  10959. _: 1
  10960. /* STABLE */
  10961. })
  10962. ]),
  10963. _: 1
  10964. /* STABLE */
  10965. }, 8, ["modelValue"])
  10966. ]),
  10967. vue.createCommentVNode(" 搜索结果 "),
  10968. $setup.searchResults.length ? (vue.openBlock(), vue.createElementBlock("view", {
  10969. key: 0,
  10970. class: "search-result"
  10971. }, [
  10972. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  10973. vue.createElementVNode("view", { class: "tag-group" }, [
  10974. (vue.openBlock(true), vue.createElementBlock(
  10975. vue.Fragment,
  10976. null,
  10977. vue.renderList($setup.searchResults, (item) => {
  10978. return vue.openBlock(), vue.createBlock(_component_wd_tag, {
  10979. key: item.id,
  10980. class: vue.normalizeClass(["warehouse-tag", { active: $setup.selectedWarehouse === item.name }]),
  10981. onClick: ($event) => $setup.selectWarehouse(item.name)
  10982. }, {
  10983. default: vue.withCtx(() => [
  10984. vue.createTextVNode(
  10985. vue.toDisplayString(item.name),
  10986. 1
  10987. /* TEXT */
  10988. )
  10989. ]),
  10990. _: 2
  10991. /* DYNAMIC */
  10992. }, 1032, ["class", "onClick"]);
  10993. }),
  10994. 128
  10995. /* KEYED_FRAGMENT */
  10996. ))
  10997. ])
  10998. ])) : vue.createCommentVNode("v-if", true),
  10999. vue.createCommentVNode(" 历史绑定 "),
  11000. vue.createElementVNode("view", { class: "history-section" }, [
  11001. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  11002. vue.createElementVNode("view", { class: "tag-group" }, [
  11003. (vue.openBlock(true), vue.createElementBlock(
  11004. vue.Fragment,
  11005. null,
  11006. vue.renderList($setup.historyWarehouses, (item) => {
  11007. return vue.openBlock(), vue.createBlock(_component_wd_tag, {
  11008. key: item.id,
  11009. class: vue.normalizeClass(["warehouse-tag", { active: $setup.selectedWarehouse === item.name }]),
  11010. onClick: ($event) => $setup.selectWarehouse(item.name)
  11011. }, {
  11012. default: vue.withCtx(() => [
  11013. vue.createTextVNode(
  11014. vue.toDisplayString(item.name),
  11015. 1
  11016. /* TEXT */
  11017. )
  11018. ]),
  11019. _: 2
  11020. /* DYNAMIC */
  11021. }, 1032, ["class", "onClick"]);
  11022. }),
  11023. 128
  11024. /* KEYED_FRAGMENT */
  11025. ))
  11026. ])
  11027. ]),
  11028. vue.createCommentVNode(" 底部按钮 "),
  11029. vue.createElementVNode("view", { class: "popup-footer" }, [
  11030. vue.createVNode(_component_wd_button, {
  11031. class: "footer-btn cancel-btn",
  11032. onClick: $setup.handleCancel
  11033. }, {
  11034. default: vue.withCtx(() => [
  11035. vue.createTextVNode("取消")
  11036. ]),
  11037. _: 1
  11038. /* STABLE */
  11039. }),
  11040. vue.createVNode(_component_wd_button, {
  11041. type: "success",
  11042. class: "footer-btn confirm-btn",
  11043. onClick: $setup.handleConfirm
  11044. }, {
  11045. default: vue.withCtx(() => [
  11046. vue.createTextVNode(" 确定 ")
  11047. ]),
  11048. _: 1
  11049. /* STABLE */
  11050. })
  11051. ])
  11052. ])
  11053. ]),
  11054. _: 1
  11055. /* STABLE */
  11056. }, 8, ["modelValue"]);
  11057. }
  11058. const SelectWarehouse = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-2710222b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/SelectWarehouse.vue"]]);
  11059. const _sfc_main$M = {
  11060. __name: "transfer-sign",
  11061. setup(__props, { expose: __expose }) {
  11062. __expose();
  11063. const warehouse = vue.ref("");
  11064. const trackingNumber = vue.ref("");
  11065. const selectRef = vue.ref(null);
  11066. const handleOpenWarehousePicker = () => {
  11067. var _a;
  11068. (_a = selectRef.value) == null ? void 0 : _a.open();
  11069. };
  11070. const scanTrackingNumber = () => {
  11071. uni.scanCode({
  11072. scanType: ["barCode"],
  11073. success: (res) => {
  11074. trackingNumber.value = res.result;
  11075. },
  11076. fail: () => {
  11077. uni.showToast({
  11078. title: "扫码失败",
  11079. icon: "none"
  11080. });
  11081. }
  11082. });
  11083. };
  11084. const confirmTrackingNumber = () => {
  11085. if (!warehouse.value) {
  11086. uni.showToast({
  11087. title: "请选择仓库",
  11088. icon: "none"
  11089. });
  11090. return;
  11091. }
  11092. if (!trackingNumber.value) {
  11093. uni.showToast({
  11094. title: "请输入物流单号",
  11095. icon: "none"
  11096. });
  11097. return;
  11098. }
  11099. formatAppLog("log", "at pages/index/express/transfer-sign.vue:89", "确认物流单号:", {
  11100. warehouse: warehouse.value,
  11101. trackingNumber: trackingNumber.value
  11102. });
  11103. };
  11104. const handleScan = () => {
  11105. if (!warehouse.value) {
  11106. uni.showToast({
  11107. title: "请先选择仓库",
  11108. icon: "none"
  11109. });
  11110. return;
  11111. }
  11112. uni.scanCode({
  11113. scanType: ["barCode", "qrCode"],
  11114. success: (res) => {
  11115. formatAppLog("log", "at pages/index/express/transfer-sign.vue:107", "扫码结果:", res.result);
  11116. },
  11117. fail: () => {
  11118. uni.showToast({
  11119. title: "扫码失败",
  11120. icon: "none"
  11121. });
  11122. }
  11123. });
  11124. };
  11125. const __returned__ = { warehouse, trackingNumber, selectRef, handleOpenWarehousePicker, scanTrackingNumber, confirmTrackingNumber, handleScan, ref: vue.ref, SelectWarehouse };
  11126. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11127. return __returned__;
  11128. }
  11129. };
  11130. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  11131. const _component_wd_input = vue.resolveComponent("wd-input");
  11132. const _component_wd_button = vue.resolveComponent("wd-button");
  11133. const _component_wd_icon = vue.resolveComponent("wd-icon");
  11134. return vue.openBlock(), vue.createElementBlock("view", { class: "scan-page" }, [
  11135. vue.createCommentVNode(" 仓库选择 "),
  11136. vue.createElementVNode("view", { class: "input-group" }, [
  11137. vue.createVNode(_component_wd_input, {
  11138. modelValue: $setup.warehouse,
  11139. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.warehouse = $event),
  11140. placeholder: "请选择仓库",
  11141. readonly: "",
  11142. "no-border": true,
  11143. "right-icon": "arrow-right",
  11144. onClick: $setup.handleOpenWarehousePicker
  11145. }, null, 8, ["modelValue"]),
  11146. vue.createVNode(_component_wd_button, {
  11147. size: "small",
  11148. class: "btn-select",
  11149. onClick: $setup.handleOpenWarehousePicker
  11150. }, {
  11151. default: vue.withCtx(() => [
  11152. vue.createTextVNode("选择")
  11153. ]),
  11154. _: 1
  11155. /* STABLE */
  11156. })
  11157. ]),
  11158. vue.createCommentVNode(" 物流单号输入 "),
  11159. vue.createElementVNode("view", { class: "input-group" }, [
  11160. vue.createVNode(_component_wd_input, {
  11161. modelValue: $setup.trackingNumber,
  11162. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.trackingNumber = $event),
  11163. placeholder: "扫描/输入物流单号",
  11164. clearable: "",
  11165. "no-border": true
  11166. }, {
  11167. prefix: vue.withCtx(() => [
  11168. vue.createVNode(_component_wd_icon, {
  11169. name: "scan",
  11170. size: "20px",
  11171. color: "#666",
  11172. onClick: $setup.scanTrackingNumber
  11173. })
  11174. ]),
  11175. _: 1
  11176. /* STABLE */
  11177. }, 8, ["modelValue"]),
  11178. vue.createVNode(_component_wd_button, {
  11179. size: "small",
  11180. class: "btn-confirm",
  11181. onClick: $setup.confirmTrackingNumber
  11182. }, {
  11183. default: vue.withCtx(() => [
  11184. vue.createTextVNode("确定")
  11185. ]),
  11186. _: 1
  11187. /* STABLE */
  11188. })
  11189. ]),
  11190. vue.createCommentVNode(" 底部扫码按钮 "),
  11191. vue.createElementVNode("view", { class: "bottom-button" }, [
  11192. vue.createVNode(_component_wd_button, {
  11193. type: "success",
  11194. block: "",
  11195. onClick: $setup.handleScan
  11196. }, {
  11197. default: vue.withCtx(() => [
  11198. vue.createTextVNode("扫码")
  11199. ]),
  11200. _: 1
  11201. /* STABLE */
  11202. })
  11203. ]),
  11204. vue.createVNode(
  11205. $setup["SelectWarehouse"],
  11206. { ref: "selectRef" },
  11207. null,
  11208. 512
  11209. /* NEED_PATCH */
  11210. )
  11211. ]);
  11212. }
  11213. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-333d344a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/transfer-sign.vue"]]);
  11214. const _sfc_main$L = {};
  11215. function _sfc_render$K(_ctx, _cache) {
  11216. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11217. }
  11218. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-check.vue"]]);
  11219. const _sfc_main$K = {};
  11220. function _sfc_render$J(_ctx, _cache) {
  11221. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11222. }
  11223. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-unpack.vue"]]);
  11224. const _sfc_main$J = {};
  11225. function _sfc_render$I(_ctx, _cache) {
  11226. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11227. }
  11228. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/route-exception.vue"]]);
  11229. const _sfc_main$I = {};
  11230. function _sfc_render$H(_ctx, _cache) {
  11231. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11232. }
  11233. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/warehouse-sign.vue"]]);
  11234. const _sfc_main$H = {};
  11235. function _sfc_render$G(_ctx, _cache) {
  11236. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11237. }
  11238. const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/weight-modify.vue"]]);
  11239. const _sfc_main$G = {};
  11240. function _sfc_render$F(_ctx, _cache) {
  11241. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11242. }
  11243. const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/confirm-receipt.vue"]]);
  11244. const _sfc_main$F = {};
  11245. function _sfc_render$E(_ctx, _cache) {
  11246. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11247. }
  11248. const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/scan-order.vue"]]);
  11249. const _sfc_main$E = {};
  11250. function _sfc_render$D(_ctx, _cache) {
  11251. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11252. }
  11253. const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/express-order.vue"]]);
  11254. const _sfc_main$D = {};
  11255. function _sfc_render$C(_ctx, _cache) {
  11256. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11257. }
  11258. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/sender.vue"]]);
  11259. const _sfc_main$C = {};
  11260. function _sfc_render$B(_ctx, _cache) {
  11261. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11262. }
  11263. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/audit.vue"]]);
  11264. const _sfc_main$B = {};
  11265. function _sfc_render$A(_ctx, _cache) {
  11266. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11267. }
  11268. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/after-sale.vue"]]);
  11269. const _sfc_main$A = {};
  11270. function _sfc_render$z(_ctx, _cache) {
  11271. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11272. }
  11273. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/package.vue"]]);
  11274. const _sfc_main$z = {};
  11275. function _sfc_render$y(_ctx, _cache) {
  11276. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11277. }
  11278. const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/medium-in.vue"]]);
  11279. const _sfc_main$y = {};
  11280. function _sfc_render$x(_ctx, _cache) {
  11281. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11282. }
  11283. const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/good-in.vue"]]);
  11284. const _sfc_main$x = {};
  11285. function _sfc_render$w(_ctx, _cache) {
  11286. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11287. }
  11288. const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/secondary-in.vue"]]);
  11289. const _sfc_main$w = {};
  11290. function _sfc_render$v(_ctx, _cache) {
  11291. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11292. }
  11293. const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-in.vue"]]);
  11294. const _sfc_main$v = {};
  11295. function _sfc_render$u(_ctx, _cache) {
  11296. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11297. }
  11298. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out.vue"]]);
  11299. const _sfc_main$u = {};
  11300. function _sfc_render$t(_ctx, _cache) {
  11301. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11302. }
  11303. const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-off.vue"]]);
  11304. const _sfc_main$t = {};
  11305. function _sfc_render$s(_ctx, _cache) {
  11306. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11307. }
  11308. const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query.vue"]]);
  11309. const _sfc_main$s = {};
  11310. function _sfc_render$r(_ctx, _cache) {
  11311. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11312. }
  11313. const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order.vue"]]);
  11314. const _sfc_main$r = {};
  11315. function _sfc_render$q(_ctx, _cache) {
  11316. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11317. }
  11318. const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/speedy-check.vue"]]);
  11319. const _sfc_main$q = {};
  11320. function _sfc_render$p(_ctx, _cache) {
  11321. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11322. }
  11323. const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-order.vue"]]);
  11324. const _sfc_main$p = {};
  11325. function _sfc_render$o(_ctx, _cache) {
  11326. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11327. }
  11328. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-record.vue"]]);
  11329. const _sfc_main$o = {};
  11330. function _sfc_render$n(_ctx, _cache) {
  11331. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11332. }
  11333. const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/scan-book.vue"]]);
  11334. const _sfc_main$n = {};
  11335. function _sfc_render$m(_ctx, _cache) {
  11336. return vue.openBlock(), vue.createElementBlock("view", null, "1");
  11337. }
  11338. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/book-weight.vue"]]);
  11339. const _sfc_main$m = {
  11340. __name: "user-info",
  11341. setup(__props, { expose: __expose }) {
  11342. __expose();
  11343. const userInfo = vue.ref({
  11344. avatar: "/static/images/avatar.jpg",
  11345. name: "无",
  11346. gender: "无",
  11347. birthday: "无",
  11348. education: "无",
  11349. school: "无",
  11350. username: "用户账号",
  11351. account: "fxt",
  11352. createTime: "2024-06-12 12:00:00",
  11353. lastLogin: "",
  11354. company: "无",
  11355. employeeId: "无",
  11356. position: "无",
  11357. phone: "18888888888",
  11358. email: "无",
  11359. address: "无"
  11360. });
  11361. const handleEditAvatar = () => {
  11362. uni.chooseImage({
  11363. count: 1,
  11364. success: (res) => {
  11365. formatAppLog("log", "at pages/my/page/user-info.vue:94", "选择的图片:", res.tempFilePaths[0]);
  11366. }
  11367. });
  11368. };
  11369. const __returned__ = { userInfo, handleEditAvatar, ref: vue.ref };
  11370. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11371. return __returned__;
  11372. }
  11373. };
  11374. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  11375. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$6);
  11376. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  11377. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$5);
  11378. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  11379. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  11380. vue.createCommentVNode(" 头像区域 "),
  11381. vue.createElementVNode("view", { class: "avatar-section" }, [
  11382. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  11383. vue.createElementVNode("text", null, "头像:"),
  11384. vue.createVNode(_component_u_avatar, {
  11385. size: 50,
  11386. src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
  11387. }),
  11388. vue.createVNode(_component_u_button, {
  11389. type: "success",
  11390. style: { "width": "200rpx" },
  11391. size: "small",
  11392. onClick: $setup.handleEditAvatar
  11393. }, {
  11394. default: vue.withCtx(() => [
  11395. vue.createTextVNode("去修改")
  11396. ]),
  11397. _: 1
  11398. /* STABLE */
  11399. })
  11400. ])
  11401. ]),
  11402. vue.createCommentVNode(" 基本信息区域 "),
  11403. vue.createElementVNode("view", { class: "info-section" }, [
  11404. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  11405. vue.createElementVNode("view", { class: "info-card" }, [
  11406. vue.createVNode(_component_u_cell_group, { border: false }, {
  11407. default: vue.withCtx(() => [
  11408. vue.createVNode(_component_u_cell, {
  11409. title: "姓名",
  11410. value: $setup.userInfo.name || "无"
  11411. }, null, 8, ["value"]),
  11412. vue.createVNode(_component_u_cell, {
  11413. title: "性别",
  11414. value: $setup.userInfo.gender || "无"
  11415. }, null, 8, ["value"]),
  11416. vue.createVNode(_component_u_cell, {
  11417. title: "生日",
  11418. value: $setup.userInfo.birthday || "无"
  11419. }, null, 8, ["value"]),
  11420. vue.createVNode(_component_u_cell, {
  11421. title: "学历",
  11422. value: $setup.userInfo.education || "无"
  11423. }, null, 8, ["value"]),
  11424. vue.createVNode(_component_u_cell, {
  11425. title: "毕业学校",
  11426. value: $setup.userInfo.school || "无",
  11427. border: false
  11428. }, null, 8, ["value"])
  11429. ]),
  11430. _: 1
  11431. /* STABLE */
  11432. })
  11433. ])
  11434. ]),
  11435. vue.createCommentVNode(" 账号信息区域 "),
  11436. vue.createElementVNode("view", { class: "info-section" }, [
  11437. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  11438. vue.createElementVNode("view", { class: "info-card" }, [
  11439. vue.createVNode(_component_u_cell_group, { border: false }, {
  11440. default: vue.withCtx(() => [
  11441. vue.createVNode(_component_u_cell, {
  11442. title: "账号",
  11443. value: $setup.userInfo.account
  11444. }, null, 8, ["value"]),
  11445. vue.createVNode(_component_u_cell, {
  11446. title: "创建日期",
  11447. value: $setup.userInfo.createTime
  11448. }, null, 8, ["value"]),
  11449. vue.createVNode(_component_u_cell, {
  11450. title: "最近登录",
  11451. value: $setup.userInfo.lastLogin || "--",
  11452. border: false
  11453. }, null, 8, ["value"])
  11454. ]),
  11455. _: 1
  11456. /* STABLE */
  11457. })
  11458. ])
  11459. ]),
  11460. vue.createCommentVNode(" 员工资料区域 "),
  11461. vue.createElementVNode("view", { class: "info-section" }, [
  11462. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  11463. vue.createElementVNode("view", { class: "info-card" }, [
  11464. vue.createVNode(_component_u_cell_group, { border: false }, {
  11465. default: vue.withCtx(() => [
  11466. vue.createVNode(_component_u_cell, {
  11467. title: "公司",
  11468. value: $setup.userInfo.company || "无"
  11469. }, null, 8, ["value"]),
  11470. vue.createVNode(_component_u_cell, {
  11471. title: "员工编号",
  11472. value: $setup.userInfo.employeeId || "无"
  11473. }, null, 8, ["value"]),
  11474. vue.createVNode(_component_u_cell, {
  11475. title: "职位",
  11476. value: $setup.userInfo.position || "无",
  11477. border: false
  11478. }, null, 8, ["value"])
  11479. ]),
  11480. _: 1
  11481. /* STABLE */
  11482. })
  11483. ])
  11484. ]),
  11485. vue.createCommentVNode(" 联系方式区域 "),
  11486. vue.createElementVNode("view", { class: "info-section" }, [
  11487. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  11488. vue.createElementVNode("view", { class: "info-card" }, [
  11489. vue.createVNode(_component_u_cell_group, { border: false }, {
  11490. default: vue.withCtx(() => [
  11491. vue.createVNode(_component_u_cell, {
  11492. title: "电话",
  11493. value: $setup.userInfo.phone
  11494. }, null, 8, ["value"]),
  11495. vue.createVNode(_component_u_cell, {
  11496. title: "邮箱",
  11497. value: $setup.userInfo.email || "无"
  11498. }, null, 8, ["value"]),
  11499. vue.createVNode(_component_u_cell, {
  11500. title: "住址",
  11501. value: $setup.userInfo.address || "无",
  11502. border: false
  11503. }, null, 8, ["value"])
  11504. ]),
  11505. _: 1
  11506. /* STABLE */
  11507. })
  11508. ])
  11509. ])
  11510. ]);
  11511. }
  11512. const PagesMyPageUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-804eca28"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/user-info.vue"]]);
  11513. const props$5 = {
  11514. props: {
  11515. // 是否展示工具条
  11516. show: {
  11517. type: Boolean,
  11518. default: props$p.toolbar.show
  11519. },
  11520. // 取消按钮的文字
  11521. cancelText: {
  11522. type: String,
  11523. default: props$p.toolbar.cancelText
  11524. },
  11525. // 确认按钮的文字
  11526. confirmText: {
  11527. type: String,
  11528. default: props$p.toolbar.confirmText
  11529. },
  11530. // 取消按钮的颜色
  11531. cancelColor: {
  11532. type: String,
  11533. default: props$p.toolbar.cancelColor
  11534. },
  11535. // 确认按钮的颜色
  11536. confirmColor: {
  11537. type: String,
  11538. default: props$p.toolbar.confirmColor
  11539. },
  11540. // 标题文字
  11541. title: {
  11542. type: String,
  11543. default: props$p.toolbar.title
  11544. }
  11545. }
  11546. };
  11547. const _sfc_main$l = {
  11548. name: "u-toolbar",
  11549. mixins: [mpMixin, mixin, props$5],
  11550. methods: {
  11551. // 点击取消按钮
  11552. cancel() {
  11553. this.$emit("cancel");
  11554. },
  11555. // 点击确定按钮
  11556. confirm() {
  11557. this.$emit("confirm");
  11558. }
  11559. }
  11560. };
  11561. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  11562. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  11563. "view",
  11564. {
  11565. key: 0,
  11566. class: "u-toolbar",
  11567. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  11568. },
  11569. [
  11570. vue.createElementVNode("view", {
  11571. class: "u-toolbar__cancel__wrapper",
  11572. "hover-class": "u-hover-class"
  11573. }, [
  11574. vue.createElementVNode(
  11575. "text",
  11576. {
  11577. class: "u-toolbar__wrapper__cancel",
  11578. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  11579. style: vue.normalizeStyle({
  11580. color: _ctx.cancelColor
  11581. })
  11582. },
  11583. vue.toDisplayString(_ctx.cancelText),
  11584. 5
  11585. /* TEXT, STYLE */
  11586. )
  11587. ]),
  11588. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  11589. "text",
  11590. {
  11591. key: 0,
  11592. class: "u-toolbar__title u-line-1"
  11593. },
  11594. vue.toDisplayString(_ctx.title),
  11595. 1
  11596. /* TEXT */
  11597. )) : vue.createCommentVNode("v-if", true),
  11598. vue.createElementVNode("view", {
  11599. class: "u-toolbar__confirm__wrapper",
  11600. "hover-class": "u-hover-class"
  11601. }, [
  11602. vue.createElementVNode(
  11603. "text",
  11604. {
  11605. class: "u-toolbar__wrapper__confirm",
  11606. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  11607. style: vue.normalizeStyle({
  11608. color: _ctx.confirmColor
  11609. })
  11610. },
  11611. vue.toDisplayString(_ctx.confirmText),
  11612. 5
  11613. /* TEXT, STYLE */
  11614. )
  11615. ])
  11616. ],
  11617. 32
  11618. /* NEED_HYDRATION */
  11619. )) : vue.createCommentVNode("v-if", true);
  11620. }
  11621. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  11622. const props$4 = {
  11623. props: {
  11624. // 是否展示picker弹窗
  11625. show: {
  11626. type: Boolean,
  11627. default: props$p.picker.show
  11628. },
  11629. // 是否展示顶部的操作栏
  11630. showToolbar: {
  11631. type: Boolean,
  11632. default: props$p.picker.showToolbar
  11633. },
  11634. // 顶部标题
  11635. title: {
  11636. type: String,
  11637. default: props$p.picker.title
  11638. },
  11639. // 对象数组,设置每一列的数据
  11640. columns: {
  11641. type: Array,
  11642. default: props$p.picker.columns
  11643. },
  11644. // 是否显示加载中状态
  11645. loading: {
  11646. type: Boolean,
  11647. default: props$p.picker.loading
  11648. },
  11649. // 各列中,单个选项的高度
  11650. itemHeight: {
  11651. type: [String, Number],
  11652. default: props$p.picker.itemHeight
  11653. },
  11654. // 取消按钮的文字
  11655. cancelText: {
  11656. type: String,
  11657. default: props$p.picker.cancelText
  11658. },
  11659. // 确认按钮的文字
  11660. confirmText: {
  11661. type: String,
  11662. default: props$p.picker.confirmText
  11663. },
  11664. // 取消按钮的颜色
  11665. cancelColor: {
  11666. type: String,
  11667. default: props$p.picker.cancelColor
  11668. },
  11669. // 确认按钮的颜色
  11670. confirmColor: {
  11671. type: String,
  11672. default: props$p.picker.confirmColor
  11673. },
  11674. // 每列中可见选项的数量
  11675. visibleItemCount: {
  11676. type: [String, Number],
  11677. default: props$p.picker.visibleItemCount
  11678. },
  11679. // 选项对象中,需要展示的属性键名
  11680. keyName: {
  11681. type: String,
  11682. default: props$p.picker.keyName
  11683. },
  11684. // 是否允许点击遮罩关闭选择器
  11685. closeOnClickOverlay: {
  11686. type: Boolean,
  11687. default: props$p.picker.closeOnClickOverlay
  11688. },
  11689. // 各列的默认索引
  11690. defaultIndex: {
  11691. type: Array,
  11692. default: props$p.picker.defaultIndex
  11693. },
  11694. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  11695. immediateChange: {
  11696. type: Boolean,
  11697. default: props$p.picker.immediateChange
  11698. }
  11699. }
  11700. };
  11701. const _sfc_main$k = {
  11702. name: "u-picker",
  11703. mixins: [mpMixin, mixin, props$4],
  11704. data() {
  11705. return {
  11706. // 上一次选择的列索引
  11707. lastIndex: [],
  11708. // 索引值 ,对应picker-view的value
  11709. innerIndex: [],
  11710. // 各列的值
  11711. innerColumns: [],
  11712. // 上一次的变化列索引
  11713. columnIndex: 0
  11714. };
  11715. },
  11716. watch: {
  11717. // 监听默认索引的变化,重新设置对应的值
  11718. defaultIndex: {
  11719. immediate: true,
  11720. handler(n) {
  11721. this.setIndexs(n, true);
  11722. }
  11723. },
  11724. // 监听columns参数的变化
  11725. columns: {
  11726. immediate: true,
  11727. deep: true,
  11728. handler(n) {
  11729. this.setColumns(n);
  11730. }
  11731. }
  11732. },
  11733. emits: ["close", "cancel", "confirm", "change"],
  11734. methods: {
  11735. // 获取item需要显示的文字,判别为对象还是文本
  11736. getItemText(item) {
  11737. if (uni.$u.test.object(item)) {
  11738. return item[this.keyName];
  11739. } else {
  11740. return item;
  11741. }
  11742. },
  11743. // 关闭选择器
  11744. closeHandler() {
  11745. if (this.closeOnClickOverlay) {
  11746. this.$emit("close");
  11747. }
  11748. },
  11749. // 点击工具栏的取消按钮
  11750. cancel() {
  11751. this.$emit("cancel");
  11752. },
  11753. // 点击工具栏的确定按钮
  11754. confirm() {
  11755. this.$emit("confirm", {
  11756. indexs: this.innerIndex,
  11757. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  11758. values: this.innerColumns
  11759. });
  11760. },
  11761. // 选择器某一列的数据发生变化时触发
  11762. changeHandler(e) {
  11763. const {
  11764. value: value2
  11765. } = e.detail;
  11766. let index2 = 0, columnIndex = 0;
  11767. for (let i = 0; i < value2.length; i++) {
  11768. let item = value2[i];
  11769. if (item !== (this.lastIndex[i] || 0)) {
  11770. columnIndex = i;
  11771. index2 = item;
  11772. break;
  11773. }
  11774. }
  11775. this.columnIndex = columnIndex;
  11776. const values = this.innerColumns;
  11777. this.setLastIndex(value2);
  11778. this.setIndexs(value2);
  11779. this.$emit("change", {
  11780. // 微信小程序不能传递this,会因为循环引用而报错
  11781. picker: this,
  11782. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  11783. index: index2,
  11784. indexs: value2,
  11785. // values为当前变化列的数组内容
  11786. values,
  11787. columnIndex
  11788. });
  11789. },
  11790. // 设置index索引,此方法可被外部调用设置
  11791. setIndexs(index2, setLastIndex) {
  11792. this.innerIndex = uni.$u.deepClone(index2);
  11793. if (setLastIndex) {
  11794. this.setLastIndex(index2);
  11795. }
  11796. },
  11797. // 记录上一次的各列索引位置
  11798. setLastIndex(index2) {
  11799. this.lastIndex = uni.$u.deepClone(index2);
  11800. },
  11801. // 设置对应列选项的所有值
  11802. setColumnValues(columnIndex, values) {
  11803. this.innerColumns.splice(columnIndex, 1, values);
  11804. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  11805. for (let i = 0; i < this.innerColumns.length; i++) {
  11806. if (i > this.columnIndex) {
  11807. tmpIndex[i] = 0;
  11808. }
  11809. }
  11810. this.setIndexs(tmpIndex);
  11811. },
  11812. // 获取对应列的所有选项
  11813. getColumnValues(columnIndex) {
  11814. (async () => {
  11815. await uni.$u.sleep();
  11816. })();
  11817. return this.innerColumns[columnIndex];
  11818. },
  11819. // 设置整体各列的columns的值
  11820. setColumns(columns) {
  11821. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  11822. this.innerColumns = uni.$u.deepClone(columns);
  11823. if (this.innerIndex.length === 0) {
  11824. this.innerIndex = new Array(columns.length).fill(0);
  11825. }
  11826. },
  11827. // 获取各列选中值对应的索引
  11828. getIndexs() {
  11829. return this.innerIndex;
  11830. },
  11831. // 获取各列选中的值
  11832. getValues() {
  11833. (async () => {
  11834. await uni.$u.sleep();
  11835. })();
  11836. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  11837. }
  11838. }
  11839. };
  11840. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  11841. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$1);
  11842. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$3);
  11843. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$1);
  11844. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11845. show: _ctx.show,
  11846. onClose: $options.closeHandler
  11847. }, {
  11848. default: vue.withCtx(() => [
  11849. vue.createElementVNode("view", { class: "u-picker" }, [
  11850. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  11851. key: 0,
  11852. cancelColor: _ctx.cancelColor,
  11853. confirmColor: _ctx.confirmColor,
  11854. cancelText: _ctx.cancelText,
  11855. confirmText: _ctx.confirmText,
  11856. title: _ctx.title,
  11857. onCancel: $options.cancel,
  11858. onConfirm: $options.confirm
  11859. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  11860. vue.createElementVNode("picker-view", {
  11861. class: "u-picker__view",
  11862. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  11863. value: $data.innerIndex,
  11864. immediateChange: _ctx.immediateChange,
  11865. style: vue.normalizeStyle({
  11866. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  11867. }),
  11868. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  11869. }, [
  11870. (vue.openBlock(true), vue.createElementBlock(
  11871. vue.Fragment,
  11872. null,
  11873. vue.renderList($data.innerColumns, (item, index2) => {
  11874. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  11875. key: index2,
  11876. class: "u-picker__view__column"
  11877. }, [
  11878. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  11879. vue.Fragment,
  11880. { key: 0 },
  11881. vue.renderList(item, (item1, index1) => {
  11882. return vue.openBlock(), vue.createElementBlock(
  11883. "text",
  11884. {
  11885. class: "u-picker__view__column__item u-line-1",
  11886. key: index1,
  11887. style: vue.normalizeStyle({
  11888. height: _ctx.$u.addUnit(_ctx.itemHeight),
  11889. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  11890. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  11891. })
  11892. },
  11893. vue.toDisplayString($options.getItemText(item1)),
  11894. 5
  11895. /* TEXT, STYLE */
  11896. );
  11897. }),
  11898. 128
  11899. /* KEYED_FRAGMENT */
  11900. )) : vue.createCommentVNode("v-if", true)
  11901. ]);
  11902. }),
  11903. 128
  11904. /* KEYED_FRAGMENT */
  11905. ))
  11906. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  11907. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  11908. key: 1,
  11909. class: "u-picker--loading"
  11910. }, [
  11911. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  11912. ])) : vue.createCommentVNode("v-if", true)
  11913. ])
  11914. ]),
  11915. _: 1
  11916. /* STABLE */
  11917. }, 8, ["show", "onClose"]);
  11918. }
  11919. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-91b05052"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  11920. const _sfc_main$j = {
  11921. __name: "warehouse",
  11922. emits: ["change"],
  11923. setup(__props, { expose: __expose, emit: __emit }) {
  11924. __expose();
  11925. const showPicker = vue.ref(false);
  11926. const selectedWarehouse = vue.ref("");
  11927. const warehouseList = vue.ref([
  11928. {
  11929. text: "北京仓库",
  11930. value: "1"
  11931. },
  11932. {
  11933. text: "上海仓库",
  11934. value: "2"
  11935. },
  11936. {
  11937. text: "广州仓库",
  11938. value: "3"
  11939. },
  11940. {
  11941. text: "深圳仓库",
  11942. value: "4"
  11943. }
  11944. ]);
  11945. const onConfirm = (e) => {
  11946. const [{
  11947. value: value2,
  11948. text
  11949. }] = e.value;
  11950. selectedWarehouse.value = text;
  11951. showPicker.value = false;
  11952. emit("change", value2);
  11953. };
  11954. const emit = __emit;
  11955. const __returned__ = { showPicker, selectedWarehouse, warehouseList, onConfirm, emit, ref: vue.ref };
  11956. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11957. return __returned__;
  11958. }
  11959. };
  11960. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  11961. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  11962. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1);
  11963. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  11964. vue.createElementVNode("view", {
  11965. class: "select-wrap",
  11966. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  11967. }, [
  11968. vue.createElementVNode("text", { class: "required-label" }, "*"),
  11969. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  11970. vue.createElementVNode("view", { class: "picker-value" }, [
  11971. vue.createElementVNode(
  11972. "text",
  11973. {
  11974. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  11975. },
  11976. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  11977. 3
  11978. /* TEXT, CLASS */
  11979. ),
  11980. vue.createVNode(_component_u_icon, {
  11981. name: "arrow-right",
  11982. color: "#999",
  11983. size: "16"
  11984. })
  11985. ])
  11986. ]),
  11987. vue.createCommentVNode(" 仓库选择器 "),
  11988. vue.createVNode(_component_u_picker, {
  11989. show: $setup.showPicker,
  11990. columns: [$setup.warehouseList],
  11991. onConfirm: $setup.onConfirm,
  11992. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  11993. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  11994. title: "选择仓库",
  11995. confirmText: "确定",
  11996. cancelText: "取消"
  11997. }, null, 8, ["show", "columns"])
  11998. ]);
  11999. }
  12000. const PagesMyPageWarehouse = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-972eecda"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/warehouse.vue"]]);
  12001. const props$3 = {
  12002. props: {
  12003. // 标签类型info、primary、success、warning、error
  12004. type: {
  12005. type: String,
  12006. default: props$p.tag.type
  12007. },
  12008. // 不可用
  12009. disabled: {
  12010. type: [Boolean, String],
  12011. default: props$p.tag.disabled
  12012. },
  12013. // 标签的大小,large,medium,mini
  12014. size: {
  12015. type: String,
  12016. default: props$p.tag.size
  12017. },
  12018. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  12019. shape: {
  12020. type: String,
  12021. default: props$p.tag.shape
  12022. },
  12023. // 标签文字
  12024. text: {
  12025. type: [String, Number],
  12026. default: props$p.tag.text
  12027. },
  12028. // 背景颜色,默认为空字符串,即不处理
  12029. bgColor: {
  12030. type: String,
  12031. default: props$p.tag.bgColor
  12032. },
  12033. // 标签字体颜色,默认为空字符串,即不处理
  12034. color: {
  12035. type: String,
  12036. default: props$p.tag.color
  12037. },
  12038. // 标签的边框颜色
  12039. borderColor: {
  12040. type: String,
  12041. default: props$p.tag.borderColor
  12042. },
  12043. // 关闭按钮图标的颜色
  12044. closeColor: {
  12045. type: String,
  12046. default: props$p.tag.closeColor
  12047. },
  12048. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  12049. name: {
  12050. type: [String, Number],
  12051. default: props$p.tag.name
  12052. },
  12053. // // 模式选择,dark|light|plain
  12054. // mode: {
  12055. // type: String,
  12056. // default: 'light'
  12057. // },
  12058. // 镂空时是否填充背景色
  12059. plainFill: {
  12060. type: Boolean,
  12061. default: props$p.tag.plainFill
  12062. },
  12063. // 是否镂空
  12064. plain: {
  12065. type: Boolean,
  12066. default: props$p.tag.plain
  12067. },
  12068. // 是否可关闭
  12069. closable: {
  12070. type: Boolean,
  12071. default: props$p.tag.closable
  12072. },
  12073. // 是否显示
  12074. show: {
  12075. type: Boolean,
  12076. default: props$p.tag.show
  12077. },
  12078. // 内置图标,或绝对路径的图片
  12079. icon: {
  12080. type: String,
  12081. default: props$p.tag.icon
  12082. }
  12083. }
  12084. };
  12085. const _sfc_main$i = {
  12086. name: "u-tag",
  12087. mixins: [mpMixin, mixin, props$3],
  12088. data() {
  12089. return {};
  12090. },
  12091. computed: {
  12092. style() {
  12093. const style = {};
  12094. if (this.bgColor) {
  12095. style.backgroundColor = this.bgColor;
  12096. }
  12097. if (this.color) {
  12098. style.color = this.color;
  12099. }
  12100. if (this.borderColor) {
  12101. style.borderColor = this.borderColor;
  12102. }
  12103. return style;
  12104. },
  12105. // nvue下,文本颜色无法继承父元素
  12106. textColor() {
  12107. const style = {};
  12108. if (this.color) {
  12109. style.color = this.color;
  12110. }
  12111. return style;
  12112. },
  12113. imgStyle() {
  12114. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  12115. return {
  12116. width,
  12117. height: width
  12118. };
  12119. },
  12120. // 文本的样式
  12121. closeSize() {
  12122. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  12123. return size;
  12124. },
  12125. // 图标大小
  12126. iconSize() {
  12127. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  12128. return size;
  12129. },
  12130. // 图标颜色
  12131. elIconColor() {
  12132. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  12133. }
  12134. },
  12135. methods: {
  12136. // 点击关闭按钮
  12137. closeHandler() {
  12138. this.$emit("close", this.name);
  12139. },
  12140. // 点击标签
  12141. clickHandler() {
  12142. this.$emit("click", this.name);
  12143. }
  12144. }
  12145. };
  12146. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  12147. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  12148. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$2);
  12149. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  12150. mode: "fade",
  12151. show: _ctx.show,
  12152. style: { "display": "inline-flex" }
  12153. }, {
  12154. default: vue.withCtx(() => [
  12155. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  12156. vue.createElementVNode(
  12157. "view",
  12158. {
  12159. 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`]]),
  12160. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  12161. style: vue.normalizeStyle([{
  12162. marginRight: _ctx.closable ? "10px" : 0,
  12163. marginTop: _ctx.closable ? "10px" : 0
  12164. }, $options.style])
  12165. },
  12166. [
  12167. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  12168. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  12169. key: 0,
  12170. class: "u-tag__icon"
  12171. }, [
  12172. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  12173. key: 0,
  12174. src: _ctx.icon,
  12175. style: vue.normalizeStyle([$options.imgStyle])
  12176. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  12177. key: 1,
  12178. color: $options.elIconColor,
  12179. name: _ctx.icon,
  12180. size: $options.iconSize
  12181. }, null, 8, ["color", "name", "size"]))
  12182. ])) : vue.createCommentVNode("v-if", true)
  12183. ], true),
  12184. vue.createElementVNode(
  12185. "text",
  12186. {
  12187. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  12188. style: vue.normalizeStyle([$options.textColor])
  12189. },
  12190. vue.toDisplayString(_ctx.text),
  12191. 7
  12192. /* TEXT, CLASS, STYLE */
  12193. )
  12194. ],
  12195. 6
  12196. /* CLASS, STYLE */
  12197. ),
  12198. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  12199. "view",
  12200. {
  12201. key: 0,
  12202. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  12203. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  12204. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  12205. },
  12206. [
  12207. vue.createVNode(_component_u_icon, {
  12208. name: "close",
  12209. size: $options.closeSize,
  12210. color: "#ffffff"
  12211. }, null, 8, ["size"])
  12212. ],
  12213. 6
  12214. /* CLASS, STYLE */
  12215. )) : vue.createCommentVNode("v-if", true)
  12216. ])
  12217. ]),
  12218. _: 3
  12219. /* FORWARDED */
  12220. }, 8, ["show"]);
  12221. }
  12222. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  12223. const _sfc_main$h = {
  12224. __name: "school",
  12225. setup(__props, { expose: __expose }) {
  12226. __expose();
  12227. const schoolName = vue.ref("");
  12228. const schoolList = vue.ref([{
  12229. name: "河南大学"
  12230. }, {
  12231. name: "清华大学"
  12232. }, {
  12233. name: "北京大学"
  12234. }]);
  12235. const handleAddSchool = () => {
  12236. if (!schoolName.value.trim()) {
  12237. uni.$u.toast("请输入学校名称");
  12238. return;
  12239. }
  12240. schoolList.value.push({
  12241. name: schoolName.value
  12242. });
  12243. schoolName.value = "";
  12244. };
  12245. const handleRemoveSchool = (index2) => {
  12246. schoolList.value.splice(index2, 1);
  12247. };
  12248. const handleSubmit = () => {
  12249. if (schoolList.value.length === 0) {
  12250. uni.$u.toast("请至少添加一所学校");
  12251. return;
  12252. }
  12253. formatAppLog("log", "at pages/my/page/school.vue:73", "提交的学校列表:", schoolList.value);
  12254. };
  12255. const __returned__ = { schoolName, schoolList, handleAddSchool, handleRemoveSchool, handleSubmit, ref: vue.ref };
  12256. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12257. return __returned__;
  12258. }
  12259. };
  12260. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  12261. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  12262. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$3);
  12263. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2);
  12264. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  12265. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  12266. vue.createCommentVNode(" 输入区域 "),
  12267. vue.createElementVNode("view", { class: "input-section" }, [
  12268. vue.createElementVNode("view", { class: "input-header" }, [
  12269. vue.createElementVNode("text", { class: "required" }, "*"),
  12270. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  12271. vue.createVNode(_component_u_input, {
  12272. modelValue: $setup.schoolName,
  12273. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  12274. placeholder: "请输入一个学校名称",
  12275. border: "false",
  12276. class: "input"
  12277. }, {
  12278. suffix: vue.withCtx(() => [
  12279. vue.createVNode(_component_u_icon, {
  12280. name: "plus",
  12281. size: "24",
  12282. color: "#666",
  12283. onClick: $setup.handleAddSchool
  12284. })
  12285. ]),
  12286. _: 1
  12287. /* STABLE */
  12288. }, 8, ["modelValue"])
  12289. ])
  12290. ]),
  12291. vue.createCommentVNode(" 学校列表 "),
  12292. vue.createElementVNode("view", { class: "school-list" }, [
  12293. (vue.openBlock(true), vue.createElementBlock(
  12294. vue.Fragment,
  12295. null,
  12296. vue.renderList($setup.schoolList, (item, index2) => {
  12297. return vue.openBlock(), vue.createElementBlock("view", {
  12298. class: "school-item",
  12299. key: index2
  12300. }, [
  12301. vue.createVNode(_component_u_tag, {
  12302. text: item.name,
  12303. closable: ""
  12304. }, null, 8, ["text"])
  12305. ]);
  12306. }),
  12307. 128
  12308. /* KEYED_FRAGMENT */
  12309. ))
  12310. ]),
  12311. vue.createCommentVNode(" 底部提交按钮 "),
  12312. vue.createElementVNode("view", { class: "submit-btn" }, [
  12313. vue.createVNode(_component_u_button, {
  12314. type: "success",
  12315. block: "",
  12316. onClick: $setup.handleSubmit
  12317. }, {
  12318. default: vue.withCtx(() => [
  12319. vue.createTextVNode("提交")
  12320. ]),
  12321. _: 1
  12322. /* STABLE */
  12323. })
  12324. ])
  12325. ]);
  12326. }
  12327. 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"]]);
  12328. const _sfc_main$g = {
  12329. __name: "orderItem",
  12330. setup(__props, { expose: __expose }) {
  12331. __expose();
  12332. const orderId = vue.ref("66478425");
  12333. const trackingId = vue.ref("DPK202356410215");
  12334. const estimatedAmount = vue.ref("66.6");
  12335. const auditAmount = vue.ref("待核");
  12336. const internalNote = vue.ref("已反馈");
  12337. const statusColor = vue.ref("#FF4D4F");
  12338. const copyToClipboard = (text) => {
  12339. uni.setClipboardData({
  12340. data: text,
  12341. success: () => {
  12342. uni.showToast({
  12343. title: "复制成功",
  12344. icon: "success"
  12345. });
  12346. }
  12347. });
  12348. };
  12349. const handleAudit = () => {
  12350. formatAppLog("log", "at pages/my/components/orderItem.vue:76", "到货审核");
  12351. };
  12352. const handleView = () => {
  12353. formatAppLog("log", "at pages/my/components/orderItem.vue:82", "查看");
  12354. };
  12355. const __returned__ = { orderId, trackingId, estimatedAmount, auditAmount, internalNote, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref };
  12356. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12357. return __returned__;
  12358. }
  12359. };
  12360. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  12361. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  12362. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  12363. vue.createCommentVNode(" 用户信息 "),
  12364. vue.createElementVNode("view", { class: "user-info" }, [
  12365. vue.createElementVNode("image", {
  12366. class: "avatar",
  12367. src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png",
  12368. mode: "aspectFill"
  12369. }),
  12370. vue.createElementVNode("view", { class: "user-details" }, [
  12371. vue.createElementVNode("text", { class: "username" }, "微信用户(南**)"),
  12372. vue.createElementVNode("text", { class: "date" }, "共卖出7本书"),
  12373. vue.createElementVNode("text", { class: "date" }, "来自河南省郑州市中牟县")
  12374. ]),
  12375. vue.createElementVNode("view", { class: "user-details right-items" }, [
  12376. vue.createElementVNode("text", { class: "date" }, "2024-06-01 17:00:00"),
  12377. vue.createElementVNode(
  12378. "text",
  12379. {
  12380. class: "status",
  12381. style: vue.normalizeStyle({ color: $setup.statusColor })
  12382. },
  12383. "[待收货审核]",
  12384. 4
  12385. /* STYLE */
  12386. )
  12387. ])
  12388. ]),
  12389. vue.createCommentVNode(" 订单信息 "),
  12390. vue.createElementVNode("view", { class: "order-info" }),
  12391. vue.createCommentVNode(" 订单详情 "),
  12392. vue.createElementVNode("view", { class: "order-details" }, [
  12393. vue.createElementVNode("view", { class: "detail-row" }, [
  12394. vue.createElementVNode("text", null, "订单ID:"),
  12395. vue.createElementVNode(
  12396. "text",
  12397. {
  12398. class: "link",
  12399. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($setup.orderId))
  12400. },
  12401. vue.toDisplayString($setup.orderId),
  12402. 1
  12403. /* TEXT */
  12404. ),
  12405. vue.createElementVNode("text", null, "运单号:"),
  12406. vue.createElementVNode(
  12407. "text",
  12408. {
  12409. class: "link",
  12410. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($setup.trackingId))
  12411. },
  12412. vue.toDisplayString($setup.trackingId),
  12413. 1
  12414. /* TEXT */
  12415. )
  12416. ]),
  12417. vue.createElementVNode("view", { class: "detail-row" }, [
  12418. vue.createElementVNode(
  12419. "text",
  12420. null,
  12421. "预估金额:" + vue.toDisplayString($setup.estimatedAmount),
  12422. 1
  12423. /* TEXT */
  12424. ),
  12425. vue.createElementVNode(
  12426. "text",
  12427. null,
  12428. "审核金额:" + vue.toDisplayString($setup.auditAmount),
  12429. 1
  12430. /* TEXT */
  12431. )
  12432. ]),
  12433. vue.createElementVNode("view", { class: "detail-row" }, [
  12434. vue.createElementVNode(
  12435. "text",
  12436. null,
  12437. "内部备注:" + vue.toDisplayString($setup.internalNote),
  12438. 1
  12439. /* TEXT */
  12440. )
  12441. ])
  12442. ]),
  12443. vue.createCommentVNode(" 操作按钮 "),
  12444. vue.createElementVNode("view", { class: "action-buttons" }, [
  12445. vue.createVNode(_component_u_button, {
  12446. size: "small",
  12447. onClick: $setup.handleAudit
  12448. }, {
  12449. default: vue.withCtx(() => [
  12450. vue.createTextVNode("到货审核")
  12451. ]),
  12452. _: 1
  12453. /* STABLE */
  12454. }),
  12455. vue.createVNode(_component_u_button, {
  12456. size: "small",
  12457. onClick: $setup.handleView
  12458. }, {
  12459. default: vue.withCtx(() => [
  12460. vue.createTextVNode("查看")
  12461. ]),
  12462. _: 1
  12463. /* STABLE */
  12464. })
  12465. ])
  12466. ]);
  12467. }
  12468. 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"]]);
  12469. const _sfc_main$f = {
  12470. __name: "audit-unfinished",
  12471. setup(__props, { expose: __expose }) {
  12472. __expose();
  12473. const __returned__ = { orderItem };
  12474. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12475. return __returned__;
  12476. }
  12477. };
  12478. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  12479. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  12480. vue.createVNode($setup["orderItem"]),
  12481. vue.createVNode($setup["orderItem"]),
  12482. vue.createVNode($setup["orderItem"])
  12483. ]);
  12484. }
  12485. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/audit-unfinished.vue"]]);
  12486. const _sfc_main$e = {
  12487. __name: "version",
  12488. setup(__props, { expose: __expose }) {
  12489. __expose();
  12490. const userInfo = vue.reactive({
  12491. version: "v_2024050400_1",
  12492. // Example version number
  12493. updateStatus: "已经是新版本"
  12494. // Example update status
  12495. });
  12496. function checkForUpdates() {
  12497. setTimeout(() => {
  12498. {
  12499. userInfo.updateStatus = "发现新版本,正在下载...";
  12500. downloadNewVersion();
  12501. }
  12502. }, 1e3);
  12503. }
  12504. function downloadNewVersion() {
  12505. setTimeout(() => {
  12506. userInfo.updateStatus = "下载完成,准备安装";
  12507. }, 2e3);
  12508. }
  12509. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  12510. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12511. return __returned__;
  12512. }
  12513. };
  12514. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  12515. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$5);
  12516. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  12517. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  12518. vue.createVNode(_component_u_cell_group, {
  12519. border: false,
  12520. customStyle: "background:#ffffff"
  12521. }, {
  12522. default: vue.withCtx(() => [
  12523. vue.createVNode(_component_u_cell, {
  12524. title: "当前版本号(正式版)",
  12525. value: $setup.userInfo.version || "无"
  12526. }, null, 8, ["value"]),
  12527. vue.createVNode(_component_u_cell, {
  12528. title: "检测更新",
  12529. value: $setup.userInfo.updateStatus || "无",
  12530. border: false,
  12531. onClick: $setup.checkForUpdates
  12532. }, null, 8, ["value"])
  12533. ]),
  12534. _: 1
  12535. /* STABLE */
  12536. })
  12537. ]);
  12538. }
  12539. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/version.vue"]]);
  12540. const props$2 = {
  12541. props: {
  12542. // 是否为加载中状态
  12543. loading: {
  12544. type: Boolean,
  12545. default: props$p.switch.loading
  12546. },
  12547. // 是否为禁用装填
  12548. disabled: {
  12549. type: Boolean,
  12550. default: props$p.switch.disabled
  12551. },
  12552. // 开关尺寸,单位px
  12553. size: {
  12554. type: [String, Number],
  12555. default: props$p.switch.size
  12556. },
  12557. // 打开时的背景颜色
  12558. activeColor: {
  12559. type: String,
  12560. default: props$p.switch.activeColor
  12561. },
  12562. // 关闭时的背景颜色
  12563. inactiveColor: {
  12564. type: String,
  12565. default: props$p.switch.inactiveColor
  12566. },
  12567. // 通过v-model双向绑定的值
  12568. modelValue: {
  12569. type: [Boolean, String, Number],
  12570. default: props$p.switch.value
  12571. },
  12572. // switch打开时的值
  12573. activeValue: {
  12574. type: [String, Number, Boolean],
  12575. default: props$p.switch.activeValue
  12576. },
  12577. // switch关闭时的值
  12578. inactiveValue: {
  12579. type: [String, Number, Boolean],
  12580. default: props$p.switch.inactiveValue
  12581. },
  12582. // 是否开启异步变更,开启后需要手动控制输入值
  12583. asyncChange: {
  12584. type: Boolean,
  12585. default: props$p.switch.asyncChange
  12586. },
  12587. // 圆点与外边框的距离
  12588. space: {
  12589. type: [String, Number],
  12590. default: props$p.switch.space
  12591. }
  12592. }
  12593. };
  12594. const _sfc_main$d = {
  12595. name: "u-switch",
  12596. mixins: [mpMixin, mixin, props$2],
  12597. watch: {
  12598. modelValue: {
  12599. immediate: true,
  12600. handler(n) {
  12601. if (n !== this.inactiveValue && n !== this.activeValue) {
  12602. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  12603. }
  12604. }
  12605. }
  12606. },
  12607. data() {
  12608. return {
  12609. bgColor: "#ffffff"
  12610. };
  12611. },
  12612. computed: {
  12613. isActive() {
  12614. return this.modelValue === this.activeValue;
  12615. },
  12616. switchStyle() {
  12617. let style = {};
  12618. style.width = uni.$u.addUnit(this.size * 2 + 2);
  12619. style.height = uni.$u.addUnit(Number(this.size) + 2);
  12620. if (this.customInactiveColor) {
  12621. style.borderColor = "rgba(0, 0, 0, 0)";
  12622. }
  12623. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  12624. return style;
  12625. },
  12626. nodeStyle() {
  12627. let style = {};
  12628. style.width = uni.$u.addUnit(this.size - this.space);
  12629. style.height = uni.$u.addUnit(this.size - this.space);
  12630. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  12631. style.transform = `translateX(-${translateX})`;
  12632. return style;
  12633. },
  12634. bgStyle() {
  12635. let style = {};
  12636. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  12637. style.height = uni.$u.addUnit(this.size);
  12638. style.backgroundColor = this.inactiveColor;
  12639. style.transform = `scale(${this.isActive ? 0 : 1})`;
  12640. return style;
  12641. },
  12642. customInactiveColor() {
  12643. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  12644. }
  12645. },
  12646. emits: ["update:modelValue", "change"],
  12647. methods: {
  12648. clickHandler() {
  12649. if (!this.disabled && !this.loading) {
  12650. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  12651. if (!this.asyncChange) {
  12652. this.$emit("update:modelValue", oldValue);
  12653. }
  12654. this.$nextTick(() => {
  12655. this.$emit("change", oldValue);
  12656. });
  12657. }
  12658. }
  12659. }
  12660. };
  12661. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  12662. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$3);
  12663. return vue.openBlock(), vue.createElementBlock(
  12664. "view",
  12665. {
  12666. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  12667. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  12668. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  12669. },
  12670. [
  12671. vue.createElementVNode(
  12672. "view",
  12673. {
  12674. class: "u-switch__bg",
  12675. style: vue.normalizeStyle([$options.bgStyle])
  12676. },
  12677. null,
  12678. 4
  12679. /* STYLE */
  12680. ),
  12681. vue.createElementVNode(
  12682. "view",
  12683. {
  12684. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  12685. style: vue.normalizeStyle([$options.nodeStyle]),
  12686. ref: "u-switch__node"
  12687. },
  12688. [
  12689. vue.createVNode(_component_u_loading_icon, {
  12690. show: _ctx.loading,
  12691. mode: "circle",
  12692. timingFunction: "linear",
  12693. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  12694. size: _ctx.size * 0.6
  12695. }, null, 8, ["show", "color", "size"])
  12696. ],
  12697. 6
  12698. /* CLASS, STYLE */
  12699. )
  12700. ],
  12701. 6
  12702. /* CLASS, STYLE */
  12703. );
  12704. }
  12705. 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"]]);
  12706. const props$1 = {
  12707. props: {
  12708. // 输入框的内容
  12709. value: {
  12710. type: [String, Number],
  12711. default: props$p.textarea.value
  12712. },
  12713. // 输入框的内容
  12714. modelValue: {
  12715. type: [String, Number],
  12716. default: props$p.textarea.value
  12717. },
  12718. // 输入框为空时占位符
  12719. placeholder: {
  12720. type: [String, Number],
  12721. default: props$p.textarea.placeholder
  12722. },
  12723. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  12724. placeholderClass: {
  12725. type: String,
  12726. default: props$p.input.placeholderClass
  12727. },
  12728. // 指定placeholder的样式
  12729. placeholderStyle: {
  12730. type: [String, Object],
  12731. default: props$p.input.placeholderStyle
  12732. },
  12733. // 输入框高度
  12734. height: {
  12735. type: [String, Number],
  12736. default: props$p.textarea.height
  12737. },
  12738. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  12739. confirmType: {
  12740. type: String,
  12741. default: props$p.textarea.confirmType
  12742. },
  12743. // 是否禁用
  12744. disabled: {
  12745. type: Boolean,
  12746. default: props$p.textarea.disabled
  12747. },
  12748. // 是否显示统计字数
  12749. count: {
  12750. type: Boolean,
  12751. default: props$p.textarea.count
  12752. },
  12753. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  12754. focus: {
  12755. type: Boolean,
  12756. default: props$p.textarea.focus
  12757. },
  12758. // 是否自动增加高度
  12759. autoHeight: {
  12760. type: Boolean,
  12761. default: props$p.textarea.autoHeight
  12762. },
  12763. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  12764. fixed: {
  12765. type: Boolean,
  12766. default: props$p.textarea.fixed
  12767. },
  12768. // 指定光标与键盘的距离
  12769. cursorSpacing: {
  12770. type: Number,
  12771. default: props$p.textarea.cursorSpacing
  12772. },
  12773. // 指定focus时的光标位置
  12774. cursor: {
  12775. type: [String, Number],
  12776. default: props$p.textarea.cursor
  12777. },
  12778. // 是否显示键盘上方带有”完成“按钮那一栏,
  12779. showConfirmBar: {
  12780. type: Boolean,
  12781. default: props$p.textarea.showConfirmBar
  12782. },
  12783. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  12784. selectionStart: {
  12785. type: Number,
  12786. default: props$p.textarea.selectionStart
  12787. },
  12788. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  12789. selectionEnd: {
  12790. type: Number,
  12791. default: props$p.textarea.selectionEnd
  12792. },
  12793. // 键盘弹起时,是否自动上推页面
  12794. adjustPosition: {
  12795. type: Boolean,
  12796. default: props$p.textarea.adjustPosition
  12797. },
  12798. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  12799. disableDefaultPadding: {
  12800. type: Boolean,
  12801. default: props$p.textarea.disableDefaultPadding
  12802. },
  12803. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  12804. holdKeyboard: {
  12805. type: Boolean,
  12806. default: props$p.textarea.holdKeyboard
  12807. },
  12808. // 最大输入长度,设置为 -1 的时候不限制最大长度
  12809. maxlength: {
  12810. type: [String, Number],
  12811. default: props$p.textarea.maxlength
  12812. },
  12813. // 边框类型,surround-四周边框,bottom-底部边框
  12814. border: {
  12815. type: String,
  12816. default: props$p.textarea.border
  12817. },
  12818. // 用于处理或者过滤输入框内容的方法
  12819. formatter: {
  12820. type: [Function, null],
  12821. default: props$p.textarea.formatter
  12822. },
  12823. // 是否忽略组件内对文本合成系统事件的处理
  12824. ignoreCompositionEvent: {
  12825. type: Boolean,
  12826. default: true
  12827. }
  12828. }
  12829. };
  12830. const _sfc_main$c = {
  12831. name: "u-textarea",
  12832. mixins: [mpMixin, mixin, props$1],
  12833. data() {
  12834. return {
  12835. // 输入框的值
  12836. innerValue: "",
  12837. // 是否处于获得焦点状态
  12838. focused: false,
  12839. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  12840. firstChange: true,
  12841. // value绑定值的变化是由内部还是外部引起的
  12842. changeFromInner: false,
  12843. // 过滤处理方法
  12844. innerFormatter: (value2) => value2
  12845. };
  12846. },
  12847. created() {
  12848. },
  12849. watch: {
  12850. modelValue: {
  12851. immediate: true,
  12852. handler(newVal, oldVal) {
  12853. this.innerValue = newVal;
  12854. this.firstChange = false;
  12855. this.changeFromInner = false;
  12856. }
  12857. }
  12858. },
  12859. computed: {
  12860. // 组件的类名
  12861. textareaClass() {
  12862. let classes = [], { border, disabled } = this;
  12863. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  12864. border === "bottom" && (classes = classes.concat([
  12865. "u-border-bottom",
  12866. "u-textarea--no-radius"
  12867. ]));
  12868. disabled && classes.push("u-textarea--disabled");
  12869. return classes.join(" ");
  12870. },
  12871. // 组件的样式
  12872. textareaStyle() {
  12873. const style = {};
  12874. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  12875. }
  12876. },
  12877. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  12878. methods: {
  12879. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  12880. setFormatter(e) {
  12881. this.innerFormatter = e;
  12882. },
  12883. onFocus(e) {
  12884. this.$emit("focus", e);
  12885. },
  12886. onBlur(e) {
  12887. this.$emit("blur", e);
  12888. uni.$u.formValidate(this, "blur");
  12889. },
  12890. onLinechange(e) {
  12891. this.$emit("linechange", e);
  12892. },
  12893. onInput(e) {
  12894. let { value: value2 = "" } = e.detail || {};
  12895. const formatter = this.formatter || this.innerFormatter;
  12896. const formatValue = formatter(value2);
  12897. this.innerValue = value2;
  12898. this.$nextTick(() => {
  12899. this.innerValue = formatValue;
  12900. this.valueChange();
  12901. });
  12902. },
  12903. // 内容发生变化,进行处理
  12904. valueChange() {
  12905. const value2 = this.innerValue;
  12906. this.$nextTick(() => {
  12907. this.$emit("update:modelValue", value2);
  12908. this.changeFromInner = true;
  12909. this.$emit("change", value2);
  12910. uni.$u.formValidate(this, "change");
  12911. });
  12912. },
  12913. onConfirm(e) {
  12914. this.$emit("confirm", e);
  12915. },
  12916. onKeyboardheightchange(e) {
  12917. this.$emit("keyboardheightchange", e);
  12918. }
  12919. }
  12920. };
  12921. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  12922. return vue.openBlock(), vue.createElementBlock(
  12923. "view",
  12924. {
  12925. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  12926. style: vue.normalizeStyle([$options.textareaStyle])
  12927. },
  12928. [
  12929. vue.createElementVNode("textarea", {
  12930. class: "u-textarea__field",
  12931. value: $data.innerValue,
  12932. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  12933. placeholder: _ctx.placeholder,
  12934. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  12935. "placeholder-class": _ctx.placeholderClass,
  12936. disabled: _ctx.disabled,
  12937. focus: _ctx.focus,
  12938. autoHeight: _ctx.autoHeight,
  12939. fixed: _ctx.fixed,
  12940. cursorSpacing: _ctx.cursorSpacing,
  12941. cursor: _ctx.cursor,
  12942. showConfirmBar: _ctx.showConfirmBar,
  12943. selectionStart: _ctx.selectionStart,
  12944. selectionEnd: _ctx.selectionEnd,
  12945. adjustPosition: _ctx.adjustPosition,
  12946. disableDefaultPadding: _ctx.disableDefaultPadding,
  12947. holdKeyboard: _ctx.holdKeyboard,
  12948. maxlength: _ctx.maxlength,
  12949. "confirm-type": _ctx.confirmType,
  12950. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  12951. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  12952. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  12953. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  12954. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  12955. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  12956. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  12957. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  12958. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  12959. "text",
  12960. {
  12961. key: 0,
  12962. class: "u-textarea__count",
  12963. style: vue.normalizeStyle({
  12964. "background-color": _ctx.disabled ? "transparent" : "#fff"
  12965. })
  12966. },
  12967. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  12968. 5
  12969. /* TEXT, STYLE */
  12970. )) : vue.createCommentVNode("v-if", true)
  12971. ],
  12972. 6
  12973. /* CLASS, STYLE */
  12974. );
  12975. }
  12976. 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"]]);
  12977. const props = {
  12978. props: {
  12979. // 最小可选值
  12980. min: {
  12981. type: [Number, String],
  12982. default: props$p.slider.min
  12983. },
  12984. // 最大可选值
  12985. max: {
  12986. type: [Number, String],
  12987. default: props$p.slider.max
  12988. },
  12989. // 步长,取值必须大于 0,并且可被(max - min)整除
  12990. step: {
  12991. type: [Number, String],
  12992. default: props$p.slider.step
  12993. },
  12994. // 当前取值
  12995. value: {
  12996. type: [Number, String],
  12997. default: props$p.slider.value
  12998. },
  12999. // 滑块右侧已选择部分的背景色
  13000. activeColor: {
  13001. type: String,
  13002. default: props$p.slider.activeColor
  13003. },
  13004. // 滑块左侧未选择部分的背景色
  13005. inactiveColor: {
  13006. type: String,
  13007. default: props$p.slider.inactiveColor
  13008. },
  13009. // 滑块的大小,取值范围为 12 - 28
  13010. blockSize: {
  13011. type: [Number, String],
  13012. default: props$p.slider.blockSize
  13013. },
  13014. // 滑块的颜色
  13015. blockColor: {
  13016. type: String,
  13017. default: props$p.slider.blockColor
  13018. },
  13019. // 禁用状态
  13020. disabled: {
  13021. type: Boolean,
  13022. default: props$p.slider.disabled
  13023. },
  13024. // 是否显示当前的选择值
  13025. showValue: {
  13026. type: Boolean,
  13027. default: props$p.slider.showValue
  13028. }
  13029. }
  13030. };
  13031. const _sfc_main$b = {
  13032. name: "u--slider",
  13033. mixins: [mpMixin, mixin, props],
  13034. methods: {
  13035. // 拖动过程中触发
  13036. changingHandler(e) {
  13037. const {
  13038. value: value2
  13039. } = e.detail;
  13040. this.$emit("input", value2);
  13041. this.$emit("changing", value2);
  13042. },
  13043. // 滑动结束时触发
  13044. changeHandler(e) {
  13045. const {
  13046. value: value2
  13047. } = e.detail;
  13048. this.$emit("input", value2);
  13049. this.$emit("change", value2);
  13050. }
  13051. }
  13052. };
  13053. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  13054. return vue.openBlock(), vue.createElementBlock(
  13055. "view",
  13056. {
  13057. class: "u-slider",
  13058. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  13059. },
  13060. [
  13061. vue.createElementVNode("slider", {
  13062. min: _ctx.min,
  13063. max: _ctx.max,
  13064. step: _ctx.step,
  13065. value: _ctx.value,
  13066. activeColor: _ctx.activeColor,
  13067. inactiveColor: _ctx.inactiveColor,
  13068. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  13069. blockColor: _ctx.blockColor,
  13070. showValue: _ctx.showValue,
  13071. disabled: _ctx.disabled,
  13072. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  13073. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  13074. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  13075. ],
  13076. 4
  13077. /* STYLE */
  13078. );
  13079. }
  13080. 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"]]);
  13081. const _sfc_main$a = {
  13082. __name: "volume",
  13083. setup(__props, { expose: __expose }) {
  13084. __expose();
  13085. let innerAudioContext = null;
  13086. const settings = vue.reactive({
  13087. voiceBroadcast: true,
  13088. clickSound: true,
  13089. startupPrompt: true,
  13090. startupText: "书嗨,不辜负每一个爱书的人",
  13091. speechRate: 10,
  13092. pitch: 10
  13093. });
  13094. async function checkAndRequestPermissions() {
  13095. try {
  13096. const status = await requestPermissions();
  13097. if (!status) {
  13098. uni.showModal({
  13099. title: "提示",
  13100. content: "请在系统设置中允许应用访问麦克风等权限,以便使用语音功能",
  13101. confirmText: "去设置",
  13102. success: (res) => {
  13103. if (res.confirm) {
  13104. if (uni.getSystemInfoSync().platform === "android") {
  13105. const main = plus.android.runtimeMainActivity();
  13106. const Intent = plus.android.importClass("android.content.Intent");
  13107. const Settings = plus.android.importClass("android.provider.Settings");
  13108. const Uri = plus.android.importClass("android.net.Uri");
  13109. const intent = new Intent();
  13110. intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
  13111. intent.setData(Uri.fromParts("package", main.getPackageName(), null));
  13112. main.startActivity(intent);
  13113. } else {
  13114. const UIApplication = plus.ios.import("UIApplication");
  13115. const NSURL = plus.ios.import("NSURL");
  13116. const setting = NSURL.URLWithString("app-settings:");
  13117. const application = UIApplication.sharedApplication();
  13118. application.openURL(setting);
  13119. }
  13120. }
  13121. }
  13122. });
  13123. return false;
  13124. }
  13125. return true;
  13126. } catch (error2) {
  13127. formatAppLog("error", "at pages/my/page/volume.vue:118", "权限请求失败:", error2);
  13128. return false;
  13129. }
  13130. }
  13131. function requestPermissions() {
  13132. return new Promise((resolve, reject) => {
  13133. plus.android.requestPermissions(
  13134. [
  13135. "android.permission.RECORD_AUDIO",
  13136. "android.permission.MODIFY_AUDIO_SETTINGS",
  13137. "android.permission.WRITE_EXTERNAL_STORAGE",
  13138. "android.permission.READ_EXTERNAL_STORAGE"
  13139. ],
  13140. function(resultObj) {
  13141. if (resultObj.granted.length === 4) {
  13142. resolve(true);
  13143. } else {
  13144. resolve(false);
  13145. }
  13146. },
  13147. function(error2) {
  13148. reject(error2);
  13149. }
  13150. );
  13151. resolve(true);
  13152. });
  13153. }
  13154. async function initTTS() {
  13155. const hasPermission = await checkAndRequestPermissions();
  13156. if (!hasPermission) {
  13157. return;
  13158. }
  13159. if (!uni.createInnerAudioContext) {
  13160. uni.showToast({
  13161. title: "当前设备不支持语音功能",
  13162. icon: "none"
  13163. });
  13164. return;
  13165. }
  13166. try {
  13167. innerAudioContext = uni.createInnerAudioContext();
  13168. innerAudioContext.onError((res) => {
  13169. formatAppLog("error", "at pages/my/page/volume.vue:192", "音频播放错误:", res.errMsg);
  13170. uni.showToast({
  13171. title: "语音播放失败",
  13172. icon: "none"
  13173. });
  13174. });
  13175. } catch (error2) {
  13176. formatAppLog("error", "at pages/my/page/volume.vue:199", "TTS初始化失败:", error2);
  13177. }
  13178. }
  13179. async function textToSpeech(text) {
  13180. const hasPermission = await checkAndRequestPermissions();
  13181. if (!hasPermission) {
  13182. return;
  13183. }
  13184. if (!settings.voiceBroadcast)
  13185. return;
  13186. try {
  13187. const ttsParams = {
  13188. lang: "zh-CN",
  13189. speed: settings.speechRate / 10,
  13190. // 将 0-10 转换为 0-1
  13191. pitch: settings.pitch / 10,
  13192. // 将 0-10 转换为 0-1
  13193. volume: 1,
  13194. text
  13195. };
  13196. const TTSModule = requireNativePlugin("nrb-tts-plugin");
  13197. TTSModule && TTSModule.init({
  13198. "lang": "ZH",
  13199. "country": "CN"
  13200. }, (res) => {
  13201. if (res.success == 0) {
  13202. TTSModule.speak(text, ttsParams, (e) => {
  13203. formatAppLog("log", "at pages/my/page/volume.vue:231", e, "dsadsads");
  13204. });
  13205. }
  13206. });
  13207. } catch (error2) {
  13208. formatAppLog("error", "at pages/my/page/volume.vue:265", "TTS播放错误:", error2);
  13209. uni.showToast({
  13210. title: "语音播放失败",
  13211. icon: "none"
  13212. });
  13213. }
  13214. }
  13215. function saveAndTest() {
  13216. uni.setStorageSync("tts_settings", settings);
  13217. textToSpeech(settings.startupText);
  13218. uni.showToast({
  13219. title: "设置已保存",
  13220. icon: "success"
  13221. });
  13222. }
  13223. function stopPlayback() {
  13224. const TTSModule = requireNativePlugin("nrb-tts-plugin");
  13225. if (TTSModule && TTSModule.stop) {
  13226. TTSModule.stop();
  13227. }
  13228. uni.showToast({
  13229. title: "已停止播放",
  13230. icon: "none"
  13231. });
  13232. }
  13233. function restartApp() {
  13234. uni.showModal({
  13235. title: "提示",
  13236. content: "确定要重启应用吗?",
  13237. success: function(res) {
  13238. if (res.confirm) {
  13239. plus.runtime.restart();
  13240. }
  13241. }
  13242. });
  13243. }
  13244. function loadSettings() {
  13245. try {
  13246. const savedSettings = uni.getStorageSync("tts_settings");
  13247. if (savedSettings) {
  13248. Object.assign(settings, savedSettings);
  13249. }
  13250. } catch (error2) {
  13251. formatAppLog("error", "at pages/my/page/volume.vue:343", "加载设置失败:", error2);
  13252. }
  13253. }
  13254. function playClickSound() {
  13255. if (!settings.clickSound)
  13256. return;
  13257. const audio = uni.createInnerAudioContext();
  13258. audio.src = "/static/audio/click.mp3";
  13259. audio.play();
  13260. }
  13261. vue.onMounted(async () => {
  13262. await initTTS();
  13263. loadSettings();
  13264. });
  13265. const __returned__ = { get innerAudioContext() {
  13266. return innerAudioContext;
  13267. }, set innerAudioContext(v) {
  13268. innerAudioContext = v;
  13269. }, settings, checkAndRequestPermissions, requestPermissions, initTTS, textToSpeech, saveAndTest, stopPlayback, restartApp, loadSettings, playClickSound, reactive: vue.reactive, onMounted: vue.onMounted };
  13270. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13271. return __returned__;
  13272. }
  13273. };
  13274. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  13275. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  13276. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$5);
  13277. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  13278. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3);
  13279. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  13280. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  13281. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  13282. vue.createCommentVNode(" 设置选项组 "),
  13283. vue.createElementVNode("view", { class: "settings-section" }, [
  13284. vue.createVNode(_component_u_cell_group, { border: false }, {
  13285. default: vue.withCtx(() => [
  13286. vue.createCommentVNode(" 语音播报设置 "),
  13287. vue.createVNode(_component_u_cell, {
  13288. title: "语音播报",
  13289. label: "控制除app启动提示外所有语音播报的开关",
  13290. "border-bottom": true
  13291. }, {
  13292. "right-icon": vue.withCtx(() => [
  13293. vue.createVNode(_component_u_switch, {
  13294. modelValue: $setup.settings.voiceBroadcast,
  13295. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.voiceBroadcast = $event),
  13296. activeColor: "#4cd964"
  13297. }, null, 8, ["modelValue"])
  13298. ]),
  13299. _: 1
  13300. /* STABLE */
  13301. }),
  13302. vue.createCommentVNode(" 点击音效设置 "),
  13303. vue.createVNode(_component_u_cell, {
  13304. title: "点击音效",
  13305. "border-bottom": true
  13306. }, {
  13307. "right-icon": vue.withCtx(() => [
  13308. vue.createVNode(_component_u_switch, {
  13309. modelValue: $setup.settings.clickSound,
  13310. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.clickSound = $event),
  13311. activeColor: "#4cd964"
  13312. }, null, 8, ["modelValue"])
  13313. ]),
  13314. _: 1
  13315. /* STABLE */
  13316. }),
  13317. vue.createCommentVNode(" 启动提示语设置 "),
  13318. vue.createVNode(_component_u_cell, {
  13319. title: "启动提示语",
  13320. "border-bottom": true
  13321. }, {
  13322. "right-icon": vue.withCtx(() => [
  13323. vue.createVNode(_component_u_switch, {
  13324. modelValue: $setup.settings.startupPrompt,
  13325. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.startupPrompt = $event),
  13326. activeColor: "#4cd964"
  13327. }, null, 8, ["modelValue"])
  13328. ]),
  13329. _: 1
  13330. /* STABLE */
  13331. })
  13332. ]),
  13333. _: 1
  13334. /* STABLE */
  13335. }),
  13336. vue.createCommentVNode(" 启动提示语输入框 "),
  13337. vue.createElementVNode("view", { class: "input-section" }, [
  13338. vue.createVNode(_component_u_textarea, {
  13339. modelValue: $setup.settings.startupText,
  13340. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.startupText = $event),
  13341. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  13342. height: "100"
  13343. }, null, 8, ["modelValue"])
  13344. ]),
  13345. vue.createCommentVNode(" 语速设置 "),
  13346. vue.createElementVNode("view", { class: "slider-section" }, [
  13347. vue.createElementVNode("view", { class: "slider-title" }, [
  13348. vue.createElementVNode("text", null, "设置语速"),
  13349. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  13350. ]),
  13351. vue.createVNode(_component_u_slider, {
  13352. modelValue: $setup.settings.speechRate,
  13353. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.settings.speechRate = $event),
  13354. min: 0,
  13355. max: 10,
  13356. step: 1,
  13357. showValue: ""
  13358. }, null, 8, ["modelValue"])
  13359. ]),
  13360. vue.createCommentVNode(" 音调设置 "),
  13361. vue.createElementVNode("view", { class: "slider-section" }, [
  13362. vue.createElementVNode("view", { class: "slider-title" }, [
  13363. vue.createElementVNode("text", null, "设置音调"),
  13364. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  13365. ]),
  13366. vue.createVNode(_component_u_slider, {
  13367. modelValue: $setup.settings.pitch,
  13368. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.settings.pitch = $event),
  13369. min: 0,
  13370. max: 10,
  13371. step: 1,
  13372. showValue: ""
  13373. }, null, 8, ["modelValue"])
  13374. ]),
  13375. vue.createCommentVNode(" 操作按钮 "),
  13376. vue.createElementVNode("view", { class: "button-group" }, [
  13377. vue.createVNode(_component_u_button, {
  13378. type: "primary",
  13379. text: "保存设置并试听",
  13380. onClick: $setup.saveAndTest
  13381. }),
  13382. vue.createVNode(_component_u_button, {
  13383. type: "warning",
  13384. text: "停止播放",
  13385. onClick: $setup.stopPlayback,
  13386. plain: true
  13387. }),
  13388. vue.createVNode(_component_u_button, {
  13389. type: "error",
  13390. text: "重启app",
  13391. onClick: $setup.restartApp,
  13392. plain: true
  13393. })
  13394. ])
  13395. ])
  13396. ]);
  13397. }
  13398. 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"]]);
  13399. const _sfc_main$9 = {
  13400. __name: "book-display",
  13401. setup(__props, { expose: __expose }) {
  13402. __expose();
  13403. const settings = vue.reactive({
  13404. showRecyclePrice: false,
  13405. showRecycleStatus: false,
  13406. showInventoryInfo: false,
  13407. expandProductDetails: false
  13408. });
  13409. function loadSettings() {
  13410. try {
  13411. const savedSettings = uni.getStorageSync("display_settings");
  13412. if (savedSettings) {
  13413. Object.assign(settings, JSON.parse(savedSettings));
  13414. }
  13415. } catch (error2) {
  13416. formatAppLog("error", "at pages/my/page/book-display.vue:51", "加载设置失败:", error2);
  13417. }
  13418. }
  13419. function saveSettings() {
  13420. try {
  13421. uni.setStorageSync("display_settings", JSON.stringify(settings));
  13422. uni.showToast({
  13423. title: "设置已保存",
  13424. icon: "success"
  13425. });
  13426. } catch (error2) {
  13427. formatAppLog("error", "at pages/my/page/book-display.vue:64", "保存设置失败:", error2);
  13428. uni.showToast({
  13429. title: "保存设置失败",
  13430. icon: "error"
  13431. });
  13432. }
  13433. }
  13434. vue.onMounted(() => {
  13435. loadSettings();
  13436. });
  13437. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  13438. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13439. return __returned__;
  13440. }
  13441. };
  13442. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  13443. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  13444. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$5);
  13445. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  13446. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  13447. vue.createCommentVNode(" 设置列表 "),
  13448. vue.createVNode(_component_u_cell_group, {
  13449. border: false,
  13450. class: "settings-group"
  13451. }, {
  13452. default: vue.withCtx(() => [
  13453. vue.createVNode(_component_u_cell, {
  13454. title: "是否展示回收价",
  13455. "border-bottom": true
  13456. }, {
  13457. "right-icon": vue.withCtx(() => [
  13458. vue.createVNode(_component_u_switch, {
  13459. modelValue: $setup.settings.showRecyclePrice,
  13460. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  13461. activeColor: "#4cd964"
  13462. }, null, 8, ["modelValue"])
  13463. ]),
  13464. _: 1
  13465. /* STABLE */
  13466. }),
  13467. vue.createVNode(_component_u_cell, {
  13468. title: "是否展示回收状态",
  13469. "border-bottom": true
  13470. }, {
  13471. "right-icon": vue.withCtx(() => [
  13472. vue.createVNode(_component_u_switch, {
  13473. modelValue: $setup.settings.showRecycleStatus,
  13474. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  13475. activeColor: "#4cd964"
  13476. }, null, 8, ["modelValue"])
  13477. ]),
  13478. _: 1
  13479. /* STABLE */
  13480. }),
  13481. vue.createVNode(_component_u_cell, {
  13482. title: "是否展示库存信息",
  13483. "border-bottom": true
  13484. }, {
  13485. "right-icon": vue.withCtx(() => [
  13486. vue.createVNode(_component_u_switch, {
  13487. modelValue: $setup.settings.showInventoryInfo,
  13488. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showInventoryInfo = $event),
  13489. activeColor: "#4cd964"
  13490. }, null, 8, ["modelValue"])
  13491. ]),
  13492. _: 1
  13493. /* STABLE */
  13494. }),
  13495. vue.createVNode(_component_u_cell, {
  13496. title: "是否默认展开商品详情",
  13497. "border-bottom": false
  13498. }, {
  13499. "right-icon": vue.withCtx(() => [
  13500. vue.createVNode(_component_u_switch, {
  13501. modelValue: $setup.settings.expandProductDetails,
  13502. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.expandProductDetails = $event),
  13503. activeColor: "#4cd964"
  13504. }, null, 8, ["modelValue"])
  13505. ]),
  13506. _: 1
  13507. /* STABLE */
  13508. })
  13509. ]),
  13510. _: 1
  13511. /* STABLE */
  13512. })
  13513. ]);
  13514. }
  13515. 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"]]);
  13516. const _sfc_main$8 = {
  13517. __name: "password",
  13518. setup(__props, { expose: __expose }) {
  13519. __expose();
  13520. const formRef = vue.ref(null);
  13521. const loading = vue.ref(false);
  13522. const showPassword = vue.reactive({
  13523. old: false,
  13524. new: false,
  13525. confirm: false
  13526. });
  13527. const formData = vue.reactive({
  13528. oldPassword: "",
  13529. newPassword: "",
  13530. confirmPassword: ""
  13531. });
  13532. const rules2 = {
  13533. oldPassword: [{
  13534. required: true,
  13535. message: "请输入原密码",
  13536. trigger: ["blur", "change"]
  13537. }, {
  13538. min: 6,
  13539. message: "密码长度不能小于6位",
  13540. trigger: ["blur", "change"]
  13541. }],
  13542. newPassword: [{
  13543. required: true,
  13544. message: "请输入新密码",
  13545. trigger: ["blur", "change"]
  13546. }, {
  13547. min: 6,
  13548. message: "密码长度不能小于6位",
  13549. trigger: ["blur", "change"]
  13550. }, {
  13551. validator: (rule, value2, callback) => {
  13552. if (value2 === formData.oldPassword) {
  13553. callback(new Error("新密码不能与原密码相同"));
  13554. } else {
  13555. callback();
  13556. }
  13557. },
  13558. trigger: ["blur", "change"]
  13559. }],
  13560. confirmPassword: [{
  13561. required: true,
  13562. message: "请再次输入新密码",
  13563. trigger: ["blur", "change"]
  13564. }, {
  13565. validator: (rule, value2, callback) => {
  13566. if (value2 !== formData.newPassword) {
  13567. callback(new Error("两次输入的密码不一致"));
  13568. } else {
  13569. callback();
  13570. }
  13571. },
  13572. trigger: ["blur", "change"]
  13573. }]
  13574. };
  13575. function togglePasswordVisible(field) {
  13576. showPassword[field] = !showPassword[field];
  13577. }
  13578. function submitForm() {
  13579. if (!formRef.value)
  13580. return;
  13581. formRef.value.validate((valid) => {
  13582. if (valid) {
  13583. loading.value = true;
  13584. setTimeout(() => {
  13585. uni.showToast({
  13586. title: "密码修改成功",
  13587. icon: "success"
  13588. });
  13589. loading.value = false;
  13590. resetForm();
  13591. }, 1500);
  13592. }
  13593. });
  13594. }
  13595. function resetForm() {
  13596. if (!formRef.value)
  13597. return;
  13598. formRef.value.resetFields();
  13599. }
  13600. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, togglePasswordVisible, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  13601. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13602. return __returned__;
  13603. }
  13604. };
  13605. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  13606. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7);
  13607. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$3);
  13608. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_2$2);
  13609. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_3$2);
  13610. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
  13611. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  13612. vue.createVNode(_component_u_form, {
  13613. model: $setup.formData,
  13614. rules: $setup.rules,
  13615. ref: "formRef",
  13616. labelPosition: "top",
  13617. borderBottom: true,
  13618. labelWidth: "300px"
  13619. }, {
  13620. default: vue.withCtx(() => [
  13621. vue.createVNode(_component_u_form_item, {
  13622. label: "原密码",
  13623. prop: "oldPassword",
  13624. borderBottom: ""
  13625. }, {
  13626. default: vue.withCtx(() => [
  13627. vue.createVNode(_component_u_input, {
  13628. modelValue: $setup.formData.oldPassword,
  13629. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.oldPassword = $event),
  13630. type: "password",
  13631. placeholder: "请输入原密码",
  13632. password: !$setup.showPassword.old,
  13633. border: false
  13634. }, {
  13635. suffix: vue.withCtx(() => [
  13636. vue.createVNode(_component_u_icon, {
  13637. name: $setup.showPassword.old ? "eye-fill" : "eye-off",
  13638. size: "20",
  13639. color: "#909399",
  13640. onClick: _cache[0] || (_cache[0] = ($event) => $setup.togglePasswordVisible("old"))
  13641. }, null, 8, ["name"])
  13642. ]),
  13643. _: 1
  13644. /* STABLE */
  13645. }, 8, ["modelValue", "password"])
  13646. ]),
  13647. _: 1
  13648. /* STABLE */
  13649. }),
  13650. vue.createVNode(_component_u_form_item, {
  13651. label: "新密码",
  13652. prop: "newPassword",
  13653. borderBottom: ""
  13654. }, {
  13655. default: vue.withCtx(() => [
  13656. vue.createVNode(_component_u_input, {
  13657. modelValue: $setup.formData.newPassword,
  13658. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.formData.newPassword = $event),
  13659. type: "password",
  13660. placeholder: "请输入新密码",
  13661. password: !$setup.showPassword.new,
  13662. border: false
  13663. }, {
  13664. suffix: vue.withCtx(() => [
  13665. vue.createVNode(_component_u_icon, {
  13666. name: $setup.showPassword.new ? "eye-fill" : "eye-off",
  13667. size: "20",
  13668. color: "#909399",
  13669. onClick: _cache[2] || (_cache[2] = ($event) => $setup.togglePasswordVisible("new"))
  13670. }, null, 8, ["name"])
  13671. ]),
  13672. _: 1
  13673. /* STABLE */
  13674. }, 8, ["modelValue", "password"])
  13675. ]),
  13676. _: 1
  13677. /* STABLE */
  13678. }),
  13679. vue.createVNode(_component_u_form_item, {
  13680. label: "确认新密码",
  13681. prop: "confirmPassword",
  13682. borderBottom: ""
  13683. }, {
  13684. default: vue.withCtx(() => [
  13685. vue.createVNode(_component_u_input, {
  13686. modelValue: $setup.formData.confirmPassword,
  13687. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.formData.confirmPassword = $event),
  13688. type: "password",
  13689. placeholder: "请再次输入新密码",
  13690. password: !$setup.showPassword.confirm,
  13691. border: false
  13692. }, {
  13693. suffix: vue.withCtx(() => [
  13694. vue.createVNode(_component_u_icon, {
  13695. name: $setup.showPassword.confirm ? "eye-fill" : "eye-off",
  13696. size: "20",
  13697. color: "#909399",
  13698. onClick: _cache[4] || (_cache[4] = ($event) => $setup.togglePasswordVisible("confirm"))
  13699. }, null, 8, ["name"])
  13700. ]),
  13701. _: 1
  13702. /* STABLE */
  13703. }, 8, ["modelValue", "password"])
  13704. ]),
  13705. _: 1
  13706. /* STABLE */
  13707. })
  13708. ]),
  13709. _: 1
  13710. /* STABLE */
  13711. }, 8, ["model"]),
  13712. vue.createElementVNode("view", { class: "submit-btn" }, [
  13713. vue.createVNode(_component_u_button, {
  13714. type: "primary",
  13715. text: "修改密码",
  13716. onClick: $setup.submitForm,
  13717. loading: $setup.loading
  13718. }, null, 8, ["loading"])
  13719. ])
  13720. ]);
  13721. }
  13722. 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"]]);
  13723. const _sfc_main$7 = {};
  13724. function _sfc_render$6(_ctx, _cache) {
  13725. return vue.openBlock(), vue.createElementBlock("view");
  13726. }
  13727. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-review.vue"]]);
  13728. const _sfc_main$6 = {};
  13729. function _sfc_render$5(_ctx, _cache) {
  13730. return vue.openBlock(), vue.createElementBlock("view");
  13731. }
  13732. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-pick.vue"]]);
  13733. const _sfc_main$5 = {};
  13734. function _sfc_render$4(_ctx, _cache) {
  13735. return vue.openBlock(), vue.createElementBlock("view");
  13736. }
  13737. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-sign.vue"]]);
  13738. const _sfc_main$4 = {};
  13739. function _sfc_render$3(_ctx, _cache) {
  13740. return vue.openBlock(), vue.createElementBlock("view");
  13741. }
  13742. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-confirm.vue"]]);
  13743. const _sfc_main$3 = {};
  13744. function _sfc_render$2(_ctx, _cache) {
  13745. return vue.openBlock(), vue.createElementBlock("view");
  13746. }
  13747. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-audit.vue"]]);
  13748. const _sfc_main$2 = {};
  13749. function _sfc_render$1(_ctx, _cache) {
  13750. return vue.openBlock(), vue.createElementBlock("view");
  13751. }
  13752. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-payment.vue"]]);
  13753. const _sfc_main$1 = {};
  13754. function _sfc_render(_ctx, _cache) {
  13755. return vue.openBlock(), vue.createElementBlock("view");
  13756. }
  13757. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/receive-stat.vue"]]);
  13758. __definePage("pages/index/index", PagesIndexIndex);
  13759. __definePage("pages/my/my", PagesMyMy);
  13760. __definePage("pages/order/index", PagesOrderIndex);
  13761. __definePage("pages/book/index", PagesBookIndex);
  13762. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  13763. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  13764. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  13765. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  13766. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  13767. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  13768. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  13769. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  13770. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  13771. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  13772. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  13773. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  13774. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  13775. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  13776. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  13777. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  13778. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  13779. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  13780. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  13781. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  13782. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  13783. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  13784. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  13785. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  13786. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  13787. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  13788. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  13789. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  13790. __definePage("pages/my/page/school", PagesMyPageSchool);
  13791. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  13792. __definePage("pages/my/page/version", PagesMyPageVersion);
  13793. __definePage("pages/my/page/volume", PagesMyPageVolume);
  13794. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  13795. __definePage("pages/my/page/password", PagesMyPagePassword);
  13796. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  13797. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  13798. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  13799. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  13800. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  13801. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  13802. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  13803. const _sfc_main = {
  13804. __name: "App",
  13805. setup(__props, { expose: __expose }) {
  13806. __expose();
  13807. onLaunch(() => {
  13808. formatAppLog("log", "at App.vue:7", "App Launch");
  13809. if (!store.token) {
  13810. let token = uni.getStorageSync("token");
  13811. if (token) {
  13812. store.setToken(token);
  13813. let userStr = uni.getStorageSync("userInfo");
  13814. if (userStr) {
  13815. let userInfo = JSON.parse(userStr);
  13816. if (userInfo.userId) {
  13817. store.setUserInfo(userInfo);
  13818. }
  13819. }
  13820. }
  13821. }
  13822. });
  13823. onShow(() => {
  13824. formatAppLog("log", "at App.vue:24", "App Show");
  13825. });
  13826. onHide(() => {
  13827. formatAppLog("log", "at App.vue:27", "App Hide");
  13828. });
  13829. const __returned__ = { get onLaunch() {
  13830. return onLaunch;
  13831. }, get onShow() {
  13832. return onShow;
  13833. }, get onHide() {
  13834. return onHide;
  13835. }, get store() {
  13836. return store;
  13837. } };
  13838. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13839. return __returned__;
  13840. }
  13841. };
  13842. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/书嗨项目/shuhi-app-fornt/App.vue"]]);
  13843. const { toString } = Object.prototype;
  13844. function isArray(val) {
  13845. return toString.call(val) === "[object Array]";
  13846. }
  13847. function isObject(val) {
  13848. return val !== null && typeof val === "object";
  13849. }
  13850. function isDate(val) {
  13851. return toString.call(val) === "[object Date]";
  13852. }
  13853. function isURLSearchParams(val) {
  13854. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  13855. }
  13856. function forEach(obj, fn) {
  13857. if (obj === null || typeof obj === "undefined") {
  13858. return;
  13859. }
  13860. if (typeof obj !== "object") {
  13861. obj = [obj];
  13862. }
  13863. if (isArray(obj)) {
  13864. for (let i = 0, l = obj.length; i < l; i++) {
  13865. fn.call(null, obj[i], i, obj);
  13866. }
  13867. } else {
  13868. for (const key in obj) {
  13869. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  13870. fn.call(null, obj[key], key, obj);
  13871. }
  13872. }
  13873. }
  13874. }
  13875. function isPlainObject(obj) {
  13876. return Object.prototype.toString.call(obj) === "[object Object]";
  13877. }
  13878. function deepMerge$1() {
  13879. const result = {};
  13880. function assignValue(val, key) {
  13881. if (typeof result[key] === "object" && typeof val === "object") {
  13882. result[key] = deepMerge$1(result[key], val);
  13883. } else if (typeof val === "object") {
  13884. result[key] = deepMerge$1({}, val);
  13885. } else {
  13886. result[key] = val;
  13887. }
  13888. }
  13889. for (let i = 0, l = arguments.length; i < l; i++) {
  13890. forEach(arguments[i], assignValue);
  13891. }
  13892. return result;
  13893. }
  13894. function isUndefined(val) {
  13895. return typeof val === "undefined";
  13896. }
  13897. function encode(val) {
  13898. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  13899. }
  13900. function buildURL(url2, params) {
  13901. if (!params) {
  13902. return url2;
  13903. }
  13904. let serializedParams;
  13905. if (isURLSearchParams(params)) {
  13906. serializedParams = params.toString();
  13907. } else {
  13908. const parts = [];
  13909. forEach(params, (val, key) => {
  13910. if (val === null || typeof val === "undefined") {
  13911. return;
  13912. }
  13913. if (isArray(val)) {
  13914. key = `${key}[]`;
  13915. } else {
  13916. val = [val];
  13917. }
  13918. forEach(val, (v) => {
  13919. if (isDate(v)) {
  13920. v = v.toISOString();
  13921. } else if (isObject(v)) {
  13922. v = JSON.stringify(v);
  13923. }
  13924. parts.push(`${encode(key)}=${encode(v)}`);
  13925. });
  13926. });
  13927. serializedParams = parts.join("&");
  13928. }
  13929. if (serializedParams) {
  13930. const hashmarkIndex = url2.indexOf("#");
  13931. if (hashmarkIndex !== -1) {
  13932. url2 = url2.slice(0, hashmarkIndex);
  13933. }
  13934. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  13935. }
  13936. return url2;
  13937. }
  13938. function isAbsoluteURL(url2) {
  13939. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  13940. }
  13941. function combineURLs(baseURL, relativeURL) {
  13942. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  13943. }
  13944. function buildFullPath(baseURL, requestedURL) {
  13945. if (baseURL && !isAbsoluteURL(requestedURL)) {
  13946. return combineURLs(baseURL, requestedURL);
  13947. }
  13948. return requestedURL;
  13949. }
  13950. function settle(resolve, reject, response) {
  13951. const { validateStatus } = response.config;
  13952. const status = response.statusCode;
  13953. if (status && (!validateStatus || validateStatus(status))) {
  13954. resolve(response);
  13955. } else {
  13956. reject(response);
  13957. }
  13958. }
  13959. const mergeKeys$1 = (keys, config2) => {
  13960. const config3 = {};
  13961. keys.forEach((prop) => {
  13962. if (!isUndefined(config2[prop])) {
  13963. config3[prop] = config2[prop];
  13964. }
  13965. });
  13966. return config3;
  13967. };
  13968. const adapter = (config2) => new Promise((resolve, reject) => {
  13969. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  13970. const _config = {
  13971. url: fullPath,
  13972. header: config2.header,
  13973. complete: (response) => {
  13974. config2.fullPath = fullPath;
  13975. response.config = config2;
  13976. try {
  13977. if (typeof response.data === "string") {
  13978. response.data = JSON.parse(response.data);
  13979. }
  13980. } catch (e) {
  13981. }
  13982. settle(resolve, reject, response);
  13983. }
  13984. };
  13985. let requestTask;
  13986. if (config2.method === "UPLOAD") {
  13987. delete _config.header["content-type"];
  13988. delete _config.header["Content-Type"];
  13989. const otherConfig = {
  13990. filePath: config2.filePath,
  13991. name: config2.name
  13992. };
  13993. const optionalKeys = [
  13994. "files",
  13995. "timeout",
  13996. "formData"
  13997. ];
  13998. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  13999. } else if (config2.method === "DOWNLOAD") {
  14000. if (!isUndefined(config2.timeout)) {
  14001. _config.timeout = config2.timeout;
  14002. }
  14003. requestTask = uni.downloadFile(_config);
  14004. } else {
  14005. const optionalKeys = [
  14006. "data",
  14007. "method",
  14008. "timeout",
  14009. "dataType",
  14010. "responseType",
  14011. "sslVerify",
  14012. "firstIpv4"
  14013. ];
  14014. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  14015. }
  14016. if (config2.getTask) {
  14017. config2.getTask(requestTask, config2);
  14018. }
  14019. });
  14020. const dispatchRequest = (config2) => adapter(config2);
  14021. function InterceptorManager() {
  14022. this.handlers = [];
  14023. }
  14024. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  14025. this.handlers.push({
  14026. fulfilled,
  14027. rejected
  14028. });
  14029. return this.handlers.length - 1;
  14030. };
  14031. InterceptorManager.prototype.eject = function eject(id) {
  14032. if (this.handlers[id]) {
  14033. this.handlers[id] = null;
  14034. }
  14035. };
  14036. InterceptorManager.prototype.forEach = function forEach2(fn) {
  14037. this.handlers.forEach((h) => {
  14038. if (h !== null) {
  14039. fn(h);
  14040. }
  14041. });
  14042. };
  14043. const mergeKeys = (keys, globalsConfig, config2) => {
  14044. const config3 = {};
  14045. keys.forEach((prop) => {
  14046. if (!isUndefined(config2[prop])) {
  14047. config3[prop] = config2[prop];
  14048. } else if (!isUndefined(globalsConfig[prop])) {
  14049. config3[prop] = globalsConfig[prop];
  14050. }
  14051. });
  14052. return config3;
  14053. };
  14054. const mergeConfig = (globalsConfig, config2 = {}) => {
  14055. const method = config2.method || globalsConfig.method || "GET";
  14056. let config3 = {
  14057. baseURL: globalsConfig.baseURL || "",
  14058. method,
  14059. url: config2.url || "",
  14060. params: config2.params || {},
  14061. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  14062. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  14063. };
  14064. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  14065. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  14066. if (method === "DOWNLOAD") {
  14067. if (!isUndefined(config2.timeout)) {
  14068. config3.timeout = config2.timeout;
  14069. } else if (!isUndefined(globalsConfig.timeout)) {
  14070. config3.timeout = globalsConfig.timeout;
  14071. }
  14072. } else if (method === "UPLOAD") {
  14073. delete config3.header["content-type"];
  14074. delete config3.header["Content-Type"];
  14075. const uploadKeys = [
  14076. "files",
  14077. "filePath",
  14078. "name",
  14079. "timeout",
  14080. "formData"
  14081. ];
  14082. uploadKeys.forEach((prop) => {
  14083. if (!isUndefined(config2[prop])) {
  14084. config3[prop] = config2[prop];
  14085. }
  14086. });
  14087. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  14088. config3.timeout = globalsConfig.timeout;
  14089. }
  14090. } else {
  14091. const defaultsKeys = [
  14092. "data",
  14093. "timeout",
  14094. "dataType",
  14095. "responseType",
  14096. "sslVerify",
  14097. "firstIpv4"
  14098. ];
  14099. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  14100. }
  14101. return config3;
  14102. };
  14103. const defaults = {
  14104. baseURL: "",
  14105. header: {},
  14106. method: "GET",
  14107. dataType: "json",
  14108. responseType: "text",
  14109. custom: {},
  14110. timeout: 6e4,
  14111. sslVerify: true,
  14112. firstIpv4: false,
  14113. validateStatus: function validateStatus(status) {
  14114. return status >= 200 && status < 300;
  14115. }
  14116. };
  14117. var clone = function() {
  14118. function _instanceof(obj, type2) {
  14119. return type2 != null && obj instanceof type2;
  14120. }
  14121. var nativeMap;
  14122. try {
  14123. nativeMap = Map;
  14124. } catch (_) {
  14125. nativeMap = function() {
  14126. };
  14127. }
  14128. var nativeSet;
  14129. try {
  14130. nativeSet = Set;
  14131. } catch (_) {
  14132. nativeSet = function() {
  14133. };
  14134. }
  14135. var nativePromise;
  14136. try {
  14137. nativePromise = Promise;
  14138. } catch (_) {
  14139. nativePromise = function() {
  14140. };
  14141. }
  14142. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  14143. if (typeof circular === "object") {
  14144. depth = circular.depth;
  14145. prototype = circular.prototype;
  14146. includeNonEnumerable = circular.includeNonEnumerable;
  14147. circular = circular.circular;
  14148. }
  14149. var allParents = [];
  14150. var allChildren = [];
  14151. var useBuffer = typeof Buffer != "undefined";
  14152. if (typeof circular == "undefined")
  14153. circular = true;
  14154. if (typeof depth == "undefined")
  14155. depth = Infinity;
  14156. function _clone(parent2, depth2) {
  14157. if (parent2 === null)
  14158. return null;
  14159. if (depth2 === 0)
  14160. return parent2;
  14161. var child;
  14162. var proto;
  14163. if (typeof parent2 != "object") {
  14164. return parent2;
  14165. }
  14166. if (_instanceof(parent2, nativeMap)) {
  14167. child = new nativeMap();
  14168. } else if (_instanceof(parent2, nativeSet)) {
  14169. child = new nativeSet();
  14170. } else if (_instanceof(parent2, nativePromise)) {
  14171. child = new nativePromise(function(resolve, reject) {
  14172. parent2.then(function(value2) {
  14173. resolve(_clone(value2, depth2 - 1));
  14174. }, function(err) {
  14175. reject(_clone(err, depth2 - 1));
  14176. });
  14177. });
  14178. } else if (clone2.__isArray(parent2)) {
  14179. child = [];
  14180. } else if (clone2.__isRegExp(parent2)) {
  14181. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  14182. if (parent2.lastIndex)
  14183. child.lastIndex = parent2.lastIndex;
  14184. } else if (clone2.__isDate(parent2)) {
  14185. child = new Date(parent2.getTime());
  14186. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  14187. if (Buffer.from) {
  14188. child = Buffer.from(parent2);
  14189. } else {
  14190. child = new Buffer(parent2.length);
  14191. parent2.copy(child);
  14192. }
  14193. return child;
  14194. } else if (_instanceof(parent2, Error)) {
  14195. child = Object.create(parent2);
  14196. } else {
  14197. if (typeof prototype == "undefined") {
  14198. proto = Object.getPrototypeOf(parent2);
  14199. child = Object.create(proto);
  14200. } else {
  14201. child = Object.create(prototype);
  14202. proto = prototype;
  14203. }
  14204. }
  14205. if (circular) {
  14206. var index2 = allParents.indexOf(parent2);
  14207. if (index2 != -1) {
  14208. return allChildren[index2];
  14209. }
  14210. allParents.push(parent2);
  14211. allChildren.push(child);
  14212. }
  14213. if (_instanceof(parent2, nativeMap)) {
  14214. parent2.forEach(function(value2, key) {
  14215. var keyChild = _clone(key, depth2 - 1);
  14216. var valueChild = _clone(value2, depth2 - 1);
  14217. child.set(keyChild, valueChild);
  14218. });
  14219. }
  14220. if (_instanceof(parent2, nativeSet)) {
  14221. parent2.forEach(function(value2) {
  14222. var entryChild = _clone(value2, depth2 - 1);
  14223. child.add(entryChild);
  14224. });
  14225. }
  14226. for (var i in parent2) {
  14227. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  14228. if (attrs) {
  14229. child[i] = _clone(parent2[i], depth2 - 1);
  14230. }
  14231. try {
  14232. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  14233. if (objProperty.set === "undefined") {
  14234. continue;
  14235. }
  14236. child[i] = _clone(parent2[i], depth2 - 1);
  14237. } catch (e) {
  14238. if (e instanceof TypeError) {
  14239. continue;
  14240. } else if (e instanceof ReferenceError) {
  14241. continue;
  14242. }
  14243. }
  14244. }
  14245. if (Object.getOwnPropertySymbols) {
  14246. var symbols = Object.getOwnPropertySymbols(parent2);
  14247. for (var i = 0; i < symbols.length; i++) {
  14248. var symbol = symbols[i];
  14249. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  14250. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  14251. continue;
  14252. }
  14253. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  14254. Object.defineProperty(child, symbol, descriptor);
  14255. }
  14256. }
  14257. if (includeNonEnumerable) {
  14258. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  14259. for (var i = 0; i < allPropertyNames.length; i++) {
  14260. var propertyName = allPropertyNames[i];
  14261. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  14262. if (descriptor && descriptor.enumerable) {
  14263. continue;
  14264. }
  14265. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  14266. Object.defineProperty(child, propertyName, descriptor);
  14267. }
  14268. }
  14269. return child;
  14270. }
  14271. return _clone(parent, depth);
  14272. }
  14273. clone2.clonePrototype = function clonePrototype(parent) {
  14274. if (parent === null)
  14275. return null;
  14276. var c = function() {
  14277. };
  14278. c.prototype = parent;
  14279. return new c();
  14280. };
  14281. function __objToStr(o) {
  14282. return Object.prototype.toString.call(o);
  14283. }
  14284. clone2.__objToStr = __objToStr;
  14285. function __isDate(o) {
  14286. return typeof o === "object" && __objToStr(o) === "[object Date]";
  14287. }
  14288. clone2.__isDate = __isDate;
  14289. function __isArray(o) {
  14290. return typeof o === "object" && __objToStr(o) === "[object Array]";
  14291. }
  14292. clone2.__isArray = __isArray;
  14293. function __isRegExp(o) {
  14294. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  14295. }
  14296. clone2.__isRegExp = __isRegExp;
  14297. function __getRegExpFlags(re) {
  14298. var flags = "";
  14299. if (re.global)
  14300. flags += "g";
  14301. if (re.ignoreCase)
  14302. flags += "i";
  14303. if (re.multiline)
  14304. flags += "m";
  14305. return flags;
  14306. }
  14307. clone2.__getRegExpFlags = __getRegExpFlags;
  14308. return clone2;
  14309. }();
  14310. class Request {
  14311. /**
  14312. * @param {Object} arg - 全局配置
  14313. * @param {String} arg.baseURL - 全局根路径
  14314. * @param {Object} arg.header - 全局header
  14315. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  14316. * @param {String} arg.dataType = [json] - 全局默认的dataType
  14317. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  14318. * @param {Object} arg.custom - 全局默认的自定义参数
  14319. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  14320. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  14321. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  14322. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  14323. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  14324. */
  14325. constructor(arg = {}) {
  14326. if (!isPlainObject(arg)) {
  14327. arg = {};
  14328. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  14329. }
  14330. this.config = clone({ ...defaults, ...arg });
  14331. this.interceptors = {
  14332. request: new InterceptorManager(),
  14333. response: new InterceptorManager()
  14334. };
  14335. }
  14336. /**
  14337. * @Function
  14338. * @param {Request~setConfigCallback} f - 设置全局默认配置
  14339. */
  14340. setConfig(f) {
  14341. this.config = f(this.config);
  14342. }
  14343. middleware(config2) {
  14344. config2 = mergeConfig(this.config, config2);
  14345. const chain = [dispatchRequest, void 0];
  14346. let promise2 = Promise.resolve(config2);
  14347. this.interceptors.request.forEach((interceptor) => {
  14348. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  14349. });
  14350. this.interceptors.response.forEach((interceptor) => {
  14351. chain.push(interceptor.fulfilled, interceptor.rejected);
  14352. });
  14353. while (chain.length) {
  14354. promise2 = promise2.then(chain.shift(), chain.shift());
  14355. }
  14356. return promise2;
  14357. }
  14358. /**
  14359. * @Function
  14360. * @param {Object} config - 请求配置项
  14361. * @prop {String} options.url - 请求路径
  14362. * @prop {Object} options.data - 请求参数
  14363. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  14364. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  14365. * @prop {Object} [options.header = config.header] - 请求header
  14366. * @prop {Object} [options.method = config.method] - 请求方法
  14367. * @returns {Promise<unknown>}
  14368. */
  14369. request(config2 = {}) {
  14370. return this.middleware(config2);
  14371. }
  14372. get(url2, options = {}) {
  14373. return this.middleware({
  14374. url: url2,
  14375. method: "GET",
  14376. ...options
  14377. });
  14378. }
  14379. post(url2, data, options = {}) {
  14380. return this.middleware({
  14381. url: url2,
  14382. data,
  14383. method: "POST",
  14384. ...options
  14385. });
  14386. }
  14387. put(url2, data, options = {}) {
  14388. return this.middleware({
  14389. url: url2,
  14390. data,
  14391. method: "PUT",
  14392. ...options
  14393. });
  14394. }
  14395. delete(url2, data, options = {}) {
  14396. return this.middleware({
  14397. url: url2,
  14398. data,
  14399. method: "DELETE",
  14400. ...options
  14401. });
  14402. }
  14403. options(url2, data, options = {}) {
  14404. return this.middleware({
  14405. url: url2,
  14406. data,
  14407. method: "OPTIONS",
  14408. ...options
  14409. });
  14410. }
  14411. upload(url2, config2 = {}) {
  14412. config2.url = url2;
  14413. config2.method = "UPLOAD";
  14414. return this.middleware(config2);
  14415. }
  14416. download(url2, config2 = {}) {
  14417. config2.url = url2;
  14418. config2.method = "DOWNLOAD";
  14419. return this.middleware(config2);
  14420. }
  14421. }
  14422. class Router {
  14423. constructor() {
  14424. this.config = {
  14425. type: "navigateTo",
  14426. url: "",
  14427. delta: 1,
  14428. // navigateBack页面后退时,回退的层数
  14429. params: {},
  14430. // 传递的参数
  14431. animationType: "pop-in",
  14432. // 窗口动画,只在APP有效
  14433. animationDuration: 300,
  14434. // 窗口动画持续时间,单位毫秒,只在APP有效
  14435. intercept: false
  14436. // 是否需要拦截
  14437. };
  14438. this.route = this.route.bind(this);
  14439. }
  14440. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  14441. addRootPath(url2) {
  14442. return url2[0] === "/" ? url2 : `/${url2}`;
  14443. }
  14444. // 整合路由参数
  14445. mixinParam(url2, params) {
  14446. url2 = url2 && this.addRootPath(url2);
  14447. let query = "";
  14448. if (/.*\/.*\?.*=.*/.test(url2)) {
  14449. query = uni.$u.queryParams(params, false);
  14450. return url2 += `&${query}`;
  14451. }
  14452. query = uni.$u.queryParams(params);
  14453. return url2 += query;
  14454. }
  14455. // 对外的方法名称
  14456. async route(options = {}, params = {}) {
  14457. let mergeConfig2 = {};
  14458. if (typeof options === "string") {
  14459. mergeConfig2.url = this.mixinParam(options, params);
  14460. mergeConfig2.type = "navigateTo";
  14461. } else {
  14462. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  14463. mergeConfig2.url = this.mixinParam(options.url, options.params);
  14464. }
  14465. if (mergeConfig2.url === uni.$u.page())
  14466. return;
  14467. if (params.intercept) {
  14468. this.config.intercept = params.intercept;
  14469. }
  14470. mergeConfig2.params = params;
  14471. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  14472. if (typeof uni.$u.routeIntercept === "function") {
  14473. const isNext = await new Promise((resolve, reject) => {
  14474. uni.$u.routeIntercept(mergeConfig2, resolve);
  14475. });
  14476. isNext && this.openPage(mergeConfig2);
  14477. } else {
  14478. this.openPage(mergeConfig2);
  14479. }
  14480. }
  14481. // 执行路由跳转
  14482. openPage(config2) {
  14483. const {
  14484. url: url2,
  14485. type: type2,
  14486. delta,
  14487. animationType,
  14488. animationDuration
  14489. } = config2;
  14490. if (config2.type == "navigateTo" || config2.type == "to") {
  14491. uni.navigateTo({
  14492. url: url2,
  14493. animationType,
  14494. animationDuration
  14495. });
  14496. }
  14497. if (config2.type == "redirectTo" || config2.type == "redirect") {
  14498. uni.redirectTo({
  14499. url: url2
  14500. });
  14501. }
  14502. if (config2.type == "switchTab" || config2.type == "tab") {
  14503. uni.switchTab({
  14504. url: url2
  14505. });
  14506. }
  14507. if (config2.type == "reLaunch" || config2.type == "launch") {
  14508. uni.reLaunch({
  14509. url: url2
  14510. });
  14511. }
  14512. if (config2.type == "navigateBack" || config2.type == "back") {
  14513. uni.navigateBack({
  14514. delta
  14515. });
  14516. }
  14517. }
  14518. }
  14519. const route = new Router().route;
  14520. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  14521. const startRGB = hexToRgb(startColor, false);
  14522. const startR = startRGB[0];
  14523. const startG = startRGB[1];
  14524. const startB = startRGB[2];
  14525. const endRGB = hexToRgb(endColor, false);
  14526. const endR = endRGB[0];
  14527. const endG = endRGB[1];
  14528. const endB = endRGB[2];
  14529. const sR = (endR - startR) / step;
  14530. const sG = (endG - startG) / step;
  14531. const sB = (endB - startB) / step;
  14532. const colorArr = [];
  14533. for (let i = 0; i < step; i++) {
  14534. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  14535. if (i === 0)
  14536. hex = rgbToHex(startColor);
  14537. if (i === step - 1)
  14538. hex = rgbToHex(endColor);
  14539. colorArr.push(hex);
  14540. }
  14541. return colorArr;
  14542. }
  14543. function hexToRgb(sColor, str = true) {
  14544. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  14545. sColor = String(sColor).toLowerCase();
  14546. if (sColor && reg.test(sColor)) {
  14547. if (sColor.length === 4) {
  14548. let sColorNew = "#";
  14549. for (let i = 1; i < 4; i += 1) {
  14550. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  14551. }
  14552. sColor = sColorNew;
  14553. }
  14554. const sColorChange = [];
  14555. for (let i = 1; i < 7; i += 2) {
  14556. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  14557. }
  14558. if (!str) {
  14559. return sColorChange;
  14560. }
  14561. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  14562. }
  14563. if (/^(rgb|RGB)/.test(sColor)) {
  14564. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  14565. return arr.map((val) => Number(val));
  14566. }
  14567. return sColor;
  14568. }
  14569. function rgbToHex(rgb) {
  14570. const _this = rgb;
  14571. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  14572. if (/^(rgb|RGB)/.test(_this)) {
  14573. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  14574. let strHex = "#";
  14575. for (let i = 0; i < aColor.length; i++) {
  14576. let hex = Number(aColor[i]).toString(16);
  14577. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  14578. if (hex === "0") {
  14579. hex += hex;
  14580. }
  14581. strHex += hex;
  14582. }
  14583. if (strHex.length !== 7) {
  14584. strHex = _this;
  14585. }
  14586. return strHex;
  14587. }
  14588. if (reg.test(_this)) {
  14589. const aNum = _this.replace(/#/, "").split("");
  14590. if (aNum.length === 6) {
  14591. return _this;
  14592. }
  14593. if (aNum.length === 3) {
  14594. let numHex = "#";
  14595. for (let i = 0; i < aNum.length; i += 1) {
  14596. numHex += aNum[i] + aNum[i];
  14597. }
  14598. return numHex;
  14599. }
  14600. } else {
  14601. return _this;
  14602. }
  14603. }
  14604. function colorToRgba(color2, alpha) {
  14605. color2 = rgbToHex(color2);
  14606. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  14607. let sColor = String(color2).toLowerCase();
  14608. if (sColor && reg.test(sColor)) {
  14609. if (sColor.length === 4) {
  14610. let sColorNew = "#";
  14611. for (let i = 1; i < 4; i += 1) {
  14612. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  14613. }
  14614. sColor = sColorNew;
  14615. }
  14616. const sColorChange = [];
  14617. for (let i = 1; i < 7; i += 2) {
  14618. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  14619. }
  14620. return `rgba(${sColorChange.join(",")},${alpha})`;
  14621. }
  14622. return sColor;
  14623. }
  14624. const colorGradient$1 = {
  14625. colorGradient,
  14626. hexToRgb,
  14627. rgbToHex,
  14628. colorToRgba
  14629. };
  14630. function email(value2) {
  14631. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  14632. }
  14633. function mobile(value2) {
  14634. return /^1[23456789]\d{9}$/.test(value2);
  14635. }
  14636. function url(value2) {
  14637. 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);
  14638. }
  14639. function date(value2) {
  14640. if (!value2)
  14641. return false;
  14642. if (number(value2))
  14643. value2 = +value2;
  14644. return !/Invalid|NaN/.test(new Date(value2).toString());
  14645. }
  14646. function dateISO(value2) {
  14647. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  14648. }
  14649. function number(value2) {
  14650. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  14651. }
  14652. function string(value2) {
  14653. return typeof value2 === "string";
  14654. }
  14655. function digits(value2) {
  14656. return /^\d+$/.test(value2);
  14657. }
  14658. function idCard(value2) {
  14659. 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(
  14660. value2
  14661. );
  14662. }
  14663. function carNo(value2) {
  14664. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  14665. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  14666. if (value2.length === 7) {
  14667. return creg.test(value2);
  14668. }
  14669. if (value2.length === 8) {
  14670. return xreg.test(value2);
  14671. }
  14672. return false;
  14673. }
  14674. function amount(value2) {
  14675. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  14676. }
  14677. function chinese(value2) {
  14678. const reg = /^[\u4e00-\u9fa5]+$/gi;
  14679. return reg.test(value2);
  14680. }
  14681. function letter(value2) {
  14682. return /^[a-zA-Z]*$/.test(value2);
  14683. }
  14684. function enOrNum(value2) {
  14685. const reg = /^[0-9a-zA-Z]*$/g;
  14686. return reg.test(value2);
  14687. }
  14688. function contains(value2, param) {
  14689. return value2.indexOf(param) >= 0;
  14690. }
  14691. function range$1(value2, param) {
  14692. return value2 >= param[0] && value2 <= param[1];
  14693. }
  14694. function rangeLength(value2, param) {
  14695. return value2.length >= param[0] && value2.length <= param[1];
  14696. }
  14697. function landline(value2) {
  14698. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  14699. return reg.test(value2);
  14700. }
  14701. function empty(value2) {
  14702. switch (typeof value2) {
  14703. case "undefined":
  14704. return true;
  14705. case "string":
  14706. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  14707. return true;
  14708. break;
  14709. case "boolean":
  14710. if (!value2)
  14711. return true;
  14712. break;
  14713. case "number":
  14714. if (value2 === 0 || isNaN(value2))
  14715. return true;
  14716. break;
  14717. case "object":
  14718. if (value2 === null || value2.length === 0)
  14719. return true;
  14720. for (const i in value2) {
  14721. return false;
  14722. }
  14723. return true;
  14724. }
  14725. return false;
  14726. }
  14727. function jsonString(value2) {
  14728. if (typeof value2 === "string") {
  14729. try {
  14730. const obj = JSON.parse(value2);
  14731. if (typeof obj === "object" && obj) {
  14732. return true;
  14733. }
  14734. return false;
  14735. } catch (e) {
  14736. return false;
  14737. }
  14738. }
  14739. return false;
  14740. }
  14741. function array(value2) {
  14742. if (typeof Array.isArray === "function") {
  14743. return Array.isArray(value2);
  14744. }
  14745. return Object.prototype.toString.call(value2) === "[object Array]";
  14746. }
  14747. function object(value2) {
  14748. return Object.prototype.toString.call(value2) === "[object Object]";
  14749. }
  14750. function code(value2, len = 6) {
  14751. return new RegExp(`^\\d{${len}}$`).test(value2);
  14752. }
  14753. function func(value2) {
  14754. return typeof value2 === "function";
  14755. }
  14756. function promise(value2) {
  14757. return object(value2) && func(value2.then) && func(value2.catch);
  14758. }
  14759. function image(value2) {
  14760. const newValue = value2.split("?")[0];
  14761. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  14762. return IMAGE_REGEXP.test(newValue);
  14763. }
  14764. function video(value2) {
  14765. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  14766. return VIDEO_REGEXP.test(value2);
  14767. }
  14768. function regExp(o) {
  14769. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  14770. }
  14771. const test = {
  14772. email,
  14773. mobile,
  14774. url,
  14775. date,
  14776. dateISO,
  14777. number,
  14778. digits,
  14779. idCard,
  14780. carNo,
  14781. amount,
  14782. chinese,
  14783. letter,
  14784. enOrNum,
  14785. contains,
  14786. range: range$1,
  14787. rangeLength,
  14788. empty,
  14789. isEmpty: empty,
  14790. jsonString,
  14791. landline,
  14792. object,
  14793. array,
  14794. code,
  14795. func,
  14796. promise,
  14797. video,
  14798. image,
  14799. regExp,
  14800. string
  14801. };
  14802. let timeout = null;
  14803. function debounce(func2, wait = 500, immediate = false) {
  14804. if (timeout !== null)
  14805. clearTimeout(timeout);
  14806. if (immediate) {
  14807. const callNow = !timeout;
  14808. timeout = setTimeout(() => {
  14809. timeout = null;
  14810. }, wait);
  14811. if (callNow)
  14812. typeof func2 === "function" && func2();
  14813. } else {
  14814. timeout = setTimeout(() => {
  14815. typeof func2 === "function" && func2();
  14816. }, wait);
  14817. }
  14818. }
  14819. let flag;
  14820. function throttle(func2, wait = 500, immediate = true) {
  14821. if (immediate) {
  14822. if (!flag) {
  14823. flag = true;
  14824. typeof func2 === "function" && func2();
  14825. setTimeout(() => {
  14826. flag = false;
  14827. }, wait);
  14828. }
  14829. } else if (!flag) {
  14830. flag = true;
  14831. setTimeout(() => {
  14832. flag = false;
  14833. typeof func2 === "function" && func2();
  14834. }, wait);
  14835. }
  14836. }
  14837. function strip(num, precision = 15) {
  14838. return +parseFloat(Number(num).toPrecision(precision));
  14839. }
  14840. function digitLength(num) {
  14841. const eSplit = num.toString().split(/[eE]/);
  14842. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  14843. return len > 0 ? len : 0;
  14844. }
  14845. function float2Fixed(num) {
  14846. if (num.toString().indexOf("e") === -1) {
  14847. return Number(num.toString().replace(".", ""));
  14848. }
  14849. const dLen = digitLength(num);
  14850. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  14851. }
  14852. function checkBoundary(num) {
  14853. {
  14854. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  14855. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  14856. }
  14857. }
  14858. }
  14859. function iteratorOperation(arr, operation) {
  14860. const [num1, num2, ...others] = arr;
  14861. let res = operation(num1, num2);
  14862. others.forEach((num) => {
  14863. res = operation(res, num);
  14864. });
  14865. return res;
  14866. }
  14867. function times(...nums) {
  14868. if (nums.length > 2) {
  14869. return iteratorOperation(nums, times);
  14870. }
  14871. const [num1, num2] = nums;
  14872. const num1Changed = float2Fixed(num1);
  14873. const num2Changed = float2Fixed(num2);
  14874. const baseNum = digitLength(num1) + digitLength(num2);
  14875. const leftValue = num1Changed * num2Changed;
  14876. checkBoundary(leftValue);
  14877. return leftValue / Math.pow(10, baseNum);
  14878. }
  14879. function divide(...nums) {
  14880. if (nums.length > 2) {
  14881. return iteratorOperation(nums, divide);
  14882. }
  14883. const [num1, num2] = nums;
  14884. const num1Changed = float2Fixed(num1);
  14885. const num2Changed = float2Fixed(num2);
  14886. checkBoundary(num1Changed);
  14887. checkBoundary(num2Changed);
  14888. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  14889. }
  14890. function round(num, ratio) {
  14891. const base = Math.pow(10, ratio);
  14892. let result = divide(Math.round(Math.abs(times(num, base))), base);
  14893. if (num < 0 && result !== 0) {
  14894. result = times(result, -1);
  14895. }
  14896. return result;
  14897. }
  14898. function range(min = 0, max = 0, value2 = 0) {
  14899. return Math.max(min, Math.min(max, Number(value2)));
  14900. }
  14901. function getPx(value2, unit = false) {
  14902. if (test.number(value2)) {
  14903. return unit ? `${value2}px` : Number(value2);
  14904. }
  14905. if (/(rpx|upx)$/.test(value2)) {
  14906. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  14907. }
  14908. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  14909. }
  14910. function sleep(value2 = 30) {
  14911. return new Promise((resolve) => {
  14912. setTimeout(() => {
  14913. resolve();
  14914. }, value2);
  14915. });
  14916. }
  14917. function os() {
  14918. return uni.getSystemInfoSync().platform.toLowerCase();
  14919. }
  14920. function sys() {
  14921. return uni.getSystemInfoSync();
  14922. }
  14923. function random(min, max) {
  14924. if (min >= 0 && max > 0 && max >= min) {
  14925. const gab = max - min + 1;
  14926. return Math.floor(Math.random() * gab + min);
  14927. }
  14928. return 0;
  14929. }
  14930. function guid(len = 32, firstU = true, radix = null) {
  14931. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  14932. const uuid = [];
  14933. radix = radix || chars.length;
  14934. if (len) {
  14935. for (let i = 0; i < len; i++)
  14936. uuid[i] = chars[0 | Math.random() * radix];
  14937. } else {
  14938. let r;
  14939. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  14940. uuid[14] = "4";
  14941. for (let i = 0; i < 36; i++) {
  14942. if (!uuid[i]) {
  14943. r = 0 | Math.random() * 16;
  14944. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  14945. }
  14946. }
  14947. }
  14948. if (firstU) {
  14949. uuid.shift();
  14950. return `u${uuid.join("")}`;
  14951. }
  14952. return uuid.join("");
  14953. }
  14954. function $parent(name = void 0) {
  14955. let parent = this.$parent;
  14956. while (parent) {
  14957. if (parent.$options && parent.$options.name !== name) {
  14958. parent = parent.$parent;
  14959. } else {
  14960. return parent;
  14961. }
  14962. }
  14963. return false;
  14964. }
  14965. function addStyle(customStyle, target = "object") {
  14966. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  14967. return customStyle;
  14968. }
  14969. if (target === "object") {
  14970. customStyle = trim(customStyle);
  14971. const styleArray = customStyle.split(";");
  14972. const style = {};
  14973. for (let i = 0; i < styleArray.length; i++) {
  14974. if (styleArray[i]) {
  14975. const item = styleArray[i].split(":");
  14976. style[trim(item[0])] = trim(item[1]);
  14977. }
  14978. }
  14979. return style;
  14980. }
  14981. let string2 = "";
  14982. for (const i in customStyle) {
  14983. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  14984. string2 += `${key}:${customStyle[i]};`;
  14985. }
  14986. return trim(string2);
  14987. }
  14988. function addUnit(value2 = "auto", unit = "") {
  14989. if (!unit) {
  14990. unit = uni.$u.config.unit || "px";
  14991. }
  14992. value2 = String(value2);
  14993. return test.number(value2) ? `${value2}${unit}` : value2;
  14994. }
  14995. function deepClone(obj) {
  14996. if ([null, void 0, NaN, false].includes(obj))
  14997. return obj;
  14998. if (typeof obj !== "object" && typeof obj !== "function") {
  14999. return obj;
  15000. }
  15001. const o = test.array(obj) ? [] : {};
  15002. for (const i in obj) {
  15003. if (obj.hasOwnProperty(i)) {
  15004. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  15005. }
  15006. }
  15007. return o;
  15008. }
  15009. function deepMerge(target = {}, source = {}) {
  15010. target = deepClone(target);
  15011. if (typeof target !== "object" || typeof source !== "object")
  15012. return false;
  15013. for (const prop in source) {
  15014. if (!source.hasOwnProperty(prop))
  15015. continue;
  15016. if (prop in target) {
  15017. if (typeof target[prop] !== "object") {
  15018. target[prop] = source[prop];
  15019. } else if (typeof source[prop] !== "object") {
  15020. target[prop] = source[prop];
  15021. } else if (target[prop].concat && source[prop].concat) {
  15022. target[prop] = target[prop].concat(source[prop]);
  15023. } else {
  15024. target[prop] = deepMerge(target[prop], source[prop]);
  15025. }
  15026. } else {
  15027. target[prop] = source[prop];
  15028. }
  15029. }
  15030. return target;
  15031. }
  15032. function error(err) {
  15033. {
  15034. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  15035. }
  15036. }
  15037. function randomArray(array3 = []) {
  15038. return array3.sort(() => Math.random() - 0.5);
  15039. }
  15040. if (!String.prototype.padStart) {
  15041. String.prototype.padStart = function(maxLength, fillString = " ") {
  15042. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  15043. throw new TypeError(
  15044. "fillString must be String"
  15045. );
  15046. }
  15047. const str = this;
  15048. if (str.length >= maxLength)
  15049. return String(str);
  15050. const fillLength = maxLength - str.length;
  15051. let times2 = Math.ceil(fillLength / fillString.length);
  15052. while (times2 >>= 1) {
  15053. fillString += fillString;
  15054. if (times2 === 1) {
  15055. fillString += fillString;
  15056. }
  15057. }
  15058. return fillString.slice(0, fillLength) + str;
  15059. };
  15060. }
  15061. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  15062. let date3;
  15063. if (!dateTime) {
  15064. date3 = /* @__PURE__ */ new Date();
  15065. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  15066. date3 = new Date(dateTime * 1e3);
  15067. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  15068. date3 = new Date(Number(dateTime));
  15069. } else {
  15070. date3 = new Date(
  15071. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  15072. );
  15073. }
  15074. const timeSource = {
  15075. "y": date3.getFullYear().toString(),
  15076. // 年
  15077. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  15078. // 月
  15079. "d": date3.getDate().toString().padStart(2, "0"),
  15080. // 日
  15081. "h": date3.getHours().toString().padStart(2, "0"),
  15082. // 时
  15083. "M": date3.getMinutes().toString().padStart(2, "0"),
  15084. // 分
  15085. "s": date3.getSeconds().toString().padStart(2, "0")
  15086. // 秒
  15087. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  15088. };
  15089. for (const key in timeSource) {
  15090. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  15091. if (ret) {
  15092. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  15093. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  15094. }
  15095. }
  15096. return formatStr;
  15097. }
  15098. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  15099. if (timestamp == null)
  15100. timestamp = Number(/* @__PURE__ */ new Date());
  15101. timestamp = parseInt(timestamp);
  15102. if (timestamp.toString().length == 10)
  15103. timestamp *= 1e3;
  15104. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  15105. timer = parseInt(timer / 1e3);
  15106. let tips = "";
  15107. switch (true) {
  15108. case timer < 300:
  15109. tips = "刚刚";
  15110. break;
  15111. case (timer >= 300 && timer < 3600):
  15112. tips = `${parseInt(timer / 60)}分钟前`;
  15113. break;
  15114. case (timer >= 3600 && timer < 86400):
  15115. tips = `${parseInt(timer / 3600)}小时前`;
  15116. break;
  15117. case (timer >= 86400 && timer < 2592e3):
  15118. tips = `${parseInt(timer / 86400)}天前`;
  15119. break;
  15120. default:
  15121. if (format2 === false) {
  15122. if (timer >= 2592e3 && timer < 365 * 86400) {
  15123. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  15124. } else {
  15125. tips = `${parseInt(timer / (86400 * 365))}年前`;
  15126. }
  15127. } else {
  15128. tips = timeFormat(timestamp, format2);
  15129. }
  15130. }
  15131. return tips;
  15132. }
  15133. function trim(str, pos = "both") {
  15134. str = String(str);
  15135. if (pos == "both") {
  15136. return str.replace(/^\s+|\s+$/g, "");
  15137. }
  15138. if (pos == "left") {
  15139. return str.replace(/^\s*/, "");
  15140. }
  15141. if (pos == "right") {
  15142. return str.replace(/(\s*$)/g, "");
  15143. }
  15144. if (pos == "all") {
  15145. return str.replace(/\s+/g, "");
  15146. }
  15147. return str;
  15148. }
  15149. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  15150. const prefix = isPrefix ? "?" : "";
  15151. const _result = [];
  15152. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  15153. arrayFormat = "brackets";
  15154. for (const key in data) {
  15155. const value2 = data[key];
  15156. if (["", void 0, null].indexOf(value2) >= 0) {
  15157. continue;
  15158. }
  15159. if (value2.constructor === Array) {
  15160. switch (arrayFormat) {
  15161. case "indices":
  15162. for (let i = 0; i < value2.length; i++) {
  15163. _result.push(`${key}[${i}]=${value2[i]}`);
  15164. }
  15165. break;
  15166. case "brackets":
  15167. value2.forEach((_value) => {
  15168. _result.push(`${key}[]=${_value}`);
  15169. });
  15170. break;
  15171. case "repeat":
  15172. value2.forEach((_value) => {
  15173. _result.push(`${key}=${_value}`);
  15174. });
  15175. break;
  15176. case "comma":
  15177. let commaStr = "";
  15178. value2.forEach((_value) => {
  15179. commaStr += (commaStr ? "," : "") + _value;
  15180. });
  15181. _result.push(`${key}=${commaStr}`);
  15182. break;
  15183. default:
  15184. value2.forEach((_value) => {
  15185. _result.push(`${key}[]=${_value}`);
  15186. });
  15187. }
  15188. } else {
  15189. _result.push(`${key}=${value2}`);
  15190. }
  15191. }
  15192. return _result.length ? prefix + _result.join("&") : "";
  15193. }
  15194. function toast(title, duration = 2e3) {
  15195. uni.showToast({
  15196. title: String(title),
  15197. icon: "none",
  15198. duration
  15199. });
  15200. }
  15201. function type2icon(type2 = "success", fill = false) {
  15202. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  15203. type2 = "success";
  15204. let iconName = "";
  15205. switch (type2) {
  15206. case "primary":
  15207. iconName = "info-circle";
  15208. break;
  15209. case "info":
  15210. iconName = "info-circle";
  15211. break;
  15212. case "error":
  15213. iconName = "close-circle";
  15214. break;
  15215. case "warning":
  15216. iconName = "error-circle";
  15217. break;
  15218. case "success":
  15219. iconName = "checkmark-circle";
  15220. break;
  15221. default:
  15222. iconName = "checkmark-circle";
  15223. }
  15224. if (fill)
  15225. iconName += "-fill";
  15226. return iconName;
  15227. }
  15228. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  15229. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  15230. const n = !isFinite(+number3) ? 0 : +number3;
  15231. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  15232. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  15233. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  15234. let s = "";
  15235. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  15236. const re = /(-?\d+)(\d{3})/;
  15237. while (re.test(s[0])) {
  15238. s[0] = s[0].replace(re, `$1${sep}$2`);
  15239. }
  15240. if ((s[1] || "").length < prec) {
  15241. s[1] = s[1] || "";
  15242. s[1] += new Array(prec - s[1].length + 1).join("0");
  15243. }
  15244. return s.join(dec);
  15245. }
  15246. function getDuration(value2, unit = true) {
  15247. const valueNum = parseInt(value2);
  15248. if (unit) {
  15249. if (/s$/.test(value2))
  15250. return value2;
  15251. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  15252. }
  15253. if (/ms$/.test(value2))
  15254. return valueNum;
  15255. if (/s$/.test(value2))
  15256. return valueNum > 30 ? valueNum : valueNum * 1e3;
  15257. return valueNum;
  15258. }
  15259. function padZero(value2) {
  15260. return `00${value2}`.slice(-2);
  15261. }
  15262. function formValidate(instance, event) {
  15263. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  15264. const form = uni.$u.$parent.call(instance, "u-form");
  15265. if (formItem && form) {
  15266. form.validateField(formItem.prop, () => {
  15267. }, event);
  15268. }
  15269. }
  15270. function getProperty(obj, key) {
  15271. if (!obj) {
  15272. return;
  15273. }
  15274. if (typeof key !== "string" || key === "") {
  15275. return "";
  15276. }
  15277. if (key.indexOf(".") !== -1) {
  15278. const keys = key.split(".");
  15279. let firstObj = obj[keys[0]] || {};
  15280. for (let i = 1; i < keys.length; i++) {
  15281. if (firstObj) {
  15282. firstObj = firstObj[keys[i]];
  15283. }
  15284. }
  15285. return firstObj;
  15286. }
  15287. return obj[key];
  15288. }
  15289. function setProperty(obj, key, value2) {
  15290. if (!obj) {
  15291. return;
  15292. }
  15293. const inFn = function(_obj, keys, v) {
  15294. if (keys.length === 1) {
  15295. _obj[keys[0]] = v;
  15296. return;
  15297. }
  15298. while (keys.length > 1) {
  15299. const k = keys[0];
  15300. if (!_obj[k] || typeof _obj[k] !== "object") {
  15301. _obj[k] = {};
  15302. }
  15303. keys.shift();
  15304. inFn(_obj[k], keys, v);
  15305. }
  15306. };
  15307. if (typeof key !== "string" || key === "")
  15308. ;
  15309. else if (key.indexOf(".") !== -1) {
  15310. const keys = key.split(".");
  15311. inFn(obj, keys, value2);
  15312. } else {
  15313. obj[key] = value2;
  15314. }
  15315. }
  15316. function page$1() {
  15317. const pages2 = getCurrentPages();
  15318. return `/${pages2[pages2.length - 1].route || ""}`;
  15319. }
  15320. function pages() {
  15321. const pages2 = getCurrentPages();
  15322. return pages2;
  15323. }
  15324. function setConfig({
  15325. props: props2 = {},
  15326. config: config2 = {},
  15327. color: color2 = {},
  15328. zIndex: zIndex2 = {}
  15329. }) {
  15330. const {
  15331. deepMerge: deepMerge2
  15332. } = uni.$u;
  15333. uni.$u.config = deepMerge2(uni.$u.config, config2);
  15334. uni.$u.props = deepMerge2(uni.$u.props, props2);
  15335. uni.$u.color = deepMerge2(uni.$u.color, color2);
  15336. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  15337. }
  15338. const index = {
  15339. range,
  15340. getPx,
  15341. sleep,
  15342. os,
  15343. sys,
  15344. random,
  15345. guid,
  15346. $parent,
  15347. addStyle,
  15348. addUnit,
  15349. deepClone,
  15350. deepMerge,
  15351. error,
  15352. randomArray,
  15353. timeFormat,
  15354. timeFrom,
  15355. trim,
  15356. queryParams,
  15357. toast,
  15358. type2icon,
  15359. priceFormat,
  15360. getDuration,
  15361. padZero,
  15362. formValidate,
  15363. getProperty,
  15364. setProperty,
  15365. page: page$1,
  15366. pages,
  15367. setConfig
  15368. };
  15369. const zIndex = {
  15370. toast: 10090,
  15371. noNetwork: 10080,
  15372. // popup包含popup,actionsheet,keyboard,picker的值
  15373. popup: 10075,
  15374. mask: 10070,
  15375. navbar: 980,
  15376. topTips: 975,
  15377. sticky: 970,
  15378. indexListSticky: 965
  15379. };
  15380. let platform = "none";
  15381. platform = "vue3";
  15382. platform = "plus";
  15383. const platform$1 = platform;
  15384. const $u = {
  15385. route,
  15386. date: index.timeFormat,
  15387. // 另名date
  15388. colorGradient: colorGradient$1.colorGradient,
  15389. hexToRgb: colorGradient$1.hexToRgb,
  15390. rgbToHex: colorGradient$1.rgbToHex,
  15391. colorToRgba: colorGradient$1.colorToRgba,
  15392. test,
  15393. type: ["primary", "success", "error", "warning", "info"],
  15394. http: new Request(),
  15395. config,
  15396. // uView配置信息相关,比如版本号
  15397. zIndex,
  15398. debounce,
  15399. throttle,
  15400. mixin,
  15401. mpMixin,
  15402. props: props$p,
  15403. ...index,
  15404. color,
  15405. platform: platform$1
  15406. };
  15407. uni.$u = $u;
  15408. const install = (Vue2) => {
  15409. Vue2.config.globalProperties.$u = $u;
  15410. Vue2.config.globalProperties.$nextTick = (cb) => {
  15411. cb();
  15412. };
  15413. Vue2.mixin(mixin);
  15414. };
  15415. const uviewPlus = {
  15416. install
  15417. };
  15418. const share = {
  15419. data() {
  15420. return {
  15421. // 默认的全局分享内容
  15422. share: {
  15423. title: "标题",
  15424. path: "/pages/home/home",
  15425. // 这里是分享的页面
  15426. imageUrl: ""
  15427. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  15428. }
  15429. };
  15430. },
  15431. // 定义全局分享
  15432. // 1.发送给朋友
  15433. onShareAppMessage(res) {
  15434. return {
  15435. title: this.share.title,
  15436. path: this.share.path,
  15437. imageUrl: this.share.imageUrl
  15438. };
  15439. },
  15440. //2.分享到朋友圈
  15441. onShareTimeline(res) {
  15442. return {
  15443. title: this.share.title,
  15444. path: this.share.path,
  15445. imageUrl: this.share.imageUrl
  15446. };
  15447. }
  15448. };
  15449. function initRequest() {
  15450. formatAppLog("log", "at config/request.js:8", "初始化了 http 请求代码");
  15451. uni.$u.http.setConfig((config2) => {
  15452. config2.baseURL = `http://tf.hqzf100.com/dev-api/`;
  15453. config2.custom.toast = true;
  15454. return config2;
  15455. });
  15456. uni.$u.http.interceptors.request.use((config2) => {
  15457. config2.data = config2.data || {};
  15458. let token = store.token;
  15459. config2.header.Authorization = token ? `Bearer ${token}` : "";
  15460. return config2;
  15461. }, (config2) => {
  15462. return Promise.reject(config2);
  15463. });
  15464. uni.$u.http.interceptors.response.use((response) => {
  15465. var _a;
  15466. const data = response.data;
  15467. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  15468. if (data.code !== 200) {
  15469. if (data.code === 401) {
  15470. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  15471. store.setToken("");
  15472. setTimeout(() => {
  15473. uni.$u.route({
  15474. type: "reLaunch",
  15475. url: "/pages/login/login"
  15476. // 跳转到登录页
  15477. });
  15478. }, 1e3);
  15479. } else {
  15480. if (custom.toast !== false) {
  15481. uni.$u.toast(data.msg);
  15482. }
  15483. return data;
  15484. }
  15485. }
  15486. return data;
  15487. }, (response) => {
  15488. return Promise.reject(response);
  15489. });
  15490. }
  15491. function createApp() {
  15492. const app = vue.createVueApp(App);
  15493. initRequest();
  15494. const pinia2 = createPinia();
  15495. app.use(pinia2).use(uviewPlus);
  15496. app.mixin(share);
  15497. return {
  15498. app,
  15499. pinia: pinia2
  15500. };
  15501. }
  15502. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  15503. uni.Vuex = __Vuex__;
  15504. uni.Pinia = __Pinia__;
  15505. __app__.provide("__globalStyles", __uniConfig.styles);
  15506. __app__._component.mpType = "app";
  15507. __app__._component.render = () => {
  15508. };
  15509. __app__.mount("#app");
  15510. })(Vue);