| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888 |
- if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
- Promise.prototype.finally = function(callback) {
- const promise = this.constructor;
- return this.then(
- (value) => promise.resolve(callback()).then(() => value),
- (reason) => promise.resolve(callback()).then(() => {
- throw reason;
- })
- );
- };
- }
- ;
- if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
- const global2 = uni.requireGlobal();
- ArrayBuffer = global2.ArrayBuffer;
- Int8Array = global2.Int8Array;
- Uint8Array = global2.Uint8Array;
- Uint8ClampedArray = global2.Uint8ClampedArray;
- Int16Array = global2.Int16Array;
- Uint16Array = global2.Uint16Array;
- Int32Array = global2.Int32Array;
- Uint32Array = global2.Uint32Array;
- Float32Array = global2.Float32Array;
- Float64Array = global2.Float64Array;
- BigInt64Array = global2.BigInt64Array;
- BigUint64Array = global2.BigUint64Array;
- }
- ;
- if (uni.restoreGlobal) {
- uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
- }
- (function(vue) {
- "use strict";
- const _export_sfc = (sfc, props2) => {
- const target = sfc.__vccOpts || sfc;
- for (const [key, val] of props2) {
- target[key] = val;
- }
- return target;
- };
- const _sfc_main$1q = {
- __name: "index",
- setup(__props, { expose: __expose }) {
- __expose();
- const expressOperations = vue.ref([
- {
- name: "中转签收",
- path: "/pages/index/express/transfer-sign",
- type: "primary"
- },
- {
- name: "到仓签收",
- path: "/pages/index/express/warehouse-sign",
- type: "warning"
- },
- {
- name: "重量修改",
- path: "/pages/index/express/weight-modify",
- type: "primary"
- },
- {
- name: "快速验收",
- path: "/pages/index/express/quick-check",
- type: "warning"
- },
- {
- name: "路由签收异常",
- path: "/pages/index/express/route-exception",
- type: "primary"
- },
- {
- name: "快速拆包",
- path: "/pages/index/express/quick-unpack",
- type: "warning"
- }
- ]);
- const auditOperations = vue.ref([
- {
- name: "确认收货",
- path: "/pages/index/audit/confirm-receipt",
- type: "primary"
- },
- {
- name: "扫书查单",
- path: "/pages/index/audit/scan-order",
- type: "warning"
- },
- {
- name: "根据快递单或订单",
- path: "/pages/index/audit/express-order",
- type: "warning"
- },
- {
- name: "根据发件人",
- path: "/pages/index/audit/sender",
- type: "primary"
- }
- ]);
- const wmsOperations = vue.ref([
- {
- name: "中等入库",
- path: "/pages/index/wms/medium-in",
- type: "primary"
- },
- {
- name: "良品入库",
- path: "/pages/index/wms/good-in",
- type: "warning"
- },
- {
- name: "次品入库",
- path: "/pages/index/wms/secondary-in",
- type: "primary"
- },
- {
- name: "不良入库",
- path: "/pages/index/wms/bad-in",
- type: "warning"
- },
- {
- name: "不良出库",
- path: "/pages/index/wms/bad-out",
- type: "primary"
- },
- {
- name: "不良下架",
- path: "/pages/index/wms/bad-off",
- type: "warning"
- },
- {
- name: "订单查询",
- path: "/pages/index/wms/order-query",
- type: "primary"
- },
- {
- name: "库位订单",
- path: "/pages/index/wms/location-order",
- type: "warning"
- },
- {
- name: "快速盘点",
- path: "/pages/index/wms/speedy-check",
- type: "primary",
- span: 24
- }
- ]);
- const statisticsOperations = vue.ref([
- {
- name: "审核统计",
- path: "/pages/index/statistics/audit",
- type: "warning",
- span: 24
- },
- {
- name: "售后统计",
- path: "/pages/index/statistics/after-sale",
- type: "primary"
- },
- {
- name: "打包统计",
- path: "/pages/index/statistics/package",
- type: "warning"
- }
- ]);
- const offlineOperations = vue.ref([
- {
- name: "线下核单",
- path: "/pages/index/offline/check-order",
- type: "primary"
- },
- {
- name: "核单记录",
- path: "/pages/index/offline/check-record",
- type: "warning"
- }
- ]);
- const entryOperations = vue.ref([
- {
- name: "扫码查书",
- path: "/pages/index/entry/scan-book",
- type: "primary"
- },
- {
- name: "录入书籍重量",
- path: "/pages/index/entry/book-weight",
- type: "warning"
- }
- ]);
- const handleNavigation = (path) => {
- uni.navigateTo({
- url: path,
- fail: () => {
- uni.showToast({
- title: "页面跳转失败",
- icon: "none"
- });
- }
- });
- };
- const __returned__ = { expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "operation-container" }, [
- vue.createCommentVNode(" 快递操作区域 "),
- vue.createElementVNode("view", { class: "section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "快递"),
- vue.createElementVNode("view", { class: "grid-container" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.expressOperations, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(["grid-item", item.type]),
- onClick: ($event) => $setup.handleNavigation(item.path)
- }, vue.toDisplayString(item.name), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createCommentVNode(" 审核操作区域 "),
- vue.createElementVNode("view", { class: "section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "审核"),
- vue.createElementVNode("view", { class: "grid-container" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.auditOperations, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(["grid-item", item.type]),
- onClick: ($event) => $setup.handleNavigation(item.path)
- }, vue.toDisplayString(item.name), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createCommentVNode(" 统计操作区域 "),
- vue.createElementVNode("view", { class: "section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "统计"),
- vue.createElementVNode("view", { class: "grid-container" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.statisticsOperations, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(["grid-item", item.type]),
- onClick: ($event) => $setup.handleNavigation(item.path)
- }, vue.toDisplayString(item.name), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createCommentVNode(" WMS操作区域 "),
- vue.createElementVNode("view", { class: "section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "WMS操作"),
- vue.createElementVNode("view", { class: "grid-container" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.wmsOperations, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(["grid-item", item.type]),
- onClick: ($event) => $setup.handleNavigation(item.path)
- }, vue.toDisplayString(item.name), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createCommentVNode(" 线下核单 "),
- vue.createElementVNode("view", { class: "section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "线下核单"),
- vue.createElementVNode("view", { class: "grid-container" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.offlineOperations, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(["grid-item", item.type]),
- onClick: ($event) => $setup.handleNavigation(item.path)
- }, vue.toDisplayString(item.name), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createCommentVNode(" 录入信息 "),
- vue.createElementVNode("view", { class: "section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "录入信息"),
- vue.createElementVNode("view", { class: "grid-container" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.entryOperations, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(["grid-item", item.type]),
- onClick: ($event) => $setup.handleNavigation(item.path)
- }, vue.toDisplayString(item.name), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ]);
- }
- const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/index.vue"]]);
- const icons = {
- "uicon-level": "",
- "uicon-column-line": "",
- "uicon-checkbox-mark": "",
- "uicon-folder": "",
- "uicon-movie": "",
- "uicon-star-fill": "",
- "uicon-star": "",
- "uicon-phone-fill": "",
- "uicon-phone": "",
- "uicon-apple-fill": "",
- "uicon-chrome-circle-fill": "",
- "uicon-backspace": "",
- "uicon-attach": "",
- "uicon-cut": "",
- "uicon-empty-car": "",
- "uicon-empty-coupon": "",
- "uicon-empty-address": "",
- "uicon-empty-favor": "",
- "uicon-empty-permission": "",
- "uicon-empty-news": "",
- "uicon-empty-search": "",
- "uicon-github-circle-fill": "",
- "uicon-rmb": "",
- "uicon-person-delete-fill": "",
- "uicon-reload": "",
- "uicon-order": "",
- "uicon-server-man": "",
- "uicon-search": "",
- "uicon-fingerprint": "",
- "uicon-more-dot-fill": "",
- "uicon-scan": "",
- "uicon-share-square": "",
- "uicon-map": "",
- "uicon-map-fill": "",
- "uicon-tags": "",
- "uicon-tags-fill": "",
- "uicon-bookmark-fill": "",
- "uicon-bookmark": "",
- "uicon-eye": "",
- "uicon-eye-fill": "",
- "uicon-mic": "",
- "uicon-mic-off": "",
- "uicon-calendar": "",
- "uicon-calendar-fill": "",
- "uicon-trash": "",
- "uicon-trash-fill": "",
- "uicon-play-left": "",
- "uicon-play-right": "",
- "uicon-minus": "",
- "uicon-plus": "",
- "uicon-info": "",
- "uicon-info-circle": "",
- "uicon-info-circle-fill": "",
- "uicon-question": "",
- "uicon-error": "",
- "uicon-close": "",
- "uicon-checkmark": "",
- "uicon-android-circle-fill": "",
- "uicon-android-fill": "",
- "uicon-ie": "",
- "uicon-IE-circle-fill": "",
- "uicon-google": "",
- "uicon-google-circle-fill": "",
- "uicon-setting-fill": "",
- "uicon-setting": "",
- "uicon-minus-square-fill": "",
- "uicon-plus-square-fill": "",
- "uicon-heart": "",
- "uicon-heart-fill": "",
- "uicon-camera": "",
- "uicon-camera-fill": "",
- "uicon-more-circle": "",
- "uicon-more-circle-fill": "",
- "uicon-chat": "",
- "uicon-chat-fill": "",
- "uicon-bag-fill": "",
- "uicon-bag": "",
- "uicon-error-circle-fill": "",
- "uicon-error-circle": "",
- "uicon-close-circle": "",
- "uicon-close-circle-fill": "",
- "uicon-checkmark-circle": "",
- "uicon-checkmark-circle-fill": "",
- "uicon-question-circle-fill": "",
- "uicon-question-circle": "",
- "uicon-share": "",
- "uicon-share-fill": "",
- "uicon-shopping-cart": "",
- "uicon-shopping-cart-fill": "",
- "uicon-bell": "",
- "uicon-bell-fill": "",
- "uicon-list": "",
- "uicon-list-dot": "",
- "uicon-zhihu": "",
- "uicon-zhihu-circle-fill": "",
- "uicon-zhifubao": "",
- "uicon-zhifubao-circle-fill": "",
- "uicon-weixin-circle-fill": "",
- "uicon-weixin-fill": "",
- "uicon-twitter-circle-fill": "",
- "uicon-twitter": "",
- "uicon-taobao-circle-fill": "",
- "uicon-taobao": "",
- "uicon-weibo-circle-fill": "",
- "uicon-weibo": "",
- "uicon-qq-fill": "",
- "uicon-qq-circle-fill": "",
- "uicon-moments-circel-fill": "",
- "uicon-moments": "",
- "uicon-qzone": "",
- "uicon-qzone-circle-fill": "",
- "uicon-baidu-circle-fill": "",
- "uicon-baidu": "",
- "uicon-facebook-circle-fill": "",
- "uicon-facebook": "",
- "uicon-car": "",
- "uicon-car-fill": "",
- "uicon-warning-fill": "",
- "uicon-warning": "",
- "uicon-clock-fill": "",
- "uicon-clock": "",
- "uicon-edit-pen": "",
- "uicon-edit-pen-fill": "",
- "uicon-email": "",
- "uicon-email-fill": "",
- "uicon-minus-circle": "",
- "uicon-minus-circle-fill": "",
- "uicon-plus-circle": "",
- "uicon-plus-circle-fill": "",
- "uicon-file-text": "",
- "uicon-file-text-fill": "",
- "uicon-pushpin": "",
- "uicon-pushpin-fill": "",
- "uicon-grid": "",
- "uicon-grid-fill": "",
- "uicon-play-circle": "",
- "uicon-play-circle-fill": "",
- "uicon-pause-circle-fill": "",
- "uicon-pause": "",
- "uicon-pause-circle": "",
- "uicon-eye-off": "",
- "uicon-eye-off-outline": "",
- "uicon-gift-fill": "",
- "uicon-gift": "",
- "uicon-rmb-circle-fill": "",
- "uicon-rmb-circle": "",
- "uicon-kefu-ermai": "",
- "uicon-server-fill": "",
- "uicon-coupon-fill": "",
- "uicon-coupon": "",
- "uicon-integral": "",
- "uicon-integral-fill": "",
- "uicon-home-fill": "",
- "uicon-home": "",
- "uicon-hourglass-half-fill": "",
- "uicon-hourglass": "",
- "uicon-account": "",
- "uicon-plus-people-fill": "",
- "uicon-minus-people-fill": "",
- "uicon-account-fill": "",
- "uicon-thumb-down-fill": "",
- "uicon-thumb-down": "",
- "uicon-thumb-up": "",
- "uicon-thumb-up-fill": "",
- "uicon-lock-fill": "",
- "uicon-lock-open": "",
- "uicon-lock-opened-fill": "",
- "uicon-lock": "",
- "uicon-red-packet-fill": "",
- "uicon-photo-fill": "",
- "uicon-photo": "",
- "uicon-volume-off-fill": "",
- "uicon-volume-off": "",
- "uicon-volume-fill": "",
- "uicon-volume": "",
- "uicon-red-packet": "",
- "uicon-download": "",
- "uicon-arrow-up-fill": "",
- "uicon-arrow-down-fill": "",
- "uicon-play-left-fill": "",
- "uicon-play-right-fill": "",
- "uicon-rewind-left-fill": "",
- "uicon-rewind-right-fill": "",
- "uicon-arrow-downward": "",
- "uicon-arrow-leftward": "",
- "uicon-arrow-rightward": "",
- "uicon-arrow-upward": "",
- "uicon-arrow-down": "",
- "uicon-arrow-right": "",
- "uicon-arrow-left": "",
- "uicon-arrow-up": "",
- "uicon-skip-back-left": "",
- "uicon-skip-forward-right": "",
- "uicon-rewind-right": "",
- "uicon-rewind-left": "",
- "uicon-arrow-right-double": "",
- "uicon-arrow-left-double": "",
- "uicon-wifi-off": "",
- "uicon-wifi": "",
- "uicon-empty-data": "",
- "uicon-empty-history": "",
- "uicon-empty-list": "",
- "uicon-empty-page": "",
- "uicon-empty-order": "",
- "uicon-man": "",
- "uicon-woman": "",
- "uicon-man-add": "",
- "uicon-man-add-fill": "",
- "uicon-man-delete": "",
- "uicon-man-delete-fill": "",
- "uicon-zh": "",
- "uicon-en": ""
- };
- const ON_SHOW = "onShow";
- const ON_HIDE = "onHide";
- const ON_LAUNCH = "onLaunch";
- function requireNativePlugin(name) {
- return weex.requireModule(name);
- }
- function formatAppLog(type2, filename, ...args) {
- if (uni.__log__) {
- uni.__log__(type2, filename, ...args);
- } else {
- console[type2].apply(console, [...args, filename]);
- }
- }
- function resolveEasycom(component, easycom) {
- return typeof component === "string" ? easycom : component;
- }
- const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
- !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
- };
- const onShow = /* @__PURE__ */ createHook(ON_SHOW);
- const onHide = /* @__PURE__ */ createHook(ON_HIDE);
- const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
- const version = "3";
- {
- formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", `
- %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
- `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
- }
- const config = {
- v: version,
- version,
- // 主题名称
- type: [
- "primary",
- "success",
- "info",
- "error",
- "warning"
- ],
- // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
- color: {
- "u-primary": "#2979ff",
- "u-warning": "#ff9900",
- "u-success": "#19be6b",
- "u-error": "#fa3534",
- "u-info": "#909399",
- "u-main-color": "#303133",
- "u-content-color": "#606266",
- "u-tips-color": "#909399",
- "u-light-color": "#c0c4cc"
- },
- // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
- unit: "px"
- };
- const ActionSheet = {
- // action-sheet组件
- actionSheet: {
- show: false,
- title: "",
- description: "",
- actions: () => [],
- index: "",
- cancelText: "",
- closeOnClickAction: true,
- safeAreaInsetBottom: true,
- openType: "",
- closeOnClickOverlay: true,
- round: 0
- }
- };
- const Album = {
- // album 组件
- album: {
- urls: () => [],
- keyName: "",
- singleSize: 180,
- multipleSize: 70,
- space: 6,
- singleMode: "scaleToFill",
- multipleMode: "aspectFill",
- maxCount: 9,
- previewFullImage: true,
- rowCount: 3,
- showMore: true
- }
- };
- const Alert = {
- // alert警告组件
- alert: {
- title: "",
- type: "warning",
- description: "",
- closable: false,
- showIcon: false,
- effect: "light",
- center: false,
- fontSize: 14
- }
- };
- const Avatar = {
- // avatar 组件
- avatar: {
- src: "",
- shape: "circle",
- size: 40,
- mode: "scaleToFill",
- text: "",
- bgColor: "#c0c4cc",
- color: "#ffffff",
- fontSize: 18,
- icon: "",
- mpAvatar: false,
- randomBgColor: false,
- defaultUrl: "",
- colorIndex: "",
- name: ""
- }
- };
- const AvatarGroup = {
- // avatarGroup 组件
- avatarGroup: {
- urls: () => [],
- maxCount: 5,
- shape: "circle",
- mode: "scaleToFill",
- showMore: true,
- size: 40,
- keyName: "",
- gap: 0.5,
- extraValue: 0
- }
- };
- const Backtop = {
- // backtop组件
- backtop: {
- mode: "circle",
- icon: "arrow-upward",
- text: "",
- duration: 100,
- scrollTop: 0,
- top: 400,
- bottom: 100,
- right: 20,
- zIndex: 9,
- iconStyle: () => ({
- color: "#909399",
- fontSize: "19px"
- })
- }
- };
- const Badge = {
- // 徽标数组件
- badge: {
- isDot: false,
- value: "",
- show: true,
- max: 999,
- type: "error",
- showZero: false,
- bgColor: null,
- color: null,
- shape: "circle",
- numberType: "overflow",
- offset: () => [],
- inverted: false,
- absolute: false
- }
- };
- const Button = {
- // button组件
- button: {
- hairline: false,
- type: "info",
- size: "normal",
- shape: "square",
- plain: false,
- disabled: false,
- loading: false,
- loadingText: "",
- loadingMode: "spinner",
- loadingSize: 15,
- openType: "",
- formType: "",
- appParameter: "",
- hoverStopPropagation: true,
- lang: "en",
- sessionFrom: "",
- sendMessageTitle: "",
- sendMessagePath: "",
- sendMessageImg: "",
- showMessageCard: false,
- dataName: "",
- throttleTime: 0,
- hoverStartTime: 0,
- hoverStayTime: 200,
- text: "",
- icon: "",
- iconColor: "",
- color: ""
- }
- };
- const Calendar = {
- // calendar 组件
- calendar: {
- title: "日期选择",
- showTitle: true,
- showSubtitle: true,
- mode: "single",
- startText: "开始",
- endText: "结束",
- customList: () => [],
- color: "#3c9cff",
- minDate: 0,
- maxDate: 0,
- defaultDate: null,
- maxCount: Number.MAX_SAFE_INTEGER,
- // Infinity
- rowHeight: 56,
- formatter: null,
- showLunar: false,
- showMark: true,
- confirmText: "确定",
- confirmDisabledText: "确定",
- show: false,
- closeOnClickOverlay: false,
- readonly: false,
- showConfirm: true,
- maxRange: Number.MAX_SAFE_INTEGER,
- // Infinity
- rangePrompt: "",
- showRangePrompt: true,
- allowSameDay: false,
- round: 0,
- monthNum: 3
- }
- };
- const CarKeyboard = {
- // 车牌号键盘
- carKeyboard: {
- random: false
- }
- };
- const Cell = {
- // cell组件的props
- cell: {
- customClass: "",
- title: "",
- label: "",
- value: "",
- icon: "",
- disabled: false,
- border: true,
- center: false,
- url: "",
- linkType: "navigateTo",
- clickable: false,
- isLink: false,
- required: false,
- arrowDirection: "",
- iconStyle: {},
- rightIconStyle: {},
- rightIcon: "arrow-right",
- titleStyle: {},
- size: "",
- stop: true,
- name: ""
- }
- };
- const CellGroup = {
- // cell-group组件的props
- cellGroup: {
- title: "",
- border: true,
- customStyle: {}
- }
- };
- const Checkbox = {
- // checkbox组件
- checkbox: {
- name: "",
- shape: "",
- size: "",
- checkbox: false,
- disabled: "",
- activeColor: "",
- inactiveColor: "",
- iconSize: "",
- iconColor: "",
- label: "",
- labelSize: "",
- labelColor: "",
- labelDisabled: ""
- }
- };
- const CheckboxGroup = {
- // checkbox-group组件
- checkboxGroup: {
- name: "",
- value: () => [],
- shape: "square",
- disabled: false,
- activeColor: "#2979ff",
- inactiveColor: "#c8c9cc",
- size: 18,
- placement: "row",
- labelSize: 14,
- labelColor: "#303133",
- labelDisabled: false,
- iconColor: "#ffffff",
- iconSize: 12,
- iconPlacement: "left",
- borderBottom: false
- }
- };
- const CircleProgress = {
- // circleProgress 组件
- circleProgress: {
- percentage: 30
- }
- };
- const Code = {
- // code 组件
- code: {
- seconds: 60,
- startText: "获取验证码",
- changeText: "X秒重新获取",
- endText: "重新获取",
- keepRunning: false,
- uniqueKey: ""
- }
- };
- const CodeInput = {
- // codeInput 组件
- codeInput: {
- adjustPosition: true,
- maxlength: 6,
- dot: false,
- mode: "box",
- hairline: false,
- space: 10,
- value: "",
- focus: false,
- bold: false,
- color: "#606266",
- fontSize: 18,
- size: 35,
- disabledKeyboard: false,
- borderColor: "#c9cacc",
- disabledDot: true
- }
- };
- const Col = {
- // col 组件
- col: {
- span: 12,
- offset: 0,
- justify: "start",
- align: "stretch",
- textAlign: "left"
- }
- };
- const Collapse = {
- // collapse 组件
- collapse: {
- value: null,
- accordion: false,
- border: true
- }
- };
- const CollapseItem = {
- // collapseItem 组件
- collapseItem: {
- title: "",
- value: "",
- label: "",
- disabled: false,
- isLink: true,
- clickable: true,
- border: true,
- align: "left",
- name: "",
- icon: "",
- duration: 300
- }
- };
- const ColumnNotice = {
- // columnNotice 组件
- columnNotice: {
- text: "",
- icon: "volume",
- mode: "",
- color: "#f9ae3d",
- bgColor: "#fdf6ec",
- fontSize: 14,
- speed: 80,
- step: false,
- duration: 1500,
- disableTouch: true
- }
- };
- const CountDown = {
- // u-count-down 计时器组件
- countDown: {
- time: 0,
- format: "HH:mm:ss",
- autoStart: true,
- millisecond: false
- }
- };
- const CountTo = {
- // countTo 组件
- countTo: {
- startVal: 0,
- endVal: 0,
- duration: 2e3,
- autoplay: true,
- decimals: 0,
- useEasing: true,
- decimal: ".",
- color: "#606266",
- fontSize: 22,
- bold: false,
- separator: ""
- }
- };
- const DatetimePicker = {
- // datetimePicker 组件
- datetimePicker: {
- show: false,
- showToolbar: true,
- value: "",
- title: "",
- mode: "datetime",
- maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
- minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
- minHour: 0,
- maxHour: 23,
- minMinute: 0,
- maxMinute: 59,
- filter: null,
- formatter: null,
- loading: false,
- itemHeight: 44,
- cancelText: "取消",
- confirmText: "确认",
- cancelColor: "#909193",
- confirmColor: "#3c9cff",
- visibleItemCount: 5,
- closeOnClickOverlay: false,
- defaultIndex: () => []
- }
- };
- const Divider = {
- // divider组件
- divider: {
- dashed: false,
- hairline: true,
- dot: false,
- textPosition: "center",
- text: "",
- textSize: 14,
- textColor: "#909399",
- lineColor: "#dcdfe6"
- }
- };
- const Empty = {
- // empty组件
- empty: {
- icon: "",
- text: "",
- textColor: "#c0c4cc",
- textSize: 14,
- iconColor: "#c0c4cc",
- iconSize: 90,
- mode: "data",
- width: 160,
- height: 160,
- show: true,
- marginTop: 0
- }
- };
- const Form = {
- // form 组件
- form: {
- model: () => ({}),
- rules: () => ({}),
- errorType: "message",
- borderBottom: true,
- labelPosition: "left",
- labelWidth: 45,
- labelAlign: "left",
- labelStyle: () => ({})
- }
- };
- const GormItem = {
- // formItem 组件
- formItem: {
- label: "",
- prop: "",
- borderBottom: "",
- labelWidth: "",
- rightIcon: "",
- leftIcon: "",
- required: false,
- leftIconStyle: ""
- }
- };
- const Gap = {
- // gap组件
- gap: {
- bgColor: "transparent",
- height: 20,
- marginTop: 0,
- marginBottom: 0,
- customStyle: {}
- }
- };
- const Grid = {
- // grid组件
- grid: {
- col: 3,
- border: false,
- align: "left"
- }
- };
- const GridItem = {
- // grid-item组件
- gridItem: {
- name: null,
- bgColor: "transparent"
- }
- };
- const {
- color: color$3
- } = config;
- const Icon = {
- // icon组件
- icon: {
- name: "",
- color: color$3["u-content-color"],
- size: "16px",
- bold: false,
- index: "",
- hoverClass: "",
- customPrefix: "uicon",
- label: "",
- labelPos: "right",
- labelSize: "15px",
- labelColor: color$3["u-content-color"],
- space: "3px",
- imgMode: "",
- width: "",
- height: "",
- top: 0,
- stop: false
- }
- };
- const Image = {
- // image组件
- image: {
- src: "",
- mode: "aspectFill",
- width: "300",
- height: "225",
- shape: "square",
- radius: 0,
- lazyLoad: true,
- showMenuByLongpress: true,
- loadingIcon: "photo",
- errorIcon: "error-circle",
- showLoading: true,
- showError: true,
- fade: true,
- webp: false,
- duration: 500,
- bgColor: "#f3f4f6"
- }
- };
- const IndexAnchor = {
- // indexAnchor 组件
- indexAnchor: {
- text: "",
- color: "#606266",
- size: 14,
- bgColor: "#dedede",
- height: 32
- }
- };
- const IndexList = {
- // indexList 组件
- indexList: {
- inactiveColor: "#606266",
- activeColor: "#5677fc",
- indexList: () => [],
- sticky: true,
- customNavHeight: 0
- }
- };
- const Input = {
- // index 组件
- input: {
- value: "",
- type: "text",
- fixed: false,
- disabled: false,
- disabledColor: "#f5f7fa",
- clearable: false,
- password: false,
- maxlength: -1,
- placeholder: null,
- placeholderClass: "input-placeholder",
- placeholderStyle: "color: #c0c4cc",
- showWordLimit: false,
- confirmType: "done",
- confirmHold: false,
- holdKeyboard: false,
- focus: false,
- autoBlur: false,
- disableDefaultPadding: false,
- cursor: -1,
- cursorSpacing: 30,
- selectionStart: -1,
- selectionEnd: -1,
- adjustPosition: true,
- inputAlign: "left",
- fontSize: "15px",
- color: "#303133",
- prefixIcon: "",
- prefixIconStyle: "",
- suffixIcon: "",
- suffixIconStyle: "",
- border: "surround",
- readonly: false,
- shape: "square",
- formatter: null
- }
- };
- const Keyboard = {
- // 键盘组件
- keyboard: {
- mode: "number",
- dotDisabled: false,
- tooltip: true,
- showTips: true,
- tips: "",
- showCancel: true,
- showConfirm: true,
- random: false,
- safeAreaInsetBottom: true,
- closeOnClickOverlay: true,
- show: false,
- overlay: true,
- zIndex: 10075,
- cancelText: "取消",
- confirmText: "确定",
- autoChange: false
- }
- };
- const Line = {
- // line组件
- line: {
- color: "#d6d7d9",
- length: "100%",
- direction: "row",
- hairline: true,
- margin: 0,
- dashed: false
- }
- };
- const LineProgress = {
- // lineProgress 组件
- lineProgress: {
- activeColor: "#19be6b",
- inactiveColor: "#ececec",
- percentage: 0,
- showText: true,
- height: 12
- }
- };
- const {
- color: color$2
- } = config;
- const Link = {
- // link超链接组件props参数
- link: {
- color: color$2["u-primary"],
- fontSize: 15,
- underLine: false,
- href: "",
- mpTips: "链接已复制,请在浏览器打开",
- lineColor: "",
- text: ""
- }
- };
- const List = {
- // list 组件
- list: {
- showScrollbar: false,
- lowerThreshold: 50,
- upperThreshold: 0,
- scrollTop: 0,
- offsetAccuracy: 10,
- enableFlex: false,
- pagingEnabled: false,
- scrollable: true,
- scrollIntoView: "",
- scrollWithAnimation: false,
- enableBackToTop: false,
- height: 0,
- width: 0,
- preLoadScreen: 1
- }
- };
- const ListItem = {
- // listItem 组件
- listItem: {
- anchor: ""
- }
- };
- const {
- color: color$1
- } = config;
- const LoadingIcon = {
- // loading-icon加载中图标组件
- loadingIcon: {
- show: true,
- color: color$1["u-tips-color"],
- textColor: color$1["u-tips-color"],
- vertical: false,
- mode: "spinner",
- size: 24,
- textSize: 15,
- text: "",
- timingFunction: "ease-in-out",
- duration: 1200,
- inactiveColor: ""
- }
- };
- const LoadingPage = {
- // loading-page组件
- loadingPage: {
- loadingText: "正在加载",
- image: "",
- loadingMode: "circle",
- loading: false,
- bgColor: "#ffffff",
- color: "#C8C8C8",
- fontSize: 19,
- iconSize: 28,
- loadingColor: "#C8C8C8"
- }
- };
- const Loadmore = {
- // loadmore 组件
- loadmore: {
- status: "loadmore",
- bgColor: "transparent",
- icon: true,
- fontSize: 14,
- iconSize: 17,
- color: "#606266",
- loadingIcon: "spinner",
- loadmoreText: "加载更多",
- loadingText: "正在加载...",
- nomoreText: "没有更多了",
- isDot: false,
- iconColor: "#b7b7b7",
- marginTop: 10,
- marginBottom: 10,
- height: "auto",
- line: false,
- lineColor: "#E6E8EB",
- dashed: false
- }
- };
- const Modal = {
- // modal 组件
- modal: {
- show: false,
- title: "",
- content: "",
- confirmText: "确认",
- cancelText: "取消",
- showConfirmButton: true,
- showCancelButton: false,
- confirmColor: "#2979ff",
- cancelColor: "#606266",
- buttonReverse: false,
- zoom: true,
- asyncClose: false,
- closeOnClickOverlay: false,
- negativeTop: 0,
- width: "650rpx",
- confirmButtonShape: ""
- }
- };
- const color = {
- primary: "#3c9cff",
- info: "#909399",
- default: "#909399",
- warning: "#f9ae3d",
- error: "#f56c6c",
- success: "#5ac725",
- mainColor: "#303133",
- contentColor: "#606266",
- tipsColor: "#909399",
- lightColor: "#c0c4cc",
- borderColor: "#e4e7ed"
- };
- const Navbar = {
- // navbar 组件
- navbar: {
- safeAreaInsetTop: true,
- placeholder: false,
- fixed: true,
- border: false,
- leftIcon: "arrow-left",
- leftText: "",
- rightText: "",
- rightIcon: "",
- title: "",
- bgColor: "#ffffff",
- titleWidth: "400rpx",
- height: "44px",
- leftIconSize: 20,
- leftIconColor: color.mainColor,
- autoBack: false,
- titleStyle: ""
- }
- };
- const NoNetwork = {
- // noNetwork
- noNetwork: {
- tips: "哎呀,网络信号丢失",
- zIndex: "",
- image: "data:image/png;base64,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"
- }
- };
- const NoticeBar = {
- // noticeBar
- noticeBar: {
- text: () => [],
- direction: "row",
- step: false,
- icon: "volume",
- mode: "",
- color: "#f9ae3d",
- bgColor: "#fdf6ec",
- speed: 80,
- fontSize: 14,
- duration: 2e3,
- disableTouch: true,
- url: "",
- linkType: "navigateTo"
- }
- };
- const Notify = {
- // notify组件
- notify: {
- top: 0,
- type: "primary",
- color: "#ffffff",
- bgColor: "",
- message: "",
- duration: 3e3,
- fontSize: 15,
- safeAreaInsetTop: false
- }
- };
- const NumberBox = {
- // 步进器组件
- numberBox: {
- name: "",
- value: 0,
- min: 1,
- max: Number.MAX_SAFE_INTEGER,
- step: 1,
- integer: false,
- disabled: false,
- disabledInput: false,
- asyncChange: false,
- inputWidth: 35,
- showMinus: true,
- showPlus: true,
- decimalLength: null,
- longPress: true,
- color: "#323233",
- buttonSize: 30,
- bgColor: "#EBECEE",
- cursorSpacing: 100,
- disableMinus: false,
- disablePlus: false,
- iconStyle: ""
- }
- };
- const NumberKeyboard = {
- // 数字键盘
- numberKeyboard: {
- mode: "number",
- dotDisabled: false,
- random: false
- }
- };
- const Overlay = {
- // overlay组件
- overlay: {
- show: false,
- zIndex: 10070,
- duration: 300,
- opacity: 0.5
- }
- };
- const Parse = {
- // parse
- parse: {
- copyLink: true,
- errorImg: "",
- lazyLoad: false,
- loadingImg: "",
- pauseVideo: true,
- previewImg: true,
- setTitle: true,
- showImgMenu: true
- }
- };
- const Picker = {
- // picker
- picker: {
- show: false,
- showToolbar: true,
- title: "",
- columns: () => [],
- loading: false,
- itemHeight: 44,
- cancelText: "取消",
- confirmText: "确定",
- cancelColor: "#909193",
- confirmColor: "#3c9cff",
- visibleItemCount: 5,
- keyName: "text",
- closeOnClickOverlay: false,
- defaultIndex: () => [],
- immediateChange: false
- }
- };
- const Popup = {
- // popup组件
- popup: {
- show: false,
- overlay: true,
- mode: "bottom",
- duration: 300,
- closeable: false,
- overlayStyle: () => {
- },
- closeOnClickOverlay: true,
- zIndex: 10075,
- safeAreaInsetBottom: true,
- safeAreaInsetTop: false,
- closeIconPos: "top-right",
- round: 0,
- zoom: true,
- bgColor: "",
- overlayOpacity: 0.5
- }
- };
- const Radio = {
- // radio组件
- radio: {
- name: "",
- shape: "",
- disabled: "",
- labelDisabled: "",
- activeColor: "",
- inactiveColor: "",
- iconSize: "",
- labelSize: "",
- label: "",
- labelColor: "",
- size: "",
- iconColor: "",
- placement: ""
- }
- };
- const RadioGroup = {
- // radio-group组件
- radioGroup: {
- value: "",
- disabled: false,
- shape: "circle",
- activeColor: "#2979ff",
- inactiveColor: "#c8c9cc",
- name: "",
- size: 18,
- placement: "row",
- label: "",
- labelColor: "#303133",
- labelSize: 14,
- labelDisabled: false,
- iconColor: "#ffffff",
- iconSize: 12,
- borderBottom: false,
- iconPlacement: "left"
- }
- };
- const Rate = {
- // rate组件
- rate: {
- value: 1,
- count: 5,
- disabled: false,
- size: 18,
- inactiveColor: "#b2b2b2",
- activeColor: "#FA3534",
- gutter: 4,
- minCount: 1,
- allowHalf: false,
- activeIcon: "star-fill",
- inactiveIcon: "star",
- touchable: true
- }
- };
- const ReadMore = {
- // readMore
- readMore: {
- showHeight: 400,
- toggle: false,
- closeText: "展开阅读全文",
- openText: "收起",
- color: "#2979ff",
- fontSize: 14,
- textIndent: "2em",
- name: ""
- }
- };
- const Row = {
- // row
- row: {
- gutter: 0,
- justify: "start",
- align: "center"
- }
- };
- const RowNotice = {
- // rowNotice
- rowNotice: {
- text: "",
- icon: "volume",
- mode: "",
- color: "#f9ae3d",
- bgColor: "#fdf6ec",
- fontSize: 14,
- speed: 80
- }
- };
- const ScrollList = {
- // scrollList
- scrollList: {
- indicatorWidth: 50,
- indicatorBarWidth: 20,
- indicator: true,
- indicatorColor: "#f2f2f2",
- indicatorActiveColor: "#3c9cff",
- indicatorStyle: ""
- }
- };
- const Search = {
- // search
- search: {
- shape: "round",
- bgColor: "#f2f2f2",
- placeholder: "请输入关键字",
- clearabled: true,
- focus: false,
- showAction: true,
- actionStyle: () => ({}),
- actionText: "搜索",
- inputAlign: "left",
- inputStyle: () => ({}),
- disabled: false,
- borderColor: "transparent",
- searchIconColor: "#909399",
- searchIconSize: 22,
- color: "#606266",
- placeholderColor: "#909399",
- searchIcon: "search",
- margin: "0",
- animation: false,
- value: "",
- maxlength: "-1",
- height: 32,
- label: null
- }
- };
- const Section = {
- // u-section组件
- section: {
- title: "",
- subTitle: "更多",
- right: true,
- fontSize: 15,
- bold: true,
- color: "#303133",
- subColor: "#909399",
- showLine: true,
- lineColor: "",
- arrow: true
- }
- };
- const Skeleton = {
- // skeleton
- skeleton: {
- loading: true,
- animate: true,
- rows: 0,
- rowsWidth: "100%",
- rowsHeight: 18,
- title: true,
- titleWidth: "50%",
- titleHeight: 18,
- avatar: false,
- avatarSize: 32,
- avatarShape: "circle"
- }
- };
- const Slider = {
- // slider组件
- slider: {
- value: 0,
- blockSize: 18,
- min: 0,
- max: 100,
- step: 1,
- activeColor: "#2979ff",
- inactiveColor: "#c0c4cc",
- blockColor: "#ffffff",
- showValue: false,
- disabled: false,
- blockStyle: () => {
- }
- }
- };
- const StatusBar = {
- // statusBar
- statusBar: {
- bgColor: "transparent"
- }
- };
- const Steps = {
- // steps组件
- steps: {
- direction: "row",
- current: 0,
- activeColor: "#3c9cff",
- inactiveColor: "#969799",
- activeIcon: "",
- inactiveIcon: "",
- dot: false
- }
- };
- const StepsItem = {
- // steps-item组件
- stepsItem: {
- title: "",
- desc: "",
- iconSize: 17,
- error: false
- }
- };
- const Sticky = {
- // sticky组件
- sticky: {
- offsetTop: 0,
- customNavHeight: 0,
- disabled: false,
- bgColor: "transparent",
- zIndex: "",
- index: ""
- }
- };
- const Subsection = {
- // subsection组件
- subsection: {
- list: [],
- current: 0,
- activeColor: "#3c9cff",
- inactiveColor: "#303133",
- mode: "button",
- fontSize: 12,
- bold: true,
- bgColor: "#eeeeef",
- keyName: "name"
- }
- };
- const SwipeAction = {
- // swipe-action组件
- swipeAction: {
- autoClose: true
- }
- };
- const SwipeActionItem = {
- // swipeActionItem 组件
- swipeActionItem: {
- show: false,
- name: "",
- disabled: false,
- threshold: 20,
- autoClose: true,
- options: [],
- duration: 300
- }
- };
- const Swiper = {
- // swiper 组件
- swiper: {
- list: () => [],
- indicator: false,
- indicatorActiveColor: "#FFFFFF",
- indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
- indicatorStyle: "",
- indicatorMode: "line",
- autoplay: true,
- current: 0,
- currentItemId: "",
- interval: 3e3,
- duration: 300,
- circular: false,
- previousMargin: 0,
- nextMargin: 0,
- acceleration: false,
- displayMultipleItems: 1,
- easingFunction: "default",
- keyName: "url",
- imgMode: "aspectFill",
- height: 130,
- bgColor: "#f3f4f6",
- radius: 4,
- loading: false,
- showTitle: false
- }
- };
- const SwipterIndicator = {
- // swiperIndicator 组件
- swiperIndicator: {
- length: 0,
- current: 0,
- indicatorActiveColor: "",
- indicatorInactiveColor: "",
- indicatorMode: "line"
- }
- };
- const Switch = {
- // switch
- switch: {
- loading: false,
- disabled: false,
- size: 25,
- activeColor: "#2979ff",
- inactiveColor: "#ffffff",
- value: false,
- activeValue: true,
- inactiveValue: false,
- asyncChange: false,
- space: 0
- }
- };
- const Tabbar = {
- // tabbar
- tabbar: {
- value: null,
- safeAreaInsetBottom: true,
- border: true,
- zIndex: 1,
- activeColor: "#1989fa",
- inactiveColor: "#7d7e80",
- fixed: true,
- placeholder: true
- }
- };
- const TabbarItem = {
- //
- tabbarItem: {
- name: null,
- icon: "",
- badge: null,
- dot: false,
- text: "",
- badgeStyle: "top: 6px;right:2px;"
- }
- };
- const Tabs = {
- //
- tabs: {
- duration: 300,
- list: () => [],
- lineColor: "#3c9cff",
- activeStyle: () => ({
- color: "#303133"
- }),
- inactiveStyle: () => ({
- color: "#606266"
- }),
- lineWidth: 20,
- lineHeight: 3,
- lineBgSize: "cover",
- itemStyle: () => ({
- height: "44px"
- }),
- scrollable: true,
- current: 0,
- keyName: "name"
- }
- };
- const Tag = {
- // tag 组件
- tag: {
- type: "primary",
- disabled: false,
- size: "medium",
- shape: "square",
- text: "",
- bgColor: "",
- color: "",
- borderColor: "",
- closeColor: "#C6C7CB",
- name: "",
- plainFill: false,
- plain: false,
- closable: false,
- show: true,
- icon: ""
- }
- };
- const Text = {
- // text 组件
- text: {
- type: "",
- show: true,
- text: "",
- prefixIcon: "",
- suffixIcon: "",
- mode: "",
- href: "",
- format: "",
- call: false,
- openType: "",
- bold: false,
- block: false,
- lines: "",
- color: "#303133",
- size: 15,
- iconStyle: () => ({
- fontSize: "15px"
- }),
- decoration: "none",
- margin: 0,
- lineHeight: "",
- align: "left",
- wordWrap: "normal"
- }
- };
- const Textarea = {
- // textarea 组件
- textarea: {
- value: "",
- placeholder: "",
- placeholderClass: "textarea-placeholder",
- placeholderStyle: "color: #c0c4cc",
- height: 70,
- confirmType: "done",
- disabled: false,
- count: false,
- focus: false,
- autoHeight: false,
- fixed: false,
- cursorSpacing: 0,
- cursor: "",
- showConfirmBar: true,
- selectionStart: -1,
- selectionEnd: -1,
- adjustPosition: true,
- disableDefaultPadding: false,
- holdKeyboard: false,
- maxlength: 140,
- border: "surround",
- formatter: null
- }
- };
- const Toast = {
- // toast组件
- toast: {
- zIndex: 10090,
- loading: false,
- text: "",
- icon: "",
- type: "",
- loadingMode: "",
- show: "",
- overlay: false,
- position: "center",
- params: () => {
- },
- duration: 2e3,
- isTab: false,
- url: "",
- callback: null,
- back: false
- }
- };
- const Toolbar = {
- // toolbar 组件
- toolbar: {
- show: true,
- cancelText: "取消",
- confirmText: "确认",
- cancelColor: "#909193",
- confirmColor: "#3c9cff",
- title: ""
- }
- };
- const Tooltip = {
- // tooltip 组件
- tooltip: {
- text: "",
- copyText: "",
- size: 14,
- color: "#606266",
- bgColor: "transparent",
- direction: "top",
- zIndex: 10071,
- showCopy: true,
- buttons: () => [],
- overlay: true,
- showToast: true
- }
- };
- const Transition = {
- // transition动画组件的props
- transition: {
- show: false,
- mode: "fade",
- duration: "300",
- timingFunction: "ease-out"
- }
- };
- const Upload = {
- // upload组件
- upload: {
- accept: "image",
- capture: () => ["album", "camera"],
- compressed: true,
- camera: "back",
- maxDuration: 60,
- uploadIcon: "camera-fill",
- uploadIconColor: "#D3D4D6",
- useBeforeRead: false,
- previewFullImage: true,
- maxCount: 52,
- disabled: false,
- imageMode: "aspectFill",
- name: "",
- sizeType: () => ["original", "compressed"],
- multiple: false,
- deletable: true,
- maxSize: Number.MAX_VALUE,
- fileList: () => [],
- uploadText: "",
- width: 80,
- height: 80,
- previewImage: true
- }
- };
- const drawer = {
- // 抽屉组件
- drawer: {
- // 是否显示
- show: false,
- // 点击遮罩是否关闭
- mask: true,
- // // 是否显示关闭按钮
- // closeBtn:true,
- // 抽屉宽度
- width: "40%",
- // 抽屉位置
- placement: "left",
- // 权重
- zIndex: 100
- }
- };
- const props$x = {
- ...ActionSheet,
- ...Album,
- ...Alert,
- ...Avatar,
- ...AvatarGroup,
- ...Backtop,
- ...Badge,
- ...Button,
- ...Calendar,
- ...CarKeyboard,
- ...Cell,
- ...CellGroup,
- ...Checkbox,
- ...CheckboxGroup,
- ...CircleProgress,
- ...Code,
- ...CodeInput,
- ...Col,
- ...Collapse,
- ...CollapseItem,
- ...ColumnNotice,
- ...CountDown,
- ...CountTo,
- ...DatetimePicker,
- ...Divider,
- ...Empty,
- ...Form,
- ...GormItem,
- ...Gap,
- ...Grid,
- ...GridItem,
- ...Icon,
- ...Image,
- ...IndexAnchor,
- ...IndexList,
- ...Input,
- ...Keyboard,
- ...Line,
- ...LineProgress,
- ...Link,
- ...List,
- ...ListItem,
- ...LoadingIcon,
- ...LoadingPage,
- ...Loadmore,
- ...Modal,
- ...Navbar,
- ...NoNetwork,
- ...NoticeBar,
- ...Notify,
- ...NumberBox,
- ...NumberKeyboard,
- ...Overlay,
- ...Parse,
- ...Picker,
- ...Popup,
- ...Radio,
- ...RadioGroup,
- ...Rate,
- ...ReadMore,
- ...Row,
- ...RowNotice,
- ...ScrollList,
- ...Search,
- ...Section,
- ...Skeleton,
- ...Slider,
- ...StatusBar,
- ...Steps,
- ...StepsItem,
- ...Sticky,
- ...Subsection,
- ...SwipeAction,
- ...SwipeActionItem,
- ...Swiper,
- ...SwipterIndicator,
- ...Switch,
- ...Tabbar,
- ...TabbarItem,
- ...Tabs,
- ...Tag,
- ...Text,
- ...Textarea,
- ...Toast,
- ...Toolbar,
- ...Tooltip,
- ...Transition,
- ...Upload,
- ...drawer
- };
- const props$w = {
- props: {
- // 图标类名
- name: {
- type: String,
- default: props$x.icon.name
- },
- // 图标颜色,可接受主题色
- color: {
- type: String,
- default: props$x.icon.color
- },
- // 字体大小,单位px
- size: {
- type: [String, Number],
- default: props$x.icon.size
- },
- // 是否显示粗体
- bold: {
- type: Boolean,
- default: props$x.icon.bold
- },
- // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
- index: {
- type: [String, Number],
- default: props$x.icon.index
- },
- // 触摸图标时的类名
- hoverClass: {
- type: String,
- default: props$x.icon.hoverClass
- },
- // 自定义扩展前缀,方便用户扩展自己的图标库
- customPrefix: {
- type: String,
- default: props$x.icon.customPrefix
- },
- // 图标右边或者下面的文字
- label: {
- type: [String, Number],
- default: props$x.icon.label
- },
- // label的位置,只能右边或者下边
- labelPos: {
- type: String,
- default: props$x.icon.labelPos
- },
- // label的大小
- labelSize: {
- type: [String, Number],
- default: props$x.icon.labelSize
- },
- // label的颜色
- labelColor: {
- type: String,
- default: props$x.icon.labelColor
- },
- // label与图标的距离
- space: {
- type: [String, Number],
- default: props$x.icon.space
- },
- // 图片的mode
- imgMode: {
- type: String,
- default: props$x.icon.imgMode
- },
- // 用于显示图片小图标时,图片的宽度
- width: {
- type: [String, Number],
- default: props$x.icon.width
- },
- // 用于显示图片小图标时,图片的高度
- height: {
- type: [String, Number],
- default: props$x.icon.height
- },
- // 用于解决某些情况下,让图标垂直居中的用途
- top: {
- type: [String, Number],
- default: props$x.icon.top
- },
- // 是否阻止事件传播
- stop: {
- type: Boolean,
- default: props$x.icon.stop
- }
- }
- };
- const mpMixin = {};
- const mixin = {
- // 定义每个组件都可能需要用到的外部样式以及类名
- props: {
- // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
- customStyle: {
- type: [Object, String],
- default: () => ({})
- },
- customClass: {
- type: String,
- default: ""
- },
- // 跳转的页面路径
- url: {
- type: String,
- default: ""
- },
- // 页面跳转的类型
- linkType: {
- type: String,
- default: "navigateTo"
- }
- },
- data() {
- return {};
- },
- onLoad() {
- this.$u.getRect = this.$uGetRect;
- },
- created() {
- this.$u.getRect = this.$uGetRect;
- },
- computed: {
- // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
- // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
- // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
- $u() {
- return uni.$u.deepMerge(uni.$u, {
- props: void 0,
- http: void 0,
- mixin: void 0
- });
- },
- /**
- * 生成bem规则类名
- * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
- * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
- * @param {String} name 组件名称
- * @param {Array} fixed 一直会存在的类名
- * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
- * @returns {Array|string}
- */
- bem() {
- return function(name, fixed, change) {
- const prefix = `u-${name}--`;
- const classes = {};
- if (fixed) {
- fixed.map((item) => {
- classes[prefix + this[item]] = true;
- });
- }
- if (change) {
- change.map((item) => {
- this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
- });
- }
- return Object.keys(classes);
- };
- }
- },
- methods: {
- // 跳转某一个页面
- openPage(urlKey = "url") {
- const url2 = this[urlKey];
- if (url2) {
- this.$u.route({ type: this.linkType, url: url2 });
- }
- },
- // 查询节点信息
- // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
- // 解决办法为在组件根部再套一个没有任何作用的view元素
- $uGetRect(selector, all) {
- return new Promise((resolve) => {
- uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
- if (all && Array.isArray(rect) && rect.length) {
- resolve(rect);
- }
- if (!all && rect) {
- resolve(rect);
- }
- }).exec();
- });
- },
- getParentData(parentName = "") {
- if (!this.parent)
- this.parent = {};
- this.parent = uni.$u.$parent.call(this, parentName);
- if (this.parent.children) {
- this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
- }
- if (this.parent && this.parentData) {
- Object.keys(this.parentData).map((key) => {
- this.parentData[key] = this.parent[key];
- });
- }
- },
- // 阻止事件冒泡
- preventEvent(e) {
- e && typeof e.stopPropagation === "function" && e.stopPropagation();
- },
- // 空操作
- noop(e) {
- this.preventEvent(e);
- }
- },
- onReachBottom() {
- uni.$emit("uOnReachBottom");
- },
- beforeDestroy() {
- if (this.parent && uni.$u.test.array(this.parent.children)) {
- const childrenList = this.parent.children;
- childrenList.map((child, index2) => {
- if (child === this) {
- childrenList.splice(index2, 1);
- }
- });
- }
- }
- };
- const _sfc_main$1p = {
- name: "u-icon",
- data() {
- return {};
- },
- emits: ["click"],
- mixins: [mpMixin, mixin, props$w],
- computed: {
- uClasses() {
- let classes = [];
- classes.push(this.customPrefix + "-" + this.name);
- if (this.color && uni.$u.config.type.includes(this.color))
- classes.push("u-icon__icon--" + this.color);
- return classes;
- },
- iconStyle() {
- let style = {};
- style = {
- fontSize: uni.$u.addUnit(this.size),
- lineHeight: uni.$u.addUnit(this.size),
- fontWeight: this.bold ? "bold" : "normal",
- // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
- top: uni.$u.addUnit(this.top)
- };
- if (this.color && !uni.$u.config.type.includes(this.color))
- style.color = this.color;
- return style;
- },
- // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
- isImg() {
- return this.name.indexOf("/") !== -1;
- },
- imgStyle() {
- let style = {};
- style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size);
- style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size);
- return style;
- },
- // 通过图标名,查找对应的图标
- icon() {
- return icons["uicon-" + this.name] || this.name;
- }
- },
- methods: {
- clickHandler(e) {
- this.$emit("click", this.index);
- this.stop && this.preventEvent(e);
- }
- }
- };
- function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- },
- [
- $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "u-icon__img",
- src: _ctx.name,
- mode: _ctx.imgMode,
- style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)])
- }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: vue.normalizeClass(["u-icon__icon", $options.uClasses]),
- style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
- "hover-class": _ctx.hoverClass
- }, vue.toDisplayString($options.icon), 15, ["hover-class"])),
- vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
- _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 2,
- class: "u-icon__label",
- style: vue.normalizeStyle({
- color: _ctx.labelColor,
- fontSize: _ctx.$u.addUnit(_ctx.labelSize),
- marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0,
- marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0,
- marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0,
- marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0
- })
- },
- vue.toDisplayString(_ctx.label),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- );
- }
- const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-ac70166d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
- const props$v = {
- props: {
- // 文字颜色
- color: {
- type: String,
- default: props$x.link.color
- },
- // 字体大小,单位px
- fontSize: {
- type: [String, Number],
- default: props$x.link.fontSize
- },
- // 是否显示下划线
- underLine: {
- type: Boolean,
- default: props$x.link.underLine
- },
- // 要跳转的链接
- href: {
- type: String,
- default: props$x.link.href
- },
- // 小程序中复制到粘贴板的提示语
- mpTips: {
- type: String,
- default: props$x.link.mpTips
- },
- // 下划线颜色
- lineColor: {
- type: String,
- default: props$x.link.lineColor
- },
- // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
- text: {
- type: String,
- default: props$x.link.text
- }
- }
- };
- const _sfc_main$1o = {
- name: "u-link",
- mixins: [mpMixin, mixin, props$v],
- computed: {
- linkStyle() {
- const style = {
- color: this.color,
- fontSize: uni.$u.addUnit(this.fontSize),
- // line-height设置为比字体大小多2px
- lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
- textDecoration: this.underLine ? "underline" : "none"
- };
- return style;
- }
- },
- methods: {
- openLink() {
- plus.runtime.openURL(this.href);
- this.$emit("click");
- }
- }
- };
- function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "text",
- {
- class: "u-link",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
- style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
- },
- vue.toDisplayString(_ctx.text),
- 5
- /* TEXT, STYLE */
- );
- }
- const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-12f6646d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
- const value = {
- computed: {
- // 经处理后需要显示的值
- value() {
- const {
- text,
- mode,
- format: format2,
- href
- } = this;
- if (mode === "price") {
- if (!/^\d+(\.\d+)?$/.test(text)) {
- uni.$u.error("金额模式下,text参数需要为金额格式");
- }
- if (uni.$u.test.func(format2)) {
- return format2(text);
- }
- return uni.$u.priceFormat(text, 2);
- }
- if (mode === "date") {
- !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
- if (uni.$u.test.func(format2)) {
- return format2(text);
- }
- if (format2) {
- return uni.$u.timeFormat(text, format2);
- }
- return uni.$u.timeFormat(text, "yyyy-mm-dd");
- }
- if (mode === "phone") {
- if (uni.$u.test.func(format2)) {
- return format2(text);
- }
- if (format2 === "encrypt") {
- return `${text.substr(0, 3)}****${text.substr(7)}`;
- }
- return text;
- }
- if (mode === "name") {
- !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
- if (uni.$u.test.func(format2)) {
- return format2(text);
- }
- if (format2 === "encrypt") {
- return this.formatName(text);
- }
- return text;
- }
- if (mode === "link") {
- !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
- return text;
- }
- return text;
- }
- },
- methods: {
- // 默认的姓名脱敏规则
- formatName(name) {
- let value2 = "";
- if (name.length === 2) {
- value2 = name.substr(0, 1) + "*";
- } else if (name.length > 2) {
- let char = "";
- for (let i = 0, len = name.length - 2; i < len; i++) {
- char += "*";
- }
- value2 = name.substr(0, 1) + char + name.substr(-1, 1);
- } else {
- value2 = name;
- }
- return value2;
- }
- }
- };
- const props$u = {
- props: {
- // 主题颜色
- type: {
- type: String,
- default: props$x.text.type
- },
- // 是否显示
- show: {
- type: Boolean,
- default: props$x.text.show
- },
- // 显示的值
- text: {
- type: [String, Number],
- default: props$x.text.text
- },
- // 前置图标
- prefixIcon: {
- type: String,
- default: props$x.text.prefixIcon
- },
- // 后置图标
- suffixIcon: {
- type: String,
- default: props$x.text.suffixIcon
- },
- // 文本处理的匹配模式
- // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
- mode: {
- type: String,
- default: props$x.text.mode
- },
- // mode=link下,配置的链接
- href: {
- type: String,
- default: props$x.text.href
- },
- // 格式化规则
- format: {
- type: [String, Function],
- default: props$x.text.format
- },
- // mode=phone时,点击文本是否拨打电话
- call: {
- type: Boolean,
- default: props$x.text.call
- },
- // 小程序的打开方式
- openType: {
- type: String,
- default: props$x.text.openType
- },
- // 是否粗体,默认normal
- bold: {
- type: Boolean,
- default: props$x.text.bold
- },
- // 是否块状
- block: {
- type: Boolean,
- default: props$x.text.block
- },
- // 文本显示的行数,如果设置,超出此行数,将会显示省略号
- lines: {
- type: [String, Number],
- default: props$x.text.lines
- },
- // 文本颜色
- color: {
- type: String,
- default: props$x.text.color
- },
- // 字体大小
- size: {
- type: [String, Number],
- default: props$x.text.size
- },
- // 图标的样式
- iconStyle: {
- type: [Object, String],
- default: props$x.text.iconStyle
- },
- // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
- decoration: {
- tepe: String,
- default: props$x.text.decoration
- },
- // 外边距,对象、字符串,数值形式均可
- margin: {
- type: [Object, String, Number],
- default: props$x.text.margin
- },
- // 文本行高
- lineHeight: {
- type: [String, Number],
- default: props$x.text.lineHeight
- },
- // 文本对齐方式,可选值left|center|right
- align: {
- type: String,
- default: props$x.text.align
- },
- // 文字换行,可选值break-word|normal|anywhere
- wordWrap: {
- type: String,
- default: props$x.text.wordWrap
- }
- }
- };
- const _sfc_main$1n = {
- name: "u--text",
- mixins: [mpMixin, mixin, value, props$u],
- emits: ["click"],
- computed: {
- valueStyle() {
- const style = {
- textDecoration: this.decoration,
- fontWeight: this.bold ? "bold" : "normal",
- wordWrap: this.wordWrap,
- fontSize: uni.$u.addUnit(this.size)
- };
- !this.type && (style.color = this.color);
- this.isNvue && this.lines && (style.lines = this.lines);
- this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
- !this.isNvue && this.block && (style.display = "block");
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- },
- isNvue() {
- let nvue = false;
- return nvue;
- },
- isMp() {
- let mp = false;
- return mp;
- }
- },
- data() {
- return {};
- },
- methods: {
- clickHandler() {
- if (this.call && this.mode === "phone") {
- uni.makePhoneCall({
- phoneNumber: this.text
- });
- }
- this.$emit("click");
- }
- }
- };
- function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$9);
- return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-text", []]),
- style: vue.normalizeStyle({
- margin: _ctx.margin,
- justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
- }),
- onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- },
- [
- _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
- style: vue.normalizeStyle([$options.valueStyle])
- },
- "¥",
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-text__prefix-icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: _ctx.prefixIcon,
- customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
- }, null, 8, ["name", "customStyle"])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
- key: 2,
- text: _ctx.value,
- href: _ctx.href,
- underLine: ""
- }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
- key: 3,
- class: "u-reset-button u-text__value",
- style: vue.normalizeStyle([$options.valueStyle]),
- "data-index": _ctx.index,
- openType: _ctx.openType,
- onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
- onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
- onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
- onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
- onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
- onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
- lang: _ctx.lang,
- "session-from": _ctx.sessionFrom,
- "send-message-title": _ctx.sendMessageTitle,
- "send-message-path": _ctx.sendMessagePath,
- "send-message-img": _ctx.sendMessageImg,
- "show-message-card": _ctx.showMessageCard,
- "app-parameter": _ctx.appParameter
- }, 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(
- "text",
- {
- key: 4,
- class: vue.normalizeClass(["u-text__value", [
- _ctx.type && `u-text__value--${_ctx.type}`,
- _ctx.lines && `u-line-${_ctx.lines}`
- ]]),
- style: vue.normalizeStyle([$options.valueStyle])
- },
- vue.toDisplayString(_ctx.value),
- 7
- /* TEXT, CLASS, STYLE */
- )),
- _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "u-text__suffix-icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: _ctx.suffixIcon,
- customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
- }, null, 8, ["name", "customStyle"])
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true);
- }
- const uvText = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-0a574502"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
- const _sfc_main$1m = {
- name: "u--text",
- mixins: [mpMixin, mixin, props$u],
- components: {
- uvText
- }
- };
- function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uvText = vue.resolveComponent("uvText");
- return vue.openBlock(), vue.createBlock(_component_uvText, {
- type: _ctx.type,
- show: _ctx.show,
- text: _ctx.text,
- prefixIcon: _ctx.prefixIcon,
- suffixIcon: _ctx.suffixIcon,
- mode: _ctx.mode,
- href: _ctx.href,
- format: _ctx.format,
- call: _ctx.call,
- openType: _ctx.openType,
- bold: _ctx.bold,
- block: _ctx.block,
- lines: _ctx.lines,
- color: _ctx.color,
- decoration: _ctx.decoration,
- size: _ctx.size,
- iconStyle: _ctx.iconStyle,
- margin: _ctx.margin,
- lineHeight: _ctx.lineHeight,
- align: _ctx.align,
- wordWrap: _ctx.wordWrap,
- customStyle: _ctx.customStyle
- }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
- }
- const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
- const props$t = {
- props: {
- // 头像图片路径(不能为相对路径)
- src: {
- type: String,
- default: props$x.avatar.src
- },
- // 头像形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$x.avatar.shape
- },
- // 头像尺寸
- size: {
- type: [String, Number],
- default: props$x.avatar.size
- },
- // 裁剪模式
- mode: {
- type: String,
- default: props$x.avatar.mode
- },
- // 显示的文字
- text: {
- type: String,
- default: props$x.avatar.text
- },
- // 背景色
- bgColor: {
- type: String,
- default: props$x.avatar.bgColor
- },
- // 文字颜色
- color: {
- type: String,
- default: props$x.avatar.color
- },
- // 文字大小
- fontSize: {
- type: [String, Number],
- default: props$x.avatar.fontSize
- },
- // 显示的图标
- icon: {
- type: String,
- default: props$x.avatar.icon
- },
- // 显示小程序头像,只对百度,微信,QQ小程序有效
- mpAvatar: {
- type: Boolean,
- default: props$x.avatar.mpAvatar
- },
- // 是否使用随机背景色
- randomBgColor: {
- type: Boolean,
- default: props$x.avatar.randomBgColor
- },
- // 加载失败的默认头像(组件有内置默认图片)
- defaultUrl: {
- type: String,
- default: props$x.avatar.defaultUrl
- },
- // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
- colorIndex: {
- type: [String, Number],
- // 校验参数规则,索引在0-19之间
- validator(n) {
- return uni.$u.test.range(n, [0, 19]) || n === "";
- },
- default: props$x.avatar.colorIndex
- },
- // 组件标识符
- name: {
- type: String,
- default: props$x.avatar.name
- }
- }
- };
- const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYG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";
- const _sfc_main$1l = {
- name: "u-avatar",
- mixins: [mpMixin, mixin, props$t],
- data() {
- return {
- // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
- colors: [
- "#ffb34b",
- "#f2bba9",
- "#f7a196",
- "#f18080",
- "#88a867",
- "#bfbf39",
- "#89c152",
- "#94d554",
- "#f19ec2",
- "#afaae4",
- "#e1b0df",
- "#c38cc1",
- "#72dcdc",
- "#9acdcb",
- "#77b1cc",
- "#448aca",
- "#86cefa",
- "#98d1ee",
- "#73d1f1",
- "#80a7dc"
- ],
- avatarUrl: this.src,
- allowMp: false
- };
- },
- watch: {
- // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
- // 而组件内部不能直接修改props的值,所以需要一个中间变量
- src: {
- immediate: true,
- handler(newVal) {
- this.avatarUrl = newVal;
- if (!newVal) {
- this.errorHandler();
- }
- }
- }
- },
- computed: {
- imageStyle() {
- const style = {};
- return style;
- }
- },
- created() {
- this.init();
- },
- methods: {
- init() {
- },
- // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
- isImg() {
- return this.src.indexOf("/") !== -1;
- },
- // 图片加载时失败时触发
- errorHandler() {
- this.avatarUrl = this.defaultUrl || base64Avatar;
- },
- clickHandler() {
- this.$emit("click", this.name);
- }
- }
- };
- function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_1$8);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]),
- style: vue.normalizeStyle([{
- backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : _ctx.$u.random(0, 19)] : _ctx.bgColor : "transparent",
- width: _ctx.$u.addUnit(_ctx.size),
- height: _ctx.$u.addUnit(_ctx.size)
- }, _ctx.$u.addStyle(_ctx.customStyle)]),
- onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [],
- 64
- /* STABLE_FRAGMENT */
- )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 1,
- name: _ctx.icon,
- size: _ctx.fontSize,
- color: _ctx.color
- }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_u__text, {
- key: 2,
- text: _ctx.text,
- size: _ctx.fontSize,
- color: _ctx.color,
- align: "center",
- customStyle: "justify-content: center"
- }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 3,
- class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]),
- src: $data.avatarUrl || _ctx.defaultUrl,
- mode: _ctx.mode,
- onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)),
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.size),
- height: _ctx.$u.addUnit(_ctx.size)
- }])
- }, null, 46, ["src", "mode"]))
- ], true)
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-34d954f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
- const props$s = {
- props: {
- color: {
- type: String,
- default: props$x.line.color
- },
- // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
- length: {
- type: [String, Number],
- default: props$x.line.length
- },
- // 线条方向,col-竖向,row-横向
- direction: {
- type: String,
- default: props$x.line.direction
- },
- // 是否显示细边框
- hairline: {
- type: Boolean,
- default: props$x.line.hairline
- },
- // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
- margin: {
- type: [String, Number],
- default: props$x.line.margin
- },
- // 是否虚线,true-虚线,false-实线
- dashed: {
- type: Boolean,
- default: props$x.line.dashed
- }
- }
- };
- const _sfc_main$1k = {
- name: "u-line",
- mixins: [mpMixin, mixin, props$s],
- computed: {
- lineStyle() {
- const style = {};
- style.margin = this.margin;
- if (this.direction === "row") {
- style.borderBottomWidth = "1px";
- style.borderBottomStyle = this.dashed ? "dashed" : "solid";
- style.width = uni.$u.addUnit(this.length);
- if (this.hairline)
- style.transform = "scaleY(0.5)";
- } else {
- style.borderLeftWidth = "1px";
- style.borderLeftStyle = this.dashed ? "dashed" : "solid";
- style.height = uni.$u.addUnit(this.length);
- if (this.hairline)
- style.transform = "scaleX(0.5)";
- }
- style.borderColor = this.color;
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- }
- };
- function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-line",
- style: vue.normalizeStyle([$options.lineStyle])
- },
- null,
- 4
- /* STYLE */
- );
- }
- const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-72791e59"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
- const props$r = {
- props: {
- // 标题
- title: {
- type: [String, Number],
- default: props$x.cell.title
- },
- // 标题下方的描述信息
- label: {
- type: [String, Number],
- default: props$x.cell.label
- },
- // 右侧的内容
- value: {
- type: [String, Number],
- default: props$x.cell.value
- },
- // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
- icon: {
- type: String,
- default: props$x.cell.icon
- },
- // 是否禁用cell
- disabled: {
- type: Boolean,
- default: props$x.cell.disabled
- },
- // 是否显示下边框
- border: {
- type: Boolean,
- default: props$x.cell.border
- },
- // 内容是否垂直居中(主要是针对右侧的value部分)
- center: {
- type: Boolean,
- default: props$x.cell.center
- },
- // 点击后跳转的URL地址
- url: {
- type: String,
- default: props$x.cell.url
- },
- // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
- linkType: {
- type: String,
- default: props$x.cell.linkType
- },
- // 是否开启点击反馈(表现为点击时加上灰色背景)
- clickable: {
- type: Boolean,
- default: props$x.cell.clickable
- },
- // 是否展示右侧箭头并开启点击反馈
- isLink: {
- type: Boolean,
- default: props$x.cell.isLink
- },
- // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
- required: {
- type: Boolean,
- default: props$x.cell.required
- },
- // 右侧的图标箭头
- rightIcon: {
- type: String,
- default: props$x.cell.rightIcon
- },
- // 右侧箭头的方向,可选值为:left,up,down
- arrowDirection: {
- type: String,
- default: props$x.cell.arrowDirection
- },
- // 左侧图标样式
- iconStyle: {
- type: [Object, String],
- default: () => {
- return uni.$u.props.cell.iconStyle;
- }
- },
- // 右侧箭头图标的样式
- rightIconStyle: {
- type: [Object, String],
- default: () => {
- return uni.$u.props.cell.rightIconStyle;
- }
- },
- // 标题的样式
- titleStyle: {
- type: [Object, String],
- default: () => {
- return uni.$u.props.cell.titleStyle;
- }
- },
- // 单位元的大小,可选值为large
- size: {
- type: String,
- default: props$x.cell.size
- },
- // 点击cell是否阻止事件传播
- stop: {
- type: Boolean,
- default: props$x.cell.stop
- },
- // 标识符,cell被点击时返回
- name: {
- type: [Number, String],
- default: props$x.cell.name
- }
- }
- };
- const _sfc_main$1j = {
- name: "u-cell",
- data() {
- return {};
- },
- mixins: [mpMixin, mixin, props$r],
- computed: {
- titleTextStyle() {
- return uni.$u.addStyle(this.titleStyle);
- }
- },
- emits: ["click"],
- methods: {
- // 点击cell
- clickHandler(e) {
- if (this.disabled)
- return;
- this.$emit("click", {
- name: this.name
- });
- this.openPage();
- this.stop && this.preventEvent(e);
- }
- }
- };
- function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["u-cell", [_ctx.customClass]]),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
- "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
- "hover-stay-time": 250,
- onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]])
- },
- [
- vue.createElementVNode("view", { class: "u-cell__body__content" }, [
- vue.createElementVNode("view", { class: "u-cell__left-icon-wrap" }, [
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
- _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: _ctx.icon,
- "custom-style": _ctx.iconStyle,
- size: _ctx.size === "large" ? 22 : 18
- }, null, 8, ["name", "custom-style", "size"])) : vue.createCommentVNode("v-if", true)
- ], true)
- ]),
- vue.createElementVNode("view", { class: "u-cell__title" }, [
- vue.renderSlot(_ctx.$slots, "title", {}, () => [
- _ctx.title ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass(["u-cell__title-text", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]),
- style: vue.normalizeStyle([$options.titleTextStyle])
- },
- vue.toDisplayString(_ctx.title),
- 7
- /* TEXT, CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], true),
- vue.renderSlot(_ctx.$slots, "label", {}, () => [
- _ctx.label ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]])
- },
- vue.toDisplayString(_ctx.label),
- 3
- /* TEXT, CLASS */
- )) : vue.createCommentVNode("v-if", true)
- ], true)
- ])
- ]),
- vue.renderSlot(_ctx.$slots, "value", {}, () => [
- !_ctx.$u.test.empty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]])
- },
- vue.toDisplayString(_ctx.value),
- 3
- /* TEXT, CLASS */
- )) : vue.createCommentVNode("v-if", true)
- ], true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
- },
- [
- vue.renderSlot(_ctx.$slots, "right-icon", {}, () => [
- _ctx.isLink ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: _ctx.rightIcon,
- "custom-style": _ctx.rightIconStyle,
- color: _ctx.disabled ? "#c8c9cc" : "info",
- size: _ctx.size === "large" ? 18 : 16
- }, null, 8, ["name", "custom-style", "color", "size"])) : vue.createCommentVNode("v-if", true)
- ], true)
- ],
- 2
- /* CLASS */
- )
- ],
- 2
- /* CLASS */
- ),
- _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
- ], 14, ["hover-class"]);
- }
- const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-3fd6feca"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
- const props$q = {
- props: {
- // 分组标题
- title: {
- type: String,
- default: props$x.cellGroup.title
- },
- // 是否显示外边框
- border: {
- type: Boolean,
- default: props$x.cellGroup.border
- }
- }
- };
- const _sfc_main$1i = {
- name: "u-cell-group",
- mixins: [mpMixin, mixin, props$q]
- };
- function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
- class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"])
- },
- [
- _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-cell-group__title"
- }, [
- vue.renderSlot(_ctx.$slots, "title", {}, () => [
- vue.createElementVNode(
- "text",
- { class: "u-cell-group__title__text" },
- vue.toDisplayString(_ctx.title),
- 1
- /* TEXT */
- )
- ], true)
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [
- _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ])
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_2$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-014d39dc"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
- const _sfc_main$1h = {
- __name: "my",
- setup(__props, { expose: __expose }) {
- __expose();
- const settingsList = vue.ref([
- {
- title: "用户信息",
- path: "/pages/my/page/user-info",
- icon: "account"
- },
- {
- title: "默认仓库",
- path: "/pages/my/page/warehouse",
- icon: "home"
- },
- {
- title: "学校设置",
- path: "/pages/my/page/school"
- },
- {
- title: "审核未完成",
- path: "/pages/my/page/audit-unfinished",
- icon: "order"
- },
- {
- title: "版本设置",
- path: "/pages/my/page/version",
- icon: "tags"
- },
- {
- title: "音频设置",
- path: "/pages/my/page/volume",
- icon: "volume"
- },
- {
- title: "图书显示设置",
- path: "/pages/my/page/book-display",
- icon: "bookmark"
- },
- {
- title: "修改密码",
- icon: "lock",
- path: "/pages/my/page/password"
- },
- {
- title: "退出账号",
- path: "/pages/my/page/logout",
- type: "logout"
- }
- ]);
- const handleClick = (item) => {
- if (item.type === "logout") {
- uni.showModal({
- title: "提示",
- content: "确定要退出登录吗?",
- success: (res) => {
- if (res.confirm) {
- uni.clearStorageSync();
- uni.reLaunch({
- url: "/pages/login/index"
- });
- }
- }
- });
- return;
- }
- uni.navigateTo({
- url: item.path
- });
- };
- const __returned__ = { settingsList, handleClick, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$9);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
- const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "settings-page" }, [
- vue.createCommentVNode(" 顶部用户信息 "),
- vue.createElementVNode("view", { class: "user-header" }, [
- vue.createElementVNode("view", { class: "user-info" }, [
- vue.createVNode(_component_u_avatar, {
- size: 50,
- src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
- }),
- vue.createElementVNode("view", { class: "greeting" }, [
- vue.createElementVNode("text", { class: "time" }, "下午好!"),
- vue.createElementVNode("text", { class: "name" }, "涨涨涨")
- ])
- ])
- ]),
- vue.createCommentVNode(" 设置列表 "),
- vue.createElementVNode("view", { class: "settings-list" }, [
- vue.createVNode(_component_u_cell_group, { border: false }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.settingsList, (item, index2) => {
- return vue.openBlock(), vue.createBlock(_component_u_cell, {
- key: index2,
- title: item.title,
- isLink: true,
- onClick: ($event) => $setup.handleClick(item),
- border: index2 == $setup.settingsList.length - 1 ? false : true
- }, {
- icon: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "cell-icon" }, [
- vue.createVNode(_component_u_icon, {
- name: item.icon || "setting",
- size: "32rpx",
- color: "#333"
- }, null, 8, ["name"])
- ])
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["title", "onClick", "border"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- const PagesMyMy = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-2f1ef635"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/my.vue"]]);
- const GlobalOption = {
- down: {
- // 其他down的配置参数也可以写,这里只展示了常用的配置:
- offset: 80,
- // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
- native: false
- // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
- },
- up: {
- // 其他up的配置参数也可以写,这里只展示了常用的配置:
- offset: 150,
- // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
- toTop: {
- // 回到顶部按钮,需配置src才显示
- src: "https://www.mescroll.com/img/mescroll-totop.png",
- // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
- offset: 1e3,
- // 列表滚动多少距离才显示回到顶部按钮,默认1000px
- right: 20,
- // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
- bottom: 120,
- // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
- width: 72
- // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
- },
- empty: {
- use: true,
- // 是否显示空布局
- icon: "https://www.mescroll.com/img/mescroll-empty.png"
- // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
- }
- },
- // 国际化配置
- i18n: {
- // 中文
- zh: {
- down: {
- textInOffset: "下拉刷新",
- // 下拉的距离在offset范围内的提示文本
- textOutOffset: "释放更新",
- // 下拉的距离大于offset范围的提示文本
- textLoading: "加载中 ...",
- // 加载中的提示文本
- textSuccess: "加载成功",
- // 加载成功的文本
- textErr: "加载失败"
- // 加载失败的文本
- },
- up: {
- textLoading: "加载中 ...",
- // 加载中的提示文本
- textNoMore: "-- END --",
- // 没有更多数据的提示文本
- empty: {
- tip: "暂无数据"
- // 空提示
- }
- }
- },
- // 英文
- en: {
- down: {
- textInOffset: "drop down refresh",
- textOutOffset: "release updates",
- textLoading: "loading ...",
- textSuccess: "loaded successfully",
- textErr: "loading failed"
- },
- up: {
- textLoading: "loading ...",
- textNoMore: "-- END --",
- empty: {
- tip: "~ absolutely empty ~"
- }
- }
- }
- }
- };
- const mescrollI18n = {
- // 默认语言
- def: "zh",
- // 获取当前语言类型
- getType() {
- return uni.getStorageSync("mescroll-i18n") || this.def;
- },
- // 设置当前语言类型
- setType(type2) {
- uni.setStorageSync("mescroll-i18n", type2);
- }
- };
- const _imports_0 = "/assets/no-result.6af066e5.png";
- const _sfc_main$1g = {
- props: {
- // empty的配置项: 默认为GlobalOption.up.empty
- option: {
- type: Object,
- default() {
- return {};
- }
- }
- },
- // 使用computed获取配置,用于支持option的动态配置
- computed: {
- // 图标
- icon() {
- if (this.option.icon != null) {
- return this.option.icon;
- } else {
- let i18nType = mescrollI18n.getType();
- if (this.option.i18n) {
- return this.option.i18n[i18nType].icon;
- } else {
- return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
- }
- }
- },
- // 文本提示
- tip() {
- if (this.option.tip != null) {
- return this.option.tip;
- } else {
- let i18nType = mescrollI18n.getType();
- if (this.option.i18n) {
- return this.option.i18n[i18nType].tip;
- } else {
- return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
- }
- }
- },
- // 按钮文本
- btnText() {
- if (this.option.i18n) {
- let i18nType = mescrollI18n.getType();
- return this.option.i18n[i18nType].btnText;
- } else {
- return this.option.btnText;
- }
- }
- },
- methods: {
- // 点击按钮
- emptyClick() {
- this.$emit("emptyclick");
- }
- }
- };
- function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
- style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
- },
- [
- vue.createCommentVNode(' <view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view> '),
- vue.createElementVNode("view", null, [
- $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "empty-icon",
- src: _imports_0,
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true)
- ]),
- $options.tip ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "empty-tip"
- },
- vue.toDisplayString($options.tip),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $options.btnText ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "empty-btn",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
- },
- vue.toDisplayString($options.btnText),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-7cefd855"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]);
- function MeScroll(options, isScrollBody) {
- let me = this;
- me.version = "1.3.7";
- me.options = options || {};
- me.isScrollBody = isScrollBody || false;
- me.isDownScrolling = false;
- me.isUpScrolling = false;
- let hasDownCallback = me.options.down && me.options.down.callback;
- me.initDownScroll();
- me.initUpScroll();
- setTimeout(function() {
- if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
- if (me.optDown.autoShowLoading) {
- me.triggerDownScroll();
- } else {
- me.optDown.callback && me.optDown.callback(me);
- }
- }
- if (!me.isUpAutoLoad) {
- setTimeout(function() {
- me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
- }, 100);
- }
- }, 30);
- }
- MeScroll.prototype.extendDownScroll = function(optDown) {
- MeScroll.extend(optDown, {
- use: true,
- // 是否启用下拉刷新; 默认true
- auto: true,
- // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
- native: false,
- // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
- autoShowLoading: false,
- // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
- isLock: false,
- // 是否锁定下拉刷新,默认false;
- offset: 80,
- // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
- startTop: 100,
- // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
- inOffsetRate: 1,
- // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
- outOffsetRate: 0.2,
- // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
- bottomOffset: 20,
- // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
- minAngle: 45,
- // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
- textInOffset: "下拉刷新",
- // 下拉的距离在offset范围内的提示文本
- textOutOffset: "释放更新",
- // 下拉的距离大于offset范围的提示文本
- textLoading: "加载中 ...",
- // 加载中的提示文本
- textSuccess: "加载成功",
- // 加载成功的文本
- textErr: "加载失败",
- // 加载失败的文本
- beforeEndDelay: 0,
- // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
- bgColor: "transparent",
- // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
- textColor: "gray",
- // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
- inited: null,
- // 下拉刷新初始化完毕的回调
- inOffset: null,
- // 下拉的距离进入offset范围内那一刻的回调
- outOffset: null,
- // 下拉的距离大于offset那一刻的回调
- onMoving: null,
- // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
- beforeLoading: null,
- // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
- showLoading: null,
- // 显示下拉刷新进度的回调
- afterLoading: null,
- // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
- beforeEndDownScroll: null,
- // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
- endDownScroll: null,
- // 结束下拉刷新的回调
- afterEndDownScroll: null,
- // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
- callback: function(mescroll) {
- mescroll.resetUpScroll();
- }
- });
- };
- MeScroll.prototype.extendUpScroll = function(optUp) {
- MeScroll.extend(optUp, {
- use: true,
- // 是否启用上拉加载; 默认true
- auto: true,
- // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
- isLock: false,
- // 是否锁定上拉加载,默认false;
- isBoth: true,
- // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
- callback: null,
- // 上拉加载的回调;function(page,mescroll){ }
- page: {
- num: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10,
- // 每页数据的数量
- time: null
- // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
- },
- noMoreSize: 5,
- // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
- offset: 150,
- // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
- textLoading: "加载中 ...",
- // 加载中的提示文本
- textNoMore: "-- END --",
- // 没有更多数据的提示文本
- bgColor: "transparent",
- // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
- textColor: "gray",
- // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
- inited: null,
- // 初始化完毕的回调
- showLoading: null,
- // 显示加载中的回调
- showNoMore: null,
- // 显示无更多数据的回调
- hideUpScroll: null,
- // 隐藏上拉加载的回调
- errDistance: 60,
- // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
- toTop: {
- // 回到顶部按钮,需配置src才显示
- src: null,
- // 图片路径,默认null (绝对路径或网络图)
- offset: 1e3,
- // 列表滚动多少距离才显示回到顶部按钮,默认1000
- duration: 300,
- // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
- btnClick: null,
- // 点击按钮的回调
- onShow: null,
- // 是否显示的回调
- zIndex: 9990,
- // fixed定位z-index值
- left: null,
- // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- right: 20,
- // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- bottom: 120,
- // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- safearea: false,
- // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
- width: 72,
- // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- radius: "50%"
- // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- },
- empty: {
- use: true,
- // 是否显示空布局
- icon: null,
- // 图标路径
- tip: "~ 暂无相关数据 ~",
- // 提示
- btnText: "",
- // 按钮
- btnClick: null,
- // 点击按钮的回调
- onShow: null,
- // 是否显示的回调
- fixed: false,
- // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
- top: "100rpx",
- // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
- zIndex: 99
- // fixed定位z-index值
- },
- onScroll: false
- // 是否监听滚动事件
- });
- };
- MeScroll.extend = function(userOption, defaultOption) {
- if (!userOption)
- return defaultOption;
- for (let key in defaultOption) {
- if (userOption[key] == null) {
- let def = defaultOption[key];
- if (def != null && typeof def === "object") {
- userOption[key] = MeScroll.extend({}, def);
- } else {
- userOption[key] = def;
- }
- } else if (typeof userOption[key] === "object") {
- MeScroll.extend(userOption[key], defaultOption[key]);
- }
- }
- return userOption;
- };
- MeScroll.prototype.hasColor = function(color2) {
- if (!color2)
- return false;
- let c = color2.toLowerCase();
- return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
- };
- MeScroll.prototype.initDownScroll = function() {
- let me = this;
- me.optDown = me.options.down || {};
- if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
- me.optDown.textColor = "#fff";
- me.extendDownScroll(me.optDown);
- if (me.isScrollBody && me.optDown.native) {
- me.optDown.use = false;
- } else {
- me.optDown.native = false;
- }
- me.downHight = 0;
- if (me.optDown.use && me.optDown.inited) {
- setTimeout(function() {
- me.optDown.inited(me);
- }, 0);
- }
- };
- MeScroll.prototype.touchstartEvent = function(e) {
- if (!this.optDown.use)
- return;
- this.startPoint = this.getPoint(e);
- this.startTop = this.getScrollTop();
- this.startAngle = 0;
- this.lastPoint = this.startPoint;
- this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
- this.inTouchend = false;
- };
- MeScroll.prototype.touchmoveEvent = function(e) {
- if (!this.optDown.use)
- return;
- let me = this;
- let scrollTop = me.getScrollTop();
- let curPoint = me.getPoint(e);
- let moveY = curPoint.y - me.startPoint.y;
- if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
- if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
- if (!me.startAngle)
- me.startAngle = me.getAngle(me.lastPoint, curPoint);
- if (me.startAngle < me.optDown.minAngle)
- return;
- if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
- me.inTouchend = true;
- me.touchendEvent();
- return;
- }
- me.preventDefault(e);
- let diff = curPoint.y - me.lastPoint.y;
- if (me.downHight < me.optDown.offset) {
- if (me.movetype !== 1) {
- me.movetype = 1;
- me.isDownEndSuccess = null;
- me.optDown.inOffset && me.optDown.inOffset(me);
- me.isMoveDown = true;
- }
- me.downHight += diff * me.optDown.inOffsetRate;
- } else {
- if (me.movetype !== 2) {
- me.movetype = 2;
- me.optDown.outOffset && me.optDown.outOffset(me);
- me.isMoveDown = true;
- }
- if (diff > 0) {
- me.downHight += diff * me.optDown.outOffsetRate;
- } else {
- me.downHight += diff;
- }
- }
- me.downHight = Math.round(me.downHight);
- let rate = me.downHight / me.optDown.offset;
- me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
- }
- }
- me.lastPoint = curPoint;
- };
- MeScroll.prototype.touchendEvent = function(e) {
- if (!this.optDown.use)
- return;
- if (this.isMoveDown) {
- if (this.downHight >= this.optDown.offset) {
- this.triggerDownScroll();
- } else {
- this.downHight = 0;
- this.endDownScrollCall(this);
- }
- this.movetype = 0;
- this.isMoveDown = false;
- } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
- let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
- if (isScrollUp) {
- let angle = this.getAngle(this.getPoint(e), this.startPoint);
- if (angle > 80) {
- this.triggerUpScroll(true);
- }
- }
- }
- };
- MeScroll.prototype.getPoint = function(e) {
- if (!e) {
- return {
- x: 0,
- y: 0
- };
- }
- if (e.touches && e.touches[0]) {
- return {
- x: e.touches[0].pageX,
- y: e.touches[0].pageY
- };
- } else if (e.changedTouches && e.changedTouches[0]) {
- return {
- x: e.changedTouches[0].pageX,
- y: e.changedTouches[0].pageY
- };
- } else {
- return {
- x: e.clientX,
- y: e.clientY
- };
- }
- };
- MeScroll.prototype.getAngle = function(p1, p2) {
- let x = Math.abs(p1.x - p2.x);
- let y = Math.abs(p1.y - p2.y);
- let z = Math.sqrt(x * x + y * y);
- let angle = 0;
- if (z !== 0) {
- angle = Math.asin(y / z) / Math.PI * 180;
- }
- return angle;
- };
- MeScroll.prototype.triggerDownScroll = function() {
- if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
- ;
- else {
- this.showDownScroll();
- !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
- }
- };
- MeScroll.prototype.showDownScroll = function() {
- this.isDownScrolling = true;
- if (this.optDown.native) {
- uni.startPullDownRefresh();
- this.showDownLoadingCall(0);
- } else {
- this.downHight = this.optDown.offset;
- this.showDownLoadingCall(this.downHight);
- }
- };
- MeScroll.prototype.showDownLoadingCall = function(downHight) {
- this.optDown.showLoading && this.optDown.showLoading(this, downHight);
- this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
- };
- MeScroll.prototype.onPullDownRefresh = function() {
- this.isDownScrolling = true;
- this.showDownLoadingCall(0);
- this.optDown.callback && this.optDown.callback(this);
- };
- MeScroll.prototype.endDownScroll = function() {
- if (this.optDown.native) {
- this.isDownScrolling = false;
- this.endDownScrollCall(this);
- uni.stopPullDownRefresh();
- return;
- }
- let me = this;
- let endScroll = function() {
- me.downHight = 0;
- me.isDownScrolling = false;
- me.endDownScrollCall(me);
- if (!me.isScrollBody) {
- me.setScrollHeight(0);
- me.scrollTo(0, 0);
- }
- };
- let delay = 0;
- if (me.optDown.beforeEndDownScroll) {
- delay = me.optDown.beforeEndDownScroll(me);
- if (me.isDownEndSuccess == null)
- delay = 0;
- }
- if (typeof delay === "number" && delay > 0) {
- setTimeout(endScroll, delay);
- } else {
- endScroll();
- }
- };
- MeScroll.prototype.endDownScrollCall = function() {
- this.optDown.endDownScroll && this.optDown.endDownScroll(this);
- this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
- };
- MeScroll.prototype.lockDownScroll = function(isLock) {
- if (isLock == null)
- isLock = true;
- this.optDown.isLock = isLock;
- };
- MeScroll.prototype.lockUpScroll = function(isLock) {
- if (isLock == null)
- isLock = true;
- this.optUp.isLock = isLock;
- };
- MeScroll.prototype.initUpScroll = function() {
- let me = this;
- me.optUp = me.options.up || { use: false };
- if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
- me.optUp.textColor = "#fff";
- me.extendUpScroll(me.optUp);
- if (me.optUp.use === false)
- return;
- me.optUp.hasNext = true;
- me.startNum = me.optUp.page.num + 1;
- if (me.optUp.inited) {
- setTimeout(function() {
- me.optUp.inited(me);
- }, 0);
- }
- };
- MeScroll.prototype.onReachBottom = function() {
- if (this.isScrollBody && !this.isUpScrolling) {
- if (!this.optUp.isLock && this.optUp.hasNext) {
- this.triggerUpScroll();
- }
- }
- };
- MeScroll.prototype.onPageScroll = function(e) {
- if (!this.isScrollBody)
- return;
- this.setScrollTop(e.scrollTop);
- if (e.scrollTop >= this.optUp.toTop.offset) {
- this.showTopBtn();
- } else {
- this.hideTopBtn();
- }
- };
- MeScroll.prototype.scroll = function(e, onScroll) {
- this.setScrollTop(e.scrollTop);
- this.setScrollHeight(e.scrollHeight);
- if (this.preScrollY == null)
- this.preScrollY = 0;
- this.isScrollUp = e.scrollTop - this.preScrollY > 0;
- this.preScrollY = e.scrollTop;
- this.isScrollUp && this.triggerUpScroll(true);
- if (e.scrollTop >= this.optUp.toTop.offset) {
- this.showTopBtn();
- } else {
- this.hideTopBtn();
- }
- this.optUp.onScroll && onScroll && onScroll();
- };
- MeScroll.prototype.triggerUpScroll = function(isCheck) {
- if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
- if (isCheck === true) {
- let canUp = false;
- if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
- if (this.getScrollBottom() <= this.optUp.offset) {
- canUp = true;
- }
- }
- if (canUp === false)
- return;
- }
- this.showUpScroll();
- this.optUp.page.num++;
- this.isUpAutoLoad = true;
- this.num = this.optUp.page.num;
- this.size = this.optUp.page.size;
- this.time = this.optUp.page.time;
- this.optUp.callback(this);
- }
- };
- MeScroll.prototype.showUpScroll = function() {
- this.isUpScrolling = true;
- this.optUp.showLoading && this.optUp.showLoading(this);
- };
- MeScroll.prototype.showNoMore = function() {
- this.optUp.hasNext = false;
- this.optUp.showNoMore && this.optUp.showNoMore(this);
- };
- MeScroll.prototype.hideUpScroll = function() {
- this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
- };
- MeScroll.prototype.endUpScroll = function(isShowNoMore) {
- if (isShowNoMore != null) {
- if (isShowNoMore) {
- this.showNoMore();
- } else {
- this.hideUpScroll();
- }
- }
- this.isUpScrolling = false;
- };
- MeScroll.prototype.resetUpScroll = function(isShowLoading) {
- if (this.optUp && this.optUp.use) {
- let page2 = this.optUp.page;
- this.prePageNum = page2.num;
- this.prePageTime = page2.time;
- page2.num = this.startNum;
- page2.time = null;
- if (!this.isDownScrolling && isShowLoading !== false) {
- if (isShowLoading == null) {
- this.removeEmpty();
- this.showUpScroll();
- } else {
- this.showDownScroll();
- }
- }
- this.isUpAutoLoad = true;
- this.num = page2.num;
- this.size = page2.size;
- this.time = page2.time;
- this.optUp.callback && this.optUp.callback(this);
- }
- };
- MeScroll.prototype.setPageNum = function(num) {
- this.optUp.page.num = num - 1;
- };
- MeScroll.prototype.setPageSize = function(size) {
- this.optUp.page.size = size;
- };
- MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
- let hasNext;
- if (this.optUp.use && totalPage != null)
- hasNext = this.optUp.page.num < totalPage;
- this.endSuccess(dataSize, hasNext, systime);
- };
- MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
- let hasNext;
- if (this.optUp.use && totalSize != null) {
- let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
- hasNext = loadSize < totalSize;
- }
- this.endSuccess(dataSize, hasNext, systime);
- };
- MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
- let me = this;
- if (me.isDownScrolling) {
- me.isDownEndSuccess = true;
- me.endDownScroll();
- }
- if (me.optUp.use) {
- let isShowNoMore;
- if (dataSize != null) {
- let pageNum = me.optUp.page.num;
- let pageSize = me.optUp.page.size;
- if (pageNum === 1) {
- if (systime)
- me.optUp.page.time = systime;
- }
- if (dataSize < pageSize || hasNext === false) {
- me.optUp.hasNext = false;
- if (dataSize === 0 && pageNum === 1) {
- isShowNoMore = false;
- me.showEmpty();
- } else {
- let allDataSize = (pageNum - 1) * pageSize + dataSize;
- if (allDataSize < me.optUp.noMoreSize) {
- isShowNoMore = false;
- } else {
- isShowNoMore = true;
- }
- me.removeEmpty();
- }
- } else {
- isShowNoMore = false;
- me.optUp.hasNext = true;
- me.removeEmpty();
- }
- }
- me.endUpScroll(isShowNoMore);
- }
- };
- MeScroll.prototype.endErr = function(errDistance) {
- if (this.isDownScrolling) {
- this.isDownEndSuccess = false;
- let page2 = this.optUp.page;
- if (page2 && this.prePageNum) {
- page2.num = this.prePageNum;
- page2.time = this.prePageTime;
- }
- this.endDownScroll();
- }
- if (this.isUpScrolling) {
- this.optUp.page.num--;
- this.endUpScroll(false);
- if (this.isScrollBody && errDistance !== 0) {
- if (!errDistance)
- errDistance = this.optUp.errDistance;
- this.scrollTo(this.getScrollTop() - errDistance, 0);
- }
- }
- };
- MeScroll.prototype.showEmpty = function() {
- this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
- };
- MeScroll.prototype.removeEmpty = function() {
- this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
- };
- MeScroll.prototype.showTopBtn = function() {
- if (!this.topBtnShow) {
- this.topBtnShow = true;
- this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
- }
- };
- MeScroll.prototype.hideTopBtn = function() {
- if (this.topBtnShow) {
- this.topBtnShow = false;
- this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
- }
- };
- MeScroll.prototype.getScrollTop = function() {
- return this.scrollTop || 0;
- };
- MeScroll.prototype.setScrollTop = function(y) {
- this.scrollTop = y;
- };
- MeScroll.prototype.scrollTo = function(y, t) {
- this.myScrollTo && this.myScrollTo(y, t);
- };
- MeScroll.prototype.resetScrollTo = function(myScrollTo) {
- this.myScrollTo = myScrollTo;
- };
- MeScroll.prototype.getScrollBottom = function() {
- return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
- };
- MeScroll.prototype.getStep = function(star, end, callback, t, rate) {
- let diff = end - star;
- if (t === 0 || diff === 0) {
- callback && callback(end);
- return;
- }
- t = t || 300;
- rate = rate || 30;
- let count = t / rate;
- let step = diff / count;
- let i = 0;
- let timer = setInterval(function() {
- if (i < count - 1) {
- star += step;
- callback && callback(star, timer);
- i++;
- } else {
- callback && callback(end, timer);
- clearInterval(timer);
- }
- }, rate);
- };
- MeScroll.prototype.getClientHeight = function(isReal) {
- let h = this.clientHeight || 0;
- if (h === 0 && isReal !== true) {
- h = this.getBodyHeight();
- }
- return h;
- };
- MeScroll.prototype.setClientHeight = function(h) {
- this.clientHeight = h;
- };
- MeScroll.prototype.getScrollHeight = function() {
- return this.scrollHeight || 0;
- };
- MeScroll.prototype.setScrollHeight = function(h) {
- this.scrollHeight = h;
- };
- MeScroll.prototype.getBodyHeight = function() {
- return this.bodyHeight || 0;
- };
- MeScroll.prototype.setBodyHeight = function(h) {
- this.bodyHeight = h;
- };
- MeScroll.prototype.preventDefault = function(e) {
- if (e && e.cancelable && !e.defaultPrevented)
- e.preventDefault();
- };
- const _sfc_main$1f = {
- props: {
- // up.toTop的配置项
- option: {
- type: Object,
- default() {
- return {};
- }
- },
- // 是否显示
- value: false,
- // vue2
- modelValue: false
- // vue3
- },
- computed: {
- // 优先显示左边
- left() {
- return this.option.left ? this.addUnit(this.option.left) : "auto";
- },
- // 右边距离 (优先显示左边)
- right() {
- return this.option.left ? "auto" : this.addUnit(this.option.right);
- },
- // 是否显示
- isShow() {
- return this.modelValue;
- }
- },
- methods: {
- addUnit(num) {
- if (!num)
- return 0;
- if (typeof num === "number")
- return num + "rpx";
- return num;
- },
- toTopClick() {
- this.$emit("update:modelValue", false);
- this.$emit("click");
- }
- }
- };
- function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
- return $props.option.src ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: vue.normalizeClass(["mescroll-totop", [$options.isShow ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $props.option.safearea }]]),
- 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) }),
- src: $props.option.src,
- mode: "widthFix",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
- }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
- }
- const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-49fff3a8"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]);
- const WxsMixin = {
- data() {
- return {
- // 传入wxs视图层的数据 (响应式)
- wxsProp: {
- optDown: {},
- // 下拉刷新的配置
- scrollTop: 0,
- // 滚动条的距离
- bodyHeight: 0,
- // body的高度
- isDownScrolling: false,
- // 是否正在下拉刷新中
- isUpScrolling: false,
- // 是否正在上拉加载中
- isScrollBody: true,
- // 是否为mescroll-body滚动
- isUpBoth: true,
- // 上拉加载时,是否同时可以下拉刷新
- t: 0
- // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
- },
- // 标记调用wxs视图层的方法
- callProp: {
- callType: "",
- // 方法名
- t: 0
- // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
- }
- // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
- // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
- };
- },
- methods: {
- // wxs视图层调用逻辑层的回调
- wxsCall(msg) {
- if (msg.type === "setWxsProp") {
- this.wxsProp = {
- optDown: this.mescroll.optDown,
- scrollTop: this.mescroll.getScrollTop(),
- bodyHeight: this.mescroll.getBodyHeight(),
- isDownScrolling: this.mescroll.isDownScrolling,
- isUpScrolling: this.mescroll.isUpScrolling,
- isUpBoth: this.mescroll.optUp.isBoth,
- isScrollBody: this.mescroll.isScrollBody,
- t: Date.now()
- };
- } else if (msg.type === "setLoadType") {
- this.downLoadType = msg.downLoadType;
- this.$set(this.mescroll, "downLoadType", this.downLoadType);
- this.$set(this.mescroll, "isDownEndSuccess", null);
- } else if (msg.type === "triggerDownScroll") {
- this.mescroll.triggerDownScroll();
- } else if (msg.type === "endDownScroll") {
- this.mescroll.endDownScroll();
- } else if (msg.type === "triggerUpScroll") {
- this.mescroll.triggerUpScroll(true);
- }
- }
- },
- mounted() {
- this.mescroll.optDown.afterLoading = () => {
- this.callProp = { callType: "showLoading", t: Date.now() };
- };
- this.mescroll.optDown.afterEndDownScroll = () => {
- this.callProp = { callType: "endDownScroll", t: Date.now() };
- let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
- setTimeout(() => {
- if (this.downLoadType === 4 || this.downLoadType === 0) {
- this.callProp = { callType: "clearTransform", t: Date.now() };
- }
- this.$set(this.mescroll, "downLoadType", this.downLoadType);
- }, delay);
- };
- this.wxsCall({ type: "setWxsProp" });
- }
- };
- const block0 = (Comp) => {
- (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
- (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
- };
- const block1 = (Comp) => {
- (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
- (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "5a9dc23f";
- };
- const _sfc_main$1e = {
- name: "mescroll-uni",
- mixins: [WxsMixin],
- components: {
- MescrollTop
- },
- props: {
- down: Object,
- up: Object,
- i18n: Object,
- top: [String, Number],
- topbar: [Boolean, String],
- bottom: [String, Number],
- safearea: Boolean,
- fixed: {
- type: Boolean,
- default: true
- },
- height: [String, Number],
- bottombar: {
- type: Boolean,
- default: true
- },
- disableScroll: Boolean
- },
- data() {
- return {
- mescroll: { optDown: {}, optUp: {} },
- // mescroll实例
- viewId: "id_" + Math.random().toString(36).substr(2, 16),
- // 随机生成mescroll的id(不能数字开头,否则找不到元素)
- downHight: 0,
- //下拉刷新: 容器高度
- downRate: 0,
- // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
- downLoadType: 0,
- // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
- upLoadType: 0,
- // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)
- isShowEmpty: false,
- // 是否显示空布局
- isShowToTop: false,
- // 是否显示回到顶部按钮
- scrollTop: 0,
- // 滚动条的位置
- scrollAnim: false,
- // 是否开启滚动动画
- windowTop: 0,
- // 可使用窗口的顶部位置
- windowBottom: 0,
- // 可使用窗口的底部位置
- windowHeight: 0,
- // 可使用窗口的高度
- statusBarHeight: 0
- // 状态栏高度
- };
- },
- watch: {
- height() {
- this.setClientHeight();
- }
- },
- computed: {
- // 是否使用fixed定位 (当height有值,则不使用)
- isFixed() {
- return !this.height && this.fixed;
- },
- // mescroll的高度
- scrollHeight() {
- if (this.isFixed) {
- return "auto";
- } else if (this.height) {
- return this.toPx(this.height) + "px";
- } else {
- return "100%";
- }
- },
- // 下拉布局往下偏移的距离 (px)
- numTop() {
- return this.toPx(this.top);
- },
- fixedTop() {
- return this.isFixed ? this.numTop + this.windowTop + "px" : 0;
- },
- padTop() {
- return !this.isFixed ? this.numTop + "px" : 0;
- },
- // 上拉布局往上偏移 (px)
- numBottom() {
- return this.toPx(this.bottom);
- },
- fixedBottom() {
- return this.isFixed ? this.numBottom + this.windowBottom + "px" : 0;
- },
- padBottom() {
- return !this.isFixed ? this.numBottom + "px" : 0;
- },
- // 是否为重置下拉的状态
- isDownReset() {
- return this.downLoadType === 3 || this.downLoadType === 4;
- },
- // 过渡
- transition() {
- return this.isDownReset ? "transform 300ms" : "";
- },
- translateY() {
- return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
- },
- // 列表是否可滑动
- scrollable() {
- if (this.disableScroll)
- return false;
- return this.downLoadType === 0 || this.isDownReset;
- },
- // 是否在加载中
- isDownLoading() {
- return this.downLoadType === 3;
- },
- // 旋转的角度
- downRotate() {
- return "rotate(" + 360 * this.downRate + "deg)";
- },
- // 文本提示
- downText() {
- if (!this.mescroll)
- return "";
- switch (this.downLoadType) {
- case 1:
- return this.mescroll.optDown.textInOffset;
- case 2:
- return this.mescroll.optDown.textOutOffset;
- case 3:
- return this.mescroll.optDown.textLoading;
- case 4:
- return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
- default:
- return this.mescroll.optDown.textInOffset;
- }
- }
- },
- methods: {
- //number,rpx,upx,px,% --> px的数值
- toPx(num) {
- if (typeof num === "string") {
- if (num.indexOf("px") !== -1) {
- if (num.indexOf("rpx") !== -1) {
- num = num.replace("rpx", "");
- } else if (num.indexOf("upx") !== -1) {
- num = num.replace("upx", "");
- } else {
- return Number(num.replace("px", ""));
- }
- } else if (num.indexOf("%") !== -1) {
- let rate = Number(num.replace("%", "")) / 100;
- return this.windowHeight * rate;
- }
- }
- return num ? uni.upx2px(Number(num)) : 0;
- },
- //注册列表滚动事件,用于下拉刷新和上拉加载
- scroll(e) {
- this.mescroll.scroll(e.detail, () => {
- this.$emit("scroll", this.mescroll);
- });
- },
- // 点击空布局的按钮回调
- emptyClick() {
- this.$emit("emptyclick", this.mescroll);
- },
- // 点击回到顶部的按钮回调
- toTopClick() {
- this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
- this.$emit("topclick", this.mescroll);
- },
- // 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)
- setClientHeight() {
- if (!this.isExec) {
- this.isExec = true;
- this.$nextTick(() => {
- this.getClientInfo((data) => {
- this.isExec = false;
- if (data) {
- this.mescroll.setClientHeight(data.height);
- } else if (this.clientNum != 3) {
- this.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;
- setTimeout(() => {
- this.setClientHeight();
- }, this.clientNum * 100);
- }
- });
- });
- }
- },
- // 获取滚动区域的信息
- getClientInfo(success) {
- let query = uni.createSelectorQuery().in(this);
- let view = query.select("#" + this.viewId);
- view.boundingClientRect((data) => {
- success(data);
- }).exec();
- }
- },
- // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
- created() {
- let vm = this;
- let diyOption = {
- // 下拉刷新的配置
- down: {
- inOffset() {
- vm.downLoadType = 1;
- },
- outOffset() {
- vm.downLoadType = 2;
- },
- onMoving(mescroll, rate, downHight) {
- vm.downHight = downHight;
- vm.downRate = rate;
- },
- showLoading(mescroll, downHight) {
- vm.downLoadType = 3;
- vm.downHight = downHight;
- },
- beforeEndDownScroll(mescroll) {
- vm.downLoadType = 4;
- return mescroll.optDown.beforeEndDelay;
- },
- endDownScroll() {
- vm.downLoadType = 4;
- vm.downHight = 0;
- vm.downResetTimer && clearTimeout(vm.downResetTimer);
- vm.downResetTimer = setTimeout(() => {
- if (vm.downLoadType === 4)
- vm.downLoadType = 0;
- }, 300);
- },
- // 派发下拉刷新的回调
- callback: function(mescroll) {
- vm.$emit("down", mescroll);
- }
- },
- // 上拉加载的配置
- up: {
- // 显示加载中的回调
- showLoading() {
- vm.upLoadType = 1;
- },
- // 显示无更多数据的回调
- showNoMore() {
- vm.upLoadType = 2;
- },
- // 隐藏上拉加载的回调
- hideUpScroll(mescroll) {
- vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
- },
- // 空布局
- empty: {
- onShow(isShow) {
- vm.isShowEmpty = isShow;
- }
- },
- // 回到顶部
- toTop: {
- onShow(isShow) {
- vm.isShowToTop = isShow;
- }
- },
- // 派发上拉加载的回调
- callback: function(mescroll) {
- vm.$emit("up", mescroll);
- vm.setClientHeight();
- }
- }
- };
- let i18nType = mescrollI18n.getType();
- let i18nOption = { type: i18nType };
- MeScroll.extend(i18nOption, vm.i18n);
- MeScroll.extend(i18nOption, GlobalOption.i18n);
- MeScroll.extend(diyOption, i18nOption[i18nType]);
- MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
- let myOption = JSON.parse(JSON.stringify({ "down": vm.down, "up": vm.up }));
- MeScroll.extend(myOption, diyOption);
- vm.mescroll = new MeScroll(myOption);
- vm.mescroll.viewId = vm.viewId;
- vm.mescroll.i18n = i18nOption;
- vm.$emit("init", vm.mescroll);
- const sys2 = uni.getSystemInfoSync();
- if (sys2.windowTop)
- vm.windowTop = sys2.windowTop;
- if (sys2.windowBottom)
- vm.windowBottom = sys2.windowBottom;
- if (sys2.windowHeight)
- vm.windowHeight = sys2.windowHeight;
- if (sys2.statusBarHeight)
- vm.statusBarHeight = sys2.statusBarHeight;
- vm.mescroll.setBodyHeight(sys2.windowHeight);
- vm.mescroll.resetScrollTo((y, t) => {
- vm.scrollAnim = t !== 0;
- if (typeof y === "string") {
- vm.getClientInfo(function(rect) {
- let mescrollTop = rect.top;
- let selector;
- if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
- selector = "#" + y;
- } else {
- selector = y;
- if (y.indexOf(">>>") != -1) {
- selector = y.split(">>>")[1].trim();
- }
- }
- uni.createSelectorQuery().select(selector).boundingClientRect(function(rect2) {
- if (rect2) {
- let curY2 = vm.mescroll.getScrollTop();
- let top = rect2.top - mescrollTop;
- top += curY2;
- if (!vm.isFixed)
- top -= vm.numTop;
- vm.scrollTop = curY2;
- vm.$nextTick(function() {
- vm.scrollTop = top;
- });
- } else {
- formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue:422", selector + " does not exist");
- }
- }).exec();
- });
- return;
- }
- let curY = vm.mescroll.getScrollTop();
- if (t === 0 || t === 300) {
- vm.scrollTop = curY;
- vm.$nextTick(function() {
- vm.scrollTop = y;
- });
- } else {
- vm.mescroll.getStep(curY, y, (step) => {
- vm.scrollTop = step;
- }, t);
- }
- });
- if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
- ;
- else {
- vm.mescroll.optUp.toTop.safearea = vm.safearea;
- }
- uni.$on("setMescrollGlobalOption", (options) => {
- if (!options)
- return;
- let i18nType2 = options.i18n ? options.i18n.type : null;
- if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
- vm.mescroll.i18n.type = i18nType2;
- mescrollI18n.setType(i18nType2);
- MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
- }
- if (options.down) {
- let down = MeScroll.extend({}, options.down);
- vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
- }
- if (options.up) {
- let up = MeScroll.extend({}, options.up);
- vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
- }
- });
- },
- mounted() {
- this.setClientHeight();
- },
- destroyed() {
- uni.$off("setMescrollGlobalOption");
- }
- };
- function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$7);
- const _component_mescroll_top = vue.resolveComponent("mescroll-top");
- return vue.openBlock(), vue.createElementBlock("view", { class: "mescroll-uni-warp" }, [
- vue.createElementVNode("scroll-view", {
- id: $data.viewId,
- class: vue.normalizeClass(["mescroll-uni", { "mescroll-uni-fixed": $options.isFixed }]),
- style: vue.normalizeStyle({ "height": $options.scrollHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom, "top": $options.fixedTop, "bottom": $options.fixedBottom }),
- "scroll-top": $data.scrollTop,
- "scroll-with-animation": $data.scrollAnim,
- onScroll: _cache[4] || (_cache[4] = (...args) => $options.scroll && $options.scroll(...args)),
- "scroll-y": $options.scrollable,
- "enable-back-to-top": true,
- throttle: false
- }, [
- vue.createElementVNode("view", {
- class: "mescroll-uni-content mescroll-render-touch",
- onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
- onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
- onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
- onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
- "change:prop": _ctx.wxsBiz.propObserver,
- prop: vue.wp(_ctx.wxsProp)
- }, [
- vue.createCommentVNode(" 状态栏 "),
- $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "mescroll-topbar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
- },
- null,
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "mescroll-wxs-content",
- style: vue.normalizeStyle({ "transform": $options.translateY, "transition": $options.transition }),
- "change:prop": _ctx.wxsBiz.callObserver,
- prop: vue.wp(_ctx.callProp)
- }, [
- vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
- vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
- $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "mescroll-downwarp",
- style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
- },
- [
- vue.createElementVNode("view", { class: "downwarp-content" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
- style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
- },
- null,
- 6
- /* CLASS, STYLE */
- ),
- vue.createElementVNode(
- "view",
- { class: "downwarp-tip" },
- vue.toDisplayString($options.downText),
- 1
- /* TEXT */
- )
- ])
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 列表内容 "),
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
- vue.createCommentVNode(" 空布局 "),
- $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
- key: 1,
- option: $data.mescroll.optUp.empty,
- onEmptyclick: $options.emptyClick
- }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
- vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
- $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "mescroll-upwarp",
- style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
- },
- [
- vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
- vue.withDirectives(vue.createElementVNode(
- "view",
- null,
- [
- vue.createElementVNode(
- "view",
- {
- class: "upwarp-progress mescroll-rotate",
- style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode(
- "view",
- { class: "upwarp-tip" },
- vue.toDisplayString($data.mescroll.optUp.textLoading),
- 1
- /* TEXT */
- )
- ],
- 512
- /* NEED_PATCH */
- ), [
- [vue.vShow, $data.upLoadType === 1]
- ]),
- vue.createCommentVNode(" 无数据 "),
- $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "upwarp-nodata"
- },
- vue.toDisplayString($data.mescroll.optUp.textNoMore),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], 12, ["change:prop", "prop"]),
- vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
- vue.createCommentVNode(" 适配iPhoneX "),
- $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "mescroll-safearea"
- })) : vue.createCommentVNode("v-if", true)
- ], 40, ["change:prop", "prop"])
- ], 46, ["id", "scroll-top", "scroll-with-animation", "scroll-y"]),
- vue.createCommentVNode(" 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)"),
- vue.createVNode(_component_mescroll_top, {
- modelValue: $data.isShowToTop,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.isShowToTop = $event),
- option: $data.mescroll.optUp.toTop,
- onClick: $options.toTopClick
- }, null, 8, ["modelValue", "option", "onClick"]),
- vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
- vue.createElementVNode("view", {
- "change:prop": _ctx.renderBiz.propObserver,
- prop: vue.wp(_ctx.wxsProp)
- }, null, 8, ["change:prop", "prop"])
- ]);
- }
- if (typeof block0 === "function")
- block0(_sfc_main$1e);
- if (typeof block1 === "function")
- block1(_sfc_main$1e);
- const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-97b1664c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue"]]);
- function useMescroll(onPageScroll, onReachBottom, onPullDownRefresh) {
- let mescroll = null;
- const mescrollInit = (e) => {
- mescroll = e;
- };
- const getMescroll = () => {
- return mescroll;
- };
- const downCallback = () => {
- if (mescroll.optUp.use) {
- mescroll.resetUpScroll();
- } else {
- setTimeout(() => {
- mescroll.endSuccess();
- }, 500);
- }
- };
- const upCallback = () => {
- setTimeout(() => {
- mescroll.endErr();
- }, 500);
- };
- onPullDownRefresh && onPullDownRefresh(() => {
- mescroll && mescroll.onPullDownRefresh();
- });
- onPageScroll && onPageScroll((e) => {
- mescroll && mescroll.onPageScroll(e);
- });
- onReachBottom && onReachBottom(() => {
- mescroll && mescroll.onReachBottom();
- });
- return {
- getMescroll,
- mescrollInit,
- downCallback,
- upCallback
- };
- }
- var isVue2 = false;
- function set(target, key, val) {
- if (Array.isArray(target)) {
- target.length = Math.max(target.length, key);
- target.splice(key, 1, val);
- return val;
- }
- target[key] = val;
- return val;
- }
- function del(target, key) {
- if (Array.isArray(target)) {
- target.splice(key, 1);
- return;
- }
- delete target[key];
- }
- function getDevtoolsGlobalHook() {
- return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
- }
- function getTarget() {
- return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
- }
- const isProxyAvailable = typeof Proxy === "function";
- const HOOK_SETUP = "devtools-plugin:setup";
- const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
- let supported;
- let perf;
- function isPerformanceSupported() {
- var _a;
- if (supported !== void 0) {
- return supported;
- }
- if (typeof window !== "undefined" && window.performance) {
- supported = true;
- perf = window.performance;
- } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
- supported = true;
- perf = global.perf_hooks.performance;
- } else {
- supported = false;
- }
- return supported;
- }
- function now() {
- return isPerformanceSupported() ? perf.now() : Date.now();
- }
- class ApiProxy {
- constructor(plugin, hook) {
- this.target = null;
- this.targetQueue = [];
- this.onQueue = [];
- this.plugin = plugin;
- this.hook = hook;
- const defaultSettings = {};
- if (plugin.settings) {
- for (const id in plugin.settings) {
- const item = plugin.settings[id];
- defaultSettings[id] = item.defaultValue;
- }
- }
- const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
- let currentSettings = Object.assign({}, defaultSettings);
- try {
- const raw = localStorage.getItem(localSettingsSaveId);
- const data = JSON.parse(raw);
- Object.assign(currentSettings, data);
- } catch (e) {
- }
- this.fallbacks = {
- getSettings() {
- return currentSettings;
- },
- setSettings(value2) {
- try {
- localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
- } catch (e) {
- }
- currentSettings = value2;
- },
- now() {
- return now();
- }
- };
- if (hook) {
- hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
- if (pluginId === this.plugin.id) {
- this.fallbacks.setSettings(value2);
- }
- });
- }
- this.proxiedOn = new Proxy({}, {
- get: (_target, prop) => {
- if (this.target) {
- return this.target.on[prop];
- } else {
- return (...args) => {
- this.onQueue.push({
- method: prop,
- args
- });
- };
- }
- }
- });
- this.proxiedTarget = new Proxy({}, {
- get: (_target, prop) => {
- if (this.target) {
- return this.target[prop];
- } else if (prop === "on") {
- return this.proxiedOn;
- } else if (Object.keys(this.fallbacks).includes(prop)) {
- return (...args) => {
- this.targetQueue.push({
- method: prop,
- args,
- resolve: () => {
- }
- });
- return this.fallbacks[prop](...args);
- };
- } else {
- return (...args) => {
- return new Promise((resolve) => {
- this.targetQueue.push({
- method: prop,
- args,
- resolve
- });
- });
- };
- }
- }
- });
- }
- async setRealTarget(target) {
- this.target = target;
- for (const item of this.onQueue) {
- this.target.on[item.method](...item.args);
- }
- for (const item of this.targetQueue) {
- item.resolve(await this.target[item.method](...item.args));
- }
- }
- }
- function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
- const descriptor = pluginDescriptor;
- const target = getTarget();
- const hook = getDevtoolsGlobalHook();
- const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;
- if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
- hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
- } else {
- const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;
- const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
- list.push({
- pluginDescriptor: descriptor,
- setupFn,
- proxy
- });
- if (proxy)
- setupFn(proxy.proxiedTarget);
- }
- }
- /*!
- * pinia v2.1.7
- * (c) 2023 Eduardo San Martin Morote
- * @license MIT
- */
- let activePinia;
- const setActivePinia = (pinia2) => activePinia = pinia2;
- const piniaSymbol = Symbol("pinia");
- function isPlainObject$1(o) {
- return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
- }
- var MutationType;
- (function(MutationType2) {
- MutationType2["direct"] = "direct";
- MutationType2["patchObject"] = "patch object";
- MutationType2["patchFunction"] = "patch function";
- })(MutationType || (MutationType = {}));
- const IS_CLIENT = typeof window !== "undefined";
- const USE_DEVTOOLS = IS_CLIENT;
- 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 })();
- function bom(blob, { autoBom = false } = {}) {
- if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
- return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
- }
- return blob;
- }
- function download(url2, name, opts) {
- const xhr = new XMLHttpRequest();
- xhr.open("GET", url2);
- xhr.responseType = "blob";
- xhr.onload = function() {
- saveAs(xhr.response, name, opts);
- };
- xhr.onerror = function() {
- console.error("could not download file");
- };
- xhr.send();
- }
- function corsEnabled(url2) {
- const xhr = new XMLHttpRequest();
- xhr.open("HEAD", url2, false);
- try {
- xhr.send();
- } catch (e) {
- }
- return xhr.status >= 200 && xhr.status <= 299;
- }
- function click(node) {
- try {
- node.dispatchEvent(new MouseEvent("click"));
- } catch (e) {
- const evt = document.createEvent("MouseEvents");
- evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
- node.dispatchEvent(evt);
- }
- }
- const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
- const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
- const saveAs = !IS_CLIENT ? () => {
- } : (
- // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
- typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
- // Use msSaveOrOpenBlob as a second approach
- "msSaveOrOpenBlob" in _navigator ? msSaveAs : (
- // Fallback to using FileReader and a popup
- fileSaverSaveAs
- )
- )
- );
- function downloadSaveAs(blob, name = "download", opts) {
- const a = document.createElement("a");
- a.download = name;
- a.rel = "noopener";
- if (typeof blob === "string") {
- a.href = blob;
- if (a.origin !== location.origin) {
- if (corsEnabled(a.href)) {
- download(blob, name, opts);
- } else {
- a.target = "_blank";
- click(a);
- }
- } else {
- click(a);
- }
- } else {
- a.href = URL.createObjectURL(blob);
- setTimeout(function() {
- URL.revokeObjectURL(a.href);
- }, 4e4);
- setTimeout(function() {
- click(a);
- }, 0);
- }
- }
- function msSaveAs(blob, name = "download", opts) {
- if (typeof blob === "string") {
- if (corsEnabled(blob)) {
- download(blob, name, opts);
- } else {
- const a = document.createElement("a");
- a.href = blob;
- a.target = "_blank";
- setTimeout(function() {
- click(a);
- });
- }
- } else {
- navigator.msSaveOrOpenBlob(bom(blob, opts), name);
- }
- }
- function fileSaverSaveAs(blob, name, opts, popup) {
- popup = popup || open("", "_blank");
- if (popup) {
- popup.document.title = popup.document.body.innerText = "downloading...";
- }
- if (typeof blob === "string")
- return download(blob, name, opts);
- const force = blob.type === "application/octet-stream";
- const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
- const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
- if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
- const reader = new FileReader();
- reader.onloadend = function() {
- let url2 = reader.result;
- if (typeof url2 !== "string") {
- popup = null;
- throw new Error("Wrong reader.result type");
- }
- url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;");
- if (popup) {
- popup.location.href = url2;
- } else {
- location.assign(url2);
- }
- popup = null;
- };
- reader.readAsDataURL(blob);
- } else {
- const url2 = URL.createObjectURL(blob);
- if (popup)
- popup.location.assign(url2);
- else
- location.href = url2;
- popup = null;
- setTimeout(function() {
- URL.revokeObjectURL(url2);
- }, 4e4);
- }
- }
- function toastMessage(message, type2) {
- const piniaMessage = "🍍 " + message;
- if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
- __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);
- } else if (type2 === "error") {
- console.error(piniaMessage);
- } else if (type2 === "warn") {
- console.warn(piniaMessage);
- } else {
- console.log(piniaMessage);
- }
- }
- function isPinia(o) {
- return "_a" in o && "install" in o;
- }
- function checkClipboardAccess() {
- if (!("clipboard" in navigator)) {
- toastMessage(`Your browser doesn't support the Clipboard API`, "error");
- return true;
- }
- }
- function checkNotFocusedError(error2) {
- if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) {
- toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
- return true;
- }
- return false;
- }
- async function actionGlobalCopyState(pinia2) {
- if (checkClipboardAccess())
- return;
- try {
- await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));
- toastMessage("Global state copied to clipboard.");
- } catch (error2) {
- if (checkNotFocusedError(error2))
- return;
- toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
- console.error(error2);
- }
- }
- async function actionGlobalPasteState(pinia2) {
- if (checkClipboardAccess())
- return;
- try {
- loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));
- toastMessage("Global state pasted from clipboard.");
- } catch (error2) {
- if (checkNotFocusedError(error2))
- return;
- toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
- console.error(error2);
- }
- }
- async function actionGlobalSaveState(pinia2) {
- try {
- saveAs(new Blob([JSON.stringify(pinia2.state.value)], {
- type: "text/plain;charset=utf-8"
- }), "pinia-state.json");
- } catch (error2) {
- toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
- console.error(error2);
- }
- }
- let fileInput;
- function getFileOpener() {
- if (!fileInput) {
- fileInput = document.createElement("input");
- fileInput.type = "file";
- fileInput.accept = ".json";
- }
- function openFile() {
- return new Promise((resolve, reject) => {
- fileInput.onchange = async () => {
- const files = fileInput.files;
- if (!files)
- return resolve(null);
- const file = files.item(0);
- if (!file)
- return resolve(null);
- return resolve({ text: await file.text(), file });
- };
- fileInput.oncancel = () => resolve(null);
- fileInput.onerror = reject;
- fileInput.click();
- });
- }
- return openFile;
- }
- async function actionGlobalOpenStateFile(pinia2) {
- try {
- const open2 = getFileOpener();
- const result = await open2();
- if (!result)
- return;
- const { text, file } = result;
- loadStoresState(pinia2, JSON.parse(text));
- toastMessage(`Global state imported from "${file.name}".`);
- } catch (error2) {
- toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
- console.error(error2);
- }
- }
- function loadStoresState(pinia2, state) {
- for (const key in state) {
- const storeState = pinia2.state.value[key];
- if (storeState) {
- Object.assign(storeState, state[key]);
- } else {
- pinia2.state.value[key] = state[key];
- }
- }
- }
- function formatDisplay(display) {
- return {
- _custom: {
- display
- }
- };
- }
- const PINIA_ROOT_LABEL = "🍍 Pinia (root)";
- const PINIA_ROOT_ID = "_root";
- function formatStoreForInspectorTree(store2) {
- return isPinia(store2) ? {
- id: PINIA_ROOT_ID,
- label: PINIA_ROOT_LABEL
- } : {
- id: store2.$id,
- label: store2.$id
- };
- }
- function formatStoreForInspectorState(store2) {
- if (isPinia(store2)) {
- const storeNames = Array.from(store2._s.keys());
- const storeMap = store2._s;
- const state2 = {
- state: storeNames.map((storeId) => ({
- editable: true,
- key: storeId,
- value: store2.state.value[storeId]
- })),
- getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
- const store22 = storeMap.get(id);
- return {
- editable: false,
- key: id,
- value: store22._getters.reduce((getters, key) => {
- getters[key] = store22[key];
- return getters;
- }, {})
- };
- })
- };
- return state2;
- }
- const state = {
- state: Object.keys(store2.$state).map((key) => ({
- editable: true,
- key,
- value: store2.$state[key]
- }))
- };
- if (store2._getters && store2._getters.length) {
- state.getters = store2._getters.map((getterName) => ({
- editable: false,
- key: getterName,
- value: store2[getterName]
- }));
- }
- if (store2._customProperties.size) {
- state.customProperties = Array.from(store2._customProperties).map((key) => ({
- editable: true,
- key,
- value: store2[key]
- }));
- }
- return state;
- }
- function formatEventData(events) {
- if (!events)
- return {};
- if (Array.isArray(events)) {
- return events.reduce((data, event) => {
- data.keys.push(event.key);
- data.operations.push(event.type);
- data.oldValue[event.key] = event.oldValue;
- data.newValue[event.key] = event.newValue;
- return data;
- }, {
- oldValue: {},
- keys: [],
- operations: [],
- newValue: {}
- });
- } else {
- return {
- operation: formatDisplay(events.type),
- key: formatDisplay(events.key),
- oldValue: events.oldValue,
- newValue: events.newValue
- };
- }
- }
- function formatMutationType(type2) {
- switch (type2) {
- case MutationType.direct:
- return "mutation";
- case MutationType.patchFunction:
- return "$patch";
- case MutationType.patchObject:
- return "$patch";
- default:
- return "unknown";
- }
- }
- let isTimelineActive = true;
- const componentStateTypes = [];
- const MUTATIONS_LAYER_ID = "pinia:mutations";
- const INSPECTOR_ID = "pinia";
- const { assign: assign$1 } = Object;
- const getStoreType = (id) => "🍍 " + id;
- function registerPiniaDevtools(app, pinia2) {
- setupDevtoolsPlugin({
- id: "dev.esm.pinia",
- label: "Pinia 🍍",
- logo: "https://pinia.vuejs.org/logo.svg",
- packageName: "pinia",
- homepage: "https://pinia.vuejs.org",
- componentStateTypes,
- app
- }, (api) => {
- if (typeof api.now !== "function") {
- 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.");
- }
- api.addTimelineLayer({
- id: MUTATIONS_LAYER_ID,
- label: `Pinia 🍍`,
- color: 15064968
- });
- api.addInspector({
- id: INSPECTOR_ID,
- label: "Pinia 🍍",
- icon: "storage",
- treeFilterPlaceholder: "Search stores",
- actions: [
- {
- icon: "content_copy",
- action: () => {
- actionGlobalCopyState(pinia2);
- },
- tooltip: "Serialize and copy the state"
- },
- {
- icon: "content_paste",
- action: async () => {
- await actionGlobalPasteState(pinia2);
- api.sendInspectorTree(INSPECTOR_ID);
- api.sendInspectorState(INSPECTOR_ID);
- },
- tooltip: "Replace the state with the content of your clipboard"
- },
- {
- icon: "save",
- action: () => {
- actionGlobalSaveState(pinia2);
- },
- tooltip: "Save the state as a JSON file"
- },
- {
- icon: "folder_open",
- action: async () => {
- await actionGlobalOpenStateFile(pinia2);
- api.sendInspectorTree(INSPECTOR_ID);
- api.sendInspectorState(INSPECTOR_ID);
- },
- tooltip: "Import the state from a JSON file"
- }
- ],
- nodeActions: [
- {
- icon: "restore",
- tooltip: 'Reset the state (with "$reset")',
- action: (nodeId) => {
- const store2 = pinia2._s.get(nodeId);
- if (!store2) {
- toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
- } else if (typeof store2.$reset !== "function") {
- toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
- } else {
- store2.$reset();
- toastMessage(`Store "${nodeId}" reset.`);
- }
- }
- }
- ]
- });
- api.on.inspectComponent((payload, ctx) => {
- const proxy = payload.componentInstance && payload.componentInstance.proxy;
- if (proxy && proxy._pStores) {
- const piniaStores = payload.componentInstance.proxy._pStores;
- Object.values(piniaStores).forEach((store2) => {
- payload.instanceData.state.push({
- type: getStoreType(store2.$id),
- key: "state",
- editable: true,
- value: store2._isOptionsAPI ? {
- _custom: {
- value: vue.toRaw(store2.$state),
- actions: [
- {
- icon: "restore",
- tooltip: "Reset the state of this store",
- action: () => store2.$reset()
- }
- ]
- }
- } : (
- // NOTE: workaround to unwrap transferred refs
- Object.keys(store2.$state).reduce((state, key) => {
- state[key] = store2.$state[key];
- return state;
- }, {})
- )
- });
- if (store2._getters && store2._getters.length) {
- payload.instanceData.state.push({
- type: getStoreType(store2.$id),
- key: "getters",
- editable: false,
- value: store2._getters.reduce((getters, key) => {
- try {
- getters[key] = store2[key];
- } catch (error2) {
- getters[key] = error2;
- }
- return getters;
- }, {})
- });
- }
- });
- }
- });
- api.on.getInspectorTree((payload) => {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- let stores = [pinia2];
- stores = stores.concat(Array.from(pinia2._s.values()));
- 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);
- }
- });
- api.on.getInspectorState((payload) => {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
- if (!inspectedStore) {
- return;
- }
- if (inspectedStore) {
- payload.state = formatStoreForInspectorState(inspectedStore);
- }
- }
- });
- api.on.editInspectorState((payload, ctx) => {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
- if (!inspectedStore) {
- return toastMessage(`store "${payload.nodeId}" not found`, "error");
- }
- const { path } = payload;
- if (!isPinia(inspectedStore)) {
- if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
- path.unshift("$state");
- }
- } else {
- path.unshift("state");
- }
- isTimelineActive = false;
- payload.set(inspectedStore, path, payload.state.value);
- isTimelineActive = true;
- }
- });
- api.on.editComponentState((payload) => {
- if (payload.type.startsWith("🍍")) {
- const storeId = payload.type.replace(/^🍍\s*/, "");
- const store2 = pinia2._s.get(storeId);
- if (!store2) {
- return toastMessage(`store "${storeId}" not found`, "error");
- }
- const { path } = payload;
- if (path[0] !== "state") {
- return toastMessage(`Invalid path for store "${storeId}":
- ${path}
- Only state can be modified.`);
- }
- path[0] = "$state";
- isTimelineActive = false;
- payload.set(store2, path, payload.state.value);
- isTimelineActive = true;
- }
- });
- });
- }
- function addStoreToDevtools(app, store2) {
- if (!componentStateTypes.includes(getStoreType(store2.$id))) {
- componentStateTypes.push(getStoreType(store2.$id));
- }
- setupDevtoolsPlugin({
- id: "dev.esm.pinia",
- label: "Pinia 🍍",
- logo: "https://pinia.vuejs.org/logo.svg",
- packageName: "pinia",
- homepage: "https://pinia.vuejs.org",
- componentStateTypes,
- app,
- settings: {
- logStoreChanges: {
- label: "Notify about new/deleted stores",
- type: "boolean",
- defaultValue: true
- }
- // useEmojis: {
- // label: 'Use emojis in messages ⚡️',
- // type: 'boolean',
- // defaultValue: true,
- // },
- }
- }, (api) => {
- const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
- store2.$onAction(({ after, onError, name, args }) => {
- const groupId = runningActionId++;
- api.addTimelineEvent({
- layerId: MUTATIONS_LAYER_ID,
- event: {
- time: now2(),
- title: "🛫 " + name,
- subtitle: "start",
- data: {
- store: formatDisplay(store2.$id),
- action: formatDisplay(name),
- args
- },
- groupId
- }
- });
- after((result) => {
- activeAction = void 0;
- api.addTimelineEvent({
- layerId: MUTATIONS_LAYER_ID,
- event: {
- time: now2(),
- title: "🛬 " + name,
- subtitle: "end",
- data: {
- store: formatDisplay(store2.$id),
- action: formatDisplay(name),
- args,
- result
- },
- groupId
- }
- });
- });
- onError((error2) => {
- activeAction = void 0;
- api.addTimelineEvent({
- layerId: MUTATIONS_LAYER_ID,
- event: {
- time: now2(),
- logType: "error",
- title: "💥 " + name,
- subtitle: "end",
- data: {
- store: formatDisplay(store2.$id),
- action: formatDisplay(name),
- args,
- error: error2
- },
- groupId
- }
- });
- });
- }, true);
- store2._customProperties.forEach((name) => {
- vue.watch(() => vue.unref(store2[name]), (newValue, oldValue) => {
- api.notifyComponentUpdate();
- api.sendInspectorState(INSPECTOR_ID);
- if (isTimelineActive) {
- api.addTimelineEvent({
- layerId: MUTATIONS_LAYER_ID,
- event: {
- time: now2(),
- title: "Change",
- subtitle: name,
- data: {
- newValue,
- oldValue
- },
- groupId: activeAction
- }
- });
- }
- }, { deep: true });
- });
- store2.$subscribe(({ events, type: type2 }, state) => {
- api.notifyComponentUpdate();
- api.sendInspectorState(INSPECTOR_ID);
- if (!isTimelineActive)
- return;
- const eventData = {
- time: now2(),
- title: formatMutationType(type2),
- data: assign$1({ store: formatDisplay(store2.$id) }, formatEventData(events)),
- groupId: activeAction
- };
- if (type2 === MutationType.patchFunction) {
- eventData.subtitle = "⤵️";
- } else if (type2 === MutationType.patchObject) {
- eventData.subtitle = "🧩";
- } else if (events && !Array.isArray(events)) {
- eventData.subtitle = events.type;
- }
- if (events) {
- eventData.data["rawEvent(s)"] = {
- _custom: {
- display: "DebuggerEvent",
- type: "object",
- tooltip: "raw DebuggerEvent[]",
- value: events
- }
- };
- }
- api.addTimelineEvent({
- layerId: MUTATIONS_LAYER_ID,
- event: eventData
- });
- }, { detached: true, flush: "sync" });
- const hotUpdate = store2._hotUpdate;
- store2._hotUpdate = vue.markRaw((newStore) => {
- hotUpdate(newStore);
- api.addTimelineEvent({
- layerId: MUTATIONS_LAYER_ID,
- event: {
- time: now2(),
- title: "🔥 " + store2.$id,
- subtitle: "HMR update",
- data: {
- store: formatDisplay(store2.$id),
- info: formatDisplay(`HMR update`)
- }
- }
- });
- api.notifyComponentUpdate();
- api.sendInspectorTree(INSPECTOR_ID);
- api.sendInspectorState(INSPECTOR_ID);
- });
- const { $dispose } = store2;
- store2.$dispose = () => {
- $dispose();
- api.notifyComponentUpdate();
- api.sendInspectorTree(INSPECTOR_ID);
- api.sendInspectorState(INSPECTOR_ID);
- api.getSettings().logStoreChanges && toastMessage(`Disposed "${store2.$id}" store 🗑`);
- };
- api.notifyComponentUpdate();
- api.sendInspectorTree(INSPECTOR_ID);
- api.sendInspectorState(INSPECTOR_ID);
- api.getSettings().logStoreChanges && toastMessage(`"${store2.$id}" store installed 🆕`);
- });
- }
- let runningActionId = 0;
- let activeAction;
- function patchActionForGrouping(store2, actionNames, wrapWithProxy) {
- const actions = actionNames.reduce((storeActions, actionName) => {
- storeActions[actionName] = vue.toRaw(store2)[actionName];
- return storeActions;
- }, {});
- for (const actionName in actions) {
- store2[actionName] = function() {
- const _actionId = runningActionId;
- const trackedStore = wrapWithProxy ? new Proxy(store2, {
- get(...args) {
- activeAction = _actionId;
- return Reflect.get(...args);
- },
- set(...args) {
- activeAction = _actionId;
- return Reflect.set(...args);
- }
- }) : store2;
- activeAction = _actionId;
- const retValue = actions[actionName].apply(trackedStore, arguments);
- activeAction = void 0;
- return retValue;
- };
- }
- }
- function devtoolsPlugin({ app, store: store2, options }) {
- if (store2.$id.startsWith("__hot:")) {
- return;
- }
- store2._isOptionsAPI = !!options.state;
- patchActionForGrouping(store2, Object.keys(options.actions), store2._isOptionsAPI);
- const originalHotUpdate = store2._hotUpdate;
- vue.toRaw(store2)._hotUpdate = function(newStore) {
- originalHotUpdate.apply(this, arguments);
- patchActionForGrouping(store2, Object.keys(newStore._hmrPayload.actions), !!store2._isOptionsAPI);
- };
- addStoreToDevtools(
- app,
- // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
- store2
- );
- }
- function createPinia() {
- const scope = vue.effectScope(true);
- const state = scope.run(() => vue.ref({}));
- let _p = [];
- let toBeInstalled = [];
- const pinia2 = vue.markRaw({
- install(app) {
- setActivePinia(pinia2);
- {
- pinia2._a = app;
- app.provide(piniaSymbol, pinia2);
- app.config.globalProperties.$pinia = pinia2;
- if (USE_DEVTOOLS) {
- registerPiniaDevtools(app, pinia2);
- }
- toBeInstalled.forEach((plugin) => _p.push(plugin));
- toBeInstalled = [];
- }
- },
- use(plugin) {
- if (!this._a && !isVue2) {
- toBeInstalled.push(plugin);
- } else {
- _p.push(plugin);
- }
- return this;
- },
- _p,
- // it's actually undefined here
- // @ts-expect-error
- _a: null,
- _e: scope,
- _s: /* @__PURE__ */ new Map(),
- state
- });
- if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
- pinia2.use(devtoolsPlugin);
- }
- return pinia2;
- }
- function patchObject(newState, oldState) {
- for (const key in oldState) {
- const subPatch = oldState[key];
- if (!(key in newState)) {
- continue;
- }
- const targetValue = newState[key];
- if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
- newState[key] = patchObject(targetValue, subPatch);
- } else {
- {
- newState[key] = subPatch;
- }
- }
- }
- return newState;
- }
- const noop = () => {
- };
- function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
- subscriptions.push(callback);
- const removeSubscription = () => {
- const idx = subscriptions.indexOf(callback);
- if (idx > -1) {
- subscriptions.splice(idx, 1);
- onCleanup();
- }
- };
- if (!detached && vue.getCurrentScope()) {
- vue.onScopeDispose(removeSubscription);
- }
- return removeSubscription;
- }
- function triggerSubscriptions(subscriptions, ...args) {
- subscriptions.slice().forEach((callback) => {
- callback(...args);
- });
- }
- const fallbackRunWithContext = (fn) => fn();
- function mergeReactiveObjects(target, patchToApply) {
- if (target instanceof Map && patchToApply instanceof Map) {
- patchToApply.forEach((value2, key) => target.set(key, value2));
- }
- if (target instanceof Set && patchToApply instanceof Set) {
- patchToApply.forEach(target.add, target);
- }
- for (const key in patchToApply) {
- if (!patchToApply.hasOwnProperty(key))
- continue;
- const subPatch = patchToApply[key];
- const targetValue = target[key];
- if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
- target[key] = mergeReactiveObjects(targetValue, subPatch);
- } else {
- target[key] = subPatch;
- }
- }
- return target;
- }
- const skipHydrateSymbol = Symbol("pinia:skipHydration");
- function shouldHydrate(obj) {
- return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
- }
- const { assign } = Object;
- function isComputed(o) {
- return !!(vue.isRef(o) && o.effect);
- }
- function createOptionsStore(id, options, pinia2, hot) {
- const { state, actions, getters } = options;
- const initialState = pinia2.state.value[id];
- let store2;
- function setup() {
- if (!initialState && !hot) {
- {
- pinia2.state.value[id] = state ? state() : {};
- }
- }
- const localState = hot ? (
- // use ref() to unwrap refs inside state TODO: check if this is still necessary
- vue.toRefs(vue.ref(state ? state() : {}).value)
- ) : vue.toRefs(pinia2.state.value[id]);
- return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
- if (name in localState) {
- console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
- }
- computedGetters[name] = vue.markRaw(vue.computed(() => {
- setActivePinia(pinia2);
- const store22 = pinia2._s.get(id);
- return getters[name].call(store22, store22);
- }));
- return computedGetters;
- }, {}));
- }
- store2 = createSetupStore(id, setup, options, pinia2, hot, true);
- return store2;
- }
- function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {
- let scope;
- const optionsForPlugin = assign({ actions: {} }, options);
- if (!pinia2._e.active) {
- throw new Error("Pinia destroyed");
- }
- const $subscribeOptions = {
- deep: true
- // flush: 'post',
- };
- {
- $subscribeOptions.onTrigger = (event) => {
- if (isListening) {
- debuggerEvents = event;
- } else if (isListening == false && !store2._hotUpdating) {
- if (Array.isArray(debuggerEvents)) {
- debuggerEvents.push(event);
- } else {
- console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
- }
- }
- };
- }
- let isListening;
- let isSyncListening;
- let subscriptions = [];
- let actionSubscriptions = [];
- let debuggerEvents;
- const initialState = pinia2.state.value[$id];
- if (!isOptionsStore && !initialState && !hot) {
- {
- pinia2.state.value[$id] = {};
- }
- }
- const hotState = vue.ref({});
- let activeListener;
- function $patch(partialStateOrMutator) {
- let subscriptionMutation;
- isListening = isSyncListening = false;
- {
- debuggerEvents = [];
- }
- if (typeof partialStateOrMutator === "function") {
- partialStateOrMutator(pinia2.state.value[$id]);
- subscriptionMutation = {
- type: MutationType.patchFunction,
- storeId: $id,
- events: debuggerEvents
- };
- } else {
- mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);
- subscriptionMutation = {
- type: MutationType.patchObject,
- payload: partialStateOrMutator,
- storeId: $id,
- events: debuggerEvents
- };
- }
- const myListenerId = activeListener = Symbol();
- vue.nextTick().then(() => {
- if (activeListener === myListenerId) {
- isListening = true;
- }
- });
- isSyncListening = true;
- triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);
- }
- const $reset = isOptionsStore ? function $reset2() {
- const { state } = options;
- const newState = state ? state() : {};
- this.$patch(($state) => {
- assign($state, newState);
- });
- } : (
- /* istanbul ignore next */
- () => {
- throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
- }
- );
- function $dispose() {
- scope.stop();
- subscriptions = [];
- actionSubscriptions = [];
- pinia2._s.delete($id);
- }
- function wrapAction(name, action) {
- return function() {
- setActivePinia(pinia2);
- const args = Array.from(arguments);
- const afterCallbackList = [];
- const onErrorCallbackList = [];
- function after(callback) {
- afterCallbackList.push(callback);
- }
- function onError(callback) {
- onErrorCallbackList.push(callback);
- }
- triggerSubscriptions(actionSubscriptions, {
- args,
- name,
- store: store2,
- after,
- onError
- });
- let ret;
- try {
- ret = action.apply(this && this.$id === $id ? this : store2, args);
- } catch (error2) {
- triggerSubscriptions(onErrorCallbackList, error2);
- throw error2;
- }
- if (ret instanceof Promise) {
- return ret.then((value2) => {
- triggerSubscriptions(afterCallbackList, value2);
- return value2;
- }).catch((error2) => {
- triggerSubscriptions(onErrorCallbackList, error2);
- return Promise.reject(error2);
- });
- }
- triggerSubscriptions(afterCallbackList, ret);
- return ret;
- };
- }
- const _hmrPayload = /* @__PURE__ */ vue.markRaw({
- actions: {},
- getters: {},
- state: [],
- hotState
- });
- const partialStore = {
- _p: pinia2,
- // _s: scope,
- $id,
- $onAction: addSubscription.bind(null, actionSubscriptions),
- $patch,
- $reset,
- $subscribe(callback, options2 = {}) {
- const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
- const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => {
- if (options2.flush === "sync" ? isSyncListening : isListening) {
- callback({
- storeId: $id,
- type: MutationType.direct,
- events: debuggerEvents
- }, state);
- }
- }, assign({}, $subscribeOptions, options2)));
- return removeSubscription;
- },
- $dispose
- };
- const store2 = vue.reactive(assign(
- {
- _hmrPayload,
- _customProperties: vue.markRaw(/* @__PURE__ */ new Set())
- // devtools custom properties
- },
- partialStore
- // must be added later
- // setupStore
- ));
- pinia2._s.set($id, store2);
- const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;
- const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup)));
- for (const key in setupStore) {
- const prop = setupStore[key];
- if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) {
- if (hot) {
- set(hotState.value, key, vue.toRef(setupStore, key));
- } else if (!isOptionsStore) {
- if (initialState && shouldHydrate(prop)) {
- if (vue.isRef(prop)) {
- prop.value = initialState[key];
- } else {
- mergeReactiveObjects(prop, initialState[key]);
- }
- }
- {
- pinia2.state.value[$id][key] = prop;
- }
- }
- {
- _hmrPayload.state.push(key);
- }
- } else if (typeof prop === "function") {
- const actionValue = hot ? prop : wrapAction(key, prop);
- {
- setupStore[key] = actionValue;
- }
- {
- _hmrPayload.actions[key] = prop;
- }
- optionsForPlugin.actions[key] = prop;
- } else {
- if (isComputed(prop)) {
- _hmrPayload.getters[key] = isOptionsStore ? (
- // @ts-expect-error
- options.getters[key]
- ) : prop;
- if (IS_CLIENT) {
- const getters = setupStore._getters || // @ts-expect-error: same
- (setupStore._getters = vue.markRaw([]));
- getters.push(key);
- }
- }
- }
- }
- {
- assign(store2, setupStore);
- assign(vue.toRaw(store2), setupStore);
- }
- Object.defineProperty(store2, "$state", {
- get: () => hot ? hotState.value : pinia2.state.value[$id],
- set: (state) => {
- if (hot) {
- throw new Error("cannot set hotState");
- }
- $patch(($state) => {
- assign($state, state);
- });
- }
- });
- {
- store2._hotUpdate = vue.markRaw((newStore) => {
- store2._hotUpdating = true;
- newStore._hmrPayload.state.forEach((stateKey) => {
- if (stateKey in store2.$state) {
- const newStateTarget = newStore.$state[stateKey];
- const oldStateSource = store2.$state[stateKey];
- if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) {
- patchObject(newStateTarget, oldStateSource);
- } else {
- newStore.$state[stateKey] = oldStateSource;
- }
- }
- set(store2, stateKey, vue.toRef(newStore.$state, stateKey));
- });
- Object.keys(store2.$state).forEach((stateKey) => {
- if (!(stateKey in newStore.$state)) {
- del(store2, stateKey);
- }
- });
- isListening = false;
- isSyncListening = false;
- pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState");
- isSyncListening = true;
- vue.nextTick().then(() => {
- isListening = true;
- });
- for (const actionName in newStore._hmrPayload.actions) {
- const action = newStore[actionName];
- set(store2, actionName, wrapAction(actionName, action));
- }
- for (const getterName in newStore._hmrPayload.getters) {
- const getter = newStore._hmrPayload.getters[getterName];
- const getterValue = isOptionsStore ? (
- // special handling of options api
- vue.computed(() => {
- setActivePinia(pinia2);
- return getter.call(store2, store2);
- })
- ) : getter;
- set(store2, getterName, getterValue);
- }
- Object.keys(store2._hmrPayload.getters).forEach((key) => {
- if (!(key in newStore._hmrPayload.getters)) {
- del(store2, key);
- }
- });
- Object.keys(store2._hmrPayload.actions).forEach((key) => {
- if (!(key in newStore._hmrPayload.actions)) {
- del(store2, key);
- }
- });
- store2._hmrPayload = newStore._hmrPayload;
- store2._getters = newStore._getters;
- store2._hotUpdating = false;
- });
- }
- if (USE_DEVTOOLS) {
- const nonEnumerable = {
- writable: true,
- configurable: true,
- // avoid warning on devtools trying to display this property
- enumerable: false
- };
- ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
- Object.defineProperty(store2, p, assign({ value: store2[p] }, nonEnumerable));
- });
- }
- pinia2._p.forEach((extender) => {
- if (USE_DEVTOOLS) {
- const extensions = scope.run(() => extender({
- store: store2,
- app: pinia2._a,
- pinia: pinia2,
- options: optionsForPlugin
- }));
- Object.keys(extensions || {}).forEach((key) => store2._customProperties.add(key));
- assign(store2, extensions);
- } else {
- assign(store2, scope.run(() => extender({
- store: store2,
- app: pinia2._a,
- pinia: pinia2,
- options: optionsForPlugin
- })));
- }
- });
- if (store2.$state && typeof store2.$state === "object" && typeof store2.$state.constructor === "function" && !store2.$state.constructor.toString().includes("[native code]")) {
- console.warn(`[🍍]: The "state" must be a plain object. It cannot be
- state: () => new MyClass()
- Found in store "${store2.$id}".`);
- }
- if (initialState && isOptionsStore && options.hydrate) {
- options.hydrate(store2.$state, initialState);
- }
- isListening = true;
- isSyncListening = true;
- return store2;
- }
- function defineStore(idOrOptions, setup, setupOptions) {
- let id;
- let options;
- const isSetupStore = typeof setup === "function";
- if (typeof idOrOptions === "string") {
- id = idOrOptions;
- options = isSetupStore ? setupOptions : setup;
- } else {
- options = idOrOptions;
- id = idOrOptions.id;
- if (typeof id !== "string") {
- throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
- }
- }
- function useStore2(pinia2, hot) {
- const hasContext = vue.hasInjectionContext();
- pinia2 = // in test mode, ignore the argument provided as we can always retrieve a
- // pinia instance with getActivePinia()
- pinia2 || (hasContext ? vue.inject(piniaSymbol, null) : null);
- if (pinia2)
- setActivePinia(pinia2);
- if (!activePinia) {
- throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
- See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
- This will fail in production.`);
- }
- pinia2 = activePinia;
- if (!pinia2._s.has(id)) {
- if (isSetupStore) {
- createSetupStore(id, setup, options, pinia2);
- } else {
- createOptionsStore(id, options, pinia2);
- }
- {
- useStore2._pinia = pinia2;
- }
- }
- const store2 = pinia2._s.get(id);
- if (hot) {
- const hotId = "__hot:" + id;
- const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign({}, options), pinia2, true);
- hot._hotUpdate(newStore);
- delete pinia2.state.value[hotId];
- pinia2._s.delete(hotId);
- }
- if (IS_CLIENT) {
- const currentInstance = vue.getCurrentInstance();
- if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
- !hot) {
- const vm = currentInstance.proxy;
- const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
- cache[id] = store2;
- }
- }
- return store2;
- }
- useStore2.$id = id;
- return useStore2;
- }
- const useStore = defineStore("user", {
- state: () => ({
- userInfo: {},
- // 用户信息
- token: "",
- // uploadUrl: 'http://192.168.1.3:8080/ai-file/upload/oss', // 上传资源的服务器网址
- uploadUrl: "https://gc.sdzcq.com/prod-api/ai-file/upload/oss"
- // 上传资源的服务器网址
- }),
- getters: {},
- actions: {
- setUserInfo(data) {
- if (data.userId) {
- formatAppLog("log", "at store/uses.js:16", "更新全局的用户信息-也更新本地存储", data);
- this.userInfo = data;
- uni.setStorageSync("userInfo", JSON.stringify(data));
- } else {
- uni.removeStorageSync("userInfo");
- }
- },
- setToken(token) {
- if (token) {
- formatAppLog("log", "at store/uses.js:25", "更新全局的 token -也更新本地存储", token);
- this.token = token;
- uni.setStorageSync("token", token);
- } else {
- uni.removeStorageSync("token");
- }
- }
- }
- });
- const pinia = createPinia();
- const store = useStore(pinia);
- const _sfc_main$1d = {
- __name: "index",
- props: {
- request: {
- type: Function
- },
- requestStr: {
- type: String
- },
- isRefresh: {
- type: [Number, Boolean],
- default: 0
- },
- height: {
- type: [String, Number]
- },
- total: {
- type: [Number],
- default: 0
- },
- otherParams: {
- type: Object,
- default: () => ({})
- },
- diffHeight: {
- type: Number,
- default: 0
- },
- immediate: {
- type: Boolean,
- default: false
- }
- },
- emits: ["updateList", "update:total"],
- setup(__props, { expose: __expose, emit: __emit }) {
- const {
- mescrollInit,
- downCallback,
- getMescroll
- } = useMescroll();
- const windowHeight = vue.computed(() => {
- return store.clientHeight - props2.diffHeight;
- });
- const emit = __emit;
- const props2 = __props;
- const list = vue.ref([]);
- const getList = (mescroll) => {
- return new Promise((resolve, reject) => {
- let params = {
- pageNum: mescroll.num,
- pageSize: mescroll.size,
- ...props2.otherParams
- };
- uni.$u.http.get(props2.requestStr, {
- params
- }).then((res) => {
- emit("update:total", res.total);
- resolve(res);
- });
- });
- };
- const upCallback = (mescroll) => {
- if (!props2.requestStr)
- return;
- getList(mescroll).then((res) => {
- const curPageData = res.rows || res.data || [];
- if (mescroll.num == 1)
- list.value = [];
- list.value = list.value.concat(curPageData);
- emit("updateList", list.value);
- mescroll.endBySize(curPageData.length, res.total);
- }).catch(() => {
- mescroll.endErr();
- });
- };
- const resetUpScroll = () => {
- emit("updateList", []);
- setTimeout(() => {
- getMescroll().resetUpScroll();
- }, 100);
- };
- const scroll = (e) => {
- emit("scroll", e);
- };
- __expose({
- resetUpScroll
- });
- 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() {
- return onShow;
- }, get useMescroll() {
- return useMescroll;
- }, get store() {
- return store;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$6);
- return vue.openBlock(), vue.createBlock(_component_mescroll_uni, {
- onInit: $setup.mescrollInit,
- onDown: $setup.downCallback,
- onUp: $setup.upCallback,
- height: $props.height || $setup.windowHeight + "px",
- up: { textNoMore: "-- 没有更多了 --" }
- }, {
- default: vue.withCtx(() => [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["onInit", "onDown", "height"]);
- }
- const PageScroll = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-30bc23e1"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/pageScroll/index.vue"]]);
- const _sfc_main$1c = {
- __name: "index",
- setup(__props, { expose: __expose }) {
- __expose();
- const statusList = vue.ref([
- {
- label: "待初审",
- value: "1361",
- path: "/pages/order/stat/pending-review"
- },
- {
- label: "待拣件",
- value: "1361",
- path: "/pages/order/stat/pending-pick"
- },
- {
- label: "已拣件待签收",
- value: "1361",
- path: "/pages/order/stat/pending-sign"
- },
- {
- label: "待确认收货",
- value: "1361",
- path: "/pages/order/stat/pending-confirm"
- },
- {
- label: "已到货待审核",
- value: "1361",
- path: "/pages/order/stat/pending-audit"
- },
- {
- label: "待付款",
- value: "1361",
- path: "/pages/order/stat/pending-payment"
- }
- ]);
- const navigateToDetail = (path) => {
- uni.navigateTo({
- url: path
- });
- };
- const __returned__ = { statusList, navigateToDetail, PageScroll, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
- const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "order-statistics" }, [
- vue.createCommentVNode(" 顶部统计卡片 "),
- vue.createElementVNode("view", { class: "overview-card" }, [
- vue.createElementVNode("view", { class: "overview-grid" }, [
- vue.createElementVNode("view", { class: "grid-item" }, [
- vue.createElementVNode("text", { class: "item-label" }, "今日订单"),
- vue.createElementVNode("text", { class: "item-value" }, "1361")
- ]),
- vue.createElementVNode("view", { class: "grid-item" }, [
- vue.createElementVNode("text", { class: "item-label" }, "昨日订单"),
- vue.createElementVNode("text", { class: "item-value" }, "1361")
- ]),
- vue.createElementVNode("view", { class: "grid-item" }, [
- vue.createElementVNode("text", { class: "item-label" }, "本月订单"),
- vue.createElementVNode("text", { class: "item-value" }, [
- vue.createTextVNode("2.77"),
- vue.createElementVNode("text", { class: "unit" }, "万")
- ])
- ])
- ])
- ]),
- vue.createCommentVNode(" 订单状态网格 "),
- vue.createElementVNode("view", { class: "status-grid" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.statusList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "status-item",
- onClick: ($event) => $setup.navigateToDetail(item.path)
- }, [
- vue.createElementVNode("view", { class: "status-content" }, [
- vue.createElementVNode(
- "text",
- { class: "status-label" },
- vue.toDisplayString(item.label),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "status-value-wrap" }, [
- vue.createElementVNode(
- "text",
- { class: "status-value" },
- vue.toDisplayString(item.value),
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_u_icon, {
- name: "arrow-right",
- color: "#999",
- size: "14"
- })
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部操作项 "),
- vue.createElementVNode("view", { class: "bottom-actions" }, [
- vue.createVNode(_component_u_cell_group, { border: false }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_cell, {
- title: "收货统计",
- isLink: "",
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.navigateToDetail("/pages/statistics/receive"))
- }),
- vue.createVNode(_component_u_cell, {
- title: "全部订单",
- isLink: "",
- onClick: _cache[1] || (_cache[1] = ($event) => $setup.navigateToDetail("/pages/order/stat/all")),
- border: false
- })
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- const PagesOrderIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-17a44f9d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/index.vue"]]);
- const props$p = {
- props: {
- // 搜索框形状,round-圆形,square-方形
- shape: {
- type: String,
- default: props$x.search.shape
- },
- // 搜索框背景色,默认值#f2f2f2
- bgColor: {
- type: String,
- default: props$x.search.bgColor
- },
- // 占位提示文字
- placeholder: {
- type: String,
- default: props$x.search.placeholder
- },
- // 是否启用清除控件
- clearabled: {
- type: Boolean,
- default: props$x.search.clearabled
- },
- // 是否自动聚焦
- focus: {
- type: Boolean,
- default: props$x.search.focus
- },
- // 是否在搜索框右侧显示取消按钮
- showAction: {
- type: Boolean,
- default: props$x.search.showAction
- },
- // 右边控件的样式
- actionStyle: {
- type: Object,
- default: props$x.search.actionStyle
- },
- // 取消按钮文字
- actionText: {
- type: String,
- default: props$x.search.actionText
- },
- // 输入框内容对齐方式,可选值为 left|center|right
- inputAlign: {
- type: String,
- default: props$x.search.inputAlign
- },
- // input输入框的样式,可以定义文字颜色,大小等,对象形式
- inputStyle: {
- type: Object,
- default: props$x.search.inputStyle
- },
- // 是否启用输入框
- disabled: {
- type: Boolean,
- default: props$x.search.disabled
- },
- // 边框颜色
- borderColor: {
- type: String,
- default: props$x.search.borderColor
- },
- // 搜索图标的颜色,默认同输入框字体颜色
- searchIconColor: {
- type: String,
- default: props$x.search.searchIconColor
- },
- // 输入框字体颜色
- color: {
- type: String,
- default: props$x.search.color
- },
- // placeholder的颜色
- placeholderColor: {
- type: String,
- default: props$x.search.placeholderColor
- },
- // 左边输入框的图标,可以为uView图标名称或图片路径
- searchIcon: {
- type: String,
- default: props$x.search.searchIcon
- },
- searchIconSize: {
- type: [Number, String],
- default: props$x.search.searchIconSize
- },
- // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
- margin: {
- type: String,
- default: props$x.search.margin
- },
- // 开启showAction时,是否在input获取焦点时才显示
- animation: {
- type: Boolean,
- default: props$x.search.animation
- },
- // 输入框的初始化内容
- modelValue: {
- type: String,
- default: props$x.search.value
- },
- value: {
- type: String,
- default: props$x.search.value
- },
- // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
- maxlength: {
- type: [String, Number],
- default: props$x.search.maxlength
- },
- // 搜索框高度,单位px
- height: {
- type: [String, Number],
- default: props$x.search.height
- },
- // 搜索框左侧文本
- label: {
- type: [String, Number, null],
- default: props$x.search.label
- }
- }
- };
- const _sfc_main$1b = {
- name: "u-search",
- mixins: [mpMixin, mixin, props$p],
- data() {
- return {
- keyword: "",
- showClear: false,
- // 是否显示右边的清除图标
- show: false,
- // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件
- focused: this.focus
- // 绑定输入框的值
- // inputValue: this.value
- };
- },
- watch: {
- keyword(nVal) {
- this.$emit("update:modelValue", nVal);
- this.$emit("change", nVal);
- },
- modelValue: {
- immediate: true,
- handler(nVal) {
- this.keyword = nVal;
- }
- }
- },
- computed: {
- showActionBtn() {
- return !this.animation && this.showAction;
- }
- },
- emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"],
- methods: {
- // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化
- inputChange(e) {
- this.keyword = e.detail.value;
- },
- // 清空输入
- // 也可以作为用户通过this.$refs形式调用清空输入框内容
- clear() {
- this.keyword = "";
- this.$nextTick(() => {
- this.$emit("clear");
- });
- },
- // 确定搜索
- search(e) {
- this.$emit("search", e.detail.value);
- try {
- uni.hideKeyboard();
- } catch (e2) {
- }
- },
- // 点击右边自定义按钮的事件
- custom() {
- this.$emit("custom", this.keyword);
- try {
- uni.hideKeyboard();
- } catch (e) {
- }
- },
- // 获取焦点
- getFocus() {
- this.focused = true;
- if (this.animation && this.showAction)
- this.show = true;
- this.$emit("focus", this.keyword);
- },
- // 失去焦点
- blur() {
- setTimeout(() => {
- this.focused = false;
- }, 100);
- this.show = false;
- this.$emit("blur", this.keyword);
- },
- // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
- clickHandler() {
- if (this.disabled)
- this.$emit("click");
- },
- // 点击左边图标
- clickIcon() {
- this.$emit("clickIcon");
- }
- }
- };
- function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-search",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
- style: vue.normalizeStyle([{
- margin: _ctx.margin
- }, _ctx.$u.addStyle(_ctx.customStyle)])
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: "u-search__content",
- style: vue.normalizeStyle({
- backgroundColor: _ctx.bgColor,
- borderRadius: _ctx.shape == "round" ? "100px" : "4px",
- borderColor: _ctx.borderColor
- })
- },
- [
- _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [
- vue.createElementVNode(
- "text",
- { class: "u-search__content__label" },
- vue.toDisplayString(_ctx.label),
- 1
- /* TEXT */
- )
- ], true) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "u-search__content__icon" }, [
- vue.createVNode(_component_u_icon, {
- onClick: $options.clickIcon,
- size: _ctx.searchIconSize,
- name: _ctx.searchIcon,
- color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
- }, null, 8, ["onClick", "size", "name", "color"])
- ]),
- vue.createElementVNode("input", {
- "confirm-type": "search",
- onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)),
- value: $data.keyword,
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)),
- onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)),
- disabled: _ctx.disabled,
- onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)),
- focus: _ctx.focus,
- maxlength: _ctx.maxlength,
- "placeholder-class": "u-search__content__input--placeholder",
- placeholder: _ctx.placeholder,
- "placeholder-style": `color: ${_ctx.placeholderColor}`,
- class: "u-search__content__input",
- type: "text",
- style: vue.normalizeStyle([{
- textAlign: _ctx.inputAlign,
- color: _ctx.color,
- backgroundColor: _ctx.bgColor,
- height: _ctx.$u.addUnit(_ctx.height)
- }, _ctx.inputStyle])
- }, null, 44, ["value", "disabled", "focus", "maxlength", "placeholder", "placeholder-style"]),
- $data.keyword && _ctx.clearabled && $data.focused ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-search__content__icon u-search__content__close",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
- }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- size: "11",
- color: "#ffffff",
- customStyle: "line-height: 12px"
- })
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- ),
- vue.createElementVNode(
- "text",
- {
- style: vue.normalizeStyle([_ctx.actionStyle]),
- class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]),
- onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"]))
- },
- vue.toDisplayString(_ctx.actionText),
- 7
- /* TEXT, CLASS, STYLE */
- )
- ],
- 4
- /* STYLE */
- );
- }
- const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-e082a34a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
- const props$o = {
- props: {
- // 绑定的值
- modelValue: {
- type: [String, Number],
- default: props$x.input.value
- },
- // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
- // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
- // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
- // text-文本输入键盘
- type: {
- type: String,
- default: props$x.input.type
- },
- // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
- // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
- fixed: {
- type: Boolean,
- default: props$x.input.fixed
- },
- // 是否禁用输入框
- disabled: {
- type: Boolean,
- default: props$x.input.disabled
- },
- // 禁用状态时的背景色
- disabledColor: {
- type: String,
- default: props$x.input.disabledColor
- },
- // 是否显示清除控件
- clearable: {
- type: Boolean,
- default: props$x.input.clearable
- },
- // 是否密码类型
- password: {
- type: Boolean,
- default: props$x.input.password
- },
- // 最大输入长度,设置为 -1 的时候不限制最大长度
- maxlength: {
- type: [String, Number],
- default: props$x.input.maxlength
- },
- // 输入框为空时的占位符
- placeholder: {
- type: String,
- default: props$x.input.placeholder
- },
- // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
- placeholderClass: {
- type: String,
- default: props$x.input.placeholderClass
- },
- // 指定placeholder的样式
- placeholderStyle: {
- type: [String, Object],
- default: props$x.input.placeholderStyle
- },
- // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
- showWordLimit: {
- type: Boolean,
- default: props$x.input.showWordLimit
- },
- // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
- // https://uniapp.dcloud.io/component/input
- // https://uniapp.dcloud.io/component/textarea
- confirmType: {
- type: String,
- default: props$x.input.confirmType
- },
- // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
- confirmHold: {
- type: Boolean,
- default: props$x.input.confirmHold
- },
- // focus时,点击页面的时候不收起键盘,微信小程序有效
- holdKeyboard: {
- type: Boolean,
- default: props$x.input.holdKeyboard
- },
- // 自动获取焦点
- // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
- focus: {
- type: Boolean,
- default: props$x.input.focus
- },
- // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
- autoBlur: {
- type: Boolean,
- default: props$x.input.autoBlur
- },
- // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
- disableDefaultPadding: {
- type: Boolean,
- default: props$x.input.disableDefaultPadding
- },
- // 指定focus时光标的位置
- cursor: {
- type: [String, Number],
- default: props$x.input.cursor
- },
- // 输入框聚焦时底部与键盘的距离
- cursorSpacing: {
- type: [String, Number],
- default: props$x.input.cursorSpacing
- },
- // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
- selectionStart: {
- type: [String, Number],
- default: props$x.input.selectionStart
- },
- // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
- selectionEnd: {
- type: [String, Number],
- default: props$x.input.selectionEnd
- },
- // 键盘弹起时,是否自动上推页面
- adjustPosition: {
- type: Boolean,
- default: props$x.input.adjustPosition
- },
- // 输入框内容对齐方式,可选值为:left|center|right
- inputAlign: {
- type: String,
- default: props$x.input.inputAlign
- },
- // 输入框字体的大小
- fontSize: {
- type: [String, Number],
- default: props$x.input.fontSize
- },
- // 输入框字体颜色
- color: {
- type: String,
- default: props$x.input.color
- },
- // 输入框前置图标
- prefixIcon: {
- type: String,
- default: props$x.input.prefixIcon
- },
- // 前置图标样式,对象或字符串
- prefixIconStyle: {
- type: [String, Object],
- default: props$x.input.prefixIconStyle
- },
- // 输入框后置图标
- suffixIcon: {
- type: String,
- default: props$x.input.suffixIcon
- },
- // 后置图标样式,对象或字符串
- suffixIconStyle: {
- type: [String, Object],
- default: props$x.input.suffixIconStyle
- },
- // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
- border: {
- type: String,
- default: props$x.input.border
- },
- // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
- readonly: {
- type: Boolean,
- default: props$x.input.readonly
- },
- // 输入框形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$x.input.shape
- },
- // 用于处理或者过滤输入框内容的方法
- formatter: {
- type: [Function, null],
- default: props$x.input.formatter
- },
- // 是否忽略组件内对文本合成系统事件的处理
- ignoreCompositionEvent: {
- type: Boolean,
- default: true
- }
- }
- };
- const _sfc_main$1a = {
- name: "u-input",
- mixins: [mpMixin, mixin, props$o],
- data() {
- return {
- // 输入框的值
- innerValue: "",
- // 是否处于获得焦点状态
- focused: false,
- // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
- firstChange: true,
- // value绑定值的变化是由内部还是外部引起的
- changeFromInner: false,
- // 过滤处理方法
- innerFormatter: (value2) => value2
- };
- },
- watch: {
- modelValue: {
- immediate: true,
- handler(newVal, oldVal) {
- this.innerValue = newVal;
- this.firstChange = false;
- this.changeFromInner = false;
- }
- }
- },
- computed: {
- // 是否显示清除控件
- isShowClear() {
- const { clearable, readonly, focused, innerValue } = this;
- return !!clearable && !readonly && !!focused && innerValue !== "";
- },
- // 组件的类名
- inputClass() {
- let classes = [], { border, disabled, shape } = this;
- border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
- classes.push(`u-input--${shape}`);
- border === "bottom" && (classes = classes.concat([
- "u-border-bottom",
- "u-input--no-radius"
- ]));
- return classes.join(" ");
- },
- // 组件的样式
- wrapperStyle() {
- const style = {};
- if (this.disabled) {
- style.backgroundColor = this.disabledColor;
- }
- if (this.border === "none") {
- style.padding = "0";
- } else {
- style.paddingTop = "6px";
- style.paddingBottom = "6px";
- style.paddingLeft = "9px";
- style.paddingRight = "9px";
- }
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- },
- // 输入框的样式
- inputStyle() {
- const style = {
- color: this.color,
- fontSize: uni.$u.addUnit(this.fontSize),
- textAlign: this.inputAlign
- };
- return style;
- }
- },
- emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
- methods: {
- // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
- setFormatter(e) {
- this.innerFormatter = e;
- },
- // 当键盘输入时,触发input事件
- onInput(e) {
- let { value: value2 = "" } = e.detail || {};
- const formatter = this.formatter || this.innerFormatter;
- const formatValue = formatter(value2);
- this.innerValue = value2;
- this.$nextTick(() => {
- this.innerValue = formatValue;
- this.valueChange();
- });
- },
- // 输入框失去焦点时触发
- onBlur(event) {
- this.$emit("blur", event.detail.value);
- uni.$u.sleep(50).then(() => {
- this.focused = false;
- });
- uni.$u.formValidate(this, "blur");
- },
- // 输入框聚焦时触发
- onFocus(event) {
- this.focused = true;
- this.$emit("focus");
- },
- // 点击完成按钮时触发
- onConfirm(event) {
- this.$emit("confirm", this.innerValue);
- },
- // 键盘高度发生变化的时候触发此事件
- // 兼容性:微信小程序2.7.0+、App 3.1.0+
- onkeyboardheightchange() {
- this.$emit("keyboardheightchange");
- },
- // 内容发生变化,进行处理
- valueChange() {
- const value2 = this.innerValue;
- this.$nextTick(() => {
- this.$emit("update:modelValue", value2);
- this.changeFromInner = true;
- this.$emit("change", value2);
- uni.$u.formValidate(this, "change");
- });
- },
- // 点击清除控件
- onClear() {
- this.innerValue = "";
- this.$nextTick(() => {
- this.valueChange();
- this.$emit("clear");
- });
- },
- /**
- * 在安卓nvue上,事件无法冒泡
- * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
- * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
- */
- clickHandler() {
- }
- }
- };
- function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-input", $options.inputClass]),
- style: vue.normalizeStyle([$options.wrapperStyle])
- },
- [
- vue.createElementVNode("view", { class: "u-input__content" }, [
- _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-input__content__prefix-icon"
- }, [
- vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
- vue.createVNode(_component_u_icon, {
- name: _ctx.prefixIcon,
- size: "18",
- customStyle: _ctx.prefixIconStyle
- }, null, 8, ["name", "customStyle"])
- ], true)
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "u-input__content__field-wrapper",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- }, [
- vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\r\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\r\n "),
- vue.createElementVNode("input", {
- class: "u-input__content__field-wrapper__field",
- style: vue.normalizeStyle([$options.inputStyle]),
- type: _ctx.type,
- focus: _ctx.focus,
- cursor: _ctx.cursor,
- value: $data.innerValue,
- "auto-blur": _ctx.autoBlur,
- disabled: _ctx.disabled || _ctx.readonly,
- maxlength: _ctx.maxlength,
- placeholder: _ctx.placeholder,
- "placeholder-style": _ctx.placeholderStyle,
- "placeholder-class": _ctx.placeholderClass,
- "confirm-type": _ctx.confirmType,
- "confirm-hold": _ctx.confirmHold,
- "hold-keyboard": _ctx.holdKeyboard,
- "cursor-spacing": _ctx.cursorSpacing,
- "adjust-position": _ctx.adjustPosition,
- "selection-end": _ctx.selectionEnd,
- "selection-start": _ctx.selectionStart,
- password: _ctx.password || _ctx.type === "password" || void 0,
- ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
- onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
- onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
- onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
- onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
- onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
- }, 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"])
- ]),
- $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-input__content__clear",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args))
- }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- size: "11",
- color: "#ffffff",
- customStyle: "line-height: 12px"
- })
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "u-input__content__subfix-icon"
- }, [
- vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
- vue.createVNode(_component_u_icon, {
- name: _ctx.suffixIcon,
- size: "18",
- customStyle: _ctx.suffixIconStyle
- }, null, 8, ["name", "customStyle"])
- ], true)
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-df79975b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
- const props$n = {
- props: {
- // input的label提示语
- label: {
- type: String,
- default: props$x.formItem.label
- },
- // 绑定的值
- prop: {
- type: String,
- default: props$x.formItem.prop
- },
- // 是否显示表单域的下划线边框
- borderBottom: {
- type: [String, Boolean],
- default: props$x.formItem.borderBottom
- },
- // label的宽度,单位px
- labelWidth: {
- type: [String, Number],
- default: props$x.formItem.labelWidth
- },
- // 右侧图标
- rightIcon: {
- type: String,
- default: props$x.formItem.rightIcon
- },
- // 左侧图标
- leftIcon: {
- type: String,
- default: props$x.formItem.leftIcon
- },
- // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
- required: {
- type: Boolean,
- default: props$x.formItem.required
- },
- leftIconStyle: {
- type: [String, Object],
- default: props$x.formItem.leftIconStyle
- }
- }
- };
- const _sfc_main$19 = {
- name: "u-form-item",
- mixins: [mpMixin, mixin, props$n],
- data() {
- return {
- // 错误提示语
- message: "",
- parentData: {
- // 提示文本的位置
- labelPosition: "left",
- // 提示文本对齐方式
- labelAlign: "left",
- // 提示文本的样式
- labelStyle: {},
- // 提示文本的宽度
- labelWidth: 45,
- // 错误提示方式
- errorType: "message"
- }
- };
- },
- // 组件创建完成时,将当前实例保存到u-form中
- computed: {
- propsLine() {
- return uni.$u.props.line;
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- this.updateParentData();
- if (!this.parent) {
- uni.$u.error("u-form-item需要结合u-form组件使用");
- }
- },
- // 获取父组件的参数
- updateParentData() {
- this.getParentData("u-form");
- },
- // 移除u-form-item的校验结果
- clearValidate() {
- this.message = null;
- },
- // 清空当前的组件的校验结果,并重置为初始值
- resetField() {
- const value2 = uni.$u.getProperty(this.parent.originalModel, this.prop);
- uni.$u.setProperty(this.parent.model, this.prop, value2);
- this.message = null;
- },
- // 点击组件
- clickHandler() {
- this.$emit("click");
- }
- }
- };
- function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-form-item" }, [
- vue.createElementVNode(
- "view",
- {
- class: "u-form-item__body",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), {
- flexDirection: $data.parentData.labelPosition === "left" ? "row" : "column"
- }])
- },
- [
- vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '),
- vue.renderSlot(_ctx.$slots, "label", {}, () => [
- vue.createCommentVNode(" {{required}} "),
- _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "u-form-item__body__left",
- style: vue.normalizeStyle({
- width: _ctx.$u.addUnit(_ctx.labelWidth || $data.parentData.labelWidth),
- marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px"
- })
- },
- [
- vue.createCommentVNode(" 为了块对齐 "),
- vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [
- vue.createCommentVNode(" nvue不支持伪元素before "),
- _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "u-form-item__body__left__content__required"
- }, "*")) : vue.createCommentVNode("v-if", true),
- _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-form-item__body__left__content__icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: _ctx.leftIcon,
- "custom-style": _ctx.leftIconStyle
- }, null, 8, ["name", "custom-style"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- {
- class: "u-form-item__body__left__content__label",
- style: vue.normalizeStyle([$data.parentData.labelStyle, {
- justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end"
- }])
- },
- vue.toDisplayString(_ctx.label),
- 5
- /* TEXT, STYLE */
- )
- ])
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], true),
- vue.createElementVNode("view", { class: "u-form-item__body__right" }, [
- vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [
- vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ]),
- _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "item__body__right__content__icon"
- }, [
- vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ],
- 4
- /* STYLE */
- ),
- vue.renderSlot(_ctx.$slots, "error", {}, () => [
- !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-form-item__body__right__message",
- style: vue.normalizeStyle({
- marginLeft: _ctx.$u.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth)
- })
- },
- vue.toDisplayString($data.message),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], true),
- _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, {
- key: 0,
- color: $data.message && $data.parentData.errorType === "border-bottom" ? _ctx.$u.color.error : $options.propsLine.color,
- customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}`
- }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-42bac3de"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
- const props$m = {
- props: {
- // 是否显示组件
- show: {
- type: Boolean,
- default: props$x.loadingIcon.show
- },
- // 颜色
- color: {
- type: String,
- default: props$x.loadingIcon.color
- },
- // 提示文字颜色
- textColor: {
- type: String,
- default: props$x.loadingIcon.textColor
- },
- // 文字和图标是否垂直排列
- vertical: {
- type: Boolean,
- default: props$x.loadingIcon.vertical
- },
- // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
- mode: {
- type: String,
- default: props$x.loadingIcon.mode
- },
- // 图标大小,单位默认px
- size: {
- type: [String, Number],
- default: props$x.loadingIcon.size
- },
- // 文字大小
- textSize: {
- type: [String, Number],
- default: props$x.loadingIcon.textSize
- },
- // 文字内容
- text: {
- type: [String, Number],
- default: props$x.loadingIcon.text
- },
- // 动画模式
- timingFunction: {
- type: String,
- default: props$x.loadingIcon.timingFunction
- },
- // 动画执行周期时间
- duration: {
- type: [String, Number],
- default: props$x.loadingIcon.duration
- },
- // mode=circle时的暗边颜色
- inactiveColor: {
- type: String,
- default: props$x.loadingIcon.inactiveColor
- }
- }
- };
- const _sfc_main$18 = {
- name: "u-loading-icon",
- mixins: [mpMixin, mixin, props$m],
- data() {
- return {
- // Array.form可以通过一个伪数组对象创建指定长度的数组
- // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
- array12: Array.from({
- length: 12
- }),
- // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
- // 在iOS nvue上,则会一开始默认执行两个周期的动画
- aniAngel: 360,
- // 动画旋转角度
- webviewHide: false,
- // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
- loading: false
- // 是否运行中,针对nvue使用
- };
- },
- computed: {
- // 当为circle类型时,给其另外三边设置一个更轻一些的颜色
- // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
- // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
- otherBorderColor() {
- const lightColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[80];
- if (this.mode === "circle") {
- return this.inactiveColor ? this.inactiveColor : lightColor;
- } else {
- return "transparent";
- }
- }
- },
- watch: {
- show(n) {
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- setTimeout(() => {
- this.show && this.addEventListenerToWebview();
- }, 20);
- },
- // 监听webview的显示与隐藏
- addEventListenerToWebview() {
- const pages2 = getCurrentPages();
- const page2 = pages2[pages2.length - 1];
- const currentWebview = page2.$getAppWebview();
- currentWebview.addEventListener("hide", () => {
- this.webviewHide = true;
- });
- currentWebview.addEventListener("show", () => {
- this.webviewHide = false;
- });
- }
- }
- };
- function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
- return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
- },
- [
- !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]),
- ref: "ani",
- style: vue.normalizeStyle({
- color: _ctx.color,
- width: _ctx.$u.addUnit(_ctx.size),
- height: _ctx.$u.addUnit(_ctx.size),
- borderTopColor: _ctx.color,
- borderBottomColor: $options.otherBorderColor,
- borderLeftColor: $options.otherBorderColor,
- borderRightColor: $options.otherBorderColor,
- "animation-duration": `${_ctx.duration}ms`,
- "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
- })
- },
- [
- _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.array12, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "u-loading-icon__dot"
- });
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.text ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-loading-icon__text",
- style: vue.normalizeStyle({
- fontSize: _ctx.$u.addUnit(_ctx.textSize),
- color: _ctx.textColor
- })
- },
- vue.toDisplayString(_ctx.text),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-2af81691"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
- function pickExclude(obj, keys) {
- if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
- return {};
- }
- return Object.keys(obj).reduce((prev, key) => {
- if (!keys.includes(key)) {
- prev[key] = obj[key];
- }
- return prev;
- }, {});
- }
- function formatImage(res) {
- return res.tempFiles.map((item) => ({
- ...pickExclude(item, ["path"]),
- type: "image",
- url: item.path,
- thumb: item.path,
- size: item.size
- }));
- }
- function formatVideo(res) {
- return [
- {
- ...pickExclude(res, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
- type: "video",
- url: res.tempFilePath,
- thumb: res.thumbTempFilePath,
- size: res.size
- }
- ];
- }
- function chooseFile({
- accept,
- multiple,
- capture,
- compressed,
- maxDuration,
- sizeType,
- camera,
- maxCount
- }) {
- return new Promise((resolve, reject) => {
- switch (accept) {
- case "image":
- uni.chooseImage({
- count: multiple ? Math.min(maxCount, 9) : 1,
- sourceType: capture,
- sizeType,
- success: (res) => resolve(formatImage(res)),
- fail: reject
- });
- break;
- case "video":
- uni.chooseVideo({
- sourceType: capture,
- compressed,
- maxDuration,
- camera,
- success: (res) => resolve(formatVideo(res)),
- fail: reject
- });
- break;
- }
- });
- }
- const mixinUp = {
- watch: {
- // 监听accept的变化,判断是否符合个平台要求
- // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
- accept: {
- immediate: true,
- handler(val) {
- if (val === "all" || val === "media") {
- uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
- }
- if (val === "file") {
- uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
- }
- }
- }
- }
- };
- const props$l = {
- props: {
- // 接受的文件类型, 可选值为all media image file video
- accept: {
- type: String,
- default: props$x.upload.accept
- },
- // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
- capture: {
- type: [String, Array],
- default: props$x.upload.capture
- },
- // 当accept为video时生效,是否压缩视频,默认为true
- compressed: {
- type: Boolean,
- default: props$x.upload.compressed
- },
- // 当accept为video时生效,可选值为back或front
- camera: {
- type: String,
- default: props$x.upload.camera
- },
- // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
- maxDuration: {
- type: Number,
- default: props$x.upload.maxDuration
- },
- // 上传区域的图标,只能内置图标
- uploadIcon: {
- type: String,
- default: props$x.upload.uploadIcon
- },
- // 上传区域的图标的颜色,默认
- uploadIconColor: {
- type: String,
- default: props$x.upload.uploadIconColor
- },
- // 是否开启文件读取前事件
- useBeforeRead: {
- type: Boolean,
- default: props$x.upload.useBeforeRead
- },
- // 读取后的处理函数
- afterRead: {
- type: Function,
- default: null
- },
- // 读取前的处理函数
- beforeRead: {
- type: Function,
- default: null
- },
- // 是否显示组件自带的图片预览功能
- previewFullImage: {
- type: Boolean,
- default: props$x.upload.previewFullImage
- },
- // 最大上传数量
- maxCount: {
- type: [String, Number],
- default: props$x.upload.maxCount
- },
- // 是否启用
- disabled: {
- type: Boolean,
- default: props$x.upload.disabled
- },
- // 预览上传的图片时的裁剪模式,和image组件mode属性一致
- imageMode: {
- type: String,
- default: props$x.upload.imageMode
- },
- // 标识符,可以在回调函数的第二项参数中获取
- name: {
- type: String,
- default: props$x.upload.name
- },
- // 所选的图片的尺寸, 可选值为original compressed
- sizeType: {
- type: Array,
- default: props$x.upload.sizeType
- },
- // 是否开启图片多选,部分安卓机型不支持
- multiple: {
- type: Boolean,
- default: props$x.upload.multiple
- },
- // 是否展示删除按钮
- deletable: {
- type: Boolean,
- default: props$x.upload.deletable
- },
- // 文件大小限制,单位为byte
- maxSize: {
- type: [String, Number],
- default: props$x.upload.maxSize
- },
- // 显示已上传的文件列表
- fileList: {
- type: Array,
- default: props$x.upload.fileList
- },
- // 上传区域的提示文字
- uploadText: {
- type: String,
- default: props$x.upload.uploadText
- },
- // 内部预览图片区域和选择图片按钮的区域宽度
- width: {
- type: [String, Number],
- default: props$x.upload.width
- },
- // 内部预览图片区域和选择图片按钮的区域高度
- height: {
- type: [String, Number],
- default: props$x.upload.height
- },
- // 是否在上传完成后展示预览图
- previewImage: {
- type: Boolean,
- default: props$x.upload.previewImage
- }
- }
- };
- const _sfc_main$17 = {
- name: "u-upload",
- mixins: [mpMixin, mixin, mixinUp, props$l],
- data() {
- return {
- lists: [],
- isInCount: true
- };
- },
- watch: {
- // 监听文件列表的变化,重新整理内部数据
- fileList: {
- immediate: true,
- handler() {
- this.formatFileList();
- },
- immediate: true,
- deep: true
- }
- },
- emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
- methods: {
- formatFileList() {
- const {
- fileList = [],
- maxCount
- } = this;
- const lists = fileList.map(
- (item) => Object.assign(Object.assign({}, item), {
- // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
- isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
- isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
- deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
- })
- );
- this.lists = lists;
- this.isInCount = lists.length < maxCount;
- },
- chooseFile() {
- const {
- maxCount,
- multiple,
- lists,
- disabled
- } = this;
- if (disabled)
- return;
- let capture;
- try {
- capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
- } catch (e) {
- capture = [];
- }
- chooseFile(
- Object.assign({
- accept: this.accept,
- multiple: this.multiple,
- capture,
- compressed: this.compressed,
- maxDuration: this.maxDuration,
- sizeType: this.sizeType,
- camera: this.camera
- }, {
- maxCount: maxCount - lists.length
- })
- ).then((res) => {
- this.onBeforeRead(multiple ? res : res[0]);
- }).catch((error2) => {
- this.$emit("error", error2);
- });
- },
- // 文件读取之前
- onBeforeRead(file) {
- const {
- beforeRead,
- useBeforeRead
- } = this;
- let res = true;
- if (uni.$u.test.func(beforeRead)) {
- res = beforeRead(file, this.getDetail());
- }
- if (useBeforeRead) {
- res = new Promise((resolve, reject) => {
- this.$emit(
- "beforeRead",
- Object.assign(Object.assign({
- file
- }, this.getDetail()), {
- callback: (ok) => {
- ok ? resolve() : reject();
- }
- })
- );
- });
- }
- if (!res) {
- return;
- }
- if (uni.$u.test.promise(res)) {
- res.then((data) => this.onAfterRead(data || file));
- } else {
- this.onAfterRead(file);
- }
- },
- getDetail(index2) {
- return {
- name: this.name,
- index: index2 == null ? this.fileList.length : index2
- };
- },
- onAfterRead(file) {
- const {
- maxSize,
- afterRead
- } = this;
- const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
- if (oversize) {
- this.$emit("oversize", Object.assign({
- file
- }, this.getDetail()));
- return;
- }
- if (typeof afterRead === "function") {
- afterRead(file, this.getDetail());
- }
- this.$emit("afterRead", Object.assign({
- file
- }, this.getDetail()));
- },
- deleteItem(index2) {
- this.$emit(
- "delete",
- Object.assign(Object.assign({}, this.getDetail(index2)), {
- file: this.fileList[index2]
- })
- );
- },
- // 预览图片
- onPreviewImage(item) {
- if (!item.isImage || !this.previewFullImage)
- return;
- uni.previewImage({
- // 先filter找出为图片的item,再返回filter结果中的图片url
- urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
- current: item.url || item.thumb,
- fail() {
- uni.$u.toast("预览图片失败");
- }
- });
- },
- onPreviewVideo(event) {
- if (!this.data.previewFullImage)
- return;
- const {
- index: index2
- } = event.currentTarget.dataset;
- const {
- lists
- } = this.data;
- wx.previewMedia({
- sources: lists.filter((item) => isVideoFile(item)).map(
- (item) => Object.assign(Object.assign({}, item), {
- type: "video"
- })
- ),
- current: index2,
- fail() {
- uni.$u.toast("预览视频失败");
- }
- });
- },
- onClickPreview(event) {
- const {
- index: index2
- } = event.currentTarget.dataset;
- const item = this.data.lists[index2];
- this.$emit(
- "clickPreview",
- Object.assign(Object.assign({}, item), this.getDetail(index2))
- );
- }
- }
- };
- function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-upload",
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
- },
- [
- vue.createElementVNode("view", { class: "u-upload__wrap" }, [
- _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.lists, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "u-upload__wrap__preview",
- key: index2
- }, [
- item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: item.thumb || item.url,
- mode: _ctx.imageMode,
- class: "u-upload__wrap__preview__image",
- onClick: ($event) => $options.onPreviewImage(item),
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.width),
- height: _ctx.$u.addUnit(_ctx.height)
- }])
- }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-upload__wrap__preview__other"
- }, [
- vue.createVNode(_component_u_icon, {
- color: "#80CBF9",
- size: "26",
- name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
- }, null, 8, ["name"]),
- vue.createElementVNode(
- "text",
- { class: "u-upload__wrap__preview__other__text" },
- vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
- 1
- /* TEXT */
- )
- ])),
- item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "u-upload__status"
- }, [
- vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
- item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: "close-circle",
- color: "#ffffff",
- size: "25"
- })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
- key: 1,
- size: "22",
- mode: "circle",
- color: "#ffffff"
- }))
- ]),
- item.message ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-upload__status__message"
- },
- vue.toDisplayString(item.message),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "u-upload__deletable",
- onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- color: "#ffffff",
- size: "10"
- })
- ])
- ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "u-upload__success"
- }, [
- vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
- vue.createVNode(_component_u_icon, {
- name: "checkmark",
- color: "#ffffff",
- size: "12"
- })
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
- "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
- "hover-stay-time": "150",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.width),
- height: _ctx.$u.addUnit(_ctx.height)
- }])
- }, [
- vue.createVNode(_component_u_icon, {
- name: _ctx.uploadIcon,
- size: "26",
- color: _ctx.uploadIconColor
- }, null, 8, ["name", "color"]),
- _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-upload__button__text"
- },
- vue.toDisplayString(_ctx.uploadText),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ], 14, ["hover-class"]))
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ],
- 4
- /* STYLE */
- );
- }
- const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
- const props$k = {
- props: {
- // 当前form的需要验证字段的集合
- model: {
- type: Object,
- default: props$x.form.model
- },
- // 验证规则
- rules: {
- type: [Object, Function, Array],
- default: props$x.form.rules
- },
- // 有错误时的提示方式,message-提示信息,toast-进行toast提示
- // border-bottom-下边框呈现红色,none-无提示
- errorType: {
- type: String,
- default: props$x.form.errorType
- },
- // 是否显示表单域的下划线边框
- borderBottom: {
- type: Boolean,
- default: props$x.form.borderBottom
- },
- // label的位置,left-左边,top-上边
- labelPosition: {
- type: String,
- default: props$x.form.labelPosition
- },
- // label的宽度,单位px
- labelWidth: {
- type: [String, Number],
- default: props$x.form.labelWidth
- },
- // lable字体的对齐方式
- labelAlign: {
- type: String,
- default: props$x.form.labelAlign
- },
- // lable的样式,对象形式
- labelStyle: {
- type: Object,
- default: props$x.form.labelStyle
- }
- }
- };
- var define_process_env_default = {};
- const formatRegExp = /%[sdj%]/g;
- let warning = function warning2() {
- };
- if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
- warning = function warning3(type2, errors) {
- if (typeof console !== "undefined" && console.warn) {
- if (errors.every((e) => typeof e === "string")) {
- formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
- }
- }
- };
- }
- function convertFieldsError(errors) {
- if (!errors || !errors.length)
- return null;
- const fields = {};
- errors.forEach((error2) => {
- const { field } = error2;
- fields[field] = fields[field] || [];
- fields[field].push(error2);
- });
- return fields;
- }
- function format() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- let i = 1;
- const f = args[0];
- const len = args.length;
- if (typeof f === "function") {
- return f.apply(null, args.slice(1));
- }
- if (typeof f === "string") {
- let str = String(f).replace(formatRegExp, (x) => {
- if (x === "%%") {
- return "%";
- }
- if (i >= len) {
- return x;
- }
- switch (x) {
- case "%s":
- return String(args[i++]);
- case "%d":
- return Number(args[i++]);
- case "%j":
- try {
- return JSON.stringify(args[i++]);
- } catch (_) {
- return "[Circular]";
- }
- break;
- default:
- return x;
- }
- });
- for (let arg = args[i]; i < len; arg = args[++i]) {
- str += ` ${arg}`;
- }
- return str;
- }
- return f;
- }
- function isNativeStringType(type2) {
- return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
- }
- function isEmptyValue(value2, type2) {
- if (value2 === void 0 || value2 === null) {
- return true;
- }
- if (type2 === "array" && Array.isArray(value2) && !value2.length) {
- return true;
- }
- if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
- return true;
- }
- return false;
- }
- function asyncParallelArray(arr, func2, callback) {
- const results = [];
- let total = 0;
- const arrLength = arr.length;
- function count(errors) {
- results.push.apply(results, errors);
- total++;
- if (total === arrLength) {
- callback(results);
- }
- }
- arr.forEach((a) => {
- func2(a, count);
- });
- }
- function asyncSerialArray(arr, func2, callback) {
- let index2 = 0;
- const arrLength = arr.length;
- function next(errors) {
- if (errors && errors.length) {
- callback(errors);
- return;
- }
- const original = index2;
- index2 += 1;
- if (original < arrLength) {
- func2(arr[original], next);
- } else {
- callback([]);
- }
- }
- next([]);
- }
- function flattenObjArr(objArr) {
- const ret = [];
- Object.keys(objArr).forEach((k) => {
- ret.push.apply(ret, objArr[k]);
- });
- return ret;
- }
- function asyncMap(objArr, option, func2, callback) {
- if (option.first) {
- const _pending = new Promise((resolve, reject) => {
- const next = function next2(errors) {
- callback(errors);
- return errors.length ? reject({
- errors,
- fields: convertFieldsError(errors)
- }) : resolve();
- };
- const flattenArr = flattenObjArr(objArr);
- asyncSerialArray(flattenArr, func2, next);
- });
- _pending.catch((e) => e);
- return _pending;
- }
- let firstFields = option.firstFields || [];
- if (firstFields === true) {
- firstFields = Object.keys(objArr);
- }
- const objArrKeys = Object.keys(objArr);
- const objArrLength = objArrKeys.length;
- let total = 0;
- const results = [];
- const pending = new Promise((resolve, reject) => {
- const next = function next2(errors) {
- results.push.apply(results, errors);
- total++;
- if (total === objArrLength) {
- callback(results);
- return results.length ? reject({
- errors: results,
- fields: convertFieldsError(results)
- }) : resolve();
- }
- };
- if (!objArrKeys.length) {
- callback(results);
- resolve();
- }
- objArrKeys.forEach((key) => {
- const arr = objArr[key];
- if (firstFields.indexOf(key) !== -1) {
- asyncSerialArray(arr, func2, next);
- } else {
- asyncParallelArray(arr, func2, next);
- }
- });
- });
- pending.catch((e) => e);
- return pending;
- }
- function complementError(rule) {
- return function(oe) {
- if (oe && oe.message) {
- oe.field = oe.field || rule.fullField;
- return oe;
- }
- return {
- message: typeof oe === "function" ? oe() : oe,
- field: oe.field || rule.fullField
- };
- };
- }
- function deepMerge$2(target, source) {
- if (source) {
- for (const s in source) {
- if (source.hasOwnProperty(s)) {
- const value2 = source[s];
- if (typeof value2 === "object" && typeof target[s] === "object") {
- target[s] = { ...target[s], ...value2 };
- } else {
- target[s] = value2;
- }
- }
- }
- }
- return target;
- }
- function required(rule, value2, source, errors, options, type2) {
- if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
- errors.push(format(options.messages.required, rule.fullField));
- }
- }
- function whitespace(rule, value2, source, errors, options) {
- if (/^\s+$/.test(value2) || value2 === "") {
- errors.push(format(options.messages.whitespace, rule.fullField));
- }
- }
- const pattern = {
- // http://emailregex.com/
- 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,}))$/,
- url: new RegExp(
- "^(?!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]*)?$",
- "i"
- ),
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
- };
- var types = {
- integer: function integer(value2) {
- return /^(-)?\d+$/.test(value2);
- },
- float: function float(value2) {
- return /^(-)?\d+(\.\d+)?$/.test(value2);
- },
- array: function array3(value2) {
- return Array.isArray(value2);
- },
- regexp: function regexp(value2) {
- if (value2 instanceof RegExp) {
- return true;
- }
- try {
- return !!new RegExp(value2);
- } catch (e) {
- return false;
- }
- },
- date: function date3(value2) {
- return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
- },
- number: function number3(value2) {
- if (isNaN(value2)) {
- return false;
- }
- return typeof +value2 === "number";
- },
- object: function object3(value2) {
- return typeof value2 === "object" && !types.array(value2);
- },
- method: function method(value2) {
- return typeof value2 === "function";
- },
- email: function email2(value2) {
- return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
- },
- url: function url2(value2) {
- return typeof value2 === "string" && !!value2.match(pattern.url);
- },
- hex: function hex(value2) {
- return typeof value2 === "string" && !!value2.match(pattern.hex);
- }
- };
- function type(rule, value2, source, errors, options) {
- if (rule.required && value2 === void 0) {
- required(rule, value2, source, errors, options);
- return;
- }
- const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
- const ruleType = rule.type;
- if (custom.indexOf(ruleType) > -1) {
- if (!types[ruleType](value2)) {
- errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
- }
- } else if (ruleType && typeof value2 !== rule.type) {
- errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
- }
- }
- function range$2(rule, value2, source, errors, options) {
- const len = typeof rule.len === "number";
- const min = typeof rule.min === "number";
- const max = typeof rule.max === "number";
- const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
- let val = value2;
- let key = null;
- const num = typeof value2 === "number";
- const str = typeof value2 === "string";
- const arr = Array.isArray(value2);
- if (num) {
- key = "number";
- } else if (str) {
- key = "string";
- } else if (arr) {
- key = "array";
- }
- if (!key) {
- return false;
- }
- if (arr) {
- val = value2.length;
- }
- if (str) {
- val = value2.replace(spRegexp, "_").length;
- }
- if (len) {
- if (val !== rule.len) {
- errors.push(format(options.messages[key].len, rule.fullField, rule.len));
- }
- } else if (min && !max && val < rule.min) {
- errors.push(format(options.messages[key].min, rule.fullField, rule.min));
- } else if (max && !min && val > rule.max) {
- errors.push(format(options.messages[key].max, rule.fullField, rule.max));
- } else if (min && max && (val < rule.min || val > rule.max)) {
- errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
- }
- }
- const ENUM = "enum";
- function enumerable(rule, value2, source, errors, options) {
- rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
- if (rule[ENUM].indexOf(value2) === -1) {
- errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
- }
- }
- function pattern$1(rule, value2, source, errors, options) {
- if (rule.pattern) {
- if (rule.pattern instanceof RegExp) {
- rule.pattern.lastIndex = 0;
- if (!rule.pattern.test(value2)) {
- errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
- }
- } else if (typeof rule.pattern === "string") {
- const _pattern = new RegExp(rule.pattern);
- if (!_pattern.test(value2)) {
- errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
- }
- }
- }
- }
- const rules = {
- required,
- whitespace,
- type,
- range: range$2,
- enum: enumerable,
- pattern: pattern$1
- };
- function string$1(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2, "string") && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options, "string");
- if (!isEmptyValue(value2, "string")) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- rules.pattern(rule, value2, source, errors, options);
- if (rule.whitespace === true) {
- rules.whitespace(rule, value2, source, errors, options);
- }
- }
- }
- callback(errors);
- }
- function method2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function number2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (value2 === "") {
- value2 = void 0;
- }
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function _boolean(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function regexp2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (!isEmptyValue(value2)) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function integer2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function floatFn(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function array2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2, "array") && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options, "array");
- if (!isEmptyValue(value2, "array")) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function object2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- const ENUM$1 = "enum";
- function enumerable$1(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules[ENUM$1](rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function pattern$2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2, "string") && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (!isEmptyValue(value2, "string")) {
- rules.pattern(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function date2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (!isEmptyValue(value2)) {
- let dateObject;
- if (typeof value2 === "number") {
- dateObject = new Date(value2);
- } else {
- dateObject = value2;
- }
- rules.type(rule, dateObject, source, errors, options);
- if (dateObject) {
- rules.range(rule, dateObject.getTime(), source, errors, options);
- }
- }
- }
- callback(errors);
- }
- function required$1(rule, value2, callback, source, options) {
- const errors = [];
- const type2 = Array.isArray(value2) ? "array" : typeof value2;
- rules.required(rule, value2, source, errors, options, type2);
- callback(errors);
- }
- function type$1(rule, value2, callback, source, options) {
- const ruleType = rule.type;
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2, ruleType) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options, ruleType);
- if (!isEmptyValue(value2, ruleType)) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function any(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- }
- callback(errors);
- }
- const validators = {
- string: string$1,
- method: method2,
- number: number2,
- boolean: _boolean,
- regexp: regexp2,
- integer: integer2,
- float: floatFn,
- array: array2,
- object: object2,
- enum: enumerable$1,
- pattern: pattern$2,
- date: date2,
- url: type$1,
- hex: type$1,
- email: type$1,
- required: required$1,
- any
- };
- function newMessages() {
- return {
- default: "Validation error on field %s",
- required: "%s is required",
- enum: "%s must be one of %s",
- whitespace: "%s cannot be empty",
- date: {
- format: "%s date %s is invalid for format %s",
- parse: "%s date could not be parsed, %s is invalid ",
- invalid: "%s date %s is invalid"
- },
- types: {
- string: "%s is not a %s",
- method: "%s is not a %s (function)",
- array: "%s is not an %s",
- object: "%s is not an %s",
- number: "%s is not a %s",
- date: "%s is not a %s",
- boolean: "%s is not a %s",
- integer: "%s is not an %s",
- float: "%s is not a %s",
- regexp: "%s is not a valid %s",
- email: "%s is not a valid %s",
- url: "%s is not a valid %s",
- hex: "%s is not a valid %s"
- },
- string: {
- len: "%s must be exactly %s characters",
- min: "%s must be at least %s characters",
- max: "%s cannot be longer than %s characters",
- range: "%s must be between %s and %s characters"
- },
- number: {
- len: "%s must equal %s",
- min: "%s cannot be less than %s",
- max: "%s cannot be greater than %s",
- range: "%s must be between %s and %s"
- },
- array: {
- len: "%s must be exactly %s in length",
- min: "%s cannot be less than %s in length",
- max: "%s cannot be greater than %s in length",
- range: "%s must be between %s and %s in length"
- },
- pattern: {
- mismatch: "%s value %s does not match pattern %s"
- },
- clone: function clone2() {
- const cloned = JSON.parse(JSON.stringify(this));
- cloned.clone = this.clone;
- return cloned;
- }
- };
- }
- const messages = newMessages();
- function Schema(descriptor) {
- this.rules = null;
- this._messages = messages;
- this.define(descriptor);
- }
- Schema.prototype = {
- messages: function messages2(_messages) {
- if (_messages) {
- this._messages = deepMerge$2(newMessages(), _messages);
- }
- return this._messages;
- },
- define: function define(rules2) {
- if (!rules2) {
- throw new Error("Cannot configure a schema with no rules");
- }
- if (typeof rules2 !== "object" || Array.isArray(rules2)) {
- throw new Error("Rules must be an object");
- }
- this.rules = {};
- let z;
- let item;
- for (z in rules2) {
- if (rules2.hasOwnProperty(z)) {
- item = rules2[z];
- this.rules[z] = Array.isArray(item) ? item : [item];
- }
- }
- },
- validate: function validate(source_, o, oc) {
- const _this = this;
- if (o === void 0) {
- o = {};
- }
- if (oc === void 0) {
- oc = function oc2() {
- };
- }
- let source = source_;
- let options = o;
- let callback = oc;
- if (typeof options === "function") {
- callback = options;
- options = {};
- }
- if (!this.rules || Object.keys(this.rules).length === 0) {
- if (callback) {
- callback();
- }
- return Promise.resolve();
- }
- function complete(results) {
- let i;
- let errors = [];
- let fields = {};
- function add(e) {
- if (Array.isArray(e)) {
- let _errors;
- errors = (_errors = errors).concat.apply(_errors, e);
- } else {
- errors.push(e);
- }
- }
- for (i = 0; i < results.length; i++) {
- add(results[i]);
- }
- if (!errors.length) {
- errors = null;
- fields = null;
- } else {
- fields = convertFieldsError(errors);
- }
- callback(errors, fields);
- }
- if (options.messages) {
- let messages$1 = this.messages();
- if (messages$1 === messages) {
- messages$1 = newMessages();
- }
- deepMerge$2(messages$1, options.messages);
- options.messages = messages$1;
- } else {
- options.messages = this.messages();
- }
- let arr;
- let value2;
- const series = {};
- const keys = options.keys || Object.keys(this.rules);
- keys.forEach((z) => {
- arr = _this.rules[z];
- value2 = source[z];
- arr.forEach((r) => {
- let rule = r;
- if (typeof rule.transform === "function") {
- if (source === source_) {
- source = { ...source };
- }
- value2 = source[z] = rule.transform(value2);
- }
- if (typeof rule === "function") {
- rule = {
- validator: rule
- };
- } else {
- rule = { ...rule };
- }
- rule.validator = _this.getValidationMethod(rule);
- rule.field = z;
- rule.fullField = rule.fullField || z;
- rule.type = _this.getType(rule);
- if (!rule.validator) {
- return;
- }
- series[z] = series[z] || [];
- series[z].push({
- rule,
- value: value2,
- source,
- field: z
- });
- });
- });
- const errorFields = {};
- return asyncMap(series, options, (data, doIt) => {
- const { rule } = data;
- let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
- deep = deep && (rule.required || !rule.required && data.value);
- rule.field = data.field;
- function addFullfield(key, schema) {
- return { ...schema, fullField: `${rule.fullField}.${key}` };
- }
- function cb(e) {
- if (e === void 0) {
- e = [];
- }
- let errors = e;
- if (!Array.isArray(errors)) {
- errors = [errors];
- }
- if (!options.suppressWarning && errors.length) {
- Schema.warning("async-validator:", errors);
- }
- if (errors.length && rule.message) {
- errors = [].concat(rule.message);
- }
- errors = errors.map(complementError(rule));
- if (options.first && errors.length) {
- errorFields[rule.field] = 1;
- return doIt(errors);
- }
- if (!deep) {
- doIt(errors);
- } else {
- if (rule.required && !data.value) {
- if (rule.message) {
- errors = [].concat(rule.message).map(complementError(rule));
- } else if (options.error) {
- errors = [options.error(rule, format(options.messages.required, rule.field))];
- } else {
- errors = [];
- }
- return doIt(errors);
- }
- let fieldsSchema = {};
- if (rule.defaultField) {
- for (const k in data.value) {
- if (data.value.hasOwnProperty(k)) {
- fieldsSchema[k] = rule.defaultField;
- }
- }
- }
- fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
- for (const f in fieldsSchema) {
- if (fieldsSchema.hasOwnProperty(f)) {
- const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
- fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
- }
- }
- const schema = new Schema(fieldsSchema);
- schema.messages(options.messages);
- if (data.rule.options) {
- data.rule.options.messages = options.messages;
- data.rule.options.error = options.error;
- }
- schema.validate(data.value, data.rule.options || options, (errs) => {
- const finalErrors = [];
- if (errors && errors.length) {
- finalErrors.push.apply(finalErrors, errors);
- }
- if (errs && errs.length) {
- finalErrors.push.apply(finalErrors, errs);
- }
- doIt(finalErrors.length ? finalErrors : null);
- });
- }
- }
- let res;
- if (rule.asyncValidator) {
- res = rule.asyncValidator(rule, data.value, cb, data.source, options);
- } else if (rule.validator) {
- res = rule.validator(rule, data.value, cb, data.source, options);
- if (res === true) {
- cb();
- } else if (res === false) {
- cb(rule.message || `${rule.field} fails`);
- } else if (res instanceof Array) {
- cb(res);
- } else if (res instanceof Error) {
- cb(res.message);
- }
- }
- if (res && res.then) {
- res.then(() => cb(), (e) => cb(e));
- }
- }, (results) => {
- complete(results);
- });
- },
- getType: function getType(rule) {
- if (rule.type === void 0 && rule.pattern instanceof RegExp) {
- rule.type = "pattern";
- }
- if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
- throw new Error(format("Unknown rule type %s", rule.type));
- }
- return rule.type || "string";
- },
- getValidationMethod: function getValidationMethod(rule) {
- if (typeof rule.validator === "function") {
- return rule.validator;
- }
- const keys = Object.keys(rule);
- const messageIndex = keys.indexOf("message");
- if (messageIndex !== -1) {
- keys.splice(messageIndex, 1);
- }
- if (keys.length === 1 && keys[0] === "required") {
- return validators.required;
- }
- return validators[this.getType(rule)] || false;
- }
- };
- Schema.register = function register(type2, validator) {
- if (typeof validator !== "function") {
- throw new Error("Cannot register a validator by type, validator is not a function");
- }
- validators[type2] = validator;
- };
- Schema.warning = warning;
- Schema.messages = messages;
- Schema.warning = function() {
- };
- const _sfc_main$16 = {
- name: "u-form",
- mixins: [mpMixin, mixin, props$k],
- provide() {
- return {
- uForm: this
- };
- },
- data() {
- return {
- formRules: {},
- // 规则校验器
- validator: {},
- // 原始的model快照,用于resetFields方法重置表单时使用
- originalModel: null
- };
- },
- watch: {
- // 监听规则的变化
- rules: {
- immediate: true,
- handler(n) {
- this.setRules(n);
- }
- },
- // 监听属性的变化,通知子组件u-form-item重新获取信息
- propsChange(n) {
- var _a;
- if ((_a = this.children) == null ? void 0 : _a.length) {
- this.children.map((child) => {
- typeof child.updateParentData == "function" && child.updateParentData();
- });
- }
- },
- // 监听model的初始值作为重置表单的快照
- model: {
- immediate: true,
- handler(n) {
- if (!this.originalModel) {
- this.originalModel = uni.$u.deepClone(n);
- }
- }
- }
- },
- computed: {
- propsChange() {
- return [
- this.errorType,
- this.borderBottom,
- this.labelPosition,
- this.labelWidth,
- this.labelAlign,
- this.labelStyle
- ];
- }
- },
- created() {
- this.children = [];
- },
- methods: {
- // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
- setRules(rules2) {
- if (Object.keys(rules2).length === 0)
- return;
- if (Object.keys(this.model).length === 0) {
- uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。");
- return;
- }
- this.formRules = rules2;
- this.validator = new Schema(rules2);
- },
- // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
- resetFields() {
- this.resetModel();
- },
- // 重置model为初始值的快照
- resetModel(obj) {
- this.children.map((child) => {
- const prop = child == null ? void 0 : child.prop;
- const value2 = uni.$u.getProperty(this.originalModel, prop);
- uni.$u.setProperty(this.model, prop, value2);
- });
- },
- // 清空校验结果
- clearValidate(props2) {
- props2 = [].concat(props2);
- this.children.map((child) => {
- if (props2[0] === void 0 || props2.includes(child.prop)) {
- child.message = null;
- }
- });
- },
- // 对部分表单字段进行校验
- async validateField(value2, callback, event = null) {
- this.$nextTick(() => {
- const errorsRes = [];
- value2 = [].concat(value2);
- this.children.map((child) => {
- const childErrors = [];
- if (value2.includes(child.prop)) {
- const propertyVal = uni.$u.getProperty(
- this.model,
- child.prop
- );
- const propertyChain = child.prop.split(".");
- const propertyName = propertyChain[propertyChain.length - 1];
- const rule = this.formRules[child.prop];
- if (!rule)
- return;
- const rules2 = [].concat(rule);
- for (let i = 0; i < rules2.length; i++) {
- const ruleItem = rules2[i];
- const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
- if (event && !trigger.includes(event))
- continue;
- const validator = new Schema({
- [propertyName]: ruleItem
- });
- validator.validate(
- {
- [propertyName]: propertyVal
- },
- (errors, fields) => {
- var _a;
- if (uni.$u.test.array(errors)) {
- errorsRes.push(...errors);
- childErrors.push(...errors);
- }
- child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null;
- }
- );
- }
- }
- });
- typeof callback === "function" && callback(errorsRes);
- });
- },
- // 校验全部数据
- validate(callback) {
- if (Object.keys(this.formRules).length === 0) {
- uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
- return;
- }
- return new Promise((resolve, reject) => {
- this.$nextTick(() => {
- const formItemProps = this.children.map(
- (item) => item.prop
- );
- this.validateField(formItemProps, (errors) => {
- if (errors.length) {
- this.errorType === "toast" && uni.$u.toast(errors[0].message);
- reject(errors);
- } else {
- resolve(true);
- }
- });
- });
- });
- }
- }
- };
- function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
- vue.renderSlot(_ctx.$slots, "default")
- ]);
- }
- const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
- const props$j = {
- props: {
- // 是否细边框
- hairline: {
- type: Boolean,
- default: props$x.button.hairline
- },
- // 按钮的预置样式,info,primary,error,warning,success
- type: {
- type: String,
- default: props$x.button.type
- },
- // 按钮尺寸,large,normal,small,mini
- size: {
- type: String,
- default: props$x.button.size
- },
- // 按钮形状,circle(两边为半圆),square(带圆角)
- shape: {
- type: String,
- default: props$x.button.shape
- },
- // 按钮是否镂空
- plain: {
- type: Boolean,
- default: props$x.button.plain
- },
- // 是否禁止状态
- disabled: {
- type: Boolean,
- default: props$x.button.disabled
- },
- // 是否加载中
- loading: {
- type: Boolean,
- default: props$x.button.loading
- },
- // 加载中提示文字
- loadingText: {
- type: [String, Number],
- default: props$x.button.loadingText
- },
- // 加载状态图标类型
- loadingMode: {
- type: String,
- default: props$x.button.loadingMode
- },
- // 加载图标大小
- loadingSize: {
- type: [String, Number],
- default: props$x.button.loadingSize
- },
- // 开放能力,具体请看uniapp稳定关于button组件部分说明
- // https://uniapp.dcloud.io/component/button
- openType: {
- type: String,
- default: props$x.button.openType
- },
- // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
- // 取值为submit(提交表单),reset(重置表单)
- formType: {
- type: String,
- default: props$x.button.formType
- },
- // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
- // 只微信小程序、QQ小程序有效
- appParameter: {
- type: String,
- default: props$x.button.appParameter
- },
- // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
- hoverStopPropagation: {
- type: Boolean,
- default: props$x.button.hoverStopPropagation
- },
- // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
- lang: {
- type: String,
- default: props$x.button.lang
- },
- // 会话来源,open-type="contact"时有效。只微信小程序有效
- sessionFrom: {
- type: String,
- default: props$x.button.sessionFrom
- },
- // 会话内消息卡片标题,open-type="contact"时有效
- // 默认当前标题,只微信小程序有效
- sendMessageTitle: {
- type: String,
- default: props$x.button.sendMessageTitle
- },
- // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
- // 默认当前分享路径,只微信小程序有效
- sendMessagePath: {
- type: String,
- default: props$x.button.sendMessagePath
- },
- // 会话内消息卡片图片,open-type="contact"时有效
- // 默认当前页面截图,只微信小程序有效
- sendMessageImg: {
- type: String,
- default: props$x.button.sendMessageImg
- },
- // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
- // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
- showMessageCard: {
- type: Boolean,
- default: props$x.button.showMessageCard
- },
- // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
- dataName: {
- type: String,
- default: props$x.button.dataName
- },
- // 节流,一定时间内只能触发一次
- throttleTime: {
- type: [String, Number],
- default: props$x.button.throttleTime
- },
- // 按住后多久出现点击态,单位毫秒
- hoverStartTime: {
- type: [String, Number],
- default: props$x.button.hoverStartTime
- },
- // 手指松开后点击态保留时间,单位毫秒
- hoverStayTime: {
- type: [String, Number],
- default: props$x.button.hoverStayTime
- },
- // 按钮文字,之所以通过props传入,是因为slot传入的话
- // nvue中无法控制文字的样式
- text: {
- type: [String, Number],
- default: props$x.button.text
- },
- // 按钮图标
- icon: {
- type: String,
- default: props$x.button.icon
- },
- // 按钮图标
- iconColor: {
- type: String,
- default: props$x.button.icon
- },
- // 按钮颜色,支持传入linear-gradient渐变色
- color: {
- type: String,
- default: props$x.button.color
- }
- }
- };
- const _sfc_main$15 = {
- name: "u-button",
- mixins: [mpMixin, mixin, props$j],
- data() {
- return {};
- },
- computed: {
- // 生成bem风格的类名
- bemClass() {
- if (!this.color) {
- return this.bem(
- "button",
- ["type", "shape", "size"],
- ["disabled", "plain", "hairline"]
- );
- } else {
- return this.bem(
- "button",
- ["shape", "size"],
- ["disabled", "plain", "hairline"]
- );
- }
- },
- loadingColor() {
- if (this.plain) {
- return this.color ? this.color : uni.$u.config.color[`u-${this.type}`];
- }
- if (this.type === "info") {
- return "#c9c9c9";
- }
- return "rgb(200, 200, 200)";
- },
- iconColorCom() {
- if (this.iconColor)
- return this.iconColor;
- if (this.plain) {
- return this.color ? this.color : this.type;
- } else {
- return this.type === "info" ? "#000000" : "#ffffff";
- }
- },
- baseColor() {
- let style = {};
- if (this.color) {
- style.color = this.plain ? this.color : "white";
- if (!this.plain) {
- style["background-color"] = this.color;
- }
- if (this.color.indexOf("gradient") !== -1) {
- style.borderTopWidth = 0;
- style.borderRightWidth = 0;
- style.borderBottomWidth = 0;
- style.borderLeftWidth = 0;
- if (!this.plain) {
- style.backgroundImage = this.color;
- }
- } else {
- style.borderColor = this.color;
- style.borderWidth = "1px";
- style.borderStyle = "solid";
- }
- }
- return style;
- },
- // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
- nvueTextStyle() {
- let style = {};
- if (this.type === "info") {
- style.color = "#323233";
- }
- if (this.color) {
- style.color = this.plain ? this.color : "white";
- }
- style.fontSize = this.textSize + "px";
- return style;
- },
- // 字体大小
- textSize() {
- let fontSize = 14, { size } = this;
- if (size === "large")
- fontSize = 16;
- if (size === "normal")
- fontSize = 14;
- if (size === "small")
- fontSize = 12;
- if (size === "mini")
- fontSize = 10;
- return fontSize;
- }
- },
- emits: [
- "click",
- "getphonenumber",
- "getuserinfo",
- "error",
- "opensetting",
- "launchapp"
- ],
- methods: {
- clickHandler() {
- if (!this.disabled && !this.loading) {
- uni.$u.throttle(() => {
- this.$emit("click");
- }, this.throttleTime);
- }
- },
- // 下面为对接uniapp官方按钮开放能力事件回调的对接
- getphonenumber(res) {
- this.$emit("getphonenumber", res);
- },
- getuserinfo(res) {
- this.$emit("getuserinfo", res);
- },
- error(res) {
- this.$emit("error", res);
- },
- opensetting(res) {
- this.$emit("opensetting", res);
- },
- launchapp(res) {
- this.$emit("launchapp", res);
- }
- }
- };
- function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock("button", {
- "hover-start-time": Number(_ctx.hoverStartTime),
- "hover-stay-time": Number(_ctx.hoverStayTime),
- "form-type": _ctx.formType,
- "open-type": _ctx.openType,
- "app-parameter": _ctx.appParameter,
- "hover-stop-propagation": _ctx.hoverStopPropagation,
- "send-message-title": _ctx.sendMessageTitle,
- "send-message-path": _ctx.sendMessagePath,
- lang: _ctx.lang,
- "data-name": _ctx.dataName,
- "session-from": _ctx.sessionFrom,
- "send-message-img": _ctx.sendMessageImg,
- "show-message-card": _ctx.showMessageCard,
- onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)),
- onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)),
- onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)),
- onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)),
- onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)),
- "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "",
- class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]),
- style: vue.normalizeStyle([$options.baseColor, _ctx.$u.addStyle(_ctx.customStyle)]),
- onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- }, [
- _ctx.loading ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createVNode(_component_u_loading_icon, {
- mode: _ctx.loadingMode,
- size: _ctx.loadingSize * 1.15,
- color: $options.loadingColor
- }, null, 8, ["mode", "size", "color"]),
- vue.createElementVNode(
- "text",
- {
- class: "u-button__loading-text",
- style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
- },
- vue.toDisplayString(_ctx.loadingText || _ctx.text),
- 5
- /* TEXT, STYLE */
- )
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: _ctx.icon,
- color: $options.iconColorCom,
- size: $options.textSize * 1.35,
- customStyle: { marginRight: "2px" }
- }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true),
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- vue.createElementVNode(
- "text",
- {
- class: "u-button__text",
- style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
- },
- vue.toDisplayString(_ctx.text),
- 5
- /* TEXT, STYLE */
- )
- ], true)
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ], 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"]);
- }
- const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-5ce41ee6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
- const props$i = {
- props: {
- // 是否展示组件
- show: {
- type: Boolean,
- default: props$x.transition.show
- },
- // 使用的动画模式
- mode: {
- type: String,
- default: props$x.transition.mode
- },
- // 动画的执行时间,单位ms
- duration: {
- type: [String, Number],
- default: props$x.transition.duration
- },
- // 使用的动画过渡函数
- timingFunction: {
- type: String,
- default: props$x.transition.timingFunction
- }
- }
- };
- const getClassNames = (name) => ({
- enter: `u-${name}-enter u-${name}-enter-active`,
- "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
- leave: `u-${name}-leave u-${name}-leave-active`,
- "leave-to": `u-${name}-leave-to u-${name}-leave-active`
- });
- const transition = {
- methods: {
- // 组件被点击发出事件
- clickHandler() {
- this.$emit("click");
- },
- // vue版本的组件进场处理
- vueEnter() {
- const classNames = getClassNames(this.mode);
- this.status = "enter";
- this.$emit("beforeEnter");
- this.inited = true;
- this.display = true;
- this.classes = classNames.enter;
- this.$nextTick(async () => {
- this.$emit("enter");
- this.transitionEnded = false;
- this.$emit("afterEnter");
- this.classes = classNames["enter-to"];
- });
- },
- // 动画离场处理
- vueLeave() {
- if (!this.display)
- return;
- const classNames = getClassNames(this.mode);
- this.status = "leave";
- this.$emit("beforeLeave");
- this.classes = classNames.leave;
- this.$nextTick(() => {
- this.transitionEnded = false;
- this.$emit("leave");
- setTimeout(this.onTransitionEnd, this.duration);
- this.classes = classNames["leave-to"];
- });
- },
- // 完成过渡后触发
- onTransitionEnd() {
- if (this.transitionEnded)
- return;
- this.transitionEnded = true;
- this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
- if (!this.show && this.display) {
- this.display = false;
- this.inited = false;
- }
- }
- }
- };
- const _sfc_main$14 = {
- name: "u-transition",
- data() {
- return {
- inited: false,
- // 是否显示/隐藏组件
- viewStyle: {},
- // 组件内部的样式
- status: "",
- // 记录组件动画的状态
- transitionEnded: false,
- // 组件是否结束的标记
- display: false,
- // 组件是否展示
- classes: ""
- // 应用的类名
- };
- },
- computed: {
- mergeStyle() {
- const { viewStyle, customStyle } = this;
- return {
- transitionDuration: `${this.duration}ms`,
- // display: `${this.display ? '' : 'none'}`,
- transitionTimingFunction: this.timingFunction,
- // 避免自定义样式影响到动画属性,所以写在viewStyle前面
- ...uni.$u.addStyle(customStyle),
- ...viewStyle
- };
- }
- },
- // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
- mixins: [mpMixin, mixin, transition, props$i],
- watch: {
- show: {
- handler(newVal) {
- newVal ? this.vueEnter() : this.vueLeave();
- },
- // 表示同时监听初始化时的props的show的意思
- immediate: true
- }
- }
- };
- function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
- return $data.inited ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-transition", $data.classes]),
- ref: "u-transition",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
- style: vue.normalizeStyle([$options.mergeStyle]),
- onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 38
- /* CLASS, STYLE, NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
- const props$h = {
- props: {
- // 是否显示遮罩
- show: {
- type: Boolean,
- default: props$x.overlay.show
- },
- // 层级z-index
- zIndex: {
- type: [String, Number],
- default: props$x.overlay.zIndex
- },
- // 遮罩的过渡时间,单位为ms
- duration: {
- type: [String, Number],
- default: props$x.overlay.duration
- },
- // 不透明度值,当做rgba的第四个参数
- opacity: {
- type: [String, Number],
- default: props$x.overlay.opacity
- }
- }
- };
- const _sfc_main$13 = {
- name: "u-overlay",
- mixins: [mpMixin, mixin, props$h],
- computed: {
- overlayStyle() {
- const style = {
- position: "fixed",
- top: 0,
- left: 0,
- right: 0,
- zIndex: this.zIndex,
- bottom: 0,
- "background-color": `rgba(0, 0, 0, ${this.opacity})`
- };
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- methods: {
- clickHandler() {
- this.$emit("click");
- }
- }
- };
- function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
- return vue.openBlock(), vue.createBlock(_component_u_transition, {
- show: _ctx.show,
- "custom-class": "u-overlay",
- duration: _ctx.duration,
- "custom-style": $options.overlayStyle,
- onClick: $options.clickHandler
- }, {
- default: vue.withCtx(() => [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show", "duration", "custom-style", "onClick"]);
- }
- const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
- const props$g = {
- props: {
- bgColor: {
- type: String,
- default: props$x.statusBar.bgColor
- }
- }
- };
- const _sfc_main$12 = {
- name: "u-status-bar",
- mixins: [mpMixin, mixin, props$g],
- data() {
- return {};
- },
- computed: {
- style() {
- const style = {};
- style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
- style.backgroundColor = this.bgColor;
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- }
- };
- function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- style: vue.normalizeStyle([$options.style]),
- class: "u-status-bar"
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 4
- /* STYLE */
- );
- }
- const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
- const props$f = {
- props: {}
- };
- const _sfc_main$11 = {
- name: "u-safe-bottom",
- mixins: [mpMixin, mixin, props$f],
- data() {
- return {
- safeAreaBottomHeight: 0,
- isNvue: false
- };
- },
- computed: {
- style() {
- const style = {};
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- mounted() {
- }
- };
- function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
- style: vue.normalizeStyle([$options.style])
- },
- null,
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
- const props$e = {
- props: {
- // 是否展示弹窗
- show: {
- type: Boolean,
- default: props$x.popup.show
- },
- // 是否显示遮罩
- overlay: {
- type: Boolean,
- default: props$x.popup.overlay
- },
- // 弹出的方向,可选值为 top bottom right left center
- mode: {
- type: String,
- default: props$x.popup.mode
- },
- // 动画时长,单位ms
- duration: {
- type: [String, Number],
- default: props$x.popup.duration
- },
- // 是否显示关闭图标
- closeable: {
- type: Boolean,
- default: props$x.popup.closeable
- },
- // 自定义遮罩的样式
- overlayStyle: {
- type: [Object, String],
- default: props$x.popup.overlayStyle
- },
- // 点击遮罩是否关闭弹窗
- closeOnClickOverlay: {
- type: Boolean,
- default: props$x.popup.closeOnClickOverlay
- },
- // 层级
- zIndex: {
- type: [String, Number],
- default: props$x.popup.zIndex
- },
- // 是否为iPhoneX留出底部安全距离
- safeAreaInsetBottom: {
- type: Boolean,
- default: props$x.popup.safeAreaInsetBottom
- },
- // 是否留出顶部安全距离(状态栏高度)
- safeAreaInsetTop: {
- type: Boolean,
- default: props$x.popup.safeAreaInsetTop
- },
- // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
- closeIconPos: {
- type: String,
- default: props$x.popup.closeIconPos
- },
- // 是否显示圆角
- round: {
- type: [Boolean, String, Number],
- default: props$x.popup.round
- },
- // mode=center,也即中部弹出时,是否使用缩放模式
- zoom: {
- type: Boolean,
- default: props$x.popup.zoom
- },
- // 弹窗背景色,设置为transparent可去除白色背景
- bgColor: {
- type: String,
- default: props$x.popup.bgColor
- },
- // 遮罩的透明度,0-1之间
- overlayOpacity: {
- type: [Number, String],
- default: props$x.popup.overlayOpacity
- }
- }
- };
- const _sfc_main$10 = {
- name: "u-popup",
- mixins: [mpMixin, mixin, props$e],
- data() {
- return {
- overlayDuration: this.duration + 50
- };
- },
- watch: {
- show(newValue, oldValue) {
- }
- },
- computed: {
- transitionStyle() {
- const style = {
- zIndex: this.zIndex,
- position: "fixed",
- display: "flex"
- };
- style[this.mode] = 0;
- if (this.mode === "left") {
- return uni.$u.deepMerge(style, {
- bottom: 0,
- top: 0
- });
- } else if (this.mode === "right") {
- return uni.$u.deepMerge(style, {
- bottom: 0,
- top: 0
- });
- } else if (this.mode === "top") {
- return uni.$u.deepMerge(style, {
- left: 0,
- right: 0
- });
- } else if (this.mode === "bottom") {
- return uni.$u.deepMerge(style, {
- left: 0,
- right: 0
- });
- } else if (this.mode === "center") {
- return uni.$u.deepMerge(style, {
- alignItems: "center",
- "justify-content": "center",
- top: 0,
- left: 0,
- right: 0,
- bottom: 0
- });
- }
- },
- contentStyle() {
- const style = {};
- uni.$u.sys();
- if (this.mode !== "center") {
- style.flex = 1;
- }
- if (this.bgColor) {
- style.backgroundColor = this.bgColor;
- }
- if (this.round) {
- const value2 = uni.$u.addUnit(this.round);
- if (this.mode === "top") {
- style.borderBottomLeftRadius = value2;
- style.borderBottomRightRadius = value2;
- } else if (this.mode === "bottom") {
- style.borderTopLeftRadius = value2;
- style.borderTopRightRadius = value2;
- } else if (this.mode === "center") {
- style.borderRadius = value2;
- }
- }
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- },
- position() {
- if (this.mode === "center") {
- return this.zoom ? "fade-zoom" : "fade";
- }
- if (this.mode === "left") {
- return "slide-left";
- }
- if (this.mode === "right") {
- return "slide-right";
- }
- if (this.mode === "bottom") {
- return "slide-up";
- }
- if (this.mode === "top") {
- return "slide-down";
- }
- }
- },
- methods: {
- // 点击遮罩
- overlayClick() {
- if (this.closeOnClickOverlay) {
- this.$emit("close");
- }
- },
- close(e) {
- this.$emit("close");
- },
- afterEnter() {
- this.$emit("open");
- },
- clickHandler() {
- if (this.mode === "center") {
- this.overlayClick();
- }
- this.$emit("click");
- }
- }
- };
- function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$4);
- const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_1$4);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$2);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
- _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
- key: 0,
- show: _ctx.show,
- onClick: $options.overlayClick,
- duration: $data.overlayDuration,
- customStyle: _ctx.overlayStyle,
- opacity: _ctx.overlayOpacity
- }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_u_transition, {
- show: _ctx.show,
- customStyle: $options.transitionStyle,
- mode: $options.position,
- duration: _ctx.duration,
- onAfterEnter: $options.afterEnter,
- onClick: $options.clickHandler
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- {
- class: "u-popup__content",
- style: vue.normalizeStyle([$options.contentStyle]),
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
- },
- [
- _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
- _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
- class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
- "hover-class": "u-popup__content__close--hover",
- "hover-stay-time": "150"
- },
- [
- vue.createVNode(_component_u_icon, {
- name: "close",
- color: "#909399",
- size: "18",
- bold: ""
- })
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
- ]);
- }
- const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
- const _sfc_main$$ = {
- __name: "feedbackPopup",
- props: {
- show: {
- type: Boolean,
- default: false
- }
- },
- emits: ["update:show", "submit"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit = __emit;
- const formRef = vue.ref(null);
- const submitting = vue.ref(false);
- const formData = vue.reactive({
- feedbackText: "",
- images: []
- });
- const rules2 = {
- feedbackText: [{
- required: true,
- message: "请输入反馈信息",
- trigger: ["blur", "change"]
- }, {
- min: 5,
- message: "反馈信息不能少于5个字",
- trigger: ["blur", "change"]
- }],
- images: [{
- required: true,
- message: "请上传照片",
- trigger: ["change"]
- }]
- };
- function afterRead(event) {
- const {
- file
- } = event;
- formData.images.push({
- url: file.url,
- status: "success",
- message: "上传成功"
- });
- }
- function deletePic(event) {
- const index2 = event.index;
- formData.images.splice(index2, 1);
- }
- function handleCancel() {
- resetForm();
- emit("update:show", false);
- }
- async function handleConfirm() {
- var _a;
- try {
- await ((_a = formRef.value) == null ? void 0 : _a.validate());
- submitting.value = true;
- await new Promise((resolve) => setTimeout(resolve, 1e3));
- uni.showToast({
- title: "反馈已提交",
- icon: "success"
- });
- emit("submit", {
- feedbackText: formData.feedbackText,
- images: formData.images
- });
- resetForm();
- emit("update:show", false);
- } catch (error2) {
- formatAppLog("error", "at pages/book/components/feedbackPopup.vue:130", "表单验证失败:", error2);
- } finally {
- submitting.value = false;
- }
- }
- function resetForm() {
- var _a;
- formData.feedbackText = "";
- formData.images = [];
- (_a = formRef.value) == null ? void 0 : _a.resetFields();
- }
- const __returned__ = { props: props2, emit, formRef, submitting, formData, rules: rules2, afterRead, deletePic, handleCancel, handleConfirm, resetForm, ref: vue.ref, reactive: vue.reactive };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_2$4);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_2$3);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_3$3);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- mode: "center",
- show: $props.show,
- onClose: _ctx.handleClose,
- closeOnClickOverlay: false
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "popup-container" }, [
- vue.createVNode(_component_u_form, {
- ref: "formRef",
- model: $setup.formData,
- rules: $setup.rules,
- labelPosition: "top",
- labelWidth: "100%"
- }, {
- default: vue.withCtx(() => [
- vue.createCommentVNode(" 反馈信息 "),
- vue.createVNode(_component_u_form_item, {
- label: "反馈图书信息",
- prop: "feedbackText",
- borderBottom: true
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.formData.feedbackText,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackText = $event),
- type: "textarea",
- placeholder: "请输入反馈信息",
- border: true,
- height: "100"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 图片上传 "),
- vue.createVNode(_component_u_form_item, {
- label: "上传照片",
- prop: "images",
- borderBottom: false
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_upload, {
- fileList: $setup.formData.images,
- onAfterRead: $setup.afterRead,
- onDelete: $setup.deletePic,
- name: "1",
- multiple: "",
- maxCount: 1,
- imageMode: true
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "upload-slot" }, [
- vue.createVNode(_component_u_icon, {
- name: "plus",
- size: "30"
- }),
- vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["fileList"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["model"]),
- vue.createCommentVNode(" 按钮组 "),
- vue.createElementVNode("view", { class: "button-group" }, [
- vue.createVNode(_component_u_button, {
- type: "info",
- text: "取消",
- plain: true,
- onClick: $setup.handleCancel,
- disabled: $setup.submitting
- }, null, 8, ["disabled"]),
- vue.createVNode(_component_u_button, {
- type: "primary",
- text: "确认",
- onClick: $setup.handleConfirm,
- loading: $setup.submitting
- }, null, 8, ["loading"])
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show", "onClose"]);
- }
- const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-0265fb8a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/components/feedbackPopup.vue"]]);
- const _sfc_main$_ = {
- __name: "index",
- setup(__props, { expose: __expose }) {
- __expose();
- const showFeedback = vue.ref(false);
- function handleFeedbackSubmit(data) {
- formatAppLog("log", "at pages/book/index.vue:45", "反馈数据:", data);
- }
- const pageScrollRef = vue.ref(null);
- const searchText = vue.ref("");
- const loading = vue.ref(false);
- const bookList = vue.ref([{
- id: 1,
- title: "公文写作教程",
- isbn: "9787040515555",
- price: "49.5",
- isSet: false,
- coverUrl: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
- }]);
- const isEmpty = vue.computed(() => {
- return !loading.value && bookList.value.length === 0;
- });
- async function handleSearch() {
- if (!searchText.value) {
- uni.showToast({
- title: "请输入ISBN",
- icon: "none"
- });
- return;
- }
- await loadData();
- }
- function handleClear() {
- bookList.value = [];
- }
- async function loadData() {
- loading.value = true;
- try {
- const res = await mockSearchBooks(searchText.value);
- bookList.value = res;
- } catch (error2) {
- uni.showToast({
- title: "加载失败",
- icon: "none"
- });
- } finally {
- loading.value = false;
- }
- }
- async function loadMore() {
- if (loading.value)
- return;
- page.value++;
- await loadData();
- }
- function scanCode() {
- uni.scanCode({
- scanType: ["barCode"],
- success: (res) => {
- searchText.value = res.result;
- handleSearch();
- },
- fail: () => {
- uni.showToast({
- title: "扫码失败",
- icon: "none"
- });
- }
- });
- }
- function editBook(book) {
- showFeedback.value = true;
- }
- function mockSearchBooks(isbn) {
- return new Promise((resolve) => {
- setTimeout(() => {
- resolve([{
- id: 1,
- title: "公文写作教程",
- isbn: "9787040515555",
- price: "49.5",
- isSet: false,
- coverUrl: "/static/book-cover.jpg"
- }]);
- }, 1e3);
- });
- }
- const __returned__ = { showFeedback, handleFeedbackSubmit, pageScrollRef, searchText, loading, bookList, isEmpty, handleSearch, handleClear, loadData, loadMore, scanCode, editBook, mockSearchBooks, ref: vue.ref, computed: vue.computed, PageScroll, FeedbackPopup };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_2$5);
- return vue.openBlock(), vue.createBlock($setup["PageScroll"], {
- ref: "pageScrollRef",
- loadmore: $setup.loadMore,
- loading: $setup.loading,
- empty: $setup.isEmpty,
- emptyText: "暂无搜索结果"
- }, {
- default: vue.withCtx(() => [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-header" }, [
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "24",
- color: "#ffffff",
- onClick: $setup.scanCode
- }),
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchText,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
- placeholder: "请输入ISBN",
- showAction: false,
- clearabled: true,
- onSearch: $setup.handleSearch,
- onClear: $setup.handleClear,
- bgColor: "#ffffff"
- }, null, 8, ["modelValue"])
- ])
- ]),
- vue.createCommentVNode(" 搜索结果列表 "),
- $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "book-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.bookList, (book, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "book-item",
- key: index2
- }, [
- vue.createElementVNode("view", { class: "book-info" }, [
- vue.createElementVNode("image", {
- class: "book-image",
- src: book.coverUrl,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "book-details" }, [
- vue.createElementVNode(
- "text",
- { class: "book-title" },
- vue.toDisplayString(book.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "book-isbn" },
- "ISBN: " + vue.toDisplayString(book.isbn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "book-price" },
- "定价: " + vue.toDisplayString(book.price),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "book-set" },
- "套装: " + vue.toDisplayString(book.isSet ? "是" : "否"),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "book-action" }, [
- vue.createVNode(_component_u_icon, {
- name: "edit-pen",
- size: "20",
- color: "#4cd964",
- onClick: ($event) => $setup.editBook(book)
- }, null, 8, ["onClick"])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode($setup["FeedbackPopup"], {
- show: $setup.showFeedback,
- "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showFeedback = $event),
- onSubmit: $setup.handleFeedbackSubmit
- }, null, 8, ["show"])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["loading", "empty"]);
- }
- const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-0452ab4c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/index.vue"]]);
- const props$d = {
- props: {
- // 标签类型info、primary、success、warning、error
- type: {
- type: String,
- default: props$x.tag.type
- },
- // 不可用
- disabled: {
- type: [Boolean, String],
- default: props$x.tag.disabled
- },
- // 标签的大小,large,medium,mini
- size: {
- type: String,
- default: props$x.tag.size
- },
- // tag的形状,circle(两边半圆形), square(方形,带圆角)
- shape: {
- type: String,
- default: props$x.tag.shape
- },
- // 标签文字
- text: {
- type: [String, Number],
- default: props$x.tag.text
- },
- // 背景颜色,默认为空字符串,即不处理
- bgColor: {
- type: String,
- default: props$x.tag.bgColor
- },
- // 标签字体颜色,默认为空字符串,即不处理
- color: {
- type: String,
- default: props$x.tag.color
- },
- // 标签的边框颜色
- borderColor: {
- type: String,
- default: props$x.tag.borderColor
- },
- // 关闭按钮图标的颜色
- closeColor: {
- type: String,
- default: props$x.tag.closeColor
- },
- // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
- name: {
- type: [String, Number],
- default: props$x.tag.name
- },
- // // 模式选择,dark|light|plain
- // mode: {
- // type: String,
- // default: 'light'
- // },
- // 镂空时是否填充背景色
- plainFill: {
- type: Boolean,
- default: props$x.tag.plainFill
- },
- // 是否镂空
- plain: {
- type: Boolean,
- default: props$x.tag.plain
- },
- // 是否可关闭
- closable: {
- type: Boolean,
- default: props$x.tag.closable
- },
- // 是否显示
- show: {
- type: Boolean,
- default: props$x.tag.show
- },
- // 内置图标,或绝对路径的图片
- icon: {
- type: String,
- default: props$x.tag.icon
- }
- }
- };
- const _sfc_main$Z = {
- name: "u-tag",
- mixins: [mpMixin, mixin, props$d],
- data() {
- return {};
- },
- computed: {
- style() {
- const style = {};
- if (this.bgColor) {
- style.backgroundColor = this.bgColor;
- }
- if (this.color) {
- style.color = this.color;
- }
- if (this.borderColor) {
- style.borderColor = this.borderColor;
- }
- return style;
- },
- // nvue下,文本颜色无法继承父元素
- textColor() {
- const style = {};
- if (this.color) {
- style.color = this.color;
- }
- return style;
- },
- imgStyle() {
- const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
- return {
- width,
- height: width
- };
- },
- // 文本的样式
- closeSize() {
- const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
- return size;
- },
- // 图标大小
- iconSize() {
- const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
- return size;
- },
- // 图标颜色
- elIconColor() {
- return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
- }
- },
- methods: {
- // 点击关闭按钮
- closeHandler() {
- this.$emit("close", this.name);
- },
- // 点击标签
- clickHandler() {
- this.$emit("click", this.name);
- }
- }
- };
- function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
- return vue.openBlock(), vue.createBlock(_component_u_transition, {
- mode: "fade",
- show: _ctx.show,
- style: { "display": "inline-flex" }
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
- vue.createElementVNode(
- "view",
- {
- 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`]]),
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([{
- marginRight: _ctx.closable ? "10px" : 0,
- marginTop: _ctx.closable ? "10px" : 0
- }, $options.style])
- },
- [
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
- _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-tag__icon"
- }, [
- _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _ctx.icon,
- style: vue.normalizeStyle([$options.imgStyle])
- }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 1,
- color: $options.elIconColor,
- name: _ctx.icon,
- size: $options.iconSize
- }, null, 8, ["color", "name", "size"]))
- ])) : vue.createCommentVNode("v-if", true)
- ], true),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
- style: vue.normalizeStyle([$options.textColor])
- },
- vue.toDisplayString(_ctx.text),
- 7
- /* TEXT, CLASS, STYLE */
- )
- ],
- 6
- /* CLASS, STYLE */
- ),
- _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
- style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
- },
- [
- vue.createVNode(_component_u_icon, {
- name: "close",
- size: $options.closeSize,
- color: "#ffffff"
- }, null, 8, ["size"])
- ],
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show"]);
- }
- const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
- const _sfc_main$Y = {
- __name: "WarehouseSelector",
- props: {
- show: {
- type: Boolean,
- default: false
- }
- },
- emits: ["update:show", "warehouse-selected"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit = __emit;
- const searchKeyword = vue.ref("");
- const searchResults = vue.ref(["河南仓", "湖北仓", "河北仓", "涨涨涨", "涨涨", "河北仓", "涨涨涨"]);
- const historyWarehouses = vue.ref(["河南仓"]);
- const selectedWarehouse = vue.ref("");
- const handleSearch = () => {
- };
- const selectWarehouse = (warehouse) => {
- selectedWarehouse.value = warehouse;
- };
- const handleClose = () => {
- emit("update:show", false);
- searchKeyword.value = "";
- };
- const handleConfirm = () => {
- if (selectedWarehouse.value) {
- emit("warehouse-selected", selectedWarehouse.value);
- handleClose();
- }
- };
- const __returned__ = { props: props2, emit, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, handleSearch, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_2$5);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$1);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- show: $props.show,
- onClose: $setup.handleClose,
- mode: "bottom",
- round: "10"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "warehouse-selector" }, [
- vue.createElementVNode("view", { style: { "flex": "1" } }, [
- vue.createCommentVNode(" 标题 "),
- vue.createElementVNode("view", { class: "header" }, [
- vue.createElementVNode("text", { class: "title" }, "绑定仓库")
- ]),
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchKeyword,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
- placeholder: "搜索仓库",
- "show-action": true,
- "action-text": "搜索",
- "action-style": "color: #4CAF50",
- onSearch: $setup.handleSearch,
- onCustom: $setup.handleSearch
- }, null, 8, ["modelValue"])
- ]),
- vue.createCommentVNode(" 搜索结果 "),
- $setup.searchKeyword ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "search-result"
- }, [
- vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
- vue.createElementVNode("view", { class: "tag-group" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.searchResults, (item) => {
- return vue.openBlock(), vue.createBlock(_component_u_tag, {
- key: item,
- text: item,
- plain: "",
- shape: "circle",
- onClick: ($event) => $setup.selectWarehouse(item)
- }, null, 8, ["text", "onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 历史绑定 "),
- vue.createElementVNode("view", { class: "history-section" }, [
- vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
- vue.createElementVNode("view", { class: "tag-group" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.historyWarehouses, (item) => {
- return vue.openBlock(), vue.createBlock(_component_u_tag, {
- key: item,
- text: item,
- plain: "",
- shape: "circle",
- onClick: ($event) => $setup.selectWarehouse(item)
- }, null, 8, ["text", "onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "footer" }, [
- vue.createVNode(_component_u_button, {
- onClick: $setup.handleClose,
- text: "取消",
- plain: "",
- shape: "circle"
- }),
- vue.createVNode(_component_u_button, {
- type: "primary",
- onClick: $setup.handleConfirm,
- text: "确定",
- shape: "circle"
- })
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]);
- }
- const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-b9bd3f04"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/WarehouseSelector.vue"]]);
- const _sfc_main$X = {
- __name: "transfer-sign",
- setup(__props, { expose: __expose }) {
- __expose();
- const showSelector = vue.ref(false);
- const selectedWarehouse = vue.ref("");
- const trackingNumber = vue.ref("");
- function openWarehouseSelector() {
- showSelector.value = true;
- }
- function handleWarehouseSelected(warehouse) {
- selectedWarehouse.value = warehouse;
- }
- function confirmTrackingNumber() {
- }
- function scanCode() {
- uni.scanCode({
- success: (res) => {
- trackingNumber.value = res.result;
- formatAppLog("log", "at pages/index/express/transfer-sign.vue:50", "扫码结果:", res.result);
- },
- fail: (err) => {
- formatAppLog("error", "at pages/index/express/transfer-sign.vue:53", "扫码失败:", err);
- }
- });
- }
- const __returned__ = { showSelector, selectedWarehouse, trackingNumber, openWarehouseSelector, handleWarehouseSelected, confirmTrackingNumber, scanCode, ref: vue.ref, WarehouseSelector };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "main-content" }, [
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.selectedWarehouse,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
- placeholder: "请选择仓库",
- readonly: "",
- border: "surround"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_button, {
- type: "primary",
- onClick: $setup.openWarehouseSelector,
- text: "选择"
- })
- ]),
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.trackingNumber,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.trackingNumber = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_button, {
- type: "primary",
- onClick: $setup.confirmTrackingNumber,
- text: "确定"
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "success",
- onClick: $setup.scanCode,
- text: "扫码",
- class: "scan-button"
- })
- ]),
- vue.createVNode($setup["WarehouseSelector"], {
- show: $setup.showSelector,
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => $setup.showSelector = $event),
- onWarehouseSelected: $setup.handleWarehouseSelected
- }, null, 8, ["show"])
- ]);
- }
- const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-333d344a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/transfer-sign.vue"]]);
- const props$c = {
- props: {
- // radio的名称
- name: {
- type: [String, Number, Boolean],
- default: props$x.radio.name
- },
- // 形状,square为方形,circle为圆型
- shape: {
- type: String,
- default: props$x.radio.shape
- },
- // 是否禁用
- disabled: {
- type: [String, Boolean],
- default: props$x.radio.disabled
- },
- // 是否禁止点击提示语选中单选框
- labelDisabled: {
- type: [String, Boolean],
- default: props$x.radio.labelDisabled
- },
- // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
- activeColor: {
- type: String,
- default: props$x.radio.activeColor
- },
- // 未选中的颜色
- inactiveColor: {
- type: String,
- default: props$x.radio.inactiveColor
- },
- // 图标的大小,单位px
- iconSize: {
- type: [String, Number],
- default: props$x.radio.iconSize
- },
- // label的字体大小,px单位
- labelSize: {
- type: [String, Number],
- default: props$x.radio.labelSize
- },
- // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
- label: {
- type: [String, Number],
- default: props$x.radio.label
- },
- // 整体的大小
- size: {
- type: [String, Number],
- default: props$x.radio.size
- },
- // 图标颜色
- color: {
- type: String,
- default: props$x.radio.color
- },
- // label的颜色
- labelColor: {
- type: String,
- default: props$x.radio.labelColor
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: props$x.radio.iconColor
- }
- }
- };
- const _sfc_main$W = {
- name: "u-radio",
- mixins: [mpMixin, mixin, props$c],
- data() {
- return {
- checked: false,
- // 当你看到这段代码的时候,
- // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
- // 故只能使用如此方法
- parentData: {
- iconSize: 12,
- labelDisabled: null,
- disabled: null,
- shape: null,
- activeColor: null,
- inactiveColor: null,
- size: 18,
- value: null,
- modelValue: null,
- iconColor: null,
- placement: "row",
- borderBottom: false,
- iconPlacement: "left"
- }
- };
- },
- computed: {
- // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
- elDisabled() {
- return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
- },
- // 是否禁用label点击
- elLabelDisabled() {
- return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
- },
- // 组件尺寸,对应size的值,默认值为21px
- elSize() {
- return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
- },
- // 组件的勾选图标的尺寸,默认12px
- elIconSize() {
- return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
- },
- // 组件选中激活时的颜色
- elActiveColor() {
- return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
- },
- // 组件选未中激活时的颜色
- elInactiveColor() {
- return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
- },
- // label的颜色
- elLabelColor() {
- return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
- },
- // 组件的形状
- elShape() {
- return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
- },
- // label大小
- elLabelSize() {
- return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
- },
- elIconColor() {
- const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
- if (this.elDisabled) {
- return this.checked ? this.elInactiveColor : "transparent";
- } else {
- return this.checked ? iconColor : "transparent";
- }
- },
- iconClasses() {
- let classes = [];
- classes.push("u-radio__icon-wrap--" + this.elShape);
- if (this.elDisabled) {
- classes.push("u-radio__icon-wrap--disabled");
- }
- if (this.checked && this.elDisabled) {
- classes.push("u-radio__icon-wrap--disabled--checked");
- }
- return classes;
- },
- iconWrapStyle() {
- const style = {};
- style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
- style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
- style.width = uni.$u.addUnit(this.elSize);
- style.height = uni.$u.addUnit(this.elSize);
- if (this.parentData.iconPlacement === "right") {
- style.marginRight = 0;
- }
- return style;
- },
- radioStyle() {
- const style = {};
- if (this.parentData.borderBottom && this.parentData.placement === "row") {
- uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
- }
- if (this.parentData.borderBottom && this.parentData.placement === "column") {
- style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
- }
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- this.updateParentData();
- if (!this.parent) {
- uni.$u.error("u-radio必须搭配u-radio-group组件使用");
- }
- this.checked = this.name === this.parentData.modelValue;
- },
- updateParentData() {
- this.getParentData("u-radio-group");
- },
- // 点击图标
- iconClickHandler(e) {
- this.preventEvent(e);
- if (!this.elDisabled) {
- this.setRadioCheckedStatus();
- }
- },
- // 横向两端排列时,点击组件即可触发选中事件
- wrapperClickHandler(e) {
- this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
- },
- // 点击label
- labelClickHandler(e) {
- this.preventEvent(e);
- if (!this.elLabelDisabled && !this.elDisabled) {
- this.setRadioCheckedStatus();
- }
- },
- emitEvent() {
- if (!this.checked) {
- this.$emit("change", this.name);
- this.$nextTick(() => {
- uni.$u.formValidate(this, "change");
- });
- }
- },
- // 改变组件选中状态
- // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
- // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
- setRadioCheckedStatus() {
- this.emitEvent();
- this.checked = true;
- typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
- }
- }
- };
- function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
- onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([$options.radioStyle])
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([$options.iconWrapStyle])
- },
- [
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
- vue.createVNode(_component_u_icon, {
- class: "u-radio__icon-wrap__icon",
- name: "checkbox-mark",
- size: $options.elIconSize,
- color: $options.elIconColor
- }, null, 8, ["size", "color"])
- ], true)
- ],
- 6
- /* CLASS, STYLE */
- ),
- vue.createElementVNode(
- "text",
- {
- class: "u-radio__text",
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
- style: vue.normalizeStyle({
- color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
- fontSize: $options.elLabelSize,
- lineHeight: $options.elLabelSize
- })
- },
- vue.toDisplayString(_ctx.label),
- 5
- /* TEXT, STYLE */
- )
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__scopeId", "data-v-83036558"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
- const props$b = {
- props: {
- // 绑定的值
- modelValue: {
- type: [String, Number, Boolean],
- default: props$x.radioGroup.value
- },
- // 是否禁用全部radio
- disabled: {
- type: Boolean,
- default: props$x.radioGroup.disabled
- },
- // 形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$x.radioGroup.shape
- },
- // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
- activeColor: {
- type: String,
- default: props$x.radioGroup.activeColor
- },
- // 未选中的颜色
- inactiveColor: {
- type: String,
- default: props$x.radioGroup.inactiveColor
- },
- // 标识符
- name: {
- type: String,
- default: props$x.radioGroup.name
- },
- // 整个组件的尺寸,默认px
- size: {
- type: [String, Number],
- default: props$x.radioGroup.size
- },
- // 布局方式,row-横向,column-纵向
- placement: {
- type: String,
- default: props$x.radioGroup.placement
- },
- // label的文本
- label: {
- type: [String],
- default: props$x.radioGroup.label
- },
- // label的颜色 (默认 '#303133' )
- labelColor: {
- type: [String],
- default: props$x.radioGroup.labelColor
- },
- // label的字体大小,px单位
- labelSize: {
- type: [String, Number],
- default: props$x.radioGroup.labelSize
- },
- // 是否禁止点击文本操作checkbox(默认 false )
- labelDisabled: {
- type: Boolean,
- default: props$x.radioGroup.labelDisabled
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: props$x.radioGroup.iconColor
- },
- // 图标的大小,单位px
- iconSize: {
- type: [String, Number],
- default: props$x.radioGroup.iconSize
- },
- // 竖向配列时,是否显示下划线
- borderBottom: {
- type: Boolean,
- default: props$x.radioGroup.borderBottom
- },
- // 图标与文字的对齐方式
- iconPlacement: {
- type: String,
- default: props$x.radio.iconPlacement
- }
- }
- };
- const _sfc_main$V = {
- name: "u-radio-group",
- mixins: [mpMixin, mixin, props$b],
- computed: {
- // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
- // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
- // 拉取父组件新的变化后的参数
- parentData() {
- return [
- this.modelValue,
- this.disabled,
- this.inactiveColor,
- this.activeColor,
- this.size,
- this.labelDisabled,
- this.shape,
- this.iconSize,
- this.borderBottom,
- this.placement
- ];
- },
- bemClass() {
- return this.bem("radio-group", ["placement"]);
- }
- },
- watch: {
- // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
- parentData() {
- if (this.children.length) {
- this.children.map((child) => {
- typeof child.init === "function" && child.init();
- });
- }
- }
- },
- data() {
- return {};
- },
- created() {
- this.children = [];
- },
- emits: ["update:modelValue", "change"],
- methods: {
- // 将其他的radio设置为未选中的状态
- unCheckedOther(childInstance) {
- this.children.map((child) => {
- if (childInstance !== child) {
- child.checked = false;
- }
- });
- const {
- name
- } = childInstance;
- this.$emit("update:modelValue", name);
- this.$emit("change", name);
- }
- }
- };
- function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-radio-group", $options.bemClass])
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 2
- /* CLASS */
- );
- }
- const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
- const props$a = {
- props: {
- // 是否虚线
- dashed: {
- type: Boolean,
- default: props$x.divider.dashed
- },
- // 是否细线
- hairline: {
- type: Boolean,
- default: props$x.divider.hairline
- },
- // 是否以点替代文字,优先于text字段起作用
- dot: {
- type: Boolean,
- default: props$x.divider.dot
- },
- // 内容文本的位置,left-左边,center-中间,right-右边
- textPosition: {
- type: String,
- default: props$x.divider.textPosition
- },
- // 文本内容
- text: {
- type: [String, Number],
- default: props$x.divider.text
- },
- // 文本大小
- textSize: {
- type: [String, Number],
- default: props$x.divider.textSize
- },
- // 文本颜色
- textColor: {
- type: String,
- default: props$x.divider.textColor
- },
- // 线条颜色
- lineColor: {
- type: String,
- default: props$x.divider.lineColor
- }
- }
- };
- const _sfc_main$U = {
- name: "u-divider",
- mixins: [mpMixin, mixin, props$a],
- computed: {
- textStyle() {
- const style = {};
- style.fontSize = uni.$u.addUnit(this.textSize);
- style.color = this.textColor;
- return style;
- },
- // 左边线条的的样式
- leftLineStyle() {
- const style = {};
- if (this.textPosition === "left") {
- style.width = "80rpx";
- } else {
- style.flex = 1;
- }
- return style;
- },
- // 右边线条的的样式
- rightLineStyle() {
- const style = {};
- if (this.textPosition === "right") {
- style.width = "80rpx";
- } else {
- style.flex = 1;
- }
- return style;
- }
- },
- methods: {
- // divider组件被点击时触发
- click() {
- this.$emit("click");
- }
- }
- };
- function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-divider",
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
- },
- [
- vue.createVNode(_component_u_line, {
- color: _ctx.lineColor,
- customStyle: $options.leftLineStyle,
- hairline: _ctx.hairline,
- dashed: _ctx.dashed
- }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
- _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "u-divider__dot"
- }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-divider__text",
- style: vue.normalizeStyle([$options.textStyle])
- },
- vue.toDisplayString(_ctx.text),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_u_line, {
- color: _ctx.lineColor,
- customStyle: $options.rightLineStyle,
- hairline: _ctx.hairline,
- dashed: _ctx.dashed
- }, null, 8, ["color", "customStyle", "hairline", "dashed"])
- ],
- 4
- /* STYLE */
- );
- }
- const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-ea022cee"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
- const _sfc_main$T = {
- __name: "quick-check",
- setup(__props, { expose: __expose }) {
- __expose();
- const queryType = vue.ref("order");
- const searchKeyword = vue.ref("");
- const selectedBatch = vue.ref("");
- const selectedBatchId = vue.ref("");
- const showBatchSelector = vue.ref(false);
- const count = vue.ref(0);
- const batchList = vue.ref([
- {
- id: "1",
- date: "202401601",
- count: "0"
- },
- {
- id: "2",
- date: "202401605",
- count: "265"
- },
- {
- id: "3",
- date: "202405601",
- count: "111"
- },
- {
- id: "4",
- date: "202405601",
- count: "111"
- }
- ]);
- const openBatchSelector = () => {
- showBatchSelector.value = true;
- };
- const selectBatch = (batch) => {
- selectedBatchId.value = batch.id;
- selectedBatch.value = `${batch.date} ${batch.count}`;
- count.value = Number(batch.count);
- };
- const confirmBatch = () => {
- showBatchSelector.value = false;
- };
- const handleSearch = () => {
- formatAppLog("log", "at pages/index/express/quick-check.vue:125", "查询:", searchKeyword.value);
- };
- const handleScan = () => {
- uni.scanCode({
- success: (res) => {
- searchKeyword.value = res.result;
- handleSearch();
- }
- });
- };
- const handleSubmitBatch = () => {
- formatAppLog("log", "at pages/index/express/quick-check.vue:140", "提交批次");
- };
- const __returned__ = { queryType, searchKeyword, selectedBatch, selectedBatchId, showBatchSelector, count, batchList, openBatchSelector, selectBatch, confirmBatch, handleSearch, handleScan, handleSubmitBatch, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_2);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_3$1);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_5);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 批次选择区域 "),
- vue.createElementVNode("view", { class: "select-section" }, [
- vue.createElementVNode("view", { class: "batch-select" }, [
- vue.createElementVNode("text", { class: "required" }, "*"),
- vue.createElementVNode("text", null, "批次:"),
- vue.createVNode(_component_u_input, {
- modelValue: $setup.selectedBatch,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedBatch = $event),
- placeholder: "请选择/新建批次",
- readonly: "",
- border: "surround",
- onClick: $setup.openBatchSelector
- }, {
- suffix: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: "arrow-down",
- size: "14"
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ])
- ]),
- vue.createCommentVNode(" 数量显示 "),
- vue.createElementVNode(
- "view",
- { class: "count-badge" },
- " 数量" + vue.toDisplayString($setup.count),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "footer" }, [
- vue.createCommentVNode(" 查询区域 "),
- vue.createElementVNode("view", { class: "query-section" }, [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $setup.queryType,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.queryType = $event)
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio, {
- label: "查订单",
- name: "order"
- }),
- vue.createVNode(_component_u_radio, {
- label: "查物流",
- "custom-style": "margin-left:20px",
- name: "logistics"
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createVNode(_component_u_input, {
- "custom-style": "width:100rpx",
- modelValue: $setup.searchKeyword,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.searchKeyword = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround",
- clearable: ""
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_button, {
- color: "#c8c8c8",
- text: "查询",
- onClick: $setup.handleSearch
- })
- ])
- ]),
- vue.createVNode(_component_u_divider),
- vue.createElementVNode("view", { style: { "display": "flex" } }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "warning",
- text: "验收扫码",
- onClick: $setup.handleScan
- }),
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "primary",
- text: "提交批次",
- onClick: $setup.handleSubmitBatch
- })
- ])
- ]),
- vue.createCommentVNode(" 批次选择弹窗 "),
- vue.createVNode(_component_u_popup, {
- show: $setup.showBatchSelector,
- mode: "bottom",
- onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "batch-popup" }, [
- vue.createElementVNode("view", { class: "popup-header" }, [
- vue.createElementVNode("text", null, "批次"),
- vue.createElementVNode("view", { class: "header-right" }, [
- vue.createElementVNode("text", { class: "new-batch" }, "新建批次"),
- vue.createVNode(_component_u_button, {
- type: "primary",
- text: "确定",
- onClick: $setup.confirmBatch
- })
- ])
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "batch-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.batchList, (batch) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: batch.id,
- class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
- onClick: ($event) => $setup.selectBatch(batch)
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(batch.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(batch.count),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"])
- ]);
- }
- const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-61cc11f4"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-check.vue"]]);
- const _sfc_main$S = {
- __name: "quick-unpack",
- setup(__props, { expose: __expose }) {
- __expose();
- const trackingNumber = vue.ref("");
- function confirmTrackingNumber() {
- }
- function scanCode() {
- uni.scanCode({
- success: (res) => {
- trackingNumber.value = res.result;
- formatAppLog("log", "at pages/index/express/quick-unpack.vue:32", "扫码结果:", res.result);
- },
- fail: (err) => {
- formatAppLog("error", "at pages/index/express/quick-unpack.vue:35", "扫码失败:", err);
- }
- });
- }
- const __returned__ = { trackingNumber, confirmTrackingNumber, scanCode, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "main-content" }, [
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.trackingNumber,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.trackingNumber = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_button, {
- type: "primary",
- onClick: $setup.confirmTrackingNumber,
- text: "确定"
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "success",
- onClick: $setup.scanCode,
- text: "扫码",
- class: "scan-button"
- })
- ])
- ]);
- }
- const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-unpack.vue"]]);
- const props$9 = {
- props: {
- // tab的数据
- list: {
- type: Array,
- default: props$x.subsection.list
- },
- // 当前活动的tab的index
- current: {
- type: [String, Number],
- default: props$x.subsection.current
- },
- // 激活的颜色
- activeColor: {
- type: String,
- default: props$x.subsection.activeColor
- },
- // 未激活的颜色
- inactiveColor: {
- type: String,
- default: props$x.subsection.inactiveColor
- },
- // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
- mode: {
- type: String,
- default: props$x.subsection.mode
- },
- // 字体大小
- fontSize: {
- type: [String, Number],
- default: props$x.subsection.fontSize
- },
- // 激活tab的字体是否加粗
- bold: {
- type: Boolean,
- default: props$x.subsection.bold
- },
- // mode = button时,组件背景颜色
- bgColor: {
- type: String,
- default: props$x.subsection.bgColor
- },
- // 从list元素对象中读取的键名
- keyName: {
- type: String,
- default: props$x.subsection.keyName
- }
- }
- };
- const _sfc_main$R = {
- name: "u-subsection",
- mixins: [mpMixin, mixin, props$9],
- data() {
- return {
- // 组件尺寸
- itemRect: {
- width: 0,
- height: 0
- }
- };
- },
- watch: {
- list(newValue, oldValue) {
- this.init();
- },
- current: {
- immediate: true,
- handler(n) {
- }
- }
- },
- computed: {
- wrapperStyle() {
- const style = {};
- if (this.mode === "button") {
- style.backgroundColor = this.bgColor;
- }
- return style;
- },
- // 滑块的样式
- barStyle() {
- const style = {};
- style.width = `${this.itemRect.width}px`;
- style.height = `${this.itemRect.height}px`;
- style.transform = `translateX(${this.current * this.itemRect.width}px)`;
- if (this.mode === "subsection") {
- style.backgroundColor = this.activeColor;
- }
- return style;
- },
- // 分段器item的样式
- itemStyle(index2) {
- return (index3) => {
- const style = {};
- if (this.mode === "subsection") {
- style.borderColor = this.activeColor;
- style.borderWidth = "1px";
- style.borderStyle = "solid";
- }
- return style;
- };
- },
- // 分段器文字颜色
- textStyle(index2) {
- return (index3) => {
- const style = {};
- style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
- style.fontSize = uni.$u.addUnit(this.fontSize);
- if (this.mode === "subsection") {
- style.color = this.current === index3 ? "#fff" : this.inactiveColor;
- } else {
- style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
- }
- return style;
- };
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- uni.$u.sleep().then(() => this.getRect());
- },
- // 判断展示文本
- getText(item) {
- return typeof item === "object" ? item[this.keyName] : item;
- },
- // 获取组件的尺寸
- getRect() {
- this.$uGetRect(".u-subsection__item--0").then((size) => {
- this.itemRect = size;
- });
- },
- clickHandler(index2) {
- this.$emit("change", index2);
- }
- }
- };
- function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
- ref: "u-subsection",
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-subsection__bar", [
- _ctx.mode === "button" && "u-subsection--button__bar",
- _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
- _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
- _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
- ]]),
- ref: "u-subsection__bar",
- style: vue.normalizeStyle([$options.barStyle])
- },
- null,
- 6
- /* CLASS, STYLE */
- ),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.list, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["u-subsection__item", [
- `u-subsection__item--${index2}`,
- index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
- index2 === 0 && "u-subsection__item--first",
- index2 === _ctx.list.length - 1 && "u-subsection__item--last"
- ]]),
- ref_for: true,
- ref: `u-subsection__item--${index2}`,
- style: vue.normalizeStyle([$options.itemStyle(index2)]),
- onClick: ($event) => $options.clickHandler(index2),
- key: index2
- }, [
- vue.createElementVNode(
- "text",
- {
- class: "u-subsection__item__text",
- style: vue.normalizeStyle([$options.textStyle(index2)])
- },
- vue.toDisplayString($options.getText(item)),
- 5
- /* TEXT, STYLE */
- )
- ], 14, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-b5ccb67e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
- const props$8 = {
- props: {
- // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
- status: {
- type: String,
- default: props$x.loadmore.status
- },
- // 组件背景色
- bgColor: {
- type: String,
- default: props$x.loadmore.bgColor
- },
- // 是否显示加载中的图标
- icon: {
- type: Boolean,
- default: props$x.loadmore.icon
- },
- // 字体大小
- fontSize: {
- type: [String, Number],
- default: props$x.loadmore.fontSize
- },
- // 图标大小
- iconSize: {
- type: [String, Number],
- default: props$x.loadmore.iconSize
- },
- // 字体颜色
- color: {
- type: String,
- default: props$x.loadmore.color
- },
- // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
- loadingIcon: {
- type: String,
- default: props$x.loadmore.loadingIcon
- },
- // 加载前的提示语
- loadmoreText: {
- type: String,
- default: props$x.loadmore.loadmoreText
- },
- // 加载中提示语
- loadingText: {
- type: String,
- default: props$x.loadmore.loadingText
- },
- // 没有更多的提示语
- nomoreText: {
- type: String,
- default: props$x.loadmore.nomoreText
- },
- // 在“没有更多”状态下,是否显示粗点
- isDot: {
- type: Boolean,
- default: props$x.loadmore.isDot
- },
- // 加载中图标的颜色
- iconColor: {
- type: String,
- default: props$x.loadmore.iconColor
- },
- // 上边距
- marginTop: {
- type: [String, Number],
- default: props$x.loadmore.marginTop
- },
- // 下边距
- marginBottom: {
- type: [String, Number],
- default: props$x.loadmore.marginBottom
- },
- // 高度,单位px
- height: {
- type: [String, Number],
- default: props$x.loadmore.height
- },
- // 是否显示左边分割线
- line: {
- type: Boolean,
- default: props$x.loadmore.line
- },
- // 线条颜色
- lineColor: {
- type: String,
- default: props$x.loadmore.lineColor
- },
- // 是否虚线,true-虚线,false-实线
- dashed: {
- type: Boolean,
- default: props$x.loadmore.dashed
- }
- }
- };
- const _sfc_main$Q = {
- name: "u-loadmore",
- mixins: [mpMixin, mixin, props$8],
- data() {
- return {
- // 粗点
- dotText: "●"
- };
- },
- computed: {
- // 加载的文字显示的样式
- loadTextStyle() {
- return {
- color: this.color,
- fontSize: uni.$u.addUnit(this.fontSize),
- lineHeight: uni.$u.addUnit(this.fontSize),
- backgroundColor: this.bgColor
- };
- },
- // 显示的提示文字
- showText() {
- let text = "";
- if (this.status == "loadmore")
- text = this.loadmoreText;
- else if (this.status == "loading")
- text = this.loadingText;
- else if (this.status == "nomore" && this.isDot)
- text = this.dotText;
- else
- text = this.nomoreText;
- return text;
- }
- },
- methods: {
- loadMore() {
- if (this.status == "loadmore")
- this.$emit("loadmore");
- }
- }
- };
- function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-loadmore",
- style: vue.normalizeStyle([
- _ctx.$u.addStyle(_ctx.customStyle),
- {
- backgroundColor: _ctx.bgColor,
- marginBottom: _ctx.$u.addUnit(_ctx.marginBottom),
- marginTop: _ctx.$u.addUnit(_ctx.marginTop),
- height: _ctx.$u.addUnit(_ctx.height)
- }
- ])
- },
- [
- _ctx.line ? (vue.openBlock(), vue.createBlock(_component_u_line, {
- key: 0,
- length: "140rpx",
- color: _ctx.lineColor,
- hairline: false,
- dashed: _ctx.dashed
- }, null, 8, ["color", "dashed"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 加载中和没有更多的状态才显示两边的横线 "),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass([_ctx.status == "loadmore" || _ctx.status == "nomore" ? "u-more" : "", "u-loadmore__content"])
- },
- [
- _ctx.status === "loading" && _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-loadmore__content__icon-wrap"
- }, [
- vue.createVNode(_component_u_loading_icon, {
- color: _ctx.iconColor,
- size: _ctx.iconSize,
- mode: _ctx.loadingIcon
- }, null, 8, ["color", "size", "mode"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 如果没有更多的状态下,显示内容为dot(粗点),加载特定样式 "),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["u-line-1", [_ctx.status == "nomore" && _ctx.isDot == true ? "u-loadmore__content__dot-text" : "u-loadmore__content__text"]]),
- style: vue.normalizeStyle([$options.loadTextStyle]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.loadMore && $options.loadMore(...args))
- },
- vue.toDisplayString($options.showText),
- 7
- /* TEXT, CLASS, STYLE */
- )
- ],
- 2
- /* CLASS */
- ),
- _ctx.line ? (vue.openBlock(), vue.createBlock(_component_u_line, {
- key: 1,
- length: "140rpx",
- color: _ctx.lineColor,
- hairline: false,
- dashed: _ctx.dashed
- }, null, 8, ["color", "dashed"])) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- );
- }
- const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-4ccc1478"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-loadmore/u-loadmore.vue"]]);
- const props$7 = {
- props: {
- // 是否展示modal
- show: {
- type: Boolean,
- default: props$x.modal.show
- },
- // 标题
- title: {
- type: [String],
- default: props$x.modal.title
- },
- // 弹窗内容
- content: {
- type: String,
- default: props$x.modal.content
- },
- // 确认文案
- confirmText: {
- type: String,
- default: props$x.modal.confirmText
- },
- // 取消文案
- cancelText: {
- type: String,
- default: props$x.modal.cancelText
- },
- // 是否显示确认按钮
- showConfirmButton: {
- type: Boolean,
- default: props$x.modal.showConfirmButton
- },
- // 是否显示取消按钮
- showCancelButton: {
- type: Boolean,
- default: props$x.modal.showCancelButton
- },
- // 确认按钮颜色
- confirmColor: {
- type: String,
- default: props$x.modal.confirmColor
- },
- // 取消文字颜色
- cancelColor: {
- type: String,
- default: props$x.modal.cancelColor
- },
- // 对调确认和取消的位置
- buttonReverse: {
- type: Boolean,
- default: props$x.modal.buttonReverse
- },
- // 是否开启缩放效果
- zoom: {
- type: Boolean,
- default: props$x.modal.zoom
- },
- // 是否异步关闭,只对确定按钮有效
- asyncClose: {
- type: Boolean,
- default: props$x.modal.asyncClose
- },
- // 是否允许点击遮罩关闭modal
- closeOnClickOverlay: {
- type: Boolean,
- default: props$x.modal.closeOnClickOverlay
- },
- // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
- negativeTop: {
- type: [String, Number],
- default: props$x.modal.negativeTop
- },
- // modal宽度,不支持百分比,可以数值,px,rpx单位
- width: {
- type: [String, Number],
- default: props$x.modal.width
- },
- // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
- confirmButtonShape: {
- type: String,
- default: props$x.modal.confirmButtonShape
- }
- }
- };
- const _sfc_main$P = {
- name: "u-modal",
- mixins: [mpMixin, mixin, props$7],
- data() {
- return {
- loading: false
- };
- },
- watch: {
- show(n) {
- if (n && this.loading)
- this.loading = false;
- }
- },
- methods: {
- // 点击确定按钮
- confirmHandler() {
- if (this.asyncClose) {
- this.loading = true;
- }
- this.$emit("confirm");
- },
- // 点击取消按钮
- cancelHandler() {
- this.$emit("cancel");
- },
- // 点击遮罩
- // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
- // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
- // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
- // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
- clickHandler() {
- if (this.closeOnClickOverlay) {
- this.$emit("close");
- }
- }
- }
- };
- function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$8);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- mode: "center",
- zoom: _ctx.zoom,
- show: _ctx.show,
- customStyle: {
- borderRadius: "6px",
- overflow: "hidden",
- marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
- },
- closeOnClickOverlay: _ctx.closeOnClickOverlay,
- safeAreaInsetBottom: false,
- duration: 400,
- onClick: $options.clickHandler
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- {
- class: "u-modal",
- style: vue.normalizeStyle({
- width: _ctx.$u.addUnit(_ctx.width)
- })
- },
- [
- _ctx.title ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-modal__title"
- },
- vue.toDisplayString(_ctx.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: "u-modal__content",
- style: vue.normalizeStyle({
- paddingTop: `${_ctx.title ? 12 : 25}px`
- })
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- vue.createElementVNode(
- "text",
- { class: "u-modal__content__text" },
- vue.toDisplayString(_ctx.content),
- 1
- /* TEXT */
- )
- ], true)
- ],
- 4
- /* STYLE */
- ),
- _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-modal__button-group--confirm-button"
- }, [
- vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
- ])) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- [
- vue.createVNode(_component_u_line),
- vue.createElementVNode(
- "view",
- {
- class: "u-modal__button-group",
- style: vue.normalizeStyle({
- flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
- })
- },
- [
- _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel", [_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"]]),
- "hover-stay-time": 150,
- "hover-class": "u-modal__button-group__wrapper--hover",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
- },
- [
- vue.createElementVNode(
- "text",
- {
- class: "u-modal__button-group__wrapper__text",
- style: vue.normalizeStyle({
- color: _ctx.cancelColor
- })
- },
- vue.toDisplayString(_ctx.cancelText),
- 5
- /* TEXT, STYLE */
- )
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
- key: 1,
- direction: "column"
- })) : vue.createCommentVNode("v-if", true),
- _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm", [!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"]]),
- "hover-stay-time": 150,
- "hover-class": "u-modal__button-group__wrapper--hover",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
- },
- [
- $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-modal__button-group__wrapper__text",
- style: vue.normalizeStyle({
- color: _ctx.confirmColor
- })
- },
- vue.toDisplayString(_ctx.confirmText),
- 5
- /* TEXT, STYLE */
- ))
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ],
- 4
- /* STYLE */
- )
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
- }
- const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__scopeId", "data-v-f667648f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
- const _sfc_main$O = {
- __name: "ApproveButton",
- emits: ["approve"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const emit = __emit;
- const showConfirmModal = vue.ref(false);
- const handleApprove = () => {
- showConfirmModal.value = true;
- };
- const confirmApprove = () => {
- emit("approve");
- showConfirmModal.value = false;
- };
- const __returned__ = { emit, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
- return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
- vue.createVNode(
- _component_u_button,
- vue.mergeProps({
- type: "success",
- text: "同意",
- size: "small",
- onClick: $setup.handleApprove
- }, _ctx.$attrs),
- null,
- 16
- /* FULL_PROPS */
- ),
- vue.createCommentVNode(" 确认弹窗 "),
- vue.createVNode(_component_u_modal, {
- show: $setup.showConfirmModal,
- title: "确认",
- content: "确认收到货了吗?",
- onConfirm: $setup.confirmApprove,
- onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
- }, null, 8, ["show"])
- ]);
- }
- const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ApproveButton.vue"]]);
- const props$6 = {
- props: {
- // 是否展示工具条
- show: {
- type: Boolean,
- default: props$x.toolbar.show
- },
- // 取消按钮的文字
- cancelText: {
- type: String,
- default: props$x.toolbar.cancelText
- },
- // 确认按钮的文字
- confirmText: {
- type: String,
- default: props$x.toolbar.confirmText
- },
- // 取消按钮的颜色
- cancelColor: {
- type: String,
- default: props$x.toolbar.cancelColor
- },
- // 确认按钮的颜色
- confirmColor: {
- type: String,
- default: props$x.toolbar.confirmColor
- },
- // 标题文字
- title: {
- type: String,
- default: props$x.toolbar.title
- }
- }
- };
- const _sfc_main$N = {
- name: "u-toolbar",
- mixins: [mpMixin, mixin, props$6],
- methods: {
- // 点击取消按钮
- cancel() {
- this.$emit("cancel");
- },
- // 点击确定按钮
- confirm() {
- this.$emit("confirm");
- }
- }
- };
- function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
- return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "u-toolbar",
- onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
- },
- [
- vue.createElementVNode("view", {
- class: "u-toolbar__cancel__wrapper",
- "hover-class": "u-hover-class"
- }, [
- vue.createElementVNode(
- "text",
- {
- class: "u-toolbar__wrapper__cancel",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
- style: vue.normalizeStyle({
- color: _ctx.cancelColor
- })
- },
- vue.toDisplayString(_ctx.cancelText),
- 5
- /* TEXT, STYLE */
- )
- ]),
- _ctx.title ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-toolbar__title u-line-1"
- },
- vue.toDisplayString(_ctx.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "u-toolbar__confirm__wrapper",
- "hover-class": "u-hover-class"
- }, [
- vue.createElementVNode(
- "text",
- {
- class: "u-toolbar__wrapper__confirm",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
- style: vue.normalizeStyle({
- color: _ctx.confirmColor
- })
- },
- vue.toDisplayString(_ctx.confirmText),
- 5
- /* TEXT, STYLE */
- )
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
- const props$5 = {
- props: {
- // 是否展示picker弹窗
- show: {
- type: Boolean,
- default: props$x.picker.show
- },
- // 是否展示顶部的操作栏
- showToolbar: {
- type: Boolean,
- default: props$x.picker.showToolbar
- },
- // 顶部标题
- title: {
- type: String,
- default: props$x.picker.title
- },
- // 对象数组,设置每一列的数据
- columns: {
- type: Array,
- default: props$x.picker.columns
- },
- // 是否显示加载中状态
- loading: {
- type: Boolean,
- default: props$x.picker.loading
- },
- // 各列中,单个选项的高度
- itemHeight: {
- type: [String, Number],
- default: props$x.picker.itemHeight
- },
- // 取消按钮的文字
- cancelText: {
- type: String,
- default: props$x.picker.cancelText
- },
- // 确认按钮的文字
- confirmText: {
- type: String,
- default: props$x.picker.confirmText
- },
- // 取消按钮的颜色
- cancelColor: {
- type: String,
- default: props$x.picker.cancelColor
- },
- // 确认按钮的颜色
- confirmColor: {
- type: String,
- default: props$x.picker.confirmColor
- },
- // 每列中可见选项的数量
- visibleItemCount: {
- type: [String, Number],
- default: props$x.picker.visibleItemCount
- },
- // 选项对象中,需要展示的属性键名
- keyName: {
- type: String,
- default: props$x.picker.keyName
- },
- // 是否允许点击遮罩关闭选择器
- closeOnClickOverlay: {
- type: Boolean,
- default: props$x.picker.closeOnClickOverlay
- },
- // 各列的默认索引
- defaultIndex: {
- type: Array,
- default: props$x.picker.defaultIndex
- },
- // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
- immediateChange: {
- type: Boolean,
- default: props$x.picker.immediateChange
- }
- }
- };
- const _sfc_main$M = {
- name: "u-picker",
- mixins: [mpMixin, mixin, props$5],
- data() {
- return {
- // 上一次选择的列索引
- lastIndex: [],
- // 索引值 ,对应picker-view的value
- innerIndex: [],
- // 各列的值
- innerColumns: [],
- // 上一次的变化列索引
- columnIndex: 0
- };
- },
- watch: {
- // 监听默认索引的变化,重新设置对应的值
- defaultIndex: {
- immediate: true,
- handler(n) {
- this.setIndexs(n, true);
- }
- },
- // 监听columns参数的变化
- columns: {
- immediate: true,
- deep: true,
- handler(n) {
- this.setColumns(n);
- }
- }
- },
- emits: ["close", "cancel", "confirm", "change"],
- methods: {
- // 获取item需要显示的文字,判别为对象还是文本
- getItemText(item) {
- if (uni.$u.test.object(item)) {
- return item[this.keyName];
- } else {
- return item;
- }
- },
- // 关闭选择器
- closeHandler() {
- if (this.closeOnClickOverlay) {
- this.$emit("close");
- }
- },
- // 点击工具栏的取消按钮
- cancel() {
- this.$emit("cancel");
- },
- // 点击工具栏的确定按钮
- confirm() {
- this.$emit("confirm", {
- indexs: this.innerIndex,
- value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
- values: this.innerColumns
- });
- },
- // 选择器某一列的数据发生变化时触发
- changeHandler(e) {
- const {
- value: value2
- } = e.detail;
- let index2 = 0, columnIndex = 0;
- for (let i = 0; i < value2.length; i++) {
- let item = value2[i];
- if (item !== (this.lastIndex[i] || 0)) {
- columnIndex = i;
- index2 = item;
- break;
- }
- }
- this.columnIndex = columnIndex;
- const values = this.innerColumns;
- this.setLastIndex(value2);
- this.setIndexs(value2);
- this.$emit("change", {
- // 微信小程序不能传递this,会因为循环引用而报错
- picker: this,
- value: this.innerColumns.map((item, index3) => item[value2[index3]]),
- index: index2,
- indexs: value2,
- // values为当前变化列的数组内容
- values,
- columnIndex
- });
- },
- // 设置index索引,此方法可被外部调用设置
- setIndexs(index2, setLastIndex) {
- this.innerIndex = uni.$u.deepClone(index2);
- if (setLastIndex) {
- this.setLastIndex(index2);
- }
- },
- // 记录上一次的各列索引位置
- setLastIndex(index2) {
- this.lastIndex = uni.$u.deepClone(index2);
- },
- // 设置对应列选项的所有值
- setColumnValues(columnIndex, values) {
- this.innerColumns.splice(columnIndex, 1, values);
- let tmpIndex = uni.$u.deepClone(this.innerIndex);
- for (let i = 0; i < this.innerColumns.length; i++) {
- if (i > this.columnIndex) {
- tmpIndex[i] = 0;
- }
- }
- this.setIndexs(tmpIndex);
- },
- // 获取对应列的所有选项
- getColumnValues(columnIndex) {
- (async () => {
- await uni.$u.sleep();
- })();
- return this.innerColumns[columnIndex];
- },
- // 设置整体各列的columns的值
- setColumns(columns) {
- formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
- this.innerColumns = uni.$u.deepClone(columns);
- if (this.innerIndex.length === 0) {
- this.innerIndex = new Array(columns.length).fill(0);
- }
- },
- // 获取各列选中值对应的索引
- getIndexs() {
- return this.innerIndex;
- },
- // 获取各列选中的值
- getValues() {
- (async () => {
- await uni.$u.sleep();
- })();
- return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
- }
- }
- };
- function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$2);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$2);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- show: _ctx.show,
- onClose: $options.closeHandler
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "u-picker" }, [
- _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
- key: 0,
- cancelColor: _ctx.cancelColor,
- confirmColor: _ctx.confirmColor,
- cancelText: _ctx.cancelText,
- confirmText: _ctx.confirmText,
- title: _ctx.title,
- onCancel: $options.cancel,
- onConfirm: $options.confirm
- }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("picker-view", {
- class: "u-picker__view",
- indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
- value: $data.innerIndex,
- immediateChange: _ctx.immediateChange,
- style: vue.normalizeStyle({
- height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
- }),
- onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.innerColumns, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("picker-view-column", {
- key: index2,
- class: "u-picker__view__column"
- }, [
- _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList(item, (item1, index1) => {
- return vue.openBlock(), vue.createElementBlock(
- "text",
- {
- class: "u-picker__view__column__item u-line-1",
- key: index1,
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.itemHeight),
- lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
- fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
- })
- },
- vue.toDisplayString($options.getItemText(item1)),
- 5
- /* TEXT, STYLE */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], 44, ["indicatorStyle", "value", "immediateChange"]),
- _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-picker--loading"
- }, [
- vue.createVNode(_component_u_loading_icon, { mode: "circle" })
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show", "onClose"]);
- }
- const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-91b05052"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
- const _sfc_main$L = {
- __name: "RejectButton",
- emits: ["reject"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const emit = __emit;
- const showRejectPicker = vue.ref(false);
- const rejectReasons = [
- "重量不符",
- "包装破损",
- "货物缺失",
- "其他原因"
- ];
- const handleReject = () => {
- showRejectPicker.value = true;
- };
- const confirmReject = (e) => {
- const reason = e.value[0];
- emit("reject", reason);
- showRejectPicker.value = false;
- };
- const __returned__ = { emit, showRejectPicker, rejectReasons, handleReject, confirmReject, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
- return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
- vue.createVNode(
- _component_u_button,
- vue.mergeProps({
- type: "warning",
- text: "驳回",
- size: "small",
- onClick: $setup.handleReject
- }, _ctx.$attrs),
- null,
- 16
- /* FULL_PROPS */
- ),
- vue.createCommentVNode(" 驳回原因选择器 "),
- vue.createVNode(_component_u_picker, {
- show: $setup.showRejectPicker,
- columns: [$setup.rejectReasons],
- onConfirm: $setup.confirmReject,
- onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
- }, null, 8, ["show", "columns"])
- ]);
- }
- const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/RejectButton.vue"]]);
- const _sfc_main$K = {
- __name: "ExceptionItem",
- props: {
- order: {
- type: Object,
- default: () => ({
- orderNo: "",
- expressNo: "",
- estimatedPrice: "",
- pusher: "",
- pushTime: ""
- })
- }
- },
- emits: ["approve", "reject"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit = __emit;
- const handleCheckLogistics = () => {
- uni.navigateTo({
- url: `/pages/index/express/logistics-detail?expressNo=${props2.order.expressNo}`
- });
- };
- const __returned__ = { props: props2, emit, handleCheckLogistics, ref: vue.ref, ApproveButton, RejectButton };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "info-section" }, [
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.orderNo),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "快递单号:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.expressNo),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "预估单价:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.estimatedPrice),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "推送人:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.pusher),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "推送时间:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.pushTime),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(" 操作按钮 "),
- vue.createElementVNode("view", { class: "action-section" }, [
- vue.createVNode(_component_u_button, {
- type: "primary",
- text: "查看物流",
- size: "small",
- onClick: $setup.handleCheckLogistics
- }),
- vue.createVNode($setup["ApproveButton"], {
- onApprove: _cache[0] || (_cache[0] = () => $setup.emit("approve", $props.order))
- }),
- vue.createVNode($setup["RejectButton"], {
- onReject: _cache[1] || (_cache[1] = (reason) => $setup.emit("reject", { order: $props.order, reason }))
- })
- ])
- ]);
- }
- const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__scopeId", "data-v-e0527396"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ExceptionItem.vue"]]);
- const _sfc_main$J = {
- __name: "route-exception",
- setup(__props, { expose: __expose }) {
- __expose();
- const tabList = ["待处理订单", "历史异常签收"];
- const curNow = vue.ref(0);
- function sectionChange(index2) {
- curNow.value = index2;
- }
- const exceptionList = vue.ref([]);
- const page2 = vue.ref(1);
- const loadMoreStatus = vue.ref("loadmore");
- const isRefreshing = vue.ref(false);
- const searchKeyword = vue.ref("");
- vue.onMounted(() => {
- loadData();
- });
- const loadData = async (reset = false) => {
- if (reset) {
- page2.value = 1;
- exceptionList.value = [];
- }
- const mockData = [{
- orderNo: "5698542",
- expressNo: "JDX0010258745151",
- estimatedPrice: "16.8",
- pusher: "涨涨涨",
- pushTime: "2024-06-15 15:00:00"
- }];
- setTimeout(() => {
- exceptionList.value = [...exceptionList.value, ...mockData];
- loadMoreStatus.value = "nomore";
- }, 1e3);
- };
- const onRefresh = async () => {
- isRefreshing.value = true;
- await loadData(true);
- isRefreshing.value = false;
- };
- const loadMore = () => {
- if (loadMoreStatus.value === "nomore")
- return;
- loadMoreStatus.value = "loading";
- page2.value++;
- loadData();
- };
- const handleSearch = () => {
- loadData(true);
- };
- const handleScan = () => {
- uni.scanCode({
- success: (res) => {
- searchKeyword.value = res.result;
- handleSearch();
- }
- });
- };
- const __returned__ = { tabList, curNow, sectionChange, exceptionList, page: page2, loadMoreStatus, isRefreshing, searchKeyword, loadData, onRefresh, loadMore, handleSearch, handleScan, ref: vue.ref, onMounted: vue.onMounted, ExceptionItem };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$3);
- const _component_u_loadmore = resolveEasycom(vue.resolveDynamicComponent("u-loadmore"), __easycom_1$3);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_2$5);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 顶部标签页 "),
- vue.createVNode(_component_u_subsection, {
- list: $setup.tabList,
- current: $setup.curNow,
- onChange: $setup.sectionChange,
- mode: "subsection"
- }, null, 8, ["current"]),
- vue.createCommentVNode(" 列表区域 "),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "list-container",
- onScrolltolower: $setup.loadMore,
- "refresher-enabled": "",
- onRefresherrefresh: $setup.onRefresh,
- "refresher-triggered": $setup.isRefreshing
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.exceptionList, (item) => {
- return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
- key: item.orderNo,
- order: item
- }, null, 8, ["order"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createCommentVNode(" 加载更多 "),
- vue.createVNode(_component_u_loadmore, {
- status: $setup.loadMoreStatus,
- onLoadmore: $setup.loadMore
- }, null, 8, ["status"])
- ], 40, ["refresher-triggered"]),
- vue.createCommentVNode(" 底部搜索框 "),
- vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchKeyword,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
- placeholder: "请输入物流单号/订单编号",
- "show-action": false,
- onSearch: $setup.handleSearch,
- height: "80rpx",
- shape: "round"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "28",
- color: "#19be6b",
- onClick: $setup.handleScan
- })
- ])
- ]);
- }
- const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-388e5b84"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/route-exception.vue"]]);
- const _sfc_main$I = {
- __name: "warehouse-sign",
- setup(__props, { expose: __expose }) {
- __expose();
- const showSelector = vue.ref(false);
- const selectedWarehouse = vue.ref("");
- const trackingNumber = vue.ref("");
- function openWarehouseSelector() {
- showSelector.value = true;
- }
- function handleWarehouseSelected(warehouse) {
- selectedWarehouse.value = warehouse;
- }
- function confirmTrackingNumber() {
- playSuccessVoice("物流单号DPK202306014525已到仓签收成功");
- }
- function playSuccessVoice(text) {
- const ttsParams = {
- speed: 0.8,
- // 将 0-10 转换为 0-1
- pitch: 1,
- // 将 0-10 转换为 0-1
- volume: 1
- };
- const TTSModule = requireNativePlugin("nrb-tts-plugin");
- TTSModule && TTSModule.init({
- "lang": "ZH",
- "country": "CN"
- }, (res) => {
- if (res.success == 0) {
- TTSModule.speak(text, ttsParams, (e) => {
- formatAppLog("log", "at pages/index/express/warehouse-sign.vue:64", e, "播放语音成功");
- });
- }
- });
- }
- function scanCode() {
- uni.scanCode({
- success: (res) => {
- trackingNumber.value = res.result;
- formatAppLog("log", "at pages/index/express/warehouse-sign.vue:76", "扫码结果:", res.result);
- },
- fail: (err) => {
- formatAppLog("error", "at pages/index/express/warehouse-sign.vue:79", "扫码失败:", err);
- }
- });
- }
- const __returned__ = { showSelector, selectedWarehouse, trackingNumber, openWarehouseSelector, handleWarehouseSelected, confirmTrackingNumber, playSuccessVoice, scanCode, ref: vue.ref, WarehouseSelector };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "main-content" }, [
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.selectedWarehouse,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
- placeholder: "请选择仓库",
- readonly: "",
- border: "surround"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_button, {
- type: "primary",
- onClick: $setup.openWarehouseSelector,
- text: "选择"
- })
- ]),
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.trackingNumber,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.trackingNumber = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_button, {
- type: "primary",
- onClick: $setup.confirmTrackingNumber,
- text: "确定"
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "success",
- onClick: $setup.scanCode,
- text: "扫码",
- class: "scan-button"
- })
- ]),
- vue.createVNode($setup["WarehouseSelector"], {
- show: $setup.showSelector,
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => $setup.showSelector = $event),
- onWarehouseSelected: $setup.handleWarehouseSelected
- }, null, 8, ["show"])
- ]);
- }
- const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-7473f06e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/warehouse-sign.vue"]]);
- const _sfc_main$H = {
- __name: "weight-modify",
- setup(__props, { expose: __expose }) {
- __expose();
- const formRef = vue.ref(null);
- const form = vue.ref({
- trackingNumber: "",
- weight: "",
- images: []
- });
- const rules2 = {
- trackingNumber: [{
- required: true,
- message: "请输入物流单号",
- trigger: "blur"
- }],
- weight: [{
- required: true,
- message: "请输入重量",
- trigger: "blur"
- }]
- };
- function scanCode() {
- uni.scanCode({
- success: (res) => {
- form.value.trackingNumber = res.result;
- },
- fail: (err) => {
- formatAppLog("error", "at pages/index/express/weight-modify.vue:62", "扫码失败:", err);
- }
- });
- }
- function submitForm() {
- formRef.value.validate((valid) => {
- if (valid) {
- formatAppLog("log", "at pages/index/express/weight-modify.vue:71", "表单提交:", form.value);
- } else {
- formatAppLog("error", "at pages/index/express/weight-modify.vue:73", "表单验证失败");
- }
- });
- }
- const __returned__ = { formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_2$4);
- const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_2$3);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_3$3);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createVNode(_component_u_form, {
- ref: "formRef",
- model: $setup.form,
- rules: $setup.rules,
- "label-width": "85px",
- "label-position": "top"
- }, {
- default: vue.withCtx(() => [
- vue.createCommentVNode(" 物流单号输入 "),
- vue.createVNode(_component_u_form_item, { label: "" }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.form.trackingNumber,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.trackingNumber = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround",
- name: "trackingNumber"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 重量输入 "),
- vue.createVNode(_component_u_form_item, { label: "重量(kg)" }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.form.weight,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.weight = $event),
- placeholder: "请输入重量",
- border: "surround",
- name: "weight",
- type: "number"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 图片上传 "),
- vue.createVNode(_component_u_form_item, { label: "上传图片" }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_upload, {
- modelValue: $setup.form.images,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.form.images = $event),
- action: "your-upload-url",
- name: "images",
- limit: 1,
- "max-size": 1024 * 1024
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["model"]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "warning",
- onClick: $setup.scanCode,
- text: "扫码",
- class: "scan-button"
- }),
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "success",
- onClick: $setup.submitForm,
- text: "提交",
- class: "submit-button"
- })
- ])
- ]);
- }
- const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-e6126507"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/weight-modify.vue"]]);
- const _sfc_main$G = {};
- function _sfc_render$F(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/confirm-receipt.vue"]]);
- const _sfc_main$F = {};
- function _sfc_render$E(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/scan-order.vue"]]);
- const _sfc_main$E = {};
- function _sfc_render$D(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/express-order.vue"]]);
- const _sfc_main$D = {};
- function _sfc_render$C(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/sender.vue"]]);
- const _sfc_main$C = {};
- function _sfc_render$B(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/audit.vue"]]);
- const _sfc_main$B = {};
- function _sfc_render$A(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/after-sale.vue"]]);
- const _sfc_main$A = {};
- function _sfc_render$z(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/package.vue"]]);
- const _sfc_main$z = {};
- function _sfc_render$y(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/medium-in.vue"]]);
- const _sfc_main$y = {};
- function _sfc_render$x(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/good-in.vue"]]);
- const _sfc_main$x = {};
- function _sfc_render$w(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/secondary-in.vue"]]);
- const _sfc_main$w = {};
- function _sfc_render$v(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-in.vue"]]);
- const _sfc_main$v = {};
- function _sfc_render$u(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out.vue"]]);
- const _sfc_main$u = {};
- function _sfc_render$t(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-off.vue"]]);
- const _sfc_main$t = {};
- function _sfc_render$s(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query.vue"]]);
- const _sfc_main$s = {};
- function _sfc_render$r(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order.vue"]]);
- const _sfc_main$r = {};
- function _sfc_render$q(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/speedy-check.vue"]]);
- const _sfc_main$q = {};
- function _sfc_render$p(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-order.vue"]]);
- const _sfc_main$p = {};
- function _sfc_render$o(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-record.vue"]]);
- const _sfc_main$o = {};
- function _sfc_render$n(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/scan-book.vue"]]);
- const _sfc_main$n = {};
- function _sfc_render$m(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view", null, "1");
- }
- const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/book-weight.vue"]]);
- const props$4 = {
- props: {
- // 显示文字
- title: {
- type: String,
- default: props$x.alert.title
- },
- // 主题,success/warning/info/error
- type: {
- type: String,
- default: props$x.alert.type
- },
- // 辅助性文字
- description: {
- type: String,
- default: props$x.alert.description
- },
- // 是否可关闭
- closable: {
- type: Boolean,
- default: props$x.alert.closable
- },
- // 是否显示图标
- showIcon: {
- type: Boolean,
- default: props$x.alert.showIcon
- },
- // 浅或深色调,light-浅色,dark-深色
- effect: {
- type: String,
- default: props$x.alert.effect
- },
- // 文字是否居中
- center: {
- type: Boolean,
- default: props$x.alert.center
- },
- // 字体大小
- fontSize: {
- type: [String, Number],
- default: props$x.alert.fontSize
- }
- }
- };
- const _sfc_main$m = {
- name: "u-alert",
- mixins: [mpMixin, mixin, props$4],
- data() {
- return {
- show: true
- };
- },
- computed: {
- iconColor() {
- return this.effect === "light" ? this.type : "#fff";
- },
- // 不同主题对应不同的图标
- iconName() {
- switch (this.type) {
- case "success":
- return "checkmark-circle-fill";
- case "error":
- return "close-circle-fill";
- case "warning":
- return "error-circle-fill";
- case "info":
- return "info-circle-fill";
- case "primary":
- return "more-circle-fill";
- default:
- return "error-circle-fill";
- }
- }
- },
- methods: {
- // 点击内容
- clickHandler() {
- this.$emit("click");
- },
- // 点击关闭按钮
- closeHandler() {
- this.show = false;
- }
- }
- };
- function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
- return vue.openBlock(), vue.createBlock(_component_u_transition, {
- mode: "fade",
- show: $data.show
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
- },
- [
- _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-alert__icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: $options.iconName,
- size: "18",
- color: $options.iconColor
- }, null, 8, ["name", "color"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: "u-alert__content",
- style: vue.normalizeStyle([{
- paddingRight: _ctx.closable ? "20px" : 0
- }])
- },
- [
- _ctx.title ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
- style: vue.normalizeStyle([{
- fontSize: _ctx.$u.addUnit(_ctx.fontSize),
- textAlign: _ctx.center ? "center" : "left"
- }])
- },
- vue.toDisplayString(_ctx.title),
- 7
- /* TEXT, CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.description ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
- style: vue.normalizeStyle([{
- fontSize: _ctx.$u.addUnit(_ctx.fontSize),
- textAlign: _ctx.center ? "center" : "left"
- }])
- },
- vue.toDisplayString(_ctx.description),
- 7
- /* TEXT, CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- ),
- _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-alert__close",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
- }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- color: $options.iconColor,
- size: "15"
- }, null, 8, ["color"])
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- )
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]);
- }
- const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-158e540a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
- const props$3 = {
- props: {
- // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
- offsetTop: {
- type: [String, Number],
- default: props$x.sticky.offsetTop
- },
- // 自定义导航栏的高度
- customNavHeight: {
- type: [String, Number],
- default: props$x.sticky.customNavHeight
- },
- // 是否开启吸顶功能
- disabled: {
- type: Boolean,
- default: props$x.sticky.disabled
- },
- // 吸顶区域的背景颜色
- bgColor: {
- type: String,
- default: props$x.sticky.bgColor
- },
- // z-index值
- zIndex: {
- type: [String, Number],
- default: props$x.sticky.zIndex
- },
- // 列表中的索引值
- index: {
- type: [String, Number],
- default: props$x.sticky.index
- }
- }
- };
- const _sfc_main$l = {
- name: "u-sticky",
- mixins: [mpMixin, mixin, props$3],
- data() {
- return {
- cssSticky: false,
- // 是否使用css的sticky实现
- stickyTop: 0,
- // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
- elId: uni.$u.guid(),
- left: 0,
- // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
- width: "auto",
- height: "auto",
- fixed: false
- // js模式时,是否处于吸顶模式
- };
- },
- computed: {
- style() {
- const style = {};
- if (!this.disabled) {
- if (this.cssSticky) {
- style.position = "sticky";
- style.zIndex = this.uZindex;
- style.top = uni.$u.addUnit(this.stickyTop);
- } else {
- style.height = this.fixed ? this.height + "px" : "auto";
- }
- } else {
- style.position = "static";
- }
- style.backgroundColor = this.bgColor;
- return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
- },
- // 吸顶内容的样式
- stickyContent() {
- const style = {};
- if (!this.cssSticky) {
- style.position = this.fixed ? "fixed" : "static";
- style.top = this.stickyTop + "px";
- style.left = this.left + "px";
- style.width = this.width == "auto" ? "auto" : this.width + "px";
- style.zIndex = this.uZindex;
- }
- return style;
- },
- uZindex() {
- return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- this.getStickyTop();
- this.checkSupportCssSticky();
- if (!this.cssSticky) {
- !this.disabled && this.initObserveContent();
- }
- },
- initObserveContent() {
- this.$uGetRect("#" + this.elId).then((res) => {
- this.height = res.height;
- this.left = res.left;
- this.width = res.width;
- this.$nextTick(() => {
- this.observeContent();
- });
- });
- },
- observeContent() {
- this.disconnectObserver("contentObserver");
- const contentObserver = uni.createIntersectionObserver({
- // 检测的区间范围
- thresholds: [0.95, 0.98, 1]
- });
- contentObserver.relativeToViewport({
- top: -this.stickyTop
- });
- contentObserver.observe(`#${this.elId}`, (res) => {
- this.setFixed(res.boundingClientRect.top);
- });
- this.contentObserver = contentObserver;
- },
- setFixed(top) {
- const fixed = top <= this.stickyTop;
- this.fixed = fixed;
- },
- disconnectObserver(observerName) {
- const observer = this[observerName];
- observer && observer.disconnect();
- },
- getStickyTop() {
- this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
- },
- async checkSupportCssSticky() {
- if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
- this.cssSticky = true;
- }
- this.cssSticky = await this.checkComputedStyle();
- if (uni.$u.os() === "ios") {
- this.cssSticky = true;
- }
- },
- // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
- checkComputedStyle() {
- return new Promise((resolve) => {
- uni.createSelectorQuery().in(this).select(".u-sticky").fields({
- computedStyle: ["position"]
- }).exec((e) => {
- resolve("sticky" === e[0].position);
- });
- });
- },
- // H5通过创建元素的形式嗅探是否支持css sticky
- // 判断浏览器是否支持sticky属性
- checkCssStickyForH5() {
- }
- },
- beforeDestroy() {
- this.disconnectObserver("contentObserver");
- }
- };
- function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "u-sticky",
- id: $data.elId,
- style: vue.normalizeStyle([$options.style])
- }, [
- vue.createElementVNode(
- "view",
- {
- style: vue.normalizeStyle([$options.stickyContent]),
- class: "u-sticky__content"
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 4
- /* STYLE */
- )
- ], 12, ["id"]);
- }
- const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-8b303089"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
- const _sfc_main$k = {
- __name: "logistics-detail",
- setup(__props, { expose: __expose }) {
- __expose();
- const logisticsInfo = vue.ref({
- company: "京东快递",
- traces: [
- {
- desc: "货物已交付京东快递",
- time: "2024/10/16 16:00:00"
- },
- {
- desc: "接收物任务分配给快递员王艳玲,联系电话 15123695401",
- time: "2024/10/16 16:00:00"
- },
- {
- desc: "快递员发起联系客户,呼叫方式:拨打电话。",
- time: "2024/10/16 16:00:00"
- },
- {
- desc: "京东快递已收取收件",
- time: "2024/10/16 16:00:00"
- },
- {
- desc: "您的快件已由【信阳师范小蜜蜂】揽收完成",
- time: "2024/10/16 16:00:00"
- }
- // ... 更多轨迹信息
- ]
- });
- const handleReject = (reason) => {
- formatAppLog("log", "at pages/index/express/logistics-detail.vue:65", "驳回原因:", reason);
- };
- const handleApprove = () => {
- formatAppLog("log", "at pages/index/express/logistics-detail.vue:71", "同意操作");
- };
- const __returned__ = { logisticsInfo, handleReject, handleApprove, ref: vue.ref, ApproveButton, RejectButton };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$1);
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 物流公司信息 "),
- vue.createVNode(_component_u_sticky, null, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_alert, {
- title: `物流公司:${$setup.logisticsInfo.company}`,
- type: "warning"
- }, null, 8, ["title"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "timeline-container"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.logisticsInfo.traces, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "timeline-item"
- }, [
- vue.createElementVNode("view", { class: "timeline-icon" }, [
- vue.createVNode(_component_u_icon, {
- name: "map-fill",
- color: "#19be6b",
- size: "16"
- })
- ]),
- vue.createElementVNode("view", { class: "timeline-content" }, [
- vue.createElementVNode(
- "text",
- { class: "desc" },
- vue.toDisplayString(item.desc),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "time" },
- vue.toDisplayString(item.time),
- 1
- /* TEXT */
- )
- ]),
- index2 < $setup.logisticsInfo.traces.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "timeline-line"
- })) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部操作按钮 "),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode($setup["RejectButton"], {
- size: "large",
- onReject: $setup.handleReject
- }),
- vue.createVNode($setup["ApproveButton"], {
- size: "large",
- onApprove: $setup.handleApprove
- })
- ])
- ]);
- }
- const PagesIndexExpressLogisticsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-8e52fe94"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/logistics-detail.vue"]]);
- const _sfc_main$j = {
- __name: "user-info",
- setup(__props, { expose: __expose }) {
- __expose();
- const userInfo = vue.ref({
- avatar: "/static/images/avatar.jpg",
- name: "无",
- gender: "无",
- birthday: "无",
- education: "无",
- school: "无",
- username: "用户账号",
- account: "fxt",
- createTime: "2024-06-12 12:00:00",
- lastLogin: "",
- company: "无",
- employeeId: "无",
- position: "无",
- phone: "18888888888",
- email: "无",
- address: "无"
- });
- const handleEditAvatar = () => {
- uni.chooseImage({
- count: 1,
- success: (res) => {
- formatAppLog("log", "at pages/my/page/user-info.vue:94", "选择的图片:", res.tempFilePaths[0]);
- }
- });
- };
- const __returned__ = { userInfo, handleEditAvatar, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$9);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
- const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
- vue.createCommentVNode(" 头像区域 "),
- vue.createElementVNode("view", { class: "avatar-section" }, [
- vue.createElementVNode("view", { class: "avatar-wrap" }, [
- vue.createElementVNode("text", null, "头像:"),
- vue.createVNode(_component_u_avatar, {
- size: 50,
- src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
- }),
- vue.createVNode(_component_u_button, {
- type: "success",
- style: { "width": "200rpx" },
- size: "small",
- onClick: $setup.handleEditAvatar
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("去修改")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]),
- vue.createCommentVNode(" 基本信息区域 "),
- vue.createElementVNode("view", { class: "info-section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
- vue.createElementVNode("view", { class: "info-card" }, [
- vue.createVNode(_component_u_cell_group, { border: false }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_cell, {
- title: "姓名",
- value: $setup.userInfo.name || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "性别",
- value: $setup.userInfo.gender || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "生日",
- value: $setup.userInfo.birthday || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "学历",
- value: $setup.userInfo.education || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "毕业学校",
- value: $setup.userInfo.school || "无",
- border: false
- }, null, 8, ["value"])
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]),
- vue.createCommentVNode(" 账号信息区域 "),
- vue.createElementVNode("view", { class: "info-section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
- vue.createElementVNode("view", { class: "info-card" }, [
- vue.createVNode(_component_u_cell_group, { border: false }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_cell, {
- title: "账号",
- value: $setup.userInfo.account
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "创建日期",
- value: $setup.userInfo.createTime
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "最近登录",
- value: $setup.userInfo.lastLogin || "--",
- border: false
- }, null, 8, ["value"])
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]),
- vue.createCommentVNode(" 员工资料区域 "),
- vue.createElementVNode("view", { class: "info-section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
- vue.createElementVNode("view", { class: "info-card" }, [
- vue.createVNode(_component_u_cell_group, { border: false }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_cell, {
- title: "公司",
- value: $setup.userInfo.company || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "员工编号",
- value: $setup.userInfo.employeeId || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "职位",
- value: $setup.userInfo.position || "无",
- border: false
- }, null, 8, ["value"])
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]),
- vue.createCommentVNode(" 联系方式区域 "),
- vue.createElementVNode("view", { class: "info-section" }, [
- vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
- vue.createElementVNode("view", { class: "info-card" }, [
- vue.createVNode(_component_u_cell_group, { border: false }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_cell, {
- title: "电话",
- value: $setup.userInfo.phone
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "邮箱",
- value: $setup.userInfo.email || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "住址",
- value: $setup.userInfo.address || "无",
- border: false
- }, null, 8, ["value"])
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ])
- ]);
- }
- const PagesMyPageUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-804eca28"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/user-info.vue"]]);
- const _sfc_main$i = {
- __name: "warehouse",
- emits: ["change"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const showPicker = vue.ref(false);
- const selectedWarehouse = vue.ref("");
- const warehouseList = vue.ref([
- {
- text: "北京仓库",
- value: "1"
- },
- {
- text: "上海仓库",
- value: "2"
- },
- {
- text: "广州仓库",
- value: "3"
- },
- {
- text: "深圳仓库",
- value: "4"
- }
- ]);
- const onConfirm = (e) => {
- const [{
- value: value2,
- text
- }] = e.value;
- selectedWarehouse.value = text;
- showPicker.value = false;
- emit("change", value2);
- };
- const emit = __emit;
- const __returned__ = { showPicker, selectedWarehouse, warehouseList, onConfirm, emit, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
- vue.createElementVNode("view", {
- class: "select-wrap",
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
- }, [
- vue.createElementVNode("text", { class: "required-label" }, "*"),
- vue.createElementVNode("text", { class: "label" }, "默认仓库"),
- vue.createElementVNode("view", { class: "picker-value" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
- },
- vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
- 3
- /* TEXT, CLASS */
- ),
- vue.createVNode(_component_u_icon, {
- name: "arrow-right",
- color: "#999",
- size: "16"
- })
- ])
- ]),
- vue.createCommentVNode(" 仓库选择器 "),
- vue.createVNode(_component_u_picker, {
- show: $setup.showPicker,
- columns: [$setup.warehouseList],
- onConfirm: $setup.onConfirm,
- onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
- onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
- title: "选择仓库",
- confirmText: "确定",
- cancelText: "取消"
- }, null, 8, ["show", "columns"])
- ]);
- }
- const PagesMyPageWarehouse = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-972eecda"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/warehouse.vue"]]);
- const _sfc_main$h = {
- __name: "school",
- setup(__props, { expose: __expose }) {
- __expose();
- const schoolName = vue.ref("");
- const schoolList = vue.ref([{
- name: "河南大学"
- }, {
- name: "清华大学"
- }, {
- name: "北京大学"
- }]);
- const handleAddSchool = () => {
- if (!schoolName.value.trim()) {
- uni.$u.toast("请输入学校名称");
- return;
- }
- schoolList.value.push({
- name: schoolName.value
- });
- schoolName.value = "";
- };
- const handleRemoveSchool = (index2) => {
- schoolList.value.splice(index2, 1);
- };
- const handleSubmit = () => {
- if (schoolList.value.length === 0) {
- uni.$u.toast("请至少添加一所学校");
- return;
- }
- formatAppLog("log", "at pages/my/page/school.vue:73", "提交的学校列表:", schoolList.value);
- };
- const __returned__ = { schoolName, schoolList, handleAddSchool, handleRemoveSchool, handleSubmit, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$1);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
- vue.createCommentVNode(" 输入区域 "),
- vue.createElementVNode("view", { class: "input-section" }, [
- vue.createElementVNode("view", { class: "input-header" }, [
- vue.createElementVNode("text", { class: "required" }, "*"),
- vue.createElementVNode("text", { class: "label" }, "学校名称:"),
- vue.createVNode(_component_u_input, {
- modelValue: $setup.schoolName,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
- placeholder: "请输入一个学校名称",
- border: "false",
- class: "input"
- }, {
- suffix: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: "plus",
- size: "24",
- color: "#666",
- onClick: $setup.handleAddSchool
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ])
- ]),
- vue.createCommentVNode(" 学校列表 "),
- vue.createElementVNode("view", { class: "school-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.schoolList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "school-item",
- key: index2
- }, [
- vue.createVNode(_component_u_tag, {
- text: item.name,
- closable: ""
- }, null, 8, ["text"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部提交按钮 "),
- vue.createElementVNode("view", { class: "submit-btn" }, [
- vue.createVNode(_component_u_button, {
- type: "success",
- block: "",
- onClick: $setup.handleSubmit
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("提交")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$g = {
- __name: "orderItem",
- setup(__props, { expose: __expose }) {
- __expose();
- const orderId = vue.ref("66478425");
- const trackingId = vue.ref("DPK202356410215");
- const estimatedAmount = vue.ref("66.6");
- const auditAmount = vue.ref("待核");
- const internalNote = vue.ref("已反馈");
- const statusColor = vue.ref("#FF4D4F");
- const copyToClipboard = (text) => {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "复制成功",
- icon: "success"
- });
- }
- });
- };
- const handleAudit = () => {
- formatAppLog("log", "at pages/my/components/orderItem.vue:76", "到货审核");
- };
- const handleView = () => {
- formatAppLog("log", "at pages/my/components/orderItem.vue:82", "查看");
- };
- const __returned__ = { orderId, trackingId, estimatedAmount, auditAmount, internalNote, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
- vue.createCommentVNode(" 用户信息 "),
- vue.createElementVNode("view", { class: "user-info" }, [
- vue.createElementVNode("image", {
- class: "avatar",
- src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png",
- mode: "aspectFill"
- }),
- vue.createElementVNode("view", { class: "user-details" }, [
- vue.createElementVNode("text", { class: "username" }, "微信用户(南**)"),
- vue.createElementVNode("text", { class: "date" }, "共卖出7本书"),
- vue.createElementVNode("text", { class: "date" }, "来自河南省郑州市中牟县")
- ]),
- vue.createElementVNode("view", { class: "user-details right-items" }, [
- vue.createElementVNode("text", { class: "date" }, "2024-06-01 17:00:00"),
- vue.createElementVNode(
- "text",
- {
- class: "status",
- style: vue.normalizeStyle({ color: $setup.statusColor })
- },
- "[待收货审核]",
- 4
- /* STYLE */
- )
- ])
- ]),
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "order-info" }),
- vue.createCommentVNode(" 订单详情 "),
- vue.createElementVNode("view", { class: "order-details" }, [
- vue.createElementVNode("view", { class: "detail-row" }, [
- vue.createElementVNode("text", null, "订单ID:"),
- vue.createElementVNode(
- "text",
- {
- class: "link",
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($setup.orderId))
- },
- vue.toDisplayString($setup.orderId),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", null, "运单号:"),
- vue.createElementVNode(
- "text",
- {
- class: "link",
- onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($setup.trackingId))
- },
- vue.toDisplayString($setup.trackingId),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "detail-row" }, [
- vue.createElementVNode(
- "text",
- null,
- "预估金额:" + vue.toDisplayString($setup.estimatedAmount),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- "审核金额:" + vue.toDisplayString($setup.auditAmount),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "detail-row" }, [
- vue.createElementVNode(
- "text",
- null,
- "内部备注:" + vue.toDisplayString($setup.internalNote),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(" 操作按钮 "),
- vue.createElementVNode("view", { class: "action-buttons" }, [
- vue.createVNode(_component_u_button, {
- size: "small",
- onClick: $setup.handleAudit
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("到货审核")
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_button, {
- size: "small",
- onClick: $setup.handleView
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("查看")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$f = {
- __name: "audit-unfinished",
- setup(__props, { expose: __expose }) {
- __expose();
- const __returned__ = { orderItem };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
- vue.createVNode($setup["orderItem"]),
- vue.createVNode($setup["orderItem"]),
- vue.createVNode($setup["orderItem"])
- ]);
- }
- const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/audit-unfinished.vue"]]);
- const _sfc_main$e = {
- __name: "version",
- setup(__props, { expose: __expose }) {
- __expose();
- const userInfo = vue.reactive({
- version: "v_2024050400_1",
- // Example version number
- updateStatus: "已经是新版本"
- // Example update status
- });
- function checkForUpdates() {
- setTimeout(() => {
- {
- userInfo.updateStatus = "发现新版本,正在下载...";
- downloadNewVersion();
- }
- }, 1e3);
- }
- function downloadNewVersion() {
- setTimeout(() => {
- userInfo.updateStatus = "下载完成,准备安装";
- }, 2e3);
- }
- const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
- const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
- vue.createVNode(_component_u_cell_group, {
- border: false,
- customStyle: "background:#ffffff"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_cell, {
- title: "当前版本号(正式版)",
- value: $setup.userInfo.version || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "检测更新",
- value: $setup.userInfo.updateStatus || "无",
- border: false,
- onClick: $setup.checkForUpdates
- }, null, 8, ["value"])
- ]),
- _: 1
- /* STABLE */
- })
- ]);
- }
- const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/version.vue"]]);
- const props$2 = {
- props: {
- // 是否为加载中状态
- loading: {
- type: Boolean,
- default: props$x.switch.loading
- },
- // 是否为禁用装填
- disabled: {
- type: Boolean,
- default: props$x.switch.disabled
- },
- // 开关尺寸,单位px
- size: {
- type: [String, Number],
- default: props$x.switch.size
- },
- // 打开时的背景颜色
- activeColor: {
- type: String,
- default: props$x.switch.activeColor
- },
- // 关闭时的背景颜色
- inactiveColor: {
- type: String,
- default: props$x.switch.inactiveColor
- },
- // 通过v-model双向绑定的值
- modelValue: {
- type: [Boolean, String, Number],
- default: props$x.switch.value
- },
- // switch打开时的值
- activeValue: {
- type: [String, Number, Boolean],
- default: props$x.switch.activeValue
- },
- // switch关闭时的值
- inactiveValue: {
- type: [String, Number, Boolean],
- default: props$x.switch.inactiveValue
- },
- // 是否开启异步变更,开启后需要手动控制输入值
- asyncChange: {
- type: Boolean,
- default: props$x.switch.asyncChange
- },
- // 圆点与外边框的距离
- space: {
- type: [String, Number],
- default: props$x.switch.space
- }
- }
- };
- const _sfc_main$d = {
- name: "u-switch",
- mixins: [mpMixin, mixin, props$2],
- watch: {
- modelValue: {
- immediate: true,
- handler(n) {
- if (n !== this.inactiveValue && n !== this.activeValue) {
- uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
- }
- }
- }
- },
- data() {
- return {
- bgColor: "#ffffff"
- };
- },
- computed: {
- isActive() {
- return this.modelValue === this.activeValue;
- },
- switchStyle() {
- let style = {};
- style.width = uni.$u.addUnit(this.size * 2 + 2);
- style.height = uni.$u.addUnit(Number(this.size) + 2);
- if (this.customInactiveColor) {
- style.borderColor = "rgba(0, 0, 0, 0)";
- }
- style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
- return style;
- },
- nodeStyle() {
- let style = {};
- style.width = uni.$u.addUnit(this.size - this.space);
- style.height = uni.$u.addUnit(this.size - this.space);
- const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
- style.transform = `translateX(-${translateX})`;
- return style;
- },
- bgStyle() {
- let style = {};
- style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
- style.height = uni.$u.addUnit(this.size);
- style.backgroundColor = this.inactiveColor;
- style.transform = `scale(${this.isActive ? 0 : 1})`;
- return style;
- },
- customInactiveColor() {
- return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
- }
- },
- emits: ["update:modelValue", "change"],
- methods: {
- clickHandler() {
- if (!this.disabled && !this.loading) {
- const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
- if (!this.asyncChange) {
- this.$emit("update:modelValue", oldValue);
- }
- this.$nextTick(() => {
- this.$emit("change", oldValue);
- });
- }
- }
- }
- };
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$5);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
- style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: "u-switch__bg",
- style: vue.normalizeStyle([$options.bgStyle])
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
- style: vue.normalizeStyle([$options.nodeStyle]),
- ref: "u-switch__node"
- },
- [
- vue.createVNode(_component_u_loading_icon, {
- show: _ctx.loading,
- mode: "circle",
- timingFunction: "linear",
- color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
- size: _ctx.size * 0.6
- }, null, 8, ["show", "color", "size"])
- ],
- 6
- /* CLASS, STYLE */
- )
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- 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"]]);
- const props$1 = {
- props: {
- // 输入框的内容
- value: {
- type: [String, Number],
- default: props$x.textarea.value
- },
- // 输入框的内容
- modelValue: {
- type: [String, Number],
- default: props$x.textarea.value
- },
- // 输入框为空时占位符
- placeholder: {
- type: [String, Number],
- default: props$x.textarea.placeholder
- },
- // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
- placeholderClass: {
- type: String,
- default: props$x.input.placeholderClass
- },
- // 指定placeholder的样式
- placeholderStyle: {
- type: [String, Object],
- default: props$x.input.placeholderStyle
- },
- // 输入框高度
- height: {
- type: [String, Number],
- default: props$x.textarea.height
- },
- // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
- confirmType: {
- type: String,
- default: props$x.textarea.confirmType
- },
- // 是否禁用
- disabled: {
- type: Boolean,
- default: props$x.textarea.disabled
- },
- // 是否显示统计字数
- count: {
- type: Boolean,
- default: props$x.textarea.count
- },
- // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
- focus: {
- type: Boolean,
- default: props$x.textarea.focus
- },
- // 是否自动增加高度
- autoHeight: {
- type: Boolean,
- default: props$x.textarea.autoHeight
- },
- // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
- fixed: {
- type: Boolean,
- default: props$x.textarea.fixed
- },
- // 指定光标与键盘的距离
- cursorSpacing: {
- type: Number,
- default: props$x.textarea.cursorSpacing
- },
- // 指定focus时的光标位置
- cursor: {
- type: [String, Number],
- default: props$x.textarea.cursor
- },
- // 是否显示键盘上方带有”完成“按钮那一栏,
- showConfirmBar: {
- type: Boolean,
- default: props$x.textarea.showConfirmBar
- },
- // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
- selectionStart: {
- type: Number,
- default: props$x.textarea.selectionStart
- },
- // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
- selectionEnd: {
- type: Number,
- default: props$x.textarea.selectionEnd
- },
- // 键盘弹起时,是否自动上推页面
- adjustPosition: {
- type: Boolean,
- default: props$x.textarea.adjustPosition
- },
- // 是否去掉 iOS 下的默认内边距,只微信小程序有效
- disableDefaultPadding: {
- type: Boolean,
- default: props$x.textarea.disableDefaultPadding
- },
- // focus时,点击页面的时候不收起键盘,只微信小程序有效
- holdKeyboard: {
- type: Boolean,
- default: props$x.textarea.holdKeyboard
- },
- // 最大输入长度,设置为 -1 的时候不限制最大长度
- maxlength: {
- type: [String, Number],
- default: props$x.textarea.maxlength
- },
- // 边框类型,surround-四周边框,bottom-底部边框
- border: {
- type: String,
- default: props$x.textarea.border
- },
- // 用于处理或者过滤输入框内容的方法
- formatter: {
- type: [Function, null],
- default: props$x.textarea.formatter
- },
- // 是否忽略组件内对文本合成系统事件的处理
- ignoreCompositionEvent: {
- type: Boolean,
- default: true
- }
- }
- };
- const _sfc_main$c = {
- name: "u-textarea",
- mixins: [mpMixin, mixin, props$1],
- data() {
- return {
- // 输入框的值
- innerValue: "",
- // 是否处于获得焦点状态
- focused: false,
- // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
- firstChange: true,
- // value绑定值的变化是由内部还是外部引起的
- changeFromInner: false,
- // 过滤处理方法
- innerFormatter: (value2) => value2
- };
- },
- created() {
- },
- watch: {
- modelValue: {
- immediate: true,
- handler(newVal, oldVal) {
- this.innerValue = newVal;
- this.firstChange = false;
- this.changeFromInner = false;
- }
- }
- },
- computed: {
- // 组件的类名
- textareaClass() {
- let classes = [], { border, disabled } = this;
- border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
- border === "bottom" && (classes = classes.concat([
- "u-border-bottom",
- "u-textarea--no-radius"
- ]));
- disabled && classes.push("u-textarea--disabled");
- return classes.join(" ");
- },
- // 组件的样式
- textareaStyle() {
- const style = {};
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
- methods: {
- // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
- setFormatter(e) {
- this.innerFormatter = e;
- },
- onFocus(e) {
- this.$emit("focus", e);
- },
- onBlur(e) {
- this.$emit("blur", e);
- uni.$u.formValidate(this, "blur");
- },
- onLinechange(e) {
- this.$emit("linechange", e);
- },
- onInput(e) {
- let { value: value2 = "" } = e.detail || {};
- const formatter = this.formatter || this.innerFormatter;
- const formatValue = formatter(value2);
- this.innerValue = value2;
- this.$nextTick(() => {
- this.innerValue = formatValue;
- this.valueChange();
- });
- },
- // 内容发生变化,进行处理
- valueChange() {
- const value2 = this.innerValue;
- this.$nextTick(() => {
- this.$emit("update:modelValue", value2);
- this.changeFromInner = true;
- this.$emit("change", value2);
- uni.$u.formValidate(this, "change");
- });
- },
- onConfirm(e) {
- this.$emit("confirm", e);
- },
- onKeyboardheightchange(e) {
- this.$emit("keyboardheightchange", e);
- }
- }
- };
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
- style: vue.normalizeStyle([$options.textareaStyle])
- },
- [
- vue.createElementVNode("textarea", {
- class: "u-textarea__field",
- value: $data.innerValue,
- style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
- placeholder: _ctx.placeholder,
- "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
- "placeholder-class": _ctx.placeholderClass,
- disabled: _ctx.disabled,
- focus: _ctx.focus,
- autoHeight: _ctx.autoHeight,
- fixed: _ctx.fixed,
- cursorSpacing: _ctx.cursorSpacing,
- cursor: _ctx.cursor,
- showConfirmBar: _ctx.showConfirmBar,
- selectionStart: _ctx.selectionStart,
- selectionEnd: _ctx.selectionEnd,
- adjustPosition: _ctx.adjustPosition,
- disableDefaultPadding: _ctx.disableDefaultPadding,
- holdKeyboard: _ctx.holdKeyboard,
- maxlength: _ctx.maxlength,
- "confirm-type": _ctx.confirmType,
- ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
- onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
- onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
- onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
- onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
- onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
- onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
- }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
- _ctx.count ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-textarea__count",
- style: vue.normalizeStyle({
- "background-color": _ctx.disabled ? "transparent" : "#fff"
- })
- },
- vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- 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"]]);
- const props = {
- props: {
- // 最小可选值
- min: {
- type: [Number, String],
- default: props$x.slider.min
- },
- // 最大可选值
- max: {
- type: [Number, String],
- default: props$x.slider.max
- },
- // 步长,取值必须大于 0,并且可被(max - min)整除
- step: {
- type: [Number, String],
- default: props$x.slider.step
- },
- // 当前取值
- value: {
- type: [Number, String],
- default: props$x.slider.value
- },
- // 滑块右侧已选择部分的背景色
- activeColor: {
- type: String,
- default: props$x.slider.activeColor
- },
- // 滑块左侧未选择部分的背景色
- inactiveColor: {
- type: String,
- default: props$x.slider.inactiveColor
- },
- // 滑块的大小,取值范围为 12 - 28
- blockSize: {
- type: [Number, String],
- default: props$x.slider.blockSize
- },
- // 滑块的颜色
- blockColor: {
- type: String,
- default: props$x.slider.blockColor
- },
- // 禁用状态
- disabled: {
- type: Boolean,
- default: props$x.slider.disabled
- },
- // 是否显示当前的选择值
- showValue: {
- type: Boolean,
- default: props$x.slider.showValue
- }
- }
- };
- const _sfc_main$b = {
- name: "u--slider",
- mixins: [mpMixin, mixin, props],
- methods: {
- // 拖动过程中触发
- changingHandler(e) {
- const {
- value: value2
- } = e.detail;
- this.$emit("input", value2);
- this.$emit("changing", value2);
- },
- // 滑动结束时触发
- changeHandler(e) {
- const {
- value: value2
- } = e.detail;
- this.$emit("input", value2);
- this.$emit("change", value2);
- }
- }
- };
- function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-slider",
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
- },
- [
- vue.createElementVNode("slider", {
- min: _ctx.min,
- max: _ctx.max,
- step: _ctx.step,
- value: _ctx.value,
- activeColor: _ctx.activeColor,
- inactiveColor: _ctx.inactiveColor,
- blockSize: _ctx.$u.getPx(_ctx.blockSize),
- blockColor: _ctx.blockColor,
- showValue: _ctx.showValue,
- disabled: _ctx.disabled,
- onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
- onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
- }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
- ],
- 4
- /* STYLE */
- );
- }
- 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"]]);
- const _sfc_main$a = {
- __name: "volume",
- setup(__props, { expose: __expose }) {
- __expose();
- let innerAudioContext = null;
- const settings = vue.reactive({
- voiceBroadcast: true,
- clickSound: true,
- startupPrompt: true,
- startupText: "书嗨,不辜负每一个爱书的人",
- speechRate: 10,
- pitch: 10
- });
- async function checkAndRequestPermissions() {
- try {
- const status = await requestPermissions();
- if (!status) {
- uni.showModal({
- title: "提示",
- content: "请在系统设置中允许应用访问麦克风等权限,以便使用语音功能",
- confirmText: "去设置",
- success: (res) => {
- if (res.confirm) {
- if (uni.getSystemInfoSync().platform === "android") {
- const main = plus.android.runtimeMainActivity();
- const Intent = plus.android.importClass("android.content.Intent");
- const Settings = plus.android.importClass("android.provider.Settings");
- const Uri = plus.android.importClass("android.net.Uri");
- const intent = new Intent();
- intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
- intent.setData(Uri.fromParts("package", main.getPackageName(), null));
- main.startActivity(intent);
- } else {
- const UIApplication = plus.ios.import("UIApplication");
- const NSURL = plus.ios.import("NSURL");
- const setting = NSURL.URLWithString("app-settings:");
- const application = UIApplication.sharedApplication();
- application.openURL(setting);
- }
- }
- }
- });
- return false;
- }
- return true;
- } catch (error2) {
- formatAppLog("error", "at pages/my/page/volume.vue:118", "权限请求失败:", error2);
- return false;
- }
- }
- function requestPermissions() {
- return new Promise((resolve, reject) => {
- plus.android.requestPermissions(
- [
- "android.permission.RECORD_AUDIO",
- "android.permission.MODIFY_AUDIO_SETTINGS",
- "android.permission.WRITE_EXTERNAL_STORAGE",
- "android.permission.READ_EXTERNAL_STORAGE"
- ],
- function(resultObj) {
- if (resultObj.granted.length === 4) {
- resolve(true);
- } else {
- resolve(false);
- }
- },
- function(error2) {
- reject(error2);
- }
- );
- resolve(true);
- });
- }
- async function initTTS() {
- const hasPermission = await checkAndRequestPermissions();
- if (!hasPermission) {
- return;
- }
- if (!uni.createInnerAudioContext) {
- uni.showToast({
- title: "当前设备不支持语音功能",
- icon: "none"
- });
- return;
- }
- try {
- innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.onError((res) => {
- formatAppLog("error", "at pages/my/page/volume.vue:192", "音频播放错误:", res.errMsg);
- uni.showToast({
- title: "语音播放失败",
- icon: "none"
- });
- });
- } catch (error2) {
- formatAppLog("error", "at pages/my/page/volume.vue:199", "TTS初始化失败:", error2);
- }
- }
- async function textToSpeech(text) {
- const hasPermission = await checkAndRequestPermissions();
- if (!hasPermission) {
- return;
- }
- if (!settings.voiceBroadcast)
- return;
- try {
- const ttsParams = {
- lang: "zh-CN",
- speed: settings.speechRate / 10,
- // 将 0-10 转换为 0-1
- pitch: settings.pitch / 10,
- // 将 0-10 转换为 0-1
- volume: 1,
- text
- };
- const TTSModule = requireNativePlugin("nrb-tts-plugin");
- TTSModule && TTSModule.init({
- "lang": "ZH",
- "country": "CN"
- }, (res) => {
- if (res.success == 0) {
- TTSModule.speak(text, ttsParams, (e) => {
- formatAppLog("log", "at pages/my/page/volume.vue:231", e, "dsadsads");
- });
- }
- });
- } catch (error2) {
- formatAppLog("error", "at pages/my/page/volume.vue:265", "TTS播放错误:", error2);
- uni.showToast({
- title: "语音播放失败",
- icon: "none"
- });
- }
- }
- function saveAndTest() {
- uni.setStorageSync("tts_settings", settings);
- textToSpeech(settings.startupText);
- uni.showToast({
- title: "设置已保存",
- icon: "success"
- });
- }
- function stopPlayback() {
- const TTSModule = requireNativePlugin("nrb-tts-plugin");
- if (TTSModule && TTSModule.stop) {
- TTSModule.stop();
- }
- uni.showToast({
- title: "已停止播放",
- icon: "none"
- });
- }
- function restartApp() {
- uni.showModal({
- title: "提示",
- content: "确定要重启应用吗?",
- success: function(res) {
- if (res.confirm) {
- plus.runtime.restart();
- }
- }
- });
- }
- function loadSettings() {
- try {
- const savedSettings = uni.getStorageSync("tts_settings");
- if (savedSettings) {
- Object.assign(settings, savedSettings);
- }
- } catch (error2) {
- formatAppLog("error", "at pages/my/page/volume.vue:343", "加载设置失败:", error2);
- }
- }
- function playClickSound() {
- if (!settings.clickSound)
- return;
- const audio = uni.createInnerAudioContext();
- audio.src = "/static/audio/click.mp3";
- audio.play();
- }
- vue.onMounted(async () => {
- await initTTS();
- loadSettings();
- });
- const __returned__ = { get innerAudioContext() {
- return innerAudioContext;
- }, set innerAudioContext(v) {
- innerAudioContext = v;
- }, settings, checkAndRequestPermissions, requestPermissions, initTTS, textToSpeech, saveAndTest, stopPlayback, restartApp, loadSettings, playClickSound, reactive: vue.reactive, onMounted: vue.onMounted };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
- const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
- const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
- const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3);
- const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
- vue.createCommentVNode(" 设置选项组 "),
- vue.createElementVNode("view", { class: "settings-section" }, [
- vue.createVNode(_component_u_cell_group, { border: false }, {
- default: vue.withCtx(() => [
- vue.createCommentVNode(" 语音播报设置 "),
- vue.createVNode(_component_u_cell, {
- title: "语音播报",
- label: "控制除app启动提示外所有语音播报的开关",
- "border-bottom": true
- }, {
- "right-icon": vue.withCtx(() => [
- vue.createVNode(_component_u_switch, {
- modelValue: $setup.settings.voiceBroadcast,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.voiceBroadcast = $event),
- activeColor: "#4cd964"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 点击音效设置 "),
- vue.createVNode(_component_u_cell, {
- title: "点击音效",
- "border-bottom": true
- }, {
- "right-icon": vue.withCtx(() => [
- vue.createVNode(_component_u_switch, {
- modelValue: $setup.settings.clickSound,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.clickSound = $event),
- activeColor: "#4cd964"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 启动提示语设置 "),
- vue.createVNode(_component_u_cell, {
- title: "启动提示语",
- "border-bottom": true
- }, {
- "right-icon": vue.withCtx(() => [
- vue.createVNode(_component_u_switch, {
- modelValue: $setup.settings.startupPrompt,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.startupPrompt = $event),
- activeColor: "#4cd964"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 启动提示语输入框 "),
- vue.createElementVNode("view", { class: "input-section" }, [
- vue.createVNode(_component_u_textarea, {
- modelValue: $setup.settings.startupText,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.startupText = $event),
- placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
- height: "100"
- }, null, 8, ["modelValue"])
- ]),
- vue.createCommentVNode(" 语速设置 "),
- vue.createElementVNode("view", { class: "slider-section" }, [
- vue.createElementVNode("view", { class: "slider-title" }, [
- vue.createElementVNode("text", null, "设置语速"),
- vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
- ]),
- vue.createVNode(_component_u_slider, {
- modelValue: $setup.settings.speechRate,
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.settings.speechRate = $event),
- min: 0,
- max: 10,
- step: 1,
- showValue: ""
- }, null, 8, ["modelValue"])
- ]),
- vue.createCommentVNode(" 音调设置 "),
- vue.createElementVNode("view", { class: "slider-section" }, [
- vue.createElementVNode("view", { class: "slider-title" }, [
- vue.createElementVNode("text", null, "设置音调"),
- vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
- ]),
- vue.createVNode(_component_u_slider, {
- modelValue: $setup.settings.pitch,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.settings.pitch = $event),
- min: 0,
- max: 10,
- step: 1,
- showValue: ""
- }, null, 8, ["modelValue"])
- ]),
- vue.createCommentVNode(" 操作按钮 "),
- vue.createElementVNode("view", { class: "button-group" }, [
- vue.createVNode(_component_u_button, {
- type: "primary",
- text: "保存设置并试听",
- onClick: $setup.saveAndTest
- }),
- vue.createVNode(_component_u_button, {
- type: "warning",
- text: "停止播放",
- onClick: $setup.stopPlayback,
- plain: true
- }),
- vue.createVNode(_component_u_button, {
- type: "error",
- text: "重启app",
- onClick: $setup.restartApp,
- plain: true
- })
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$9 = {
- __name: "book-display",
- setup(__props, { expose: __expose }) {
- __expose();
- const settings = vue.reactive({
- showRecyclePrice: false,
- showRecycleStatus: false,
- showInventoryInfo: false,
- expandProductDetails: false
- });
- function loadSettings() {
- try {
- const savedSettings = uni.getStorageSync("display_settings");
- if (savedSettings) {
- Object.assign(settings, JSON.parse(savedSettings));
- }
- } catch (error2) {
- formatAppLog("error", "at pages/my/page/book-display.vue:51", "加载设置失败:", error2);
- }
- }
- function saveSettings() {
- try {
- uni.setStorageSync("display_settings", JSON.stringify(settings));
- uni.showToast({
- title: "设置已保存",
- icon: "success"
- });
- } catch (error2) {
- formatAppLog("error", "at pages/my/page/book-display.vue:64", "保存设置失败:", error2);
- uni.showToast({
- title: "保存设置失败",
- icon: "error"
- });
- }
- }
- vue.onMounted(() => {
- loadSettings();
- });
- const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
- const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
- const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
- vue.createCommentVNode(" 设置列表 "),
- vue.createVNode(_component_u_cell_group, {
- border: false,
- class: "settings-group"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_cell, {
- title: "是否展示回收价",
- "border-bottom": true
- }, {
- "right-icon": vue.withCtx(() => [
- vue.createVNode(_component_u_switch, {
- modelValue: $setup.settings.showRecyclePrice,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
- activeColor: "#4cd964"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_cell, {
- title: "是否展示回收状态",
- "border-bottom": true
- }, {
- "right-icon": vue.withCtx(() => [
- vue.createVNode(_component_u_switch, {
- modelValue: $setup.settings.showRecycleStatus,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
- activeColor: "#4cd964"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_cell, {
- title: "是否展示库存信息",
- "border-bottom": true
- }, {
- "right-icon": vue.withCtx(() => [
- vue.createVNode(_component_u_switch, {
- modelValue: $setup.settings.showInventoryInfo,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showInventoryInfo = $event),
- activeColor: "#4cd964"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_cell, {
- title: "是否默认展开商品详情",
- "border-bottom": false
- }, {
- "right-icon": vue.withCtx(() => [
- vue.createVNode(_component_u_switch, {
- modelValue: $setup.settings.expandProductDetails,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.expandProductDetails = $event),
- activeColor: "#4cd964"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- })
- ]);
- }
- 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"]]);
- const _sfc_main$8 = {
- __name: "password",
- setup(__props, { expose: __expose }) {
- __expose();
- const formRef = vue.ref(null);
- const loading = vue.ref(false);
- const showPassword = vue.reactive({
- old: false,
- new: false,
- confirm: false
- });
- const formData = vue.reactive({
- oldPassword: "",
- newPassword: "",
- confirmPassword: ""
- });
- const rules2 = {
- oldPassword: [{
- required: true,
- message: "请输入原密码",
- trigger: ["blur", "change"]
- }, {
- min: 6,
- message: "密码长度不能小于6位",
- trigger: ["blur", "change"]
- }],
- newPassword: [{
- required: true,
- message: "请输入新密码",
- trigger: ["blur", "change"]
- }, {
- min: 6,
- message: "密码长度不能小于6位",
- trigger: ["blur", "change"]
- }, {
- validator: (rule, value2, callback) => {
- if (value2 === formData.oldPassword) {
- callback(new Error("新密码不能与原密码相同"));
- } else {
- callback();
- }
- },
- trigger: ["blur", "change"]
- }],
- confirmPassword: [{
- required: true,
- message: "请再次输入新密码",
- trigger: ["blur", "change"]
- }, {
- validator: (rule, value2, callback) => {
- if (value2 !== formData.newPassword) {
- callback(new Error("两次输入的密码不一致"));
- } else {
- callback();
- }
- },
- trigger: ["blur", "change"]
- }]
- };
- function togglePasswordVisible(field) {
- showPassword[field] = !showPassword[field];
- }
- function submitForm() {
- if (!formRef.value)
- return;
- formRef.value.validate((valid) => {
- if (valid) {
- loading.value = true;
- setTimeout(() => {
- uni.showToast({
- title: "密码修改成功",
- icon: "success"
- });
- loading.value = false;
- resetForm();
- }, 1500);
- }
- });
- }
- function resetForm() {
- if (!formRef.value)
- return;
- formRef.value.resetFields();
- }
- const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, togglePasswordVisible, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_1$6);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_2$4);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_3$3);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_4$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
- vue.createVNode(_component_u_form, {
- model: $setup.formData,
- rules: $setup.rules,
- ref: "formRef",
- labelPosition: "top",
- borderBottom: true,
- labelWidth: "300px"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_form_item, {
- label: "原密码",
- prop: "oldPassword",
- borderBottom: ""
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.formData.oldPassword,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.oldPassword = $event),
- type: "password",
- placeholder: "请输入原密码",
- password: !$setup.showPassword.old,
- border: false
- }, {
- suffix: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: $setup.showPassword.old ? "eye-fill" : "eye-off",
- size: "20",
- color: "#909399",
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.togglePasswordVisible("old"))
- }, null, 8, ["name"])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue", "password"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- label: "新密码",
- prop: "newPassword",
- borderBottom: ""
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.formData.newPassword,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.formData.newPassword = $event),
- type: "password",
- placeholder: "请输入新密码",
- password: !$setup.showPassword.new,
- border: false
- }, {
- suffix: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: $setup.showPassword.new ? "eye-fill" : "eye-off",
- size: "20",
- color: "#909399",
- onClick: _cache[2] || (_cache[2] = ($event) => $setup.togglePasswordVisible("new"))
- }, null, 8, ["name"])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue", "password"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- label: "确认新密码",
- prop: "confirmPassword",
- borderBottom: ""
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.formData.confirmPassword,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.formData.confirmPassword = $event),
- type: "password",
- placeholder: "请再次输入新密码",
- password: !$setup.showPassword.confirm,
- border: false
- }, {
- suffix: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: $setup.showPassword.confirm ? "eye-fill" : "eye-off",
- size: "20",
- color: "#909399",
- onClick: _cache[4] || (_cache[4] = ($event) => $setup.togglePasswordVisible("confirm"))
- }, null, 8, ["name"])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue", "password"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["model"]),
- vue.createElementVNode("view", { class: "submit-btn" }, [
- vue.createVNode(_component_u_button, {
- type: "primary",
- text: "修改密码",
- onClick: $setup.submitForm,
- loading: $setup.loading
- }, null, 8, ["loading"])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$7 = {};
- function _sfc_render$6(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view");
- }
- const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-review.vue"]]);
- const _sfc_main$6 = {};
- function _sfc_render$5(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view");
- }
- const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-pick.vue"]]);
- const _sfc_main$5 = {};
- function _sfc_render$4(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view");
- }
- const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-sign.vue"]]);
- const _sfc_main$4 = {};
- function _sfc_render$3(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view");
- }
- const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-confirm.vue"]]);
- const _sfc_main$3 = {};
- function _sfc_render$2(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view");
- }
- const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-audit.vue"]]);
- const _sfc_main$2 = {};
- function _sfc_render$1(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view");
- }
- const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-payment.vue"]]);
- const _sfc_main$1 = {};
- function _sfc_render(_ctx, _cache) {
- return vue.openBlock(), vue.createElementBlock("view");
- }
- const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/receive-stat.vue"]]);
- __definePage("pages/index/index", PagesIndexIndex);
- __definePage("pages/my/my", PagesMyMy);
- __definePage("pages/order/index", PagesOrderIndex);
- __definePage("pages/book/index", PagesBookIndex);
- __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
- __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
- __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
- __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
- __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
- __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
- __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
- __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
- __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
- __definePage("pages/index/audit/sender", PagesIndexAuditSender);
- __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
- __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
- __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
- __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
- __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
- __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
- __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
- __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
- __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
- __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
- __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
- __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
- __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
- __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
- __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
- __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
- __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
- __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
- __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
- __definePage("pages/my/page/school", PagesMyPageSchool);
- __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
- __definePage("pages/my/page/version", PagesMyPageVersion);
- __definePage("pages/my/page/volume", PagesMyPageVolume);
- __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
- __definePage("pages/my/page/password", PagesMyPagePassword);
- __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
- __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
- __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
- __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
- __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
- __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
- __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
- const _sfc_main = {
- __name: "App",
- setup(__props, { expose: __expose }) {
- __expose();
- onLaunch(() => {
- formatAppLog("log", "at App.vue:7", "App Launch");
- if (!store.token) {
- let token = uni.getStorageSync("token");
- if (token) {
- store.setToken(token);
- let userStr = uni.getStorageSync("userInfo");
- if (userStr) {
- let userInfo = JSON.parse(userStr);
- if (userInfo.userId) {
- store.setUserInfo(userInfo);
- }
- }
- }
- }
- });
- onShow(() => {
- formatAppLog("log", "at App.vue:24", "App Show");
- });
- onHide(() => {
- formatAppLog("log", "at App.vue:27", "App Hide");
- });
- const __returned__ = { get onLaunch() {
- return onLaunch;
- }, get onShow() {
- return onShow;
- }, get onHide() {
- return onHide;
- }, get store() {
- return store;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/书嗨项目/shuhi-app-fornt/App.vue"]]);
- const { toString } = Object.prototype;
- function isArray(val) {
- return toString.call(val) === "[object Array]";
- }
- function isObject(val) {
- return val !== null && typeof val === "object";
- }
- function isDate(val) {
- return toString.call(val) === "[object Date]";
- }
- function isURLSearchParams(val) {
- return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
- }
- function forEach(obj, fn) {
- if (obj === null || typeof obj === "undefined") {
- return;
- }
- if (typeof obj !== "object") {
- obj = [obj];
- }
- if (isArray(obj)) {
- for (let i = 0, l = obj.length; i < l; i++) {
- fn.call(null, obj[i], i, obj);
- }
- } else {
- for (const key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- fn.call(null, obj[key], key, obj);
- }
- }
- }
- }
- function isPlainObject(obj) {
- return Object.prototype.toString.call(obj) === "[object Object]";
- }
- function deepMerge$1() {
- const result = {};
- function assignValue(val, key) {
- if (typeof result[key] === "object" && typeof val === "object") {
- result[key] = deepMerge$1(result[key], val);
- } else if (typeof val === "object") {
- result[key] = deepMerge$1({}, val);
- } else {
- result[key] = val;
- }
- }
- for (let i = 0, l = arguments.length; i < l; i++) {
- forEach(arguments[i], assignValue);
- }
- return result;
- }
- function isUndefined(val) {
- return typeof val === "undefined";
- }
- function encode(val) {
- return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
- }
- function buildURL(url2, params) {
- if (!params) {
- return url2;
- }
- let serializedParams;
- if (isURLSearchParams(params)) {
- serializedParams = params.toString();
- } else {
- const parts = [];
- forEach(params, (val, key) => {
- if (val === null || typeof val === "undefined") {
- return;
- }
- if (isArray(val)) {
- key = `${key}[]`;
- } else {
- val = [val];
- }
- forEach(val, (v) => {
- if (isDate(v)) {
- v = v.toISOString();
- } else if (isObject(v)) {
- v = JSON.stringify(v);
- }
- parts.push(`${encode(key)}=${encode(v)}`);
- });
- });
- serializedParams = parts.join("&");
- }
- if (serializedParams) {
- const hashmarkIndex = url2.indexOf("#");
- if (hashmarkIndex !== -1) {
- url2 = url2.slice(0, hashmarkIndex);
- }
- url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
- }
- return url2;
- }
- function isAbsoluteURL(url2) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
- }
- function combineURLs(baseURL, relativeURL) {
- return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
- }
- function buildFullPath(baseURL, requestedURL) {
- if (baseURL && !isAbsoluteURL(requestedURL)) {
- return combineURLs(baseURL, requestedURL);
- }
- return requestedURL;
- }
- function settle(resolve, reject, response) {
- const { validateStatus } = response.config;
- const status = response.statusCode;
- if (status && (!validateStatus || validateStatus(status))) {
- resolve(response);
- } else {
- reject(response);
- }
- }
- const mergeKeys$1 = (keys, config2) => {
- const config3 = {};
- keys.forEach((prop) => {
- if (!isUndefined(config2[prop])) {
- config3[prop] = config2[prop];
- }
- });
- return config3;
- };
- const adapter = (config2) => new Promise((resolve, reject) => {
- const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
- const _config = {
- url: fullPath,
- header: config2.header,
- complete: (response) => {
- config2.fullPath = fullPath;
- response.config = config2;
- try {
- if (typeof response.data === "string") {
- response.data = JSON.parse(response.data);
- }
- } catch (e) {
- }
- settle(resolve, reject, response);
- }
- };
- let requestTask;
- if (config2.method === "UPLOAD") {
- delete _config.header["content-type"];
- delete _config.header["Content-Type"];
- const otherConfig = {
- filePath: config2.filePath,
- name: config2.name
- };
- const optionalKeys = [
- "files",
- "timeout",
- "formData"
- ];
- requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
- } else if (config2.method === "DOWNLOAD") {
- if (!isUndefined(config2.timeout)) {
- _config.timeout = config2.timeout;
- }
- requestTask = uni.downloadFile(_config);
- } else {
- const optionalKeys = [
- "data",
- "method",
- "timeout",
- "dataType",
- "responseType",
- "sslVerify",
- "firstIpv4"
- ];
- requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
- }
- if (config2.getTask) {
- config2.getTask(requestTask, config2);
- }
- });
- const dispatchRequest = (config2) => adapter(config2);
- function InterceptorManager() {
- this.handlers = [];
- }
- InterceptorManager.prototype.use = function use(fulfilled, rejected) {
- this.handlers.push({
- fulfilled,
- rejected
- });
- return this.handlers.length - 1;
- };
- InterceptorManager.prototype.eject = function eject(id) {
- if (this.handlers[id]) {
- this.handlers[id] = null;
- }
- };
- InterceptorManager.prototype.forEach = function forEach2(fn) {
- this.handlers.forEach((h) => {
- if (h !== null) {
- fn(h);
- }
- });
- };
- const mergeKeys = (keys, globalsConfig, config2) => {
- const config3 = {};
- keys.forEach((prop) => {
- if (!isUndefined(config2[prop])) {
- config3[prop] = config2[prop];
- } else if (!isUndefined(globalsConfig[prop])) {
- config3[prop] = globalsConfig[prop];
- }
- });
- return config3;
- };
- const mergeConfig = (globalsConfig, config2 = {}) => {
- const method = config2.method || globalsConfig.method || "GET";
- let config3 = {
- baseURL: globalsConfig.baseURL || "",
- method,
- url: config2.url || "",
- params: config2.params || {},
- custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
- header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
- };
- const defaultToConfig2Keys = ["getTask", "validateStatus"];
- config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
- if (method === "DOWNLOAD") {
- if (!isUndefined(config2.timeout)) {
- config3.timeout = config2.timeout;
- } else if (!isUndefined(globalsConfig.timeout)) {
- config3.timeout = globalsConfig.timeout;
- }
- } else if (method === "UPLOAD") {
- delete config3.header["content-type"];
- delete config3.header["Content-Type"];
- const uploadKeys = [
- "files",
- "filePath",
- "name",
- "timeout",
- "formData"
- ];
- uploadKeys.forEach((prop) => {
- if (!isUndefined(config2[prop])) {
- config3[prop] = config2[prop];
- }
- });
- if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
- config3.timeout = globalsConfig.timeout;
- }
- } else {
- const defaultsKeys = [
- "data",
- "timeout",
- "dataType",
- "responseType",
- "sslVerify",
- "firstIpv4"
- ];
- config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
- }
- return config3;
- };
- const defaults = {
- baseURL: "",
- header: {},
- method: "GET",
- dataType: "json",
- responseType: "text",
- custom: {},
- timeout: 6e4,
- sslVerify: true,
- firstIpv4: false,
- validateStatus: function validateStatus(status) {
- return status >= 200 && status < 300;
- }
- };
- var clone = function() {
- function _instanceof(obj, type2) {
- return type2 != null && obj instanceof type2;
- }
- var nativeMap;
- try {
- nativeMap = Map;
- } catch (_) {
- nativeMap = function() {
- };
- }
- var nativeSet;
- try {
- nativeSet = Set;
- } catch (_) {
- nativeSet = function() {
- };
- }
- var nativePromise;
- try {
- nativePromise = Promise;
- } catch (_) {
- nativePromise = function() {
- };
- }
- function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
- if (typeof circular === "object") {
- depth = circular.depth;
- prototype = circular.prototype;
- includeNonEnumerable = circular.includeNonEnumerable;
- circular = circular.circular;
- }
- var allParents = [];
- var allChildren = [];
- var useBuffer = typeof Buffer != "undefined";
- if (typeof circular == "undefined")
- circular = true;
- if (typeof depth == "undefined")
- depth = Infinity;
- function _clone(parent2, depth2) {
- if (parent2 === null)
- return null;
- if (depth2 === 0)
- return parent2;
- var child;
- var proto;
- if (typeof parent2 != "object") {
- return parent2;
- }
- if (_instanceof(parent2, nativeMap)) {
- child = new nativeMap();
- } else if (_instanceof(parent2, nativeSet)) {
- child = new nativeSet();
- } else if (_instanceof(parent2, nativePromise)) {
- child = new nativePromise(function(resolve, reject) {
- parent2.then(function(value2) {
- resolve(_clone(value2, depth2 - 1));
- }, function(err) {
- reject(_clone(err, depth2 - 1));
- });
- });
- } else if (clone2.__isArray(parent2)) {
- child = [];
- } else if (clone2.__isRegExp(parent2)) {
- child = new RegExp(parent2.source, __getRegExpFlags(parent2));
- if (parent2.lastIndex)
- child.lastIndex = parent2.lastIndex;
- } else if (clone2.__isDate(parent2)) {
- child = new Date(parent2.getTime());
- } else if (useBuffer && Buffer.isBuffer(parent2)) {
- if (Buffer.from) {
- child = Buffer.from(parent2);
- } else {
- child = new Buffer(parent2.length);
- parent2.copy(child);
- }
- return child;
- } else if (_instanceof(parent2, Error)) {
- child = Object.create(parent2);
- } else {
- if (typeof prototype == "undefined") {
- proto = Object.getPrototypeOf(parent2);
- child = Object.create(proto);
- } else {
- child = Object.create(prototype);
- proto = prototype;
- }
- }
- if (circular) {
- var index2 = allParents.indexOf(parent2);
- if (index2 != -1) {
- return allChildren[index2];
- }
- allParents.push(parent2);
- allChildren.push(child);
- }
- if (_instanceof(parent2, nativeMap)) {
- parent2.forEach(function(value2, key) {
- var keyChild = _clone(key, depth2 - 1);
- var valueChild = _clone(value2, depth2 - 1);
- child.set(keyChild, valueChild);
- });
- }
- if (_instanceof(parent2, nativeSet)) {
- parent2.forEach(function(value2) {
- var entryChild = _clone(value2, depth2 - 1);
- child.add(entryChild);
- });
- }
- for (var i in parent2) {
- var attrs = Object.getOwnPropertyDescriptor(parent2, i);
- if (attrs) {
- child[i] = _clone(parent2[i], depth2 - 1);
- }
- try {
- var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
- if (objProperty.set === "undefined") {
- continue;
- }
- child[i] = _clone(parent2[i], depth2 - 1);
- } catch (e) {
- if (e instanceof TypeError) {
- continue;
- } else if (e instanceof ReferenceError) {
- continue;
- }
- }
- }
- if (Object.getOwnPropertySymbols) {
- var symbols = Object.getOwnPropertySymbols(parent2);
- for (var i = 0; i < symbols.length; i++) {
- var symbol = symbols[i];
- var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
- if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
- continue;
- }
- child[symbol] = _clone(parent2[symbol], depth2 - 1);
- Object.defineProperty(child, symbol, descriptor);
- }
- }
- if (includeNonEnumerable) {
- var allPropertyNames = Object.getOwnPropertyNames(parent2);
- for (var i = 0; i < allPropertyNames.length; i++) {
- var propertyName = allPropertyNames[i];
- var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
- if (descriptor && descriptor.enumerable) {
- continue;
- }
- child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
- Object.defineProperty(child, propertyName, descriptor);
- }
- }
- return child;
- }
- return _clone(parent, depth);
- }
- clone2.clonePrototype = function clonePrototype(parent) {
- if (parent === null)
- return null;
- var c = function() {
- };
- c.prototype = parent;
- return new c();
- };
- function __objToStr(o) {
- return Object.prototype.toString.call(o);
- }
- clone2.__objToStr = __objToStr;
- function __isDate(o) {
- return typeof o === "object" && __objToStr(o) === "[object Date]";
- }
- clone2.__isDate = __isDate;
- function __isArray(o) {
- return typeof o === "object" && __objToStr(o) === "[object Array]";
- }
- clone2.__isArray = __isArray;
- function __isRegExp(o) {
- return typeof o === "object" && __objToStr(o) === "[object RegExp]";
- }
- clone2.__isRegExp = __isRegExp;
- function __getRegExpFlags(re) {
- var flags = "";
- if (re.global)
- flags += "g";
- if (re.ignoreCase)
- flags += "i";
- if (re.multiline)
- flags += "m";
- return flags;
- }
- clone2.__getRegExpFlags = __getRegExpFlags;
- return clone2;
- }();
- class Request {
- /**
- * @param {Object} arg - 全局配置
- * @param {String} arg.baseURL - 全局根路径
- * @param {Object} arg.header - 全局header
- * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
- * @param {String} arg.dataType = [json] - 全局默认的dataType
- * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
- * @param {Object} arg.custom - 全局默认的自定义参数
- * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
- * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
- * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
- * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
- * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
- */
- constructor(arg = {}) {
- if (!isPlainObject(arg)) {
- arg = {};
- formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
- }
- this.config = clone({ ...defaults, ...arg });
- this.interceptors = {
- request: new InterceptorManager(),
- response: new InterceptorManager()
- };
- }
- /**
- * @Function
- * @param {Request~setConfigCallback} f - 设置全局默认配置
- */
- setConfig(f) {
- this.config = f(this.config);
- }
- middleware(config2) {
- config2 = mergeConfig(this.config, config2);
- const chain = [dispatchRequest, void 0];
- let promise2 = Promise.resolve(config2);
- this.interceptors.request.forEach((interceptor) => {
- chain.unshift(interceptor.fulfilled, interceptor.rejected);
- });
- this.interceptors.response.forEach((interceptor) => {
- chain.push(interceptor.fulfilled, interceptor.rejected);
- });
- while (chain.length) {
- promise2 = promise2.then(chain.shift(), chain.shift());
- }
- return promise2;
- }
- /**
- * @Function
- * @param {Object} config - 请求配置项
- * @prop {String} options.url - 请求路径
- * @prop {Object} options.data - 请求参数
- * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
- * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
- * @prop {Object} [options.header = config.header] - 请求header
- * @prop {Object} [options.method = config.method] - 请求方法
- * @returns {Promise<unknown>}
- */
- request(config2 = {}) {
- return this.middleware(config2);
- }
- get(url2, options = {}) {
- return this.middleware({
- url: url2,
- method: "GET",
- ...options
- });
- }
- post(url2, data, options = {}) {
- return this.middleware({
- url: url2,
- data,
- method: "POST",
- ...options
- });
- }
- put(url2, data, options = {}) {
- return this.middleware({
- url: url2,
- data,
- method: "PUT",
- ...options
- });
- }
- delete(url2, data, options = {}) {
- return this.middleware({
- url: url2,
- data,
- method: "DELETE",
- ...options
- });
- }
- options(url2, data, options = {}) {
- return this.middleware({
- url: url2,
- data,
- method: "OPTIONS",
- ...options
- });
- }
- upload(url2, config2 = {}) {
- config2.url = url2;
- config2.method = "UPLOAD";
- return this.middleware(config2);
- }
- download(url2, config2 = {}) {
- config2.url = url2;
- config2.method = "DOWNLOAD";
- return this.middleware(config2);
- }
- }
- class Router {
- constructor() {
- this.config = {
- type: "navigateTo",
- url: "",
- delta: 1,
- // navigateBack页面后退时,回退的层数
- params: {},
- // 传递的参数
- animationType: "pop-in",
- // 窗口动画,只在APP有效
- animationDuration: 300,
- // 窗口动画持续时间,单位毫秒,只在APP有效
- intercept: false
- // 是否需要拦截
- };
- this.route = this.route.bind(this);
- }
- // 判断url前面是否有"/",如果没有则加上,否则无法跳转
- addRootPath(url2) {
- return url2[0] === "/" ? url2 : `/${url2}`;
- }
- // 整合路由参数
- mixinParam(url2, params) {
- url2 = url2 && this.addRootPath(url2);
- let query = "";
- if (/.*\/.*\?.*=.*/.test(url2)) {
- query = uni.$u.queryParams(params, false);
- return url2 += `&${query}`;
- }
- query = uni.$u.queryParams(params);
- return url2 += query;
- }
- // 对外的方法名称
- async route(options = {}, params = {}) {
- let mergeConfig2 = {};
- if (typeof options === "string") {
- mergeConfig2.url = this.mixinParam(options, params);
- mergeConfig2.type = "navigateTo";
- } else {
- mergeConfig2 = uni.$u.deepMerge(this.config, options);
- mergeConfig2.url = this.mixinParam(options.url, options.params);
- }
- if (mergeConfig2.url === uni.$u.page())
- return;
- if (params.intercept) {
- this.config.intercept = params.intercept;
- }
- mergeConfig2.params = params;
- mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
- if (typeof uni.$u.routeIntercept === "function") {
- const isNext = await new Promise((resolve, reject) => {
- uni.$u.routeIntercept(mergeConfig2, resolve);
- });
- isNext && this.openPage(mergeConfig2);
- } else {
- this.openPage(mergeConfig2);
- }
- }
- // 执行路由跳转
- openPage(config2) {
- const {
- url: url2,
- type: type2,
- delta,
- animationType,
- animationDuration
- } = config2;
- if (config2.type == "navigateTo" || config2.type == "to") {
- uni.navigateTo({
- url: url2,
- animationType,
- animationDuration
- });
- }
- if (config2.type == "redirectTo" || config2.type == "redirect") {
- uni.redirectTo({
- url: url2
- });
- }
- if (config2.type == "switchTab" || config2.type == "tab") {
- uni.switchTab({
- url: url2
- });
- }
- if (config2.type == "reLaunch" || config2.type == "launch") {
- uni.reLaunch({
- url: url2
- });
- }
- if (config2.type == "navigateBack" || config2.type == "back") {
- uni.navigateBack({
- delta
- });
- }
- }
- }
- const route = new Router().route;
- function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
- const startRGB = hexToRgb(startColor, false);
- const startR = startRGB[0];
- const startG = startRGB[1];
- const startB = startRGB[2];
- const endRGB = hexToRgb(endColor, false);
- const endR = endRGB[0];
- const endG = endRGB[1];
- const endB = endRGB[2];
- const sR = (endR - startR) / step;
- const sG = (endG - startG) / step;
- const sB = (endB - startB) / step;
- const colorArr = [];
- for (let i = 0; i < step; i++) {
- let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
- if (i === 0)
- hex = rgbToHex(startColor);
- if (i === step - 1)
- hex = rgbToHex(endColor);
- colorArr.push(hex);
- }
- return colorArr;
- }
- function hexToRgb(sColor, str = true) {
- const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
- sColor = String(sColor).toLowerCase();
- if (sColor && reg.test(sColor)) {
- if (sColor.length === 4) {
- let sColorNew = "#";
- for (let i = 1; i < 4; i += 1) {
- sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
- }
- sColor = sColorNew;
- }
- const sColorChange = [];
- for (let i = 1; i < 7; i += 2) {
- sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
- }
- if (!str) {
- return sColorChange;
- }
- return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
- }
- if (/^(rgb|RGB)/.test(sColor)) {
- const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
- return arr.map((val) => Number(val));
- }
- return sColor;
- }
- function rgbToHex(rgb) {
- const _this = rgb;
- const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
- if (/^(rgb|RGB)/.test(_this)) {
- const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
- let strHex = "#";
- for (let i = 0; i < aColor.length; i++) {
- let hex = Number(aColor[i]).toString(16);
- hex = String(hex).length == 1 ? `${0}${hex}` : hex;
- if (hex === "0") {
- hex += hex;
- }
- strHex += hex;
- }
- if (strHex.length !== 7) {
- strHex = _this;
- }
- return strHex;
- }
- if (reg.test(_this)) {
- const aNum = _this.replace(/#/, "").split("");
- if (aNum.length === 6) {
- return _this;
- }
- if (aNum.length === 3) {
- let numHex = "#";
- for (let i = 0; i < aNum.length; i += 1) {
- numHex += aNum[i] + aNum[i];
- }
- return numHex;
- }
- } else {
- return _this;
- }
- }
- function colorToRgba(color2, alpha) {
- color2 = rgbToHex(color2);
- const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
- let sColor = String(color2).toLowerCase();
- if (sColor && reg.test(sColor)) {
- if (sColor.length === 4) {
- let sColorNew = "#";
- for (let i = 1; i < 4; i += 1) {
- sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
- }
- sColor = sColorNew;
- }
- const sColorChange = [];
- for (let i = 1; i < 7; i += 2) {
- sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
- }
- return `rgba(${sColorChange.join(",")},${alpha})`;
- }
- return sColor;
- }
- const colorGradient$1 = {
- colorGradient,
- hexToRgb,
- rgbToHex,
- colorToRgba
- };
- function email(value2) {
- return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
- }
- function mobile(value2) {
- return /^1[23456789]\d{9}$/.test(value2);
- }
- function url(value2) {
- 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);
- }
- function date(value2) {
- if (!value2)
- return false;
- if (number(value2))
- value2 = +value2;
- return !/Invalid|NaN/.test(new Date(value2).toString());
- }
- function dateISO(value2) {
- return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
- }
- function number(value2) {
- return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
- }
- function string(value2) {
- return typeof value2 === "string";
- }
- function digits(value2) {
- return /^\d+$/.test(value2);
- }
- function idCard(value2) {
- 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(
- value2
- );
- }
- function carNo(value2) {
- const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
- const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
- if (value2.length === 7) {
- return creg.test(value2);
- }
- if (value2.length === 8) {
- return xreg.test(value2);
- }
- return false;
- }
- function amount(value2) {
- return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
- }
- function chinese(value2) {
- const reg = /^[\u4e00-\u9fa5]+$/gi;
- return reg.test(value2);
- }
- function letter(value2) {
- return /^[a-zA-Z]*$/.test(value2);
- }
- function enOrNum(value2) {
- const reg = /^[0-9a-zA-Z]*$/g;
- return reg.test(value2);
- }
- function contains(value2, param) {
- return value2.indexOf(param) >= 0;
- }
- function range$1(value2, param) {
- return value2 >= param[0] && value2 <= param[1];
- }
- function rangeLength(value2, param) {
- return value2.length >= param[0] && value2.length <= param[1];
- }
- function landline(value2) {
- const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
- return reg.test(value2);
- }
- function empty(value2) {
- switch (typeof value2) {
- case "undefined":
- return true;
- case "string":
- if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
- return true;
- break;
- case "boolean":
- if (!value2)
- return true;
- break;
- case "number":
- if (value2 === 0 || isNaN(value2))
- return true;
- break;
- case "object":
- if (value2 === null || value2.length === 0)
- return true;
- for (const i in value2) {
- return false;
- }
- return true;
- }
- return false;
- }
- function jsonString(value2) {
- if (typeof value2 === "string") {
- try {
- const obj = JSON.parse(value2);
- if (typeof obj === "object" && obj) {
- return true;
- }
- return false;
- } catch (e) {
- return false;
- }
- }
- return false;
- }
- function array(value2) {
- if (typeof Array.isArray === "function") {
- return Array.isArray(value2);
- }
- return Object.prototype.toString.call(value2) === "[object Array]";
- }
- function object(value2) {
- return Object.prototype.toString.call(value2) === "[object Object]";
- }
- function code(value2, len = 6) {
- return new RegExp(`^\\d{${len}}$`).test(value2);
- }
- function func(value2) {
- return typeof value2 === "function";
- }
- function promise(value2) {
- return object(value2) && func(value2.then) && func(value2.catch);
- }
- function image(value2) {
- const newValue = value2.split("?")[0];
- const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
- return IMAGE_REGEXP.test(newValue);
- }
- function video(value2) {
- const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
- return VIDEO_REGEXP.test(value2);
- }
- function regExp(o) {
- return o && Object.prototype.toString.call(o) === "[object RegExp]";
- }
- const test = {
- email,
- mobile,
- url,
- date,
- dateISO,
- number,
- digits,
- idCard,
- carNo,
- amount,
- chinese,
- letter,
- enOrNum,
- contains,
- range: range$1,
- rangeLength,
- empty,
- isEmpty: empty,
- jsonString,
- landline,
- object,
- array,
- code,
- func,
- promise,
- video,
- image,
- regExp,
- string
- };
- let timeout = null;
- function debounce(func2, wait = 500, immediate = false) {
- if (timeout !== null)
- clearTimeout(timeout);
- if (immediate) {
- const callNow = !timeout;
- timeout = setTimeout(() => {
- timeout = null;
- }, wait);
- if (callNow)
- typeof func2 === "function" && func2();
- } else {
- timeout = setTimeout(() => {
- typeof func2 === "function" && func2();
- }, wait);
- }
- }
- let flag;
- function throttle(func2, wait = 500, immediate = true) {
- if (immediate) {
- if (!flag) {
- flag = true;
- typeof func2 === "function" && func2();
- setTimeout(() => {
- flag = false;
- }, wait);
- }
- } else if (!flag) {
- flag = true;
- setTimeout(() => {
- flag = false;
- typeof func2 === "function" && func2();
- }, wait);
- }
- }
- function strip(num, precision = 15) {
- return +parseFloat(Number(num).toPrecision(precision));
- }
- function digitLength(num) {
- const eSplit = num.toString().split(/[eE]/);
- const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
- return len > 0 ? len : 0;
- }
- function float2Fixed(num) {
- if (num.toString().indexOf("e") === -1) {
- return Number(num.toString().replace(".", ""));
- }
- const dLen = digitLength(num);
- return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
- }
- function checkBoundary(num) {
- {
- if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
- formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
- }
- }
- }
- function iteratorOperation(arr, operation) {
- const [num1, num2, ...others] = arr;
- let res = operation(num1, num2);
- others.forEach((num) => {
- res = operation(res, num);
- });
- return res;
- }
- function times(...nums) {
- if (nums.length > 2) {
- return iteratorOperation(nums, times);
- }
- const [num1, num2] = nums;
- const num1Changed = float2Fixed(num1);
- const num2Changed = float2Fixed(num2);
- const baseNum = digitLength(num1) + digitLength(num2);
- const leftValue = num1Changed * num2Changed;
- checkBoundary(leftValue);
- return leftValue / Math.pow(10, baseNum);
- }
- function divide(...nums) {
- if (nums.length > 2) {
- return iteratorOperation(nums, divide);
- }
- const [num1, num2] = nums;
- const num1Changed = float2Fixed(num1);
- const num2Changed = float2Fixed(num2);
- checkBoundary(num1Changed);
- checkBoundary(num2Changed);
- return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
- }
- function round(num, ratio) {
- const base = Math.pow(10, ratio);
- let result = divide(Math.round(Math.abs(times(num, base))), base);
- if (num < 0 && result !== 0) {
- result = times(result, -1);
- }
- return result;
- }
- function range(min = 0, max = 0, value2 = 0) {
- return Math.max(min, Math.min(max, Number(value2)));
- }
- function getPx(value2, unit = false) {
- if (test.number(value2)) {
- return unit ? `${value2}px` : Number(value2);
- }
- if (/(rpx|upx)$/.test(value2)) {
- return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
- }
- return unit ? `${parseInt(value2)}px` : parseInt(value2);
- }
- function sleep(value2 = 30) {
- return new Promise((resolve) => {
- setTimeout(() => {
- resolve();
- }, value2);
- });
- }
- function os() {
- return uni.getSystemInfoSync().platform.toLowerCase();
- }
- function sys() {
- return uni.getSystemInfoSync();
- }
- function random(min, max) {
- if (min >= 0 && max > 0 && max >= min) {
- const gab = max - min + 1;
- return Math.floor(Math.random() * gab + min);
- }
- return 0;
- }
- function guid(len = 32, firstU = true, radix = null) {
- const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
- const uuid = [];
- radix = radix || chars.length;
- if (len) {
- for (let i = 0; i < len; i++)
- uuid[i] = chars[0 | Math.random() * radix];
- } else {
- let r;
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
- uuid[14] = "4";
- for (let i = 0; i < 36; i++) {
- if (!uuid[i]) {
- r = 0 | Math.random() * 16;
- uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
- }
- }
- }
- if (firstU) {
- uuid.shift();
- return `u${uuid.join("")}`;
- }
- return uuid.join("");
- }
- function $parent(name = void 0) {
- let parent = this.$parent;
- while (parent) {
- if (parent.$options && parent.$options.name !== name) {
- parent = parent.$parent;
- } else {
- return parent;
- }
- }
- return false;
- }
- function addStyle(customStyle, target = "object") {
- if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
- return customStyle;
- }
- if (target === "object") {
- customStyle = trim(customStyle);
- const styleArray = customStyle.split(";");
- const style = {};
- for (let i = 0; i < styleArray.length; i++) {
- if (styleArray[i]) {
- const item = styleArray[i].split(":");
- style[trim(item[0])] = trim(item[1]);
- }
- }
- return style;
- }
- let string2 = "";
- for (const i in customStyle) {
- const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
- string2 += `${key}:${customStyle[i]};`;
- }
- return trim(string2);
- }
- function addUnit(value2 = "auto", unit = "") {
- if (!unit) {
- unit = uni.$u.config.unit || "px";
- }
- value2 = String(value2);
- return test.number(value2) ? `${value2}${unit}` : value2;
- }
- function deepClone(obj) {
- if ([null, void 0, NaN, false].includes(obj))
- return obj;
- if (typeof obj !== "object" && typeof obj !== "function") {
- return obj;
- }
- const o = test.array(obj) ? [] : {};
- for (const i in obj) {
- if (obj.hasOwnProperty(i)) {
- o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
- }
- }
- return o;
- }
- function deepMerge(target = {}, source = {}) {
- target = deepClone(target);
- if (typeof target !== "object" || typeof source !== "object")
- return false;
- for (const prop in source) {
- if (!source.hasOwnProperty(prop))
- continue;
- if (prop in target) {
- if (typeof target[prop] !== "object") {
- target[prop] = source[prop];
- } else if (typeof source[prop] !== "object") {
- target[prop] = source[prop];
- } else if (target[prop].concat && source[prop].concat) {
- target[prop] = target[prop].concat(source[prop]);
- } else {
- target[prop] = deepMerge(target[prop], source[prop]);
- }
- } else {
- target[prop] = source[prop];
- }
- }
- return target;
- }
- function error(err) {
- {
- formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
- }
- }
- function randomArray(array3 = []) {
- return array3.sort(() => Math.random() - 0.5);
- }
- if (!String.prototype.padStart) {
- String.prototype.padStart = function(maxLength, fillString = " ") {
- if (Object.prototype.toString.call(fillString) !== "[object String]") {
- throw new TypeError(
- "fillString must be String"
- );
- }
- const str = this;
- if (str.length >= maxLength)
- return String(str);
- const fillLength = maxLength - str.length;
- let times2 = Math.ceil(fillLength / fillString.length);
- while (times2 >>= 1) {
- fillString += fillString;
- if (times2 === 1) {
- fillString += fillString;
- }
- }
- return fillString.slice(0, fillLength) + str;
- };
- }
- function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
- let date3;
- if (!dateTime) {
- date3 = /* @__PURE__ */ new Date();
- } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
- date3 = new Date(dateTime * 1e3);
- } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
- date3 = new Date(Number(dateTime));
- } else {
- date3 = new Date(
- typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
- );
- }
- const timeSource = {
- "y": date3.getFullYear().toString(),
- // 年
- "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
- // 月
- "d": date3.getDate().toString().padStart(2, "0"),
- // 日
- "h": date3.getHours().toString().padStart(2, "0"),
- // 时
- "M": date3.getMinutes().toString().padStart(2, "0"),
- // 分
- "s": date3.getSeconds().toString().padStart(2, "0")
- // 秒
- // 有其他格式化字符需求可以继续添加,必须转化成字符串
- };
- for (const key in timeSource) {
- const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
- if (ret) {
- const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
- formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
- }
- }
- return formatStr;
- }
- function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
- if (timestamp == null)
- timestamp = Number(/* @__PURE__ */ new Date());
- timestamp = parseInt(timestamp);
- if (timestamp.toString().length == 10)
- timestamp *= 1e3;
- let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
- timer = parseInt(timer / 1e3);
- let tips = "";
- switch (true) {
- case timer < 300:
- tips = "刚刚";
- break;
- case (timer >= 300 && timer < 3600):
- tips = `${parseInt(timer / 60)}分钟前`;
- break;
- case (timer >= 3600 && timer < 86400):
- tips = `${parseInt(timer / 3600)}小时前`;
- break;
- case (timer >= 86400 && timer < 2592e3):
- tips = `${parseInt(timer / 86400)}天前`;
- break;
- default:
- if (format2 === false) {
- if (timer >= 2592e3 && timer < 365 * 86400) {
- tips = `${parseInt(timer / (86400 * 30))}个月前`;
- } else {
- tips = `${parseInt(timer / (86400 * 365))}年前`;
- }
- } else {
- tips = timeFormat(timestamp, format2);
- }
- }
- return tips;
- }
- function trim(str, pos = "both") {
- str = String(str);
- if (pos == "both") {
- return str.replace(/^\s+|\s+$/g, "");
- }
- if (pos == "left") {
- return str.replace(/^\s*/, "");
- }
- if (pos == "right") {
- return str.replace(/(\s*$)/g, "");
- }
- if (pos == "all") {
- return str.replace(/\s+/g, "");
- }
- return str;
- }
- function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
- const prefix = isPrefix ? "?" : "";
- const _result = [];
- if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
- arrayFormat = "brackets";
- for (const key in data) {
- const value2 = data[key];
- if (["", void 0, null].indexOf(value2) >= 0) {
- continue;
- }
- if (value2.constructor === Array) {
- switch (arrayFormat) {
- case "indices":
- for (let i = 0; i < value2.length; i++) {
- _result.push(`${key}[${i}]=${value2[i]}`);
- }
- break;
- case "brackets":
- value2.forEach((_value) => {
- _result.push(`${key}[]=${_value}`);
- });
- break;
- case "repeat":
- value2.forEach((_value) => {
- _result.push(`${key}=${_value}`);
- });
- break;
- case "comma":
- let commaStr = "";
- value2.forEach((_value) => {
- commaStr += (commaStr ? "," : "") + _value;
- });
- _result.push(`${key}=${commaStr}`);
- break;
- default:
- value2.forEach((_value) => {
- _result.push(`${key}[]=${_value}`);
- });
- }
- } else {
- _result.push(`${key}=${value2}`);
- }
- }
- return _result.length ? prefix + _result.join("&") : "";
- }
- function toast(title, duration = 2e3) {
- uni.showToast({
- title: String(title),
- icon: "none",
- duration
- });
- }
- function type2icon(type2 = "success", fill = false) {
- if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
- type2 = "success";
- let iconName = "";
- switch (type2) {
- case "primary":
- iconName = "info-circle";
- break;
- case "info":
- iconName = "info-circle";
- break;
- case "error":
- iconName = "close-circle";
- break;
- case "warning":
- iconName = "error-circle";
- break;
- case "success":
- iconName = "checkmark-circle";
- break;
- default:
- iconName = "checkmark-circle";
- }
- if (fill)
- iconName += "-fill";
- return iconName;
- }
- function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
- number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
- const n = !isFinite(+number3) ? 0 : +number3;
- const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
- const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
- const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
- let s = "";
- s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
- const re = /(-?\d+)(\d{3})/;
- while (re.test(s[0])) {
- s[0] = s[0].replace(re, `$1${sep}$2`);
- }
- if ((s[1] || "").length < prec) {
- s[1] = s[1] || "";
- s[1] += new Array(prec - s[1].length + 1).join("0");
- }
- return s.join(dec);
- }
- function getDuration(value2, unit = true) {
- const valueNum = parseInt(value2);
- if (unit) {
- if (/s$/.test(value2))
- return value2;
- return value2 > 30 ? `${value2}ms` : `${value2}s`;
- }
- if (/ms$/.test(value2))
- return valueNum;
- if (/s$/.test(value2))
- return valueNum > 30 ? valueNum : valueNum * 1e3;
- return valueNum;
- }
- function padZero(value2) {
- return `00${value2}`.slice(-2);
- }
- function formValidate(instance, event) {
- const formItem = uni.$u.$parent.call(instance, "u-form-item");
- const form = uni.$u.$parent.call(instance, "u-form");
- if (formItem && form) {
- form.validateField(formItem.prop, () => {
- }, event);
- }
- }
- function getProperty(obj, key) {
- if (!obj) {
- return;
- }
- if (typeof key !== "string" || key === "") {
- return "";
- }
- if (key.indexOf(".") !== -1) {
- const keys = key.split(".");
- let firstObj = obj[keys[0]] || {};
- for (let i = 1; i < keys.length; i++) {
- if (firstObj) {
- firstObj = firstObj[keys[i]];
- }
- }
- return firstObj;
- }
- return obj[key];
- }
- function setProperty(obj, key, value2) {
- if (!obj) {
- return;
- }
- const inFn = function(_obj, keys, v) {
- if (keys.length === 1) {
- _obj[keys[0]] = v;
- return;
- }
- while (keys.length > 1) {
- const k = keys[0];
- if (!_obj[k] || typeof _obj[k] !== "object") {
- _obj[k] = {};
- }
- keys.shift();
- inFn(_obj[k], keys, v);
- }
- };
- if (typeof key !== "string" || key === "")
- ;
- else if (key.indexOf(".") !== -1) {
- const keys = key.split(".");
- inFn(obj, keys, value2);
- } else {
- obj[key] = value2;
- }
- }
- function page$1() {
- const pages2 = getCurrentPages();
- return `/${pages2[pages2.length - 1].route || ""}`;
- }
- function pages() {
- const pages2 = getCurrentPages();
- return pages2;
- }
- function setConfig({
- props: props2 = {},
- config: config2 = {},
- color: color2 = {},
- zIndex: zIndex2 = {}
- }) {
- const {
- deepMerge: deepMerge2
- } = uni.$u;
- uni.$u.config = deepMerge2(uni.$u.config, config2);
- uni.$u.props = deepMerge2(uni.$u.props, props2);
- uni.$u.color = deepMerge2(uni.$u.color, color2);
- uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
- }
- const index = {
- range,
- getPx,
- sleep,
- os,
- sys,
- random,
- guid,
- $parent,
- addStyle,
- addUnit,
- deepClone,
- deepMerge,
- error,
- randomArray,
- timeFormat,
- timeFrom,
- trim,
- queryParams,
- toast,
- type2icon,
- priceFormat,
- getDuration,
- padZero,
- formValidate,
- getProperty,
- setProperty,
- page: page$1,
- pages,
- setConfig
- };
- const zIndex = {
- toast: 10090,
- noNetwork: 10080,
- // popup包含popup,actionsheet,keyboard,picker的值
- popup: 10075,
- mask: 10070,
- navbar: 980,
- topTips: 975,
- sticky: 970,
- indexListSticky: 965
- };
- let platform = "none";
- platform = "vue3";
- platform = "plus";
- const platform$1 = platform;
- const $u = {
- route,
- date: index.timeFormat,
- // 另名date
- colorGradient: colorGradient$1.colorGradient,
- hexToRgb: colorGradient$1.hexToRgb,
- rgbToHex: colorGradient$1.rgbToHex,
- colorToRgba: colorGradient$1.colorToRgba,
- test,
- type: ["primary", "success", "error", "warning", "info"],
- http: new Request(),
- config,
- // uView配置信息相关,比如版本号
- zIndex,
- debounce,
- throttle,
- mixin,
- mpMixin,
- props: props$x,
- ...index,
- color,
- platform: platform$1
- };
- uni.$u = $u;
- const install = (Vue2) => {
- Vue2.config.globalProperties.$u = $u;
- Vue2.config.globalProperties.$nextTick = (cb) => {
- cb();
- };
- Vue2.mixin(mixin);
- };
- const uviewPlus = {
- install
- };
- const share = {
- data() {
- return {
- // 默认的全局分享内容
- share: {
- title: "标题",
- path: "/pages/home/home",
- // 这里是分享的页面
- imageUrl: ""
- // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
- }
- };
- },
- // 定义全局分享
- // 1.发送给朋友
- onShareAppMessage(res) {
- return {
- title: this.share.title,
- path: this.share.path,
- imageUrl: this.share.imageUrl
- };
- },
- //2.分享到朋友圈
- onShareTimeline(res) {
- return {
- title: this.share.title,
- path: this.share.path,
- imageUrl: this.share.imageUrl
- };
- }
- };
- function initRequest() {
- formatAppLog("log", "at config/request.js:8", "初始化了 http 请求代码");
- uni.$u.http.setConfig((config2) => {
- config2.baseURL = `http://tf.hqzf100.com/dev-api/`;
- config2.custom.toast = true;
- return config2;
- });
- uni.$u.http.interceptors.request.use((config2) => {
- config2.data = config2.data || {};
- let token = store.token;
- config2.header.Authorization = token ? `Bearer ${token}` : "";
- return config2;
- }, (config2) => {
- return Promise.reject(config2);
- });
- uni.$u.http.interceptors.response.use((response) => {
- var _a;
- const data = response.data;
- const custom = (_a = response.config) == null ? void 0 : _a.custom;
- if (data.code !== 200) {
- if (data.code === 401) {
- uni.$u.toast(data.msg || "身份认证失败,请先登录");
- store.setToken("");
- setTimeout(() => {
- uni.$u.route({
- type: "reLaunch",
- url: "/pages/login/login"
- // 跳转到登录页
- });
- }, 1e3);
- } else {
- if (custom.toast !== false) {
- uni.$u.toast(data.msg);
- }
- return data;
- }
- }
- return data;
- }, (response) => {
- return Promise.reject(response);
- });
- }
- function createApp() {
- const app = vue.createVueApp(App);
- initRequest();
- const pinia2 = createPinia();
- app.use(pinia2).use(uviewPlus);
- app.mixin(share);
- return {
- app,
- pinia: pinia2
- };
- }
- const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
- uni.Vuex = __Vuex__;
- uni.Pinia = __Pinia__;
- __app__.provide("__globalStyles", __uniConfig.styles);
- __app__._component.mpType = "app";
- __app__._component.render = () => {
- };
- __app__.mount("#app");
- })(Vue);
|